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
|
---|---|---|---|---|---|---|---|---|---|---|---|
2,282 | func0 |
#include <iostream>
#include <vector>
#include <algorithm>
#include <assert.h>
| int func0(std::vector<int> arr, int N, int K) {
std::sort(arr.begin(), arr.end());
std::vector<int> dp(N, 0);
dp[0] = 0;
for (int i = 1; i < N; ++i) {
dp[i] = dp[i-1];
if (arr[i] - arr[i-1] < K) {
if (i >= 2) {
dp[i] = std::max(dp[i], dp[i-2] + arr[i] + arr[i-1]);
} else {
dp[i] = std::max(dp[i], arr[i] + arr[i-1]);
}
}
}
return dp[N - 1];
}
| int main() {
assert(func0({3, 5, 10, 15, 17, 12, 9}, 7, 4) == 62);
assert(func0({5, 15, 10, 300}, 4, 12) == 25);
assert(func0({1, 2, 3, 4, 5, 6}, 6, 6) == 21);
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> >, int, int):
endbr64
push %r15
push %r14
push %r13
mov %rdi,%r13
push %r12
push %rbp
mov %esi,%ebp
push %rbx
mov %edx,%ebx
sub $0x8,%rsp
mov 0x8(%rdi),%r14
mov (%rdi),%r15
cmp %r15,%r14
je 158c <_Z5func0St6vectorIiSaIiEEii+0xac>
mov %r14,%r12
mov $0x3f,%edx
mov %r14,%rsi
mov %r15,%rdi
sub %r15,%r12
mov %r12,%rax
sar $0x2,%rax
bsr %rax,%rax
xor $0x3f,%rax
sub %eax,%edx
movslq %edx,%rdx
add %rdx,%rdx
callq 1950 <_ZSt16__introsort_loopIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEElNS0_5__ops15_Iter_less_iterEEvT_S9_T0_T1_>
cmp $0x40,%r12
jle 1668 <_Z5func0St6vectorIiSaIiEEii+0x188>
lea 0x40(%r15),%r12
mov %r15,%rdi
mov %r12,%rsi
callq 1780 <_ZSt16__insertion_sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEENS0_5__ops15_Iter_less_iterEEvT_S9_T0_>
cmp %r12,%r14
je 158c <_Z5func0St6vectorIiSaIiEEii+0xac>
nopl 0x0(%rax)
mov (%r12),%ecx
mov -0x4(%r12),%edx
lea -0x4(%r12),%rax
cmp %edx,%ecx
jge 1680 <_Z5func0St6vectorIiSaIiEEii+0x1a0>
xchg %ax,%ax
mov %edx,0x4(%rax)
mov %rax,%rsi
mov -0x4(%rax),%edx
sub $0x4,%rax
cmp %edx,%ecx
jl 1570 <_Z5func0St6vectorIiSaIiEEii+0x90>
add $0x4,%r12
mov %ecx,(%rsi)
cmp %r12,%r14
jne 1558 <_Z5func0St6vectorIiSaIiEEii+0x78>
movabs $0x1fffffffffffffff,%rax
movslq %ebp,%r12
cmp %rax,%r12
ja 16ad <_Z5func0St6vectorIiSaIiEEii+0x1cd>
test %r12,%r12
je 16a0 <_Z5func0St6vectorIiSaIiEEii+0x1c0>
shl $0x2,%r12
mov %r12,%rdi
callq 1130 <_Znwm@plt>
mov %rax,%rdi
lea (%rax,%r12,1),%rax
mov %rdi,%rdx
nopl 0x0(%rax)
movl $0x0,(%rdx)
add $0x4,%rdx
cmp %rax,%rdx
jne 15c8 <_Z5func0St6vectorIiSaIiEEii+0xe8>
movl $0x0,(%rdi)
cmp $0x1,%ebp
jle 1646 <_Z5func0St6vectorIiSaIiEEii+0x166>
lea -0x2(%rbp),%r10d
mov 0x0(%r13),%r8
mov $0x1,%edx
xor %eax,%eax
add $0x1,%r10
jmp 161a <_Z5func0St6vectorIiSaIiEEii+0x13a>
nopw 0x0(%rax,%rax,1)
add -0x8(%rdi,%rdx,4),%ecx
add %esi,%ecx
cmp %eax,%ecx
cmovl %eax,%ecx
mov %ecx,(%rdi,%rdx,4)
cmp %r10,%rdx
je 1646 <_Z5func0St6vectorIiSaIiEEii+0x166>
mov (%rdi,%rdx,4),%eax
add $0x1,%rdx
mov (%r8,%rdx,4),%ecx
mov -0x4(%r8,%rdx,4),%esi
mov %eax,(%rdi,%rdx,4)
mov %ecx,%r9d
sub %esi,%r9d
cmp %ebx,%r9d
jge 160e <_Z5func0St6vectorIiSaIiEEii+0x12e>
cmp $0x1,%rdx
jne 1600 <_Z5func0St6vectorIiSaIiEEii+0x120>
add %ecx,%esi
cmp %eax,%esi
cmovge %esi,%eax
mov %eax,0x4(%rdi)
cmp %r10,%rdx
jne 1613 <_Z5func0St6vectorIiSaIiEEii+0x133>
mov -0x4(%rdi,%r12,1),%r12d
callq 1120 <_ZdlPv@plt>
add $0x8,%rsp
pop %rbx
mov %r12d,%eax
pop %rbp
pop %r12
pop %r13
pop %r14
pop %r15
retq
nopw 0x0(%rax,%rax,1)
mov %r14,%rsi
mov %r15,%rdi
callq 1780 <_ZSt16__insertion_sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEENS0_5__ops15_Iter_less_iterEEvT_S9_T0_>
jmpq 158c <_Z5func0St6vectorIiSaIiEEii+0xac>
nopl 0x0(%rax,%rax,1)
mov %r12,%rsi
add $0x4,%r12
mov %ecx,(%rsi)
cmp %r12,%r14
jne 1558 <_Z5func0St6vectorIiSaIiEEii+0x78>
jmpq 158c <_Z5func0St6vectorIiSaIiEEii+0xac>
nopw 0x0(%rax,%rax,1)
movl $0x0,0x0
ud2
lea 0x954(%rip),%rdi
callq 10e0 <_ZSt20__throw_length_errorPKc@plt>
nopl 0x0(%rax)
| _Z5func0St6vectorIiSaIiEEii:
endbr64
push r15
push r14
push r13
push r12
mov r12d, esi
push rbp
mov rbp, rdi
push rbx
mov ebx, edx
sub rsp, 8
mov r14, [rdi+8]
mov r15, [rdi]
cmp r15, r14
jz short loc_1884
mov r13, r14
mov rdx, 0FFFFFFFFFFFFFFFEh
sub r13, r15
mov rax, r13
sar rax, 2
jz short loc_1826
bsr rax, rax
cdqe
lea rdx, [rax+rax]
loc_1826:
mov rsi, r14
mov rdi, r15
call _ZSt16__introsort_loopIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEElNS0_5__ops15_Iter_less_iterEEvT_S9_T0_T1__isra_0; std::__introsort_loop<__gnu_cxx::__normal_iterator<int *,std::vector<int>>,long,__gnu_cxx::__ops::_Iter_less_iter>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__normal_iterator<int *,std::vector<int>>,long,__gnu_cxx::__ops::_Iter_less_iter) [clone]
cmp r13, 40h ; '@'
jle loc_1948
lea r13, [r15+40h]
mov rdi, r15; src
mov rsi, r13
call _ZSt16__insertion_sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEENS0_5__ops15_Iter_less_iterEEvT_S9_T0__isra_0; std::__insertion_sort<__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__ops::_Iter_less_iter>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__ops::_Iter_less_iter) [clone]
cmp r14, r13
jz short loc_1884
nop
loc_1850:
mov ecx, [r13+0]
mov edx, [r13-4]
lea rax, [r13-4]
cmp edx, ecx
jle loc_1970
nop dword ptr [rax+00h]
loc_1868:
mov [rax+4], edx
mov rsi, rax
mov edx, [rax-4]
sub rax, 4
cmp ecx, edx
jl short loc_1868
add r13, 4
mov [rsi], ecx
cmp r14, r13
jnz short loc_1850
loc_1884:
movsxd r13, r12d
mov rax, r13
shr rax, 3Dh
jnz loc_1987
test r13, r13
jz loc_1960
shl r13, 2
mov rdi, r13; unsigned __int64
call __Znwm; operator new(ulong)
mov rdx, r13; n
xor esi, esi; c
mov rdi, rax; s
call _memset
mov dword ptr [rax], 0
mov rdi, rax; void *
cmp r12d, 1
jz short loc_1926
mov r8, [rbp+0]
lea r10d, [r12-1]
mov eax, 1
xor ecx, ecx
jmp short loc_18FA
loc_18E0:
add edx, [rdi+rax*4-8]
add edx, esi
cmp edx, ecx
cmovl edx, ecx
mov [rdi+rax*4], edx
loc_18EE:
cmp r10, rax
jz short loc_1926
loc_18F3:
mov ecx, [rdi+rax*4]
add rax, 1
loc_18FA:
mov [rdi+rax*4], ecx
mov edx, [r8+rax*4]
mov esi, [r8+rax*4-4]
mov r9d, edx
sub r9d, esi
cmp r9d, ebx
jge short loc_18EE
cmp rax, 1
jnz short loc_18E0
add edx, esi
cmp edx, ecx
cmovl edx, ecx
mov [rdi+4], edx
cmp r10, rax
jnz short loc_18F3
loc_1926:
mov ebx, [rdi+r13-4]
mov rsi, r13; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
add rsp, 8
mov eax, ebx
pop rbx
pop rbp
pop r12
pop r13
pop r14
pop r15
retn
loc_1948:
mov rsi, r14
mov rdi, r15; src
call _ZSt16__insertion_sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEENS0_5__ops15_Iter_less_iterEEvT_S9_T0__isra_0; std::__insertion_sort<__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__ops::_Iter_less_iter>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__ops::_Iter_less_iter) [clone]
jmp loc_1884
loc_1960:
mov ds:dword_0, 0
ud2
loc_1970:
mov rsi, r13
add r13, 4
mov [rsi], ecx
cmp r14, r13
jnz loc_1850
jmp loc_1884
loc_1987:
lea rdi, aCannotCreateSt; "cannot create std::vector larger than m"...
call __ZSt20__throw_length_errorPKc; std::__throw_length_error(char const*) | long long func0(char **a1, int a2, int a3)
{
char *v6; // r14
char *v7; // r15
long long v8; // rdx
unsigned long long v9; // rax
char *v10; // r13
int v11; // ecx
int v12; // edx
char *v13; // rax
char *v14; // rsi
unsigned long long v15; // r13
void *v16; // rax
_DWORD *v17; // rax
_DWORD *v18; // rdi
char *v19; // r8
long long v20; // r10
long long v21; // rax
int i; // ecx
int v23; // edx
int v24; // edx
int v25; // esi
int v26; // edx
unsigned int v27; // ebx
char *v29; // rsi
v6 = a1[1];
v7 = *a1;
if ( *a1 != v6 )
{
v8 = -2LL;
if ( (v6 - v7) >> 2 )
{
_BitScanReverse64(&v9, (v6 - v7) >> 2);
v8 = 2LL * (int)v9;
}
std::__introsort_loop<__gnu_cxx::__normal_iterator<int *,std::vector<int>>,long,__gnu_cxx::__ops::_Iter_less_iter>(
*a1,
a1[1],
v8);
if ( v6 - v7 <= 64 )
{
std::__insertion_sort<__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__ops::_Iter_less_iter>(v7);
}
else
{
v10 = v7 + 64;
std::__insertion_sort<__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__ops::_Iter_less_iter>(v7);
if ( v6 != v7 + 64 )
{
do
{
while ( 1 )
{
v11 = *(_DWORD *)v10;
v12 = *((_DWORD *)v10 - 1);
v13 = v10 - 4;
if ( v12 > *(_DWORD *)v10 )
break;
v29 = v10;
v10 += 4;
*(_DWORD *)v29 = v11;
if ( v6 == v10 )
goto LABEL_9;
}
do
{
*((_DWORD *)v13 + 1) = v12;
v14 = v13;
v12 = *((_DWORD *)v13 - 1);
v13 -= 4;
}
while ( v11 < v12 );
v10 += 4;
*(_DWORD *)v14 = v11;
}
while ( v6 != v10 );
}
}
}
LABEL_9:
if ( (unsigned long long)a2 >> 61 )
std::__throw_length_error("cannot create std::vector larger than max_size()");
if ( !a2 )
{
dword_0 = 0;
BUG();
}
v15 = 4LL * a2;
v16 = (void *)operator new(v15);
v17 = memset(v16, 0, v15);
*v17 = 0;
v18 = v17;
if ( a2 != 1 )
{
v19 = *a1;
v20 = (unsigned int)(a2 - 1);
v21 = 1LL;
for ( i = 0; ; i = v18[v21++] )
{
v18[v21] = i;
v24 = *(_DWORD *)&v19[4 * v21];
v25 = *(_DWORD *)&v19[4 * v21 - 4];
if ( v24 - v25 >= a3 )
goto LABEL_16;
if ( v21 != 1 )
break;
v26 = v25 + v24;
if ( v26 < i )
v26 = i;
v18[1] = v26;
if ( v20 == 1 )
goto LABEL_23;
LABEL_17:
;
}
v23 = v25 + v18[v21 - 2] + v24;
if ( v23 < i )
v23 = i;
v18[v21] = v23;
LABEL_16:
if ( v20 == v21 )
goto LABEL_23;
goto LABEL_17;
}
LABEL_23:
v27 = v18[v15 / 4 - 1];
operator delete(v18, v15);
return v27;
} | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
MOV R12D,ESI
PUSH RBP
MOV RBP,RDI
PUSH RBX
MOV EBX,EDX
SUB RSP,0x8
MOV R14,qword ptr [RDI + 0x8]
MOV R15,qword ptr [RDI]
CMP R15,R14
JZ 0x00101884
MOV R13,R14
MOV RDX,-0x2
SUB R13,R15
MOV RAX,R13
SAR RAX,0x2
JZ 0x00101826
BSR RAX,RAX
CDQE
LEA RDX,[RAX + RAX*0x1]
LAB_00101826:
MOV RSI,R14
MOV RDI,R15
CALL 0x00101610
CMP R13,0x40
JLE 0x00101948
LEA R13,[R15 + 0x40]
MOV RDI,R15
MOV RSI,R13
CALL 0x00101560
CMP R14,R13
JZ 0x00101884
NOP
LAB_00101850:
MOV ECX,dword ptr [R13]
MOV EDX,dword ptr [R13 + -0x4]
LEA RAX,[R13 + -0x4]
CMP EDX,ECX
JLE 0x00101970
NOP dword ptr [RAX]
LAB_00101868:
MOV dword ptr [RAX + 0x4],EDX
MOV RSI,RAX
MOV EDX,dword ptr [RAX + -0x4]
SUB RAX,0x4
CMP ECX,EDX
JL 0x00101868
ADD R13,0x4
MOV dword ptr [RSI],ECX
CMP R14,R13
JNZ 0x00101850
LAB_00101884:
MOVSXD R13,R12D
MOV RAX,R13
SHR RAX,0x3d
JNZ 0x00101987
TEST R13,R13
JZ 0x00101960
SHL R13,0x2
MOV RDI,R13
CALL 0x00101110
MOV RDX,R13
XOR ESI,ESI
MOV RDI,RAX
CALL 0x001010e0
MOV dword ptr [RAX],0x0
MOV RDI,RAX
CMP R12D,0x1
JZ 0x00101926
MOV R8,qword ptr [RBP]
LEA R10D,[R12 + -0x1]
MOV EAX,0x1
XOR ECX,ECX
JMP 0x001018fa
LAB_001018e0:
ADD EDX,dword ptr [RDI + RAX*0x4 + -0x8]
ADD EDX,ESI
CMP EDX,ECX
CMOVL EDX,ECX
MOV dword ptr [RDI + RAX*0x4],EDX
LAB_001018ee:
CMP R10,RAX
JZ 0x00101926
LAB_001018f3:
MOV ECX,dword ptr [RDI + RAX*0x4]
ADD RAX,0x1
LAB_001018fa:
MOV dword ptr [RDI + RAX*0x4],ECX
MOV EDX,dword ptr [R8 + RAX*0x4]
MOV ESI,dword ptr [R8 + RAX*0x4 + -0x4]
MOV R9D,EDX
SUB R9D,ESI
CMP R9D,EBX
JGE 0x001018ee
CMP RAX,0x1
JNZ 0x001018e0
ADD EDX,ESI
CMP EDX,ECX
CMOVL EDX,ECX
MOV dword ptr [RDI + 0x4],EDX
CMP R10,RAX
JNZ 0x001018f3
LAB_00101926:
MOV EBX,dword ptr [RDI + R13*0x1 + -0x4]
MOV RSI,R13
CALL 0x00101120
ADD RSP,0x8
MOV EAX,EBX
POP RBX
POP RBP
POP R12
POP R13
POP R14
POP R15
RET
LAB_00101948:
MOV RSI,R14
MOV RDI,R15
CALL 0x00101560
JMP 0x00101884
LAB_00101960:
MOV dword ptr [0x00000000],0x0
UD2
LAB_00101970:
MOV RSI,R13
ADD R13,0x4
MOV dword ptr [RSI],ECX
CMP R14,R13
JNZ 0x00101850
JMP 0x00101884
LAB_00101987:
LEA RDI,[0x102008]
CALL 0x001010d0
NOP word ptr CS:[RAX + RAX*0x1]
NOP dword ptr [RAX] | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(std::vector<int, std::allocator<int> >, int, int) */
void * func0(vector param_1,int param_2,int param_3)
{
uint uVar1;
int *piVar2;
code *pcVar3;
int *piVar4;
ulong uVar5;
int *piVar6;
void *pvVar7;
int4 *puVar8;
ulong uVar9;
void *extraout_RAX;
_Iter_less_iter in_ECX;
int iVar10;
_Iter_less_iter extraout_EDX;
int iVar11;
int iVar12;
int iVar13;
long lVar14;
__normal_iterator _Var15;
int4 in_register_0000003c;
long *plVar16;
char *pcVar17;
int *piVar18;
ulong __n;
plVar16 = (long *)CONCAT44(in_register_0000003c,param_1);
piVar2 = (int *)plVar16[1];
piVar18 = (int *)*plVar16;
if (piVar18 != piVar2) {
lVar14 = -2;
uVar5 = (long)piVar2 - (long)piVar18 >> 2;
if (uVar5 != 0) {
lVar14 = 0x3f;
if (uVar5 != 0) {
for (; uVar5 >> lVar14 == 0; lVar14 = lVar14 + -1) {
}
}
lVar14 = (long)(int)lVar14 * 2;
}
_Var15 = (__normal_iterator)piVar18;
std::
__introsort_loop<__normal_iterator<int*,std::vector<int,std::allocator<int>>>,long,__ops::_Iter_less_iter>
(_Var15,(__normal_iterator)piVar2,lVar14,in_ECX);
if ((long)piVar2 - (long)piVar18 < 0x41) {
std::
__insertion_sort<__normal_iterator<int*,std::vector<int,std::allocator<int>>>,__ops::_Iter_less_iter>
(_Var15,(__normal_iterator)piVar2,extraout_EDX);
}
else {
piVar18 = piVar18 + 0x10;
std::
__insertion_sort<__normal_iterator<int*,std::vector<int,std::allocator<int>>>,__ops::_Iter_less_iter>
(_Var15,(__normal_iterator)piVar18,extraout_EDX);
for (; piVar2 != piVar18; piVar18 = piVar18 + 1) {
while( true ) {
iVar10 = *piVar18;
iVar11 = piVar18[-1];
piVar4 = piVar18;
if (iVar11 <= iVar10) break;
do {
piVar6 = piVar4 + -1;
*piVar4 = iVar11;
iVar11 = piVar4[-2];
piVar4 = piVar6;
} while (iVar10 < iVar11);
piVar18 = piVar18 + 1;
*piVar6 = iVar10;
if (piVar2 == piVar18) goto LAB_00101884;
}
*piVar18 = iVar10;
}
}
}
LAB_00101884:
uVar5 = (ulong)param_2;
if (uVar5 >> 0x3d != 0) {
pcVar17 = "cannot create std::vector larger than max_size()";
std::__throw_length_error("cannot create std::vector larger than max_size()");
pvVar7 = *(void **)pcVar17;
if (pvVar7 != (void *)0x0) {
operator_delete(pvVar7,*(long *)(pcVar17 + 0x10) - (long)pvVar7);
return extraout_RAX;
}
return pvVar7;
}
if (uVar5 == 0) {
_DAT_00000000 = 0;
/* WARNING: Does not return */
pcVar3 = (code *)invalidInstructionException();
(*pcVar3)();
}
__n = uVar5 * 4;
pvVar7 = operator_new(__n);
puVar8 = (int4 *)memset(pvVar7,0,__n);
*puVar8 = 0;
if (param_2 != 1) {
lVar14 = *plVar16;
uVar9 = 1;
iVar10 = 0;
do {
puVar8[uVar9] = iVar10;
iVar11 = *(int *)(lVar14 + uVar9 * 4);
iVar12 = *(int *)(lVar14 + -4 + uVar9 * 4);
if (iVar11 - iVar12 < param_3) {
if (uVar9 != 1) {
iVar12 = iVar11 + puVar8[uVar9 - 2] + iVar12;
if (iVar12 < iVar10) {
iVar12 = iVar10;
}
puVar8[uVar9] = iVar12;
goto LAB_001018ee;
}
iVar13 = iVar11 + iVar12;
if (iVar11 + iVar12 < iVar10) {
iVar13 = iVar10;
}
puVar8[1] = iVar13;
if ((ulong)(param_2 - 1) == 1) break;
}
else {
LAB_001018ee:
if (param_2 - 1 == uVar9) break;
}
iVar10 = puVar8[uVar9];
uVar9 = uVar9 + 1;
} while( true );
}
uVar1 = puVar8[uVar5 - 1];
operator_delete(puVar8,__n);
return (void *)(ulong)uVar1;
} |
2,283 | func0 |
#include <iostream>
#include <vector>
#include <algorithm>
#include <assert.h>
| int func0(std::vector<int> arr, int N, int K) {
std::sort(arr.begin(), arr.end());
std::vector<int> dp(N, 0);
dp[0] = 0;
for (int i = 1; i < N; ++i) {
dp[i] = dp[i-1];
if (arr[i] - arr[i-1] < K) {
if (i >= 2) {
dp[i] = std::max(dp[i], dp[i-2] + arr[i] + arr[i-1]);
} else {
dp[i] = std::max(dp[i], arr[i] + arr[i-1]);
}
}
}
return dp[N - 1];
}
| int main() {
assert(func0({3, 5, 10, 15, 17, 12, 9}, 7, 4) == 62);
assert(func0({5, 15, 10, 300}, 4, 12) == 25);
assert(func0({1, 2, 3, 4, 5, 6}, 6, 6) == 21);
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> >, int, int):
endbr64
push %r15
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
mov %edx,%ebp
push %rbx
mov %esi,%ebx
sub $0x18,%rsp
mov 0x8(%rdi),%r13
mov (%rdi),%r15
cmp %r15,%r13
je 15dc <_Z5func0St6vectorIiSaIiEEii+0x11c>
mov %r13,%r14
mov $0x3f,%edx
mov %r13,%rsi
mov %r15,%rdi
sub %r15,%r14
mov %r14,%rax
sar $0x2,%rax
bsr %rax,%rax
xor $0x3f,%rax
sub %eax,%edx
movslq %edx,%rdx
add %rdx,%rdx
callq 19d0 <_ZSt16__introsort_loopIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEElNS0_5__ops15_Iter_less_iterEEvT_S9_T0_T1_>
lea 0x4(%r15),%rcx
cmp $0x40,%r14
jle 1738 <_Z5func0St6vectorIiSaIiEEii+0x278>
lea 0x40(%r15),%r14
jmp 156a <_Z5func0St6vectorIiSaIiEEii+0xaa>
nopw 0x0(%rax,%rax,1)
cmp %rcx,%r15
je 155e <_Z5func0St6vectorIiSaIiEEii+0x9e>
mov %rcx,%rdx
mov $0x4,%eax
mov %r15,%rsi
mov %r9d,0xc(%rsp)
sub %r15,%rdx
lea (%r15,%rax,1),%rdi
mov %rcx,(%rsp)
callq 1180 <memmove@plt>
mov 0xc(%rsp),%r9d
mov (%rsp),%rcx
add $0x4,%rcx
mov %r9d,(%r15)
cmp %rcx,%r14
je 15a6 <_Z5func0St6vectorIiSaIiEEii+0xe6>
mov (%rcx),%r9d
cmp (%r15),%r9d
jl 1530 <_Z5func0St6vectorIiSaIiEEii+0x70>
mov -0x4(%rcx),%edx
lea -0x4(%rcx),%rax
cmp %edx,%r9d
jge 17da <_Z5func0St6vectorIiSaIiEEii+0x31a>
nopw 0x0(%rax,%rax,1)
mov %edx,0x4(%rax)
mov %rax,%rsi
mov -0x4(%rax),%edx
sub $0x4,%rax
cmp %edx,%r9d
jl 1588 <_Z5func0St6vectorIiSaIiEEii+0xc8>
add $0x4,%rcx
mov %r9d,(%rsi)
cmp %rcx,%r14
jne 156a <_Z5func0St6vectorIiSaIiEEii+0xaa>
mov %r14,%rcx
cmp %r14,%r13
je 15dc <_Z5func0St6vectorIiSaIiEEii+0x11c>
xchg %ax,%ax
mov (%rcx),%esi
mov -0x4(%rcx),%edx
mov %rcx,%rdi
lea -0x4(%rcx),%rax
cmp %edx,%esi
jge 15d1 <_Z5func0St6vectorIiSaIiEEii+0x111>
mov %edx,0x4(%rax)
mov %rax,%rdi
mov -0x4(%rax),%edx
sub $0x4,%rax
cmp %edx,%esi
jl 15c0 <_Z5func0St6vectorIiSaIiEEii+0x100>
add $0x4,%rcx
mov %esi,(%rdi)
cmp %rcx,%r13
jne 15b0 <_Z5func0St6vectorIiSaIiEEii+0xf0>
movabs $0x1fffffffffffffff,%rax
movslq %ebx,%r13
cmp %rax,%r13
ja 17e2 <_Z5func0St6vectorIiSaIiEEii+0x322>
test %r13,%r13
je 17b0 <_Z5func0St6vectorIiSaIiEEii+0x2f0>
shl $0x2,%r13
mov %r13,%rdi
callq 1150 <_Znwm@plt>
mov %r13,%rdx
xor %esi,%esi
mov %rax,%rdi
callq 1100 <memset@plt>
movl $0x0,(%rax)
mov %rax,%rdi
cmp $0x1,%ebx
jle 16ff <_Z5func0St6vectorIiSaIiEEii+0x23f>
mov (%r12),%r8
cmp $0x3,%ebx
jle 17ce <_Z5func0St6vectorIiSaIiEEii+0x30e>
mov %rax,%rsi
lea -0x4(%rbx),%eax
mov (%r8),%r10d
mov $0x3,%r9d
shr %eax
xor %ecx,%ecx
lea 0x5(%rax,%rax,1),%r11
mov -0x8(%r8,%r9,4),%eax
mov %ecx,0x4(%rsi)
mov %eax,%edx
sub %r10d,%edx
cmp %ebp,%edx
jge 1679 <_Z5func0St6vectorIiSaIiEEii+0x1b9>
cmp $0x3,%r9d
je 17bd <_Z5func0St6vectorIiSaIiEEii+0x2fd>
mov -0x4(%rsi),%edx
add %eax,%edx
add %edx,%r10d
cmp %ecx,%r10d
cmovl %ecx,%r10d
mov %r10d,0x4(%rsi)
mov 0x4(%rsi),%edx
mov -0x4(%r8,%r9,4),%r10d
mov %edx,0x8(%rsi)
mov %r10d,%ecx
sub %eax,%ecx
cmp %ecx,%ebp
jg 1720 <_Z5func0St6vectorIiSaIiEEii+0x260>
movslq %r9d,%rax
add $0x2,%r9
mov 0x8(%rsi),%ecx
add $0x8,%rsi
cmp %r11,%r9
jne 164b <_Z5func0St6vectorIiSaIiEEii+0x18b>
jmp 16d1 <_Z5func0St6vectorIiSaIiEEii+0x211>
nopw %cs:0x0(%rax,%rax,1)
lea -0x2(%rax),%r9d
movslq %r9d,%r9
add (%rdi,%r9,4),%edx
add %esi,%edx
cmp %ecx,%edx
cmovl %ecx,%edx
mov %edx,(%rdi,%rax,4)
add $0x1,%rax
cmp %eax,%ebx
jle 16ff <_Z5func0St6vectorIiSaIiEEii+0x23f>
mov -0x4(%rdi,%rax,4),%ecx
mov (%r8,%rax,4),%edx
mov -0x4(%r8,%rax,4),%esi
mov %ecx,(%rdi,%rax,4)
mov %edx,%r9d
sub %esi,%r9d
cmp %r9d,%ebp
jle 16c5 <_Z5func0St6vectorIiSaIiEEii+0x205>
cmp $0x1,%eax
jne 16b0 <_Z5func0St6vectorIiSaIiEEii+0x1f0>
add %esi,%edx
cmp %ecx,%edx
cmovl %ecx,%edx
mov %edx,(%rdi,%rax,4)
add $0x1,%rax
cmp %eax,%ebx
jg 16cd <_Z5func0St6vectorIiSaIiEEii+0x20d>
mov -0x4(%rdi,%r13,1),%r12d
callq 1140 <_ZdlPv@plt>
add $0x18,%rsp
pop %rbx
mov %r12d,%eax
pop %rbp
pop %r12
pop %r13
pop %r14
pop %r15
retq
nopl 0x0(%rax,%rax,1)
mov (%rsi),%ecx
add %r10d,%ecx
add %ecx,%eax
cmp %edx,%eax
cmovl %edx,%eax
mov %eax,0x8(%rsi)
jmpq 1691 <_Z5func0St6vectorIiSaIiEEii+0x1d1>
nopl 0x0(%rax)
mov %rcx,%r14
cmp %rcx,%r13
jne 177c <_Z5func0St6vectorIiSaIiEEii+0x2bc>
jmpq 15dc <_Z5func0St6vectorIiSaIiEEii+0x11c>
nopl (%rax)
cmp %r14,%r15
je 176c <_Z5func0St6vectorIiSaIiEEii+0x2ac>
mov $0x4,%eax
mov %r14,%rdx
mov %r15,%rsi
mov %r8d,(%rsp)
sub %r15,%rdx
lea (%r15,%rax,1),%rdi
callq 1180 <memmove@plt>
mov (%rsp),%r8d
mov %r8d,(%r15)
add $0x4,%r14
cmp %r14,%r13
je 15dc <_Z5func0St6vectorIiSaIiEEii+0x11c>
mov (%r14),%r8d
mov %r14,%rsi
cmp (%r15),%r8d
jl 1748 <_Z5func0St6vectorIiSaIiEEii+0x288>
mov -0x4(%r14),%edx
lea -0x4(%r14),%rax
cmp %edx,%r8d
jge 17aa <_Z5func0St6vectorIiSaIiEEii+0x2ea>
nopl 0x0(%rax)
mov %edx,0x4(%rax)
mov %rax,%rsi
mov -0x4(%rax),%edx
sub $0x4,%rax
cmp %edx,%r8d
jl 1798 <_Z5func0St6vectorIiSaIiEEii+0x2d8>
mov %r8d,(%rsi)
jmp 176f <_Z5func0St6vectorIiSaIiEEii+0x2af>
movl $0x0,0x0
ud2
lea (%rax,%r10,1),%edx
cmp %ecx,%edx
cmovl %ecx,%edx
mov %edx,0x4(%rsi)
jmpq 167c <_Z5func0St6vectorIiSaIiEEii+0x1bc>
xor %ecx,%ecx
mov $0x1,%eax
jmpq 16d1 <_Z5func0St6vectorIiSaIiEEii+0x211>
mov %rcx,%rsi
jmpq 159a <_Z5func0St6vectorIiSaIiEEii+0xda>
lea 0x81f(%rip),%rdi
callq 10f0 <_ZSt20__throw_length_errorPKc@plt>
xchg %ax,%ax
| _Z5func0St6vectorIiSaIiEEii:
endbr64
push r15
push r14
push r13
push r12
push rbp
mov rbp, rdi
push rbx
mov ebx, edx
sub rsp, 18h
mov r15, [rdi+8]
mov r12, [rdi]
mov [rsp+48h+var_40], esi
cmp r12, r15
jz loc_182C
mov r14, r15
lea r13, [r12+4]
sub r14, r12
mov rax, r14
sar rax, 2
jz loc_18EC
bsr rdx, rax
mov rsi, r15
mov rdi, r12
movsxd rdx, edx
add rdx, rdx
call _ZSt16__introsort_loopIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEElNS0_5__ops15_Iter_less_iterEEvT_S9_T0_T1__isra_0; std::__introsort_loop<__gnu_cxx::__normal_iterator<int *,std::vector<int>>,long,__gnu_cxx::__ops::_Iter_less_iter>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__normal_iterator<int *,std::vector<int>>,long,__gnu_cxx::__ops::_Iter_less_iter) [clone]
cmp r14, 40h ; '@'
jle loc_18FE
lea r14, [r12+40h]
jmp short loc_17AA
loc_1770:
mov rdx, r13
sub rdx, r12; n
cmp rdx, 4
jle loc_19AF
mov edi, 4
mov rsi, r12; src
mov [rsp+48h+var_3C], r9d
sub rdi, rdx
add rdi, r13; dest
call _memmove
mov r9d, [rsp+48h+var_3C]
loc_179D:
add r13, 4
mov [r12], r9d
cmp r14, r13
jz short loc_17EE
loc_17AA:
mov r9d, [r13+0]
mov eax, [r12]
mov rsi, r13
cmp r9d, eax
jl short loc_1770
mov edx, [r13-4]
lea rax, [r13-4]
cmp r9d, edx
jge short loc_17E2
nop word ptr [rax+rax+00000000h]
loc_17D0:
mov [rax+4], edx
mov rsi, rax
mov edx, [rax-4]
sub rax, 4
cmp r9d, edx
jl short loc_17D0
loc_17E2:
add r13, 4
mov [rsi], r9d
cmp r14, r13
jnz short loc_17AA
loc_17EE:
cmp r15, r14
jz short loc_182C
nop dword ptr [rax+rax+00h]
loc_17F8:
mov ecx, [r14]
mov edx, [r14-4]
lea rax, [r14-4]
cmp ecx, edx
jge loc_1990
nop dword ptr [rax+rax+00h]
loc_1810:
mov [rax+4], edx
mov rsi, rax
mov edx, [rax-4]
sub rax, 4
cmp ecx, edx
jl short loc_1810
add r14, 4
mov [rsi], ecx
cmp r15, r14
jnz short loc_17F8
loc_182C:
movsxd r13, [rsp+48h+var_40]
mov rax, r13
shr rax, 3Dh
jnz loc_19BE
test r13, r13
jz loc_1980
shl r13, 2
mov rdi, r13; unsigned __int64
call __Znwm; operator new(ulong)
mov rdx, r13; n
xor esi, esi; c
mov rdi, rax; s
call _memset
mov dword ptr [rax], 0
mov rdi, rax; void *
mov eax, [rsp+48h+var_40]
cmp eax, 1
jz short loc_18CE
lea r10d, [rax-1]
mov r8, [rbp+0]
mov eax, 1
xor ecx, ecx
jmp short loc_18A2
loc_1888:
add edx, [rdi+rax*4-8]
add edx, esi
cmp edx, ecx
cmovl edx, ecx
mov [rdi+rax*4], edx
loc_1896:
cmp rax, r10
jz short loc_18CE
loc_189B:
mov ecx, [rdi+rax*4]
add rax, 1
loc_18A2:
mov [rdi+rax*4], ecx
mov edx, [r8+rax*4]
mov esi, [r8+rax*4-4]
mov r9d, edx
sub r9d, esi
cmp r9d, ebx
jge short loc_1896
cmp rax, 1
jnz short loc_1888
add edx, esi
cmp edx, ecx
cmovl edx, ecx
mov [rdi+4], edx
cmp rax, r10
jnz short loc_189B
loc_18CE:
mov ebx, [rdi+r13-4]
mov rsi, r13; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
add rsp, 18h
mov eax, ebx
pop rbx
pop rbp
pop r12
pop r13
pop r14
pop r15
retn
loc_18EC:
mov rdx, 0FFFFFFFFFFFFFFFEh
mov rsi, r15
mov rdi, r12
call _ZSt16__introsort_loopIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEElNS0_5__ops15_Iter_less_iterEEvT_S9_T0_T1__isra_0; std::__introsort_loop<__gnu_cxx::__normal_iterator<int *,std::vector<int>>,long,__gnu_cxx::__ops::_Iter_less_iter>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__normal_iterator<int *,std::vector<int>>,long,__gnu_cxx::__ops::_Iter_less_iter) [clone]
loc_18FE:
cmp r15, r13
jnz short loc_1944
jmp loc_182C
loc_1910:
mov rdx, r13
sub rdx, r12; n
cmp rdx, 4
jle loc_19A7
mov edi, 4
mov rsi, r12; src
sub rdi, rdx
add rdi, r13; dest
call _memmove
loc_1933:
mov [r12], r14d
loc_1937:
add r13, 4
cmp r15, r13
jz loc_182C
loc_1944:
mov r14d, [r13+0]
mov eax, [r12]
mov rsi, r13
cmp r14d, eax
jl short loc_1910
mov edx, [r13-4]
lea rax, [r13-4]
cmp r14d, edx
jge short loc_197A
nop dword ptr [rax+00000000h]
loc_1968:
mov [rax+4], edx
mov rsi, rax
mov edx, [rax-4]
sub rax, 4
cmp r14d, edx
jl short loc_1968
loc_197A:
mov [rsi], r14d
jmp short loc_1937
loc_1980:
mov ds:dword_0, 0
ud2
loc_1990:
mov rsi, r14
add r14, 4
mov [rsi], ecx
cmp r15, r14
jnz loc_17F8
jmp loc_182C
loc_19A7:
jnz short loc_1933
mov [r13+0], eax
jmp short loc_1933
loc_19AF:
jnz loc_179D
mov [r13+0], eax
jmp loc_179D
loc_19BE:
lea rdi, aCannotCreateSt; "cannot create std::vector larger than m"...
call __ZSt20__throw_length_errorPKc; std::__throw_length_error(char const*) | long long func0(char **a1, int a2, int a3)
{
char *v5; // r15
char *v6; // r12
char *v7; // r13
unsigned long long v8; // rdx
char *v9; // r14
int v10; // r9d
char *v11; // rsi
int v12; // edx
char *j; // rax
int v14; // ecx
int v15; // edx
char *v16; // rax
char *v17; // rsi
unsigned long long v18; // r13
void *v19; // rax
_DWORD *v20; // rax
_DWORD *v21; // rdi
long long v22; // r10
char *v23; // r8
long long v24; // rax
int k; // ecx
int v26; // edx
int v27; // edx
int v28; // esi
int v29; // edx
unsigned int v30; // ebx
int v32; // r14d
char *v33; // rsi
int v34; // edx
char *i; // rax
char *v36; // rsi
int v38; // [rsp+Ch] [rbp-3Ch]
v5 = a1[1];
v6 = *a1;
if ( *a1 == v5 )
goto LABEL_16;
v7 = v6 + 4;
if ( !((v5 - v6) >> 2) )
{
std::__introsort_loop<__gnu_cxx::__normal_iterator<int *,std::vector<int>>,long,__gnu_cxx::__ops::_Iter_less_iter>(
v6,
v5,
-2LL);
LABEL_32:
while ( v5 != v7 )
{
v32 = *(_DWORD *)v7;
v33 = v7;
if ( *(_DWORD *)v7 < *(_DWORD *)v6 )
{
if ( v7 - v6 <= 4 )
{
if ( v7 - v6 == 4 )
*(_DWORD *)v7 = *(_DWORD *)v6;
}
else
{
memmove(v6 + 4, v6, v7 - v6);
}
*(_DWORD *)v6 = v32;
}
else
{
v34 = *((_DWORD *)v7 - 1);
for ( i = v7 - 4; v32 < v34; i -= 4 )
{
*((_DWORD *)i + 1) = v34;
v33 = i;
v34 = *((_DWORD *)i - 1);
}
*(_DWORD *)v33 = v32;
}
v7 += 4;
}
goto LABEL_16;
}
_BitScanReverse64(&v8, (v5 - v6) >> 2);
std::__introsort_loop<__gnu_cxx::__normal_iterator<int *,std::vector<int>>,long,__gnu_cxx::__ops::_Iter_less_iter>(
v6,
v5,
2LL * (int)v8);
if ( v5 - v6 <= 64 )
goto LABEL_32;
v9 = v6 + 64;
do
{
while ( 1 )
{
v10 = *(_DWORD *)v7;
v11 = v7;
if ( *(_DWORD *)v7 < *(_DWORD *)v6 )
break;
v12 = *((_DWORD *)v7 - 1);
for ( j = v7 - 4; v10 < v12; j -= 4 )
{
*((_DWORD *)j + 1) = v12;
v11 = j;
v12 = *((_DWORD *)j - 1);
}
v7 += 4;
*(_DWORD *)v11 = v10;
if ( v9 == v7 )
goto LABEL_12;
}
if ( v7 - v6 <= 4 )
{
if ( v7 - v6 == 4 )
*(_DWORD *)v7 = *(_DWORD *)v6;
}
else
{
v38 = *(_DWORD *)v7;
memmove(v6 + 4, v6, v7 - v6);
v10 = v38;
}
v7 += 4;
*(_DWORD *)v6 = v10;
}
while ( v9 != v7 );
LABEL_12:
while ( v5 != v9 )
{
while ( 1 )
{
v14 = *(_DWORD *)v9;
v15 = *((_DWORD *)v9 - 1);
v16 = v9 - 4;
if ( *(_DWORD *)v9 < v15 )
break;
v36 = v9;
v9 += 4;
*(_DWORD *)v36 = v14;
if ( v5 == v9 )
goto LABEL_16;
}
do
{
*((_DWORD *)v16 + 1) = v15;
v17 = v16;
v15 = *((_DWORD *)v16 - 1);
v16 -= 4;
}
while ( v14 < v15 );
v9 += 4;
*(_DWORD *)v17 = v14;
}
LABEL_16:
if ( (unsigned long long)a2 >> 61 )
std::__throw_length_error("cannot create std::vector larger than max_size()");
if ( !a2 )
{
dword_0 = 0;
BUG();
}
v18 = 4LL * a2;
v19 = (void *)operator new(v18);
v20 = memset(v19, 0, v18);
*v20 = 0;
v21 = v20;
if ( a2 != 1 )
{
v22 = (unsigned int)(a2 - 1);
v23 = *a1;
v24 = 1LL;
for ( k = 0; ; k = v21[v24++] )
{
v21[v24] = k;
v27 = *(_DWORD *)&v23[4 * v24];
v28 = *(_DWORD *)&v23[4 * v24 - 4];
if ( v27 - v28 >= a3 )
goto LABEL_23;
if ( v24 != 1 )
break;
v29 = v28 + v27;
if ( v29 < k )
v29 = k;
v21[1] = v29;
if ( v22 == 1 )
goto LABEL_30;
LABEL_24:
;
}
v26 = v28 + v21[v24 - 2] + v27;
if ( v26 < k )
v26 = k;
v21[v24] = v26;
LABEL_23:
if ( v24 == v22 )
goto LABEL_30;
goto LABEL_24;
}
LABEL_30:
v30 = v21[v18 / 4 - 1];
operator delete(v21, v18);
return v30;
} | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
MOV EBX,EDX
SUB RSP,0x18
MOV R15,qword ptr [RDI + 0x8]
MOV R12,qword ptr [RDI]
MOV dword ptr [RSP + 0x8],ESI
CMP R12,R15
JZ 0x0010182c
MOV R14,R15
LEA R13,[R12 + 0x4]
SUB R14,R12
MOV RAX,R14
SAR RAX,0x2
JZ 0x001018ec
BSR RDX,RAX
MOV RSI,R15
MOV RDI,R12
MOVSXD RDX,EDX
ADD RDX,RDX
CALL 0x00101560
CMP R14,0x40
JLE 0x001018fe
LEA R14,[R12 + 0x40]
JMP 0x001017aa
LAB_00101770:
MOV RDX,R13
SUB RDX,R12
CMP RDX,0x4
JLE 0x001019af
MOV EDI,0x4
MOV RSI,R12
MOV dword ptr [RSP + 0xc],R9D
SUB RDI,RDX
ADD RDI,R13
CALL 0x00101140
MOV R9D,dword ptr [RSP + 0xc]
LAB_0010179d:
ADD R13,0x4
MOV dword ptr [R12],R9D
CMP R14,R13
JZ 0x001017ee
LAB_001017aa:
MOV R9D,dword ptr [R13]
MOV EAX,dword ptr [R12]
MOV RSI,R13
CMP R9D,EAX
JL 0x00101770
MOV EDX,dword ptr [R13 + -0x4]
LEA RAX,[R13 + -0x4]
CMP R9D,EDX
JGE 0x001017e2
NOP word ptr [RAX + RAX*0x1]
LAB_001017d0:
MOV dword ptr [RAX + 0x4],EDX
MOV RSI,RAX
MOV EDX,dword ptr [RAX + -0x4]
SUB RAX,0x4
CMP R9D,EDX
JL 0x001017d0
LAB_001017e2:
ADD R13,0x4
MOV dword ptr [RSI],R9D
CMP R14,R13
JNZ 0x001017aa
LAB_001017ee:
CMP R15,R14
JZ 0x0010182c
NOP dword ptr [RAX + RAX*0x1]
LAB_001017f8:
MOV ECX,dword ptr [R14]
MOV EDX,dword ptr [R14 + -0x4]
LEA RAX,[R14 + -0x4]
CMP ECX,EDX
JGE 0x00101990
NOP dword ptr [RAX + RAX*0x1]
LAB_00101810:
MOV dword ptr [RAX + 0x4],EDX
MOV RSI,RAX
MOV EDX,dword ptr [RAX + -0x4]
SUB RAX,0x4
CMP ECX,EDX
JL 0x00101810
ADD R14,0x4
MOV dword ptr [RSI],ECX
CMP R15,R14
JNZ 0x001017f8
LAB_0010182c:
MOVSXD R13,dword ptr [RSP + 0x8]
MOV RAX,R13
SHR RAX,0x3d
JNZ 0x001019be
TEST R13,R13
JZ 0x00101980
SHL R13,0x2
MOV RDI,R13
CALL 0x00101110
MOV RDX,R13
XOR ESI,ESI
MOV RDI,RAX
CALL 0x001010e0
MOV dword ptr [RAX],0x0
MOV RDI,RAX
MOV EAX,dword ptr [RSP + 0x8]
CMP EAX,0x1
JZ 0x001018ce
LEA R10D,[RAX + -0x1]
MOV R8,qword ptr [RBP]
MOV EAX,0x1
XOR ECX,ECX
JMP 0x001018a2
LAB_00101888:
ADD EDX,dword ptr [RDI + RAX*0x4 + -0x8]
ADD EDX,ESI
CMP EDX,ECX
CMOVL EDX,ECX
MOV dword ptr [RDI + RAX*0x4],EDX
LAB_00101896:
CMP RAX,R10
JZ 0x001018ce
LAB_0010189b:
MOV ECX,dword ptr [RDI + RAX*0x4]
ADD RAX,0x1
LAB_001018a2:
MOV dword ptr [RDI + RAX*0x4],ECX
MOV EDX,dword ptr [R8 + RAX*0x4]
MOV ESI,dword ptr [R8 + RAX*0x4 + -0x4]
MOV R9D,EDX
SUB R9D,ESI
CMP R9D,EBX
JGE 0x00101896
CMP RAX,0x1
JNZ 0x00101888
ADD EDX,ESI
CMP EDX,ECX
CMOVL EDX,ECX
MOV dword ptr [RDI + 0x4],EDX
CMP RAX,R10
JNZ 0x0010189b
LAB_001018ce:
MOV EBX,dword ptr [RDI + R13*0x1 + -0x4]
MOV RSI,R13
CALL 0x00101120
ADD RSP,0x18
MOV EAX,EBX
POP RBX
POP RBP
POP R12
POP R13
POP R14
POP R15
RET
LAB_001018ec:
MOV RDX,-0x2
MOV RSI,R15
MOV RDI,R12
CALL 0x00101560
LAB_001018fe:
CMP R15,R13
JNZ 0x00101944
JMP 0x0010182c
LAB_00101910:
MOV RDX,R13
SUB RDX,R12
CMP RDX,0x4
JLE 0x001019a7
MOV EDI,0x4
MOV RSI,R12
SUB RDI,RDX
ADD RDI,R13
CALL 0x00101140
LAB_00101933:
MOV dword ptr [R12],R14D
LAB_00101937:
ADD R13,0x4
CMP R15,R13
JZ 0x0010182c
LAB_00101944:
MOV R14D,dword ptr [R13]
MOV EAX,dword ptr [R12]
MOV RSI,R13
CMP R14D,EAX
JL 0x00101910
MOV EDX,dword ptr [R13 + -0x4]
LEA RAX,[R13 + -0x4]
CMP R14D,EDX
JGE 0x0010197a
NOP dword ptr [RAX]
LAB_00101968:
MOV dword ptr [RAX + 0x4],EDX
MOV RSI,RAX
MOV EDX,dword ptr [RAX + -0x4]
SUB RAX,0x4
CMP R14D,EDX
JL 0x00101968
LAB_0010197a:
MOV dword ptr [RSI],R14D
JMP 0x00101937
LAB_00101980:
MOV dword ptr [0x00000000],0x0
UD2
LAB_00101990:
MOV RSI,R14
ADD R14,0x4
MOV dword ptr [RSI],ECX
CMP R15,R14
JNZ 0x001017f8
JMP 0x0010182c
LAB_001019a7:
JNZ 0x00101933
MOV dword ptr [R13],EAX
JMP 0x00101933
LAB_001019af:
JNZ 0x0010179d
MOV dword ptr [R13],EAX
JMP 0x0010179d
LAB_001019be:
LEA RDI,[0x102008]
CALL 0x001010d0
NOP word ptr [RAX + RAX*0x1] | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(std::vector<int, std::allocator<int> >, int, int) */
void * func0(vector param_1,int param_2,int param_3,int param_4,int param_5,
int param_6,int4 param_7,int param_8,int param_9,
int param_10,int4 param_11)
{
uint uVar1;
int *piVar2;
int *piVar3;
long lVar4;
code *pcVar5;
int *piVar6;
ulong uVar7;
void *pvVar8;
int4 *puVar9;
ulong uVar10;
void *extraout_RAX;
_Iter_less_iter _Var11;
int iVar12;
int7 in_register_00000009;
int iVar13;
int iVar14;
int iVar15;
size_t sVar16;
int4 in_register_0000003c;
long *plVar17;
char *pcVar18;
int *piVar19;
ulong __n;
int *piVar20;
plVar17 = (long *)CONCAT44(in_register_0000003c,param_1);
piVar2 = (int *)plVar17[1];
piVar3 = (int *)*plVar17;
if (piVar3 != piVar2) {
piVar19 = piVar3 + 1;
uVar7 = (long)piVar2 - (long)piVar3 >> 2;
_Var11 = (_Iter_less_iter)CONCAT71(in_register_00000009,param_4);
if (uVar7 == 0) {
std::
__introsort_loop<__normal_iterator<int*,std::vector<int,std::allocator<int>>>,long,__ops::_Iter_less_iter>
((__normal_iterator)piVar3,(__normal_iterator)piVar2,-2,_Var11);
}
else {
lVar4 = 0x3f;
if (uVar7 != 0) {
for (; uVar7 >> lVar4 == 0; lVar4 = lVar4 + -1) {
}
}
std::
__introsort_loop<__normal_iterator<int*,std::vector<int,std::allocator<int>>>,long,__ops::_Iter_less_iter>
((__normal_iterator)piVar3,(__normal_iterator)piVar2,(long)(int)lVar4 * 2,_Var11);
if (0x40 < (long)piVar2 - (long)piVar3) {
piVar20 = piVar3 + 0x10;
do {
while( true ) {
iVar12 = *piVar19;
if (iVar12 < *piVar3) break;
iVar13 = piVar19[-1];
piVar6 = piVar19;
while (iVar12 < iVar13) {
*piVar6 = iVar13;
iVar13 = piVar6[-2];
piVar6 = piVar6 + -1;
}
piVar19 = piVar19 + 1;
*piVar6 = iVar12;
if (piVar20 == piVar19) goto joined_r0x001017f1;
}
sVar16 = (long)piVar19 - (long)piVar3;
if ((long)sVar16 < 5) {
if (sVar16 == 4) {
*piVar19 = *piVar3;
}
}
else {
memmove((void *)((4 - sVar16) + (long)piVar19),piVar3,sVar16);
}
piVar19 = piVar19 + 1;
*piVar3 = iVar12;
} while (piVar20 != piVar19);
joined_r0x001017f1:
for (; piVar2 != piVar20; piVar20 = piVar20 + 1) {
while( true ) {
iVar12 = *piVar20;
iVar13 = piVar20[-1];
piVar3 = piVar20;
if (iVar13 <= iVar12) break;
do {
piVar19 = piVar3 + -1;
*piVar3 = iVar13;
iVar13 = piVar3[-2];
piVar3 = piVar19;
} while (iVar12 < iVar13);
piVar20 = piVar20 + 1;
*piVar19 = iVar12;
if (piVar2 == piVar20) goto LAB_0010182c;
}
*piVar20 = iVar12;
}
goto LAB_0010182c;
}
}
for (; piVar2 != piVar19; piVar19 = piVar19 + 1) {
iVar12 = *piVar19;
if (iVar12 < *piVar3) {
sVar16 = (long)piVar19 - (long)piVar3;
if ((long)sVar16 < 5) {
if (sVar16 == 4) {
*piVar19 = *piVar3;
}
}
else {
memmove((void *)((4 - sVar16) + (long)piVar19),piVar3,sVar16);
}
*piVar3 = iVar12;
}
else {
iVar13 = piVar19[-1];
piVar20 = piVar19;
while (iVar12 < iVar13) {
*piVar20 = iVar13;
iVar13 = piVar20[-2];
piVar20 = piVar20 + -1;
}
*piVar20 = iVar12;
}
}
}
LAB_0010182c:
uVar7 = (ulong)param_2;
if (uVar7 >> 0x3d != 0) {
pcVar18 = "cannot create std::vector larger than max_size()";
std::__throw_length_error("cannot create std::vector larger than max_size()");
pvVar8 = *(void **)pcVar18;
if (pvVar8 != (void *)0x0) {
operator_delete(pvVar8,*(long *)(pcVar18 + 0x10) - (long)pvVar8);
return extraout_RAX;
}
return pvVar8;
}
if (uVar7 == 0) {
_DAT_00000000 = 0;
/* WARNING: Does not return */
pcVar5 = (code *)invalidInstructionException();
(*pcVar5)();
}
__n = uVar7 * 4;
pvVar8 = operator_new(__n);
puVar9 = (int4 *)memset(pvVar8,0,__n);
*puVar9 = 0;
if (param_2 != 1) {
lVar4 = *plVar17;
uVar10 = 1;
iVar12 = 0;
do {
puVar9[uVar10] = iVar12;
iVar13 = *(int *)(lVar4 + uVar10 * 4);
iVar14 = *(int *)(lVar4 + -4 + uVar10 * 4);
if (iVar13 - iVar14 < param_3) {
if (uVar10 != 1) {
iVar14 = iVar13 + puVar9[uVar10 - 2] + iVar14;
if (iVar14 < iVar12) {
iVar14 = iVar12;
}
puVar9[uVar10] = iVar14;
goto LAB_00101896;
}
iVar15 = iVar13 + iVar14;
if (iVar13 + iVar14 < iVar12) {
iVar15 = iVar12;
}
puVar9[1] = iVar15;
if ((ulong)(param_2 - 1) == 1) break;
}
else {
LAB_00101896:
if (uVar10 == param_2 - 1) break;
}
iVar12 = puVar9[uVar10];
uVar10 = uVar10 + 1;
} while( true );
}
uVar1 = puVar9[uVar7 - 1];
operator_delete(puVar9,__n);
return (void *)(ulong)uVar1;
} |
2,284 | func0 |
#include <vector>
#include <assert.h>
#include <algorithm>
| std::vector<int> func0(const std::vector<int>& nums) {
std::vector<int> result;
for (int num : nums) {
int count = std::count(nums.begin(), nums.end(), num);
if (count == 1) {
result.push_back(num);
}
}
return result;
}
| int main() {
assert((func0({1,2,3,2,3,4,5}) == std::vector<int>{1, 4, 5}));
assert((func0({1,2,3,2,4,5}) == std::vector<int>{1, 3, 4, 5}));
assert((func0({1,2,3,4,5}) == std::vector<int>{1, 2, 3, 4, 5}));
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x48,%rsp
mov %rdi,-0x48(%rbp)
mov %rsi,-0x50(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x48(%rbp),%rax
mov %rax,%rdi
callq 1a50 <_ZNSt6vectorIiSaIiEEC1Ev>
mov -0x50(%rbp),%rax
mov %rax,-0x20(%rbp)
mov -0x20(%rbp),%rax
mov %rax,%rdi
callq 1b84 <_ZNKSt6vectorIiSaIiEE5beginEv>
mov %rax,-0x30(%rbp)
mov -0x20(%rbp),%rax
mov %rax,%rdi
callq 1bdc <_ZNKSt6vectorIiSaIiEE3endEv>
mov %rax,-0x28(%rbp)
lea -0x28(%rbp),%rdx
lea -0x30(%rbp),%rax
mov %rdx,%rsi
mov %rax,%rdi
callq 1c34 <_ZN9__gnu_cxxneIPKiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESB_>
test %al,%al
je 1348 <_Z5func0RKSt6vectorIiSaIiEE+0xff>
lea -0x30(%rbp),%rax
mov %rax,%rdi
callq 1c98 <_ZNK9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEdeEv>
mov (%rax),%eax
mov %eax,-0x38(%rbp)
mov -0x50(%rbp),%rax
mov %rax,%rdi
callq 1bdc <_ZNKSt6vectorIiSaIiEE3endEv>
mov %rax,%rbx
mov -0x50(%rbp),%rax
mov %rax,%rdi
callq 1b84 <_ZNKSt6vectorIiSaIiEE5beginEv>
mov %rax,%rcx
lea -0x38(%rbp),%rax
mov %rax,%rdx
mov %rbx,%rsi
mov %rcx,%rdi
callq 1cad <_ZSt5countIN9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEEiENSt15iterator_traitsIT_E15difference_typeES9_S9_RKT0_>
mov %eax,-0x34(%rbp)
cmpl $0x1,-0x34(%rbp)
jne 1319 <_Z5func0RKSt6vectorIiSaIiEE+0xd0>
lea -0x38(%rbp),%rdx
mov -0x48(%rbp),%rax
mov %rdx,%rsi
mov %rax,%rdi
callq 1cea <_ZNSt6vectorIiSaIiEE9push_backERKi>
lea -0x30(%rbp),%rax
mov %rax,%rdi
callq 1c74 <_ZN9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEppEv>
jmpq 12a1 <_Z5func0RKSt6vectorIiSaIiEE+0x58>
endbr64
mov %rax,%rbx
mov -0x48(%rbp),%rax
mov %rax,%rdi
callq 1b3c <_ZNSt6vectorIiSaIiEED1Ev>
mov %rbx,%rax
mov %rax,%rdi
callq 1150 <_Unwind_Resume@plt>
mov -0x18(%rbp),%rax
xor %fs:0x28,%rax
je 135d <_Z5func0RKSt6vectorIiSaIiEE+0x114>
callq 1130 <__stack_chk_fail@plt>
mov -0x48(%rbp),%rax
add $0x48,%rsp
pop %rbx
pop %rbp
retq
| _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 48h
mov [rbp+var_48], rdi
mov [rbp+var_50], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_48]
mov rdi, rax
call _ZNSt6vectorIiSaIiEEC2Ev; std::vector<int>::vector(void)
mov rax, [rbp+var_50]
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
mov rdi, rax
call _ZNKSt6vectorIiSaIiEE5beginEv; std::vector<int>::begin(void)
mov [rbp+var_30], rax
mov rax, [rbp+var_20]
mov rdi, rax
call _ZNKSt6vectorIiSaIiEE3endEv; std::vector<int>::end(void)
mov [rbp+var_28], rax
jmp short loc_132C
loc_12C3:
lea rax, [rbp+var_30]
mov rdi, rax
call _ZNK9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEdeEv; __gnu_cxx::__normal_iterator<int const*,std::vector<int>>::operator*(void)
mov eax, [rax]
mov [rbp+var_38], eax
mov rax, [rbp+var_50]
mov rdi, rax
call _ZNKSt6vectorIiSaIiEE3endEv; std::vector<int>::end(void)
mov rbx, rax
mov rax, [rbp+var_50]
mov rdi, rax
call _ZNKSt6vectorIiSaIiEE5beginEv; std::vector<int>::begin(void)
mov rcx, rax
lea rax, [rbp+var_38]
mov rdx, rax
mov rsi, rbx
mov rdi, rcx
call _ZSt5countIN9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEEiENSt15iterator_traitsIT_E15difference_typeES9_S9_RKT0_; std::count<__gnu_cxx::__normal_iterator<int const*,std::vector<int>>,int>(__gnu_cxx::__normal_iterator<int const*,std::vector<int>>,__gnu_cxx::__normal_iterator<int const*,std::vector<int>>,int const&)
mov [rbp+var_34], eax
cmp [rbp+var_34], 1
jnz short loc_1320
lea rdx, [rbp+var_38]
mov rax, [rbp+var_48]
mov rsi, rdx
mov rdi, rax
call _ZNSt6vectorIiSaIiEE9push_backERKi; std::vector<int>::push_back(int const&)
loc_1320:
lea rax, [rbp+var_30]
mov rdi, rax
call _ZN9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEppEv; __gnu_cxx::__normal_iterator<int const*,std::vector<int>>::operator++(void)
loc_132C:
lea rdx, [rbp+var_28]
lea rax, [rbp+var_30]
mov rsi, rdx
mov rdi, rax
call _ZN9__gnu_cxxneIPKiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESB_; __gnu_cxx::operator!=<int const*,std::vector<int>>(__gnu_cxx::__normal_iterator<int const*,std::vector<int>> const&,__gnu_cxx::__normal_iterator<int const*,std::vector<int>> const&)
test al, al
jnz short loc_12C3
jmp short loc_1377
endbr64
mov rbx, rax
mov rax, [rbp+var_48]
mov rdi, rax
call _ZNSt6vectorIiSaIiEED2Ev; std::vector<int>::~vector()
mov rax, rbx
mov rdx, [rbp+var_18]
sub rdx, fs:28h
jz short loc_136F
call ___stack_chk_fail
loc_136F:
mov rdi, rax; struct _Unwind_Exception *
call __Unwind_Resume
loc_1377:
mov rax, [rbp+var_18]
sub rax, fs:28h
jz short loc_138B
call ___stack_chk_fail
loc_138B:
mov rax, [rbp+var_48]
mov rbx, [rbp+var_8]
leave
retn | long long func0(long long a1, long long a2)
{
long long v2; // rbx
long long v3; // rax
int v5; // [rsp+18h] [rbp-38h] BYREF
int v6; // [rsp+1Ch] [rbp-34h]
long long v7; // [rsp+20h] [rbp-30h] BYREF
_QWORD v8[4]; // [rsp+28h] [rbp-28h] BYREF
v8[2] = __readfsqword(0x28u);
std::vector<int>::vector(a1);
v8[1] = a2;
v7 = std::vector<int>::begin(a2);
v8[0] = std::vector<int>::end(a2);
while ( (unsigned __int8)__gnu_cxx::operator!=<int const*,std::vector<int>>(&v7, v8) )
{
v5 = *(_DWORD *)__gnu_cxx::__normal_iterator<int const*,std::vector<int>>::operator*(&v7);
v2 = std::vector<int>::end(a2);
v3 = std::vector<int>::begin(a2);
v6 = std::count<__gnu_cxx::__normal_iterator<int const*,std::vector<int>>,int>(v3, v2, &v5);
if ( v6 == 1 )
std::vector<int>::push_back(a1, &v5);
__gnu_cxx::__normal_iterator<int const*,std::vector<int>>::operator++(&v7);
}
return a1;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RBP + -0x48],RDI
MOV qword ptr [RBP + -0x50],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x48]
MOV RDI,RAX
CALL 0x00101a9e
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RDI,RAX
CALL 0x00101b9c
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RDI,RAX
CALL 0x00101be8
MOV qword ptr [RBP + -0x28],RAX
JMP 0x0010132c
LAB_001012c3:
LEA RAX,[RBP + -0x30]
MOV RDI,RAX
CALL 0x00101c9c
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x38],EAX
MOV RAX,qword ptr [RBP + -0x50]
MOV RDI,RAX
CALL 0x00101be8
MOV RBX,RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV RDI,RAX
CALL 0x00101b9c
MOV RCX,RAX
LEA RAX,[RBP + -0x38]
MOV RDX,RAX
MOV RSI,RBX
MOV RDI,RCX
LAB_001012ff:
CALL 0x00101cb1
MOV dword ptr [RBP + -0x34],EAX
CMP dword ptr [RBP + -0x34],0x1
JNZ 0x00101320
LEA RDX,[RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x48]
MOV RSI,RDX
MOV RDI,RAX
CALL 0x00101cee
LAB_00101320:
LEA RAX,[RBP + -0x30]
MOV RDI,RAX
CALL 0x00101c78
LAB_0010132c:
LEA RDX,[RBP + -0x28]
LEA RAX,[RBP + -0x30]
MOV RSI,RDX
MOV RDI,RAX
CALL 0x00101c38
TEST AL,AL
JNZ 0x001012c3
JMP 0x00101377
LAB_00101377:
MOV RAX,qword ptr [RBP + -0x18]
SUB RAX,qword ptr FS:[0x28]
JZ 0x0010138b
CALL 0x00101150
LAB_0010138b:
MOV RAX,qword ptr [RBP + -0x48]
MOV RBX,qword ptr [RBP + -0x8]
LEAVE
RET | /* func0(std::vector<int, std::allocator<int> > const&) */
vector * func0(vector *param_1)
{
bool bVar1;
int *piVar2;
int8 uVar3;
int8 uVar4;
vector<int,std::allocator<int>> *in_RSI;
long in_FS_OFFSET;
int local_40;
int local_3c;
int8 local_38;
int8 local_30;
vector<int,std::allocator<int>> *local_28;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
std::vector<int,std::allocator<int>>::vector((vector<int,std::allocator<int>> *)param_1);
local_28 = in_RSI;
local_38 = std::vector<int,std::allocator<int>>::begin(in_RSI);
local_30 = std::vector<int,std::allocator<int>>::end(local_28);
while( true ) {
bVar1 = operator!=((__normal_iterator *)&local_38,(__normal_iterator *)&local_30);
if (!bVar1) break;
piVar2 = (int *)__normal_iterator<int_const*,std::vector<int,std::allocator<int>>>::operator*
((__normal_iterator<int_const*,std::vector<int,std::allocator<int>>> *
)&local_38);
local_40 = *piVar2;
uVar3 = std::vector<int,std::allocator<int>>::end(in_RSI);
uVar4 = std::vector<int,std::allocator<int>>::begin(in_RSI);
/* try { // try from 001012ff to 0010131f has its CatchHandler @ 00101345 */
local_3c = std::count<__normal_iterator<int_const*,std::vector<int,std::allocator<int>>>,int>
(uVar4,uVar3,&local_40);
if (local_3c == 1) {
std::vector<int,std::allocator<int>>::push_back
((vector<int,std::allocator<int>> *)param_1,&local_40);
}
__normal_iterator<int_const*,std::vector<int,std::allocator<int>>>::operator++
((__normal_iterator<int_const*,std::vector<int,std::allocator<int>>> *)&local_38);
}
if (local_20 != *(long *)(in_FS_OFFSET + 0x28)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return param_1;
} |
2,285 | func0 |
#include <vector>
#include <assert.h>
#include <algorithm>
| std::vector<int> func0(const std::vector<int>& nums) {
std::vector<int> result;
for (int num : nums) {
int count = std::count(nums.begin(), nums.end(), num);
if (count == 1) {
result.push_back(num);
}
}
return result;
}
| int main() {
assert((func0({1,2,3,2,3,4,5}) == std::vector<int>{1, 4, 5}));
assert((func0({1,2,3,2,4,5}) == std::vector<int>{1, 3, 4, 5}));
assert((func0({1,2,3,4,5}) == std::vector<int>{1, 2, 3, 4, 5}));
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x10,%rsp
mov %rdi,%r12
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi)
movq $0x0,0x10(%rdi)
mov (%rsi),%rbx
mov 0x8(%rsi),%r13
cmp %r13,%rbx
je 1317 <_Z5func0RKSt6vectorIiSaIiEE+0xce>
mov %rsi,%rbp
lea 0x4(%rsp),%r14
jmp 12b1 <_Z5func0RKSt6vectorIiSaIiEE+0x68>
mov %r14,%rdx
mov %r12,%rdi
callq 1844 <_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_>
add $0x4,%rbx
cmp %rbx,%r13
je 1317 <_Z5func0RKSt6vectorIiSaIiEE+0xce>
mov (%rbx),%ecx
mov %ecx,0x4(%rsp)
mov 0x8(%rbp),%rsi
mov 0x0(%rbp),%rax
cmp %rsi,%rax
je 12a8 <_Z5func0RKSt6vectorIiSaIiEE+0x5f>
mov $0x0,%edx
cmp (%rax),%ecx
sete %dil
movzbl %dil,%edi
add %rdi,%rdx
add $0x4,%rax
cmp %rax,%rsi
jne 12c9 <_Z5func0RKSt6vectorIiSaIiEE+0x80>
cmp $0x1,%edx
jne 12a8 <_Z5func0RKSt6vectorIiSaIiEE+0x5f>
mov 0x8(%r12),%rsi
cmp 0x10(%r12),%rsi
je 129d <_Z5func0RKSt6vectorIiSaIiEE+0x54>
mov %ecx,(%rsi)
addq $0x4,0x8(%r12)
jmp 12a8 <_Z5func0RKSt6vectorIiSaIiEE+0x5f>
endbr64
mov %rax,%rbx
mov (%r12),%rdi
test %rdi,%rdi
je 130f <_Z5func0RKSt6vectorIiSaIiEE+0xc6>
callq 1110 <_ZdlPv@plt>
mov %rbx,%rdi
callq 1150 <_Unwind_Resume@plt>
mov 0x8(%rsp),%rax
xor %fs:0x28,%rax
jne 1337 <_Z5func0RKSt6vectorIiSaIiEE+0xee>
mov %r12,%rax
add $0x10,%rsp
pop %rbx
pop %rbp
pop %r12
pop %r13
pop %r14
retq
callq 1130 <__stack_chk_fail@plt>
| _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push r13
push r12
push rbp
push rbx
sub rsp, 18h
mov r12, rdi
mov rbp, rsi
mov rax, fs:28h
mov [rsp+38h+var_30], rax
xor eax, eax
mov qword ptr [rdi], 0
mov qword ptr [rdi+8], 0
mov qword ptr [rdi+10h], 0
mov rbx, [rsi]
mov r13, [rsi+8]
cmp r13, rbx
jnz short loc_12CB
loc_1290:
mov rax, [rsp+38h+var_30]
sub rax, fs:28h
jnz loc_133E
mov rax, r12
add rsp, 18h
pop rbx
pop rbp
pop r12
pop r13
retn
loc_12B2:
lea rdx, [rsp+38h+var_34]
mov rsi, rax
mov rdi, r12
call _ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_; std::vector<int>::_M_realloc_insert<int const&>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,int const&)
loc_12C2:
add rbx, 4
cmp r13, rbx
jz short loc_1290
loc_12CB:
mov esi, [rbx]
mov [rsp+38h+var_34], esi
mov rdi, [rbp+8]
mov rax, [rbp+0]
cmp rax, rdi
jz short loc_12C2
mov edx, 0
loc_12E3:
cmp esi, [rax]
setz cl
movzx ecx, cl
add rdx, rcx
add rax, 4
cmp rdi, rax
jnz short loc_12E3
cmp edx, 1
jnz short loc_12C2
mov rax, [r12+8]
cmp rax, [r12+10h]
jz short loc_12B2
mov [rax], esi
add qword ptr [r12+8], 4
jmp short loc_12C2
endbr64
mov rbx, rax
mov rdi, r12
call _ZNSt6vectorIiSaIiEED2Ev; std::vector<int>::~vector()
mov rax, [rsp+arg_0]
sub rax, fs:28h
jz short loc_1336
call ___stack_chk_fail
loc_1336:
mov rdi, rbx; struct _Unwind_Exception *
call __Unwind_Resume
loc_133E:
call ___stack_chk_fail | _QWORD * func0(_QWORD *a1, int **a2)
{
int *v4; // rbx
int *v5; // r13
int v7; // esi
int *v8; // rdi
int *v9; // rax
int v10; // edx
_DWORD *v11; // rax
int v12; // [rsp+4h] [rbp-34h] BYREF
unsigned long long v13; // [rsp+8h] [rbp-30h]
v13 = __readfsqword(0x28u);
*a1 = 0LL;
a1[1] = 0LL;
a1[2] = 0LL;
v4 = *a2;
v5 = a2[1];
if ( v5 != *a2 )
{
do
{
v7 = *v4;
v12 = *v4;
v8 = a2[1];
v9 = *a2;
if ( *a2 != v8 )
{
v10 = 0;
do
v10 += v7 == *v9++;
while ( v8 != v9 );
if ( v10 == 1 )
{
v11 = (_DWORD *)a1[1];
if ( v11 == (_DWORD *)a1[2] )
{
std::vector<int>::_M_realloc_insert<int const&>(a1, a1[1], &v12);
}
else
{
*v11 = v7;
a1[1] += 4LL;
}
}
}
++v4;
}
while ( v5 != v4 );
}
return a1;
} | func0:
ENDBR64
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x18
MOV R12,RDI
MOV RBP,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
MOV qword ptr [RDI],0x0
MOV qword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
MOV RBX,qword ptr [RSI]
MOV R13,qword ptr [RSI + 0x8]
CMP R13,RBX
JNZ 0x001012cb
LAB_00101290:
MOV RAX,qword ptr [RSP + 0x8]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x0010133e
MOV RAX,R12
ADD RSP,0x18
POP RBX
POP RBP
POP R12
POP R13
RET
LAB_001012b2:
LEA RDX,[RSP + 0x4]
MOV RSI,RAX
MOV RDI,R12
LAB_001012bd:
CALL 0x00101886
LAB_001012c2:
ADD RBX,0x4
CMP R13,RBX
JZ 0x00101290
LAB_001012cb:
MOV ESI,dword ptr [RBX]
MOV dword ptr [RSP + 0x4],ESI
MOV RDI,qword ptr [RBP + 0x8]
MOV RAX,qword ptr [RBP]
CMP RAX,RDI
JZ 0x001012c2
MOV EDX,0x0
LAB_001012e3:
CMP ESI,dword ptr [RAX]
SETZ CL
MOVZX ECX,CL
ADD RDX,RCX
ADD RAX,0x4
CMP RDI,RAX
JNZ 0x001012e3
CMP EDX,0x1
JNZ 0x001012c2
MOV RAX,qword ptr [R12 + 0x8]
CMP RAX,qword ptr [R12 + 0x10]
JZ 0x001012b2
MOV dword ptr [RAX],ESI
ADD qword ptr [R12 + 0x8],0x4
JMP 0x001012c2
LAB_0010133e:
CALL 0x00101130 | /* func0(std::vector<int, std::allocator<int> > const&) */
vector * func0(vector *param_1)
{
int *piVar1;
int *piVar2;
int iVar3;
int *piVar4;
int8 *in_RSI;
long in_FS_OFFSET;
int local_34;
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
*(int8 *)param_1 = 0;
*(int8 *)(param_1 + 8) = 0;
*(int8 *)(param_1 + 0x10) = 0;
piVar1 = (int *)in_RSI[1];
for (piVar4 = (int *)*in_RSI; piVar1 != piVar4; piVar4 = piVar4 + 1) {
local_34 = *piVar4;
piVar2 = (int *)*in_RSI;
if (piVar2 != (int *)in_RSI[1]) {
iVar3 = 0;
do {
iVar3 = iVar3 + (uint)(local_34 == *piVar2);
piVar2 = piVar2 + 1;
} while ((int *)in_RSI[1] != piVar2);
if (iVar3 == 1) {
piVar2 = *(int **)(param_1 + 8);
if (piVar2 == *(int **)(param_1 + 0x10)) {
/* try { // try from 001012bd to 001012c1 has its CatchHandler @ 00101312 */
std::vector<int,std::allocator<int>>::_M_realloc_insert<int_const&>
((vector<int,std::allocator<int>> *)param_1,(__normal_iterator)piVar2,&local_34)
;
}
else {
*piVar2 = local_34;
*(long *)(param_1 + 8) = *(long *)(param_1 + 8) + 4;
}
}
}
}
if (local_30 != *(long *)(in_FS_OFFSET + 0x28)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return param_1;
} |
2,286 | func0 |
#include <vector>
#include <assert.h>
#include <algorithm>
| std::vector<int> func0(const std::vector<int>& nums) {
std::vector<int> result;
for (int num : nums) {
int count = std::count(nums.begin(), nums.end(), num);
if (count == 1) {
result.push_back(num);
}
}
return result;
}
| int main() {
assert((func0({1,2,3,2,3,4,5}) == std::vector<int>{1, 4, 5}));
assert((func0({1,2,3,2,4,5}) == std::vector<int>{1, 3, 4, 5}));
assert((func0({1,2,3,4,5}) == std::vector<int>{1, 2, 3, 4, 5}));
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x10,%rsp
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi)
movq $0x0,0x10(%rdi)
mov (%rsi),%rax
mov 0x8(%rsi),%r13
cmp %rax,%r13
je 1700 <_Z5func0RKSt6vectorIiSaIiEE+0xc0>
mov %rsi,%rbp
mov %rax,%rbx
lea 0x4(%rsp),%r14
mov %r13,%rdi
nopl 0x0(%rax)
mov (%rbx),%esi
xor %edx,%edx
mov %esi,0x4(%rsp)
cmp %rax,%rdi
je 16c0 <_Z5func0RKSt6vectorIiSaIiEE+0x80>
nopl (%rax)
xor %ecx,%ecx
cmp (%rax),%esi
sete %cl
add $0x4,%rax
add %rcx,%rdx
cmp %rax,%rdi
jne 16a8 <_Z5func0RKSt6vectorIiSaIiEE+0x68>
cmp $0x1,%edx
je 16d8 <_Z5func0RKSt6vectorIiSaIiEE+0x98>
add $0x4,%rbx
cmp %rbx,%r13
je 1700 <_Z5func0RKSt6vectorIiSaIiEE+0xc0>
mov 0x8(%rbp),%rdi
mov 0x0(%rbp),%rax
jmp 1698 <_Z5func0RKSt6vectorIiSaIiEE+0x58>
nopl 0x0(%rax,%rax,1)
mov 0x8(%r12),%r8
cmp 0x10(%r12),%r8
je 1720 <_Z5func0RKSt6vectorIiSaIiEE+0xe0>
mov %esi,(%r8)
add $0x4,%rbx
add $0x4,%r8
mov %r8,0x8(%r12)
cmp %rbx,%r13
jne 16c9 <_Z5func0RKSt6vectorIiSaIiEE+0x89>
nopl 0x0(%rax)
mov 0x8(%rsp),%rax
xor %fs:0x28,%rax
jne 1730 <_Z5func0RKSt6vectorIiSaIiEE+0xf0>
add $0x10,%rsp
mov %r12,%rax
pop %rbx
pop %rbp
pop %r12
pop %r13
pop %r14
retq
mov %r14,%rdx
mov %r8,%rsi
mov %r12,%rdi
callq 1860 <_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_>
jmp 16c0 <_Z5func0RKSt6vectorIiSaIiEE+0x80>
callq 1130 <__stack_chk_fail@plt>
endbr64
mov %rax,%rbp
jmpq 1160 <_Z5func0RKSt6vectorIiSaIiEE.cold>
nopw %cs:0x0(%rax,%rax,1)
nopl 0x0(%rax,%rax,1)
| _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push r13
pxor xmm0, xmm0
mov r13, rdi
push r12
push rbp
push rbx
sub rsp, 18h
mov rax, fs:28h
mov [rsp+38h+var_30], rax
xor eax, eax
mov qword ptr [rdi+10h], 0
movups xmmword ptr [rdi], xmm0
mov rax, [rsi]
mov r12, [rsi+8]
cmp r12, rax
jz short loc_16B8
mov rbp, rsi
mov rbx, rax
mov rdi, r12
nop dword ptr [rax]
loc_1658:
mov esi, [rbx]
xor edx, edx
mov [rsp+38h+var_34], esi
cmp rax, rdi
jz short loc_1680
nop dword ptr [rax]
loc_1668:
xor ecx, ecx
cmp esi, [rax]
setz cl
add rax, 4
add rdx, rcx
cmp rax, rdi
jnz short loc_1668
cmp edx, 1
jz short loc_1698
loc_1680:
add rbx, 4
cmp r12, rbx
jz short loc_16B8
loc_1689:
mov rax, [rbp+0]
mov rdi, [rbp+8]
jmp short loc_1658
loc_1698:
mov rax, [r13+8]
cmp rax, [r13+10h]
jz short loc_16D6
mov [rax], esi
add rbx, 4
add rax, 4
mov [r13+8], rax
cmp r12, rbx
jnz short loc_1689
nop dword ptr [rax]
loc_16B8:
mov rax, [rsp+38h+var_30]
sub rax, fs:28h
jnz short loc_16E8
add rsp, 18h
mov rax, r13
pop rbx
pop rbp
pop r12
pop r13
retn
loc_16D6:
lea rdx, [rsp+38h+var_34]
mov rsi, rax
mov rdi, r13
call _ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_; std::vector<int>::_M_realloc_insert<int const&>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,int const&)
jmp short loc_1680
loc_16E8:
call ___stack_chk_fail
endbr64
mov rbx, rax
jmp _Z5func0RKSt6vectorIiSaIiEE_cold; func0(std::vector<int> const&) [clone] | long long func0(long long a1, int **a2)
{
int *v3; // rax
int *v4; // r12
int *v6; // rbx
int *i; // rdi
int v8; // esi
int v9; // edx
int v10; // ecx
_DWORD *v11; // rax
int v13; // [rsp+0h] [rbp-34h] BYREF
unsigned long long v14; // [rsp+4h] [rbp-30h]
v14 = __readfsqword(0x28u);
*(_QWORD *)(a1 + 16) = 0LL;
*(_OWORD *)a1 = 0LL;
v3 = *a2;
v4 = a2[1];
if ( v4 != *a2 )
{
v6 = *a2;
for ( i = a2[1]; ; i = a2[1] )
{
v8 = *v6;
v9 = 0;
v13 = *v6;
if ( v3 == i )
goto LABEL_6;
do
{
v10 = v8 == *v3++;
v9 += v10;
}
while ( v3 != i );
if ( v9 != 1 )
goto LABEL_6;
v11 = *(_DWORD **)(a1 + 8);
if ( v11 == *(_DWORD **)(a1 + 16) )
break;
*v11 = v8;
++v6;
*(_QWORD *)(a1 + 8) = v11 + 1;
if ( v4 == v6 )
return a1;
LABEL_7:
v3 = *a2;
}
std::vector<int>::_M_realloc_insert<int const&>(a1, *(_QWORD *)(a1 + 8), &v13);
LABEL_6:
if ( v4 == ++v6 )
return a1;
goto LABEL_7;
}
return a1;
} | func0:
ENDBR64
PUSH R13
PXOR XMM0,XMM0
MOV R13,RDI
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x18
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
MOV qword ptr [RDI + 0x10],0x0
MOVUPS xmmword ptr [RDI],XMM0
MOV RAX,qword ptr [RSI]
MOV R12,qword ptr [RSI + 0x8]
CMP R12,RAX
JZ 0x001016b8
MOV RBP,RSI
MOV RBX,RAX
MOV RDI,R12
NOP dword ptr [RAX]
LAB_00101658:
MOV ESI,dword ptr [RBX]
XOR EDX,EDX
MOV dword ptr [RSP + 0x4],ESI
CMP RAX,RDI
JZ 0x00101680
NOP dword ptr [RAX]
LAB_00101668:
XOR ECX,ECX
CMP ESI,dword ptr [RAX]
SETZ CL
ADD RAX,0x4
ADD RDX,RCX
CMP RAX,RDI
JNZ 0x00101668
CMP EDX,0x1
JZ 0x00101698
LAB_00101680:
ADD RBX,0x4
CMP R12,RBX
JZ 0x001016b8
LAB_00101689:
MOV RAX,qword ptr [RBP]
MOV RDI,qword ptr [RBP + 0x8]
JMP 0x00101658
LAB_00101698:
MOV RAX,qword ptr [R13 + 0x8]
CMP RAX,qword ptr [R13 + 0x10]
JZ 0x001016d6
MOV dword ptr [RAX],ESI
ADD RBX,0x4
ADD RAX,0x4
MOV qword ptr [R13 + 0x8],RAX
CMP R12,RBX
JNZ 0x00101689
NOP dword ptr [RAX]
LAB_001016b8:
MOV RAX,qword ptr [RSP + 0x8]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x001016e8
ADD RSP,0x18
MOV RAX,R13
POP RBX
POP RBP
POP R12
POP R13
RET
LAB_001016d6:
LEA RDX,[RSP + 0x4]
MOV RSI,RAX
MOV RDI,R13
LAB_001016e1:
CALL 0x00101810
JMP 0x00101680
LAB_001016e8:
CALL 0x00101130 | /* func0(std::vector<int, std::allocator<int> > const&) */
vector * func0(vector *param_1)
{
int iVar1;
int *piVar2;
int *piVar3;
int iVar4;
int *piVar5;
int8 *in_RSI;
int *piVar6;
long in_FS_OFFSET;
int local_34;
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
*(int8 *)(param_1 + 0x10) = 0;
*(int (*) [16])param_1 = (int [16])0x0;
piVar3 = (int *)*in_RSI;
piVar2 = (int *)in_RSI[1];
piVar5 = piVar3;
piVar6 = piVar2;
if (piVar2 != piVar3) {
while( true ) {
local_34 = *piVar5;
iVar4 = 0;
if (piVar3 != piVar6) {
do {
iVar1 = *piVar3;
piVar3 = piVar3 + 1;
iVar4 = iVar4 + (uint)(local_34 == iVar1);
} while (piVar3 != piVar6);
if (iVar4 == 1) {
piVar3 = *(int **)(param_1 + 8);
if (piVar3 == *(int **)(param_1 + 0x10)) {
/* try { // try from 001016e1 to 001016e5 has its CatchHandler @ 001016ed */
std::vector<int,std::allocator<int>>::_M_realloc_insert<int_const&>
((vector<int,std::allocator<int>> *)param_1,(__normal_iterator)piVar3,
&local_34);
}
else {
*piVar3 = local_34;
*(int **)(param_1 + 8) = piVar3 + 1;
}
}
}
if (piVar2 == piVar5 + 1) break;
piVar3 = (int *)*in_RSI;
piVar5 = piVar5 + 1;
piVar6 = (int *)in_RSI[1];
}
}
if (local_30 == *(long *)(in_FS_OFFSET + 0x28)) {
return param_1;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
} |
2,287 | func0 |
#include <vector>
#include <assert.h>
#include <algorithm>
| std::vector<int> func0(const std::vector<int>& nums) {
std::vector<int> result;
for (int num : nums) {
int count = std::count(nums.begin(), nums.end(), num);
if (count == 1) {
result.push_back(num);
}
}
return result;
}
| int main() {
assert((func0({1,2,3,2,3,4,5}) == std::vector<int>{1, 4, 5}));
assert((func0({1,2,3,2,4,5}) == std::vector<int>{1, 3, 4, 5}));
assert((func0({1,2,3,4,5}) == std::vector<int>{1, 2, 3, 4, 5}));
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %r15
pxor %xmm0,%xmm0
push %r14
push %r13
mov %rdi,%r13
push %r12
push %rbp
push %rbx
sub $0x18,%rsp
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
movq $0x0,0x10(%rdi)
movups %xmm0,(%rdi)
mov (%rsi),%rdx
mov 0x8(%rsi),%r12
cmp %rdx,%r12
je 1770 <_Z5func0RKSt6vectorIiSaIiEE+0x190>
mov %rsi,%rbp
mov %rdx,%rbx
lea 0x4(%rsp),%r15
mov %r12,%rdi
movabs $0x3ffffffffffffffc,%r14
nopl 0x0(%rax)
mov (%rbx),%esi
mov %esi,0x4(%rsp)
cmp %rdx,%rdi
je 1733 <_Z5func0RKSt6vectorIiSaIiEE+0x153>
lea -0x4(%rdi),%rcx
mov %rdx,%rax
sub %rdx,%rcx
shr $0x2,%rcx
lea 0x1(%rcx),%r8
test %r14,%rcx
je 1792 <_Z5func0RKSt6vectorIiSaIiEE+0x1b2>
movd %esi,%xmm6
pxor %xmm1,%xmm1
pxor %xmm4,%xmm4
mov %r8,%rcx
shr $0x2,%rcx
pshufd $0x0,%xmm6,%xmm5
shl $0x4,%rcx
add %rdx,%rcx
nopl 0x0(%rax)
movdqu (%rax),%xmm0
movdqa %xmm4,%xmm2
add $0x10,%rax
pcmpeqd %xmm5,%xmm0
pand 0xaa8(%rip),%xmm0
pcmpgtd %xmm0,%xmm2
movdqa %xmm0,%xmm3
punpckldq %xmm2,%xmm3
punpckhdq %xmm2,%xmm0
paddq %xmm3,%xmm1
paddq %xmm0,%xmm1
cmp %rcx,%rax
jne 1690 <_Z5func0RKSt6vectorIiSaIiEE+0xb0>
movdqa %xmm1,%xmm0
mov %r8,%rcx
psrldq $0x8,%xmm0
and $0xfffffffffffffffc,%rcx
paddq %xmm1,%xmm0
lea (%rdx,%rcx,4),%rdx
movq %xmm0,%rax
cmp %rcx,%r8
je 172e <_Z5func0RKSt6vectorIiSaIiEE+0x14e>
xor %ecx,%ecx
cmp (%rdx),%esi
sete %cl
add %rcx,%rax
lea 0x4(%rdx),%rcx
cmp %rcx,%rdi
je 172e <_Z5func0RKSt6vectorIiSaIiEE+0x14e>
xor %ecx,%ecx
cmp 0x4(%rdx),%esi
sete %cl
add %rcx,%rax
lea 0x8(%rdx),%rcx
cmp %rcx,%rdi
je 172e <_Z5func0RKSt6vectorIiSaIiEE+0x14e>
xor %ecx,%ecx
cmp 0x8(%rdx),%esi
sete %cl
add %rcx,%rax
lea 0xc(%rdx),%rcx
cmp %rcx,%rdi
je 172e <_Z5func0RKSt6vectorIiSaIiEE+0x14e>
cmp 0xc(%rdx),%esi
sete %dl
movzbl %dl,%edx
add %rdx,%rax
cmp $0x1,%eax
je 1750 <_Z5func0RKSt6vectorIiSaIiEE+0x170>
add $0x4,%rbx
cmp %rbx,%r12
je 1770 <_Z5func0RKSt6vectorIiSaIiEE+0x190>
mov 0x8(%rbp),%rdi
mov 0x0(%rbp),%rdx
jmpq 1640 <_Z5func0RKSt6vectorIiSaIiEE+0x60>
nopl 0x0(%rax)
mov 0x8(%r13),%r8
cmp 0x10(%r13),%r8
je 1799 <_Z5func0RKSt6vectorIiSaIiEE+0x1b9>
mov %esi,(%r8)
add $0x4,%rbx
add $0x4,%r8
mov %r8,0x8(%r13)
cmp %rbx,%r12
jne 173c <_Z5func0RKSt6vectorIiSaIiEE+0x15c>
xchg %ax,%ax
mov 0x8(%rsp),%rax
xor %fs:0x28,%rax
jne 17a9 <_Z5func0RKSt6vectorIiSaIiEE+0x1c9>
add $0x18,%rsp
mov %r13,%rax
pop %rbx
pop %rbp
pop %r12
pop %r13
pop %r14
pop %r15
retq
xor %eax,%eax
jmpq 16e7 <_Z5func0RKSt6vectorIiSaIiEE+0x107>
mov %r15,%rdx
mov %r8,%rsi
mov %r13,%rdi
callq 18c0 <_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_>
jmp 1733 <_Z5func0RKSt6vectorIiSaIiEE+0x153>
callq 1130 <__stack_chk_fail@plt>
endbr64
mov %rax,%rbp
jmpq 1160 <_Z5func0RKSt6vectorIiSaIiEE.cold>
nopw 0x0(%rax,%rax,1)
| _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push r13
pxor xmm0, xmm0
mov r13, rdi
push r12
push rbp
push rbx
sub rsp, 18h
mov rax, fs:28h
mov [rsp+38h+var_30], rax
xor eax, eax
mov qword ptr [rdi+10h], 0
movups xmmword ptr [rdi], xmm0
mov rdx, [rsi]
mov r12, [rsi+8]
cmp r12, rdx
jz loc_1770
mov rbp, rsi
mov rbx, rdx
mov r8, r12
nop dword ptr [rax+00000000h]
loc_1660:
mov edi, [rbx]
mov [rsp+38h+var_34], edi
cmp rdx, r8
jz loc_1732
lea rcx, [r8-4]
mov rax, rdx
sub rcx, rdx
mov rsi, rcx
shr rsi, 2
add rsi, 1
cmp rcx, 8
jbe loc_178E
movd xmm6, edi
pxor xmm1, xmm1
pxor xmm4, xmm4
mov rcx, rsi
shr rcx, 2
pshufd xmm5, xmm6, 0
shl rcx, 4
add rcx, rdx
nop dword ptr [rax]
loc_16B0:
movdqu xmm0, xmmword ptr [rax]
movdqa xmm2, xmm4
add rax, 10h
pcmpeqd xmm0, xmm5
pcmpgtd xmm2, xmm0
movdqa xmm3, xmm0
punpckldq xmm3, xmm2
punpckhdq xmm0, xmm2
psubq xmm1, xmm3
psubq xmm1, xmm0
cmp rax, rcx
jnz short loc_16B0
movdqa xmm0, xmm1
mov rcx, rsi
psrldq xmm0, 8
and rcx, 0FFFFFFFFFFFFFFFCh
and esi, 3
paddq xmm1, xmm0
lea rdx, [rdx+rcx*4]
movq rax, xmm1
jz short loc_172D
loc_16FF:
xor ecx, ecx
cmp edi, [rdx]
setz cl
add rax, rcx
lea rcx, [rdx+4]
cmp r8, rcx
jz short loc_172D
cmp edi, [rdx+4]
jnz short loc_171B
add rax, 1
loc_171B:
lea rcx, [rdx+8]
cmp r8, rcx
jz short loc_172D
cmp edi, [rdx+8]
jnz short loc_172D
add rax, 1
loc_172D:
cmp eax, 1
jz short loc_1750
loc_1732:
add rbx, 4
cmp r12, rbx
jz short loc_1770
loc_173B:
mov rdx, [rbp+0]
mov r8, [rbp+8]
jmp loc_1660
loc_1750:
mov rsi, [r13+8]
cmp rsi, [r13+10h]
jz short loc_1795
mov [rsi], edi
add rbx, 4
add rsi, 4
mov [r13+8], rsi
cmp r12, rbx
jnz short loc_173B
nop dword ptr [rax]
loc_1770:
mov rax, [rsp+38h+var_30]
sub rax, fs:28h
jnz short loc_17A4
add rsp, 18h
mov rax, r13
pop rbx
pop rbp
pop r12
pop r13
retn
loc_178E:
xor eax, eax
jmp loc_16FF
loc_1795:
lea rdx, [rsp+38h+var_34]
mov rdi, r13
call _ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_; std::vector<int>::_M_realloc_insert<int const&>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,int const&)
jmp short loc_1732
loc_17A4:
call ___stack_chk_fail
endbr64
mov rbx, rax
jmp _Z5func0RKSt6vectorIiSaIiEE_cold; func0(std::vector<int> const&) [clone] | long long func0(long long a1, long long a2, double a3, double a4, __m128i a5, __m128i a6, double a7)
{
__m128i v7; // xmm0
const __m128i *v9; // rdx
unsigned int *v10; // r12
unsigned int *v12; // rbx
const __m128i *i; // r8
unsigned int v14; // edi
const __m128i *v15; // rax
unsigned long long v16; // rsi
__m128i v17; // xmm1
__m128i v18; // xmm5
__m128i v19; // xmm0
__m128i v20; // xmm0
int v21; // eax
unsigned int *v22; // rsi
unsigned int v24; // [rsp+0h] [rbp-34h] BYREF
unsigned long long v25; // [rsp+4h] [rbp-30h]
v7.m128i_i64[0] = 0LL;
v25 = __readfsqword(0x28u);
*(_QWORD *)(a1 + 16) = 0LL;
*(_OWORD *)a1 = 0LL;
v9 = *(const __m128i **)a2;
v10 = *(unsigned int **)(a2 + 8);
if ( v10 != *(unsigned int **)a2 )
{
v12 = *(unsigned int **)a2;
for ( i = *(const __m128i **)(a2 + 8); ; i = *(const __m128i **)(a2 + 8) )
{
v14 = *v12;
v24 = *v12;
if ( v9 == i )
goto LABEL_15;
v15 = v9;
v16 = ((unsigned long long)((char *)&i[-1].m128i_u64[1] + 4 - (char *)v9) >> 2) + 1;
if ( (unsigned long long)((char *)&i[-1].m128i_u64[1] + 4 - (char *)v9) <= 8 )
{
v21 = 0;
}
else
{
v17 = 0LL;
a7 = 0.0;
v18 = _mm_shuffle_epi32(_mm_cvtsi32_si128(v14), 0);
do
{
v19 = _mm_loadu_si128(v15++);
v20 = _mm_cmpeq_epi32(v19, v18);
a5 = _mm_cmpgt_epi32((__m128i)0LL, v20);
a6 = _mm_unpacklo_epi32(v20, a5);
v17 = _mm_sub_epi64(_mm_sub_epi64(v17, a6), _mm_unpackhi_epi32(v20, a5));
}
while ( v15 != &v9[v16 >> 2] );
v7 = _mm_srli_si128(v17, 8);
*(_QWORD *)&a4 = _mm_add_epi64(v17, v7).m128i_u64[0];
v9 = (const __m128i *)((char *)v9 + 4 * (v16 & 0xFFFFFFFFFFFFFFFCLL));
v21 = LODWORD(a4);
if ( (v16 & 3) == 0 )
goto LABEL_14;
}
v21 += v14 == v9->m128i_i32[0];
if ( i != (const __m128i *)((char *)v9->m128i_i64 + 4) )
{
if ( v14 == v9->m128i_i32[1] )
++v21;
if ( i != (const __m128i *)&v9->m128i_u64[1] && v14 == v9->m128i_i32[2] )
++v21;
}
LABEL_14:
if ( v21 != 1 )
goto LABEL_15;
v22 = *(unsigned int **)(a1 + 8);
if ( v22 == *(unsigned int **)(a1 + 16) )
{
std::vector<int>::_M_realloc_insert<int const&>(
a1,
v22,
&v24,
*(double *)v7.m128i_i64,
a4,
*(double *)a5.m128i_i64,
*(double *)a6.m128i_i64,
a7);
LABEL_15:
if ( v10 == ++v12 )
return a1;
goto LABEL_16;
}
*v22 = v14;
++v12;
*(_QWORD *)(a1 + 8) = v22 + 1;
if ( v10 == v12 )
return a1;
LABEL_16:
v9 = *(const __m128i **)a2;
}
}
return a1;
} | func0:
ENDBR64
PUSH R13
PXOR XMM0,XMM0
MOV R13,RDI
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x18
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
MOV qword ptr [RDI + 0x10],0x0
MOVUPS xmmword ptr [RDI],XMM0
MOV RDX,qword ptr [RSI]
MOV R12,qword ptr [RSI + 0x8]
CMP R12,RDX
JZ 0x00101770
MOV RBP,RSI
MOV RBX,RDX
MOV R8,R12
NOP dword ptr [RAX]
LAB_00101660:
MOV EDI,dword ptr [RBX]
MOV dword ptr [RSP + 0x4],EDI
CMP RDX,R8
JZ 0x00101732
LEA RCX,[R8 + -0x4]
MOV RAX,RDX
SUB RCX,RDX
MOV RSI,RCX
SHR RSI,0x2
ADD RSI,0x1
CMP RCX,0x8
JBE 0x0010178e
MOVD XMM6,EDI
PXOR XMM1,XMM1
PXOR XMM4,XMM4
MOV RCX,RSI
SHR RCX,0x2
PSHUFD XMM5,XMM6,0x0
SHL RCX,0x4
ADD RCX,RDX
NOP dword ptr [RAX]
LAB_001016b0:
MOVDQU XMM0,xmmword ptr [RAX]
MOVDQA XMM2,XMM4
ADD RAX,0x10
PCMPEQD XMM0,XMM5
PCMPGTD XMM2,XMM0
MOVDQA XMM3,XMM0
PUNPCKLDQ XMM3,XMM2
PUNPCKHDQ XMM0,XMM2
PSUBQ XMM1,XMM3
PSUBQ XMM1,XMM0
CMP RAX,RCX
JNZ 0x001016b0
MOVDQA XMM0,XMM1
MOV RCX,RSI
PSRLDQ XMM0,0x8
AND RCX,-0x4
AND ESI,0x3
PADDQ XMM1,XMM0
LEA RDX,[RDX + RCX*0x4]
MOVQ RAX,XMM1
JZ 0x0010172d
LAB_001016ff:
XOR ECX,ECX
CMP EDI,dword ptr [RDX]
SETZ CL
ADD RAX,RCX
LEA RCX,[RDX + 0x4]
CMP R8,RCX
JZ 0x0010172d
CMP EDI,dword ptr [RDX + 0x4]
JNZ 0x0010171b
ADD RAX,0x1
LAB_0010171b:
LEA RCX,[RDX + 0x8]
CMP R8,RCX
JZ 0x0010172d
CMP EDI,dword ptr [RDX + 0x8]
JNZ 0x0010172d
ADD RAX,0x1
LAB_0010172d:
CMP EAX,0x1
JZ 0x00101750
LAB_00101732:
ADD RBX,0x4
CMP R12,RBX
JZ 0x00101770
LAB_0010173b:
MOV RDX,qword ptr [RBP]
MOV R8,qword ptr [RBP + 0x8]
JMP 0x00101660
LAB_00101750:
MOV RSI,qword ptr [R13 + 0x8]
CMP RSI,qword ptr [R13 + 0x10]
JZ 0x00101795
MOV dword ptr [RSI],EDI
ADD RBX,0x4
ADD RSI,0x4
MOV qword ptr [R13 + 0x8],RSI
CMP R12,RBX
JNZ 0x0010173b
NOP dword ptr [RAX]
LAB_00101770:
MOV RAX,qword ptr [RSP + 0x8]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x001017a4
ADD RSP,0x18
MOV RAX,R13
POP RBX
POP RBP
POP R12
POP R13
RET
LAB_0010178e:
XOR EAX,EAX
JMP 0x001016ff
LAB_00101795:
LEA RDX,[RSP + 0x4]
MOV RDI,R13
LAB_0010179d:
CALL 0x001018d0
JMP 0x00101732
LAB_001017a4:
CALL 0x00101130 | /* func0(std::vector<int, std::allocator<int> > const&) */
vector * func0(vector *param_1)
{
int *piVar1;
int *piVar2;
int *piVar3;
int *piVar4;
int iVar5;
int *piVar6;
ulong uVar7;
int *piVar8;
int *piVar9;
int8 *in_RSI;
ulong uVar10;
int *piVar11;
long in_FS_OFFSET;
int iVar13;
int auVar12 [16];
long lVar14;
long lVar15;
int auVar16 [16];
int local_34;
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
*(int8 *)(param_1 + 0x10) = 0;
*(int (*) [16])param_1 = (int [16])0x0;
piVar8 = (int *)*in_RSI;
piVar1 = (int *)in_RSI[1];
piVar9 = piVar8;
piVar11 = piVar1;
if (piVar1 != piVar8) {
do {
local_34 = *piVar9;
if (piVar8 != piVar11) {
uVar7 = (long)piVar11 + (-4 - (long)piVar8);
uVar10 = (uVar7 >> 2) + 1;
if (uVar7 < 9) {
iVar5 = 0;
LAB_001016ff:
iVar5 = iVar5 + (uint)(local_34 == *piVar8);
if (piVar11 != piVar8 + 1) {
if (local_34 == piVar8[1]) {
iVar5 = iVar5 + 1;
}
if ((piVar11 != piVar8 + 2) && (local_34 == piVar8[2])) {
iVar5 = iVar5 + 1;
}
}
}
else {
lVar14 = 0;
lVar15 = 0;
piVar6 = piVar8;
do {
iVar5 = *piVar6;
piVar2 = piVar6 + 1;
piVar3 = piVar6 + 2;
piVar4 = piVar6 + 3;
piVar6 = piVar6 + 4;
iVar13 = -(uint)(*piVar2 == local_34);
auVar16._4_4_ = iVar13;
auVar16._0_4_ = -(uint)(iVar5 == local_34);
auVar16._8_4_ = iVar13;
auVar16._12_4_ = -(uint)((*piVar2 == local_34) != 0);
auVar12._0_8_ =
CONCAT44(-(uint)((*piVar3 == local_34) != 0),-(uint)(*piVar3 == local_34));
auVar12._8_4_ = -(uint)(*piVar4 == local_34);
auVar12._12_4_ = -(uint)((*piVar4 == local_34) != 0);
lVar14 = (lVar14 - (ulong)-(uint)(iVar5 == local_34)) - auVar12._0_8_;
lVar15 = (lVar15 - auVar16._8_8_) - auVar12._8_8_;
} while (piVar6 != piVar8 + (uVar10 & 0xfffffffffffffffc));
iVar5 = (int)lVar14 + (int)lVar15;
piVar8 = piVar8 + (uVar10 & 0xfffffffffffffffc);
if ((uVar10 & 3) != 0) goto LAB_001016ff;
}
if (iVar5 == 1) {
piVar8 = *(int **)(param_1 + 8);
if (piVar8 == *(int **)(param_1 + 0x10)) {
/* try { // try from 0010179d to 001017a1 has its CatchHandler @ 001017a9 */
std::vector<int,std::allocator<int>>::_M_realloc_insert<int_const&>
((vector<int,std::allocator<int>> *)param_1,(__normal_iterator)piVar8,
&local_34);
}
else {
*piVar8 = local_34;
*(int **)(param_1 + 8) = piVar8 + 1;
}
}
}
if (piVar1 == piVar9 + 1) break;
piVar8 = (int *)*in_RSI;
piVar9 = piVar9 + 1;
piVar11 = (int *)in_RSI[1];
} while( true );
}
if (local_30 == *(long *)(in_FS_OFFSET + 0x28)) {
return param_1;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
} |
2,288 | func0 |
#include <vector>
#include <set>
#include <assert.h>
| int func0(const std::vector<int>& list_data) {
std::set<int> unique_elements(list_data.begin(), list_data.end());
int product = 1;
for (int element : unique_elements) {
product *= element;
}
return product;
}
| int main() {
assert(func0({10, 20, 30, 40, 20, 50, 60, 40}) == 720000000);
assert(func0({1, 2, 3, 1}) == 6);
assert(func0({7, 8, 9, 0, 1, 1}) == 0);
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x78,%rsp
mov %rdi,-0x78(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x78(%rbp),%rax
mov %rax,%rdi
callq 17c0 <_ZNKSt6vectorIiSaIiEE3endEv>
mov %rax,%rbx
mov -0x78(%rbp),%rax
mov %rax,%rdi
callq 1768 <_ZNKSt6vectorIiSaIiEE5beginEv>
mov %rax,%rcx
lea -0x50(%rbp),%rax
mov %rbx,%rdx
mov %rcx,%rsi
mov %rax,%rdi
callq 1858 <_ZNSt3setIiSt4lessIiESaIiEEC1IN9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiS2_EEEEET_SC_>
movl $0x1,-0x70(%rbp)
lea -0x50(%rbp),%rax
mov %rax,-0x58(%rbp)
mov -0x58(%rbp),%rax
mov %rax,%rdi
callq 192c <_ZNKSt3setIiSt4lessIiESaIiEE5beginEv>
mov %rax,-0x68(%rbp)
mov -0x58(%rbp),%rax
mov %rax,%rdi
callq 194a <_ZNKSt3setIiSt4lessIiESaIiEE3endEv>
mov %rax,-0x60(%rbp)
lea -0x60(%rbp),%rdx
lea -0x68(%rbp),%rax
mov %rdx,%rsi
mov %rax,%rdi
callq 1968 <_ZStneRKSt23_Rb_tree_const_iteratorIiES2_>
test %al,%al
je 1368 <_Z5func0RKSt6vectorIiSaIiEE+0xbf>
lea -0x68(%rbp),%rax
mov %rax,%rdi
callq 19ba <_ZNKSt23_Rb_tree_const_iteratorIiEdeEv>
mov (%rax),%eax
mov %eax,-0x6c(%rbp)
mov -0x70(%rbp),%eax
imul -0x6c(%rbp),%eax
mov %eax,-0x70(%rbp)
lea -0x68(%rbp),%rax
mov %rax,%rdi
callq 198e <_ZNSt23_Rb_tree_const_iteratorIiEppEv>
jmp 1328 <_Z5func0RKSt6vectorIiSaIiEE+0x7f>
mov -0x70(%rbp),%ebx
lea -0x50(%rbp),%rax
mov %rax,%rdi
callq 1748 <_ZNSt3setIiSt4lessIiESaIiEED1Ev>
mov %ebx,%eax
mov -0x18(%rbp),%rcx
xor %fs:0x28,%rcx
je 138d <_Z5func0RKSt6vectorIiSaIiEE+0xe4>
callq 1180 <__stack_chk_fail@plt>
add $0x78,%rsp
pop %rbx
pop %rbp
retq
| _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 78h
mov [rbp+var_78], rdi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_78]
mov rdi, rax
call _ZNKSt6vectorIiSaIiEE3endEv; std::vector<int>::end(void)
mov rbx, rax
mov rax, [rbp+var_78]
mov rdi, rax
call _ZNKSt6vectorIiSaIiEE5beginEv; std::vector<int>::begin(void)
mov rcx, rax
lea rax, [rbp+var_50]
mov rdx, rbx
mov rsi, rcx
mov rdi, rax
call _ZNSt3setIiSt4lessIiESaIiEEC2IN9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiS2_EEEEET_SC_; std::set<int>::set<__gnu_cxx::__normal_iterator<int const*,std::vector<int>>>(__gnu_cxx::__normal_iterator<int const*,std::vector<int>>,__gnu_cxx::__normal_iterator<int const*,std::vector<int>>)
mov [rbp+var_70], 1
lea rax, [rbp+var_50]
mov [rbp+var_58], rax
mov rax, [rbp+var_58]
mov rdi, rax
call _ZNKSt3setIiSt4lessIiESaIiEE5beginEv; std::set<int>::begin(void)
mov [rbp+var_68], rax
mov rax, [rbp+var_58]
mov rdi, rax
call _ZNKSt3setIiSt4lessIiESaIiEE3endEv; std::set<int>::end(void)
mov [rbp+var_60], rax
jmp short loc_1371
loc_134A:
lea rax, [rbp+var_68]
mov rdi, rax
call _ZNKSt23_Rb_tree_const_iteratorIiEdeEv; std::_Rb_tree_const_iterator<int>::operator*(void)
mov eax, [rax]
mov [rbp+var_6C], eax
mov eax, [rbp+var_70]
imul eax, [rbp+var_6C]
mov [rbp+var_70], eax
lea rax, [rbp+var_68]
mov rdi, rax
call _ZNSt23_Rb_tree_const_iteratorIiEppEv; std::_Rb_tree_const_iterator<int>::operator++(void)
loc_1371:
lea rdx, [rbp+var_60]
lea rax, [rbp+var_68]
mov rsi, rdx
mov rdi, rax
call _ZStneRKSt23_Rb_tree_const_iteratorIiES2_; std::operator!=(std::_Rb_tree_const_iterator<int> const&,std::_Rb_tree_const_iterator<int> const&)
test al, al
jnz short loc_134A
mov ebx, [rbp+var_70]
lea rax, [rbp+var_50]
mov rdi, rax
call _ZNSt3setIiSt4lessIiESaIiEED2Ev; std::set<int>::~set()
mov eax, ebx
mov rdx, [rbp+var_18]
sub rdx, fs:28h
jz short loc_13AD
call ___stack_chk_fail
loc_13AD:
mov rbx, [rbp+var_8]
leave
retn | long long func0(long long a1)
{
long long v1; // rbx
long long v2; // rax
unsigned int v4; // [rsp+10h] [rbp-70h]
long long v5; // [rsp+18h] [rbp-68h] BYREF
_QWORD v6[2]; // [rsp+20h] [rbp-60h] BYREF
_BYTE v7[56]; // [rsp+30h] [rbp-50h] BYREF
unsigned long long v8; // [rsp+68h] [rbp-18h]
v8 = __readfsqword(0x28u);
v1 = std::vector<int>::end(a1);
v2 = std::vector<int>::begin(a1);
std::set<int>::set<__gnu_cxx::__normal_iterator<int const*,std::vector<int>>>(v7, v2, v1);
v4 = 1;
v6[1] = v7;
v5 = std::set<int>::begin(v7);
v6[0] = std::set<int>::end(v7);
while ( (unsigned __int8)std::operator!=(&v5, v6) )
{
v4 *= *(_DWORD *)std::_Rb_tree_const_iterator<int>::operator*(&v5);
std::_Rb_tree_const_iterator<int>::operator++(&v5);
}
std::set<int>::~set(v7);
return v4;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x78
MOV qword ptr [RBP + -0x78],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x78]
MOV RDI,RAX
CALL 0x00101812
MOV RBX,RAX
MOV RAX,qword ptr [RBP + -0x78]
MOV RDI,RAX
CALL 0x001017c6
MOV RCX,RAX
LEA RAX,[RBP + -0x50]
MOV RDX,RBX
MOV RSI,RCX
MOV RDI,RAX
CALL 0x001018aa
MOV dword ptr [RBP + -0x70],0x1
LEA RAX,[RBP + -0x50]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x58]
MOV RDI,RAX
CALL 0x0010195e
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr [RBP + -0x58]
MOV RDI,RAX
CALL 0x0010197c
MOV qword ptr [RBP + -0x60],RAX
JMP 0x00101371
LAB_0010134a:
LEA RAX,[RBP + -0x68]
MOV RDI,RAX
CALL 0x001019ec
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x6c],EAX
MOV EAX,dword ptr [RBP + -0x70]
IMUL EAX,dword ptr [RBP + -0x6c]
MOV dword ptr [RBP + -0x70],EAX
LEA RAX,[RBP + -0x68]
MOV RDI,RAX
CALL 0x001019c0
LAB_00101371:
LEA RDX,[RBP + -0x60]
LEA RAX,[RBP + -0x68]
MOV RSI,RDX
MOV RDI,RAX
CALL 0x0010199a
TEST AL,AL
JNZ 0x0010134a
MOV EBX,dword ptr [RBP + -0x70]
LEA RAX,[RBP + -0x50]
MOV RDI,RAX
CALL 0x001017a6
MOV EAX,EBX
MOV RDX,qword ptr [RBP + -0x18]
SUB RDX,qword ptr FS:[0x28]
JZ 0x001013ad
CALL 0x001011a0
LAB_001013ad:
MOV RBX,qword ptr [RBP + -0x8]
LEAVE
RET | /* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
char cVar1;
__normal_iterator _Var2;
__normal_iterator _Var3;
int *piVar4;
long in_FS_OFFSET;
int local_78;
int8 local_70;
int8 local_68;
set<int,std::less<int>,std::allocator<int>> *local_60;
set<int,std::less<int>,std::allocator<int>> local_58 [56];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
_Var2 = std::vector<int,std::allocator<int>>::end((vector<int,std::allocator<int>> *)param_1);
_Var3 = std::vector<int,std::allocator<int>>::begin((vector<int,std::allocator<int>> *)param_1);
std::set<int,std::less<int>,std::allocator<int>>::
set<__normal_iterator<int_const*,std::vector<int,std::allocator<int>>>>(local_58,_Var3,_Var2);
local_78 = 1;
local_60 = local_58;
local_70 = std::set<int,std::less<int>,std::allocator<int>>::begin(local_60);
local_68 = std::set<int,std::less<int>,std::allocator<int>>::end(local_60);
while( true ) {
cVar1 = std::operator!=((_Rb_tree_const_iterator *)&local_70,
(_Rb_tree_const_iterator *)&local_68);
if (cVar1 == '\0') break;
piVar4 = (int *)std::_Rb_tree_const_iterator<int>::operator*
((_Rb_tree_const_iterator<int> *)&local_70);
local_78 = local_78 * *piVar4;
std::_Rb_tree_const_iterator<int>::operator++((_Rb_tree_const_iterator<int> *)&local_70);
}
std::set<int,std::less<int>,std::allocator<int>>::~set(local_58);
if (local_20 != *(long *)(in_FS_OFFSET + 0x28)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_78;
} |
2,289 | func0 |
#include <vector>
#include <set>
#include <assert.h>
| int func0(const std::vector<int>& list_data) {
std::set<int> unique_elements(list_data.begin(), list_data.end());
int product = 1;
for (int element : unique_elements) {
product *= element;
}
return product;
}
| int main() {
assert(func0({10, 20, 30, 40, 20, 50, 60, 40}) == 720000000);
assert(func0({1, 2, 3, 1}) == 6);
assert(func0({7, 8, 9, 0, 1, 1}) == 0);
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x48,%rsp
mov %fs:0x28,%rax
mov %rax,0x38(%rsp)
xor %eax,%eax
mov 0x8(%rdi),%r14
mov (%rdi),%rbx
movl $0x0,0x8(%rsp)
movq $0x0,0x10(%rsp)
lea 0x8(%rsp),%rax
mov %rax,0x18(%rsp)
mov %rax,0x20(%rsp)
movq $0x0,0x28(%rsp)
cmp %rbx,%r14
je 1359 <_Z5func0RKSt6vectorIiSaIiEE+0xd0>
mov %rsp,%r15
jmp 131a <_Z5func0RKSt6vectorIiSaIiEE+0x91>
mov 0x20(%rdx),%eax
cmp %eax,(%rbx)
setl %r12b
jmp 134d <_Z5func0RKSt6vectorIiSaIiEE+0xc4>
mov %rax,%rsi
mov 0x0(%r13),%eax
mov %eax,0x20(%rsi)
lea 0x8(%rsp),%rcx
movzbl %r12b,%edi
mov %rbp,%rdx
callq 10f0 <_ZSt29_Rb_tree_insert_and_rebalancebPSt18_Rb_tree_node_baseS0_RS_@plt>
addq $0x1,0x28(%rsp)
add $0x4,%rbx
cmp %rbx,%r14
je 1359 <_Z5func0RKSt6vectorIiSaIiEE+0xd0>
mov %rbx,%r13
lea 0x8(%rsp),%rsi
mov %rbx,%rdx
mov %r15,%rdi
callq 177a <_ZNSt8_Rb_treeIiiSt9_IdentityIiESt4lessIiESaIiEE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIiERKi>
mov %rdx,%rbp
test %rdx,%rdx
je 1311 <_Z5func0RKSt6vectorIiSaIiEE+0x88>
test %rax,%rax
setne %r12b
lea 0x8(%rsp),%rax
cmp %rax,%rdx
sete %dil
or %dil,%r12b
je 12e5 <_Z5func0RKSt6vectorIiSaIiEE+0x5c>
mov $0x28,%edi
callq 1150 <_Znwm@plt>
jmp 12f0 <_Z5func0RKSt6vectorIiSaIiEE+0x67>
mov 0x18(%rsp),%rdi
lea 0x8(%rsp),%rax
mov $0x1,%ebx
mov %rax,%rbp
cmp %rax,%rdi
je 1381 <_Z5func0RKSt6vectorIiSaIiEE+0xf8>
imul 0x20(%rdi),%ebx
callq 1180 <_ZSt18_Rb_tree_incrementPKSt18_Rb_tree_node_base@plt>
mov %rax,%rdi
cmp %rbp,%rax
jne 1370 <_Z5func0RKSt6vectorIiSaIiEE+0xe7>
mov %rsp,%rdi
mov 0x10(%rsp),%rsi
callq 16b6 <_ZNSt8_Rb_treeIiiSt9_IdentityIiESt4lessIiESaIiEE8_M_eraseEPSt13_Rb_tree_nodeIiE>
mov 0x38(%rsp),%rax
xor %fs:0x28,%rax
jne 13cb <_Z5func0RKSt6vectorIiSaIiEE+0x142>
mov %ebx,%eax
add $0x48,%rsp
pop %rbx
pop %rbp
pop %r12
pop %r13
pop %r14
pop %r15
retq
endbr64
mov %rax,%rbx
mov %rsp,%rdi
mov 0x10(%rsp),%rsi
callq 16b6 <_ZNSt8_Rb_treeIiiSt9_IdentityIiESt4lessIiESaIiEE8_M_eraseEPSt13_Rb_tree_nodeIiE>
mov %rbx,%rdi
callq 1190 <_Unwind_Resume@plt>
callq 1170 <__stack_chk_fail@plt>
| _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 48h
mov rax, fs:28h
mov [rsp+78h+var_40], rax
xor eax, eax
mov r14, [rdi+8]
mov rbx, [rdi]
mov [rsp+78h+var_70], 0
mov [rsp+78h+var_68], 0
lea rax, [rsp+78h+var_70]
mov [rsp+78h+var_60], rax
mov [rsp+78h+var_58], rax
mov [rsp+78h+var_50], 0
cmp rbx, r14
jz loc_13EC
mov r15, rsp
jmp short loc_131E
loc_12E9:
mov eax, [rdx+20h]
cmp [rbx], eax
setl r12b
jmp short loc_1350
loc_12F4:
mov rsi, rax
mov eax, [r13+0]
mov [rsi+20h], eax
lea rcx, [rsp+78h+var_70]
movzx edi, r12b
mov rdx, rbp
call __ZSt29_Rb_tree_insert_and_rebalancebPSt18_Rb_tree_node_baseS0_RS_; std::_Rb_tree_insert_and_rebalance(bool,std::_Rb_tree_node_base *,std::_Rb_tree_node_base *,std::_Rb_tree_node_base&)
add [rsp+78h+var_50], 1
loc_1315:
add rbx, 4
cmp r14, rbx
jz short loc_135C
loc_131E:
mov r13, rbx
lea rsi, [rsp+78h+var_70]
mov rdx, rbx
mov rdi, r15
call _ZNSt8_Rb_treeIiiSt9_IdentityIiESt4lessIiESaIiEE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIiERKi; std::_Rb_tree<int,int,std::_Identity<int>,std::less<int>,std::allocator<int>>::_M_get_insert_hint_unique_pos(std::_Rb_tree_const_iterator<int>,int const&)
mov rbp, rdx
test rdx, rdx
jz short loc_1315
test rax, rax
setnz r12b
lea rax, [rsp+78h+var_70]
cmp rdx, rax
setz al
or r12b, al
jz short loc_12E9
loc_1350:
mov edi, 28h ; '('; unsigned __int64
call __Znwm; operator new(ulong)
jmp short loc_12F4
loc_135C:
mov rdi, [rsp+78h+var_60]
lea rax, [rsp+78h+var_70]
cmp rdi, rax
jz short loc_13B4
mov ebx, 1
lea rbp, [rsp+78h+var_70]
loc_1375:
imul ebx, [rdi+20h]
call __ZSt18_Rb_tree_incrementPKSt18_Rb_tree_node_base; std::_Rb_tree_increment(std::_Rb_tree_node_base const*)
mov rdi, rax
cmp rax, rbp
jnz short loc_1375
loc_1386:
mov rdi, rsp
mov rsi, [rsp+78h+var_68]
call _ZNSt8_Rb_treeIiiSt9_IdentityIiESt4lessIiESaIiEE8_M_eraseEPSt13_Rb_tree_nodeIiE; std::_Rb_tree<int,int,std::_Identity<int>,std::less<int>,std::allocator<int>>::_M_erase(std::_Rb_tree_node<int> *)
mov rax, [rsp+78h+var_40]
sub rax, fs:28h
jnz short loc_13F3
mov eax, ebx
add rsp, 48h
pop rbx
pop rbp
pop r12
pop r13
pop r14
pop r15
retn
loc_13B4:
mov ebx, 1
jmp short loc_1386
endbr64
mov rbx, rax
mov rdi, rsp
mov rsi, [rsp+arg_8]
call _ZNSt8_Rb_treeIiiSt9_IdentityIiESt4lessIiESaIiEE8_M_eraseEPSt13_Rb_tree_nodeIiE; std::_Rb_tree<int,int,std::_Identity<int>,std::less<int>,std::allocator<int>>::_M_erase(std::_Rb_tree_node<int> *)
mov rax, [rsp+arg_30]
sub rax, fs:28h
jz short loc_13E4
call ___stack_chk_fail
loc_13E4:
mov rdi, rbx; struct _Unwind_Exception *
call __Unwind_Resume
loc_13EC:
mov ebx, 1
jmp short loc_1386
loc_13F3:
call ___stack_chk_fail | long long func0(long long a1)
{
_DWORD *v1; // r14
_DWORD *v2; // rbx
long long insert_hint_unique_pos; // rax
int *v4; // rdx
int *v5; // rbp
bool v6; // r12
long long v7; // rax
int *v8; // rdi
unsigned int v9; // ebx
long long v11; // [rsp+0h] [rbp-78h] BYREF
int v12; // [rsp+8h] [rbp-70h] BYREF
long long v13; // [rsp+10h] [rbp-68h]
int *v14; // [rsp+18h] [rbp-60h]
int *v15; // [rsp+20h] [rbp-58h]
long long v16; // [rsp+28h] [rbp-50h]
unsigned long long v17; // [rsp+38h] [rbp-40h]
v17 = __readfsqword(0x28u);
v1 = *(_DWORD **)(a1 + 8);
v2 = *(_DWORD **)a1;
v12 = 0;
v13 = 0LL;
v14 = &v12;
v15 = &v12;
v16 = 0LL;
if ( v2 == v1 )
{
v9 = 1;
}
else
{
do
{
insert_hint_unique_pos = std::_Rb_tree<int,int,std::_Identity<int>,std::less<int>,std::allocator<int>>::_M_get_insert_hint_unique_pos(
&v11,
&v12,
v2);
v5 = v4;
if ( v4 )
{
v6 = v4 == &v12 || insert_hint_unique_pos != 0;
if ( !v6 )
v6 = *v2 < v4[8];
v7 = operator new(0x28uLL);
*(_DWORD *)(v7 + 32) = *v2;
std::_Rb_tree_insert_and_rebalance(v6, v7, v5, &v12);
++v16;
}
++v2;
}
while ( v1 != v2 );
v8 = v14;
if ( v14 == &v12 )
{
v9 = 1;
}
else
{
v9 = 1;
do
{
v9 *= v8[8];
v8 = (int *)std::_Rb_tree_increment();
}
while ( v8 != &v12 );
}
}
std::_Rb_tree<int,int,std::_Identity<int>,std::less<int>,std::allocator<int>>::_M_erase(&v11, v13);
return v9;
} | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x48
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
MOV R14,qword ptr [RDI + 0x8]
MOV RBX,qword ptr [RDI]
MOV dword ptr [RSP + 0x8],0x0
MOV qword ptr [RSP + 0x10],0x0
LEA RAX,[RSP + 0x8]
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x20],RAX
MOV qword ptr [RSP + 0x28],0x0
CMP RBX,R14
JZ 0x001013ec
MOV R15,RSP
JMP 0x0010131e
LAB_001012e9:
MOV EAX,dword ptr [RDX + 0x20]
CMP dword ptr [RBX],EAX
SETL R12B
JMP 0x00101350
LAB_001012f4:
MOV RSI,RAX
MOV EAX,dword ptr [R13]
MOV dword ptr [RSI + 0x20],EAX
LEA RCX,[RSP + 0x8]
MOVZX EDI,R12B
MOV RDX,RBP
CALL 0x001010f0
ADD qword ptr [RSP + 0x28],0x1
LAB_00101315:
ADD RBX,0x4
CMP R14,RBX
JZ 0x0010135c
LAB_0010131e:
MOV R13,RBX
LEA RSI,[RSP + 0x8]
MOV RDX,RBX
MOV RDI,R15
CALL 0x0010180a
MOV RBP,RDX
TEST RDX,RDX
JZ 0x00101315
TEST RAX,RAX
SETNZ R12B
LEA RAX,[RSP + 0x8]
CMP RDX,RAX
SETZ AL
OR R12B,AL
JZ 0x001012e9
LAB_00101350:
MOV EDI,0x28
LAB_00101355:
CALL 0x00101140
JMP 0x001012f4
LAB_0010135c:
MOV RDI,qword ptr [RSP + 0x18]
LEA RAX,[RSP + 0x8]
CMP RDI,RAX
JZ 0x001013b4
MOV EBX,0x1
LEA RBP,[RSP + 0x8]
LAB_00101375:
IMUL EBX,dword ptr [RDI + 0x20]
CALL 0x00101180
MOV RDI,RAX
CMP RAX,RBP
JNZ 0x00101375
LAB_00101386:
MOV RDI,RSP
MOV RSI,qword ptr [RSP + 0x10]
CALL 0x0010173a
MOV RAX,qword ptr [RSP + 0x38]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x001013f3
MOV EAX,EBX
ADD RSP,0x48
POP RBX
POP RBP
POP R12
POP R13
POP R14
POP R15
RET
LAB_001013b4:
MOV EBX,0x1
JMP 0x00101386
LAB_001013ec:
MOV EBX,0x1
JMP 0x00101386
LAB_001013f3:
CALL 0x00101170 | /* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
int *piVar1;
_Rb_tree_node_base *p_Var2;
_Rb_tree_node_base *p_Var3;
int iVar4;
int *piVar5;
bool bVar6;
long in_FS_OFFSET;
bool bVar7;
int auVar8 [16];
_Rb_tree<int,int,std::_Identity<int>,std::less<int>,std::allocator<int>> a_Stack_78 [8];
int4 local_70 [2];
_Rb_tree_node *local_68;
_Rb_tree_node_base *local_60;
_Rb_tree_node_base *local_58;
long local_50;
long local_40;
local_40 = *(long *)(in_FS_OFFSET + 0x28);
piVar1 = *(int **)(param_1 + 8);
piVar5 = *(int **)param_1;
local_70[0] = 0;
local_68 = (_Rb_tree_node *)0x0;
local_60 = (_Rb_tree_node_base *)local_70;
local_50 = 0;
local_58 = local_60;
if (piVar5 == piVar1) {
iVar4 = 1;
}
else {
do {
auVar8 = std::_Rb_tree<int,int,std::_Identity<int>,std::less<int>,std::allocator<int>>::
_M_get_insert_hint_unique_pos(a_Stack_78,(_Rb_tree_const_iterator)local_70,piVar5);
p_Var3 = auVar8._8_8_;
if (p_Var3 != (_Rb_tree_node_base *)0x0) {
bVar7 = auVar8._0_8_ != 0;
bVar6 = bVar7 || p_Var3 == (_Rb_tree_node_base *)local_70;
if (!bVar7 && p_Var3 != (_Rb_tree_node_base *)local_70) {
bVar6 = *piVar5 < *(int *)(p_Var3 + 0x20);
}
/* try { // try from 00101355 to 00101359 has its CatchHandler @ 001013bb */
p_Var2 = (_Rb_tree_node_base *)operator_new(0x28);
*(int *)(p_Var2 + 0x20) = *piVar5;
std::_Rb_tree_insert_and_rebalance(bVar6,p_Var2,p_Var3,(_Rb_tree_node_base *)local_70);
local_50 = local_50 + 1;
}
piVar5 = piVar5 + 1;
} while (piVar1 != piVar5);
if (local_60 == (_Rb_tree_node_base *)local_70) {
iVar4 = 1;
}
else {
iVar4 = 1;
p_Var3 = local_60;
do {
iVar4 = iVar4 * *(int *)(p_Var3 + 0x20);
p_Var3 = (_Rb_tree_node_base *)std::_Rb_tree_increment(p_Var3);
} while (p_Var3 != (_Rb_tree_node_base *)local_70);
}
}
std::_Rb_tree<int,int,std::_Identity<int>,std::less<int>,std::allocator<int>>::_M_erase
(a_Stack_78,local_68);
if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return iVar4;
} |
2,290 | func0 |
#include <vector>
#include <set>
#include <assert.h>
| int func0(const std::vector<int>& list_data) {
std::set<int> unique_elements(list_data.begin(), list_data.end());
int product = 1;
for (int element : unique_elements) {
product *= element;
}
return product;
}
| int main() {
assert(func0({10, 20, 30, 40, 20, 50, 60, 40}) == 720000000);
assert(func0({1, 2, 3, 1}) == 6);
assert(func0({7, 8, 9, 0, 1, 1}) == 0);
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x48,%rsp
mov 0x8(%rdi),%r15
mov (%rdi),%rbx
mov %fs:0x28,%rax
mov %rax,0x38(%rsp)
xor %eax,%eax
lea 0x8(%rsp),%rbp
movl $0x0,0x8(%rsp)
movq $0x0,0x10(%rsp)
mov %rbp,0x18(%rsp)
mov %rbp,0x20(%rsp)
movq $0x0,0x28(%rsp)
cmp %rbx,%r15
je 15d0 <_Z5func0RKSt6vectorIiSaIiEE+0x120>
mov %rsp,%r13
jmp 1540 <_Z5func0RKSt6vectorIiSaIiEE+0x90>
mov $0x28,%edi
callq 1150 <_Znwm@plt>
mov %rax,%rsi
mov (%rbx),%eax
movzbl %r14b,%edi
mov %rbp,%rcx
mov %r12,%rdx
mov %eax,0x20(%rsi)
callq 10f0 <_ZSt29_Rb_tree_insert_and_rebalancebPSt18_Rb_tree_node_baseS0_RS_@plt>
addq $0x1,0x28(%rsp)
add $0x4,%rbx
cmp %rbx,%r15
je 1578 <_Z5func0RKSt6vectorIiSaIiEE+0xc8>
mov %rbx,%rdx
mov %rbp,%rsi
mov %r13,%rdi
callq 1790 <_ZNSt8_Rb_treeIiiSt9_IdentityIiESt4lessIiESaIiEE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIiERKi>
mov %rdx,%r12
test %rdx,%rdx
je 1537 <_Z5func0RKSt6vectorIiSaIiEE+0x87>
test %rax,%rax
setne %r14b
cmp %rbp,%rdx
sete %dil
or %dil,%r14b
jne 1510 <_Z5func0RKSt6vectorIiSaIiEE+0x60>
mov 0x20(%rdx),%eax
cmp %eax,(%rbx)
setl %r14b
jmp 1510 <_Z5func0RKSt6vectorIiSaIiEE+0x60>
nopl 0x0(%rax)
mov 0x18(%rsp),%rdi
mov 0x10(%rsp),%r14
mov $0x1,%r12d
cmp %rbp,%rdi
je 15a2 <_Z5func0RKSt6vectorIiSaIiEE+0xf2>
nopl (%rax)
imul 0x20(%rdi),%r12d
callq 1180 <_ZSt18_Rb_tree_incrementPKSt18_Rb_tree_node_base@plt>
mov %rax,%rdi
cmp %rbp,%rax
jne 1590 <_Z5func0RKSt6vectorIiSaIiEE+0xe0>
mov %r14,%rsi
mov %r13,%rdi
callq 16b0 <_ZNSt8_Rb_treeIiiSt9_IdentityIiESt4lessIiESaIiEE8_M_eraseEPSt13_Rb_tree_nodeIiE>
mov 0x38(%rsp),%rax
xor %fs:0x28,%rax
jne 15de <_Z5func0RKSt6vectorIiSaIiEE+0x12e>
add $0x48,%rsp
mov %r12d,%eax
pop %rbx
pop %rbp
pop %r12
pop %r13
pop %r14
pop %r15
retq
xor %r14d,%r14d
mov $0x1,%r12d
mov %rsp,%r13
jmp 15a2 <_Z5func0RKSt6vectorIiSaIiEE+0xf2>
callq 1170 <__stack_chk_fail@plt>
endbr64
mov %rax,%rbp
jmpq 11a0 <_Z5func0RKSt6vectorIiSaIiEE.cold>
| _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 58h
mov r14, [rdi+8]
mov rbp, [rdi]
mov rax, fs:28h
mov [rsp+88h+var_40], rax
xor eax, eax
lea r13, [rsp+88h+var_70]
mov [rsp+88h+var_70], 0
mov [rsp+88h+var_68], 0
mov [rsp+88h+var_60], r13
mov [rsp+88h+var_58], r13
mov [rsp+88h+var_50], 0
cmp rbp, r14
jz loc_1820
lea rcx, [rsp+88h+var_78]
mov [rsp+88h+var_80], rcx
nop dword ptr [rax]
loc_1718:
mov r15d, [rbp+0]
test rax, rax
jz short loc_1730
mov rbx, [rsp+88h+var_58]
cmp r15d, [rbx+20h]
jg loc_1810
loc_1730:
mov rdi, [rsp+88h+var_80]
mov esi, r15d
call _ZNSt8_Rb_treeIiiSt9_IdentityIiESt4lessIiESaIiEE24_M_get_insert_unique_posERKi_isra_0; std::_Rb_tree<int,int,std::_Identity<int>,std::less<int>,std::allocator<int>>::_M_get_insert_unique_pos(int const&) [clone]
mov rbx, rdx
test rdx, rdx
jz short loc_177F
test rax, rax
setnz al
loc_174B:
cmp rbx, r13
setz r12b
or r12b, al
jz short loc_1790
loc_1757:
mov edi, 28h ; '('; unsigned __int64
call __Znwm; operator new(ulong)
mov rsi, rax
mov eax, [rbp+0]
movzx edi, r12b
mov rcx, r13
mov rdx, rbx
mov [rsi+20h], eax
call __ZSt29_Rb_tree_insert_and_rebalancebPSt18_Rb_tree_node_baseS0_RS_; std::_Rb_tree_insert_and_rebalance(bool,std::_Rb_tree_node_base *,std::_Rb_tree_node_base *,std::_Rb_tree_node_base&)
add [rsp+88h+var_50], 1
loc_177F:
add rbp, 4
cmp r14, rbp
jz short loc_17A0
mov rax, [rsp+88h+var_50]
jmp short loc_1718
loc_1790:
cmp r15d, [rbx+20h]
setl r12b
jmp short loc_1757
loc_17A0:
mov rdi, [rsp+88h+var_60]
mov rbx, [rsp+88h+var_68]
mov ebp, 1
cmp rdi, r13
jz short loc_17E8
nop dword ptr [rax+00h]
loc_17B8:
imul ebp, [rdi+20h]
call __ZSt18_Rb_tree_incrementPKSt18_Rb_tree_node_base; std::_Rb_tree_increment(std::_Rb_tree_node_base const*)
mov rdi, rax
cmp rax, r13
jnz short loc_17B8
test rbx, rbx
jz short loc_17ED
loc_17CE:
mov rdi, [rbx+18h]
call _ZNSt8_Rb_treeIiiSt9_IdentityIiESt4lessIiESaIiEE8_M_eraseEPSt13_Rb_tree_nodeIiE_isra_0; std::_Rb_tree<int,int,std::_Identity<int>,std::less<int>,std::allocator<int>>::_M_erase(std::_Rb_tree_node<int> *) [clone]
mov rdi, rbx; void *
mov esi, 28h ; '('; unsigned __int64
mov rbx, [rbx+10h]
call __ZdlPvm; operator delete(void *,ulong)
loc_17E8:
test rbx, rbx
jnz short loc_17CE
loc_17ED:
mov rax, [rsp+88h+var_40]
sub rax, fs:28h
jnz short loc_1827
add rsp, 58h
mov eax, ebp
pop rbx
pop rbp
pop r12
pop r13
pop r14
pop r15
retn
loc_1810:
xor eax, eax
jmp loc_174B
loc_1820:
mov ebp, 1
jmp short loc_17ED
loc_1827:
call ___stack_chk_fail
endbr64
mov rbx, rax
jmp _Z5func0RKSt6vectorIiSaIiEE_cold; func0(std::vector<int> const&) [clone] | long long func0(signed int **a1)
{
signed int *v1; // r14
signed int *v2; // rbp
long long v3; // rax
signed int v4; // r15d
int *v5; // rbx
long long insert_unique_pos; // rax
int *v7; // rdx
bool v8; // al
bool v9; // r12
long long v10; // rax
int *v11; // rdi
_QWORD *v12; // rbx
unsigned int v13; // ebp
void *v14; // rdi
_BYTE v16[8]; // [rsp+10h] [rbp-78h] BYREF
int v17; // [rsp+18h] [rbp-70h] BYREF
void *v18; // [rsp+20h] [rbp-68h]
int *v19; // [rsp+28h] [rbp-60h]
int *v20; // [rsp+30h] [rbp-58h]
long long v21; // [rsp+38h] [rbp-50h]
unsigned long long v22; // [rsp+48h] [rbp-40h]
v1 = a1[1];
v2 = *a1;
v22 = __readfsqword(0x28u);
v3 = 0LL;
v17 = 0;
v18 = 0LL;
v19 = &v17;
v20 = &v17;
v21 = 0LL;
if ( v2 == v1 )
return 1;
while ( 1 )
{
v4 = *v2;
if ( v3 && (v5 = v20, v4 > v20[8]) )
{
v8 = 0;
}
else
{
insert_unique_pos = std::_Rb_tree<int,int,std::_Identity<int>,std::less<int>,std::allocator<int>>::_M_get_insert_unique_pos(
v16,
(unsigned int)v4);
v5 = v7;
if ( !v7 )
goto LABEL_9;
v8 = insert_unique_pos != 0;
}
v9 = v8 || v5 == &v17;
if ( !v9 )
v9 = v4 < v5[8];
v10 = operator new(0x28uLL);
*(_DWORD *)(v10 + 32) = *v2;
std::_Rb_tree_insert_and_rebalance(v9, v10, v5, &v17);
++v21;
LABEL_9:
if ( v1 == ++v2 )
break;
v3 = v21;
}
v11 = v19;
v12 = v18;
v13 = 1;
if ( v19 == &v17 )
goto LABEL_15;
do
{
v13 *= v11[8];
v11 = (int *)std::_Rb_tree_increment();
}
while ( v11 != &v17 );
while ( v12 )
{
std::_Rb_tree<int,int,std::_Identity<int>,std::less<int>,std::allocator<int>>::_M_erase(v12[3]);
v14 = v12;
v12 = (_QWORD *)v12[2];
operator delete(v14, 0x28uLL);
LABEL_15:
;
}
return v13;
} | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x58
MOV R14,qword ptr [RDI + 0x8]
MOV RBP,qword ptr [RDI]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x48],RAX
XOR EAX,EAX
LEA R13,[RSP + 0x18]
MOV dword ptr [RSP + 0x18],0x0
MOV qword ptr [RSP + 0x20],0x0
MOV qword ptr [RSP + 0x28],R13
MOV qword ptr [RSP + 0x30],R13
MOV qword ptr [RSP + 0x38],0x0
CMP RBP,R14
JZ 0x00101820
LEA RCX,[RSP + 0x10]
MOV qword ptr [RSP + 0x8],RCX
NOP dword ptr [RAX]
LAB_00101718:
MOV R15D,dword ptr [RBP]
TEST RAX,RAX
JZ 0x00101730
MOV RBX,qword ptr [RSP + 0x30]
CMP R15D,dword ptr [RBX + 0x20]
JG 0x00101810
LAB_00101730:
MOV RDI,qword ptr [RSP + 0x8]
MOV ESI,R15D
CALL 0x00101450
MOV RBX,RDX
TEST RDX,RDX
JZ 0x0010177f
TEST RAX,RAX
SETNZ AL
LAB_0010174b:
CMP RBX,R13
SETZ R12B
OR R12B,AL
JZ 0x00101790
LAB_00101757:
MOV EDI,0x28
LAB_0010175c:
CALL 0x00101120
MOV RSI,RAX
MOV EAX,dword ptr [RBP]
MOVZX EDI,R12B
MOV RCX,R13
MOV RDX,RBX
MOV dword ptr [RSI + 0x20],EAX
CALL 0x001010e0
ADD qword ptr [RSP + 0x38],0x1
LAB_0010177f:
ADD RBP,0x4
CMP R14,RBP
JZ 0x001017a0
MOV RAX,qword ptr [RSP + 0x38]
JMP 0x00101718
LAB_00101790:
CMP R15D,dword ptr [RBX + 0x20]
SETL R12B
JMP 0x00101757
LAB_001017a0:
MOV RDI,qword ptr [RSP + 0x28]
MOV RBX,qword ptr [RSP + 0x20]
MOV EBP,0x1
CMP RDI,R13
JZ 0x001017e8
NOP dword ptr [RAX]
LAB_001017b8:
IMUL EBP,dword ptr [RDI + 0x20]
CALL 0x00101160
MOV RDI,RAX
CMP RAX,R13
JNZ 0x001017b8
TEST RBX,RBX
JZ 0x001017ed
LAB_001017ce:
MOV RDI,qword ptr [RBX + 0x18]
CALL 0x001014e0
MOV RDI,RBX
MOV ESI,0x28
MOV RBX,qword ptr [RBX + 0x10]
CALL 0x00101130
LAB_001017e8:
TEST RBX,RBX
JNZ 0x001017ce
LAB_001017ed:
MOV RAX,qword ptr [RSP + 0x48]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x00101827
ADD RSP,0x58
MOV EAX,EBP
POP RBX
POP RBP
POP R12
POP R13
POP R14
POP R15
RET
LAB_00101810:
XOR EAX,EAX
JMP 0x0010174b
LAB_00101820:
MOV EBP,0x1
JMP 0x001017ed
LAB_00101827:
CALL 0x00101150 | /* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
uint uVar1;
uint *puVar2;
void *pvVar3;
void *pvVar4;
_Rb_tree_node_base *p_Var5;
_Rb_tree_node_base *p_Var6;
int iVar7;
uint *puVar8;
long in_FS_OFFSET;
bool bVar9;
int auVar10 [16];
_Rb_tree<int,int,std::_Identity<int>,std::less<int>,std::allocator<int>> local_78 [8];
int4 local_70 [2];
void *local_68;
_Rb_tree_node_base *local_60;
_Rb_tree_node_base *local_58;
long local_50;
long local_40;
puVar2 = *(uint **)(param_1 + 8);
puVar8 = *(uint **)param_1;
local_40 = *(long *)(in_FS_OFFSET + 0x28);
local_70[0] = 0;
local_68 = (void *)0x0;
local_50 = 0;
local_60 = (_Rb_tree_node_base *)local_70;
local_58 = (_Rb_tree_node_base *)local_70;
if (puVar8 == puVar2) {
iVar7 = 1;
}
else {
do {
uVar1 = *puVar8;
if ((local_50 == 0) || ((int)uVar1 <= *(int *)(local_58 + 0x20))) {
auVar10 = std::_Rb_tree<int,int,std::_Identity<int>,std::less<int>,std::allocator<int>>::
_M_get_insert_unique_pos(local_78,(int *)(ulong)uVar1);
if (auVar10._8_8_ != (_Rb_tree_node_base *)0x0) {
bVar9 = auVar10._0_8_ != 0;
p_Var6 = auVar10._8_8_;
goto LAB_0010174b;
}
}
else {
bVar9 = false;
p_Var6 = local_58;
LAB_0010174b:
bVar9 = (bool)(p_Var6 == (_Rb_tree_node_base *)local_70 | bVar9);
if (bVar9 == false) {
bVar9 = (int)uVar1 < *(int *)(p_Var6 + 0x20);
}
/* try { // try from 0010175c to 00101760 has its CatchHandler @ 0010182c */
p_Var5 = (_Rb_tree_node_base *)operator_new(0x28);
*(uint *)(p_Var5 + 0x20) = *puVar8;
std::_Rb_tree_insert_and_rebalance(bVar9,p_Var5,p_Var6,(_Rb_tree_node_base *)local_70);
local_50 = local_50 + 1;
}
pvVar4 = local_68;
puVar8 = puVar8 + 1;
} while (puVar2 != puVar8);
iVar7 = 1;
for (p_Var6 = local_60; p_Var6 != (_Rb_tree_node_base *)local_70;
p_Var6 = (_Rb_tree_node_base *)std::_Rb_tree_increment(p_Var6)) {
iVar7 = iVar7 * *(int *)(p_Var6 + 0x20);
}
while (pvVar4 != (void *)0x0) {
std::_Rb_tree<int,int,std::_Identity<int>,std::less<int>,std::allocator<int>>::_M_erase
(*(_Rb_tree_node **)((long)pvVar4 + 0x18));
pvVar3 = *(void **)((long)pvVar4 + 0x10);
operator_delete(pvVar4,0x28);
pvVar4 = pvVar3;
}
}
if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return iVar7;
} |
2,291 | func0 |
#include <vector>
#include <set>
#include <assert.h>
| int func0(const std::vector<int>& list_data) {
std::set<int> unique_elements(list_data.begin(), list_data.end());
int product = 1;
for (int element : unique_elements) {
product *= element;
}
return product;
}
| int main() {
assert(func0({10, 20, 30, 40, 20, 50, 60, 40}) == 720000000);
assert(func0({1, 2, 3, 1}) == 6);
assert(func0({7, 8, 9, 0, 1, 1}) == 0);
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x40,%rsp
mov 0x8(%rdi),%r14
mov (%rdi),%rbx
mov %fs:0x28,%rax
mov %rax,0x38(%rsp)
xor %eax,%eax
lea 0x8(%rsp),%rbp
movl $0x0,0x8(%rsp)
movq $0x0,0x10(%rsp)
mov %rbp,0x18(%rsp)
mov %rbp,0x20(%rsp)
movq $0x0,0x28(%rsp)
cmp %rbx,%r14
je 1610 <_Z5func0RKSt6vectorIiSaIiEE+0x1c0>
xor %r13d,%r13d
nopl 0x0(%rax)
test %r13,%r13
je 14c3 <_Z5func0RKSt6vectorIiSaIiEE+0x73>
mov 0x20(%rsp),%r12
mov (%rbx),%eax
cmp %eax,0x20(%r12)
jl 150b <_Z5func0RKSt6vectorIiSaIiEE+0xbb>
mov 0x10(%rsp),%r12
test %r12,%r12
je 15e0 <_Z5func0RKSt6vectorIiSaIiEE+0x190>
mov (%rbx),%esi
jmp 14ea <_Z5func0RKSt6vectorIiSaIiEE+0x9a>
nopl (%rax)
mov 0x10(%r12),%rax
mov $0x1,%ecx
test %rax,%rax
je 14ff <_Z5func0RKSt6vectorIiSaIiEE+0xaf>
mov %rax,%r12
mov 0x20(%r12),%edx
cmp %edx,%esi
jl 14d8 <_Z5func0RKSt6vectorIiSaIiEE+0x88>
mov 0x18(%r12),%rax
xor %ecx,%ecx
test %rax,%rax
jne 14e7 <_Z5func0RKSt6vectorIiSaIiEE+0x97>
test %cl,%cl
jne 15e3 <_Z5func0RKSt6vectorIiSaIiEE+0x193>
cmp %edx,%esi
jle 1549 <_Z5func0RKSt6vectorIiSaIiEE+0xf9>
mov $0x1,%r13d
cmp %rbp,%r12
jne 15d0 <_Z5func0RKSt6vectorIiSaIiEE+0x180>
mov $0x28,%edi
callq 1130 <_Znwm@plt>
mov %rax,%rsi
mov (%rbx),%eax
movzbl %r13b,%edi
mov %rbp,%rcx
mov %r12,%rdx
mov %eax,0x20(%rsi)
callq 10e0 <_ZSt29_Rb_tree_insert_and_rebalancebPSt18_Rb_tree_node_baseS0_RS_@plt>
mov 0x28(%rsp),%rax
lea 0x1(%rax),%r13
mov %r13,0x28(%rsp)
add $0x4,%rbx
cmp %rbx,%r14
jne 14b0 <_Z5func0RKSt6vectorIiSaIiEE+0x60>
mov 0x18(%rsp),%rdi
mov 0x10(%rsp),%rbx
mov $0x1,%r12d
cmp %rbp,%rdi
je 1582 <_Z5func0RKSt6vectorIiSaIiEE+0x132>
nopl 0x0(%rax,%rax,1)
imul 0x20(%rdi),%r12d
callq 1160 <_ZSt18_Rb_tree_incrementPKSt18_Rb_tree_node_base@plt>
mov %rax,%rdi
cmp %rbp,%rax
jne 1570 <_Z5func0RKSt6vectorIiSaIiEE+0x120>
mov %rsp,%rbp
test %rbx,%rbx
je 15a7 <_Z5func0RKSt6vectorIiSaIiEE+0x157>
mov 0x18(%rbx),%rsi
mov %rbp,%rdi
callq 16e0 <_ZNSt8_Rb_treeIiiSt9_IdentityIiESt4lessIiESaIiEE8_M_eraseEPSt13_Rb_tree_nodeIiE>
mov %rbx,%rdi
mov 0x10(%rbx),%rbx
callq 1120 <_ZdlPv@plt>
test %rbx,%rbx
jne 158a <_Z5func0RKSt6vectorIiSaIiEE+0x13a>
mov 0x38(%rsp),%rax
xor %fs:0x28,%rax
jne 1618 <_Z5func0RKSt6vectorIiSaIiEE+0x1c8>
add $0x40,%rsp
mov %r12d,%eax
pop %rbx
pop %rbp
pop %r12
pop %r13
pop %r14
retq
nopw 0x0(%rax,%rax,1)
mov 0x20(%r12),%eax
cmp %eax,(%rbx)
setl %r13b
jmpq 151a <_Z5func0RKSt6vectorIiSaIiEE+0xca>
mov %rbp,%r12
cmp %r12,0x18(%rsp)
je 150b <_Z5func0RKSt6vectorIiSaIiEE+0xbb>
mov %r12,%rdi
callq 1140 <_ZSt18_Rb_tree_decrementPSt18_Rb_tree_node_base@plt>
mov (%rbx),%ecx
cmp %ecx,0x20(%rax)
jge 1549 <_Z5func0RKSt6vectorIiSaIiEE+0xf9>
jmpq 150b <_Z5func0RKSt6vectorIiSaIiEE+0xbb>
nopw %cs:0x0(%rax,%rax,1)
mov $0x1,%r12d
jmp 15a7 <_Z5func0RKSt6vectorIiSaIiEE+0x157>
callq 1150 <__stack_chk_fail@plt>
endbr64
mov %rax,%rbp
jmpq 1180 <_Z5func0RKSt6vectorIiSaIiEE.cold>
nopl 0x0(%rax)
| _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 48h
mov r13, [rdi+8]
mov r12, [rdi]
mov rax, fs:28h
mov [rsp+78h+var_40], rax
xor eax, eax
lea rbp, [rsp+78h+var_70]
mov [rsp+78h+var_70], 0
mov [rsp+78h+var_68], 0
mov [rsp+78h+var_60], rbp
mov [rsp+78h+var_58], rbp
mov [rsp+78h+var_50], 0
cmp r12, r13
jz loc_17F5
xor r14d, r14d
xchg ax, ax
loc_1680:
mov r15d, [r12]
test r14, r14
jz loc_1760
mov rbx, [rsp+78h+var_58]
cmp r15d, [rbx+20h]
jle loc_1760
loc_169C:
mov r14d, 1
cmp rbx, rbp
jnz loc_17B0
loc_16AB:
mov edi, 28h ; '('; unsigned __int64
call __Znwm; operator new(ulong)
mov rsi, rax
mov eax, [r12]
movzx edi, r14b
mov rcx, rbp
mov rdx, rbx
mov [rsi+20h], eax
call __ZSt29_Rb_tree_insert_and_rebalancebPSt18_Rb_tree_node_baseS0_RS_; std::_Rb_tree_insert_and_rebalance(bool,std::_Rb_tree_node_base *,std::_Rb_tree_node_base *,std::_Rb_tree_node_base&)
mov rax, [rsp+78h+var_50]
lea r14, [rax+1]
mov [rsp+78h+var_50], r14
loc_16DC:
add r12, 4
cmp r13, r12
jnz short loc_1680
mov rdi, [rsp+78h+var_60]
mov rbx, [rsp+78h+var_68]
mov r12d, 1
cmp rdi, rbp
jz short loc_1731
nop word ptr [rax+rax+00h]
loc_1700:
imul r12d, [rdi+20h]
call __ZSt18_Rb_tree_incrementPKSt18_Rb_tree_node_base; std::_Rb_tree_increment(std::_Rb_tree_node_base const*)
mov rdi, rax
cmp rax, rbp
jnz short loc_1700
test rbx, rbx
jz short loc_1736
loc_1717:
mov rdi, [rbx+18h]
call _ZNSt8_Rb_treeIiiSt9_IdentityIiESt4lessIiESaIiEE8_M_eraseEPSt13_Rb_tree_nodeIiE_isra_0; std::_Rb_tree<int,int,std::_Identity<int>,std::less<int>,std::allocator<int>>::_M_erase(std::_Rb_tree_node<int> *) [clone]
mov rdi, rbx; void *
mov esi, 28h ; '('; unsigned __int64
mov rbx, [rbx+10h]
call __ZdlPvm; operator delete(void *,ulong)
loc_1731:
test rbx, rbx
jnz short loc_1717
loc_1736:
mov rax, [rsp+78h+var_40]
sub rax, fs:28h
jnz loc_1800
add rsp, 48h
mov eax, r12d
pop rbx
pop rbp
pop r12
pop r13
pop r14
pop r15
retn
loc_1760:
mov rbx, [rsp+78h+var_68]
test rbx, rbx
jnz short loc_1773
jmp short loc_17E0
loc_1770:
mov rbx, rax
loc_1773:
mov edx, [rbx+20h]
mov rax, [rbx+18h]
cmp r15d, edx
cmovl rax, [rbx+10h]
setl cl
test rax, rax
jnz short loc_1770
test cl, cl
jnz short loc_17C0
loc_178E:
cmp edx, r15d
jge loc_16DC
mov r14d, 1
cmp rbx, rbp
jz loc_16AB
nop word ptr [rax+rax+00000000h]
loc_17B0:
cmp r15d, [rbx+20h]
setl r14b
jmp loc_16AB
loc_17C0:
cmp [rsp+78h+var_60], rbx
jz loc_169C
loc_17CB:
mov rdi, rbx
call __ZSt18_Rb_tree_decrementPSt18_Rb_tree_node_base; std::_Rb_tree_decrement(std::_Rb_tree_node_base *)
mov edx, [rax+20h]
jmp short loc_178E
loc_17E0:
mov rbx, rbp
cmp [rsp+78h+var_60], rbp
jnz short loc_17CB
mov r14d, 1
jmp loc_16AB
loc_17F5:
mov r12d, 1
jmp loc_1736
loc_1800:
call ___stack_chk_fail
endbr64
mov rbx, rax
jmp _Z5func0RKSt6vectorIiSaIiEE_cold; func0(std::vector<int> const&) [clone] | long long func0(int **a1)
{
int *v1; // r13
int *v2; // r12
long long v3; // r14
int v4; // r15d
int *v5; // rbx
bool v6; // r14
long long v7; // rax
int *v8; // rdi
_QWORD *v9; // rbx
unsigned int v10; // r12d
void *v11; // rdi
int v13; // edx
int *v14; // rax
int v15; // [rsp+8h] [rbp-70h] BYREF
void *v16; // [rsp+10h] [rbp-68h]
int *v17; // [rsp+18h] [rbp-60h]
int *v18; // [rsp+20h] [rbp-58h]
long long v19; // [rsp+28h] [rbp-50h]
unsigned long long v20; // [rsp+38h] [rbp-40h]
v1 = a1[1];
v2 = *a1;
v20 = __readfsqword(0x28u);
v15 = 0;
v16 = 0LL;
v17 = &v15;
v18 = &v15;
v19 = 0LL;
if ( v2 == v1 )
return 1;
v3 = 0LL;
do
{
v4 = *v2;
if ( v3 )
{
v5 = v18;
if ( v4 > v18[8] )
{
LABEL_5:
v6 = 1;
if ( v5 != &v15 )
goto LABEL_23;
goto LABEL_6;
}
}
v5 = (int *)v16;
if ( !v16 )
{
v5 = &v15;
if ( v17 == &v15 )
{
v6 = 1;
goto LABEL_6;
}
goto LABEL_25;
}
while ( 1 )
{
v13 = v5[8];
v14 = (int *)*((_QWORD *)v5 + 3);
if ( v4 < v13 )
v14 = (int *)*((_QWORD *)v5 + 2);
if ( !v14 )
break;
v5 = v14;
}
if ( v4 < v13 )
{
if ( v17 == v5 )
goto LABEL_5;
LABEL_25:
v13 = *(_DWORD *)(std::_Rb_tree_decrement(v5) + 32);
}
if ( v13 < v4 )
{
v6 = 1;
if ( v5 != &v15 )
LABEL_23:
v6 = v4 < v5[8];
LABEL_6:
v7 = operator new(0x28uLL);
*(_DWORD *)(v7 + 32) = *v2;
std::_Rb_tree_insert_and_rebalance(v6, v7, v5, &v15);
v3 = ++v19;
}
++v2;
}
while ( v1 != v2 );
v8 = v17;
v9 = v16;
v10 = 1;
if ( v17 == &v15 )
goto LABEL_12;
do
{
v10 *= v8[8];
v8 = (int *)std::_Rb_tree_increment();
}
while ( v8 != &v15 );
while ( v9 )
{
std::_Rb_tree<int,int,std::_Identity<int>,std::less<int>,std::allocator<int>>::_M_erase(v9[3]);
v11 = v9;
v9 = (_QWORD *)v9[2];
operator delete(v11, 0x28uLL);
LABEL_12:
;
}
return v10;
} | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x48
MOV R13,qword ptr [RDI + 0x8]
MOV R12,qword ptr [RDI]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
LEA RBP,[RSP + 0x8]
MOV dword ptr [RSP + 0x8],0x0
MOV qword ptr [RSP + 0x10],0x0
MOV qword ptr [RSP + 0x18],RBP
MOV qword ptr [RSP + 0x20],RBP
MOV qword ptr [RSP + 0x28],0x0
CMP R12,R13
JZ 0x001017f5
XOR R14D,R14D
NOP
LAB_00101680:
MOV R15D,dword ptr [R12]
TEST R14,R14
JZ 0x00101760
MOV RBX,qword ptr [RSP + 0x20]
CMP R15D,dword ptr [RBX + 0x20]
JLE 0x00101760
LAB_0010169c:
MOV R14D,0x1
CMP RBX,RBP
JNZ 0x001017b0
LAB_001016ab:
MOV EDI,0x28
LAB_001016b0:
CALL 0x00101120
MOV RSI,RAX
MOV EAX,dword ptr [R12]
MOVZX EDI,R14B
MOV RCX,RBP
MOV RDX,RBX
MOV dword ptr [RSI + 0x20],EAX
CALL 0x001010e0
MOV RAX,qword ptr [RSP + 0x28]
LEA R14,[RAX + 0x1]
MOV qword ptr [RSP + 0x28],R14
LAB_001016dc:
ADD R12,0x4
CMP R13,R12
JNZ 0x00101680
MOV RDI,qword ptr [RSP + 0x18]
MOV RBX,qword ptr [RSP + 0x10]
MOV R12D,0x1
CMP RDI,RBP
JZ 0x00101731
NOP word ptr [RAX + RAX*0x1]
LAB_00101700:
IMUL R12D,dword ptr [RDI + 0x20]
CALL 0x00101160
MOV RDI,RAX
CMP RAX,RBP
JNZ 0x00101700
TEST RBX,RBX
JZ 0x00101736
LAB_00101717:
MOV RDI,qword ptr [RBX + 0x18]
CALL 0x00101450
MOV RDI,RBX
MOV ESI,0x28
MOV RBX,qword ptr [RBX + 0x10]
CALL 0x00101130
LAB_00101731:
TEST RBX,RBX
JNZ 0x00101717
LAB_00101736:
MOV RAX,qword ptr [RSP + 0x38]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x00101800
ADD RSP,0x48
MOV EAX,R12D
POP RBX
POP RBP
POP R12
POP R13
POP R14
POP R15
RET
LAB_00101760:
MOV RBX,qword ptr [RSP + 0x10]
TEST RBX,RBX
JNZ 0x00101773
JMP 0x001017e0
LAB_00101770:
MOV RBX,RAX
LAB_00101773:
MOV EDX,dword ptr [RBX + 0x20]
MOV RAX,qword ptr [RBX + 0x18]
CMP R15D,EDX
CMOVL RAX,qword ptr [RBX + 0x10]
SETL CL
TEST RAX,RAX
JNZ 0x00101770
TEST CL,CL
JNZ 0x001017c0
LAB_0010178e:
CMP EDX,R15D
JGE 0x001016dc
MOV R14D,0x1
CMP RBX,RBP
JZ 0x001016ab
NOP word ptr CS:[RAX + RAX*0x1]
LAB_001017b0:
CMP R15D,dword ptr [RBX + 0x20]
SETL R14B
JMP 0x001016ab
LAB_001017c0:
CMP qword ptr [RSP + 0x18],RBX
JZ 0x0010169c
LAB_001017cb:
MOV RDI,RBX
CALL 0x00101140
MOV EDX,dword ptr [RAX + 0x20]
JMP 0x0010178e
LAB_001017e0:
MOV RBX,RBP
CMP qword ptr [RSP + 0x18],RBP
JNZ 0x001017cb
MOV R14D,0x1
JMP 0x001016ab
LAB_001017f5:
MOV R12D,0x1
JMP 0x00101736
LAB_00101800:
CALL 0x00101150 | /* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
int *piVar1;
_Rb_tree_node_base *p_Var2;
long lVar3;
int iVar4;
_Rb_tree_node_base *p_Var5;
int iVar6;
int *piVar7;
bool bVar8;
long lVar9;
long in_FS_OFFSET;
int4 local_70 [2];
_Rb_tree_node_base *local_68;
_Rb_tree_node_base *local_60;
_Rb_tree_node_base *local_58;
long local_50;
long local_40;
piVar1 = *(int **)(param_1 + 8);
piVar7 = *(int **)param_1;
local_40 = *(long *)(in_FS_OFFSET + 0x28);
local_70[0] = 0;
local_68 = (_Rb_tree_node_base *)0x0;
local_50 = 0;
local_60 = (_Rb_tree_node_base *)local_70;
local_58 = (_Rb_tree_node_base *)local_70;
if (piVar7 == piVar1) {
iVar6 = 1;
}
else {
lVar9 = 0;
do {
iVar6 = *piVar7;
if ((lVar9 == 0) || (p_Var5 = local_58, iVar6 <= *(int *)(local_58 + 0x20))) {
p_Var2 = local_68;
if (local_68 != (_Rb_tree_node_base *)0x0) {
do {
p_Var5 = p_Var2;
iVar4 = *(int *)(p_Var5 + 0x20);
p_Var2 = *(_Rb_tree_node_base **)(p_Var5 + 0x18);
if (iVar6 < iVar4) {
p_Var2 = *(_Rb_tree_node_base **)(p_Var5 + 0x10);
}
} while (p_Var2 != (_Rb_tree_node_base *)0x0);
if (iVar4 <= iVar6) goto LAB_0010178e;
if (local_60 != p_Var5) goto LAB_001017cb;
goto LAB_0010169c;
}
p_Var5 = (_Rb_tree_node_base *)local_70;
if (local_60 == (_Rb_tree_node_base *)local_70) {
bVar8 = true;
goto LAB_001016ab;
}
LAB_001017cb:
lVar3 = std::_Rb_tree_decrement(p_Var5);
iVar4 = *(int *)(lVar3 + 0x20);
LAB_0010178e:
if (iVar4 < iVar6) {
bVar8 = true;
if (p_Var5 == (_Rb_tree_node_base *)local_70) goto LAB_001016ab;
goto LAB_001017b0;
}
}
else {
LAB_0010169c:
bVar8 = true;
if (p_Var5 != (_Rb_tree_node_base *)local_70) {
LAB_001017b0:
bVar8 = iVar6 < *(int *)(p_Var5 + 0x20);
}
LAB_001016ab:
/* try { // try from 001016b0 to 001016b4 has its CatchHandler @ 00101805 */
p_Var2 = (_Rb_tree_node_base *)operator_new(0x28);
*(int *)(p_Var2 + 0x20) = *piVar7;
std::_Rb_tree_insert_and_rebalance(bVar8,p_Var2,p_Var5,(_Rb_tree_node_base *)local_70);
lVar9 = local_50 + 1;
local_50 = lVar9;
}
p_Var5 = local_68;
piVar7 = piVar7 + 1;
} while (piVar1 != piVar7);
iVar6 = 1;
for (p_Var2 = local_60; p_Var2 != (_Rb_tree_node_base *)local_70;
p_Var2 = (_Rb_tree_node_base *)std::_Rb_tree_increment(p_Var2)) {
iVar6 = iVar6 * *(int *)(p_Var2 + 0x20);
}
while (p_Var5 != (_Rb_tree_node_base *)0x0) {
std::_Rb_tree<int,int,std::_Identity<int>,std::less<int>,std::allocator<int>>::_M_erase
(*(_Rb_tree_node **)(p_Var5 + 0x18));
p_Var2 = *(_Rb_tree_node_base **)(p_Var5 + 0x10);
operator_delete(p_Var5,0x28);
p_Var5 = p_Var2;
}
}
if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return iVar6;
} |
2,292 | func0 |
#include <cassert>
| double func0(double r, double h) {
double surfacearea = (2 * 3.1415 * r * r) + (2 * 3.1415 * r * h);
return surfacearea;
}
| int main() {
assert(func0(10, 5) == 942.45);
assert(func0(4, 5) == 226.18800000000002);
assert(func0(4, 10) == 351.848);
return 0;
}
| O0 | cpp | func0(double, double):
endbr64
push %rbp
mov %rsp,%rbp
movsd %xmm0,-0x18(%rbp)
movsd %xmm1,-0x20(%rbp)
movsd -0x18(%rbp),%xmm1
movsd 0xf50(%rip),%xmm0
mulsd %xmm1,%xmm0
movapd %xmm0,%xmm1
mulsd -0x18(%rbp),%xmm1
movsd -0x18(%rbp),%xmm2
movsd 0xf36(%rip),%xmm0
mulsd %xmm2,%xmm0
mulsd -0x20(%rbp),%xmm0
addsd %xmm1,%xmm0
movsd %xmm0,-0x8(%rbp)
movsd -0x8(%rbp),%xmm0
pop %rbp
retq
| _Z5func0dd:
endbr64
push rbp
mov rbp, rsp
movsd [rbp+var_18], xmm0
movsd [rbp+var_20], xmm1
movsd xmm1, [rbp+var_18]
movsd xmm0, cs:qword_2090
mulsd xmm0, xmm1
movapd xmm1, xmm0
mulsd xmm1, [rbp+var_18]
movsd xmm2, [rbp+var_18]
movsd xmm0, cs:qword_2090
mulsd xmm0, xmm2
mulsd xmm0, [rbp+var_20]
addsd xmm0, xmm1
movsd [rbp+var_8], xmm0
movsd xmm0, [rbp+var_8]
pop rbp
retn | double func0(double a1, double a2)
{
return 6.283 * a1 * a2 + 6.283 * a1 * a1;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOVSD qword ptr [RBP + -0x18],XMM0
MOVSD qword ptr [RBP + -0x20],XMM1
MOVSD XMM1,qword ptr [RBP + -0x18]
MOVSD XMM0,qword ptr [0x00102090]
MULSD XMM0,XMM1
MOVAPD XMM1,XMM0
MULSD XMM1,qword ptr [RBP + -0x18]
MOVSD XMM2,qword ptr [RBP + -0x18]
MOVSD XMM0,qword ptr [0x00102090]
MULSD XMM0,XMM2
MULSD XMM0,qword ptr [RBP + -0x20]
ADDSD XMM0,XMM1
MOVSD qword ptr [RBP + -0x8],XMM0
MOVSD XMM0,qword ptr [RBP + -0x8]
POP RBP
RET | /* func0(double, double) */
double func0(double param_1,double param_2)
{
return DAT_00102090 * param_1 * param_2 + DAT_00102090 * param_1 * param_1;
} |
2,293 | func0 |
#include <cassert>
| double func0(double r, double h) {
double surfacearea = (2 * 3.1415 * r * r) + (2 * 3.1415 * r * h);
return surfacearea;
}
| int main() {
assert(func0(10, 5) == 942.45);
assert(func0(4, 5) == 226.18800000000002);
assert(func0(4, 10) == 351.848);
return 0;
}
| O1 | cpp | func0(double, double):
endbr64
movapd %xmm0,%xmm2
mulsd 0xecf(%rip),%xmm2
mulsd %xmm2,%xmm0
mulsd %xmm1,%xmm2
addsd %xmm2,%xmm0
retq
| _Z5func0dd:
endbr64
movapd xmm2, xmm0
mulsd xmm2, cs:qword_2008
mulsd xmm0, xmm2
mulsd xmm2, xmm1
addsd xmm0, xmm2
retn | double func0(double a1, double a2)
{
return a1 * (a1 * 6.283) + a1 * 6.283 * a2;
} | func0:
ENDBR64
MOVAPD XMM2,XMM0
MULSD XMM2,qword ptr [0x00102008]
MULSD XMM0,XMM2
MULSD XMM2,XMM1
ADDSD XMM0,XMM2
RET | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(double, double) */
double func0(double param_1,double param_2)
{
return param_1 * param_1 * _DAT_00102008 + param_1 * _DAT_00102008 * param_2;
} |
2,294 | func0 |
#include <cassert>
| double func0(double r, double h) {
double surfacearea = (2 * 3.1415 * r * r) + (2 * 3.1415 * r * h);
return surfacearea;
}
| int main() {
assert(func0(10, 5) == 942.45);
assert(func0(4, 5) == 226.18800000000002);
assert(func0(4, 10) == 351.848);
return 0;
}
| O2 | cpp | func0(double, double):
endbr64
movsd 0xebc(%rip),%xmm2
mulsd %xmm0,%xmm2
mulsd %xmm2,%xmm0
mulsd %xmm1,%xmm2
addsd %xmm2,%xmm0
retq
nopl (%rax)
| _Z5func0dd:
endbr64
movsd xmm2, cs:qword_2008
mulsd xmm2, xmm0
mulsd xmm0, xmm2
mulsd xmm2, xmm1
addsd xmm0, xmm2
retn | double func0(double a1, double a2)
{
return a1 * (6.283 * a1) + 6.283 * a1 * a2;
} | func0:
ENDBR64
MOVSD XMM2,qword ptr [0x00102008]
MULSD XMM2,XMM0
MULSD XMM0,XMM2
MULSD XMM2,XMM1
ADDSD XMM0,XMM2
RET | /* func0(double, double) */
double func0(double param_1,double param_2)
{
return param_1 * DAT_00102008 * param_1 + DAT_00102008 * param_1 * param_2;
} |
2,295 | func0 |
#include <cassert>
| double func0(double r, double h) {
double surfacearea = (2 * 3.1415 * r * r) + (2 * 3.1415 * r * h);
return surfacearea;
}
| int main() {
assert(func0(10, 5) == 942.45);
assert(func0(4, 5) == 226.18800000000002);
assert(func0(4, 10) == 351.848);
return 0;
}
| O3 | cpp | func0(double, double):
endbr64
movsd 0xebc(%rip),%xmm2
mulsd %xmm0,%xmm2
mulsd %xmm2,%xmm0
mulsd %xmm1,%xmm2
addsd %xmm2,%xmm0
retq
nopl (%rax)
| _Z5func0dd:
endbr64
movsd xmm2, cs:qword_2008
mulsd xmm2, xmm0
mulsd xmm0, xmm2
mulsd xmm2, xmm1
addsd xmm0, xmm2
retn | double func0(double a1, double a2)
{
return a1 * (6.283 * a1) + 6.283 * a1 * a2;
} | func0:
ENDBR64
MOVSD XMM2,qword ptr [0x00102008]
MULSD XMM2,XMM0
MULSD XMM0,XMM2
MULSD XMM2,XMM1
ADDSD XMM0,XMM2
RET | /* func0(double, double) */
double func0(double param_1,double param_2)
{
return param_1 * DAT_00102008 * param_1 + DAT_00102008 * param_1 * param_2;
} |
2,296 | func0 | #include <iostream>
#include <assert.h>
| int func0(int A, int N, int L, int R) {
int count = 0;
int i;
for (i = L; i <= R; i++) {
if (i % A != 0) {
count++;
}
if (count == N) {
break;
}
}
return i;
}
| int main() {
assert(func0(2, 3, 1, 10) == 5);
assert(func0(3, 6, 4, 20) == 11);
assert(func0(5, 10, 4, 20) == 16);
return 0;
}
| O0 | cpp | func0(int, int, int, int):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
mov %esi,-0x18(%rbp)
mov %edx,-0x1c(%rbp)
mov %ecx,-0x20(%rbp)
movl $0x0,-0x8(%rbp)
mov -0x1c(%rbp),%eax
mov %eax,-0x4(%rbp)
mov -0x4(%rbp),%eax
cmp -0x20(%rbp),%eax
jg 11d2 <_Z5func0iiii+0x49>
mov -0x4(%rbp),%eax
cltd
idivl -0x14(%rbp)
mov %edx,%eax
test %eax,%eax
je 11c3 <_Z5func0iiii+0x3a>
addl $0x1,-0x8(%rbp)
mov -0x8(%rbp),%eax
cmp -0x18(%rbp),%eax
je 11d1 <_Z5func0iiii+0x48>
addl $0x1,-0x4(%rbp)
jmp 11aa <_Z5func0iiii+0x21>
mov -0x4(%rbp),%eax
pop %rbp
retq
| _Z5func0iiii:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_14], edi
mov [rbp+var_18], esi
mov [rbp+var_1C], edx
mov [rbp+var_20], ecx
mov [rbp+var_8], 0
mov eax, [rbp+var_1C]
mov [rbp+var_4], eax
jmp short loc_1189
loc_116C:
mov eax, [rbp+var_4]
cdq
idiv [rbp+var_14]
mov eax, edx
test eax, eax
jz short loc_117D
add [rbp+var_8], 1
loc_117D:
mov eax, [rbp+var_8]
cmp eax, [rbp+var_18]
jz short loc_1193
add [rbp+var_4], 1
loc_1189:
mov eax, [rbp+var_4]
cmp eax, [rbp+var_20]
jle short loc_116C
jmp short loc_1194
loc_1193:
nop
loc_1194:
mov eax, [rbp+var_4]
pop rbp
retn | long long func0(int a1, int a2, signed int a3, signed int a4)
{
int v5; // [rsp+18h] [rbp-8h]
v5 = 0;
while ( a3 <= a4 )
{
if ( a3 % a1 )
++v5;
if ( v5 == a2 )
break;
++a3;
}
return (unsigned int)a3;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x14],EDI
MOV dword ptr [RBP + -0x18],ESI
MOV dword ptr [RBP + -0x1c],EDX
MOV dword ptr [RBP + -0x20],ECX
MOV dword ptr [RBP + -0x8],0x0
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00101189
LAB_0010116c:
MOV EAX,dword ptr [RBP + -0x4]
CDQ
IDIV dword ptr [RBP + -0x14]
MOV EAX,EDX
TEST EAX,EAX
JZ 0x0010117d
ADD dword ptr [RBP + -0x8],0x1
LAB_0010117d:
MOV EAX,dword ptr [RBP + -0x8]
CMP EAX,dword ptr [RBP + -0x18]
JZ 0x00101193
ADD dword ptr [RBP + -0x4],0x1
LAB_00101189:
MOV EAX,dword ptr [RBP + -0x4]
CMP EAX,dword ptr [RBP + -0x20]
JLE 0x0010116c
JMP 0x00101194
LAB_00101193:
NOP
LAB_00101194:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET | /* func0(int, int, int, int) */
int func0(int param_1,int param_2,int param_3,int param_4)
{
int local_10;
int local_c;
local_10 = 0;
local_c = param_3;
while( true ) {
if (param_4 < local_c) {
return local_c;
}
if (local_c % param_1 != 0) {
local_10 = local_10 + 1;
}
if (local_10 == param_2) break;
local_c = local_c + 1;
}
return local_c;
} |
2,297 | func0 | #include <iostream>
#include <assert.h>
| int func0(int A, int N, int L, int R) {
int count = 0;
int i;
for (i = L; i <= R; i++) {
if (i % A != 0) {
count++;
}
if (count == N) {
break;
}
}
return i;
}
| int main() {
assert(func0(2, 3, 1, 10) == 5);
assert(func0(3, 6, 4, 20) == 11);
assert(func0(5, 10, 4, 20) == 16);
return 0;
}
| O1 | cpp | func0(int, int, int, int):
endbr64
mov %edx,%r8d
cmp %ecx,%edx
jg 11b9 <_Z5func0iiii+0x30>
mov $0x0,%r9d
mov %r8d,%eax
cltd
idiv %edi
cmp $0x1,%edx
sbb $0xffffffff,%r9d
cmp %esi,%r9d
je 11bc <_Z5func0iiii+0x33>
add $0x1,%r8d
cmp %r8d,%ecx
jge 119a <_Z5func0iiii+0x11>
mov %r8d,%eax
retq
mov %edx,%eax
retq
mov %r8d,%eax
retq
| _Z5func0iiii:
endbr64
mov r8d, edx
cmp edx, ecx
jg short loc_1179
mov r9d, 0
loc_115A:
mov eax, r8d
cdq
idiv edi
cmp edx, 1
sbb r9d, 0FFFFFFFFh
cmp r9d, esi
jz short loc_117C
add r8d, 1
cmp ecx, r8d
jge short loc_115A
mov eax, r8d
retn
loc_1179:
mov eax, edx
retn
loc_117C:
mov eax, r8d
retn | long long func0(int a1, int a2, unsigned int a3, int a4)
{
unsigned int v4; // r8d
int v5; // r9d
v4 = a3;
if ( (int)a3 > a4 )
return a3;
v5 = 0;
while ( 1 )
{
v5 -= ((int)v4 % a1 == 0) - 1;
if ( v5 == a2 )
break;
if ( a4 < (int)++v4 )
return v4;
}
return v4;
} | func0:
ENDBR64
MOV R8D,EDX
CMP EDX,ECX
JG 0x00101179
MOV R9D,0x0
LAB_0010115a:
MOV EAX,R8D
CDQ
IDIV EDI
CMP EDX,0x1
SBB R9D,-0x1
CMP R9D,ESI
JZ 0x0010117c
ADD R8D,0x1
CMP ECX,R8D
JGE 0x0010115a
MOV EAX,R8D
RET
LAB_00101179:
MOV EAX,EDX
RET
LAB_0010117c:
MOV EAX,R8D
RET | /* func0(int, int, int, int) */
int func0(int param_1,int param_2,int param_3,int param_4)
{
int iVar1;
if (param_4 < param_3) {
return param_3;
}
iVar1 = 0;
do {
iVar1 = (iVar1 + 1) - (uint)(param_3 % param_1 == 0);
if (iVar1 == param_2) {
return param_3;
}
param_3 = param_3 + 1;
} while (param_3 <= param_4);
return param_3;
} |
2,298 | func0 | #include <iostream>
#include <assert.h>
| int func0(int A, int N, int L, int R) {
int count = 0;
int i;
for (i = L; i <= R; i++) {
if (i % A != 0) {
count++;
}
if (count == N) {
break;
}
}
return i;
}
| int main() {
assert(func0(2, 3, 1, 10) == 5);
assert(func0(3, 6, 4, 20) == 11);
assert(func0(5, 10, 4, 20) == 16);
return 0;
}
| O2 | cpp | func0(int, int, int, int):
endbr64
mov %edx,%r8d
cmp %ecx,%edx
jg 12fb <_Z5func0iiii+0x2b>
xor %r9d,%r9d
jmp 12e9 <_Z5func0iiii+0x19>
add $0x1,%r8d
cmp %r8d,%ecx
jl 12fb <_Z5func0iiii+0x2b>
mov %r8d,%eax
cltd
idiv %edi
cmp $0x1,%edx
sbb $0xffffffff,%r9d
cmp %esi,%r9d
jne 12e0 <_Z5func0iiii+0x10>
mov %r8d,%eax
retq
| _Z5func0iiii:
endbr64
mov r8d, edx
cmp edx, ecx
jg short loc_127B
xor r9d, r9d
jmp short loc_1269
loc_1260:
add r8d, 1
cmp ecx, r8d
jl short loc_127B
loc_1269:
mov eax, r8d
cdq
idiv edi
cmp edx, 1
sbb r9d, 0FFFFFFFFh
cmp r9d, esi
jnz short loc_1260
loc_127B:
mov eax, r8d
retn | long long func0(int a1, int a2, signed int a3, signed int a4)
{
signed int v4; // r8d
int v5; // r9d
v4 = a3;
if ( a3 <= a4 )
{
v5 = 0;
do
{
v5 -= (v4 % a1 == 0) - 1;
if ( v5 == a2 )
break;
++v4;
}
while ( a4 >= v4 );
}
return (unsigned int)v4;
} | func0:
ENDBR64
MOV R8D,EDX
CMP EDX,ECX
JG 0x0010127b
XOR R9D,R9D
JMP 0x00101269
LAB_00101260:
ADD R8D,0x1
CMP ECX,R8D
JL 0x0010127b
LAB_00101269:
MOV EAX,R8D
CDQ
IDIV EDI
CMP EDX,0x1
SBB R9D,-0x1
CMP R9D,ESI
JNZ 0x00101260
LAB_0010127b:
MOV EAX,R8D
RET | /* func0(int, int, int, int) */
int func0(int param_1,int param_2,int param_3,int param_4)
{
int iVar1;
if (param_3 <= param_4) {
iVar1 = 0;
do {
iVar1 = (iVar1 + 1) - (uint)(param_3 % param_1 == 0);
if (iVar1 == param_2) {
return param_3;
}
param_3 = param_3 + 1;
} while (param_3 <= param_4);
}
return param_3;
} |
2,299 | func0 | #include <iostream>
#include <assert.h>
| int func0(int A, int N, int L, int R) {
int count = 0;
int i;
for (i = L; i <= R; i++) {
if (i % A != 0) {
count++;
}
if (count == N) {
break;
}
}
return i;
}
| int main() {
assert(func0(2, 3, 1, 10) == 5);
assert(func0(3, 6, 4, 20) == 11);
assert(func0(5, 10, 4, 20) == 16);
return 0;
}
| O3 | cpp | func0(int, int, int, int):
endbr64
mov %edx,%r8d
cmp %ecx,%edx
jg 11eb <_Z5func0iiii+0x2b>
xor %r9d,%r9d
jmp 11d9 <_Z5func0iiii+0x19>
add $0x1,%r8d
cmp %r8d,%ecx
jl 11eb <_Z5func0iiii+0x2b>
mov %r8d,%eax
cltd
idiv %edi
cmp $0x1,%edx
sbb $0xffffffff,%r9d
cmp %esi,%r9d
jne 11d0 <_Z5func0iiii+0x10>
mov %r8d,%eax
retq
| _Z5func0iiii:
endbr64
mov r8d, edx
cmp edx, ecx
jg short loc_116B
xor r9d, r9d
jmp short loc_1159
loc_1150:
add r8d, 1
cmp ecx, r8d
jl short loc_116B
loc_1159:
mov eax, r8d
cdq
idiv edi
cmp edx, 1
sbb r9d, 0FFFFFFFFh
cmp r9d, esi
jnz short loc_1150
loc_116B:
mov eax, r8d
retn | long long func0(int a1, int a2, signed int a3, signed int a4)
{
signed int v4; // r8d
int v5; // r9d
v4 = a3;
if ( a3 <= a4 )
{
v5 = 0;
do
{
v5 -= (v4 % a1 == 0) - 1;
if ( v5 == a2 )
break;
++v4;
}
while ( a4 >= v4 );
}
return (unsigned int)v4;
} | func0:
ENDBR64
MOV R8D,EDX
CMP EDX,ECX
JG 0x0010116b
XOR R9D,R9D
JMP 0x00101159
LAB_00101150:
ADD R8D,0x1
CMP ECX,R8D
JL 0x0010116b
LAB_00101159:
MOV EAX,R8D
CDQ
IDIV EDI
CMP EDX,0x1
SBB R9D,-0x1
CMP R9D,ESI
JNZ 0x00101150
LAB_0010116b:
MOV EAX,R8D
RET | /* func0(int, int, int, int) */
int func0(int param_1,int param_2,int param_3,int param_4)
{
int iVar1;
if (param_3 <= param_4) {
iVar1 = 0;
do {
iVar1 = (iVar1 + 1) - (uint)(param_3 % param_1 == 0);
if (iVar1 == param_2) {
return param_3;
}
param_3 = param_3 + 1;
} while (param_3 <= param_4);
}
return param_3;
} |
2,300 | func0 |
#include <iostream>
#include <assert.h>
| bool func0(int A[], int B[], int n, int m) {
int i = 0, j = 0;
while (i < n && j < m) {
if (A[i] == B[j]) {
i++;
j++;
if (j == m) {
return true;
}
} else {
i = i - j + 1;
j = 0;
}
}
return false;
}
| int main() {
int A1[] = {1, 4, 3, 5};
int B1[] = {1, 2};
int A2[] = {1, 2, 1};
int B2[] = {1, 2, 1};
int A3[] = {1, 0, 2, 2};
int B3[] = {2, 2, 0};
assert(func0(A1, B1, 4, 2) == false);
assert(func0(A2, B2, 3, 3) == true);
assert(func0(A3, B3, 4, 3) == false);
return 0;
}
| O0 | cpp | func0(int*, int*, int, int):
endbr64
push %rbp
mov %rsp,%rbp
mov %rdi,-0x18(%rbp)
mov %rsi,-0x20(%rbp)
mov %edx,-0x24(%rbp)
mov %ecx,-0x28(%rbp)
movl $0x0,-0x8(%rbp)
movl $0x0,-0x4(%rbp)
mov -0x8(%rbp),%eax
cmp -0x24(%rbp),%eax
jge 1239 <_Z5func0PiS_ii+0x90>
mov -0x4(%rbp),%eax
cmp -0x28(%rbp),%eax
jge 1239 <_Z5func0PiS_ii+0x90>
mov -0x8(%rbp),%eax
cltq
lea 0x0(,%rax,4),%rdx
mov -0x18(%rbp),%rax
add %rdx,%rax
mov (%rax),%edx
mov -0x4(%rbp),%eax
cltq
lea 0x0(,%rax,4),%rcx
mov -0x20(%rbp),%rax
add %rcx,%rax
mov (%rax),%eax
cmp %eax,%edx
jne 1224 <_Z5func0PiS_ii+0x7b>
addl $0x1,-0x8(%rbp)
addl $0x1,-0x4(%rbp)
mov -0x4(%rbp),%eax
cmp -0x28(%rbp),%eax
jne 11cd <_Z5func0PiS_ii+0x24>
mov $0x1,%eax
jmp 123e <_Z5func0PiS_ii+0x95>
mov -0x8(%rbp),%eax
sub -0x4(%rbp),%eax
add $0x1,%eax
mov %eax,-0x8(%rbp)
movl $0x0,-0x4(%rbp)
jmp 11cd <_Z5func0PiS_ii+0x24>
mov $0x0,%eax
pop %rbp
retq
| _Z5func0PiS_ii:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_18], rdi
mov [rbp+var_20], rsi
mov [rbp+var_24], edx
mov [rbp+var_28], ecx
mov [rbp+var_8], 0
mov [rbp+var_4], 0
jmp short loc_11E9
loc_118F:
mov eax, [rbp+var_8]
cdqe
lea rdx, ds:0[rax*4]
mov rax, [rbp+var_18]
add rax, rdx
mov edx, [rax]
mov eax, [rbp+var_4]
cdqe
lea rcx, ds:0[rax*4]
mov rax, [rbp+var_20]
add rax, rcx
mov eax, [rax]
cmp edx, eax
jnz short loc_11D6
add [rbp+var_8], 1
add [rbp+var_4], 1
mov eax, [rbp+var_4]
cmp eax, [rbp+var_28]
jnz short loc_11E9
mov eax, 1
jmp short loc_11FE
loc_11D6:
mov eax, [rbp+var_8]
sub eax, [rbp+var_4]
add eax, 1
mov [rbp+var_8], eax
mov [rbp+var_4], 0
loc_11E9:
mov eax, [rbp+var_8]
cmp eax, [rbp+var_24]
jge short loc_11F9
mov eax, [rbp+var_4]
cmp eax, [rbp+var_28]
jl short loc_118F
loc_11F9:
mov eax, 0
loc_11FE:
pop rbp
retn | long long func0(int *a1, int *a2, int a3, int a4)
{
int v5; // [rsp+20h] [rbp-8h]
int v6; // [rsp+24h] [rbp-4h]
v5 = 0;
v6 = 0;
while ( v5 < a3 && v6 < a4 )
{
if ( a1[v5] == a2[v6] )
{
++v5;
if ( ++v6 == a4 )
return 1LL;
}
else
{
v5 = v5 - v6 + 1;
v6 = 0;
}
}
return 0LL;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x18],RDI
MOV qword ptr [RBP + -0x20],RSI
MOV dword ptr [RBP + -0x24],EDX
MOV dword ptr [RBP + -0x28],ECX
MOV dword ptr [RBP + -0x8],0x0
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001011e9
LAB_0010118f:
MOV EAX,dword ptr [RBP + -0x8]
CDQE
LEA RDX,[RAX*0x4]
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,RDX
MOV EDX,dword ptr [RAX]
MOV EAX,dword ptr [RBP + -0x4]
CDQE
LEA RCX,[RAX*0x4]
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,RCX
MOV EAX,dword ptr [RAX]
CMP EDX,EAX
JNZ 0x001011d6
ADD dword ptr [RBP + -0x8],0x1
ADD dword ptr [RBP + -0x4],0x1
MOV EAX,dword ptr [RBP + -0x4]
CMP EAX,dword ptr [RBP + -0x28]
JNZ 0x001011e9
MOV EAX,0x1
JMP 0x001011fe
LAB_001011d6:
MOV EAX,dword ptr [RBP + -0x8]
SUB EAX,dword ptr [RBP + -0x4]
ADD EAX,0x1
MOV dword ptr [RBP + -0x8],EAX
MOV dword ptr [RBP + -0x4],0x0
LAB_001011e9:
MOV EAX,dword ptr [RBP + -0x8]
CMP EAX,dword ptr [RBP + -0x24]
JGE 0x001011f9
MOV EAX,dword ptr [RBP + -0x4]
CMP EAX,dword ptr [RBP + -0x28]
JL 0x0010118f
LAB_001011f9:
MOV EAX,0x0
LAB_001011fe:
POP RBP
RET | /* func0(int*, int*, int, int) */
int8 func0(int *param_1,int *param_2,int param_3,int param_4)
{
int local_10;
int local_c;
local_10 = 0;
local_c = 0;
while ((local_10 < param_3 && (local_c < param_4))) {
if (param_1[local_10] == param_2[local_c]) {
local_10 = local_10 + 1;
local_c = local_c + 1;
if (local_c == param_4) {
return 1;
}
}
else {
local_10 = (local_10 - local_c) + 1;
local_c = 0;
}
}
return 0;
} |
2,301 | func0 |
#include <iostream>
#include <assert.h>
| bool func0(int A[], int B[], int n, int m) {
int i = 0, j = 0;
while (i < n && j < m) {
if (A[i] == B[j]) {
i++;
j++;
if (j == m) {
return true;
}
} else {
i = i - j + 1;
j = 0;
}
}
return false;
}
| int main() {
int A1[] = {1, 4, 3, 5};
int B1[] = {1, 2};
int A2[] = {1, 2, 1};
int B2[] = {1, 2, 1};
int A3[] = {1, 0, 2, 2};
int B3[] = {2, 2, 0};
assert(func0(A1, B1, 4, 2) == false);
assert(func0(A2, B2, 3, 3) == true);
assert(func0(A3, B3, 4, 3) == false);
return 0;
}
| O1 | cpp | func0(int*, int*, int, int):
endbr64
test %edx,%edx
setle %al
test %ecx,%ecx
setle %r11b
or %al,%r11b
jne 1205 <_Z5func0PiS_ii+0x5c>
mov $0x0,%r8d
mov $0x0,%eax
jmp 11df <_Z5func0PiS_ii+0x36>
sub %r8d,%eax
add $0x1,%eax
mov $0x0,%r8d
cmp %edx,%eax
jge 1201 <_Z5func0PiS_ii+0x58>
cmp %ecx,%r8d
jge 1201 <_Z5func0PiS_ii+0x58>
movslq %eax,%r9
movslq %r8d,%r10
mov (%rsi,%r10,4),%r10d
cmp %r10d,(%rdi,%r9,4)
jne 11ca <_Z5func0PiS_ii+0x21>
add $0x1,%eax
add $0x1,%r8d
cmp %r8d,%ecx
jne 11d6 <_Z5func0PiS_ii+0x2d>
mov $0x1,%r11d
mov %r11d,%eax
retq
mov $0x0,%r11d
jmp 1201 <_Z5func0PiS_ii+0x58>
| _Z5func0PiS_ii:
endbr64
mov r9, rdi
mov r10, rsi
mov r8d, edx
mov edi, ecx
test edx, edx
setnle al
test ecx, ecx
setnle dl
and al, dl
mov r11d, eax
jz short locret_11CF
mov ecx, 0
mov edx, 0
jmp short loc_11B0
loc_1195:
sub edx, ecx
add edx, 1
mov ecx, 0
loc_119F:
cmp edx, r8d
setl al
cmp ecx, edi
setl sil
and al, sil
jz short locret_11CE
loc_11B0:
movsxd rax, edx
movsxd rsi, ecx
mov esi, [r10+rsi*4]
cmp [r9+rax*4], esi
jnz short loc_1195
add edx, 1
add ecx, 1
cmp edi, ecx
jnz short loc_119F
mov eax, r11d
retn
locret_11CE:
retn
locret_11CF:
retn | bool func0(int *a1, int *a2, int a3, int a4)
{
bool result; // al
bool v8; // r11
int v9; // ecx
int v10; // edx
result = a4 > 0 && a3 > 0;
v8 = result;
if ( result )
{
v9 = 0;
v10 = 0;
do
{
if ( a1[v10] == a2[v9] )
{
++v10;
if ( a4 == ++v9 )
return v8;
}
else
{
v10 = v10 - v9 + 1;
v9 = 0;
}
result = v9 < a4 && v10 < a3;
}
while ( result );
}
return result;
} | func0:
ENDBR64
MOV R9,RDI
MOV R10,RSI
MOV R8D,EDX
MOV EDI,ECX
TEST EDX,EDX
SETG AL
TEST ECX,ECX
SETG DL
AND AL,DL
MOV R11D,EAX
JZ 0x001011cf
MOV ECX,0x0
MOV EDX,0x0
JMP 0x001011b0
LAB_00101195:
SUB EDX,ECX
ADD EDX,0x1
MOV ECX,0x0
LAB_0010119f:
CMP EDX,R8D
SETL AL
CMP ECX,EDI
SETL SIL
AND AL,SIL
JZ 0x001011ce
LAB_001011b0:
MOVSXD RAX,EDX
MOVSXD RSI,ECX
MOV ESI,dword ptr [R10 + RSI*0x4]
CMP dword ptr [R9 + RAX*0x4],ESI
JNZ 0x00101195
ADD EDX,0x1
ADD ECX,0x1
CMP EDI,ECX
JNZ 0x0010119f
MOV EAX,R11D
RET
LAB_001011ce:
RET
LAB_001011cf:
RET | /* func0(int*, int*, int, int) */
bool func0(int *param_1,int *param_2,int param_3,int param_4)
{
bool bVar1;
int iVar2;
int iVar3;
bVar1 = 0 < param_3 && 0 < param_4;
if (0 >= param_3 || 0 >= param_4) {
return bVar1;
}
iVar2 = 0;
iVar3 = 0;
do {
if (param_1[iVar3] == param_2[iVar2]) {
iVar2 = iVar2 + 1;
if (param_4 == iVar2) {
return bVar1;
}
}
else {
iVar3 = iVar3 - iVar2;
iVar2 = 0;
}
iVar3 = iVar3 + 1;
} while (iVar3 < param_3 && iVar2 < param_4);
return iVar3 < param_3 && iVar2 < param_4;
} |
2,302 | func0 |
#include <iostream>
#include <assert.h>
| bool func0(int A[], int B[], int n, int m) {
int i = 0, j = 0;
while (i < n && j < m) {
if (A[i] == B[j]) {
i++;
j++;
if (j == m) {
return true;
}
} else {
i = i - j + 1;
j = 0;
}
}
return false;
}
| int main() {
int A1[] = {1, 4, 3, 5};
int B1[] = {1, 2};
int A2[] = {1, 2, 1};
int B2[] = {1, 2, 1};
int A3[] = {1, 0, 2, 2};
int B3[] = {2, 2, 0};
assert(func0(A1, B1, 4, 2) == false);
assert(func0(A2, B2, 3, 3) == true);
assert(func0(A3, B3, 4, 3) == false);
return 0;
}
| O2 | cpp | func0(int*, int*, int, int):
endbr64
test %edx,%edx
setle %al
test %ecx,%ecx
setle %r11b
or %al,%r11b
jne 141a <_Z5func0PiS_ii+0x6a>
xor %r9d,%r9d
xor %eax,%eax
jmp 13e5 <_Z5func0PiS_ii+0x35>
nopl 0x0(%rax,%rax,1)
sub %r9d,%eax
xor %r8d,%r8d
xor %r9d,%r9d
add $0x1,%eax
cmp %edx,%eax
jge 1409 <_Z5func0PiS_ii+0x59>
test %r8b,%r8b
jne 1409 <_Z5func0PiS_ii+0x59>
movslq %r9d,%r10
movslq %eax,%r8
mov (%rsi,%r10,4),%r10d
cmp %r10d,(%rdi,%r8,4)
jne 13d0 <_Z5func0PiS_ii+0x20>
add $0x1,%r9d
add $0x1,%eax
cmp %r9d,%ecx
je 1410 <_Z5func0PiS_ii+0x60>
setle %r8b
cmp %edx,%eax
jl 13e0 <_Z5func0PiS_ii+0x30>
mov %r11d,%eax
retq
nopl (%rax)
mov $0x1,%r11d
mov %r11d,%eax
retq
xor %r11d,%r11d
jmp 1409 <_Z5func0PiS_ii+0x59>
| _Z5func0PiS_ii:
endbr64
test edx, edx
mov r8, rdi
mov r9, rsi
mov edi, edx
setnle r10b
test ecx, ecx
mov r11d, ecx
setnle al
and r10b, al
jz short loc_1324
xor ecx, ecx
xor edx, edx
jmp short loc_12EC
loc_12D8:
sub edx, ecx
xor ecx, ecx
mov esi, r10d
add edx, 1
cmp edx, edi
setl al
and al, sil
jz short locret_1315
loc_12EC:
movsxd rsi, ecx
movsxd rax, edx
mov esi, [r9+rsi*4]
cmp [r8+rax*4], esi
jnz short loc_12D8
add ecx, 1
add edx, 1
cmp r11d, ecx
jz short loc_1320
setnle sil
cmp edx, edi
setl al
and al, sil
jnz short loc_12EC
locret_1315:
retn
loc_1320:
mov eax, r10d
retn
loc_1324:
xor eax, eax
retn | bool func0(int *a1, int *a2, int a3, int a4)
{
bool v7; // r10
int v8; // ecx
int v9; // edx
int v10; // edx
bool result; // al
v7 = a4 > 0 && a3 > 0;
if ( !v7 )
return 0;
v8 = 0;
v9 = 0;
while ( 1 )
{
while ( a1[v9] != a2[v8] )
{
v10 = v9 - v8;
v8 = 0;
v9 = v10 + 1;
result = v7 && v9 < a3;
if ( !result )
return result;
}
++v8;
++v9;
if ( a4 == v8 )
break;
result = a4 > v8 && v9 < a3;
if ( !result )
return result;
}
return v7;
} | func0:
ENDBR64
TEST EDX,EDX
MOV R8,RDI
MOV R9,RSI
MOV EDI,EDX
SETG R10B
TEST ECX,ECX
MOV R11D,ECX
SETG AL
AND R10B,AL
JZ 0x00101324
XOR ECX,ECX
XOR EDX,EDX
JMP 0x001012ec
LAB_001012d8:
SUB EDX,ECX
XOR ECX,ECX
MOV ESI,R10D
ADD EDX,0x1
CMP EDX,EDI
SETL AL
AND AL,SIL
JZ 0x00101315
LAB_001012ec:
MOVSXD RSI,ECX
MOVSXD RAX,EDX
MOV ESI,dword ptr [R9 + RSI*0x4]
CMP dword ptr [R8 + RAX*0x4],ESI
JNZ 0x001012d8
ADD ECX,0x1
ADD EDX,0x1
CMP R11D,ECX
JZ 0x00101320
SETG SIL
CMP EDX,EDI
SETL AL
AND AL,SIL
JNZ 0x001012ec
LAB_00101315:
RET
LAB_00101320:
MOV EAX,R10D
RET
LAB_00101324:
XOR EAX,EAX
RET | /* func0(int*, int*, int, int) */
ulong func0(int *param_1,int *param_2,int param_3,int param_4)
{
bool bVar1;
bool bVar2;
bool bVar3;
uint uVar4;
bool bVar5;
int iVar6;
int iVar7;
int4 in_R10D;
bVar2 = 0 < param_3;
bVar3 = 0 < param_4;
if (!bVar2 || !bVar3) {
return 0;
}
iVar6 = 0;
iVar7 = 0;
do {
while (uVar4 = (uint)iVar7 >> 8, param_1[iVar7] == param_2[iVar6]) {
iVar6 = iVar6 + 1;
iVar7 = iVar7 + 1;
if (param_4 == iVar6) {
return (ulong)CONCAT31((int3)((uint)in_R10D >> 8),bVar2 && bVar3);
}
bVar1 = param_4 != iVar6;
bVar5 = iVar7 < param_3 && (bVar1 && iVar6 <= param_4);
if (iVar7 >= param_3 || (!bVar1 || iVar6 > param_4)) goto LAB_00101315;
}
iVar7 = iVar7 - iVar6;
iVar6 = 0;
iVar7 = iVar7 + 1;
bVar5 = iVar7 < param_3 && (bVar2 && bVar3);
} while (iVar7 < param_3 && (bVar2 && bVar3));
LAB_00101315:
return CONCAT71((int7)(int3)uVar4,bVar5);
} |
2,303 | func0 |
#include <iostream>
#include <assert.h>
| bool func0(int A[], int B[], int n, int m) {
int i = 0, j = 0;
while (i < n && j < m) {
if (A[i] == B[j]) {
i++;
j++;
if (j == m) {
return true;
}
} else {
i = i - j + 1;
j = 0;
}
}
return false;
}
| int main() {
int A1[] = {1, 4, 3, 5};
int B1[] = {1, 2};
int A2[] = {1, 2, 1};
int B2[] = {1, 2, 1};
int A3[] = {1, 0, 2, 2};
int B3[] = {2, 2, 0};
assert(func0(A1, B1, 4, 2) == false);
assert(func0(A2, B2, 3, 3) == true);
assert(func0(A3, B3, 4, 3) == false);
return 0;
}
| O3 | cpp | func0(int*, int*, int, int):
endbr64
test %edx,%edx
setle %al
test %ecx,%ecx
setle %r11b
or %al,%r11b
jne 140a <_Z5func0PiS_ii+0x6a>
xor %r9d,%r9d
xor %eax,%eax
jmp 13d5 <_Z5func0PiS_ii+0x35>
nopl 0x0(%rax,%rax,1)
sub %r9d,%eax
xor %r8d,%r8d
xor %r9d,%r9d
add $0x1,%eax
cmp %edx,%eax
jge 13f9 <_Z5func0PiS_ii+0x59>
test %r8b,%r8b
jne 13f9 <_Z5func0PiS_ii+0x59>
movslq %r9d,%r10
movslq %eax,%r8
mov (%rsi,%r10,4),%r10d
cmp %r10d,(%rdi,%r8,4)
jne 13c0 <_Z5func0PiS_ii+0x20>
add $0x1,%r9d
add $0x1,%eax
cmp %r9d,%ecx
je 1400 <_Z5func0PiS_ii+0x60>
setle %r8b
cmp %edx,%eax
jl 13d0 <_Z5func0PiS_ii+0x30>
mov %r11d,%eax
retq
nopl (%rax)
mov $0x1,%r11d
mov %r11d,%eax
retq
xor %r11d,%r11d
jmp 13f9 <_Z5func0PiS_ii+0x59>
| _Z5func0PiS_ii:
endbr64
test edx, edx
mov r8, rdi
mov r9, rsi
mov edi, edx
setnle r10b
test ecx, ecx
mov r11d, ecx
setnle al
and r10b, al
jz short loc_1394
xor ecx, ecx
xor edx, edx
jmp short loc_135C
loc_1348:
sub edx, ecx
xor ecx, ecx
mov esi, r10d
add edx, 1
cmp edx, edi
setl al
and al, sil
jz short locret_1385
loc_135C:
movsxd rsi, ecx
movsxd rax, edx
mov esi, [r9+rsi*4]
cmp [r8+rax*4], esi
jnz short loc_1348
add ecx, 1
add edx, 1
cmp r11d, ecx
jz short loc_1390
setnle sil
cmp edx, edi
setl al
and al, sil
jnz short loc_135C
locret_1385:
retn
loc_1390:
mov eax, r10d
retn
loc_1394:
xor eax, eax
retn | bool func0(int *a1, int *a2, int a3, int a4)
{
bool v7; // r10
int v8; // ecx
int v9; // edx
int v10; // edx
bool result; // al
v7 = a4 > 0 && a3 > 0;
if ( !v7 )
return 0;
v8 = 0;
v9 = 0;
while ( 1 )
{
while ( a1[v9] != a2[v8] )
{
v10 = v9 - v8;
v8 = 0;
v9 = v10 + 1;
result = v7 && v9 < a3;
if ( !result )
return result;
}
++v8;
++v9;
if ( a4 == v8 )
break;
result = a4 > v8 && v9 < a3;
if ( !result )
return result;
}
return v7;
} | func0:
ENDBR64
TEST EDX,EDX
MOV R8,RDI
MOV R9,RSI
MOV EDI,EDX
SETG R10B
TEST ECX,ECX
MOV R11D,ECX
SETG AL
AND R10B,AL
JZ 0x00101394
XOR ECX,ECX
XOR EDX,EDX
JMP 0x0010135c
LAB_00101348:
SUB EDX,ECX
XOR ECX,ECX
MOV ESI,R10D
ADD EDX,0x1
CMP EDX,EDI
SETL AL
AND AL,SIL
JZ 0x00101385
LAB_0010135c:
MOVSXD RSI,ECX
MOVSXD RAX,EDX
MOV ESI,dword ptr [R9 + RSI*0x4]
CMP dword ptr [R8 + RAX*0x4],ESI
JNZ 0x00101348
ADD ECX,0x1
ADD EDX,0x1
CMP R11D,ECX
JZ 0x00101390
SETG SIL
CMP EDX,EDI
SETL AL
AND AL,SIL
JNZ 0x0010135c
LAB_00101385:
RET
LAB_00101390:
MOV EAX,R10D
RET
LAB_00101394:
XOR EAX,EAX
RET | /* func0(int*, int*, int, int) */
ulong func0(int *param_1,int *param_2,int param_3,int param_4)
{
bool bVar1;
bool bVar2;
bool bVar3;
uint uVar4;
bool bVar5;
int iVar6;
int iVar7;
int4 in_R10D;
bVar2 = 0 < param_3;
bVar3 = 0 < param_4;
if (!bVar2 || !bVar3) {
return 0;
}
iVar6 = 0;
iVar7 = 0;
do {
while (uVar4 = (uint)iVar7 >> 8, param_1[iVar7] == param_2[iVar6]) {
iVar6 = iVar6 + 1;
iVar7 = iVar7 + 1;
if (param_4 == iVar6) {
return (ulong)CONCAT31((int3)((uint)in_R10D >> 8),bVar2 && bVar3);
}
bVar1 = param_4 != iVar6;
bVar5 = iVar7 < param_3 && (bVar1 && iVar6 <= param_4);
if (iVar7 >= param_3 || (!bVar1 || iVar6 > param_4)) goto LAB_00101385;
}
iVar7 = iVar7 - iVar6;
iVar6 = 0;
iVar7 = iVar7 + 1;
bVar5 = iVar7 < param_3 && (bVar2 && bVar3);
} while (iVar7 < param_3 && (bVar2 && bVar3));
LAB_00101385:
return CONCAT71((int7)(int3)uVar4,bVar5);
} |
2,304 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int n) {
if (n == 0) return 1;
else if (n <= 2) return n;
else if (n == 3) return 6;
else if (n == 4) return 4;
else return 0;
}
| int main() {
assert(func0(4) == 4);
assert(func0(21) == 0);
assert(func0(30) == 0);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x4(%rbp)
cmpl $0x0,-0x4(%rbp)
jne 11a1 <_Z5func0i+0x18>
mov $0x1,%eax
jmp 11cb <_Z5func0i+0x42>
cmpl $0x2,-0x4(%rbp)
jg 11ac <_Z5func0i+0x23>
mov -0x4(%rbp),%eax
jmp 11cb <_Z5func0i+0x42>
cmpl $0x3,-0x4(%rbp)
jne 11b9 <_Z5func0i+0x30>
mov $0x6,%eax
jmp 11cb <_Z5func0i+0x42>
cmpl $0x4,-0x4(%rbp)
jne 11c6 <_Z5func0i+0x3d>
mov $0x4,%eax
jmp 11cb <_Z5func0i+0x42>
mov $0x0,%eax
pop %rbp
retq
| _Z5func0i:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_4], edi
cmp [rbp+var_4], 0
jnz short loc_1161
mov eax, 1
jmp short loc_118B
loc_1161:
cmp [rbp+var_4], 2
jg short loc_116C
mov eax, [rbp+var_4]
jmp short loc_118B
loc_116C:
cmp [rbp+var_4], 3
jnz short loc_1179
mov eax, 6
jmp short loc_118B
loc_1179:
cmp [rbp+var_4], 4
jnz short loc_1186
mov eax, 4
jmp short loc_118B
loc_1186:
mov eax, 0
loc_118B:
pop rbp
retn | long long func0(int a1)
{
if ( !a1 )
return 1LL;
if ( a1 <= 2 )
return (unsigned int)a1;
if ( a1 == 3 )
return 6LL;
if ( a1 == 4 )
return 4LL;
return 0LL;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x4],EDI
CMP dword ptr [RBP + -0x4],0x0
JNZ 0x00101161
MOV EAX,0x1
JMP 0x0010118b
LAB_00101161:
CMP dword ptr [RBP + -0x4],0x2
JG 0x0010116c
MOV EAX,dword ptr [RBP + -0x4]
JMP 0x0010118b
LAB_0010116c:
CMP dword ptr [RBP + -0x4],0x3
JNZ 0x00101179
MOV EAX,0x6
JMP 0x0010118b
LAB_00101179:
CMP dword ptr [RBP + -0x4],0x4
JNZ 0x00101186
MOV EAX,0x4
JMP 0x0010118b
LAB_00101186:
MOV EAX,0x0
LAB_0010118b:
POP RBP
RET | /* func0(int) */
int func0(int param_1)
{
if (param_1 == 0) {
param_1 = 1;
}
else if (2 < param_1) {
if (param_1 == 3) {
param_1 = 6;
}
else if (param_1 == 4) {
param_1 = 4;
}
else {
param_1 = 0;
}
}
return param_1;
} |
2,305 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int n) {
if (n == 0) return 1;
else if (n <= 2) return n;
else if (n == 3) return 6;
else if (n == 4) return 4;
else return 0;
}
| int main() {
assert(func0(4) == 4);
assert(func0(21) == 0);
assert(func0(30) == 0);
return 0;
}
| O1 | cpp | func0(int):
endbr64
mov $0x1,%eax
test %edi,%edi
je 1193 <_Z5func0i+0x2a>
mov %edi,%eax
cmp $0x2,%edi
jle 1193 <_Z5func0i+0x2a>
cmp $0x3,%edi
je 118e <_Z5func0i+0x25>
cmp $0x4,%edi
mov $0x0,%eax
cmove %edi,%eax
retq
mov $0x6,%eax
retq
| _Z5func0i:
endbr64
mov eax, 1
test edi, edi
jz short locret_1154
mov eax, edi
cmp edi, 2
jle short locret_1154
cmp edi, 3
jz short loc_114F
cmp edi, 4
setz al
movzx eax, al
shl eax, 2
retn
loc_114F:
mov eax, 6
locret_1154:
retn | long long func0(int a1)
{
long long result; // rax
result = 1LL;
if ( a1 )
{
result = (unsigned int)a1;
if ( a1 > 2 )
{
if ( a1 == 3 )
return 6LL;
else
return 4 * (unsigned int)(a1 == 4);
}
}
return result;
} | func0:
ENDBR64
MOV EAX,0x1
TEST EDI,EDI
JZ 0x00101154
MOV EAX,EDI
CMP EDI,0x2
JLE 0x00101154
CMP EDI,0x3
JZ 0x0010114f
CMP EDI,0x4
SETZ AL
MOVZX EAX,AL
SHL EAX,0x2
RET
LAB_0010114f:
MOV EAX,0x6
LAB_00101154:
RET | /* func0(int) */
ulong func0(int param_1)
{
ulong uVar1;
uVar1 = 1;
if ((param_1 != 0) && (uVar1 = (ulong)(uint)param_1, 2 < param_1)) {
if (param_1 != 3) {
return (ulong)(param_1 == 4) << 2;
}
uVar1 = 6;
}
return uVar1;
} |
2,306 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int n) {
if (n == 0) return 1;
else if (n <= 2) return n;
else if (n == 3) return 6;
else if (n == 4) return 4;
else return 0;
}
| int main() {
assert(func0(4) == 4);
assert(func0(21) == 0);
assert(func0(30) == 0);
return 0;
}
| O2 | cpp | func0(int):
endbr64
mov $0x1,%eax
test %edi,%edi
je 11f5 <_Z5func0i+0x35>
mov %edi,%eax
cmp $0x2,%edi
jle 11f5 <_Z5func0i+0x35>
cmp $0x3,%edi
je 11f0 <_Z5func0i+0x30>
cmp $0x4,%edi
sete %al
movzbl %al,%eax
shl $0x2,%eax
retq
nopw %cs:0x0(%rax,%rax,1)
mov $0x6,%eax
retq
nopw %cs:0x0(%rax,%rax,1)
| _Z5func0i:
endbr64
mov eax, 1
test edi, edi
jz short locret_1175
mov eax, edi
cmp edi, 2
jle short locret_1175
cmp edi, 3
jz short loc_1170
cmp edi, 4
setz al
movzx eax, al
shl eax, 2
retn
loc_1170:
mov eax, 6
locret_1175:
retn | long long func0(int a1)
{
long long result; // rax
result = 1LL;
if ( a1 )
{
result = (unsigned int)a1;
if ( a1 > 2 )
{
if ( a1 == 3 )
return 6LL;
else
return 4 * (unsigned int)(a1 == 4);
}
}
return result;
} | func0:
ENDBR64
MOV EAX,0x1
TEST EDI,EDI
JZ 0x00101175
MOV EAX,EDI
CMP EDI,0x2
JLE 0x00101175
CMP EDI,0x3
JZ 0x00101170
CMP EDI,0x4
SETZ AL
MOVZX EAX,AL
SHL EAX,0x2
RET
LAB_00101170:
MOV EAX,0x6
LAB_00101175:
RET | /* func0(int) */
ulong func0(int param_1)
{
ulong uVar1;
uVar1 = 1;
if ((param_1 != 0) && (uVar1 = (ulong)(uint)param_1, 2 < param_1)) {
if (param_1 != 3) {
return (ulong)(param_1 == 4) << 2;
}
uVar1 = 6;
}
return uVar1;
} |
2,307 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int n) {
if (n == 0) return 1;
else if (n <= 2) return n;
else if (n == 3) return 6;
else if (n == 4) return 4;
else return 0;
}
| int main() {
assert(func0(4) == 4);
assert(func0(21) == 0);
assert(func0(30) == 0);
return 0;
}
| O3 | cpp | func0(int):
endbr64
mov $0x1,%eax
test %edi,%edi
je 11f5 <_Z5func0i+0x35>
mov %edi,%eax
cmp $0x2,%edi
jle 11f5 <_Z5func0i+0x35>
cmp $0x3,%edi
je 11f0 <_Z5func0i+0x30>
cmp $0x4,%edi
sete %al
movzbl %al,%eax
shl $0x2,%eax
retq
nopw %cs:0x0(%rax,%rax,1)
mov $0x6,%eax
retq
nopw %cs:0x0(%rax,%rax,1)
| _Z5func0i:
endbr64
mov eax, 1
test edi, edi
jz short locret_1175
mov eax, edi
cmp edi, 2
jle short locret_1175
cmp edi, 3
jz short loc_1170
cmp edi, 4
setz al
movzx eax, al
shl eax, 2
retn
loc_1170:
mov eax, 6
locret_1175:
retn | long long func0(int a1)
{
long long result; // rax
result = 1LL;
if ( a1 )
{
result = (unsigned int)a1;
if ( a1 > 2 )
{
if ( a1 == 3 )
return 6LL;
else
return 4 * (unsigned int)(a1 == 4);
}
}
return result;
} | func0:
ENDBR64
MOV EAX,0x1
TEST EDI,EDI
JZ 0x00101175
MOV EAX,EDI
CMP EDI,0x2
JLE 0x00101175
CMP EDI,0x3
JZ 0x00101170
CMP EDI,0x4
SETZ AL
MOVZX EAX,AL
SHL EAX,0x2
RET
LAB_00101170:
MOV EAX,0x6
LAB_00101175:
RET | /* func0(int) */
ulong func0(int param_1)
{
ulong uVar1;
uVar1 = 1;
if ((param_1 != 0) && (uVar1 = (ulong)(uint)param_1, 2 < param_1)) {
if (param_1 != 3) {
return (ulong)(param_1 == 4) << 2;
}
uVar1 = 6;
}
return uVar1;
} |
2,308 | func0 |
#include <vector>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& list1, const std::vector<int>& list2, const std::vector<int>& list3) {
std::vector<int> result;
for (size_t i = 0; i < list1.size(); ++i) {
result.push_back(list1[i]);
result.push_back(list2[i]);
result.push_back(list3[i]);
}
return result;
}
| int main() {
assert((func0({1,2,3,4,5,6,7},{10,20,30,40,50,60,70},{100,200,300,400,500,600,700}) == std::vector<int>{1, 10, 100, 2, 20, 200, 3, 30, 300, 4, 40, 400, 5, 50, 500, 6, 60, 600, 7, 70, 700}));
assert((func0({10,20},{15,2},{5,10}) == std::vector<int>{10,15,5,20,2,10}));
assert((func0({11,44}, {10,15}, {20,5}) == std::vector<int>{11,10,20,44,15,5}));
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x38,%rsp
mov %rdi,-0x28(%rbp)
mov %rsi,-0x30(%rbp)
mov %rdx,-0x38(%rbp)
mov %rcx,-0x40(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x28(%rbp),%rax
mov %rax,%rdi
callq 1f8a <_ZNSt6vectorIiSaIiEEC1Ev>
movq $0x0,-0x20(%rbp)
mov -0x30(%rbp),%rax
mov %rax,%rdi
callq 2090 <_ZNKSt6vectorIiSaIiEE4sizeEv>
cmp %rax,-0x20(%rbp)
setb %al
test %al,%al
je 133b <_Z5func0RKSt6vectorIiSaIiEES3_S3_+0xf2>
mov -0x20(%rbp),%rdx
mov -0x30(%rbp),%rax
mov %rdx,%rsi
mov %rax,%rdi
callq 20b8 <_ZNKSt6vectorIiSaIiEEixEm>
mov %rax,%rdx
mov -0x28(%rbp),%rax
mov %rdx,%rsi
mov %rax,%rdi
callq 20dc <_ZNSt6vectorIiSaIiEE9push_backERKi>
mov -0x20(%rbp),%rdx
mov -0x38(%rbp),%rax
mov %rdx,%rsi
mov %rax,%rdi
callq 20b8 <_ZNKSt6vectorIiSaIiEEixEm>
mov %rax,%rdx
mov -0x28(%rbp),%rax
mov %rdx,%rsi
mov %rax,%rdi
callq 20dc <_ZNSt6vectorIiSaIiEE9push_backERKi>
mov -0x20(%rbp),%rdx
mov -0x40(%rbp),%rax
mov %rdx,%rsi
mov %rax,%rdi
callq 20b8 <_ZNKSt6vectorIiSaIiEEixEm>
mov %rax,%rdx
mov -0x28(%rbp),%rax
mov %rdx,%rsi
mov %rax,%rdi
callq 20dc <_ZNSt6vectorIiSaIiEE9push_backERKi>
addq $0x1,-0x20(%rbp)
jmpq 1289 <_Z5func0RKSt6vectorIiSaIiEES3_S3_+0x40>
endbr64
mov %rax,%rbx
mov -0x28(%rbp),%rax
mov %rax,%rdi
callq 2048 <_ZNSt6vectorIiSaIiEED1Ev>
mov %rbx,%rax
mov %rax,%rdi
callq 1150 <_Unwind_Resume@plt>
mov -0x18(%rbp),%rax
xor %fs:0x28,%rax
je 1350 <_Z5func0RKSt6vectorIiSaIiEES3_S3_+0x107>
callq 1130 <__stack_chk_fail@plt>
mov -0x28(%rbp),%rax
add $0x38,%rsp
pop %rbx
pop %rbp
retq
| _Z5func0RKSt6vectorIiSaIiEES3_S3_:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 38h
mov [rbp+var_28], rdi
mov [rbp+var_30], rsi
mov [rbp+var_38], rdx
mov [rbp+var_40], rcx
mov rax, [rbp+var_28]
mov rdi, rax
call _ZNSt6vectorIiSaIiEEC2Ev; std::vector<int>::vector(void)
mov [rbp+var_18], 0
jmp short loc_1310
loc_129C:
mov rdx, [rbp+var_18]
mov rax, [rbp+var_30]
mov rsi, rdx
mov rdi, rax
call _ZNKSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong)
mov rdx, rax
mov rax, [rbp+var_28]
mov rsi, rdx
mov rdi, rax
call _ZNSt6vectorIiSaIiEE9push_backERKi; std::vector<int>::push_back(int const&)
mov rdx, [rbp+var_18]
mov rax, [rbp+var_38]
mov rsi, rdx
mov rdi, rax
call _ZNKSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong)
mov rdx, rax
mov rax, [rbp+var_28]
mov rsi, rdx
mov rdi, rax
call _ZNSt6vectorIiSaIiEE9push_backERKi; std::vector<int>::push_back(int const&)
mov rdx, [rbp+var_18]
mov rax, [rbp+var_40]
mov rsi, rdx
mov rdi, rax
call _ZNKSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong)
mov rdx, rax
mov rax, [rbp+var_28]
mov rsi, rdx
mov rdi, rax
call _ZNSt6vectorIiSaIiEE9push_backERKi; std::vector<int>::push_back(int const&)
add [rbp+var_18], 1
loc_1310:
mov rax, [rbp+var_30]
mov rdi, rax
call _ZNKSt6vectorIiSaIiEE4sizeEv; std::vector<int>::size(void)
cmp [rbp+var_18], rax
setb al
test al, al
jnz loc_129C
jmp short loc_134B
endbr64
mov rbx, rax
mov rax, [rbp+var_28]
mov rdi, rax
call _ZNSt6vectorIiSaIiEED2Ev; std::vector<int>::~vector()
mov rax, rbx
mov rdi, rax; struct _Unwind_Exception *
call __Unwind_Resume
loc_134B:
mov rax, [rbp+var_28]
mov rbx, [rbp+var_8]
leave
retn | long long func0(long long a1, long long a2, long long a3, long long a4)
{
long long v4; // rax
long long v5; // rax
long long v6; // rax
unsigned long long i; // [rsp+28h] [rbp-18h]
std::vector<int>::vector(a1);
for ( i = 0LL; i < std::vector<int>::size(a2); ++i )
{
v4 = std::vector<int>::operator[](a2, i);
std::vector<int>::push_back(a1, v4);
v5 = std::vector<int>::operator[](a3, i);
std::vector<int>::push_back(a1, v5);
v6 = std::vector<int>::operator[](a4, i);
std::vector<int>::push_back(a1, v6);
}
return a1;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x38
MOV qword ptr [RBP + -0x28],RDI
MOV qword ptr [RBP + -0x30],RSI
MOV qword ptr [RBP + -0x38],RDX
MOV qword ptr [RBP + -0x40],RCX
MOV RAX,qword ptr [RBP + -0x28]
MOV RDI,RAX
CALL 0x00101ff6
MOV qword ptr [RBP + -0x18],0x0
JMP 0x00101310
LAB_0010129c:
MOV RDX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x30]
MOV RSI,RDX
MOV RDI,RAX
CALL 0x0010211c
MOV RDX,RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RSI,RDX
MOV RDI,RAX
LAB_001012bc:
CALL 0x00102140
MOV RDX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x38]
MOV RSI,RDX
MOV RDI,RAX
CALL 0x0010211c
MOV RDX,RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RSI,RDX
MOV RDI,RAX
CALL 0x00102140
MOV RDX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x40]
MOV RSI,RDX
MOV RDI,RAX
CALL 0x0010211c
MOV RDX,RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RSI,RDX
MOV RDI,RAX
CALL 0x00102140
ADD qword ptr [RBP + -0x18],0x1
LAB_00101310:
MOV RAX,qword ptr [RBP + -0x30]
MOV RDI,RAX
CALL 0x001020f4
CMP qword ptr [RBP + -0x18],RAX
SETC AL
TEST AL,AL
JNZ 0x0010129c
JMP 0x0010134b
LAB_0010134b:
MOV RAX,qword ptr [RBP + -0x28]
MOV RBX,qword ptr [RBP + -0x8]
LEAVE
RET | /* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> >
const&, std::vector<int, std::allocator<int> > const&) */
vector * func0(vector *param_1,vector *param_2,vector *param_3)
{
int *piVar1;
ulong uVar2;
vector<int,std::allocator<int>> *in_RCX;
int8 local_20;
std::vector<int,std::allocator<int>>::vector((vector<int,std::allocator<int>> *)param_1);
local_20 = 0;
while( true ) {
uVar2 = std::vector<int,std::allocator<int>>::size((vector<int,std::allocator<int>> *)param_2);
if (uVar2 <= local_20) break;
piVar1 = (int *)std::vector<int,std::allocator<int>>::operator[]
((vector<int,std::allocator<int>> *)param_2,local_20);
/* try { // try from 001012bc to 0010130a has its CatchHandler @ 0010132d */
std::vector<int,std::allocator<int>>::push_back
((vector<int,std::allocator<int>> *)param_1,piVar1);
piVar1 = (int *)std::vector<int,std::allocator<int>>::operator[]
((vector<int,std::allocator<int>> *)param_3,local_20);
std::vector<int,std::allocator<int>>::push_back
((vector<int,std::allocator<int>> *)param_1,piVar1);
piVar1 = (int *)std::vector<int,std::allocator<int>>::operator[](in_RCX,local_20);
std::vector<int,std::allocator<int>>::push_back
((vector<int,std::allocator<int>> *)param_1,piVar1);
local_20 = local_20 + 1;
}
return param_1;
} |
2,309 | func0 |
#include <vector>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& list1, const std::vector<int>& list2, const std::vector<int>& list3) {
std::vector<int> result;
for (size_t i = 0; i < list1.size(); ++i) {
result.push_back(list1[i]);
result.push_back(list2[i]);
result.push_back(list3[i]);
}
return result;
}
| int main() {
assert((func0({1,2,3,4,5,6,7},{10,20,30,40,50,60,70},{100,200,300,400,500,600,700}) == std::vector<int>{1, 10, 100, 2, 20, 200, 3, 30, 300, 4, 40, 400, 5, 50, 500, 6, 60, 600, 7, 70, 700}));
assert((func0({10,20},{15,2},{5,10}) == std::vector<int>{10,15,5,20,2,10}));
assert((func0({11,44}, {10,15}, {20,5}) == std::vector<int>{11,10,20,44,15,5}));
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x8,%rsp
mov %rdi,%rbx
mov %rdx,%r13
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi)
movq $0x0,0x10(%rdi)
mov (%rsi),%rdx
cmp %rdx,0x8(%rsi)
je 1336 <_Z5func0RKSt6vectorIiSaIiEES3_S3_+0xed>
mov %rsi,%r12
mov %rcx,%r14
mov $0x0,%ebp
jmp 12c7 <_Z5func0RKSt6vectorIiSaIiEES3_S3_+0x7e>
mov %rbx,%rdi
callq 1bda <_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_>
jmp 12e5 <_Z5func0RKSt6vectorIiSaIiEES3_S3_+0x9c>
mov %rbx,%rdi
callq 1bda <_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_>
jmp 12ff <_Z5func0RKSt6vectorIiSaIiEES3_S3_+0xb6>
mov %rbx,%rdi
callq 1bda <_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_>
add $0x1,%rbp
mov (%r12),%rdx
mov 0x8(%r12),%rax
sub %rdx,%rax
sar $0x2,%rax
cmp %rax,%rbp
jae 1336 <_Z5func0RKSt6vectorIiSaIiEES3_S3_+0xed>
lea 0x0(,%rbp,4),%r15
add %r15,%rdx
mov 0x8(%rbx),%rsi
cmp 0x10(%rbx),%rsi
je 1292 <_Z5func0RKSt6vectorIiSaIiEES3_S3_+0x49>
mov (%rdx),%eax
mov %eax,(%rsi)
addq $0x4,0x8(%rbx)
mov %r15,%rdx
add 0x0(%r13),%rdx
mov 0x8(%rbx),%rsi
cmp 0x10(%rbx),%rsi
je 129c <_Z5func0RKSt6vectorIiSaIiEES3_S3_+0x53>
mov (%rdx),%eax
mov %eax,(%rsi)
addq $0x4,0x8(%rbx)
mov %r15,%rdx
add (%r14),%rdx
mov 0x8(%rbx),%rsi
cmp 0x10(%rbx),%rsi
je 12a6 <_Z5func0RKSt6vectorIiSaIiEES3_S3_+0x5d>
mov (%rdx),%eax
mov %eax,(%rsi)
addq $0x4,0x8(%rbx)
jmp 12ae <_Z5func0RKSt6vectorIiSaIiEES3_S3_+0x65>
endbr64
mov %rax,%rbp
mov (%rbx),%rdi
test %rdi,%rdi
je 132e <_Z5func0RKSt6vectorIiSaIiEES3_S3_+0xe5>
callq 1110 <_ZdlPv@plt>
mov %rbp,%rdi
callq 1150 <_Unwind_Resume@plt>
mov %rbx,%rax
add $0x8,%rsp
pop %rbx
pop %rbp
pop %r12
pop %r13
pop %r14
pop %r15
retq
| _Z5func0RKSt6vectorIiSaIiEES3_S3_:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 8
mov rbx, rdi
mov r13, rdx
mov qword ptr [rdi], 0
mov qword ptr [rdi+8], 0
mov qword ptr [rdi+10h], 0
mov rdx, [rsi]
cmp [rsi+8], rdx
jz loc_1332
mov r12, rsi
mov r14, rcx
mov ebp, 0
jmp short loc_12CA
loc_1292:
mov rdi, rbx
call _ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_; std::vector<int>::_M_realloc_insert<int const&>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,int const&)
jmp short loc_12E8
loc_129C:
mov rdi, rbx
call _ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_; std::vector<int>::_M_realloc_insert<int const&>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,int const&)
jmp short loc_1302
loc_12A6:
mov rdx, r15
mov rdi, rbx
call _ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_; std::vector<int>::_M_realloc_insert<int const&>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,int const&)
loc_12B1:
add rbp, 1
mov rdx, [r12]
mov rax, [r12+8]
sub rax, rdx
sar rax, 2
cmp rbp, rax
jnb short loc_1332
loc_12CA:
lea r15, ds:0[rbp*4]
add rdx, r15
mov rsi, [rbx+8]
cmp rsi, [rbx+10h]
jz short loc_1292
mov eax, [rdx]
mov [rsi], eax
add qword ptr [rbx+8], 4
loc_12E8:
mov rdx, r15
add rdx, [r13+0]
mov rsi, [rbx+8]
cmp rsi, [rbx+10h]
jz short loc_129C
mov eax, [rdx]
mov [rsi], eax
add qword ptr [rbx+8], 4
loc_1302:
add r15, [r14]
mov rsi, [rbx+8]
cmp rsi, [rbx+10h]
jz short loc_12A6
mov eax, [r15]
mov [rsi], eax
add qword ptr [rbx+8], 4
jmp short loc_12B1
endbr64
mov rbp, rax
mov rdi, rbx
call _ZNSt6vectorIiSaIiEED2Ev; std::vector<int>::~vector()
mov rdi, rbp; struct _Unwind_Exception *
call __Unwind_Resume
loc_1332:
mov rax, rbx
add rsp, 8
pop rbx
pop rbp
pop r12
pop r13
pop r14
pop r15
retn | _QWORD * func0(_QWORD *a1, long long *a2, _QWORD *a3, _QWORD *a4)
{
long long v5; // rdx
unsigned long long v8; // rbp
long long v9; // r15
_DWORD *v10; // rdx
_DWORD *v11; // rsi
_DWORD *v12; // rdx
_DWORD *v13; // rsi
_DWORD *v14; // r15
_DWORD *v15; // rsi
*a1 = 0LL;
a1[1] = 0LL;
a1[2] = 0LL;
v5 = *a2;
if ( a2[1] != *a2 )
{
v8 = 0LL;
do
{
v9 = 4 * v8;
v10 = (_DWORD *)(4 * v8 + v5);
v11 = (_DWORD *)a1[1];
if ( v11 == (_DWORD *)a1[2] )
{
std::vector<int>::_M_realloc_insert<int const&>(a1, v11, v10);
}
else
{
*v11 = *v10;
a1[1] += 4LL;
}
v12 = (_DWORD *)(*a3 + v9);
v13 = (_DWORD *)a1[1];
if ( v13 == (_DWORD *)a1[2] )
{
std::vector<int>::_M_realloc_insert<int const&>(a1, v13, v12);
}
else
{
*v13 = *v12;
a1[1] += 4LL;
}
v14 = (_DWORD *)(*a4 + v9);
v15 = (_DWORD *)a1[1];
if ( v15 == (_DWORD *)a1[2] )
{
std::vector<int>::_M_realloc_insert<int const&>(a1, v15, v14);
}
else
{
*v15 = *v14;
a1[1] += 4LL;
}
++v8;
v5 = *a2;
}
while ( v8 < (a2[1] - *a2) >> 2 );
}
return a1;
} | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV RBX,RDI
MOV R13,RDX
MOV qword ptr [RDI],0x0
MOV qword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
MOV RDX,qword ptr [RSI]
CMP qword ptr [RSI + 0x8],RDX
JZ 0x00101332
MOV R12,RSI
MOV R14,RCX
MOV EBP,0x0
JMP 0x001012ca
LAB_00101292:
MOV RDI,RBX
LAB_00101295:
CALL 0x00101bc8
JMP 0x001012e8
LAB_0010129c:
MOV RDI,RBX
CALL 0x00101bc8
JMP 0x00101302
LAB_001012a6:
MOV RDX,R15
MOV RDI,RBX
CALL 0x00101bc8
LAB_001012b1:
ADD RBP,0x1
MOV RDX,qword ptr [R12]
MOV RAX,qword ptr [R12 + 0x8]
SUB RAX,RDX
SAR RAX,0x2
CMP RBP,RAX
JNC 0x00101332
LAB_001012ca:
LEA R15,[RBP*0x4]
ADD RDX,R15
MOV RSI,qword ptr [RBX + 0x8]
CMP RSI,qword ptr [RBX + 0x10]
JZ 0x00101292
MOV EAX,dword ptr [RDX]
MOV dword ptr [RSI],EAX
ADD qword ptr [RBX + 0x8],0x4
LAB_001012e8:
MOV RDX,R15
ADD RDX,qword ptr [R13]
MOV RSI,qword ptr [RBX + 0x8]
CMP RSI,qword ptr [RBX + 0x10]
JZ 0x0010129c
MOV EAX,dword ptr [RDX]
MOV dword ptr [RSI],EAX
ADD qword ptr [RBX + 0x8],0x4
LAB_00101302:
ADD R15,qword ptr [R14]
MOV RSI,qword ptr [RBX + 0x8]
CMP RSI,qword ptr [RBX + 0x10]
JZ 0x001012a6
MOV EAX,dword ptr [R15]
MOV dword ptr [RSI],EAX
ADD qword ptr [RBX + 0x8],0x4
JMP 0x001012b1
LAB_00101332:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP RBP
POP R12
POP R13
POP R14
POP R15
RET | /* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> >
const&, std::vector<int, std::allocator<int> > const&) */
vector * func0(vector *param_1,vector *param_2,vector *param_3)
{
long lVar1;
int *piVar2;
long *in_RCX;
long lVar3;
ulong uVar4;
*(int8 *)param_1 = 0;
*(int8 *)(param_1 + 8) = 0;
*(int8 *)(param_1 + 0x10) = 0;
lVar3 = *(long *)param_2;
if (*(long *)(param_2 + 8) != lVar3) {
uVar4 = 0;
do {
lVar1 = uVar4 * 4;
piVar2 = *(int **)(param_1 + 8);
if (piVar2 == *(int **)(param_1 + 0x10)) {
/* try { // try from 00101295 to 001012b0 has its CatchHandler @ 0010131b */
std::vector<int,std::allocator<int>>::_M_realloc_insert<int_const&>
((vector<int,std::allocator<int>> *)param_1,(__normal_iterator)piVar2,
(int *)(lVar3 + lVar1));
}
else {
*piVar2 = *(int *)(lVar3 + lVar1);
*(long *)(param_1 + 8) = *(long *)(param_1 + 8) + 4;
}
piVar2 = *(int **)(param_1 + 8);
if (piVar2 == *(int **)(param_1 + 0x10)) {
std::vector<int,std::allocator<int>>::_M_realloc_insert<int_const&>
((vector<int,std::allocator<int>> *)param_1,(__normal_iterator)piVar2,
(int *)(lVar1 + *(long *)param_3));
}
else {
*piVar2 = *(int *)(lVar1 + *(long *)param_3);
*(long *)(param_1 + 8) = *(long *)(param_1 + 8) + 4;
}
piVar2 = *(int **)(param_1 + 8);
if (piVar2 == *(int **)(param_1 + 0x10)) {
std::vector<int,std::allocator<int>>::_M_realloc_insert<int_const&>
((vector<int,std::allocator<int>> *)param_1,(__normal_iterator)piVar2,
(int *)(lVar1 + *in_RCX));
}
else {
*piVar2 = *(int *)(lVar1 + *in_RCX);
*(long *)(param_1 + 8) = *(long *)(param_1 + 8) + 4;
}
uVar4 = uVar4 + 1;
lVar3 = *(long *)param_2;
} while (uVar4 < (ulong)(*(long *)(param_2 + 8) - lVar3 >> 2));
}
return param_1;
} |
2,310 | func0 |
#include <vector>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& list1, const std::vector<int>& list2, const std::vector<int>& list3) {
std::vector<int> result;
for (size_t i = 0; i < list1.size(); ++i) {
result.push_back(list1[i]);
result.push_back(list2[i]);
result.push_back(list3[i]);
}
return result;
}
| int main() {
assert((func0({1,2,3,4,5,6,7},{10,20,30,40,50,60,70},{100,200,300,400,500,600,700}) == std::vector<int>{1, 10, 100, 2, 20, 200, 3, 30, 300, 4, 40, 400, 5, 50, 500, 6, 60, 600, 7, 70, 700}));
assert((func0({10,20},{15,2},{5,10}) == std::vector<int>{10,15,5,20,2,10}));
assert((func0({11,44}, {10,15}, {20,5}) == std::vector<int>{11,10,20,44,15,5}));
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&):
endbr64
push %r15
push %r14
mov %rdx,%r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x8,%rsp
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi)
movq $0x0,0x10(%rdi)
mov (%rsi),%rdx
cmp %rdx,0x8(%rsi)
je 1ab0 <_Z5func0RKSt6vectorIiSaIiEES3_S3_+0x110>
mov %rsi,%r13
mov %rcx,%r15
xor %eax,%eax
xor %esi,%esi
xor %ebp,%ebp
jmp 1a52 <_Z5func0RKSt6vectorIiSaIiEES3_S3_+0xb2>
nopw 0x0(%rax,%rax,1)
mov (%rdx),%edx
add $0x4,%rsi
mov %edx,-0x4(%rsi)
mov %rsi,0x8(%r12)
mov (%r14),%rdx
add %rbx,%rdx
cmp %rax,%rsi
je 1a80 <_Z5func0RKSt6vectorIiSaIiEES3_S3_+0xe0>
mov (%rdx),%edx
add $0x4,%rsi
mov %edx,-0x4(%rsi)
mov %rsi,0x8(%r12)
add (%r15),%rbx
mov %rbx,%rdx
cmp %rax,%rsi
je 1aa0 <_Z5func0RKSt6vectorIiSaIiEES3_S3_+0x100>
mov (%rbx),%eax
add $0x4,%rsi
mov %eax,-0x4(%rsi)
mov %rsi,0x8(%r12)
mov 0x0(%r13),%rdx
mov 0x8(%r13),%rax
add $0x1,%rbp
sub %rdx,%rax
sar $0x2,%rax
cmp %rax,%rbp
jae 1ab0 <_Z5func0RKSt6vectorIiSaIiEES3_S3_+0x110>
mov 0x8(%r12),%rsi
mov 0x10(%r12),%rax
lea 0x0(,%rbp,4),%rbx
add %rbx,%rdx
cmp %rax,%rsi
jne 19f0 <_Z5func0RKSt6vectorIiSaIiEES3_S3_+0x50>
mov %r12,%rdi
callq 1be0 <_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_>
mov (%r14),%rdx
mov 0x8(%r12),%rsi
mov 0x10(%r12),%rax
add %rbx,%rdx
cmp %rax,%rsi
jne 1a09 <_Z5func0RKSt6vectorIiSaIiEES3_S3_+0x69>
mov %r12,%rdi
callq 1be0 <_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_>
mov 0x8(%r12),%rsi
mov 0x10(%r12),%rax
add (%r15),%rbx
mov %rbx,%rdx
cmp %rax,%rsi
jne 1a22 <_Z5func0RKSt6vectorIiSaIiEES3_S3_+0x82>
nopl (%rax)
mov %r12,%rdi
callq 1be0 <_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_>
jmp 1a30 <_Z5func0RKSt6vectorIiSaIiEES3_S3_+0x90>
nopw 0x0(%rax,%rax,1)
add $0x8,%rsp
mov %r12,%rax
pop %rbx
pop %rbp
pop %r12
pop %r13
pop %r14
pop %r15
retq
endbr64
mov %rax,%rbp
jmpq 1160 <_Z5func0RKSt6vectorIiSaIiEES3_S3_.cold>
xchg %ax,%ax
| _Z5func0RKSt6vectorIiSaIiEES3_S3_:
endbr64
push r15
pxor xmm0, xmm0
push r14
mov r14, rdx
push r13
push r12
push rbp
push rbx
mov rbx, rdi
sub rsp, 8
movups xmmword ptr [rdi], xmm0
mov rdx, [rsi]
mov qword ptr [rdi+10h], 0
cmp [rsi+8], rdx
jz loc_1970
mov r13, rsi
mov r15, rcx
xor eax, eax
xor esi, esi
xor r12d, r12d
jmp short loc_1913
loc_18B8:
mov edx, [rdx]
add rsi, 4
mov [rsi-4], edx
mov rdx, [r14]
mov [rbx+8], rsi
add rdx, rbp
cmp rsi, rax
jz short loc_1940
loc_18D0:
mov edx, [rdx]
add rsi, 4
add rbp, [r15]
mov [rsi-4], edx
mov [rbx+8], rsi
cmp rsi, rax
jz short loc_1960
loc_18E5:
mov eax, [rbp+0]
add rsi, 4
mov [rsi-4], eax
mov [rbx+8], rsi
loc_18F3:
mov rdx, [r13+0]
mov rax, [r13+8]
add r12, 1
sub rax, rdx
sar rax, 2
cmp r12, rax
jnb short loc_1970
mov rsi, [rbx+8]
mov rax, [rbx+10h]
loc_1913:
lea rbp, ds:0[r12*4]
add rdx, rbp
cmp rsi, rax
jnz short loc_18B8
mov rdi, rbx
call _ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_; std::vector<int>::_M_realloc_insert<int const&>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,int const&)
mov rdx, [r14]
mov rsi, [rbx+8]
mov rax, [rbx+10h]
add rdx, rbp
cmp rsi, rax
jnz short loc_18D0
xchg ax, ax
loc_1940:
mov rdi, rbx
call _ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_; std::vector<int>::_M_realloc_insert<int const&>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,int const&)
mov rsi, [rbx+8]
mov rax, [rbx+10h]
add rbp, [r15]
cmp rsi, rax
jnz short loc_18E5
nop dword ptr [rax+rax+00000000h]
loc_1960:
mov rdx, rbp
mov rdi, rbx
call _ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_; std::vector<int>::_M_realloc_insert<int const&>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,int const&)
jmp short loc_18F3
loc_1970:
add rsp, 8
mov rax, rbx
pop rbx
pop rbp
pop r12
pop r13
pop r14
pop r15
retn
endbr64
mov rbp, rax
jmp _Z5func0RKSt6vectorIiSaIiEES3_S3__cold; func0(std::vector<int> const&,std::vector<int> const&,std::vector<int> const&) [clone] | long long func0(long long a1, long long *a2, long long *a3, _QWORD *a4)
{
long long v5; // rdx
long long v8; // rax
long long v9; // rsi
long long v10; // r12
long long v11; // rsi
long long v12; // rdx
_DWORD *v13; // rdx
long long v14; // rsi
_DWORD *v15; // rbp
long long v16; // rsi
long long v17; // rbp
_DWORD *v18; // rdx
*(_OWORD *)a1 = 0LL;
v5 = *a2;
*(_QWORD *)(a1 + 16) = 0LL;
if ( a2[1] != v5 )
{
v8 = 0LL;
v9 = 0LL;
v10 = 0LL;
while ( 1 )
{
v17 = 4 * v10;
v18 = (_DWORD *)(4 * v10 + v5);
if ( v9 == v8 )
{
std::vector<int>::_M_realloc_insert<int const&>(a1, v9, v18);
v11 = *(_QWORD *)(a1 + 8);
v8 = *(_QWORD *)(a1 + 16);
v13 = (_DWORD *)(v17 + *a3);
if ( v11 != v8 )
{
LABEL_4:
v14 = v11 + 4;
v15 = (_DWORD *)(*a4 + v17);
*(_DWORD *)(v14 - 4) = *v13;
*(_QWORD *)(a1 + 8) = v14;
if ( v14 != v8 )
goto LABEL_5;
goto LABEL_11;
}
}
else
{
v11 = v9 + 4;
*(_DWORD *)(v11 - 4) = *v18;
v12 = *a3;
*(_QWORD *)(a1 + 8) = v11;
v13 = (_DWORD *)(v17 + v12);
if ( v11 != v8 )
goto LABEL_4;
}
std::vector<int>::_M_realloc_insert<int const&>(a1, v11, v13);
v14 = *(_QWORD *)(a1 + 8);
v15 = (_DWORD *)(*a4 + v17);
if ( v14 != *(_QWORD *)(a1 + 16) )
{
LABEL_5:
v16 = v14 + 4;
*(_DWORD *)(v16 - 4) = *v15;
*(_QWORD *)(a1 + 8) = v16;
goto LABEL_6;
}
LABEL_11:
std::vector<int>::_M_realloc_insert<int const&>(a1, v14, v15);
LABEL_6:
v5 = *a2;
if ( ++v10 >= (unsigned long long)((a2[1] - *a2) >> 2) )
return a1;
v9 = *(_QWORD *)(a1 + 8);
v8 = *(_QWORD *)(a1 + 16);
}
}
return a1;
} | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
MOV R14,RDX
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV RBX,RDI
SUB RSP,0x8
MOVUPS xmmword ptr [RDI],XMM0
MOV RDX,qword ptr [RSI]
MOV qword ptr [RDI + 0x10],0x0
CMP qword ptr [RSI + 0x8],RDX
JZ 0x00101970
MOV R13,RSI
MOV R15,RCX
XOR EAX,EAX
XOR ESI,ESI
XOR R12D,R12D
JMP 0x00101913
LAB_001018b8:
MOV EDX,dword ptr [RDX]
ADD RSI,0x4
MOV dword ptr [RSI + -0x4],EDX
MOV RDX,qword ptr [R14]
MOV qword ptr [RBX + 0x8],RSI
ADD RDX,RBP
CMP RSI,RAX
JZ 0x00101940
LAB_001018d0:
MOV EDX,dword ptr [RDX]
ADD RSI,0x4
ADD RBP,qword ptr [R15]
MOV dword ptr [RSI + -0x4],EDX
MOV qword ptr [RBX + 0x8],RSI
CMP RSI,RAX
JZ 0x00101960
LAB_001018e5:
MOV EAX,dword ptr [RBP]
ADD RSI,0x4
MOV dword ptr [RSI + -0x4],EAX
MOV qword ptr [RBX + 0x8],RSI
LAB_001018f3:
MOV RDX,qword ptr [R13]
MOV RAX,qword ptr [R13 + 0x8]
ADD R12,0x1
SUB RAX,RDX
SAR RAX,0x2
CMP R12,RAX
JNC 0x00101970
MOV RSI,qword ptr [RBX + 0x8]
MOV RAX,qword ptr [RBX + 0x10]
LAB_00101913:
LEA RBP,[R12*0x4]
ADD RDX,RBP
CMP RSI,RAX
JNZ 0x001018b8
MOV RDI,RBX
LAB_00101926:
CALL 0x00101aa0
MOV RDX,qword ptr [R14]
MOV RSI,qword ptr [RBX + 0x8]
MOV RAX,qword ptr [RBX + 0x10]
ADD RDX,RBP
CMP RSI,RAX
JNZ 0x001018d0
NOP
LAB_00101940:
MOV RDI,RBX
CALL 0x00101aa0
MOV RSI,qword ptr [RBX + 0x8]
MOV RAX,qword ptr [RBX + 0x10]
ADD RBP,qword ptr [R15]
CMP RSI,RAX
JNZ 0x001018e5
NOP dword ptr [RAX + RAX*0x1]
LAB_00101960:
MOV RDX,RBP
MOV RDI,RBX
CALL 0x00101aa0
JMP 0x001018f3
LAB_00101970:
ADD RSP,0x8
MOV RAX,RBX
POP RBX
POP RBP
POP R12
POP R13
POP R14
POP R15
RET | /* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> >
const&, std::vector<int, std::allocator<int> > const&) */
vector * func0(vector *param_1,vector *param_2,vector *param_3)
{
long lVar1;
int *piVar2;
long *in_RCX;
long lVar3;
int *piVar4;
int *piVar5;
int *piVar6;
int *piVar7;
ulong uVar8;
*(int (*) [16])param_1 = (int [16])0x0;
lVar3 = *(long *)param_2;
*(int8 *)(param_1 + 0x10) = 0;
if (*(long *)(param_2 + 8) == lVar3) {
return param_1;
}
piVar2 = (int *)0x0;
piVar4 = (int *)0x0;
uVar8 = 0;
do {
lVar1 = uVar8 * 4;
if (piVar4 == piVar2) {
/* try { // try from 00101926 to 0010196a has its CatchHandler @ 00101982 */
std::vector<int,std::allocator<int>>::_M_realloc_insert<int_const&>
((vector<int,std::allocator<int>> *)param_1,(__normal_iterator)piVar4,
(int *)(lVar3 + lVar1));
piVar6 = *(int **)(param_1 + 8);
piVar2 = *(int **)(param_1 + 0x10);
piVar4 = (int *)(*(long *)param_3 + lVar1);
if (piVar6 == piVar2) goto LAB_00101940;
LAB_001018d0:
piVar7 = piVar6 + 1;
piVar5 = (int *)(lVar1 + *in_RCX);
*piVar6 = *piVar4;
*(int **)(param_1 + 8) = piVar7;
if (piVar7 != piVar2) goto LAB_001018e5;
LAB_00101960:
std::vector<int,std::allocator<int>>::_M_realloc_insert<int_const&>
((vector<int,std::allocator<int>> *)param_1,(__normal_iterator)piVar7,piVar5);
}
else {
piVar6 = piVar4 + 1;
*piVar4 = *(int *)(lVar3 + lVar1);
lVar3 = *(long *)param_3;
*(int **)(param_1 + 8) = piVar6;
piVar4 = (int *)(lVar3 + lVar1);
if (piVar6 != piVar2) goto LAB_001018d0;
LAB_00101940:
std::vector<int,std::allocator<int>>::_M_realloc_insert<int_const&>
((vector<int,std::allocator<int>> *)param_1,(__normal_iterator)piVar6,piVar4);
piVar7 = *(int **)(param_1 + 8);
piVar5 = (int *)(lVar1 + *in_RCX);
if (piVar7 == *(int **)(param_1 + 0x10)) goto LAB_00101960;
LAB_001018e5:
*piVar7 = *piVar5;
*(int **)(param_1 + 8) = piVar7 + 1;
}
lVar3 = *(long *)param_2;
uVar8 = uVar8 + 1;
if ((ulong)(*(long *)(param_2 + 8) - lVar3 >> 2) <= uVar8) {
return param_1;
}
piVar4 = *(int **)(param_1 + 8);
piVar2 = *(int **)(param_1 + 0x10);
} while( true );
} |
2,311 | func0 |
#include <vector>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& list1, const std::vector<int>& list2, const std::vector<int>& list3) {
std::vector<int> result;
for (size_t i = 0; i < list1.size(); ++i) {
result.push_back(list1[i]);
result.push_back(list2[i]);
result.push_back(list3[i]);
}
return result;
}
| int main() {
assert((func0({1,2,3,4,5,6,7},{10,20,30,40,50,60,70},{100,200,300,400,500,600,700}) == std::vector<int>{1, 10, 100, 2, 20, 200, 3, 30, 300, 4, 40, 400, 5, 50, 500, 6, 60, 600, 7, 70, 700}));
assert((func0({10,20},{15,2},{5,10}) == std::vector<int>{10,15,5,20,2,10}));
assert((func0({11,44}, {10,15}, {20,5}) == std::vector<int>{11,10,20,44,15,5}));
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&):
endbr64
push %r15
pxor %xmm0,%xmm0
push %r14
mov %rdx,%r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x8,%rsp
movq $0x0,0x10(%rdi)
movups %xmm0,(%rdi)
mov (%rsi),%rdx
cmp %rdx,0x8(%rsi)
je 1a28 <_Z5func0RKSt6vectorIiSaIiEES3_S3_+0x118>
mov %rsi,%r13
mov %rcx,%r15
xor %eax,%eax
xor %esi,%esi
xor %ebp,%ebp
jmp 19be <_Z5func0RKSt6vectorIiSaIiEES3_S3_+0xae>
nopw 0x0(%rax,%rax,1)
mov (%rdx),%edx
add $0x4,%rsi
mov %edx,-0x4(%rsi)
mov %rsi,0x8(%r12)
mov (%r14),%rdx
add %rbx,%rdx
cmp %rax,%rsi
je 19f0 <_Z5func0RKSt6vectorIiSaIiEES3_S3_+0xe0>
mov (%rdx),%edx
add $0x4,%rsi
mov %edx,-0x4(%rsi)
mov %rsi,0x8(%r12)
add (%r15),%rbx
mov %rbx,%rdx
cmp %rax,%rsi
je 1a18 <_Z5func0RKSt6vectorIiSaIiEES3_S3_+0x108>
mov (%rbx),%eax
add $0x4,%rsi
mov %eax,-0x4(%rsi)
mov %rsi,0x8(%r12)
mov 0x0(%r13),%rdx
mov 0x8(%r13),%rax
add $0x1,%rbp
sub %rdx,%rax
sar $0x2,%rax
cmp %rax,%rbp
jae 1a28 <_Z5func0RKSt6vectorIiSaIiEES3_S3_+0x118>
mov 0x8(%r12),%rsi
mov 0x10(%r12),%rax
lea 0x0(,%rbp,4),%rbx
add %rbx,%rdx
cmp %rax,%rsi
jne 1958 <_Z5func0RKSt6vectorIiSaIiEES3_S3_+0x48>
mov %r12,%rdi
callq 1aa0 <_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_>
mov (%r14),%rdx
mov 0x8(%r12),%rsi
mov 0x10(%r12),%rax
add %rbx,%rdx
cmp %rax,%rsi
jne 1971 <_Z5func0RKSt6vectorIiSaIiEES3_S3_+0x61>
nopl 0x0(%rax,%rax,1)
mov %r12,%rdi
callq 1aa0 <_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_>
mov 0x8(%r12),%rsi
mov 0x10(%r12),%rax
add (%r15),%rbx
mov %rbx,%rdx
cmp %rax,%rsi
jne 198e <_Z5func0RKSt6vectorIiSaIiEES3_S3_+0x7e>
nopl 0x0(%rax)
mov %r12,%rdi
callq 1aa0 <_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_>
jmpq 199c <_Z5func0RKSt6vectorIiSaIiEES3_S3_+0x8c>
nopl (%rax)
add $0x8,%rsp
mov %r12,%rax
pop %rbx
pop %rbp
pop %r12
pop %r13
pop %r14
pop %r15
retq
endbr64
mov %rax,%rbp
jmpq 1175 <_Z5func0RKSt6vectorIiSaIiEES3_S3_.cold>
nopw %cs:0x0(%rax,%rax,1)
| _Z5func0RKSt6vectorIiSaIiEES3_S3_:
endbr64
push r15
pxor xmm0, xmm0
push r14
mov r14, rdx
push r13
push r12
push rbp
push rbx
mov rbx, rdi
sub rsp, 8
movups xmmword ptr [rdi], xmm0
mov rdx, [rsi]
mov qword ptr [rdi+10h], 0
cmp [rsi+8], rdx
jz loc_19E0
mov r13, rsi
mov r15, rcx
xor eax, eax
xor esi, esi
xor r12d, r12d
jmp short loc_1983
loc_1928:
mov edx, [rdx]
add rsi, 4
mov [rsi-4], edx
mov rdx, [r14]
mov [rbx+8], rsi
add rdx, rbp
cmp rsi, rax
jz short loc_19B0
loc_1940:
mov edx, [rdx]
add rsi, 4
add rbp, [r15]
mov [rsi-4], edx
mov [rbx+8], rsi
cmp rsi, rax
jz short loc_19D0
loc_1955:
mov eax, [rbp+0]
add rsi, 4
mov [rsi-4], eax
mov [rbx+8], rsi
loc_1963:
mov rdx, [r13+0]
mov rax, [r13+8]
add r12, 1
sub rax, rdx
sar rax, 2
cmp r12, rax
jnb short loc_19E0
mov rsi, [rbx+8]
mov rax, [rbx+10h]
loc_1983:
lea rbp, ds:0[r12*4]
add rdx, rbp
cmp rsi, rax
jnz short loc_1928
mov rdi, rbx
call _ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_; std::vector<int>::_M_realloc_insert<int const&>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,int const&)
mov rdx, [r14]
mov rsi, [rbx+8]
mov rax, [rbx+10h]
add rdx, rbp
cmp rsi, rax
jnz short loc_1940
xchg ax, ax
loc_19B0:
mov rdi, rbx
call _ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_; std::vector<int>::_M_realloc_insert<int const&>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,int const&)
mov rsi, [rbx+8]
mov rax, [rbx+10h]
add rbp, [r15]
cmp rsi, rax
jnz short loc_1955
nop dword ptr [rax+rax+00000000h]
loc_19D0:
mov rdx, rbp
mov rdi, rbx
call _ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_; std::vector<int>::_M_realloc_insert<int const&>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,int const&)
jmp short loc_1963
loc_19E0:
add rsp, 8
mov rax, rbx
pop rbx
pop rbp
pop r12
pop r13
pop r14
pop r15
retn
endbr64
mov rbp, rax
jmp _Z5func0RKSt6vectorIiSaIiEES3_S3__cold; func0(std::vector<int> const&,std::vector<int> const&,std::vector<int> const&) [clone] | long long func0(long long a1, long long *a2, long long *a3, _QWORD *a4)
{
long long v5; // rdx
long long v8; // rax
long long v9; // rsi
long long v10; // r12
long long v11; // rsi
long long v12; // rdx
_DWORD *v13; // rdx
long long v14; // rsi
_DWORD *v15; // rbp
long long v16; // rsi
long long v17; // rbp
_DWORD *v18; // rdx
*(_OWORD *)a1 = 0LL;
v5 = *a2;
*(_QWORD *)(a1 + 16) = 0LL;
if ( a2[1] != v5 )
{
v8 = 0LL;
v9 = 0LL;
v10 = 0LL;
while ( 1 )
{
v17 = 4 * v10;
v18 = (_DWORD *)(4 * v10 + v5);
if ( v9 == v8 )
{
std::vector<int>::_M_realloc_insert<int const&>(a1, v9, v18);
v11 = *(_QWORD *)(a1 + 8);
v8 = *(_QWORD *)(a1 + 16);
v13 = (_DWORD *)(v17 + *a3);
if ( v11 != v8 )
{
LABEL_4:
v14 = v11 + 4;
v15 = (_DWORD *)(*a4 + v17);
*(_DWORD *)(v14 - 4) = *v13;
*(_QWORD *)(a1 + 8) = v14;
if ( v14 != v8 )
goto LABEL_5;
goto LABEL_11;
}
}
else
{
v11 = v9 + 4;
*(_DWORD *)(v11 - 4) = *v18;
v12 = *a3;
*(_QWORD *)(a1 + 8) = v11;
v13 = (_DWORD *)(v17 + v12);
if ( v11 != v8 )
goto LABEL_4;
}
std::vector<int>::_M_realloc_insert<int const&>(a1, v11, v13);
v14 = *(_QWORD *)(a1 + 8);
v15 = (_DWORD *)(*a4 + v17);
if ( v14 != *(_QWORD *)(a1 + 16) )
{
LABEL_5:
v16 = v14 + 4;
*(_DWORD *)(v16 - 4) = *v15;
*(_QWORD *)(a1 + 8) = v16;
goto LABEL_6;
}
LABEL_11:
std::vector<int>::_M_realloc_insert<int const&>(a1, v14, v15);
LABEL_6:
v5 = *a2;
if ( ++v10 >= (unsigned long long)((a2[1] - *a2) >> 2) )
return a1;
v9 = *(_QWORD *)(a1 + 8);
v8 = *(_QWORD *)(a1 + 16);
}
}
return a1;
} | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
MOV R14,RDX
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV RBX,RDI
SUB RSP,0x8
MOVUPS xmmword ptr [RDI],XMM0
MOV RDX,qword ptr [RSI]
MOV qword ptr [RDI + 0x10],0x0
CMP qword ptr [RSI + 0x8],RDX
JZ 0x001019e0
MOV R13,RSI
MOV R15,RCX
XOR EAX,EAX
XOR ESI,ESI
XOR R12D,R12D
JMP 0x00101983
LAB_00101928:
MOV EDX,dword ptr [RDX]
ADD RSI,0x4
MOV dword ptr [RSI + -0x4],EDX
MOV RDX,qword ptr [R14]
MOV qword ptr [RBX + 0x8],RSI
ADD RDX,RBP
CMP RSI,RAX
JZ 0x001019b0
LAB_00101940:
MOV EDX,dword ptr [RDX]
ADD RSI,0x4
ADD RBP,qword ptr [R15]
MOV dword ptr [RSI + -0x4],EDX
MOV qword ptr [RBX + 0x8],RSI
CMP RSI,RAX
JZ 0x001019d0
LAB_00101955:
MOV EAX,dword ptr [RBP]
ADD RSI,0x4
MOV dword ptr [RSI + -0x4],EAX
MOV qword ptr [RBX + 0x8],RSI
LAB_00101963:
MOV RDX,qword ptr [R13]
MOV RAX,qword ptr [R13 + 0x8]
ADD R12,0x1
SUB RAX,RDX
SAR RAX,0x2
CMP R12,RAX
JNC 0x001019e0
MOV RSI,qword ptr [RBX + 0x8]
MOV RAX,qword ptr [RBX + 0x10]
LAB_00101983:
LEA RBP,[R12*0x4]
ADD RDX,RBP
CMP RSI,RAX
JNZ 0x00101928
MOV RDI,RBX
LAB_00101996:
CALL 0x00101a30
MOV RDX,qword ptr [R14]
MOV RSI,qword ptr [RBX + 0x8]
MOV RAX,qword ptr [RBX + 0x10]
ADD RDX,RBP
CMP RSI,RAX
JNZ 0x00101940
NOP
LAB_001019b0:
MOV RDI,RBX
CALL 0x00101a30
MOV RSI,qword ptr [RBX + 0x8]
MOV RAX,qword ptr [RBX + 0x10]
ADD RBP,qword ptr [R15]
CMP RSI,RAX
JNZ 0x00101955
NOP dword ptr [RAX + RAX*0x1]
LAB_001019d0:
MOV RDX,RBP
MOV RDI,RBX
CALL 0x00101a30
JMP 0x00101963
LAB_001019e0:
ADD RSP,0x8
MOV RAX,RBX
POP RBX
POP RBP
POP R12
POP R13
POP R14
POP R15
RET | /* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> >
const&, std::vector<int, std::allocator<int> > const&) */
vector * func0(vector *param_1,vector *param_2,vector *param_3)
{
long lVar1;
int *piVar2;
long *in_RCX;
long lVar3;
int *piVar4;
int *piVar5;
int *piVar6;
int *piVar7;
ulong uVar8;
*(int (*) [16])param_1 = (int [16])0x0;
lVar3 = *(long *)param_2;
*(int8 *)(param_1 + 0x10) = 0;
if (*(long *)(param_2 + 8) == lVar3) {
return param_1;
}
piVar2 = (int *)0x0;
piVar4 = (int *)0x0;
uVar8 = 0;
do {
lVar1 = uVar8 * 4;
if (piVar4 == piVar2) {
/* try { // try from 00101996 to 001019da has its CatchHandler @ 001019f2 */
std::vector<int,std::allocator<int>>::_M_realloc_insert<int_const&>
((vector<int,std::allocator<int>> *)param_1,(__normal_iterator)piVar4,
(int *)(lVar3 + lVar1));
piVar6 = *(int **)(param_1 + 8);
piVar2 = *(int **)(param_1 + 0x10);
piVar4 = (int *)(*(long *)param_3 + lVar1);
if (piVar6 == piVar2) goto LAB_001019b0;
LAB_00101940:
piVar7 = piVar6 + 1;
piVar5 = (int *)(lVar1 + *in_RCX);
*piVar6 = *piVar4;
*(int **)(param_1 + 8) = piVar7;
if (piVar7 != piVar2) goto LAB_00101955;
LAB_001019d0:
std::vector<int,std::allocator<int>>::_M_realloc_insert<int_const&>
((vector<int,std::allocator<int>> *)param_1,(__normal_iterator)piVar7,piVar5);
}
else {
piVar6 = piVar4 + 1;
*piVar4 = *(int *)(lVar3 + lVar1);
lVar3 = *(long *)param_3;
*(int **)(param_1 + 8) = piVar6;
piVar4 = (int *)(lVar3 + lVar1);
if (piVar6 != piVar2) goto LAB_00101940;
LAB_001019b0:
std::vector<int,std::allocator<int>>::_M_realloc_insert<int_const&>
((vector<int,std::allocator<int>> *)param_1,(__normal_iterator)piVar6,piVar4);
piVar7 = *(int **)(param_1 + 8);
piVar5 = (int *)(lVar1 + *in_RCX);
if (piVar7 == *(int **)(param_1 + 0x10)) goto LAB_001019d0;
LAB_00101955:
*piVar7 = *piVar5;
*(int **)(param_1 + 8) = piVar7 + 1;
}
lVar3 = *(long *)param_2;
uVar8 = uVar8 + 1;
if ((ulong)(*(long *)(param_2 + 8) - lVar3 >> 2) <= uVar8) {
return param_1;
}
piVar4 = *(int **)(param_1 + 8);
piVar2 = *(int **)(param_1 + 0x10);
} while( true );
} |
2,312 | func0 |
#include <vector>
#include <algorithm>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& test_tup1, const std::vector<int>& test_tup2) {
std::vector<int> sorted1 = test_tup1;
std::vector<int> sorted2 = test_tup2;
std::sort(sorted1.begin(), sorted1.end());
std::sort(sorted2.begin(), sorted2.end());
std::vector<int> res;
std::set_symmetric_difference(sorted1.begin(), sorted1.end(),
sorted2.begin(), sorted2.end(),
std::back_inserter(res));
return res;
}
| int main() {
assert(func0({3, 4, 5, 6}, {5, 7, 4, 10}) == std::vector<int>({3, 6, 7, 10}));
assert(func0({1, 2, 3, 4}, {7, 2, 3, 9}) == std::vector<int>({1, 4, 7, 9}));
assert(func0({21, 11, 25, 26}, {26, 34, 21, 36}) == std::vector<int>({11, 25, 34, 36}));
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %r14
push %r13
push %r12
push %rbx
sub $0x60,%rsp
mov %rdi,-0x68(%rbp)
mov %rsi,-0x70(%rbp)
mov %rdx,-0x78(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x28(%rbp)
xor %eax,%eax
mov -0x70(%rbp),%rdx
lea -0x60(%rbp),%rax
mov %rdx,%rsi
mov %rax,%rdi
callq 1d70 <_ZNSt6vectorIiSaIiEEC1ERKS1_>
mov -0x78(%rbp),%rdx
lea -0x40(%rbp),%rax
mov %rdx,%rsi
mov %rax,%rdi
callq 1d70 <_ZNSt6vectorIiSaIiEEC1ERKS1_>
lea -0x60(%rbp),%rax
mov %rax,%rdi
callq 1f24 <_ZNSt6vectorIiSaIiEE3endEv>
mov %rax,%rbx
lea -0x60(%rbp),%rax
mov %rax,%rdi
callq 1ed8 <_ZNSt6vectorIiSaIiEE5beginEv>
mov %rbx,%rsi
mov %rax,%rdi
callq 1f74 <_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_>
lea -0x40(%rbp),%rax
mov %rax,%rdi
callq 1f24 <_ZNSt6vectorIiSaIiEE3endEv>
mov %rax,%rbx
lea -0x40(%rbp),%rax
mov %rax,%rdi
callq 1ed8 <_ZNSt6vectorIiSaIiEE5beginEv>
mov %rbx,%rsi
mov %rax,%rdi
callq 1f74 <_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_>
mov -0x68(%rbp),%rax
mov %rax,%rdi
callq 1d22 <_ZNSt6vectorIiSaIiEEC1Ev>
mov -0x68(%rbp),%rax
mov %rax,%rdi
callq 2041 <_ZSt13back_inserterISt6vectorIiSaIiEEESt20back_insert_iteratorIT_ERS4_>
mov %rax,%r14
lea -0x40(%rbp),%rax
mov %rax,%rdi
callq 1f24 <_ZNSt6vectorIiSaIiEE3endEv>
mov %rax,%r13
lea -0x40(%rbp),%rax
mov %rax,%rdi
callq 1ed8 <_ZNSt6vectorIiSaIiEE5beginEv>
mov %rax,%r12
lea -0x60(%rbp),%rax
mov %rax,%rdi
callq 1f24 <_ZNSt6vectorIiSaIiEE3endEv>
mov %rax,%rbx
lea -0x60(%rbp),%rax
mov %rax,%rdi
callq 1ed8 <_ZNSt6vectorIiSaIiEE5beginEv>
mov %r14,%r8
mov %r13,%rcx
mov %r12,%rdx
mov %rbx,%rsi
mov %rax,%rdi
callq 208d <_ZSt24set_symmetric_differenceIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEES6_St20back_insert_iteratorIS5_EET1_T_SA_T0_SB_S9_>
lea -0x40(%rbp),%rax
mov %rax,%rdi
callq 1e90 <_ZNSt6vectorIiSaIiEED1Ev>
lea -0x60(%rbp),%rax
mov %rax,%rdi
callq 1e90 <_ZNSt6vectorIiSaIiEED1Ev>
mov -0x28(%rbp),%rax
xor %fs:0x28,%rax
je 13c9 <_Z5func0RKSt6vectorIiSaIiEES3_+0x180>
jmp 13c4 <_Z5func0RKSt6vectorIiSaIiEES3_+0x17b>
endbr64
mov %rax,%rbx
mov -0x68(%rbp),%rax
mov %rax,%rdi
callq 1e90 <_ZNSt6vectorIiSaIiEED1Ev>
jmp 1398 <_Z5func0RKSt6vectorIiSaIiEES3_+0x14f>
endbr64
mov %rax,%rbx
lea -0x40(%rbp),%rax
mov %rax,%rdi
callq 1e90 <_ZNSt6vectorIiSaIiEED1Ev>
jmp 13ad <_Z5func0RKSt6vectorIiSaIiEES3_+0x164>
endbr64
mov %rax,%rbx
lea -0x60(%rbp),%rax
mov %rax,%rdi
callq 1e90 <_ZNSt6vectorIiSaIiEED1Ev>
mov %rbx,%rax
mov %rax,%rdi
callq 1150 <_Unwind_Resume@plt>
callq 1130 <__stack_chk_fail@plt>
mov -0x68(%rbp),%rax
add $0x60,%rsp
pop %rbx
pop %r12
pop %r13
pop %r14
pop %rbp
retq
| _Z5func0RKSt6vectorIiSaIiEES3_:
endbr64
push rbp
mov rbp, rsp
push r14
push r13
push r12
push rbx
sub rsp, 60h
mov [rbp+var_68], rdi
mov [rbp+var_70], rsi
mov [rbp+var_78], rdx
mov rax, fs:28h
mov [rbp+var_28], rax
xor eax, eax
mov rdx, [rbp+var_70]
lea rax, [rbp+var_60]
mov rsi, rdx
mov rdi, rax
call _ZNSt6vectorIiSaIiEEC2ERKS1_; std::vector<int>::vector(std::vector<int> const&)
mov rdx, [rbp+var_78]
lea rax, [rbp+var_40]
mov rsi, rdx
mov rdi, rax
call _ZNSt6vectorIiSaIiEEC2ERKS1_; std::vector<int>::vector(std::vector<int> const&)
lea rax, [rbp+var_60]
mov rdi, rax
call _ZNSt6vectorIiSaIiEE3endEv; std::vector<int>::end(void)
mov rbx, rax
lea rax, [rbp+var_60]
mov rdi, rax
call _ZNSt6vectorIiSaIiEE5beginEv; std::vector<int>::begin(void)
mov rsi, rbx
mov rdi, rax
call _ZSt4sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_; std::sort<__gnu_cxx::__normal_iterator<int *,std::vector<int>>>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__normal_iterator<int *,std::vector<int>>)
lea rax, [rbp+var_40]
mov rdi, rax
call _ZNSt6vectorIiSaIiEE3endEv; std::vector<int>::end(void)
mov rbx, rax
lea rax, [rbp+var_40]
mov rdi, rax
call _ZNSt6vectorIiSaIiEE5beginEv; std::vector<int>::begin(void)
mov rsi, rbx
mov rdi, rax
call _ZSt4sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_; std::sort<__gnu_cxx::__normal_iterator<int *,std::vector<int>>>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__normal_iterator<int *,std::vector<int>>)
mov rax, [rbp+var_68]
mov rdi, rax
call _ZNSt6vectorIiSaIiEEC2Ev; std::vector<int>::vector(void)
mov rax, [rbp+var_68]
mov rdi, rax
call _ZSt13back_inserterISt6vectorIiSaIiEEESt20back_insert_iteratorIT_ERS4_; std::back_inserter<std::vector<int>>(std::vector<int>&)
mov r14, rax
lea rax, [rbp+var_40]
mov rdi, rax
call _ZNSt6vectorIiSaIiEE3endEv; std::vector<int>::end(void)
mov r13, rax
lea rax, [rbp+var_40]
mov rdi, rax
call _ZNSt6vectorIiSaIiEE5beginEv; std::vector<int>::begin(void)
mov r12, rax
lea rax, [rbp+var_60]
mov rdi, rax
call _ZNSt6vectorIiSaIiEE3endEv; std::vector<int>::end(void)
mov rbx, rax
lea rax, [rbp+var_60]
mov rdi, rax
call _ZNSt6vectorIiSaIiEE5beginEv; std::vector<int>::begin(void)
mov r8, r14
mov rcx, r13
mov rdx, r12
mov rsi, rbx
mov rdi, rax
call _ZSt24set_symmetric_differenceIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEES6_St20back_insert_iteratorIS5_EET1_T_SA_T0_SB_S9_; std::set_symmetric_difference<__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__normal_iterator<int *,std::vector<int>>,std::back_insert_iterator<std::vector<int>>>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__normal_iterator<int *,std::vector<int>>,std::back_insert_iterator<std::vector<int>>)
nop
lea rax, [rbp+var_40]
mov rdi, rax
call _ZNSt6vectorIiSaIiEED2Ev; std::vector<int>::~vector()
lea rax, [rbp+var_60]
mov rdi, rax
call _ZNSt6vectorIiSaIiEED2Ev; std::vector<int>::~vector()
nop
mov rax, [rbp+var_28]
sub rax, fs:28h
jz short loc_13FD
jmp short loc_13F8
endbr64
mov rbx, rax
mov rax, [rbp+var_68]
mov rdi, rax
call _ZNSt6vectorIiSaIiEED2Ev; std::vector<int>::~vector()
jmp short loc_13B8
endbr64
mov rbx, rax
loc_13B8:
lea rax, [rbp+var_40]
mov rdi, rax
call _ZNSt6vectorIiSaIiEED2Ev; std::vector<int>::~vector()
jmp short loc_13CD
endbr64
mov rbx, rax
loc_13CD:
lea rax, [rbp+var_60]
mov rdi, rax
call _ZNSt6vectorIiSaIiEED2Ev; std::vector<int>::~vector()
mov rax, rbx
mov rdx, [rbp+var_28]
sub rdx, fs:28h
jz short loc_13F0
call ___stack_chk_fail
loc_13F0:
mov rdi, rax; struct _Unwind_Exception *
call __Unwind_Resume
loc_13F8:
call ___stack_chk_fail
loc_13FD:
mov rax, [rbp+var_68]
add rsp, 60h
pop rbx
pop r12
pop r13
pop r14
pop rbp
retn | long long func0(long long a1, long long a2, long long a3)
{
long long v3; // rbx
long long v4; // rax
long long v5; // rbx
long long v6; // rax
long long v7; // r14
long long v8; // r13
long long v9; // r12
long long v10; // rbx
long long v11; // rax
_BYTE v14[32]; // [rsp+20h] [rbp-60h] BYREF
_BYTE v15[24]; // [rsp+40h] [rbp-40h] BYREF
unsigned long long v16; // [rsp+58h] [rbp-28h]
v16 = __readfsqword(0x28u);
std::vector<int>::vector(v14, a2);
std::vector<int>::vector(v15, a3);
v3 = std::vector<int>::end(v14);
v4 = std::vector<int>::begin(v14);
std::sort<__gnu_cxx::__normal_iterator<int *,std::vector<int>>>(v4, v3);
v5 = std::vector<int>::end(v15);
v6 = std::vector<int>::begin(v15);
std::sort<__gnu_cxx::__normal_iterator<int *,std::vector<int>>>(v6, v5);
std::vector<int>::vector(a1);
v7 = std::back_inserter<std::vector<int>>(a1);
v8 = std::vector<int>::end(v15);
v9 = std::vector<int>::begin(v15);
v10 = std::vector<int>::end(v14);
v11 = std::vector<int>::begin(v14);
std::set_symmetric_difference<__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__normal_iterator<int *,std::vector<int>>,std::back_insert_iterator<std::vector<int>>>(
v11,
v10,
v9,
v8,
v7);
std::vector<int>::~vector(v15);
std::vector<int>::~vector(v14);
return a1;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x60
MOV qword ptr [RBP + -0x68],RDI
MOV qword ptr [RBP + -0x70],RSI
MOV qword ptr [RBP + -0x78],RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
XOR EAX,EAX
MOV RDX,qword ptr [RBP + -0x70]
LEA RAX,[RBP + -0x60]
MOV RSI,RDX
MOV RDI,RAX
LAB_001012a5:
CALL 0x00101d8c
MOV RDX,qword ptr [RBP + -0x78]
LEA RAX,[RBP + -0x40]
MOV RSI,RDX
MOV RDI,RAX
LAB_001012b8:
CALL 0x00101d8c
LEA RAX,[RBP + -0x60]
MOV RDI,RAX
CALL 0x00101f9a
MOV RBX,RAX
LEA RAX,[RBP + -0x60]
MOV RDI,RAX
CALL 0x00101f4e
MOV RSI,RBX
MOV RDI,RAX
LAB_001012de:
CALL 0x00101fea
LEA RAX,[RBP + -0x40]
MOV RDI,RAX
CALL 0x00101f9a
MOV RBX,RAX
LEA RAX,[RBP + -0x40]
MOV RDI,RAX
CALL 0x00101f4e
MOV RSI,RBX
MOV RDI,RAX
CALL 0x00101fea
MOV RAX,qword ptr [RBP + -0x68]
MOV RDI,RAX
CALL 0x00101d6c
MOV RAX,qword ptr [RBP + -0x68]
MOV RDI,RAX
LAB_0010131c:
CALL 0x0010209d
MOV R14,RAX
LEA RAX,[RBP + -0x40]
MOV RDI,RAX
CALL 0x00101f9a
MOV R13,RAX
LEA RAX,[RBP + -0x40]
MOV RDI,RAX
CALL 0x00101f4e
MOV R12,RAX
LEA RAX,[RBP + -0x60]
MOV RDI,RAX
CALL 0x00101f9a
MOV RBX,RAX
LEA RAX,[RBP + -0x60]
MOV RDI,RAX
CALL 0x00101f4e
MOV R8,R14
MOV RCX,R13
MOV RDX,R12
MOV RSI,RBX
MOV RDI,RAX
CALL 0x001020e9
NOP
LEA RAX,[RBP + -0x40]
MOV RDI,RAX
CALL 0x00101ef4
LEA RAX,[RBP + -0x60]
MOV RDI,RAX
CALL 0x00101ef4
NOP
MOV RAX,qword ptr [RBP + -0x28]
SUB RAX,qword ptr FS:[0x28]
JZ 0x001013fd
JMP 0x001013f8
LAB_001013f8:
CALL 0x00101150
LAB_001013fd:
MOV RAX,qword ptr [RBP + -0x68]
ADD RSP,0x60
POP RBX
POP R12
POP R13
POP R14
POP RBP
RET | /* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> >
const&) */
vector * func0(vector *param_1,vector *param_2)
{
__normal_iterator _Var1;
__normal_iterator _Var2;
back_insert_iterator bVar3;
__normal_iterator _Var4;
__normal_iterator _Var5;
vector *in_RDX;
long in_FS_OFFSET;
vector<int,std::allocator<int>> local_68 [32];
vector<int,std::allocator<int>> local_48 [24];
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
std::vector<int,std::allocator<int>>::vector(local_68,param_2);
/* try { // try from 001012b8 to 001012bc has its CatchHandler @ 001013c6 */
std::vector<int,std::allocator<int>>::vector(local_48,in_RDX);
_Var1 = std::vector<int,std::allocator<int>>::end(local_68);
_Var2 = std::vector<int,std::allocator<int>>::begin(local_68);
/* try { // try from 001012de to 00101308 has its CatchHandler @ 001013b1 */
std::sort<__normal_iterator<int*,std::vector<int,std::allocator<int>>>>(_Var2,_Var1);
_Var1 = std::vector<int,std::allocator<int>>::end(local_48);
_Var2 = std::vector<int,std::allocator<int>>::begin(local_48);
std::sort<__normal_iterator<int*,std::vector<int,std::allocator<int>>>>(_Var2,_Var1);
std::vector<int,std::allocator<int>>::vector((vector<int,std::allocator<int>> *)param_1);
/* try { // try from 0010131c to 00101370 has its CatchHandler @ 0010139c */
bVar3 = std::back_inserter<std::vector<int,std::allocator<int>>>(param_1);
_Var1 = std::vector<int,std::allocator<int>>::end(local_48);
_Var2 = std::vector<int,std::allocator<int>>::begin(local_48);
_Var4 = std::vector<int,std::allocator<int>>::end(local_68);
_Var5 = std::vector<int,std::allocator<int>>::begin(local_68);
std::
set_symmetric_difference<__normal_iterator<int*,std::vector<int,std::allocator<int>>>,__normal_iterator<int*,std::vector<int,std::allocator<int>>>,std::back_insert_iterator<std::vector<int,std::allocator<int>>>>
(_Var5,_Var4,_Var2,_Var1,bVar3);
std::vector<int,std::allocator<int>>::~vector(local_48);
std::vector<int,std::allocator<int>>::~vector(local_68);
if (local_30 != *(long *)(in_FS_OFFSET + 0x28)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return param_1;
} |
2,313 | func0 |
#include <vector>
#include <algorithm>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& test_tup1, const std::vector<int>& test_tup2) {
std::vector<int> sorted1 = test_tup1;
std::vector<int> sorted2 = test_tup2;
std::sort(sorted1.begin(), sorted1.end());
std::sort(sorted2.begin(), sorted2.end());
std::vector<int> res;
std::set_symmetric_difference(sorted1.begin(), sorted1.end(),
sorted2.begin(), sorted2.end(),
std::back_inserter(res));
return res;
}
| int main() {
assert(func0({3, 4, 5, 6}, {5, 7, 4, 10}) == std::vector<int>({3, 6, 7, 10}));
assert(func0({1, 2, 3, 4}, {7, 2, 3, 9}) == std::vector<int>({1, 4, 7, 9}));
assert(func0({21, 11, 25, 26}, {26, 34, 21, 36}) == std::vector<int>({11, 25, 34, 36}));
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x18,%rsp
mov %rdi,%r12
mov %rsi,%rbp
mov %rdx,%r15
mov 0x8(%rsi),%rdi
sub (%rsi),%rdi
mov %rdi,%rax
sar $0x2,%rax
je 12fc <_Z5func0RKSt6vectorIiSaIiEES3_+0x93>
movabs $0x1fffffffffffffff,%rdx
cmp %rdx,%rax
ja 12f7 <_Z5func0RKSt6vectorIiSaIiEES3_+0x8e>
callq 1140 <_Znwm@plt>
mov %rax,%rbx
mov 0x8(%rbp),%rax
mov 0x0(%rbp),%rsi
mov %rax,%r13
sub %rsi,%r13
cmp %rsi,%rax
je 12c9 <_Z5func0RKSt6vectorIiSaIiEES3_+0x60>
mov %r13,%rdx
mov %rbx,%rdi
callq 1160 <memmove@plt>
lea (%rbx,%r13,1),%r14
mov 0x8(%r15),%rdi
sub (%r15),%rdi
mov %rdi,%rax
sar $0x2,%rax
je 13e1 <_Z5func0RKSt6vectorIiSaIiEES3_+0x178>
movabs $0x1fffffffffffffff,%rdx
cmp %rdx,%rax
ja 1303 <_Z5func0RKSt6vectorIiSaIiEES3_+0x9a>
callq 1140 <_Znwm@plt>
jmp 1314 <_Z5func0RKSt6vectorIiSaIiEES3_+0xab>
callq 10e0 <_ZSt17__throw_bad_allocv@plt>
mov $0x0,%ebx
jmp 12ab <_Z5func0RKSt6vectorIiSaIiEES3_+0x42>
callq 10e0 <_ZSt17__throw_bad_allocv@plt>
endbr64
mov %rax,%r13
jmpq 1439 <_Z5func0RKSt6vectorIiSaIiEES3_+0x1d0>
mov %rax,%rbp
mov 0x8(%r15),%rax
mov (%r15),%rsi
mov %rax,%rcx
sub %rsi,%rcx
mov %rcx,0x8(%rsp)
cmp %rsi,%rax
je 1339 <_Z5func0RKSt6vectorIiSaIiEES3_+0xd0>
mov %rcx,%rdx
mov %rbp,%rdi
callq 1160 <memmove@plt>
mov 0x8(%rsp),%rax
lea 0x0(%rbp,%rax,1),%r15
cmp %rbx,%r14
je 1378 <_Z5func0RKSt6vectorIiSaIiEES3_+0x10f>
sar $0x2,%r13
bsr %r13,%r13
xor $0x3f,%r13
mov $0x3f,%edx
sub %r13d,%edx
movslq %edx,%rdx
add %rdx,%rdx
mov %r14,%rsi
mov %rbx,%rdi
callq 1ebb <_ZSt16__introsort_loopIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEElNS0_5__ops15_Iter_less_iterEEvT_S9_T0_T1_>
mov %r14,%rsi
mov %rbx,%rdi
callq 1b1c <_ZSt22__final_insertion_sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEENS0_5__ops15_Iter_less_iterEEvT_S9_T0_>
cmp %r15,%rbp
je 13b1 <_Z5func0RKSt6vectorIiSaIiEES3_+0x148>
mov 0x8(%rsp),%rax
sar $0x2,%rax
bsr %rax,%rax
xor $0x3f,%rax
mov $0x3f,%edx
sub %eax,%edx
movslq %edx,%rdx
add %rdx,%rdx
mov %r15,%rsi
mov %rbp,%rdi
callq 1ebb <_ZSt16__introsort_loopIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEElNS0_5__ops15_Iter_less_iterEEvT_S9_T0_T1_>
mov %r15,%rsi
mov %rbp,%rdi
callq 1b1c <_ZSt22__final_insertion_sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEENS0_5__ops15_Iter_less_iterEEvT_S9_T0_>
movq $0x0,(%r12)
movq $0x0,0x8(%r12)
movq $0x0,0x10(%r12)
mov %r12,%r8
mov %r15,%rcx
mov %rbp,%rdx
mov %r14,%rsi
mov %rbx,%rdi
callq 1caf <_ZSt26__set_symmetric_differenceIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEES6_St20back_insert_iteratorIS5_ENS0_5__ops15_Iter_less_iterEET1_T_SC_T0_SD_SB_T2_>
jmp 13eb <_Z5func0RKSt6vectorIiSaIiEES3_+0x182>
mov $0x0,%ebp
jmpq 1317 <_Z5func0RKSt6vectorIiSaIiEES3_+0xae>
test %rbp,%rbp
je 13f8 <_Z5func0RKSt6vectorIiSaIiEES3_+0x18f>
mov %rbp,%rdi
callq 1130 <_ZdlPv@plt>
test %rbx,%rbx
je 1405 <_Z5func0RKSt6vectorIiSaIiEES3_+0x19c>
mov %rbx,%rdi
callq 1130 <_ZdlPv@plt>
mov %r12,%rax
add $0x18,%rsp
pop %rbx
pop %rbp
pop %r12
pop %r13
pop %r14
pop %r15
retq
endbr64
mov %rax,%r13
mov (%r12),%rdi
test %rdi,%rdi
je 142c <_Z5func0RKSt6vectorIiSaIiEES3_+0x1c3>
callq 1130 <_ZdlPv@plt>
test %rbp,%rbp
je 1439 <_Z5func0RKSt6vectorIiSaIiEES3_+0x1d0>
mov %rbp,%rdi
callq 1130 <_ZdlPv@plt>
test %rbx,%rbx
je 1446 <_Z5func0RKSt6vectorIiSaIiEES3_+0x1dd>
mov %rbx,%rdi
callq 1130 <_ZdlPv@plt>
mov %r13,%rdi
callq 1170 <_Unwind_Resume@plt>
| _Z5func0RKSt6vectorIiSaIiEES3_:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 68h
mov r13, rdi
mov rbp, rsi
mov r15, rdx
mov rax, fs:28h
mov [rsp+98h+var_40], rax
xor eax, eax
mov rax, [rsi+8]
sub rax, [rsi]
mov [rsp+98h+var_90], rax
jz loc_1369
mov rcx, rax
mov rax, 7FFFFFFFFFFFFFFCh
cmp rax, rcx
jb loc_134F
mov rdi, [rsp+98h+var_90]; unsigned __int64
call __Znwm; operator new(ulong)
mov rbx, rax
loc_12C9:
mov [rsp+98h+var_78], rbx
mov rax, [rsp+98h+var_90]
add rax, rbx
mov [rsp+98h+var_68], rax
mov rsi, [rbp+0]; src
mov r12, [rbp+8]
sub r12, rsi
cmp r12, 4
jle loc_1373
mov rdx, r12; n
mov rdi, rbx; dest
call _memmove
loc_12FB:
lea r14, [rbx+r12]
mov [rsp+98h+var_70], r14
mov rax, [r15+8]
mov [rsp+98h+var_58], 0
mov [rsp+98h+var_50], 0
mov [rsp+98h+var_48], 0
sub rax, [r15]
mov rcx, rax
mov [rsp+98h+var_88], rax
jz loc_1496
mov rax, 7FFFFFFFFFFFFFFCh
cmp rax, rcx
jb short loc_137B
mov rdi, [rsp+98h+var_88]; unsigned __int64
call __Znwm; operator new(ulong)
jmp short loc_13A1
loc_134F:
mov rax, [rsp+98h+var_40]
sub rax, fs:28h
jnz short loc_1364
call __ZSt28__throw_bad_array_new_lengthv; std::__throw_bad_array_new_length(void)
loc_1364:
call ___stack_chk_fail
loc_1369:
mov ebx, 0
jmp loc_12C9
loc_1373:
jnz short loc_12FB
mov eax, [rsi]
mov [rbx], eax
jmp short loc_12FB
loc_137B:
mov rax, [rsp+98h+var_40]
sub rax, fs:28h
jnz short loc_139C
call __ZSt28__throw_bad_array_new_lengthv; std::__throw_bad_array_new_length(void)
endbr64
mov rbx, rax
jmp loc_1515
loc_139C:
call ___stack_chk_fail
loc_13A1:
mov rbp, rax
loc_13A4:
mov [rsp+98h+var_58], rbp
mov rax, [rsp+98h+var_88]
add rax, rbp
mov [rsp+98h+var_48], rax
mov rsi, [r15]; src
mov rax, [r15+8]
sub rax, rsi
mov [rsp+98h+var_80], rax
mov rdx, rax; n
cmp rax, 4
jle loc_14A0
mov rdi, rbp; dest
call _memmove
loc_13DA:
mov rax, [rsp+98h+var_80]
lea r15, [rbp+rax+0]
mov [rsp+98h+var_50], r15
mov rdi, rbx
cmp rbx, r14
jz short loc_1426
sar r12, 2
mov eax, 40h ; '@'
jz short loc_1403
bsr rax, r12
xor eax, 3Fh
loc_1403:
mov edx, 3Fh ; '?'
sub edx, eax
movsxd rdx, edx
add rdx, rdx
mov rsi, r14
mov r12, rdi
call _ZSt16__introsort_loopIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEElNS0_5__ops15_Iter_less_iterEEvT_S9_T0_T1_; std::__introsort_loop<__gnu_cxx::__normal_iterator<int *,std::vector<int>>,long,__gnu_cxx::__ops::_Iter_less_iter>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__normal_iterator<int *,std::vector<int>>,long,__gnu_cxx::__ops::_Iter_less_iter)
mov rsi, r14
mov rdi, r12
call _ZSt22__final_insertion_sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEENS0_5__ops15_Iter_less_iterEEvT_S9_T0_; std::__final_insertion_sort<__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__ops::_Iter_less_iter>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__ops::_Iter_less_iter)
loc_1426:
mov r12, rbp
cmp rbp, r15
jz short loc_1468
mov rax, [rsp+98h+var_80]
sar rax, 2
mov ecx, 40h ; '@'
jz short loc_1445
bsr rcx, rax
xor ecx, 3Fh
loc_1445:
mov edx, 3Fh ; '?'
sub edx, ecx
movsxd rdx, edx
add rdx, rdx
mov rsi, r15
mov rdi, r12
call _ZSt16__introsort_loopIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEElNS0_5__ops15_Iter_less_iterEEvT_S9_T0_T1_; std::__introsort_loop<__gnu_cxx::__normal_iterator<int *,std::vector<int>>,long,__gnu_cxx::__ops::_Iter_less_iter>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__normal_iterator<int *,std::vector<int>>,long,__gnu_cxx::__ops::_Iter_less_iter)
mov rsi, r15
mov rdi, r12
call _ZSt22__final_insertion_sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEENS0_5__ops15_Iter_less_iterEEvT_S9_T0_; std::__final_insertion_sort<__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__ops::_Iter_less_iter>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__ops::_Iter_less_iter)
loc_1468:
mov qword ptr [r13+0], 0
mov qword ptr [r13+8], 0
mov qword ptr [r13+10h], 0
mov r8, r13
mov rcx, r15
mov rdx, rbp
mov rsi, r14
mov rdi, rbx
call _ZSt26__set_symmetric_differenceIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEES6_St20back_insert_iteratorIS5_ENS0_5__ops15_Iter_less_iterEET1_T_SC_T0_SD_SB_T2_; std::__set_symmetric_difference<__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__normal_iterator<int *,std::vector<int>>,std::back_insert_iterator<std::vector<int>>,__gnu_cxx::__ops::_Iter_less_iter>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__normal_iterator<int *,std::vector<int>>,std::back_insert_iterator<std::vector<int>>,__gnu_cxx::__ops::_Iter_less_iter)
jmp short loc_14B6
loc_1496:
mov ebp, 0
jmp loc_13A4
loc_14A0:
cmp [rsp+98h+var_80], 4
jnz loc_13DA
mov eax, [rsi]
mov [rbp+0], eax
jmp loc_13DA
loc_14B6:
test rbp, rbp
jz short loc_14C8
mov rsi, [rsp+98h+var_88]; unsigned __int64
mov rdi, rbp; void *
call __ZdlPvm; operator delete(void *,ulong)
loc_14C8:
test rbx, rbx
jz short loc_14DA
mov rsi, [rsp+98h+var_90]; unsigned __int64
mov rdi, rbx; void *
call __ZdlPvm; operator delete(void *,ulong)
loc_14DA:
mov rax, [rsp+98h+var_40]
sub rax, fs:28h
jnz short loc_153C
mov rax, r13
add rsp, 68h
pop rbx
pop rbp
pop r12
pop r13
pop r14
pop r15
retn
endbr64
mov rbx, rax
mov rdi, r13
call _ZNSt6vectorIiSaIiEED2Ev; std::vector<int>::~vector()
lea rdi, [rsp+98h+var_58]
call _ZNSt6vectorIiSaIiEED2Ev; std::vector<int>::~vector()
loc_1515:
lea rdi, [rsp+98h+var_78]
call _ZNSt6vectorIiSaIiEED2Ev; std::vector<int>::~vector()
mov rax, [rsp+98h+var_40]
sub rax, fs:28h
jz short loc_1534
call ___stack_chk_fail
loc_1534:
mov rdi, rbx; struct _Unwind_Exception *
call __Unwind_Resume
loc_153C:
call ___stack_chk_fail | _QWORD * func0(_QWORD *a1, _QWORD *a2, _QWORD *a3)
{
unsigned long long v5; // rax
_DWORD *v6; // rbx
_DWORD *v7; // rsi
long long v8; // r12
_DWORD *v9; // r14
long long v10; // rax
unsigned long long v11; // rcx
struct _Unwind_Exception *v12; // rbx
_DWORD *v13; // rbp
_DWORD *v14; // rsi
_DWORD *v15; // r15
unsigned long long v16; // r12
int v17; // eax
unsigned long long v18; // rax
int v19; // ecx
unsigned long long v20; // rcx
unsigned long long v22; // [rsp+8h] [rbp-90h]
unsigned long long v23; // [rsp+10h] [rbp-88h]
signed long long v24; // [rsp+18h] [rbp-80h]
_QWORD v25[4]; // [rsp+20h] [rbp-78h] BYREF
_DWORD *v26; // [rsp+40h] [rbp-58h]
char *v27; // [rsp+48h] [rbp-50h]
char *v28; // [rsp+50h] [rbp-48h]
unsigned long long v29; // [rsp+58h] [rbp-40h]
v29 = __readfsqword(0x28u);
v5 = a2[1] - *a2;
v22 = v5;
if ( v5 )
{
if ( v5 > 0x7FFFFFFFFFFFFFFCLL )
std::__throw_bad_array_new_length();
v6 = (_DWORD *)operator new(v5);
}
else
{
v6 = 0LL;
}
v25[0] = v6;
v25[2] = (char *)v6 + v22;
v7 = (_DWORD *)*a2;
v8 = a2[1] - *a2;
if ( v8 <= 4 )
{
if ( v8 == 4 )
*v6 = *v7;
}
else
{
memmove(v6, v7, a2[1] - *a2);
}
v9 = (_DWORD *)((char *)v6 + v8);
v25[1] = (char *)v6 + v8;
v10 = a3[1];
v26 = 0LL;
v27 = 0LL;
v28 = 0LL;
v11 = v10 - *a3;
v23 = v11;
if ( v11 )
{
if ( v11 > 0x7FFFFFFFFFFFFFFCLL )
{
v12 = (struct _Unwind_Exception *)std::__throw_bad_array_new_length();
std::vector<int>::~vector(v25);
_Unwind_Resume(v12);
}
v13 = (_DWORD *)operator new(v11);
}
else
{
v13 = 0LL;
}
v26 = v13;
v28 = (char *)v13 + v23;
v14 = (_DWORD *)*a3;
v24 = a3[1] - *a3;
if ( v24 <= 4 )
{
if ( v24 == 4 )
*v13 = *v14;
}
else
{
memmove(v13, v14, v24);
}
v15 = (_DWORD *)((char *)v13 + v24);
v27 = (char *)v13 + v24;
if ( v6 != v9 )
{
v16 = v8 >> 2;
v17 = 64;
if ( v16 )
{
_BitScanReverse64(&v18, v16);
v17 = v18 ^ 0x3F;
}
std::__introsort_loop<__gnu_cxx::__normal_iterator<int *,std::vector<int>>,long,__gnu_cxx::__ops::_Iter_less_iter>(
v6,
v9,
2LL * (63 - v17));
std::__final_insertion_sort<__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__ops::_Iter_less_iter>(
v6,
v9);
}
if ( v13 != v15 )
{
v19 = 64;
if ( v24 >> 2 )
{
_BitScanReverse64(&v20, v24 >> 2);
v19 = v20 ^ 0x3F;
}
std::__introsort_loop<__gnu_cxx::__normal_iterator<int *,std::vector<int>>,long,__gnu_cxx::__ops::_Iter_less_iter>(
v13,
v15,
2LL * (63 - v19));
std::__final_insertion_sort<__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__ops::_Iter_less_iter>(
v13,
v15);
}
*a1 = 0LL;
a1[1] = 0LL;
a1[2] = 0LL;
std::__set_symmetric_difference<__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__normal_iterator<int *,std::vector<int>>,std::back_insert_iterator<std::vector<int>>,__gnu_cxx::__ops::_Iter_less_iter>(
v6,
v9,
v13,
v15,
a1);
if ( v13 )
operator delete(v13, v23);
if ( v6 )
operator delete(v6, v22);
return a1;
} | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x68
MOV R13,RDI
MOV RBP,RSI
MOV R15,RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x58],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RSI + 0x8]
SUB RAX,qword ptr [RSI]
MOV qword ptr [RSP + 0x8],RAX
JZ 0x00101369
MOV RCX,RAX
MOV RAX,0x7ffffffffffffffc
CMP RAX,RCX
JC 0x0010134f
MOV RDI,qword ptr [RSP + 0x8]
LAB_001012c1:
CALL 0x00101130
MOV RBX,RAX
LAB_001012c9:
MOV qword ptr [RSP + 0x20],RBX
MOV RAX,qword ptr [RSP + 0x8]
ADD RAX,RBX
MOV qword ptr [RSP + 0x30],RAX
MOV RSI,qword ptr [RBP]
MOV R12,qword ptr [RBP + 0x8]
SUB R12,RSI
CMP R12,0x4
JLE 0x00101373
MOV RDX,R12
MOV RDI,RBX
CALL 0x00101160
LAB_001012fb:
LEA R14,[RBX + R12*0x1]
MOV qword ptr [RSP + 0x28],R14
MOV RAX,qword ptr [R15 + 0x8]
MOV qword ptr [RSP + 0x40],0x0
MOV qword ptr [RSP + 0x48],0x0
MOV qword ptr [RSP + 0x50],0x0
SUB RAX,qword ptr [R15]
MOV RCX,RAX
MOV qword ptr [RSP + 0x10],RAX
JZ 0x00101496
MOV RAX,0x7ffffffffffffffc
CMP RAX,RCX
JC 0x0010137b
MOV RDI,qword ptr [RSP + 0x10]
LAB_00101348:
CALL 0x00101130
JMP 0x001013a1
LAB_0010134f:
MOV RAX,qword ptr [RSP + 0x58]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x00101364
LAB_0010135f:
CALL 0x00101110
LAB_00101364:
CALL 0x00101150
LAB_00101369:
MOV EBX,0x0
JMP 0x001012c9
LAB_00101373:
JNZ 0x001012fb
MOV EAX,dword ptr [RSI]
MOV dword ptr [RBX],EAX
JMP 0x001012fb
LAB_0010137b:
MOV RAX,qword ptr [RSP + 0x58]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x0010139c
LAB_0010138b:
CALL 0x00101110
LAB_00101390:
ENDBR64
MOV RBX,RAX
JMP 0x00101515
LAB_0010139c:
CALL 0x00101150
LAB_001013a1:
MOV RBP,RAX
LAB_001013a4:
MOV qword ptr [RSP + 0x40],RBP
MOV RAX,qword ptr [RSP + 0x10]
ADD RAX,RBP
MOV qword ptr [RSP + 0x50],RAX
MOV RSI,qword ptr [R15]
MOV RAX,qword ptr [R15 + 0x8]
SUB RAX,RSI
MOV qword ptr [RSP + 0x18],RAX
MOV RDX,RAX
CMP RAX,0x4
JLE 0x001014a0
MOV RDI,RBP
CALL 0x00101160
LAB_001013da:
MOV RAX,qword ptr [RSP + 0x18]
LEA R15,[RBP + RAX*0x1]
MOV qword ptr [RSP + 0x48],R15
MOV RDI,RBX
CMP RBX,R14
JZ 0x00101426
SAR R12,0x2
MOV EAX,0x40
JZ 0x00101403
BSR RAX,R12
XOR EAX,0x3f
LAB_00101403:
MOV EDX,0x3f
SUB EDX,EAX
MOVSXD RDX,EDX
ADD RDX,RDX
MOV RSI,R14
MOV R12,RDI
CALL 0x00101faf
MOV RSI,R14
MOV RDI,R12
CALL 0x00101c3f
LAB_00101426:
MOV R12,RBP
CMP RBP,R15
JZ 0x00101468
MOV RAX,qword ptr [RSP + 0x18]
SAR RAX,0x2
MOV ECX,0x40
JZ 0x00101445
BSR RCX,RAX
XOR ECX,0x3f
LAB_00101445:
MOV EDX,0x3f
SUB EDX,ECX
MOVSXD RDX,EDX
ADD RDX,RDX
MOV RSI,R15
MOV RDI,R12
CALL 0x00101faf
MOV RSI,R15
MOV RDI,R12
CALL 0x00101c3f
LAB_00101468:
MOV qword ptr [R13],0x0
MOV qword ptr [R13 + 0x8],0x0
MOV qword ptr [R13 + 0x10],0x0
MOV R8,R13
MOV RCX,R15
MOV RDX,RBP
MOV RSI,R14
MOV RDI,RBX
LAB_0010148f:
CALL 0x00101dd5
JMP 0x001014b6
LAB_00101496:
MOV EBP,0x0
JMP 0x001013a4
LAB_001014a0:
CMP qword ptr [RSP + 0x18],0x4
JNZ 0x001013da
MOV EAX,dword ptr [RSI]
MOV dword ptr [RBP],EAX
JMP 0x001013da
LAB_001014b6:
TEST RBP,RBP
JZ 0x001014c8
MOV RSI,qword ptr [RSP + 0x10]
MOV RDI,RBP
CALL 0x00101140
LAB_001014c8:
TEST RBX,RBX
JZ 0x001014da
MOV RSI,qword ptr [RSP + 0x8]
MOV RDI,RBX
CALL 0x00101140
LAB_001014da:
MOV RAX,qword ptr [RSP + 0x58]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x0010153c
MOV RAX,R13
ADD RSP,0x68
POP RBX
POP RBP
POP R12
POP R13
POP R14
POP R15
RET
LAB_00101515:
LEA RDI,[RSP + 0x20]
CALL 0x00101a6c
MOV RAX,qword ptr [RSP + 0x58]
SUB RAX,qword ptr FS:[0x28]
JZ 0x00101534
CALL 0x00101150
LAB_00101534:
MOV RDI,RBX
LAB_00101537:
CALL 0x00101170
LAB_0010153c:
CALL 0x00101150 | /* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> >
const&) */
vector * func0(vector *param_1,vector *param_2,int param_3,int param_4,int param_5
,int param_6,int8 param_7,int8 param_8,int8 param_9,
int param_10,int8 param_11)
{
int4 *puVar1;
int4 *puVar2;
long lVar3;
uint uVar4;
ulong uVar5;
int4 *__dest;
ulong uVar6;
int4 *__dest_00;
int8 uVar7;
size_t __n;
_Iter_less_iter _Var8;
_Iter_less_iter extraout_EDX;
_Iter_less_iter extraout_EDX_00;
int7 in_register_00000011;
long *plVar9;
__normal_iterator _Var10;
__normal_iterator _Var11;
__normal_iterator _Var12;
__normal_iterator _Var13;
int3 in_register_00000089;
_Iter_less_iter _Var14;
size_t __n_00;
ulong uVar15;
long in_FS_OFFSET;
int4 *local_78;
int4 *local_70;
long local_68;
int4 *local_58;
int4 *local_50;
long local_48;
long local_40;
_Var14 = CONCAT31(in_register_00000089,param_6);
plVar9 = (long *)CONCAT71(in_register_00000011,param_3);
local_40 = *(long *)(in_FS_OFFSET + 0x28);
uVar5 = *(long *)(param_2 + 8) - *(long *)param_2;
if (uVar5 == 0) {
__dest = (int4 *)0x0;
}
else {
if (0x7ffffffffffffffc < uVar5) {
if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {
std::__throw_bad_array_new_length();
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
__dest = (int4 *)operator_new(uVar5);
}
local_68 = uVar5 + (long)__dest;
puVar1 = *(int4 **)param_2;
__n_00 = *(long *)(param_2 + 8) - (long)puVar1;
local_78 = __dest;
if ((long)__n_00 < 5) {
if (__n_00 == 4) {
*__dest = *puVar1;
}
}
else {
memmove(__dest,puVar1,__n_00);
}
puVar1 = (int4 *)((long)__dest + __n_00);
local_58 = (int4 *)0x0;
local_50 = (int4 *)0x0;
local_48 = 0;
uVar6 = plVar9[1] - *plVar9;
uVar15 = uVar6;
local_70 = puVar1;
if (uVar6 == 0) {
__dest_00 = (int4 *)0x0;
}
else {
if (0x7ffffffffffffffc < uVar6) {
if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
/* try { // try from 0010138b to 0010138f has its CatchHandler @ 00101390 */
uVar7 = std::__throw_bad_array_new_length();
std::vector<int,std::allocator<int>>::~vector((vector<int,std::allocator<int>> *)&local_78);
/* catch() { ... } // from try @ 00101348 with catch @ 00101390
catch() { ... } // from try @ 0010138b with catch @ 00101390 */
if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
/* WARNING: Subroutine does not return */
_Unwind_Resume(uVar7);
}
/* try { // try from 00101348 to 0010134c has its CatchHandler @ 00101390 */
__dest_00 = (int4 *)operator_new(uVar6);
}
_Var8 = (_Iter_less_iter)uVar15;
local_48 = uVar6 + (long)__dest_00;
puVar2 = (int4 *)*plVar9;
__n = plVar9[1] - (long)puVar2;
local_58 = __dest_00;
if ((long)__n < 5) {
if (__n == 4) {
*__dest_00 = *puVar2;
}
}
else {
memmove(__dest_00,puVar2,__n);
}
puVar2 = (int4 *)((long)__dest_00 + __n);
_Var10 = (__normal_iterator)puVar1;
_Var12 = (__normal_iterator)__dest;
local_50 = puVar2;
if (__dest != puVar1) {
uVar15 = (long)__n_00 >> 2;
uVar4 = 0x40;
if (uVar15 != 0) {
lVar3 = 0x3f;
if (uVar15 != 0) {
for (; uVar15 >> lVar3 == 0; lVar3 = lVar3 + -1) {
}
}
uVar4 = (uint)lVar3 ^ 0x3f;
}
std::
__introsort_loop<__normal_iterator<int*,std::vector<int,std::allocator<int>>>,long,__ops::_Iter_less_iter>
(_Var12,_Var10,(long)(int)(0x3f - uVar4) * 2,_Var8);
std::
__final_insertion_sort<__normal_iterator<int*,std::vector<int,std::allocator<int>>>,__ops::_Iter_less_iter>
(_Var12,_Var10,extraout_EDX);
}
_Var11 = (__normal_iterator)puVar2;
_Var13 = (__normal_iterator)__dest_00;
if (__dest_00 != puVar2) {
uVar15 = (long)__n >> 2;
_Var8 = 0x40;
if (uVar15 != 0) {
lVar3 = 0x3f;
if (uVar15 != 0) {
for (; uVar15 >> lVar3 == 0; lVar3 = lVar3 + -1) {
}
}
_Var8 = (uint)lVar3 ^ 0x3f;
}
std::
__introsort_loop<__normal_iterator<int*,std::vector<int,std::allocator<int>>>,long,__ops::_Iter_less_iter>
(_Var13,_Var11,(long)(int)(0x3f - _Var8) * 2,_Var8);
std::
__final_insertion_sort<__normal_iterator<int*,std::vector<int,std::allocator<int>>>,__ops::_Iter_less_iter>
(_Var13,_Var11,extraout_EDX_00);
}
*(int8 *)param_1 = 0;
*(int8 *)(param_1 + 8) = 0;
*(int8 *)(param_1 + 0x10) = 0;
/* try { // try from 0010148f to 00101493 has its CatchHandler @ 001014fc */
std::
__set_symmetric_difference<__normal_iterator<int*,std::vector<int,std::allocator<int>>>,__normal_iterator<int*,std::vector<int,std::allocator<int>>>,std::back_insert_iterator<std::vector<int,std::allocator<int>>>,__ops::_Iter_less_iter>
(_Var12,_Var10,_Var13,_Var11,(back_insert_iterator)param_1,_Var14);
if (__dest_00 != (int4 *)0x0) {
operator_delete(__dest_00,uVar6);
}
if (__dest != (int4 *)0x0) {
operator_delete(__dest,uVar5);
}
if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {
return param_1;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
} |
2,314 | func0 |
#include <vector>
#include <algorithm>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& test_tup1, const std::vector<int>& test_tup2) {
std::vector<int> sorted1 = test_tup1;
std::vector<int> sorted2 = test_tup2;
std::sort(sorted1.begin(), sorted1.end());
std::sort(sorted2.begin(), sorted2.end());
std::vector<int> res;
std::set_symmetric_difference(sorted1.begin(), sorted1.end(),
sorted2.begin(), sorted2.end(),
std::back_inserter(res));
return res;
}
| int main() {
assert(func0({3, 4, 5, 6}, {5, 7, 4, 10}) == std::vector<int>({3, 6, 7, 10}));
assert(func0({1, 2, 3, 4}, {7, 2, 3, 9}) == std::vector<int>({1, 4, 7, 9}));
assert(func0({21, 11, 25, 26}, {26, 34, 21, 36}) == std::vector<int>({11, 25, 34, 36}));
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
mov %rsi,%rbp
push %rbx
mov %rdx,%rbx
sub $0x18,%rsp
mov 0x8(%rbp),%rax
mov (%rsi),%rsi
mov %rax,%r14
sub %rsi,%r14
mov %r14,%rdx
sar $0x2,%rdx
je 1ab0 <_Z5func0RKSt6vectorIiSaIiEES3_+0x300>
movabs $0x1fffffffffffffff,%rax
cmp %rax,%rdx
ja 1b0b <_Z5func0RKSt6vectorIiSaIiEES3_+0x35b>
mov %r14,%rdi
callq 1140 <_Znwm@plt>
mov 0x0(%rbp),%rsi
mov %rax,%r13
mov 0x8(%rbp),%rax
mov %rax,%r14
sub %rsi,%r14
cmp %rsi,%rax
je 1821 <_Z5func0RKSt6vectorIiSaIiEES3_+0x71>
mov %r14,%rdx
mov %r13,%rdi
callq 1160 <memmove@plt>
lea 0x0(%r13,%r14,1),%rax
mov (%rbx),%rsi
mov %rax,(%rsp)
mov 0x8(%rbx),%rax
mov %rax,%rbp
sub %rsi,%rbp
mov %rbp,%rdx
sar $0x2,%rdx
je 1ac0 <_Z5func0RKSt6vectorIiSaIiEES3_+0x310>
movabs $0x1fffffffffffffff,%rax
cmp %rax,%rdx
ja 1b10 <_Z5func0RKSt6vectorIiSaIiEES3_+0x360>
mov %rbp,%rdi
callq 1140 <_Znwm@plt>
mov %rax,%r15
mov 0x8(%rbx),%rax
mov (%rbx),%rsi
mov %rax,%rbp
sub %rsi,%rbp
cmp %rsi,%rax
je 187f <_Z5func0RKSt6vectorIiSaIiEES3_+0xcf>
mov %rbp,%rdx
mov %r15,%rdi
callq 1160 <memmove@plt>
lea (%r15,%rbp,1),%rax
lea 0x0(%r13,%r14,1),%rbx
mov %rax,0x8(%rsp)
cmp %r13,%rbx
je 18c4 <_Z5func0RKSt6vectorIiSaIiEES3_+0x114>
mov %r14,%rax
mov $0x3f,%edx
mov %rbx,%rsi
mov %r13,%rdi
sar $0x2,%rax
bsr %rax,%rax
xor $0x3f,%rax
sub %eax,%edx
movslq %edx,%rdx
add %rdx,%rdx
callq 2000 <_ZSt16__introsort_loopIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEElNS0_5__ops15_Iter_less_iterEEvT_S9_T0_T1_>
mov %rbx,%rsi
mov %r13,%rdi
callq 1cf0 <_ZSt22__final_insertion_sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEENS0_5__ops15_Iter_less_iterEEvT_S9_T0_>
lea (%r15,%rbp,1),%rbx
cmp %r15,%rbx
je 1ad0 <_Z5func0RKSt6vectorIiSaIiEES3_+0x320>
sar $0x2,%rbp
mov $0x3f,%edx
mov %rbx,%rsi
mov %r15,%rdi
bsr %rbp,%rbp
xor $0x3f,%rbp
sub %ebp,%edx
mov %r15,%rbp
movslq %edx,%rdx
add %rdx,%rdx
callq 2000 <_ZSt16__introsort_loopIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEElNS0_5__ops15_Iter_less_iterEEvT_S9_T0_T1_>
mov %rbx,%rsi
mov %r15,%rdi
mov %r13,%rbx
callq 1cf0 <_ZSt22__final_insertion_sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEENS0_5__ops15_Iter_less_iterEEvT_S9_T0_>
movq $0x0,(%r12)
movq $0x0,0x8(%r12)
movq $0x0,0x10(%r12)
cmp %r13,(%rsp)
jne 194b <_Z5func0RKSt6vectorIiSaIiEES3_+0x19b>
jmp 1987 <_Z5func0RKSt6vectorIiSaIiEES3_+0x1d7>
nopl 0x0(%rax,%rax,1)
jg 1a70 <_Z5func0RKSt6vectorIiSaIiEES3_+0x2c0>
add $0x4,%rbx
add $0x4,%rbp
cmp %rbx,(%rsp)
je 1980 <_Z5func0RKSt6vectorIiSaIiEES3_+0x1d0>
cmp %rbp,0x8(%rsp)
je 1980 <_Z5func0RKSt6vectorIiSaIiEES3_+0x1d0>
mov (%rbx),%edx
mov 0x0(%rbp),%eax
cmp %eax,%edx
jge 1930 <_Z5func0RKSt6vectorIiSaIiEES3_+0x180>
mov 0x8(%r12),%rsi
cmp 0x10(%r12),%rsi
je 1a90 <_Z5func0RKSt6vectorIiSaIiEES3_+0x2e0>
mov %edx,(%rsi)
add $0x4,%rsi
mov %rsi,0x8(%r12)
add $0x4,%rbx
cmp %rbx,(%rsp)
jne 1944 <_Z5func0RKSt6vectorIiSaIiEES3_+0x194>
nopl 0x0(%rax)
mov (%rsp),%r14
sub %rbx,%r14
mov %r14,%rax
sar $0x2,%rax
mov %rax,(%rsp)
test %r14,%r14
jg 19b9 <_Z5func0RKSt6vectorIiSaIiEES3_+0x209>
jmp 19e0 <_Z5func0RKSt6vectorIiSaIiEES3_+0x230>
nopl 0x0(%rax)
mov (%rbx),%eax
add $0x4,%rsi
add $0x4,%rbx
mov %eax,-0x4(%rsi)
subq $0x1,(%rsp)
mov %rsi,0x8(%r12)
je 19e0 <_Z5func0RKSt6vectorIiSaIiEES3_+0x230>
mov 0x8(%r12),%rsi
cmp 0x10(%r12),%rsi
jne 19a0 <_Z5func0RKSt6vectorIiSaIiEES3_+0x1f0>
mov %rbx,%rdx
mov %r12,%rdi
callq 1d80 <_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_>
add $0x4,%rbx
subq $0x1,(%rsp)
jne 19b9 <_Z5func0RKSt6vectorIiSaIiEES3_+0x209>
nopl 0x0(%rax,%rax,1)
mov 0x8(%rsp),%rax
sub %rbp,%rax
mov %rax,%rbx
sar $0x2,%rbx
test %rax,%rax
jg 1a19 <_Z5func0RKSt6vectorIiSaIiEES3_+0x269>
jmp 1a40 <_Z5func0RKSt6vectorIiSaIiEES3_+0x290>
nopw %cs:0x0(%rax,%rax,1)
mov 0x0(%rbp),%eax
add $0x4,%rsi
add $0x4,%rbp
mov %eax,-0x4(%rsi)
mov %rsi,0x8(%r12)
sub $0x1,%rbx
je 1a40 <_Z5func0RKSt6vectorIiSaIiEES3_+0x290>
mov 0x8(%r12),%rsi
cmp 0x10(%r12),%rsi
jne 1a00 <_Z5func0RKSt6vectorIiSaIiEES3_+0x250>
mov %rbp,%rdx
mov %r12,%rdi
callq 1d80 <_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_>
add $0x4,%rbp
sub $0x1,%rbx
jne 1a19 <_Z5func0RKSt6vectorIiSaIiEES3_+0x269>
nopw 0x0(%rax,%rax,1)
test %r15,%r15
je 1a4d <_Z5func0RKSt6vectorIiSaIiEES3_+0x29d>
mov %r15,%rdi
callq 1130 <_ZdlPv@plt>
test %r13,%r13
je 1a5a <_Z5func0RKSt6vectorIiSaIiEES3_+0x2aa>
mov %r13,%rdi
callq 1130 <_ZdlPv@plt>
add $0x18,%rsp
mov %r12,%rax
pop %rbx
pop %rbp
pop %r12
pop %r13
pop %r14
pop %r15
retq
nopl 0x0(%rax)
mov 0x8(%r12),%rsi
cmp 0x10(%r12),%rsi
je 1aa0 <_Z5func0RKSt6vectorIiSaIiEES3_+0x2f0>
mov %eax,(%rsi)
add $0x4,%rsi
mov %rsi,0x8(%r12)
jmpq 193a <_Z5func0RKSt6vectorIiSaIiEES3_+0x18a>
nopl 0x0(%rax)
mov %rbx,%rdx
mov %r12,%rdi
callq 1d80 <_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_>
jmpq 196f <_Z5func0RKSt6vectorIiSaIiEES3_+0x1bf>
mov %rbp,%rdx
mov %r12,%rdi
callq 1d80 <_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_>
jmpq 193a <_Z5func0RKSt6vectorIiSaIiEES3_+0x18a>
xor %r13d,%r13d
jmpq 1811 <_Z5func0RKSt6vectorIiSaIiEES3_+0x61>
nopl 0x0(%rax,%rax,1)
xor %r15d,%r15d
jmpq 186f <_Z5func0RKSt6vectorIiSaIiEES3_+0xbf>
nopl 0x0(%rax,%rax,1)
mov %r14,%rax
movq $0x0,(%r12)
movq $0x0,0x8(%r12)
sar $0x2,%rax
movq $0x0,0x10(%r12)
mov %rax,(%rsp)
test %r14,%r14
jle 1a40 <_Z5func0RKSt6vectorIiSaIiEES3_+0x290>
mov 0x8(%rsp),%rbp
mov %r13,%rbx
jmpq 19b9 <_Z5func0RKSt6vectorIiSaIiEES3_+0x209>
callq 10e0 <_ZSt17__throw_bad_allocv@plt>
callq 10e0 <_ZSt17__throw_bad_allocv@plt>
endbr64
mov %rax,%rbp
jmpq 119b <_Z5func0RKSt6vectorIiSaIiEES3_.cold+0x1b>
endbr64
mov %rax,%rbp
jmpq 1180 <_Z5func0RKSt6vectorIiSaIiEES3_.cold>
nopl (%rax)
| _Z5func0RKSt6vectorIiSaIiEES3_:
endbr64
push r15
push r14
push r13
push r12
push rbp
mov rbp, rdx
push rbx
mov rbx, rdi
sub rsp, 68h
mov r15, [rsi+8]
mov rax, fs:28h
mov [rsp+98h+var_40], rax
xor eax, eax
sub r15, [rsi]
mov [rsp+98h+var_80], r15
jz loc_1E48
mov rax, 7FFFFFFFFFFFFFFCh
cmp rax, r15
jb loc_1EE0
mov rdi, r15; unsigned __int64
mov r12, rsi
call __Znwm; operator new(ulong)
mov rsi, [r12]; src
mov r15, [r12+8]
mov rdi, rax; dest
mov [rsp+98h+var_98], rax
mov [rsp+98h+var_78], rax
mov rax, [rsp+98h+var_80]
sub r15, rsi
mov r14, r15
add rax, rdi
mov [rsp+98h+var_68], rax
cmp r15, 4
jle loc_1EF5
mov rdx, r15; n
call _memmove
loc_1BB2:
mov rax, [rsp+98h+var_98]
mov r12, [rbp+8]
pxor xmm0, xmm0
mov [rsp+98h+var_48], 0
movaps [rsp+98h+var_58], xmm0
add r14, rax
sub r12, [rbp+0]
mov [rsp+98h+var_70], r14
mov [rsp+98h+var_88], r12
jz loc_1E80
mov rax, 7FFFFFFFFFFFFFFCh
cmp rax, r12
jb loc_1F1C
mov rdi, [rsp+98h+var_88]; unsigned __int64
call __Znwm; operator new(ulong)
mov rsi, [rbp+0]; src
mov r12, [rbp+8]
mov [rsp+98h+var_90], rax
mov rdi, rax; dest
mov rcx, [rsp+98h+var_88]
mov qword ptr [rsp+98h+var_58], rax
sub r12, rsi
add rax, rcx
mov r13, r12
mov [rsp+98h+var_48], rax
cmp r12, 4
jle loc_1F08
mov rdx, r12; n
call _memmove
loc_1C3A:
mov rax, [rsp+98h+var_90]
add r13, rax
mov qword ptr [rsp+98h+var_58+8], r13
cmp [rsp+98h+var_98], r14
jz short loc_1C81
mov rax, r15
mov rdx, 0FFFFFFFFFFFFFFFEh
sar rax, 2
jz short loc_1C67
bsr rax, rax
cdqe
lea rdx, [rax+rax]
loc_1C67:
mov rbp, [rsp+98h+var_98]
mov rsi, r14
mov rdi, rbp
call _ZSt16__introsort_loopIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEElNS0_5__ops15_Iter_less_iterEEvT_S9_T0_T1__isra_0; std::__introsort_loop<__gnu_cxx::__normal_iterator<int *,std::vector<int>>,long,__gnu_cxx::__ops::_Iter_less_iter>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__normal_iterator<int *,std::vector<int>>,long,__gnu_cxx::__ops::_Iter_less_iter) [clone]
mov rsi, r14
mov rdi, rbp
call _ZSt22__final_insertion_sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEENS0_5__ops15_Iter_less_iterEEvT_S9_T0__isra_0; std::__final_insertion_sort<__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__ops::_Iter_less_iter>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__ops::_Iter_less_iter) [clone]
loc_1C81:
mov rax, [rsp+98h+var_90]
cmp r13, rax
jz loc_1EC0
sar r12, 2
mov rdx, 0FFFFFFFFFFFFFFFEh
jz short loc_1CA7
bsr r12, r12
movsxd r12, r12d
lea rdx, [r12+r12]
loc_1CA7:
mov rbp, [rsp+98h+var_90]
mov rsi, r13
mov rdi, rbp
call _ZSt16__introsort_loopIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEElNS0_5__ops15_Iter_less_iterEEvT_S9_T0_T1__isra_0; std::__introsort_loop<__gnu_cxx::__normal_iterator<int *,std::vector<int>>,long,__gnu_cxx::__ops::_Iter_less_iter>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__normal_iterator<int *,std::vector<int>>,long,__gnu_cxx::__ops::_Iter_less_iter) [clone]
mov rsi, r13
mov rdi, rbp
call _ZSt22__final_insertion_sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEENS0_5__ops15_Iter_less_iterEEvT_S9_T0__isra_0; std::__final_insertion_sort<__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__ops::_Iter_less_iter>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__ops::_Iter_less_iter) [clone]
pxor xmm0, xmm0
mov qword ptr [rbx+10h], 0
movups xmmword ptr [rbx], xmm0
cmp [rsp+98h+var_98], r14
jz loc_1ECF
mov r12, [rsp+98h+var_90]
mov rbp, [rsp+98h+var_98]
jmp short loc_1D08
loc_1CF0:
jg loc_1E28
add rbp, 4
loc_1CFA:
add r12, 4
cmp r14, rbp
jz short loc_1D38
loc_1D03:
cmp r13, r12
jz short loc_1D38
loc_1D08:
mov eax, [rbp+0]
mov edx, [r12]
cmp eax, edx
jge short loc_1CF0
mov rsi, [rbx+8]
cmp rsi, [rbx+10h]
jz loc_1E70
mov [rsi], eax
add rsi, 4
mov [rbx+8], rsi
loc_1D2B:
add rbp, 4
cmp r14, rbp
jnz short loc_1D03
nop dword ptr [rax+00h]
loc_1D38:
mov r15, r14
sub r15, rbp
loc_1D3E:
lea r14, [rbp+r15+0]
test r15, r15
jg short loc_1D67
jmp short loc_1D88
loc_1D50:
mov eax, [rbp+0]
add rsi, 4
add rbp, 4
mov [rsi-4], eax
mov [rbx+8], rsi
cmp rbp, r14
jz short loc_1D88
loc_1D67:
mov rsi, [rbx+8]
cmp rsi, [rbx+10h]
jnz short loc_1D50
mov rdx, rbp
mov rdi, rbx
call _ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_; std::vector<int>::_M_realloc_insert<int const&>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,int const&)
add rbp, 4
cmp rbp, r14
jnz short loc_1D67
nop dword ptr [rax]
loc_1D88:
mov rax, r13
sub rax, r12
test rax, rax
jg short loc_1DB0
jmp short loc_1DD0
loc_1D98:
mov eax, [r12]
add rsi, 4
add r12, 4
mov [rsi-4], eax
mov [rbx+8], rsi
cmp r13, r12
jz short loc_1DD0
loc_1DB0:
mov rsi, [rbx+8]
cmp rsi, [rbx+10h]
jnz short loc_1D98
mov rdx, r12
mov rdi, rbx
call _ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_; std::vector<int>::_M_realloc_insert<int const&>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,int const&)
add r12, 4
cmp r13, r12
jnz short loc_1DB0
xchg ax, ax
loc_1DD0:
cmp [rsp+98h+var_90], 0
jz short loc_1DE7
mov rsi, [rsp+98h+var_88]; unsigned __int64
mov rdi, [rsp+98h+var_90]; void *
call __ZdlPvm; operator delete(void *,ulong)
loc_1DE7:
mov rax, [rsp+98h+var_98]
test rax, rax
jz short loc_1DFD
mov rsi, [rsp+98h+var_80]; unsigned __int64
mov rdi, rax; void *
call __ZdlPvm; operator delete(void *,ulong)
loc_1DFD:
mov rax, [rsp+98h+var_40]
sub rax, fs:28h
jnz loc_1F31
add rsp, 68h
mov rax, rbx
pop rbx
pop rbp
pop r12
pop r13
pop r14
pop r15
retn
loc_1E28:
mov rsi, [rbx+8]
cmp rsi, [rbx+10h]
jz short loc_1EA8
mov [rsi], edx
add rsi, 4
mov [rbx+8], rsi
jmp loc_1CFA
loc_1E48:
mov [rsp+98h+var_78], 0
xor r14d, r14d
mov [rsp+98h+var_68], 0
mov [rsp+98h+var_98], 0
jmp loc_1BB2
loc_1E70:
mov rdx, rbp
mov rdi, rbx
call _ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_; std::vector<int>::_M_realloc_insert<int const&>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,int const&)
jmp loc_1D2B
loc_1E80:
mov qword ptr [rsp+98h+var_58], 0
xor r13d, r13d
mov [rsp+98h+var_48], 0
mov [rsp+98h+var_90], 0
jmp loc_1C3A
loc_1EA8:
mov rdx, r12
mov rdi, rbx
call _ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_; std::vector<int>::_M_realloc_insert<int const&>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,int const&)
jmp loc_1CFA
loc_1EC0:
mov qword ptr [rbx+10h], 0
pxor xmm0, xmm0
movups xmmword ptr [rbx], xmm0
loc_1ECF:
mov r12, [rsp+98h+var_90]
mov rbp, [rsp+98h+var_98]
jmp loc_1D3E
loc_1EE0:
mov rax, [rsp+98h+var_40]
sub rax, fs:28h
jnz short loc_1F31
call __ZSt28__throw_bad_array_new_lengthv; std::__throw_bad_array_new_length(void)
loc_1EF5:
jnz loc_1BB2
mov eax, [rsi]
mov rcx, [rsp+98h+var_98]
mov [rcx], eax
jmp loc_1BB2
loc_1F08:
jnz loc_1C3A
mov eax, [rsi]
mov rcx, [rsp+98h+var_90]
mov [rcx], eax
jmp loc_1C3A
loc_1F1C:
mov rax, [rsp+98h+var_40]
sub rax, fs:28h
jnz short loc_1F31
call __ZSt28__throw_bad_array_new_lengthv; std::__throw_bad_array_new_length(void)
loc_1F31:
call ___stack_chk_fail
endbr64
mov rbp, rax
jmp _Z5func0RKSt6vectorIiSaIiEES3__cold; func0(std::vector<int> const&,std::vector<int> const&) [clone]
endbr64
mov rbp, rax
jmp loc_1192 | long long func0(long long a1, _QWORD *a2, _QWORD *a3)
{
signed long long v3; // r14
signed long long v5; // r15
_QWORD *v6; // r12
char *v7; // rax
bool v8; // zf
char *v9; // r14
signed long long v10; // r12
char *v11; // rax
_DWORD *v12; // rsi
signed long long v13; // r13
char *v14; // r13
long long v15; // rdx
unsigned long long v16; // rax
unsigned long long v17; // r12
long long v18; // rdx
char *v19; // r12
char *v20; // rbp
int v21; // eax
int v22; // edx
_DWORD *v23; // rsi
char *v24; // r14
int v25; // eax
long long v26; // rsi
long long v27; // rsi
int v28; // eax
long long v29; // rsi
long long v30; // rsi
_DWORD *v32; // rsi
char *v33; // [rsp+0h] [rbp-98h]
char *v34; // [rsp+8h] [rbp-90h]
unsigned long long v35; // [rsp+10h] [rbp-88h]
unsigned long long v36; // [rsp+18h] [rbp-80h]
v5 = a2[1] - *a2;
v36 = v5;
if ( v5 )
{
if ( (unsigned long long)v5 > 0x7FFFFFFFFFFFFFFCLL )
{
std::__throw_bad_array_new_length();
}
else
{
v6 = a2;
v7 = (char *)operator new(v5);
a2 = (_QWORD *)*a2;
v33 = v7;
v5 = v6[1] - (_QWORD)a2;
v3 = v5;
v8 = v5 == 4;
if ( v5 > 4 )
{
memmove(v7, a2, v5);
goto LABEL_5;
}
}
if ( v8 )
*(_DWORD *)v33 = *(_DWORD *)a2;
}
else
{
v3 = 0LL;
v33 = 0LL;
}
LABEL_5:
v9 = &v33[v3];
v10 = a3[1] - *a3;
v35 = v10;
if ( v10 )
{
if ( (unsigned long long)v10 > 0x7FFFFFFFFFFFFFFCLL )
std::__throw_bad_array_new_length();
v11 = (char *)operator new(v10);
v12 = (_DWORD *)*a3;
v34 = v11;
v10 = a3[1] - *a3;
v13 = v10;
if ( v10 <= 4 )
{
if ( v10 == 4 )
*(_DWORD *)v11 = *v12;
}
else
{
memmove(v11, v12, v10);
}
}
else
{
v13 = 0LL;
v34 = 0LL;
}
v14 = &v34[v13];
if ( v33 != v9 )
{
v15 = -2LL;
if ( v5 >> 2 )
{
_BitScanReverse64(&v16, v5 >> 2);
v15 = 2LL * (int)v16;
}
std::__introsort_loop<__gnu_cxx::__normal_iterator<int *,std::vector<int>>,long,__gnu_cxx::__ops::_Iter_less_iter>(
v33,
v9,
v15);
std::__final_insertion_sort<__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__ops::_Iter_less_iter>(
v33,
v9);
}
if ( v14 == v34 )
{
*(_QWORD *)(a1 + 16) = 0LL;
*(_OWORD *)a1 = 0LL;
}
else
{
v17 = v10 >> 2;
v18 = -2LL;
if ( v17 )
{
_BitScanReverse64(&v17, v17);
v18 = 2LL * (int)v17;
}
std::__introsort_loop<__gnu_cxx::__normal_iterator<int *,std::vector<int>>,long,__gnu_cxx::__ops::_Iter_less_iter>(
v34,
v14,
v18);
std::__final_insertion_sort<__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__ops::_Iter_less_iter>(
v34,
v14);
*(_QWORD *)(a1 + 16) = 0LL;
*(_OWORD *)a1 = 0LL;
if ( v33 != v9 )
{
v19 = v34;
v20 = v33;
while ( 1 )
{
v21 = *(_DWORD *)v20;
v22 = *(_DWORD *)v19;
if ( *(_DWORD *)v20 >= *(_DWORD *)v19 )
{
if ( v21 > v22 )
{
v32 = *(_DWORD **)(a1 + 8);
if ( v32 == *(_DWORD **)(a1 + 16) )
{
std::vector<int>::_M_realloc_insert<int const&>(a1, v32, v19);
}
else
{
*v32 = v22;
*(_QWORD *)(a1 + 8) = v32 + 1;
}
}
else
{
v20 += 4;
}
v19 += 4;
if ( v9 == v20 )
{
LABEL_26:
v5 = v9 - v20;
goto LABEL_27;
}
}
else
{
v23 = *(_DWORD **)(a1 + 8);
if ( v23 == *(_DWORD **)(a1 + 16) )
{
std::vector<int>::_M_realloc_insert<int const&>(a1, v23, v20);
}
else
{
*v23 = v21;
*(_QWORD *)(a1 + 8) = v23 + 1;
}
v20 += 4;
if ( v9 == v20 )
goto LABEL_26;
}
if ( v14 == v19 )
goto LABEL_26;
}
}
}
v19 = v34;
v20 = v33;
LABEL_27:
v24 = &v20[v5];
if ( v5 > 0 )
{
do
{
while ( 1 )
{
v27 = *(_QWORD *)(a1 + 8);
if ( v27 == *(_QWORD *)(a1 + 16) )
break;
v25 = *(_DWORD *)v20;
v26 = v27 + 4;
v20 += 4;
*(_DWORD *)(v26 - 4) = v25;
*(_QWORD *)(a1 + 8) = v26;
if ( v20 == v24 )
goto LABEL_32;
}
std::vector<int>::_M_realloc_insert<int const&>(a1, v27, v20);
v20 += 4;
}
while ( v20 != v24 );
}
LABEL_32:
if ( v14 - v19 > 0 )
{
do
{
while ( 1 )
{
v30 = *(_QWORD *)(a1 + 8);
if ( v30 == *(_QWORD *)(a1 + 16) )
break;
v28 = *(_DWORD *)v19;
v29 = v30 + 4;
v19 += 4;
*(_DWORD *)(v29 - 4) = v28;
*(_QWORD *)(a1 + 8) = v29;
if ( v14 == v19 )
goto LABEL_37;
}
std::vector<int>::_M_realloc_insert<int const&>(a1, v30, v19);
v19 += 4;
}
while ( v14 != v19 );
}
LABEL_37:
if ( v34 )
operator delete(v34, v35);
if ( v33 )
operator delete(v33, v36);
return a1;
} | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
MOV RBP,RDX
PUSH RBX
MOV RBX,RDI
SUB RSP,0x68
MOV R15,qword ptr [RSI + 0x8]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x58],RAX
XOR EAX,EAX
SUB R15,qword ptr [RSI]
MOV qword ptr [RSP + 0x18],R15
JZ 0x00101e48
MOV RAX,0x7ffffffffffffffc
CMP RAX,R15
JC 0x00101ee0
MOV RDI,R15
MOV R12,RSI
LAB_00101b73:
CALL 0x00101130
MOV RSI,qword ptr [R12]
MOV R15,qword ptr [R12 + 0x8]
MOV RDI,RAX
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RSP + 0x18]
SUB R15,RSI
MOV R14,R15
ADD RAX,RDI
MOV qword ptr [RSP + 0x30],RAX
CMP R15,0x4
JLE 0x00101ef5
MOV RDX,R15
CALL 0x00101160
LAB_00101bb2:
MOV RAX,qword ptr [RSP]
MOV R12,qword ptr [RBP + 0x8]
PXOR XMM0,XMM0
MOV qword ptr [RSP + 0x50],0x0
MOVAPS xmmword ptr [RSP + 0x40],XMM0
ADD R14,RAX
SUB R12,qword ptr [RBP]
MOV qword ptr [RSP + 0x28],R14
MOV qword ptr [RSP + 0x10],R12
JZ 0x00101e80
MOV RAX,0x7ffffffffffffffc
CMP RAX,R12
JC 0x00101f1c
MOV RDI,qword ptr [RSP + 0x10]
LAB_00101bfb:
CALL 0x00101130
MOV RSI,qword ptr [RBP]
MOV R12,qword ptr [RBP + 0x8]
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,RAX
MOV RCX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x40],RAX
SUB R12,RSI
ADD RAX,RCX
MOV R13,R12
MOV qword ptr [RSP + 0x50],RAX
CMP R12,0x4
JLE 0x00101f08
MOV RDX,R12
CALL 0x00101160
LAB_00101c3a:
MOV RAX,qword ptr [RSP + 0x8]
ADD R13,RAX
MOV qword ptr [RSP + 0x48],R13
CMP qword ptr [RSP],R14
JZ 0x00101c81
MOV RAX,R15
MOV RDX,-0x2
SAR RAX,0x2
JZ 0x00101c67
BSR RAX,RAX
CDQE
LEA RDX,[RAX + RAX*0x1]
LAB_00101c67:
MOV RBP,qword ptr [RSP]
MOV RSI,R14
MOV RDI,RBP
CALL 0x00101950
MOV RSI,R14
MOV RDI,RBP
CALL 0x00101890
LAB_00101c81:
MOV RAX,qword ptr [RSP + 0x8]
CMP R13,RAX
JZ 0x00101ec0
SAR R12,0x2
MOV RDX,-0x2
JZ 0x00101ca7
BSR R12,R12
MOVSXD R12,R12D
LEA RDX,[R12 + R12*0x1]
LAB_00101ca7:
MOV RBP,qword ptr [RSP + 0x8]
MOV RSI,R13
MOV RDI,RBP
CALL 0x00101950
MOV RSI,R13
MOV RDI,RBP
CALL 0x00101890
PXOR XMM0,XMM0
MOV qword ptr [RBX + 0x10],0x0
MOVUPS xmmword ptr [RBX],XMM0
CMP qword ptr [RSP],R14
JZ 0x00101ecf
MOV R12,qword ptr [RSP + 0x8]
MOV RBP,qword ptr [RSP]
JMP 0x00101d08
LAB_00101cf0:
JG 0x00101e28
ADD RBP,0x4
LAB_00101cfa:
ADD R12,0x4
CMP R14,RBP
JZ 0x00101d38
LAB_00101d03:
CMP R13,R12
JZ 0x00101d38
LAB_00101d08:
MOV EAX,dword ptr [RBP]
MOV EDX,dword ptr [R12]
CMP EAX,EDX
JGE 0x00101cf0
MOV RSI,qword ptr [RBX + 0x8]
CMP RSI,qword ptr [RBX + 0x10]
JZ 0x00101e70
MOV dword ptr [RSI],EAX
ADD RSI,0x4
MOV qword ptr [RBX + 0x8],RSI
LAB_00101d2b:
ADD RBP,0x4
CMP R14,RBP
JNZ 0x00101d03
NOP dword ptr [RAX]
LAB_00101d38:
MOV R15,R14
SUB R15,RBP
LAB_00101d3e:
LEA R14,[RBP + R15*0x1]
TEST R15,R15
JG 0x00101d67
JMP 0x00101d88
LAB_00101d50:
MOV EAX,dword ptr [RBP]
ADD RSI,0x4
ADD RBP,0x4
MOV dword ptr [RSI + -0x4],EAX
MOV qword ptr [RBX + 0x8],RSI
CMP RBP,R14
JZ 0x00101d88
LAB_00101d67:
MOV RSI,qword ptr [RBX + 0x8]
CMP RSI,qword ptr [RBX + 0x10]
JNZ 0x00101d50
MOV RDX,RBP
MOV RDI,RBX
LAB_00101d77:
CALL 0x00102060
ADD RBP,0x4
CMP RBP,R14
JNZ 0x00101d67
NOP dword ptr [RAX]
LAB_00101d88:
MOV RAX,R13
SUB RAX,R12
TEST RAX,RAX
JG 0x00101db0
JMP 0x00101dd0
LAB_00101d98:
MOV EAX,dword ptr [R12]
ADD RSI,0x4
ADD R12,0x4
MOV dword ptr [RSI + -0x4],EAX
MOV qword ptr [RBX + 0x8],RSI
CMP R13,R12
JZ 0x00101dd0
LAB_00101db0:
MOV RSI,qword ptr [RBX + 0x8]
CMP RSI,qword ptr [RBX + 0x10]
JNZ 0x00101d98
MOV RDX,R12
MOV RDI,RBX
CALL 0x00102060
ADD R12,0x4
CMP R13,R12
JNZ 0x00101db0
NOP
LAB_00101dd0:
CMP qword ptr [RSP + 0x8],0x0
JZ 0x00101de7
MOV RSI,qword ptr [RSP + 0x10]
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x00101140
LAB_00101de7:
MOV RAX,qword ptr [RSP]
TEST RAX,RAX
JZ 0x00101dfd
MOV RSI,qword ptr [RSP + 0x18]
MOV RDI,RAX
CALL 0x00101140
LAB_00101dfd:
MOV RAX,qword ptr [RSP + 0x58]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x00101f31
ADD RSP,0x68
MOV RAX,RBX
POP RBX
POP RBP
POP R12
POP R13
POP R14
POP R15
RET
LAB_00101e28:
MOV RSI,qword ptr [RBX + 0x8]
CMP RSI,qword ptr [RBX + 0x10]
JZ 0x00101ea8
MOV dword ptr [RSI],EDX
ADD RSI,0x4
MOV qword ptr [RBX + 0x8],RSI
JMP 0x00101cfa
LAB_00101e48:
MOV qword ptr [RSP + 0x20],0x0
XOR R14D,R14D
MOV qword ptr [RSP + 0x30],0x0
MOV qword ptr [RSP],0x0
JMP 0x00101bb2
LAB_00101e70:
MOV RDX,RBP
MOV RDI,RBX
CALL 0x00102060
JMP 0x00101d2b
LAB_00101e80:
MOV qword ptr [RSP + 0x40],0x0
XOR R13D,R13D
MOV qword ptr [RSP + 0x50],0x0
MOV qword ptr [RSP + 0x8],0x0
JMP 0x00101c3a
LAB_00101ea8:
MOV RDX,R12
MOV RDI,RBX
CALL 0x00102060
JMP 0x00101cfa
LAB_00101ec0:
MOV qword ptr [RBX + 0x10],0x0
PXOR XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
LAB_00101ecf:
MOV R12,qword ptr [RSP + 0x8]
MOV RBP,qword ptr [RSP]
JMP 0x00101d3e
LAB_00101ee0:
MOV RAX,qword ptr [RSP + 0x58]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x00101f31
LAB_00101ef0:
CALL 0x00101110
LAB_00101ef5:
JNZ 0x00101bb2
MOV EAX,dword ptr [RSI]
MOV RCX,qword ptr [RSP]
MOV dword ptr [RCX],EAX
JMP 0x00101bb2
LAB_00101f08:
JNZ 0x00101c3a
MOV EAX,dword ptr [RSI]
MOV RCX,qword ptr [RSP + 0x8]
MOV dword ptr [RCX],EAX
JMP 0x00101c3a
LAB_00101f1c:
MOV RAX,qword ptr [RSP + 0x58]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x00101f31
LAB_00101f2c:
CALL 0x00101110
LAB_00101f31:
CALL 0x00101150 | /* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> >
const&) */
vector * func0(vector *param_1,vector *param_2,int param_3,int param_4,int param_5
,int param_6,int8 param_7,int8 param_8,int8 param_9,
int param_10,int8 param_11)
{
int iVar1;
int iVar2;
long lVar3;
vector *__src;
int *piVar4;
ulong uVar5;
_Iter_less_iter _Var6;
int7 in_register_00000009;
_Iter_less_iter extraout_EDX;
_Iter_less_iter extraout_EDX_00;
int7 in_register_00000011;
long *plVar7;
long lVar8;
int *piVar9;
int *piVar10;
size_t __n;
int *piVar11;
int *piVar12;
size_t unaff_R14;
int *piVar13;
ulong uVar14;
size_t sVar15;
long in_FS_OFFSET;
int uVar16;
int *local_98;
int *local_90;
plVar7 = (long *)CONCAT71(in_register_00000011,param_3);
piVar12 = (int *)CONCAT71(in_register_00000009,param_4);
lVar3 = *(long *)(in_FS_OFFSET + 0x28);
uVar14 = *(long *)(param_2 + 8) - *(long *)param_2;
sVar15 = uVar14;
if (uVar14 == 0) {
unaff_R14 = 0;
local_98 = (int *)0x0;
}
else {
if (uVar14 < 0x7ffffffffffffffd) {
local_98 = (int *)operator_new(uVar14);
__src = *(vector **)param_2;
unaff_R14 = *(long *)(param_2 + 8) - (long)__src;
uVar16 = unaff_R14 == 4;
param_2 = __src;
sVar15 = unaff_R14;
if (4 < (long)unaff_R14) {
memmove(local_98,__src,unaff_R14);
goto LAB_00101bb2;
}
}
else {
uVar16 = lVar3 == *(long *)(in_FS_OFFSET + 0x28);
if (!(bool)uVar16) goto LAB_00101f31;
std::__throw_bad_array_new_length();
}
if ((bool)uVar16) {
*local_98 = *(int *)param_2;
piVar12 = local_98;
}
}
LAB_00101bb2:
piVar13 = (int *)(unaff_R14 + (long)local_98);
piVar10 = (int *)(plVar7[1] - *plVar7);
if (piVar10 == (int *)0x0) {
__n = 0;
local_90 = (int *)0x0;
}
else {
if ((int *)0x7ffffffffffffffc < piVar10) {
if (lVar3 == *(long *)(in_FS_OFFSET + 0x28)) {
/* try { // try from 00101f2c to 00101f30 has its CatchHandler @ 00101f42 */
std::__throw_bad_array_new_length();
}
goto LAB_00101f31;
}
/* try { // try from 00101bfb to 00101bff has its CatchHandler @ 00101f42 */
local_90 = (int *)operator_new((ulong)piVar10);
piVar11 = (int *)*plVar7;
__n = plVar7[1] - (long)piVar11;
piVar12 = piVar10;
if ((long)__n < 5) {
if (__n == 4) {
*local_90 = *piVar11;
piVar12 = local_90;
}
}
else {
memmove(local_90,piVar11,__n);
}
}
_Var6 = (_Iter_less_iter)piVar12;
piVar12 = (int *)(__n + (long)local_90);
if (local_98 != piVar13) {
lVar8 = -2;
uVar5 = (long)sVar15 >> 2;
if (uVar5 != 0) {
lVar8 = 0x3f;
if (uVar5 != 0) {
for (; uVar5 >> lVar8 == 0; lVar8 = lVar8 + -1) {
}
}
lVar8 = (long)(int)lVar8 * 2;
}
std::
__introsort_loop<__normal_iterator<int*,std::vector<int,std::allocator<int>>>,long,__ops::_Iter_less_iter>
((__normal_iterator)local_98,(__normal_iterator)piVar13,lVar8,_Var6);
std::
__final_insertion_sort<__normal_iterator<int*,std::vector<int,std::allocator<int>>>,__ops::_Iter_less_iter>
((__normal_iterator)local_98,(__normal_iterator)piVar13,extraout_EDX);
}
piVar9 = local_98;
piVar11 = local_90;
if (piVar12 == local_90) {
*(int8 *)(param_1 + 0x10) = 0;
*(int (*) [16])param_1 = (int [16])0x0;
}
else {
uVar5 = (long)__n >> 2;
lVar8 = -2;
if (uVar5 != 0) {
lVar8 = 0x3f;
if (uVar5 != 0) {
for (; uVar5 >> lVar8 == 0; lVar8 = lVar8 + -1) {
}
}
lVar8 = (long)(int)lVar8 * 2;
}
std::
__introsort_loop<__normal_iterator<int*,std::vector<int,std::allocator<int>>>,long,__ops::_Iter_less_iter>
((__normal_iterator)local_90,(__normal_iterator)piVar12,lVar8,_Var6);
std::
__final_insertion_sort<__normal_iterator<int*,std::vector<int,std::allocator<int>>>,__ops::_Iter_less_iter>
((__normal_iterator)local_90,(__normal_iterator)piVar12,extraout_EDX_00);
*(int8 *)(param_1 + 0x10) = 0;
*(int (*) [16])param_1 = (int [16])0x0;
if (local_98 != piVar13) {
do {
iVar1 = *piVar9;
iVar2 = *piVar11;
if (iVar1 < iVar2) {
piVar4 = *(int **)(param_1 + 8);
if (piVar4 == *(int **)(param_1 + 0x10)) {
std::vector<int,std::allocator<int>>::_M_realloc_insert<int_const&>
((vector<int,std::allocator<int>> *)param_1,(__normal_iterator)piVar4,piVar9);
}
else {
*piVar4 = iVar1;
*(int **)(param_1 + 8) = piVar4 + 1;
}
piVar9 = piVar9 + 1;
}
else {
if (iVar2 < iVar1) {
piVar4 = *(int **)(param_1 + 8);
if (piVar4 == *(int **)(param_1 + 0x10)) {
std::vector<int,std::allocator<int>>::_M_realloc_insert<int_const&>
((vector<int,std::allocator<int>> *)param_1,(__normal_iterator)piVar4,
piVar11);
}
else {
*piVar4 = iVar2;
*(int **)(param_1 + 8) = piVar4 + 1;
}
}
else {
piVar9 = piVar9 + 1;
}
piVar11 = piVar11 + 1;
}
} while ((piVar13 != piVar9) && (piVar12 != piVar11));
sVar15 = (long)piVar13 - (long)piVar9;
}
}
piVar13 = (int *)((long)piVar9 + sVar15);
if (0 < (long)sVar15) {
do {
while (piVar4 = *(int **)(param_1 + 8), piVar4 == *(int **)(param_1 + 0x10)) {
/* try { // try from 00101d77 to 00101eb2 has its CatchHandler @ 00101f36 */
std::vector<int,std::allocator<int>>::_M_realloc_insert<int_const&>
((vector<int,std::allocator<int>> *)param_1,(__normal_iterator)piVar4,piVar9);
piVar9 = piVar9 + 1;
if (piVar9 == piVar13) goto LAB_00101d88;
}
iVar1 = *piVar9;
piVar9 = piVar9 + 1;
*piVar4 = iVar1;
*(int **)(param_1 + 8) = piVar4 + 1;
} while (piVar9 != piVar13);
}
LAB_00101d88:
if (piVar12 != piVar11 && -1 < (long)piVar12 - (long)piVar11) {
do {
while (piVar13 = *(int **)(param_1 + 8), piVar13 == *(int **)(param_1 + 0x10)) {
std::vector<int,std::allocator<int>>::_M_realloc_insert<int_const&>
((vector<int,std::allocator<int>> *)param_1,(__normal_iterator)piVar13,piVar11);
piVar11 = piVar11 + 1;
if (piVar12 == piVar11) goto LAB_00101dd0;
}
iVar1 = *piVar11;
piVar11 = piVar11 + 1;
*piVar13 = iVar1;
*(int **)(param_1 + 8) = piVar13 + 1;
} while (piVar12 != piVar11);
}
LAB_00101dd0:
if (local_90 != (int *)0x0) {
operator_delete(local_90,(ulong)piVar10);
}
if (local_98 != (int *)0x0) {
operator_delete(local_98,uVar14);
}
if (lVar3 == *(long *)(in_FS_OFFSET + 0x28)) {
return param_1;
}
LAB_00101f31:
/* WARNING: Subroutine does not return */
__stack_chk_fail();
} |
2,315 | func0 |
#include <vector>
#include <algorithm>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& test_tup1, const std::vector<int>& test_tup2) {
std::vector<int> sorted1 = test_tup1;
std::vector<int> sorted2 = test_tup2;
std::sort(sorted1.begin(), sorted1.end());
std::sort(sorted2.begin(), sorted2.end());
std::vector<int> res;
std::set_symmetric_difference(sorted1.begin(), sorted1.end(),
sorted2.begin(), sorted2.end(),
std::back_inserter(res));
return res;
}
| int main() {
assert(func0({3, 4, 5, 6}, {5, 7, 4, 10}) == std::vector<int>({3, 6, 7, 10}));
assert(func0({1, 2, 3, 4}, {7, 2, 3, 9}) == std::vector<int>({1, 4, 7, 9}));
assert(func0({21, 11, 25, 26}, {26, 34, 21, 36}) == std::vector<int>({11, 25, 34, 36}));
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&):
endbr64
push %r15
push %r14
push %r13
mov %rsi,%r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
mov %rdx,%rbx
sub $0x28,%rsp
mov 0x8(%r13),%rax
mov (%rsi),%rsi
mov %rax,%r15
sub %rsi,%r15
mov %r15,%rdx
sar $0x2,%rdx
je 1cc0 <_Z5func0RKSt6vectorIiSaIiEES3_+0x560>
movabs $0x1fffffffffffffff,%rax
cmp %rax,%rdx
ja 1d68 <_Z5func0RKSt6vectorIiSaIiEES3_+0x608>
mov %r15,%rdi
callq 1140 <_Znwm@plt>
mov 0x0(%r13),%rsi
mov %rax,%rbp
mov 0x8(%r13),%rax
mov %rax,%r15
sub %rsi,%r15
cmp %rax,%rsi
je 17d1 <_Z5func0RKSt6vectorIiSaIiEES3_+0x71>
mov %r15,%rdx
mov %rbp,%rdi
callq 1160 <memmove@plt>
lea 0x0(%rbp,%r15,1),%rax
mov (%rbx),%rsi
mov %rax,0x8(%rsp)
mov 0x8(%rbx),%rax
mov %rax,%r8
sub %rsi,%r8
mov %r8,%rdx
sar $0x2,%rdx
je 1cd0 <_Z5func0RKSt6vectorIiSaIiEES3_+0x570>
movabs $0x1fffffffffffffff,%rax
cmp %rax,%rdx
ja 1d6d <_Z5func0RKSt6vectorIiSaIiEES3_+0x60d>
mov %r8,%rdi
callq 1140 <_Znwm@plt>
mov %rax,%r13
mov 0x8(%rbx),%rax
mov (%rbx),%rsi
mov %rax,%r8
sub %rsi,%r8
cmp %rax,%rsi
je 1838 <_Z5func0RKSt6vectorIiSaIiEES3_+0xd8>
mov %r8,%rdx
mov %r13,%rdi
mov %r8,(%rsp)
callq 1160 <memmove@plt>
mov (%rsp),%r8
lea 0x0(%r13,%r8,1),%rax
lea 0x0(%rbp,%r15,1),%rsi
mov %rax,(%rsp)
cmp %rbp,%rsi
je 194e <_Z5func0RKSt6vectorIiSaIiEES3_+0x1ee>
mov %r15,%rax
mov $0x3f,%edx
mov %rbp,%rdi
mov %r8,0x10(%rsp)
sar $0x2,%rax
lea 0x4(%rbp),%r14
bsr %rax,%rax
xor $0x3f,%rax
sub %eax,%edx
movslq %edx,%rdx
add %rdx,%rdx
callq 2070 <_ZSt16__introsort_loopIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEElNS0_5__ops15_Iter_less_iterEEvT_S9_T0_T1_>
cmp $0x40,%r15
mov 0x10(%rsp),%r8
jle 1bd6 <_Z5func0RKSt6vectorIiSaIiEES3_+0x476>
lea 0x40(%rbp),%rbx
jmp 18d6 <_Z5func0RKSt6vectorIiSaIiEES3_+0x176>
nopl 0x0(%rax)
cmp %r14,%rbp
je 18c9 <_Z5func0RKSt6vectorIiSaIiEES3_+0x169>
mov $0x4,%eax
mov %r14,%rdx
mov %rbp,%rsi
mov %r8,0x18(%rsp)
sub %rbp,%rdx
lea 0x0(%rbp,%rax,1),%rdi
mov %r9d,0x10(%rsp)
callq 1160 <memmove@plt>
mov 0x18(%rsp),%r8
mov 0x10(%rsp),%r9d
add $0x4,%r14
mov %r9d,0x0(%rbp)
cmp %r14,%rbx
je 190e <_Z5func0RKSt6vectorIiSaIiEES3_+0x1ae>
mov (%r14),%r9d
cmp 0x0(%rbp),%r9d
jl 1898 <_Z5func0RKSt6vectorIiSaIiEES3_+0x138>
mov -0x4(%r14),%edx
lea -0x4(%r14),%rax
cmp %edx,%r9d
jge 1d40 <_Z5func0RKSt6vectorIiSaIiEES3_+0x5e0>
mov %edx,0x4(%rax)
mov %rax,%rsi
mov -0x4(%rax),%edx
sub $0x4,%rax
cmp %edx,%r9d
jl 18f0 <_Z5func0RKSt6vectorIiSaIiEES3_+0x190>
add $0x4,%r14
mov %r9d,(%rsi)
cmp %r14,%rbx
jne 18d6 <_Z5func0RKSt6vectorIiSaIiEES3_+0x176>
cmp %rbx,0x8(%rsp)
je 194e <_Z5func0RKSt6vectorIiSaIiEES3_+0x1ee>
nopl (%rax)
mov (%rbx),%esi
mov -0x4(%rbx),%edx
lea -0x4(%rbx),%rax
cmp %edx,%esi
jge 1ce0 <_Z5func0RKSt6vectorIiSaIiEES3_+0x580>
nopl 0x0(%rax)
mov %edx,0x4(%rax)
mov %rax,%rdi
mov -0x4(%rax),%edx
sub $0x4,%rax
cmp %edx,%esi
jl 1930 <_Z5func0RKSt6vectorIiSaIiEES3_+0x1d0>
mov %esi,(%rdi)
add $0x4,%rbx
cmp %rbx,0x8(%rsp)
jne 1918 <_Z5func0RKSt6vectorIiSaIiEES3_+0x1b8>
mov (%rsp),%rsi
cmp %r13,%rsi
je 1d00 <_Z5func0RKSt6vectorIiSaIiEES3_+0x5a0>
mov %r8,%rax
mov $0x3f,%edx
mov %r13,%rdi
mov %r8,0x10(%rsp)
sar $0x2,%rax
lea 0x4(%r13),%rbx
bsr %rax,%rax
xor $0x3f,%rax
sub %eax,%edx
movslq %edx,%rdx
add %rdx,%rdx
callq 2070 <_ZSt16__introsort_loopIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEElNS0_5__ops15_Iter_less_iterEEvT_S9_T0_T1_>
mov 0x10(%rsp),%r8
cmp $0x40,%r8
jle 1c3d <_Z5func0RKSt6vectorIiSaIiEES3_+0x4dd>
lea 0x40(%r13),%rax
mov %rax,0x10(%rsp)
jmp 19d4 <_Z5func0RKSt6vectorIiSaIiEES3_+0x274>
nopw 0x0(%rax,%rax,1)
cmp %rbx,%r13
je 19c5 <_Z5func0RKSt6vectorIiSaIiEES3_+0x265>
mov %rbx,%rdx
mov $0x4,%eax
mov %r13,%rsi
sub %r13,%rdx
lea 0x0(%r13,%rax,1),%rdi
callq 1160 <memmove@plt>
mov %r14d,0x0(%r13)
add $0x4,%rbx
cmp %rbx,0x10(%rsp)
je 1a10 <_Z5func0RKSt6vectorIiSaIiEES3_+0x2b0>
mov (%rbx),%r14d
cmp 0x0(%r13),%r14d
jl 19a8 <_Z5func0RKSt6vectorIiSaIiEES3_+0x248>
mov -0x4(%rbx),%edx
lea -0x4(%rbx),%rax
cmp %edx,%r14d
jge 1d38 <_Z5func0RKSt6vectorIiSaIiEES3_+0x5d8>
nopl (%rax)
mov %edx,0x4(%rax)
mov %rax,%rsi
mov -0x4(%rax),%edx
sub $0x4,%rax
cmp %edx,%r14d
jl 19f0 <_Z5func0RKSt6vectorIiSaIiEES3_+0x290>
mov %r14d,(%rsi)
add $0x4,%rbx
cmp %rbx,0x10(%rsp)
jne 19d4 <_Z5func0RKSt6vectorIiSaIiEES3_+0x274>
mov 0x10(%rsp),%rbx
cmp %rbx,(%rsp)
je 1a4d <_Z5func0RKSt6vectorIiSaIiEES3_+0x2ed>
nopl 0x0(%rax,%rax,1)
mov (%rbx),%ecx
mov -0x4(%rbx),%edx
mov %rbx,%rsi
lea -0x4(%rbx),%rax
cmp %edx,%ecx
jge 1a41 <_Z5func0RKSt6vectorIiSaIiEES3_+0x2e1>
mov %edx,0x4(%rax)
mov %rax,%rsi
mov -0x4(%rax),%edx
sub $0x4,%rax
cmp %edx,%ecx
jl 1a30 <_Z5func0RKSt6vectorIiSaIiEES3_+0x2d0>
mov %ecx,(%rsi)
add $0x4,%rbx
cmp %rbx,(%rsp)
jne 1a20 <_Z5func0RKSt6vectorIiSaIiEES3_+0x2c0>
pxor %xmm0,%xmm0
mov %r13,%r14
mov %rbp,%rbx
movq $0x0,0x10(%r12)
movups %xmm0,(%r12)
cmp %rbp,0x8(%rsp)
jne 1a8b <_Z5func0RKSt6vectorIiSaIiEES3_+0x32b>
jmp 1ac8 <_Z5func0RKSt6vectorIiSaIiEES3_+0x368>
xchg %ax,%ax
jg 1c80 <_Z5func0RKSt6vectorIiSaIiEES3_+0x520>
add $0x4,%rbx
add $0x4,%r14
cmp %rbx,0x8(%rsp)
je 1ac0 <_Z5func0RKSt6vectorIiSaIiEES3_+0x360>
cmp %r14,(%rsp)
je 1ac0 <_Z5func0RKSt6vectorIiSaIiEES3_+0x360>
mov (%rbx),%edx
mov (%r14),%eax
cmp %eax,%edx
jge 1a70 <_Z5func0RKSt6vectorIiSaIiEES3_+0x310>
mov 0x8(%r12),%rsi
cmp 0x10(%r12),%rsi
je 1ca0 <_Z5func0RKSt6vectorIiSaIiEES3_+0x540>
mov %edx,(%rsi)
add $0x4,%rsi
mov %rsi,0x8(%r12)
add $0x4,%rbx
cmp %rbx,0x8(%rsp)
jne 1a85 <_Z5func0RKSt6vectorIiSaIiEES3_+0x325>
nopw 0x0(%rax,%rax,1)
mov 0x8(%rsp),%r15
sub %rbx,%r15
mov %r15,%rax
sar $0x2,%rax
mov %rax,0x8(%rsp)
test %r15,%r15
jg 1afa <_Z5func0RKSt6vectorIiSaIiEES3_+0x39a>
jmp 1b20 <_Z5func0RKSt6vectorIiSaIiEES3_+0x3c0>
nopl 0x0(%rax,%rax,1)
mov (%rbx),%eax
add $0x4,%rsi
add $0x4,%rbx
mov %eax,-0x4(%rsi)
subq $0x1,0x8(%rsp)
mov %rsi,0x8(%r12)
je 1b20 <_Z5func0RKSt6vectorIiSaIiEES3_+0x3c0>
mov 0x8(%r12),%rsi
cmp 0x10(%r12),%rsi
jne 1ae0 <_Z5func0RKSt6vectorIiSaIiEES3_+0x380>
mov %rbx,%rdx
mov %r12,%rdi
callq 1de0 <_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_>
add $0x4,%rbx
subq $0x1,0x8(%rsp)
jne 1afa <_Z5func0RKSt6vectorIiSaIiEES3_+0x39a>
nopl (%rax)
mov (%rsp),%rax
sub %r14,%rax
mov %rax,%rbx
sar $0x2,%rbx
test %rax,%rax
jg 1b51 <_Z5func0RKSt6vectorIiSaIiEES3_+0x3f1>
jmp 1b78 <_Z5func0RKSt6vectorIiSaIiEES3_+0x418>
nopl (%rax)
mov (%r14),%eax
add $0x4,%rsi
add $0x4,%r14
mov %eax,-0x4(%rsi)
mov %rsi,0x8(%r12)
sub $0x1,%rbx
je 1b78 <_Z5func0RKSt6vectorIiSaIiEES3_+0x418>
mov 0x8(%r12),%rsi
cmp 0x10(%r12),%rsi
jne 1b38 <_Z5func0RKSt6vectorIiSaIiEES3_+0x3d8>
mov %r14,%rdx
mov %r12,%rdi
callq 1de0 <_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_>
add $0x4,%r14
sub $0x1,%rbx
jne 1b51 <_Z5func0RKSt6vectorIiSaIiEES3_+0x3f1>
nopw 0x0(%rax,%rax,1)
test %r13,%r13
je 1b85 <_Z5func0RKSt6vectorIiSaIiEES3_+0x425>
mov %r13,%rdi
callq 1130 <_ZdlPv@plt>
test %rbp,%rbp
je 1b92 <_Z5func0RKSt6vectorIiSaIiEES3_+0x432>
mov %rbp,%rdi
callq 1130 <_ZdlPv@plt>
add $0x28,%rsp
mov %r12,%rax
pop %rbx
pop %rbp
pop %r12
pop %r13
pop %r14
pop %r15
retq
nopl 0x0(%rax)
cmp %r14,%rbp
je 1bcf <_Z5func0RKSt6vectorIiSaIiEES3_+0x46f>
mov $0x4,%eax
mov %r14,%rdx
mov %rbp,%rsi
mov %r8,0x10(%rsp)
sub %rbp,%rdx
lea 0x0(%rbp,%rax,1),%rdi
callq 1160 <memmove@plt>
mov 0x10(%rsp),%r8
mov %ebx,0x0(%rbp)
add $0x4,%r14
cmp %r14,0x8(%rsp)
je 194e <_Z5func0RKSt6vectorIiSaIiEES3_+0x1ee>
mov (%r14),%ebx
cmp 0x0(%rbp),%ebx
jl 1ba8 <_Z5func0RKSt6vectorIiSaIiEES3_+0x448>
mov -0x4(%r14),%edx
lea -0x4(%r14),%rax
cmp %edx,%ebx
jge 1d50 <_Z5func0RKSt6vectorIiSaIiEES3_+0x5f0>
nopl 0x0(%rax)
mov %edx,0x4(%rax)
mov %rax,%rsi
mov -0x4(%rax),%edx
sub $0x4,%rax
cmp %edx,%ebx
jl 1c00 <_Z5func0RKSt6vectorIiSaIiEES3_+0x4a0>
mov %ebx,(%rsi)
jmp 1bd2 <_Z5func0RKSt6vectorIiSaIiEES3_+0x472>
nopl (%rax)
cmp %rbx,%r13
je 1c35 <_Z5func0RKSt6vectorIiSaIiEES3_+0x4d5>
mov %rbx,%rdx
mov $0x4,%eax
mov %r13,%rsi
sub %r13,%rdx
lea 0x0(%r13,%rax,1),%rdi
callq 1160 <memmove@plt>
mov %r14d,0x0(%r13)
add $0x4,%rbx
cmp %rbx,(%rsp)
je 1a4d <_Z5func0RKSt6vectorIiSaIiEES3_+0x2ed>
mov (%rbx),%r14d
cmp 0x0(%r13),%r14d
jl 1c18 <_Z5func0RKSt6vectorIiSaIiEES3_+0x4b8>
mov -0x4(%rbx),%edx
lea -0x4(%rbx),%rax
cmp %r14d,%edx
jle 1d60 <_Z5func0RKSt6vectorIiSaIiEES3_+0x600>
mov %edx,0x4(%rax)
mov %rax,%rsi
mov -0x4(%rax),%edx
sub $0x4,%rax
cmp %edx,%r14d
jl 1c60 <_Z5func0RKSt6vectorIiSaIiEES3_+0x500>
mov %r14d,(%rsi)
jmp 1c39 <_Z5func0RKSt6vectorIiSaIiEES3_+0x4d9>
nopw 0x0(%rax,%rax,1)
mov 0x8(%r12),%rsi
cmp 0x10(%r12),%rsi
je 1cb0 <_Z5func0RKSt6vectorIiSaIiEES3_+0x550>
mov %eax,(%rsi)
add $0x4,%rsi
mov %rsi,0x8(%r12)
jmpq 1a7a <_Z5func0RKSt6vectorIiSaIiEES3_+0x31a>
nopl 0x0(%rax)
mov %rbx,%rdx
mov %r12,%rdi
callq 1de0 <_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_>
jmpq 1aaf <_Z5func0RKSt6vectorIiSaIiEES3_+0x34f>
mov %r14,%rdx
mov %r12,%rdi
callq 1de0 <_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_>
jmpq 1a7a <_Z5func0RKSt6vectorIiSaIiEES3_+0x31a>
xor %ebp,%ebp
jmpq 17c1 <_Z5func0RKSt6vectorIiSaIiEES3_+0x61>
nopw 0x0(%rax,%rax,1)
xor %r13d,%r13d
jmpq 1820 <_Z5func0RKSt6vectorIiSaIiEES3_+0xc0>
nopl 0x0(%rax,%rax,1)
mov %rbx,%rdi
add $0x4,%rbx
mov %esi,(%rdi)
cmp %rbx,0x8(%rsp)
jne 1918 <_Z5func0RKSt6vectorIiSaIiEES3_+0x1b8>
jmpq 194e <_Z5func0RKSt6vectorIiSaIiEES3_+0x1ee>
nopl 0x0(%rax)
movq $0x0,0x10(%r12)
mov %r15,%rax
pxor %xmm0,%xmm0
sar $0x2,%rax
movups %xmm0,(%r12)
mov %rax,0x8(%rsp)
test %r15,%r15
jle 1b78 <_Z5func0RKSt6vectorIiSaIiEES3_+0x418>
mov %rsi,%r14
mov %rbp,%rbx
jmpq 1afa <_Z5func0RKSt6vectorIiSaIiEES3_+0x39a>
nopw 0x0(%rax,%rax,1)
mov %rbx,%rsi
jmpq 1a02 <_Z5func0RKSt6vectorIiSaIiEES3_+0x2a2>
mov %r14,%rsi
jmpq 1902 <_Z5func0RKSt6vectorIiSaIiEES3_+0x1a2>
nopl 0x0(%rax,%rax,1)
mov %r14,%rsi
mov %ebx,(%rsi)
jmpq 1bd2 <_Z5func0RKSt6vectorIiSaIiEES3_+0x472>
nopw 0x0(%rax,%rax,1)
mov %rbx,%rsi
jmpq 1c72 <_Z5func0RKSt6vectorIiSaIiEES3_+0x512>
callq 10e0 <_ZSt17__throw_bad_allocv@plt>
callq 10e0 <_ZSt17__throw_bad_allocv@plt>
endbr64
mov %rax,%r12
jmpq 11b3 <_Z5func0RKSt6vectorIiSaIiEES3_.cold+0x1e>
endbr64
mov %rax,%rbx
jmpq 1195 <_Z5func0RKSt6vectorIiSaIiEES3_.cold>
nopw 0x0(%rax,%rax,1)
| _Z5func0RKSt6vectorIiSaIiEES3_:
endbr64
push r15
push r14
push r13
push r12
push rbp
mov rbp, rdx
push rbx
mov rbx, rdi
sub rsp, 88h
mov rax, fs:28h
mov [rsp+0B8h+var_40], rax
mov rax, [rsi+8]
sub rax, [rsi]
mov [rsp+0B8h+var_A8], rax
mov [rsp+0B8h+var_98], rax
jz loc_1E88
mov rdi, rax; unsigned __int64
mov rax, 7FFFFFFFFFFFFFFCh
cmp rax, rdi
jb loc_2121
mov r12, rsi
call __Znwm; operator new(ulong)
mov rsi, [r12]; src
mov r14, rax
mov rax, [r12+8]
mov [rsp+0B8h+var_78], r14
sub rax, rsi
mov [rsp+0B8h+var_A8], rax
mov rdx, rax; n
mov r15, rax
mov rax, [rsp+0B8h+var_98]
add rax, r14
mov [rsp+0B8h+var_68], rax
cmp rdx, 4
jle loc_2136
mov rdi, r14; dest
call _memmove
loc_1A5C:
add r15, r14
mov r12, [rbp+8]
pxor xmm0, xmm0
sub r12, [rbp+0]
mov [rsp+0B8h+var_70], r15
mov [rsp+0B8h+var_48], 0
mov [rsp+0B8h+var_A0], r12
movaps [rsp+0B8h+var_58], xmm0
jz loc_1EA8
mov rax, 7FFFFFFFFFFFFFFCh
cmp rax, r12
jb loc_2155
mov rdi, r12; unsigned __int64
call __Znwm; operator new(ulong)
mov rsi, [rbp+0]; src
mov r12, [rbp+8]
mov [rsp+0B8h+src], rax
mov rdi, rax; dest
mov rcx, [rsp+0B8h+var_A0]
mov qword ptr [rsp+0B8h+var_58], rax
sub r12, rsi
add rax, rcx
mov r13, r12
mov [rsp+0B8h+var_48], rax
cmp r12, 4
jle loc_2146
mov rdx, r12; n
call _memmove
loc_1ADE:
mov rax, [rsp+0B8h+src]
add r13, rax
mov qword ptr [rsp+0B8h+var_58+8], r13
cmp r15, r14
jz loc_1BFC
mov rax, [rsp+0B8h+var_A8]
lea rbp, [r14+4]
sar rax, 2
jz loc_1FC0
bsr rdx, rax
mov rsi, r15
mov rdi, r14
movsxd rdx, edx
add rdx, rdx
call _ZSt16__introsort_loopIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEElNS0_5__ops15_Iter_less_iterEEvT_S9_T0_T1__isra_0; std::__introsort_loop<__gnu_cxx::__normal_iterator<int *,std::vector<int>>,long,__gnu_cxx::__ops::_Iter_less_iter>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__normal_iterator<int *,std::vector<int>>,long,__gnu_cxx::__ops::_Iter_less_iter) [clone]
cmp [rsp+0B8h+var_A8], 40h ; '@'
jle loc_1FD2
lea r8, [r14+40h]
mov [rsp+0B8h+var_90], r12
mov [rsp+0B8h+var_88], rbx
mov r12, r8
mov rbx, r14
jmp short loc_1B6F
loc_1B40:
mov rdx, rbp
sub rdx, rbx; n
cmp rdx, 4
jle loc_20E7
mov edi, 4
mov rsi, rbx; src
sub rdi, rdx
add rdi, rbp; dest
call _memmove
loc_1B63:
add rbp, 4
mov [rbx], r14d
cmp r12, rbp
jz short loc_1BAE
loc_1B6F:
mov r14d, [rbp+0]
mov eax, [rbx]
mov rcx, rbp
cmp r14d, eax
jl short loc_1B40
mov edx, [rbp-4]
lea rax, [rbp-4]
cmp r14d, edx
jge short loc_1BA2
nop dword ptr [rax+00000000h]
loc_1B90:
mov [rax+4], edx
mov rcx, rax
mov edx, [rax-4]
sub rax, 4
cmp r14d, edx
jl short loc_1B90
loc_1BA2:
add rbp, 4
mov [rcx], r14d
cmp r12, rbp
jnz short loc_1B6F
loc_1BAE:
mov r8, r12
mov r14, rbx
mov r12, [rsp+0B8h+var_90]
mov rbx, [rsp+0B8h+var_88]
cmp r15, r8
jz short loc_1BFC
nop dword ptr [rax+rax+00h]
loc_1BC8:
mov ecx, [r8]
mov edx, [r8-4]
lea rax, [r8-4]
cmp ecx, edx
jge loc_20B0
nop dword ptr [rax+rax+00h]
loc_1BE0:
mov [rax+4], edx
mov rsi, rax
mov edx, [rax-4]
sub rax, 4
cmp ecx, edx
jl short loc_1BE0
add r8, 4
mov [rsi], ecx
cmp r15, r8
jnz short loc_1BC8
loc_1BFC:
mov rax, [rsp+0B8h+src]
cmp r13, rax
jz loc_2077
loc_1C0A:
lea rbp, [rax+4]
mov rax, r12
sar rax, 2
jz loc_1ECB
bsr rdx, rax
mov rdi, [rsp+0B8h+src]
mov rsi, r13
movsxd rdx, edx
add rdx, rdx
call _ZSt16__introsort_loopIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEElNS0_5__ops15_Iter_less_iterEEvT_S9_T0_T1__isra_0; std::__introsort_loop<__gnu_cxx::__normal_iterator<int *,std::vector<int>>,long,__gnu_cxx::__ops::_Iter_less_iter>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__normal_iterator<int *,std::vector<int>>,long,__gnu_cxx::__ops::_Iter_less_iter) [clone]
cmp r12, 40h ; '@'
jle loc_1EDF
mov rax, [rsp+0B8h+src]
mov [rsp+0B8h+var_90], r13
mov r12, rbp
mov ebp, 4
mov [rsp+0B8h+var_80], rbx
lea r8, [rax+40h]
mov [rsp+0B8h+var_88], r14
mov rbx, rax
mov r13, r8
jmp short loc_1C95
loc_1C68:
mov rdx, r12
sub rdx, rbx; n
cmp rdx, 4
jle loc_20F5
mov rdi, rbp
mov rsi, rbx; src
sub rdi, rdx
add rdi, r12; dest
call _memmove
loc_1C89:
add r12, 4
mov [rbx], r14d
cmp r13, r12
jz short loc_1CD6
loc_1C95:
mov r14d, [r12]
mov eax, [rbx]
mov rsi, r12
cmp r14d, eax
jl short loc_1C68
mov edx, [r12-4]
lea rax, [r12-4]
cmp r14d, edx
jge short loc_1CCA
nop word ptr [rax+rax+00h]
loc_1CB8:
mov [rax+4], edx
mov rsi, rax
mov edx, [rax-4]
sub rax, 4
cmp r14d, edx
jl short loc_1CB8
loc_1CCA:
add r12, 4
mov [rsi], r14d
cmp r13, r12
jnz short loc_1C95
loc_1CD6:
mov r8, r13
mov r13, [rsp+0B8h+var_90]
mov r14, [rsp+0B8h+var_88]
mov rbx, [rsp+0B8h+var_80]
cmp r13, r8
jz short loc_1D24
nop dword ptr [rax]
loc_1CF0:
mov ecx, [r8]
mov edx, [r8-4]
lea rax, [r8-4]
cmp ecx, edx
jge loc_20D0
nop dword ptr [rax+rax+00h]
loc_1D08:
mov [rax+4], edx
mov rsi, rax
mov edx, [rax-4]
sub rax, 4
cmp ecx, edx
jl short loc_1D08
add r8, 4
mov [rsi], ecx
cmp r13, r8
jnz short loc_1CF0
loc_1D24:
pxor xmm0, xmm0
mov qword ptr [rbx+10h], 0
movups xmmword ptr [rbx], xmm0
cmp r15, r14
jz loc_2086
mov r12, [rsp+0B8h+src]
mov rbp, r14
jmp short loc_1D68
loc_1D50:
jg loc_1F90
add rbp, 4
loc_1D5A:
add r12, 4
cmp r15, rbp
jz short loc_1D98
loc_1D63:
cmp r13, r12
jz short loc_1D98
loc_1D68:
mov eax, [rbp+0]
mov edx, [r12]
cmp eax, edx
jge short loc_1D50
mov rsi, [rbx+8]
cmp rsi, [rbx+10h]
jz loc_1FB0
mov [rsi], eax
add rsi, 4
mov [rbx+8], rsi
loc_1D8B:
add rbp, 4
cmp r15, rbp
jnz short loc_1D63
nop dword ptr [rax+00h]
loc_1D98:
sub r15, rbp
mov [rsp+0B8h+var_A8], r15
mov rax, r15
loc_1DA3:
lea r15, [rbp+rax+0]
test rax, rax
jg short loc_1DC7
jmp short loc_1DE8
loc_1DB0:
mov eax, [rbp+0]
add rsi, 4
add rbp, 4
mov [rsi-4], eax
mov [rbx+8], rsi
cmp rbp, r15
jz short loc_1DE8
loc_1DC7:
mov rsi, [rbx+8]
cmp rsi, [rbx+10h]
jnz short loc_1DB0
mov rdx, rbp
mov rdi, rbx
call _ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_; std::vector<int>::_M_realloc_insert<int const&>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,int const&)
add rbp, 4
cmp rbp, r15
jnz short loc_1DC7
nop dword ptr [rax]
loc_1DE8:
mov rax, r13
sub rax, r12
test rax, rax
jg short loc_1E10
jmp short loc_1E30
loc_1DF8:
mov eax, [r12]
add rsi, 4
add r12, 4
mov [rsi-4], eax
mov [rbx+8], rsi
cmp r13, r12
jz short loc_1E30
loc_1E10:
mov rsi, [rbx+8]
cmp rsi, [rbx+10h]
jnz short loc_1DF8
mov rdx, r12
mov rdi, rbx
call _ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_; std::vector<int>::_M_realloc_insert<int const&>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,int const&)
add r12, 4
cmp r13, r12
jnz short loc_1E10
xchg ax, ax
loc_1E30:
cmp [rsp+0B8h+src], 0
jz short loc_1E47
mov rsi, [rsp+0B8h+var_A0]; unsigned __int64
mov rdi, [rsp+0B8h+src]; void *
call __ZdlPvm; operator delete(void *,ulong)
loc_1E47:
test r14, r14
jz short loc_1E59
mov rsi, [rsp+0B8h+var_98]; unsigned __int64
mov rdi, r14; void *
call __ZdlPvm; operator delete(void *,ulong)
loc_1E59:
mov rax, [rsp+0B8h+var_40]
sub rax, fs:28h
jnz loc_216A
add rsp, 88h
mov rax, rbx
pop rbx
pop rbp
pop r12
pop r13
pop r14
pop r15
retn
loc_1E88:
mov [rsp+0B8h+var_78], 0
xor r15d, r15d
xor r14d, r14d
mov [rsp+0B8h+var_68], 0
jmp loc_1A5C
loc_1EA8:
mov qword ptr [rsp+0B8h+var_58], 0
xor r13d, r13d
mov [rsp+0B8h+var_48], 0
mov [rsp+0B8h+src], 0
jmp loc_1ADE
loc_1ECB:
mov rdi, [rsp+0B8h+src]
mov rdx, 0FFFFFFFFFFFFFFFEh
mov rsi, r13
call _ZSt16__introsort_loopIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEElNS0_5__ops15_Iter_less_iterEEvT_S9_T0_T1__isra_0; std::__introsort_loop<__gnu_cxx::__normal_iterator<int *,std::vector<int>>,long,__gnu_cxx::__ops::_Iter_less_iter>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__normal_iterator<int *,std::vector<int>>,long,__gnu_cxx::__ops::_Iter_less_iter) [clone]
loc_1EDF:
cmp r13, rbp
jz loc_1D24
mov [rsp+0B8h+var_90], r14
mov r12, rbp
mov r14, [rsp+0B8h+src]
mov ebp, 4
mov [rsp+0B8h+var_88], rbx
mov rbx, r13
jmp short loc_1F35
loc_1F08:
mov rdx, r12
sub rdx, r14; n
cmp rdx, 4
jle loc_2104
mov rdi, rbp
mov rsi, r14; src
sub rdi, rdx
add rdi, r12; dest
call _memmove
loc_1F29:
add r12, 4
mov [r14], r13d
cmp r12, rbx
jz short loc_1F76
loc_1F35:
mov r13d, [r12]
mov eax, [r14]
mov rcx, r12
cmp r13d, eax
jl short loc_1F08
mov edx, [r12-4]
lea rax, [r12-4]
cmp r13d, edx
jge short loc_1F6A
nop dword ptr [rax+rax+00h]
loc_1F58:
mov [rax+4], edx
mov rcx, rax
mov edx, [rax-4]
sub rax, 4
cmp r13d, edx
jl short loc_1F58
loc_1F6A:
add r12, 4
mov [rcx], r13d
cmp r12, rbx
jnz short loc_1F35
loc_1F76:
mov r13, rbx
mov r14, [rsp+0B8h+var_90]
mov rbx, [rsp+0B8h+var_88]
jmp loc_1D24
loc_1F90:
mov rsi, [rbx+8]
cmp rsi, [rbx+10h]
jz loc_20A0
mov [rsi], edx
add rsi, 4
mov [rbx+8], rsi
jmp loc_1D5A
loc_1FB0:
mov rdx, rbp
mov rdi, rbx
call _ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_; std::vector<int>::_M_realloc_insert<int const&>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,int const&)
jmp loc_1D8B
loc_1FC0:
mov rdx, 0FFFFFFFFFFFFFFFEh
mov rsi, r15
mov rdi, r14
call _ZSt16__introsort_loopIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEElNS0_5__ops15_Iter_less_iterEEvT_S9_T0_T1__isra_0; std::__introsort_loop<__gnu_cxx::__normal_iterator<int *,std::vector<int>>,long,__gnu_cxx::__ops::_Iter_less_iter>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__normal_iterator<int *,std::vector<int>>,long,__gnu_cxx::__ops::_Iter_less_iter) [clone]
loc_1FD2:
cmp r15, rbp
jz loc_1BFC
mov [rsp+0B8h+var_90], rbx
mov rbx, r15
mov r15, r14
jmp short loc_201F
loc_1FF0:
mov rdx, rbp
sub rdx, r15; n
cmp rdx, 4
jle loc_2113
mov edi, 4
mov rsi, r15; src
sub rdi, rdx
add rdi, rbp; dest
call _memmove
loc_2013:
add rbp, 4
mov [r15], r14d
cmp rbx, rbp
jz short loc_205E
loc_201F:
mov r14d, [rbp+0]
mov eax, [r15]
mov rcx, rbp
cmp r14d, eax
jl short loc_1FF0
mov edx, [rbp-4]
lea rax, [rbp-4]
cmp r14d, edx
jge short loc_2052
nop word ptr [rax+rax+00h]
loc_2040:
mov [rax+4], edx
mov rcx, rax
mov edx, [rax-4]
sub rax, 4
cmp r14d, edx
jl short loc_2040
loc_2052:
add rbp, 4
mov [rcx], r14d
cmp rbx, rbp
jnz short loc_201F
loc_205E:
mov rax, [rsp+0B8h+src]
mov r14, r15
mov r15, rbx
mov rbx, [rsp+0B8h+var_90]
cmp r13, rax
jnz loc_1C0A
loc_2077:
mov qword ptr [rbx+10h], 0
pxor xmm0, xmm0
movups xmmword ptr [rbx], xmm0
loc_2086:
mov r12, [rsp+0B8h+src]
mov rax, [rsp+0B8h+var_A8]
mov rbp, r14
jmp loc_1DA3
loc_20A0:
mov rdx, r12
mov rdi, rbx
call _ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_; std::vector<int>::_M_realloc_insert<int const&>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,int const&)
jmp loc_1D5A
loc_20B0:
mov rsi, r8
add r8, 4
mov [rsi], ecx
cmp r15, r8
jnz loc_1BC8
jmp loc_1BFC
loc_20D0:
mov rsi, r8
add r8, 4
mov [rsi], ecx
cmp r13, r8
jnz loc_1CF0
jmp loc_1D24
loc_20E7:
jnz loc_1B63
mov [rbp+0], eax
jmp loc_1B63
loc_20F5:
jnz loc_1C89
mov [r12], eax
jmp loc_1C89
loc_2104:
jnz loc_1F29
mov [r12], eax
jmp loc_1F29
loc_2113:
jnz loc_2013
mov [rbp+0], eax
jmp loc_2013
loc_2121:
mov rax, [rsp+0B8h+var_40]
sub rax, fs:28h
jnz short loc_216A
call __ZSt28__throw_bad_array_new_lengthv; std::__throw_bad_array_new_length(void)
loc_2136:
jnz loc_1A5C
mov eax, [rsi]
mov [r14], eax
jmp loc_1A5C
loc_2146:
jnz loc_1ADE
mov eax, [rsi]
mov [rdi], eax
jmp loc_1ADE
loc_2155:
mov rax, [rsp+0B8h+var_40]
sub rax, fs:28h
jnz short loc_216A
call __ZSt28__throw_bad_array_new_lengthv; std::__throw_bad_array_new_length(void)
loc_216A:
call ___stack_chk_fail
endbr64
mov rbp, rax
jmp _Z5func0RKSt6vectorIiSaIiEES3__cold; func0(std::vector<int> const&,std::vector<int> const&) [clone]
endbr64
mov rbp, rax
jmp loc_1192 | _QWORD * func0(_QWORD *a1, _QWORD *a2, _QWORD *a3)
{
char *ii; // r14
signed long long v4; // r15
_QWORD *j; // rbx
unsigned long long v7; // rax
_QWORD *v8; // r12
char *v9; // rax
bool v10; // zf
char *v11; // r15
signed long long v12; // r12
char *v13; // rax
_DWORD *v14; // rsi
signed long long v15; // r13
char *v16; // r13
char *v17; // rbp
unsigned long long v18; // rdx
char *v19; // r12
char *v20; // rbx
int v21; // r14d
char *v22; // rcx
int v23; // edx
char *i; // rax
char *v25; // r8
int v26; // ecx
int v27; // edx
char *v28; // rax
char *v29; // rsi
char *v30; // rax
char *v31; // rbp
unsigned long long v32; // rdx
char *v33; // r12
char *v34; // r13
int v35; // r14d
char *v36; // rsi
int v37; // edx
char *n; // rax
char *v39; // r8
int v40; // ecx
int v41; // edx
char *v42; // rax
char *v43; // rsi
char *v44; // r12
char *v45; // rbp
int v46; // eax
int v47; // edx
_DWORD *v48; // rsi
long long v49; // rax
char *v50; // r15
int v51; // eax
long long v52; // rsi
long long v53; // rsi
int v54; // eax
long long v55; // rsi
long long v56; // rsi
char *v58; // r12
char *v59; // rbx
int v60; // r13d
char *v61; // rcx
int v62; // edx
char *m; // rax
_DWORD *v64; // rsi
char *v65; // rbx
char *v66; // r15
int v67; // r14d
char *v68; // rcx
int v69; // edx
char *k; // rax
char *v71; // rsi
char *v72; // rsi
char *src; // [rsp+8h] [rbp-B0h]
signed long long v74; // [rsp+10h] [rbp-A8h]
unsigned long long v75; // [rsp+18h] [rbp-A0h]
unsigned long long v76; // [rsp+20h] [rbp-98h]
signed long long v77; // [rsp+28h] [rbp-90h]
char *v78; // [rsp+28h] [rbp-90h]
char *v79; // [rsp+30h] [rbp-88h]
_QWORD *v80; // [rsp+30h] [rbp-88h]
j = a1;
v7 = a2[1] - *a2;
v74 = v7;
v76 = v7;
if ( v7 )
{
if ( v7 > 0x7FFFFFFFFFFFFFFCLL )
{
std::__throw_bad_array_new_length();
}
else
{
v8 = a2;
v9 = (char *)operator new(v7);
a2 = (_QWORD *)*a2;
ii = v9;
v74 = v8[1] - (_QWORD)a2;
v4 = v74;
v10 = v74 == 4;
if ( v74 > 4 )
{
memmove(v9, a2, v74);
goto LABEL_5;
}
}
if ( v10 )
*(_DWORD *)ii = *(_DWORD *)a2;
}
else
{
v4 = 0LL;
ii = 0LL;
}
LABEL_5:
v11 = &ii[v4];
v12 = a3[1] - *a3;
v75 = v12;
if ( v12 )
{
if ( (unsigned long long)v12 > 0x7FFFFFFFFFFFFFFCLL )
std::__throw_bad_array_new_length();
v13 = (char *)operator new(v12);
v14 = (_DWORD *)*a3;
src = v13;
v12 = a3[1] - *a3;
v15 = v12;
if ( v12 <= 4 )
{
if ( v12 == 4 )
*(_DWORD *)v13 = *v14;
}
else
{
memmove(v13, v14, v12);
}
}
else
{
v15 = 0LL;
src = 0LL;
}
v16 = &src[v15];
if ( v11 == ii )
goto LABEL_24;
v17 = ii + 4;
if ( v74 >> 2 )
{
_BitScanReverse64(&v18, v74 >> 2);
std::__introsort_loop<__gnu_cxx::__normal_iterator<int *,std::vector<int>>,long,__gnu_cxx::__ops::_Iter_less_iter>(
ii,
v11,
2LL * (int)v18);
if ( v74 > 64 )
{
v77 = v12;
v19 = ii + 64;
v20 = ii;
do
{
while ( 1 )
{
v21 = *(_DWORD *)v17;
v22 = v17;
if ( *(_DWORD *)v17 < *(_DWORD *)v20 )
break;
v23 = *((_DWORD *)v17 - 1);
for ( i = v17 - 4; v21 < v23; i -= 4 )
{
*((_DWORD *)i + 1) = v23;
v22 = i;
v23 = *((_DWORD *)i - 1);
}
v17 += 4;
*(_DWORD *)v22 = v21;
if ( v19 == v17 )
goto LABEL_20;
}
if ( v17 - v20 <= 4 )
{
if ( v17 - v20 == 4 )
*(_DWORD *)v17 = *(_DWORD *)v20;
}
else
{
memmove(v20 + 4, v20, v17 - v20);
}
v17 += 4;
*(_DWORD *)v20 = v21;
}
while ( v19 != v17 );
LABEL_20:
v25 = v19;
ii = v20;
v12 = v77;
for ( j = a1; v11 != v25; *(_DWORD *)v29 = v26 )
{
while ( 1 )
{
v26 = *(_DWORD *)v25;
v27 = *((_DWORD *)v25 - 1);
v28 = v25 - 4;
if ( *(_DWORD *)v25 < v27 )
break;
v71 = v25;
v25 += 4;
*(_DWORD *)v71 = v26;
if ( v11 == v25 )
goto LABEL_24;
}
do
{
*((_DWORD *)v28 + 1) = v27;
v29 = v28;
v27 = *((_DWORD *)v28 - 1);
v28 -= 4;
}
while ( v26 < v27 );
v25 += 4;
}
LABEL_24:
v30 = src;
if ( v16 != src )
goto LABEL_25;
LABEL_92:
j[2] = 0LL;
*(_OWORD *)j = 0LL;
goto LABEL_93;
}
}
else
{
std::__introsort_loop<__gnu_cxx::__normal_iterator<int *,std::vector<int>>,long,__gnu_cxx::__ops::_Iter_less_iter>(
ii,
v11,
-2LL);
}
if ( v11 == v17 )
goto LABEL_24;
v65 = v11;
v66 = ii;
do
{
while ( 1 )
{
v67 = *(_DWORD *)v17;
v68 = v17;
if ( *(_DWORD *)v17 < *(_DWORD *)v66 )
break;
v69 = *((_DWORD *)v17 - 1);
for ( k = v17 - 4; v67 < v69; k -= 4 )
{
*((_DWORD *)k + 1) = v69;
v68 = k;
v69 = *((_DWORD *)k - 1);
}
v17 += 4;
*(_DWORD *)v68 = v67;
if ( v65 == v17 )
goto LABEL_91;
}
if ( v17 - v66 <= 4 )
{
if ( v17 - v66 == 4 )
*(_DWORD *)v17 = *(_DWORD *)v66;
}
else
{
memmove(v66 + 4, v66, v17 - v66);
}
v17 += 4;
*(_DWORD *)v66 = v67;
}
while ( v65 != v17 );
LABEL_91:
v30 = src;
ii = v66;
v11 = v65;
j = a1;
if ( v16 == src )
goto LABEL_92;
LABEL_25:
v31 = v30 + 4;
if ( !(v12 >> 2) )
{
std::__introsort_loop<__gnu_cxx::__normal_iterator<int *,std::vector<int>>,long,__gnu_cxx::__ops::_Iter_less_iter>(
src,
v16,
-2LL);
LABEL_68:
if ( v16 != v31 )
{
v58 = v31;
v80 = j;
v59 = v16;
do
{
while ( 1 )
{
v60 = *(_DWORD *)v58;
v61 = v58;
if ( *(_DWORD *)v58 < *(_DWORD *)src )
break;
v62 = *((_DWORD *)v58 - 1);
for ( m = v58 - 4; v60 < v62; m -= 4 )
{
*((_DWORD *)m + 1) = v62;
v61 = m;
v62 = *((_DWORD *)m - 1);
}
v58 += 4;
*(_DWORD *)v61 = v60;
if ( v58 == v59 )
goto LABEL_77;
}
if ( v58 - src <= 4 )
{
if ( v58 - src == 4 )
*(_DWORD *)v58 = *(_DWORD *)src;
}
else
{
memmove(src + 4, src, v58 - src);
}
v58 += 4;
*(_DWORD *)src = v60;
}
while ( v58 != v59 );
LABEL_77:
v16 = v59;
j = v80;
}
goto LABEL_39;
}
_BitScanReverse64(&v32, v12 >> 2);
std::__introsort_loop<__gnu_cxx::__normal_iterator<int *,std::vector<int>>,long,__gnu_cxx::__ops::_Iter_less_iter>(
src,
v16,
2LL * (int)v32);
if ( v12 <= 64 )
goto LABEL_68;
v78 = v16;
v33 = v31;
v79 = ii;
v34 = src + 64;
do
{
while ( 1 )
{
v35 = *(_DWORD *)v33;
v36 = v33;
if ( *(_DWORD *)v33 < *(_DWORD *)src )
break;
v37 = *((_DWORD *)v33 - 1);
for ( n = v33 - 4; v35 < v37; n -= 4 )
{
*((_DWORD *)n + 1) = v37;
v36 = n;
v37 = *((_DWORD *)n - 1);
}
v33 += 4;
*(_DWORD *)v36 = v35;
if ( v34 == v33 )
goto LABEL_35;
}
if ( v33 - src <= 4 )
{
if ( v33 - src == 4 )
*(_DWORD *)v33 = *(_DWORD *)src;
}
else
{
memmove(src + 4, src, v33 - src);
}
v33 += 4;
*(_DWORD *)src = v35;
}
while ( v34 != v33 );
LABEL_35:
v39 = src + 64;
v16 = v78;
for ( ii = v79; v78 != v39; *(_DWORD *)v43 = v40 )
{
while ( 1 )
{
v40 = *(_DWORD *)v39;
v41 = *((_DWORD *)v39 - 1);
v42 = v39 - 4;
if ( *(_DWORD *)v39 < v41 )
break;
v72 = v39;
v39 += 4;
*(_DWORD *)v72 = v40;
if ( v78 == v39 )
goto LABEL_39;
}
do
{
*((_DWORD *)v42 + 1) = v41;
v43 = v42;
v41 = *((_DWORD *)v42 - 1);
v42 -= 4;
}
while ( v40 < v41 );
v39 += 4;
}
LABEL_39:
j[2] = 0LL;
*(_OWORD *)j = 0LL;
if ( v11 != ii )
{
v44 = src;
v45 = ii;
while ( 1 )
{
v46 = *(_DWORD *)v45;
v47 = *(_DWORD *)v44;
if ( *(_DWORD *)v45 >= *(_DWORD *)v44 )
{
if ( v46 > v47 )
{
v64 = (_DWORD *)j[1];
if ( v64 == (_DWORD *)j[2] )
{
std::vector<int>::_M_realloc_insert<int const&>(j, v64, v44);
}
else
{
*v64 = v47;
j[1] = v64 + 1;
}
}
else
{
v45 += 4;
}
v44 += 4;
if ( v11 == v45 )
{
LABEL_49:
v49 = v11 - v45;
goto LABEL_50;
}
}
else
{
v48 = (_DWORD *)j[1];
if ( v48 == (_DWORD *)j[2] )
{
std::vector<int>::_M_realloc_insert<int const&>(j, v48, v45);
}
else
{
*v48 = v46;
j[1] = v48 + 1;
}
v45 += 4;
if ( v11 == v45 )
goto LABEL_49;
}
if ( v16 == v44 )
goto LABEL_49;
}
}
LABEL_93:
v44 = src;
v49 = v74;
v45 = ii;
LABEL_50:
v50 = &v45[v49];
if ( v49 > 0 )
{
do
{
while ( 1 )
{
v53 = j[1];
if ( v53 == j[2] )
break;
v51 = *(_DWORD *)v45;
v52 = v53 + 4;
v45 += 4;
*(_DWORD *)(v52 - 4) = v51;
j[1] = v52;
if ( v45 == v50 )
goto LABEL_55;
}
std::vector<int>::_M_realloc_insert<int const&>(j, v53, v45);
v45 += 4;
}
while ( v45 != v50 );
}
LABEL_55:
if ( v16 - v44 > 0 )
{
do
{
while ( 1 )
{
v56 = j[1];
if ( v56 == j[2] )
break;
v54 = *(_DWORD *)v44;
v55 = v56 + 4;
v44 += 4;
*(_DWORD *)(v55 - 4) = v54;
j[1] = v55;
if ( v16 == v44 )
goto LABEL_60;
}
std::vector<int>::_M_realloc_insert<int const&>(j, v56, v44);
v44 += 4;
}
while ( v16 != v44 );
}
LABEL_60:
if ( src )
operator delete(src, v75);
if ( ii )
operator delete(ii, v76);
return j;
} | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
MOV RBP,RDX
PUSH RBX
MOV RBX,RDI
SUB RSP,0x88
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x78],RAX
MOV RAX,qword ptr [RSI + 0x8]
SUB RAX,qword ptr [RSI]
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x20],RAX
JZ 0x00101e88
MOV RDI,RAX
MOV RAX,0x7ffffffffffffffc
CMP RAX,RDI
JC 0x00102121
MOV R12,RSI
LAB_00101a19:
CALL 0x00101130
MOV RSI,qword ptr [R12]
MOV R14,RAX
MOV RAX,qword ptr [R12 + 0x8]
MOV qword ptr [RSP + 0x40],R14
SUB RAX,RSI
MOV qword ptr [RSP + 0x10],RAX
MOV RDX,RAX
MOV R15,RAX
MOV RAX,qword ptr [RSP + 0x20]
ADD RAX,R14
MOV qword ptr [RSP + 0x50],RAX
CMP RDX,0x4
JLE 0x00102136
MOV RDI,R14
CALL 0x00101160
LAB_00101a5c:
ADD R15,R14
MOV R12,qword ptr [RBP + 0x8]
PXOR XMM0,XMM0
SUB R12,qword ptr [RBP]
MOV qword ptr [RSP + 0x48],R15
MOV qword ptr [RSP + 0x70],0x0
MOV qword ptr [RSP + 0x18],R12
MOVAPS xmmword ptr [RSP + 0x60],XMM0
JZ 0x00101ea8
MOV RAX,0x7ffffffffffffffc
CMP RAX,R12
JC 0x00102155
MOV RDI,R12
LAB_00101a9f:
CALL 0x00101130
MOV RSI,qword ptr [RBP]
MOV R12,qword ptr [RBP + 0x8]
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,RAX
MOV RCX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x60],RAX
SUB R12,RSI
ADD RAX,RCX
MOV R13,R12
MOV qword ptr [RSP + 0x70],RAX
CMP R12,0x4
JLE 0x00102146
MOV RDX,R12
CALL 0x00101160
LAB_00101ade:
MOV RAX,qword ptr [RSP + 0x8]
ADD R13,RAX
MOV qword ptr [RSP + 0x68],R13
CMP R15,R14
JZ 0x00101bfc
MOV RAX,qword ptr [RSP + 0x10]
LEA RBP,[R14 + 0x4]
SAR RAX,0x2
JZ 0x00101fc0
BSR RDX,RAX
MOV RSI,R15
MOV RDI,R14
MOVSXD RDX,EDX
ADD RDX,RDX
CALL 0x001017e0
CMP qword ptr [RSP + 0x10],0x40
JLE 0x00101fd2
LEA R8,[R14 + 0x40]
MOV qword ptr [RSP + 0x28],R12
MOV qword ptr [RSP + 0x30],RBX
MOV R12,R8
MOV RBX,R14
JMP 0x00101b6f
LAB_00101b40:
MOV RDX,RBP
SUB RDX,RBX
CMP RDX,0x4
JLE 0x001020e7
MOV EDI,0x4
MOV RSI,RBX
SUB RDI,RDX
ADD RDI,RBP
CALL 0x00101160
LAB_00101b63:
ADD RBP,0x4
MOV dword ptr [RBX],R14D
CMP R12,RBP
JZ 0x00101bae
LAB_00101b6f:
MOV R14D,dword ptr [RBP]
MOV EAX,dword ptr [RBX]
MOV RCX,RBP
CMP R14D,EAX
JL 0x00101b40
MOV EDX,dword ptr [RBP + -0x4]
LEA RAX,[RBP + -0x4]
CMP R14D,EDX
JGE 0x00101ba2
NOP dword ptr [RAX]
LAB_00101b90:
MOV dword ptr [RAX + 0x4],EDX
MOV RCX,RAX
MOV EDX,dword ptr [RAX + -0x4]
SUB RAX,0x4
CMP R14D,EDX
JL 0x00101b90
LAB_00101ba2:
ADD RBP,0x4
MOV dword ptr [RCX],R14D
CMP R12,RBP
JNZ 0x00101b6f
LAB_00101bae:
MOV R8,R12
MOV R14,RBX
MOV R12,qword ptr [RSP + 0x28]
MOV RBX,qword ptr [RSP + 0x30]
CMP R15,R8
JZ 0x00101bfc
NOP dword ptr [RAX + RAX*0x1]
LAB_00101bc8:
MOV ECX,dword ptr [R8]
MOV EDX,dword ptr [R8 + -0x4]
LEA RAX,[R8 + -0x4]
CMP ECX,EDX
JGE 0x001020b0
NOP dword ptr [RAX + RAX*0x1]
LAB_00101be0:
MOV dword ptr [RAX + 0x4],EDX
MOV RSI,RAX
MOV EDX,dword ptr [RAX + -0x4]
SUB RAX,0x4
CMP ECX,EDX
JL 0x00101be0
ADD R8,0x4
MOV dword ptr [RSI],ECX
CMP R15,R8
JNZ 0x00101bc8
LAB_00101bfc:
MOV RAX,qword ptr [RSP + 0x8]
CMP R13,RAX
JZ 0x00102077
LAB_00101c0a:
LEA RBP,[RAX + 0x4]
MOV RAX,R12
SAR RAX,0x2
JZ 0x00101ecb
BSR RDX,RAX
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,R13
MOVSXD RDX,EDX
ADD RDX,RDX
CALL 0x001017e0
CMP R12,0x40
JLE 0x00101edf
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x28],R13
MOV R12,RBP
MOV EBP,0x4
MOV qword ptr [RSP + 0x38],RBX
LEA R8,[RAX + 0x40]
MOV qword ptr [RSP + 0x30],R14
MOV RBX,RAX
MOV R13,R8
JMP 0x00101c95
LAB_00101c68:
MOV RDX,R12
SUB RDX,RBX
CMP RDX,0x4
JLE 0x001020f5
MOV RDI,RBP
MOV RSI,RBX
SUB RDI,RDX
ADD RDI,R12
CALL 0x00101160
LAB_00101c89:
ADD R12,0x4
MOV dword ptr [RBX],R14D
CMP R13,R12
JZ 0x00101cd6
LAB_00101c95:
MOV R14D,dword ptr [R12]
MOV EAX,dword ptr [RBX]
MOV RSI,R12
CMP R14D,EAX
JL 0x00101c68
MOV EDX,dword ptr [R12 + -0x4]
LEA RAX,[R12 + -0x4]
CMP R14D,EDX
JGE 0x00101cca
NOP word ptr [RAX + RAX*0x1]
LAB_00101cb8:
MOV dword ptr [RAX + 0x4],EDX
MOV RSI,RAX
MOV EDX,dword ptr [RAX + -0x4]
SUB RAX,0x4
CMP R14D,EDX
JL 0x00101cb8
LAB_00101cca:
ADD R12,0x4
MOV dword ptr [RSI],R14D
CMP R13,R12
JNZ 0x00101c95
LAB_00101cd6:
MOV R8,R13
MOV R13,qword ptr [RSP + 0x28]
MOV R14,qword ptr [RSP + 0x30]
MOV RBX,qword ptr [RSP + 0x38]
CMP R13,R8
JZ 0x00101d24
NOP dword ptr [RAX]
LAB_00101cf0:
MOV ECX,dword ptr [R8]
MOV EDX,dword ptr [R8 + -0x4]
LEA RAX,[R8 + -0x4]
CMP ECX,EDX
JGE 0x001020d0
NOP dword ptr [RAX + RAX*0x1]
LAB_00101d08:
MOV dword ptr [RAX + 0x4],EDX
MOV RSI,RAX
MOV EDX,dword ptr [RAX + -0x4]
SUB RAX,0x4
CMP ECX,EDX
JL 0x00101d08
ADD R8,0x4
MOV dword ptr [RSI],ECX
CMP R13,R8
JNZ 0x00101cf0
LAB_00101d24:
PXOR XMM0,XMM0
MOV qword ptr [RBX + 0x10],0x0
MOVUPS xmmword ptr [RBX],XMM0
CMP R15,R14
JZ 0x00102086
MOV R12,qword ptr [RSP + 0x8]
MOV RBP,R14
JMP 0x00101d68
LAB_00101d50:
JG 0x00101f90
ADD RBP,0x4
LAB_00101d5a:
ADD R12,0x4
CMP R15,RBP
JZ 0x00101d98
LAB_00101d63:
CMP R13,R12
JZ 0x00101d98
LAB_00101d68:
MOV EAX,dword ptr [RBP]
MOV EDX,dword ptr [R12]
CMP EAX,EDX
JGE 0x00101d50
MOV RSI,qword ptr [RBX + 0x8]
CMP RSI,qword ptr [RBX + 0x10]
JZ 0x00101fb0
MOV dword ptr [RSI],EAX
ADD RSI,0x4
MOV qword ptr [RBX + 0x8],RSI
LAB_00101d8b:
ADD RBP,0x4
CMP R15,RBP
JNZ 0x00101d63
NOP dword ptr [RAX]
LAB_00101d98:
SUB R15,RBP
MOV qword ptr [RSP + 0x10],R15
MOV RAX,R15
LAB_00101da3:
LEA R15,[RBP + RAX*0x1]
TEST RAX,RAX
JG 0x00101dc7
JMP 0x00101de8
LAB_00101db0:
MOV EAX,dword ptr [RBP]
ADD RSI,0x4
ADD RBP,0x4
MOV dword ptr [RSI + -0x4],EAX
MOV qword ptr [RBX + 0x8],RSI
CMP RBP,R15
JZ 0x00101de8
LAB_00101dc7:
MOV RSI,qword ptr [RBX + 0x8]
CMP RSI,qword ptr [RBX + 0x10]
JNZ 0x00101db0
MOV RDX,RBP
MOV RDI,RBX
LAB_00101dd7:
CALL 0x001022a0
ADD RBP,0x4
CMP RBP,R15
JNZ 0x00101dc7
NOP dword ptr [RAX]
LAB_00101de8:
MOV RAX,R13
SUB RAX,R12
TEST RAX,RAX
JG 0x00101e10
JMP 0x00101e30
LAB_00101df8:
MOV EAX,dword ptr [R12]
ADD RSI,0x4
ADD R12,0x4
MOV dword ptr [RSI + -0x4],EAX
MOV qword ptr [RBX + 0x8],RSI
CMP R13,R12
JZ 0x00101e30
LAB_00101e10:
MOV RSI,qword ptr [RBX + 0x8]
CMP RSI,qword ptr [RBX + 0x10]
JNZ 0x00101df8
MOV RDX,R12
MOV RDI,RBX
CALL 0x001022a0
ADD R12,0x4
CMP R13,R12
JNZ 0x00101e10
NOP
LAB_00101e30:
CMP qword ptr [RSP + 0x8],0x0
JZ 0x00101e47
MOV RSI,qword ptr [RSP + 0x18]
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x00101140
LAB_00101e47:
TEST R14,R14
JZ 0x00101e59
MOV RSI,qword ptr [RSP + 0x20]
MOV RDI,R14
CALL 0x00101140
LAB_00101e59:
MOV RAX,qword ptr [RSP + 0x78]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x0010216a
ADD RSP,0x88
MOV RAX,RBX
POP RBX
POP RBP
POP R12
POP R13
POP R14
POP R15
RET
LAB_00101e88:
MOV qword ptr [RSP + 0x40],0x0
XOR R15D,R15D
XOR R14D,R14D
MOV qword ptr [RSP + 0x50],0x0
JMP 0x00101a5c
LAB_00101ea8:
MOV qword ptr [RSP + 0x60],0x0
XOR R13D,R13D
MOV qword ptr [RSP + 0x70],0x0
MOV qword ptr [RSP + 0x8],0x0
JMP 0x00101ade
LAB_00101ecb:
MOV RDI,qword ptr [RSP + 0x8]
MOV RDX,-0x2
MOV RSI,R13
CALL 0x001017e0
LAB_00101edf:
CMP R13,RBP
JZ 0x00101d24
MOV qword ptr [RSP + 0x28],R14
MOV R12,RBP
MOV R14,qword ptr [RSP + 0x8]
MOV EBP,0x4
MOV qword ptr [RSP + 0x30],RBX
MOV RBX,R13
JMP 0x00101f35
LAB_00101f08:
MOV RDX,R12
SUB RDX,R14
CMP RDX,0x4
JLE 0x00102104
MOV RDI,RBP
MOV RSI,R14
SUB RDI,RDX
ADD RDI,R12
CALL 0x00101160
LAB_00101f29:
ADD R12,0x4
MOV dword ptr [R14],R13D
CMP R12,RBX
JZ 0x00101f76
LAB_00101f35:
MOV R13D,dword ptr [R12]
MOV EAX,dword ptr [R14]
MOV RCX,R12
CMP R13D,EAX
JL 0x00101f08
MOV EDX,dword ptr [R12 + -0x4]
LEA RAX,[R12 + -0x4]
CMP R13D,EDX
JGE 0x00101f6a
NOP dword ptr [RAX + RAX*0x1]
LAB_00101f58:
MOV dword ptr [RAX + 0x4],EDX
MOV RCX,RAX
MOV EDX,dword ptr [RAX + -0x4]
SUB RAX,0x4
CMP R13D,EDX
JL 0x00101f58
LAB_00101f6a:
ADD R12,0x4
MOV dword ptr [RCX],R13D
CMP R12,RBX
JNZ 0x00101f35
LAB_00101f76:
MOV R13,RBX
MOV R14,qword ptr [RSP + 0x28]
MOV RBX,qword ptr [RSP + 0x30]
JMP 0x00101d24
LAB_00101f90:
MOV RSI,qword ptr [RBX + 0x8]
CMP RSI,qword ptr [RBX + 0x10]
JZ 0x001020a0
MOV dword ptr [RSI],EDX
ADD RSI,0x4
MOV qword ptr [RBX + 0x8],RSI
JMP 0x00101d5a
LAB_00101fb0:
MOV RDX,RBP
MOV RDI,RBX
CALL 0x001022a0
JMP 0x00101d8b
LAB_00101fc0:
MOV RDX,-0x2
MOV RSI,R15
MOV RDI,R14
CALL 0x001017e0
LAB_00101fd2:
CMP R15,RBP
JZ 0x00101bfc
MOV qword ptr [RSP + 0x28],RBX
MOV RBX,R15
MOV R15,R14
JMP 0x0010201f
LAB_00101ff0:
MOV RDX,RBP
SUB RDX,R15
CMP RDX,0x4
JLE 0x00102113
MOV EDI,0x4
MOV RSI,R15
SUB RDI,RDX
ADD RDI,RBP
CALL 0x00101160
LAB_00102013:
ADD RBP,0x4
MOV dword ptr [R15],R14D
CMP RBX,RBP
JZ 0x0010205e
LAB_0010201f:
MOV R14D,dword ptr [RBP]
MOV EAX,dword ptr [R15]
MOV RCX,RBP
CMP R14D,EAX
JL 0x00101ff0
MOV EDX,dword ptr [RBP + -0x4]
LEA RAX,[RBP + -0x4]
CMP R14D,EDX
JGE 0x00102052
NOP word ptr [RAX + RAX*0x1]
LAB_00102040:
MOV dword ptr [RAX + 0x4],EDX
MOV RCX,RAX
MOV EDX,dword ptr [RAX + -0x4]
SUB RAX,0x4
CMP R14D,EDX
JL 0x00102040
LAB_00102052:
ADD RBP,0x4
MOV dword ptr [RCX],R14D
CMP RBX,RBP
JNZ 0x0010201f
LAB_0010205e:
MOV RAX,qword ptr [RSP + 0x8]
MOV R14,R15
MOV R15,RBX
MOV RBX,qword ptr [RSP + 0x28]
CMP R13,RAX
JNZ 0x00101c0a
LAB_00102077:
MOV qword ptr [RBX + 0x10],0x0
PXOR XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
LAB_00102086:
MOV R12,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RSP + 0x10]
MOV RBP,R14
JMP 0x00101da3
LAB_001020a0:
MOV RDX,R12
MOV RDI,RBX
CALL 0x001022a0
JMP 0x00101d5a
LAB_001020b0:
MOV RSI,R8
ADD R8,0x4
MOV dword ptr [RSI],ECX
CMP R15,R8
JNZ 0x00101bc8
JMP 0x00101bfc
LAB_001020d0:
MOV RSI,R8
ADD R8,0x4
MOV dword ptr [RSI],ECX
CMP R13,R8
JNZ 0x00101cf0
JMP 0x00101d24
LAB_001020e7:
JNZ 0x00101b63
MOV dword ptr [RBP],EAX
JMP 0x00101b63
LAB_001020f5:
JNZ 0x00101c89
MOV dword ptr [R12],EAX
JMP 0x00101c89
LAB_00102104:
JNZ 0x00101f29
MOV dword ptr [R12],EAX
JMP 0x00101f29
LAB_00102113:
JNZ 0x00102013
MOV dword ptr [RBP],EAX
JMP 0x00102013
LAB_00102121:
MOV RAX,qword ptr [RSP + 0x78]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x0010216a
LAB_00102131:
CALL 0x00101110
LAB_00102136:
JNZ 0x00101a5c
MOV EAX,dword ptr [RSI]
MOV dword ptr [R14],EAX
JMP 0x00101a5c
LAB_00102146:
JNZ 0x00101ade
MOV EAX,dword ptr [RSI]
MOV dword ptr [RDI],EAX
JMP 0x00101ade
LAB_00102155:
MOV RAX,qword ptr [RSP + 0x78]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x0010216a
LAB_00102165:
CALL 0x00101110
LAB_0010216a:
CALL 0x00101150 | /* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> >
const&) */
vector * func0(vector *param_1,vector *param_2,int param_3,int param_4,int param_5
,int param_6,int8 param_7,int8 param_8,int8 param_9,
int8 param_10,int8 param_11,int8 param_12,int8 param_13,
int8 param_14)
{
int iVar1;
long lVar2;
vector *__src;
long lVar3;
ulong uVar4;
ulong uVar5;
int *piVar6;
_Iter_less_iter _Var7;
int7 in_register_00000009;
_Iter_less_iter *p_Var8;
_Iter_less_iter *p_Var9;
_Iter_less_iter _Var10;
int iVar11;
int7 in_register_00000011;
long *plVar12;
size_t sVar13;
_Iter_less_iter *p_Var14;
_Iter_less_iter *p_Var15;
int *piVar16;
ulong uVar17;
size_t sVar18;
int *piVar19;
int *piVar20;
int *piVar21;
_Iter_less_iter *unaff_R14;
size_t unaff_R15;
_Iter_less_iter *p_Var22;
long in_FS_OFFSET;
int uVar23;
int *local_b0;
ulong local_a8;
plVar12 = (long *)CONCAT71(in_register_00000011,param_3);
uVar5 = CONCAT71(in_register_00000009,param_4);
lVar2 = *(long *)(in_FS_OFFSET + 0x28);
uVar4 = *(long *)(param_2 + 8) - *(long *)param_2;
local_a8 = uVar4;
if (uVar4 == 0) {
unaff_R15 = 0;
unaff_R14 = (_Iter_less_iter *)0x0;
}
else {
if (uVar4 < 0x7ffffffffffffffd) {
unaff_R14 = (_Iter_less_iter *)operator_new(uVar4);
__src = *(vector **)param_2;
unaff_R15 = *(long *)(param_2 + 8) - (long)__src;
uVar23 = unaff_R15 == 4;
param_2 = __src;
local_a8 = unaff_R15;
if (4 < (long)unaff_R15) {
memmove(unaff_R14,__src,unaff_R15);
local_a8 = unaff_R15;
goto LAB_00101a5c;
}
}
else {
uVar23 = lVar2 == *(long *)(in_FS_OFFSET + 0x28);
if (!(bool)uVar23) goto LAB_0010216a;
std::__throw_bad_array_new_length();
}
if ((bool)uVar23) {
*unaff_R14 = *(_Iter_less_iter *)param_2;
}
}
LAB_00101a5c:
p_Var22 = (_Iter_less_iter *)(unaff_R15 + (long)unaff_R14);
uVar17 = plVar12[1] - *plVar12;
if (uVar17 == 0) {
sVar18 = 0;
local_b0 = (int *)0x0;
}
else {
if (0x7ffffffffffffffc < uVar17) {
if (lVar2 == *(long *)(in_FS_OFFSET + 0x28)) {
/* try { // try from 00102165 to 00102169 has its CatchHandler @ 0010217b */
std::__throw_bad_array_new_length();
}
goto LAB_0010216a;
}
/* try { // try from 00101a9f to 00101aa3 has its CatchHandler @ 0010217b */
local_b0 = (int *)operator_new(uVar17);
piVar20 = (int *)*plVar12;
sVar18 = plVar12[1] - (long)piVar20;
uVar5 = uVar17;
if ((long)sVar18 < 5) {
if (sVar18 == 4) {
*local_b0 = *piVar20;
}
}
else {
memmove(local_b0,piVar20,sVar18);
}
}
_Var7 = (_Iter_less_iter)uVar5;
piVar21 = (int *)(sVar18 + (long)local_b0);
p_Var15 = unaff_R14;
piVar20 = local_b0;
if (p_Var22 == unaff_R14) {
LAB_00101bfc:
if (piVar21 != local_b0) goto LAB_00101c0a;
LAB_00102077:
*(int8 *)(param_1 + 0x10) = 0;
*(int (*) [16])param_1 = (int [16])0x0;
}
else {
p_Var14 = unaff_R14 + 1;
uVar5 = (long)local_a8 >> 2;
if (uVar5 == 0) {
std::
__introsort_loop<__normal_iterator<int*,std::vector<int,std::allocator<int>>>,long,__ops::_Iter_less_iter>
((__normal_iterator)unaff_R14,(__normal_iterator)p_Var22,-2,_Var7);
}
else {
lVar3 = 0x3f;
if (uVar5 != 0) {
for (; uVar5 >> lVar3 == 0; lVar3 = lVar3 + -1) {
}
}
std::
__introsort_loop<__normal_iterator<int*,std::vector<int,std::allocator<int>>>,long,__ops::_Iter_less_iter>
((__normal_iterator)unaff_R14,(__normal_iterator)p_Var22,(long)(int)lVar3 * 2,_Var7)
;
if (0x40 < (long)local_a8) {
p_Var9 = unaff_R14 + 0x10;
do {
while( true ) {
_Var7 = *p_Var14;
p_Var8 = p_Var14;
if ((int)_Var7 < (int)*unaff_R14) break;
_Var10 = p_Var14[-1];
while ((int)_Var7 < (int)_Var10) {
*p_Var8 = _Var10;
_Var10 = p_Var8[-2];
p_Var8 = p_Var8 + -1;
}
p_Var14 = p_Var14 + 1;
*p_Var8 = _Var7;
if (p_Var9 == p_Var14) goto LAB_00101bae;
}
sVar13 = (long)p_Var14 - (long)unaff_R14;
if ((long)sVar13 < 5) {
if (sVar13 == 4) {
*p_Var14 = *unaff_R14;
}
}
else {
memmove((void *)((4 - sVar13) + (long)p_Var14),unaff_R14,sVar13);
}
p_Var14 = p_Var14 + 1;
*unaff_R14 = _Var7;
} while (p_Var9 != p_Var14);
LAB_00101bae:
_Var7 = (_Iter_less_iter)p_Var8;
for (; p_Var22 != p_Var9; p_Var9 = p_Var9 + 1) {
while( true ) {
_Var7 = *p_Var9;
_Var10 = p_Var9[-1];
p_Var14 = p_Var9;
if ((int)_Var10 <= (int)_Var7) break;
do {
p_Var8 = p_Var14 + -1;
*p_Var14 = _Var10;
_Var10 = p_Var14[-2];
p_Var14 = p_Var8;
} while ((int)_Var7 < (int)_Var10);
p_Var9 = p_Var9 + 1;
*p_Var8 = _Var7;
if (p_Var22 == p_Var9) goto LAB_00101bfc;
}
*p_Var9 = _Var7;
}
goto LAB_00101bfc;
}
}
if (p_Var22 == p_Var14) goto LAB_00101bfc;
do {
while( true ) {
_Var7 = *p_Var14;
p_Var9 = p_Var14;
if ((int)_Var7 < (int)*unaff_R14) break;
_Var10 = p_Var14[-1];
while ((int)_Var7 < (int)_Var10) {
*p_Var9 = _Var10;
_Var10 = p_Var9[-2];
p_Var9 = p_Var9 + -1;
}
p_Var14 = p_Var14 + 1;
*p_Var9 = _Var7;
if (p_Var22 == p_Var14) goto LAB_0010205e;
}
sVar13 = (long)p_Var14 - (long)unaff_R14;
if ((long)sVar13 < 5) {
if (sVar13 == 4) {
*p_Var14 = *unaff_R14;
}
}
else {
memmove((void *)((4 - sVar13) + (long)p_Var14),unaff_R14,sVar13);
}
p_Var14 = p_Var14 + 1;
*unaff_R14 = _Var7;
} while (p_Var22 != p_Var14);
LAB_0010205e:
_Var7 = (_Iter_less_iter)p_Var9;
if (piVar21 == local_b0) goto LAB_00102077;
LAB_00101c0a:
piVar19 = local_b0 + 1;
uVar5 = (long)sVar18 >> 2;
if (uVar5 == 0) {
std::
__introsort_loop<__normal_iterator<int*,std::vector<int,std::allocator<int>>>,long,__ops::_Iter_less_iter>
((__normal_iterator)local_b0,(__normal_iterator)piVar21,-2,_Var7);
joined_r0x00101ee2:
for (; piVar21 != piVar19; piVar19 = piVar19 + 1) {
while( true ) {
iVar1 = *piVar19;
if (iVar1 < *local_b0) break;
iVar11 = piVar19[-1];
piVar16 = piVar19;
while (iVar1 < iVar11) {
*piVar16 = iVar11;
iVar11 = piVar16[-2];
piVar16 = piVar16 + -1;
}
piVar19 = piVar19 + 1;
*piVar16 = iVar1;
if (piVar19 == piVar21) goto LAB_00101d24;
}
sVar18 = (long)piVar19 - (long)local_b0;
if ((long)sVar18 < 5) {
if (sVar18 == 4) {
*piVar19 = *local_b0;
}
}
else {
memmove((void *)((4 - sVar18) + (long)piVar19),local_b0,sVar18);
}
*local_b0 = iVar1;
}
}
else {
lVar3 = 0x3f;
if (uVar5 != 0) {
for (; uVar5 >> lVar3 == 0; lVar3 = lVar3 + -1) {
}
}
std::
__introsort_loop<__normal_iterator<int*,std::vector<int,std::allocator<int>>>,long,__ops::_Iter_less_iter>
((__normal_iterator)local_b0,(__normal_iterator)piVar21,(long)(int)lVar3 * 2,_Var7);
if ((long)sVar18 < 0x41) goto joined_r0x00101ee2;
piVar16 = local_b0 + 0x10;
do {
while( true ) {
iVar1 = *piVar19;
if (iVar1 < *local_b0) break;
iVar11 = piVar19[-1];
piVar6 = piVar19;
while (iVar1 < iVar11) {
*piVar6 = iVar11;
iVar11 = piVar6[-2];
piVar6 = piVar6 + -1;
}
piVar19 = piVar19 + 1;
*piVar6 = iVar1;
if (piVar16 == piVar19) goto joined_r0x00101ceb;
}
sVar18 = (long)piVar19 - (long)local_b0;
if ((long)sVar18 < 5) {
if (sVar18 == 4) {
*piVar19 = *local_b0;
}
}
else {
memmove((void *)((4 - sVar18) + (long)piVar19),local_b0,sVar18);
}
piVar19 = piVar19 + 1;
*local_b0 = iVar1;
} while (piVar16 != piVar19);
joined_r0x00101ceb:
for (; piVar21 != piVar16; piVar16 = piVar16 + 1) {
while( true ) {
iVar1 = *piVar16;
iVar11 = piVar16[-1];
piVar19 = piVar16;
if (iVar11 <= iVar1) break;
do {
piVar6 = piVar19 + -1;
*piVar19 = iVar11;
iVar11 = piVar19[-2];
piVar19 = piVar6;
} while (iVar1 < iVar11);
piVar16 = piVar16 + 1;
*piVar6 = iVar1;
if (piVar21 == piVar16) goto LAB_00101d24;
}
*piVar16 = iVar1;
}
}
LAB_00101d24:
*(int8 *)(param_1 + 0x10) = 0;
*(int (*) [16])param_1 = (int [16])0x0;
if (p_Var22 != unaff_R14) {
do {
_Var7 = *p_Var15;
iVar1 = *piVar20;
if ((int)_Var7 < iVar1) {
p_Var14 = *(_Iter_less_iter **)(param_1 + 8);
if (p_Var14 == *(_Iter_less_iter **)(param_1 + 0x10)) {
std::vector<int,std::allocator<int>>::_M_realloc_insert<int_const&>
((vector<int,std::allocator<int>> *)param_1,(__normal_iterator)p_Var14,
(int *)p_Var15);
}
else {
*p_Var14 = _Var7;
*(_Iter_less_iter **)(param_1 + 8) = p_Var14 + 1;
}
p_Var15 = p_Var15 + 1;
}
else {
if (iVar1 < (int)_Var7) {
piVar19 = *(int **)(param_1 + 8);
if (piVar19 == *(int **)(param_1 + 0x10)) {
std::vector<int,std::allocator<int>>::_M_realloc_insert<int_const&>
((vector<int,std::allocator<int>> *)param_1,(__normal_iterator)piVar19,
piVar20);
}
else {
*piVar19 = iVar1;
*(int **)(param_1 + 8) = piVar19 + 1;
}
}
else {
p_Var15 = p_Var15 + 1;
}
piVar20 = piVar20 + 1;
}
} while ((p_Var22 != p_Var15) && (piVar21 != piVar20));
local_a8 = (long)p_Var22 - (long)p_Var15;
}
}
p_Var22 = (_Iter_less_iter *)((long)p_Var15 + local_a8);
if (0 < (long)local_a8) {
do {
while (p_Var14 = *(_Iter_less_iter **)(param_1 + 8),
p_Var14 == *(_Iter_less_iter **)(param_1 + 0x10)) {
/* try { // try from 00101dd7 to 001020aa has its CatchHandler @ 0010216f */
std::vector<int,std::allocator<int>>::_M_realloc_insert<int_const&>
((vector<int,std::allocator<int>> *)param_1,(__normal_iterator)p_Var14,
(int *)p_Var15);
p_Var15 = p_Var15 + 1;
if (p_Var15 == p_Var22) goto LAB_00101de8;
}
_Var7 = *p_Var15;
p_Var15 = p_Var15 + 1;
*p_Var14 = _Var7;
*(_Iter_less_iter **)(param_1 + 8) = p_Var14 + 1;
} while (p_Var15 != p_Var22);
}
LAB_00101de8:
if (piVar21 != piVar20 && -1 < (long)piVar21 - (long)piVar20) {
do {
while (piVar19 = *(int **)(param_1 + 8), piVar19 == *(int **)(param_1 + 0x10)) {
std::vector<int,std::allocator<int>>::_M_realloc_insert<int_const&>
((vector<int,std::allocator<int>> *)param_1,(__normal_iterator)piVar19,piVar20);
piVar20 = piVar20 + 1;
if (piVar21 == piVar20) goto LAB_00101e30;
}
iVar1 = *piVar20;
piVar20 = piVar20 + 1;
*piVar19 = iVar1;
*(int **)(param_1 + 8) = piVar19 + 1;
} while (piVar21 != piVar20);
}
LAB_00101e30:
if (local_b0 != (int *)0x0) {
operator_delete(local_b0,uVar17);
}
if (unaff_R14 != (_Iter_less_iter *)0x0) {
operator_delete(unaff_R14,uVar4);
}
if (lVar2 == *(long *)(in_FS_OFFSET + 0x28)) {
return param_1;
}
LAB_0010216a:
/* WARNING: Subroutine does not return */
__stack_chk_fail();
} |
2,316 | func0 | #include <cassert>
#include <functional>
#include <vector>
#include <variant>
struct Nested {
std::variant<int, std::vector<Nested>> value;
// Constructors for int and vector
Nested(int val) : value(val) {}
Nested(const std::vector<Nested>& vec) : value(vec) {}
};
bool operator==(const Nested &a, const Nested &b);
// Helper function for equality of vectors
bool equal_vector(const std::vector<Nested>& a, const std::vector<Nested>& b) {
if(a.size() != b.size()) return false;
for (size_t i = 0; i < a.size(); i++) {
if (!(a[i] == b[i])) return false;
}
return true;
}
bool operator==(const Nested &a, const Nested &b) {
if(a.value.index() != b.value.index()) return false;
if(a.value.index() == 0)
return std::get<0>(a.value) == std::get<0>(b.value);
else
return equal_vector(std::get<1>(a.value), std::get<1>(b.value));
}
Nested even_ele(const Nested &test, const std::function<bool(int)>& even_fnc) {
std::vector<Nested> res;
// We expect test to hold a vector (i.e. a tuple)
if(test.value.index() != 1) {
// If test is not vector then it's an int. In our usage, this case should not happen.
int val = std::get<0>(test.value);
if(even_fnc(val))
return Nested(val);
else
return Nested(std::vector<Nested>{});
}
const auto &vec = std::get<1>(test.value);
for(const auto &ele : vec) {
if(ele.value.index() == 1) { // ele is a vector (tuple)
res.push_back(even_ele(ele, even_fnc));
} else { // ele is an int
int val = std::get<0>(ele.value);
if(even_fnc(val))
res.push_back(ele);
}
}
return Nested(res);
}
| Nested func0(const Nested &test_tuple) {
return even_ele(test_tuple, [](int x){ return x % 2 == 0; });
}
| int main() {
{
// Test 1: extract_even((4, 5, (7, 6, (2, 4)), 6, 8)) == (4, (6, (2, 4)), 6, 8)
Nested input1({
Nested(4),
Nested(5),
Nested(std::vector<Nested>{
Nested(7),
Nested(6),
Nested(std::vector<Nested>{
Nested(2),
Nested(4)
})
}),
Nested(6),
Nested(8)
});
Nested expected1({
Nested(4),
Nested(std::vector<Nested>{
Nested(6),
Nested(std::vector<Nested>{
Nested(2),
Nested(4)
})
}),
Nested(6),
Nested(8)
});
assert(func0(input1) == expected1);
}
{
// Test 2: extract_even((5, 6, (8, 7, (4, 8)), 7, 9)) == (6, (8, (4, 8)))
Nested input2({
Nested(5),
Nested(6),
Nested(std::vector<Nested>{
Nested(8),
Nested(7),
Nested(std::vector<Nested>{
Nested(4),
Nested(8)
})
}),
Nested(7),
Nested(9)
});
Nested expected2({
Nested(6),
Nested(std::vector<Nested>{
Nested(8),
Nested(std::vector<Nested>{
Nested(4),
Nested(8)
})
})
});
assert(func0(input2) == expected2);
}
{
// Test 3: extract_even((5, 6, (9, 8, (4, 6)), 8, 10)) == (6, (8, (4, 6)), 8, 10)
Nested input3({
Nested(5),
Nested(6),
Nested(std::vector<Nested>{
Nested(9),
Nested(8),
Nested(std::vector<Nested>{
Nested(4),
Nested(6)
})
}),
Nested(8),
Nested(10)
});
Nested expected3({
Nested(6),
Nested(std::vector<Nested>{
Nested(8),
Nested(std::vector<Nested>{
Nested(4),
Nested(6)
})
}),
Nested(8),
Nested(10)
});
assert(func0(input3) == expected3);
}
return 0;
}
| O0 | cpp | func0(Nested const&)::{lambda(int)#1}::operator()(int) const:
push %rbp
mov %rsp,%rbp
mov %rdi,-0x8(%rbp)
mov %esi,-0xc(%rbp)
mov -0xc(%rbp),%eax
and $0x1,%eax
test %eax,%eax
sete %al
pop %rbp
retq
| _ZZ5func0RK6NestedENKUliE_clEi:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov eax, [rbp+var_C]
and eax, 1
test eax, eax
setz al
pop rbp
retn | bool func0(Nested const&)::{lambda(int)#1}::operator()(long long a1, char a2)
{
return (a2 & 1) == 0;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x58
MOV qword ptr [RBP + -0x58],RDI
MOV qword ptr [RBP + -0x60],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RDX,[RBP + -0x41]
LEA RAX,[RBP + -0x40]
MOV RSI,RDX
MOV RDI,RAX
CALL 0x00103604
MOV RAX,qword ptr [RBP + -0x58]
LEA RDX,[RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x60]
MOV RSI,RCX
MOV RDI,RAX
LAB_00101789:
CALL 0x00101465
LEA RAX,[RBP + -0x40]
MOV RDI,RAX
CALL 0x00103e72
MOV RAX,qword ptr [RBP + -0x18]
SUB RAX,qword ptr FS:[0x28]
JZ 0x001017e2
JMP 0x001017dd
LAB_001017dd:
CALL 0x001011c0
LAB_001017e2:
MOV RAX,qword ptr [RBP + -0x58]
MOV RBX,qword ptr [RBP + -0x8]
LEAVE
RET | /* func0(Nested const&) */
Nested * func0(Nested *param_1)
{
function *in_RSI;
long in_FS_OFFSET;
_lambda_int__1_ local_49;
function<bool(int)> local_48 [40];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
std::function<bool(int)>::function<func0(Nested_const&)::_lambda(int)_1_,void>(local_48,&local_49)
;
/* try { // try from 00101789 to 0010178d has its CatchHandler @ 001017ab */
even_ele(param_1,in_RSI);
std::function<bool(int)>::~function(local_48);
if (local_20 != *(long *)(in_FS_OFFSET + 0x28)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return param_1;
} |
2,317 | func0 | #include <cassert>
#include <functional>
#include <vector>
#include <variant>
struct Nested {
std::variant<int, std::vector<Nested>> value;
// Constructors for int and vector
Nested(int val) : value(val) {}
Nested(const std::vector<Nested>& vec) : value(vec) {}
};
bool operator==(const Nested &a, const Nested &b);
// Helper function for equality of vectors
bool equal_vector(const std::vector<Nested>& a, const std::vector<Nested>& b) {
if(a.size() != b.size()) return false;
for (size_t i = 0; i < a.size(); i++) {
if (!(a[i] == b[i])) return false;
}
return true;
}
bool operator==(const Nested &a, const Nested &b) {
if(a.value.index() != b.value.index()) return false;
if(a.value.index() == 0)
return std::get<0>(a.value) == std::get<0>(b.value);
else
return equal_vector(std::get<1>(a.value), std::get<1>(b.value));
}
Nested even_ele(const Nested &test, const std::function<bool(int)>& even_fnc) {
std::vector<Nested> res;
// We expect test to hold a vector (i.e. a tuple)
if(test.value.index() != 1) {
// If test is not vector then it's an int. In our usage, this case should not happen.
int val = std::get<0>(test.value);
if(even_fnc(val))
return Nested(val);
else
return Nested(std::vector<Nested>{});
}
const auto &vec = std::get<1>(test.value);
for(const auto &ele : vec) {
if(ele.value.index() == 1) { // ele is a vector (tuple)
res.push_back(even_ele(ele, even_fnc));
} else { // ele is an int
int val = std::get<0>(ele.value);
if(even_fnc(val))
res.push_back(ele);
}
}
return Nested(res);
}
| Nested func0(const Nested &test_tuple) {
return even_ele(test_tuple, [](int x){ return x % 2 == 0; });
}
| int main() {
{
// Test 1: extract_even((4, 5, (7, 6, (2, 4)), 6, 8)) == (4, (6, (2, 4)), 6, 8)
Nested input1({
Nested(4),
Nested(5),
Nested(std::vector<Nested>{
Nested(7),
Nested(6),
Nested(std::vector<Nested>{
Nested(2),
Nested(4)
})
}),
Nested(6),
Nested(8)
});
Nested expected1({
Nested(4),
Nested(std::vector<Nested>{
Nested(6),
Nested(std::vector<Nested>{
Nested(2),
Nested(4)
})
}),
Nested(6),
Nested(8)
});
assert(func0(input1) == expected1);
}
{
// Test 2: extract_even((5, 6, (8, 7, (4, 8)), 7, 9)) == (6, (8, (4, 8)))
Nested input2({
Nested(5),
Nested(6),
Nested(std::vector<Nested>{
Nested(8),
Nested(7),
Nested(std::vector<Nested>{
Nested(4),
Nested(8)
})
}),
Nested(7),
Nested(9)
});
Nested expected2({
Nested(6),
Nested(std::vector<Nested>{
Nested(8),
Nested(std::vector<Nested>{
Nested(4),
Nested(8)
})
})
});
assert(func0(input2) == expected2);
}
{
// Test 3: extract_even((5, 6, (9, 8, (4, 6)), 8, 10)) == (6, (8, (4, 6)), 8, 10)
Nested input3({
Nested(5),
Nested(6),
Nested(std::vector<Nested>{
Nested(9),
Nested(8),
Nested(std::vector<Nested>{
Nested(4),
Nested(6)
})
}),
Nested(8),
Nested(10)
});
Nested expected3({
Nested(6),
Nested(std::vector<Nested>{
Nested(8),
Nested(std::vector<Nested>{
Nested(4),
Nested(6)
})
}),
Nested(8),
Nested(10)
});
assert(func0(input3) == expected3);
}
return 0;
}
| O1 | cpp | std::_Function_handler<bool (int), func0(Nested const&)::{lambda(int)#1}>::_M_invoke(std::_Any_data const&, int&&):
endbr64
mov (%rsi),%eax
xor $0x1,%eax
and $0x1,%eax
retq
| _ZNSt17_Function_handlerIFbiEZ5func0RK6NestedEUliE_E9_M_invokeERKSt9_Any_dataOi:
endbr64
mov eax, [rsi]
xor eax, 1
and eax, 1
retn | long long std::_Function_handler<bool ()(int),func0(Nested const&)::{lambda(int)#1}>::_M_invoke(
long long a1,
_DWORD *a2)
{
return ((unsigned __int8)*a2 ^ 1) & 1;
} | func0:
ENDBR64
PUSH RBX
SUB RSP,0x30
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x28],RAX
XOR EAX,EAX
MOV qword ptr [RSP],0x0
MOV qword ptr [RSP + 0x8],0x0
LEA RAX,[0x1012e9]
MOV qword ptr [RSP + 0x18],RAX
LEA RAX,[0x1012f6]
MOV qword ptr [RSP + 0x10],RAX
MOV RDX,RSP
LAB_0010194d:
CALL 0x001013cb
MOV RAX,qword ptr [RSP + 0x10]
TEST RAX,RAX
JZ 0x00101969
MOV RDI,RSP
MOV EDX,0x3
MOV RSI,RDI
CALL RAX
LAB_00101969:
MOV RAX,qword ptr [RSP + 0x28]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x001019bd
MOV RAX,RBX
ADD RSP,0x30
POP RBX
RET
LAB_001019bd:
CALL 0x001011a0 | /* func0(Nested const&) */
Nested * func0(Nested *param_1)
{
function *in_RSI;
long in_FS_OFFSET;
int8 local_38;
int8 local_30;
code *local_28;
code *local_20;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_38 = 0;
local_30 = 0;
local_20 = std::_Function_handler<bool(int),func0(Nested_const&)::{lambda(int)#1}>::_M_invoke;
local_28 = std::_Function_handler<bool(int),func0(Nested_const&)::{lambda(int)#1}>::_M_manager;
/* try { // try from 0010194d to 00101951 has its CatchHandler @ 00101982 */
even_ele(param_1,in_RSI);
if (local_28 != (code *)0x0) {
(*local_28)(&local_38,&local_38,3);
}
if (local_10 == *(long *)(in_FS_OFFSET + 0x28)) {
return param_1;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
} |
2,318 | func0 | #include <cassert>
#include <functional>
#include <vector>
#include <variant>
struct Nested {
std::variant<int, std::vector<Nested>> value;
// Constructors for int and vector
Nested(int val) : value(val) {}
Nested(const std::vector<Nested>& vec) : value(vec) {}
};
bool operator==(const Nested &a, const Nested &b);
// Helper function for equality of vectors
bool equal_vector(const std::vector<Nested>& a, const std::vector<Nested>& b) {
if(a.size() != b.size()) return false;
for (size_t i = 0; i < a.size(); i++) {
if (!(a[i] == b[i])) return false;
}
return true;
}
bool operator==(const Nested &a, const Nested &b) {
if(a.value.index() != b.value.index()) return false;
if(a.value.index() == 0)
return std::get<0>(a.value) == std::get<0>(b.value);
else
return equal_vector(std::get<1>(a.value), std::get<1>(b.value));
}
Nested even_ele(const Nested &test, const std::function<bool(int)>& even_fnc) {
std::vector<Nested> res;
// We expect test to hold a vector (i.e. a tuple)
if(test.value.index() != 1) {
// If test is not vector then it's an int. In our usage, this case should not happen.
int val = std::get<0>(test.value);
if(even_fnc(val))
return Nested(val);
else
return Nested(std::vector<Nested>{});
}
const auto &vec = std::get<1>(test.value);
for(const auto &ele : vec) {
if(ele.value.index() == 1) { // ele is a vector (tuple)
res.push_back(even_ele(ele, even_fnc));
} else { // ele is an int
int val = std::get<0>(ele.value);
if(even_fnc(val))
res.push_back(ele);
}
}
return Nested(res);
}
| Nested func0(const Nested &test_tuple) {
return even_ele(test_tuple, [](int x){ return x % 2 == 0; });
}
| int main() {
{
// Test 1: extract_even((4, 5, (7, 6, (2, 4)), 6, 8)) == (4, (6, (2, 4)), 6, 8)
Nested input1({
Nested(4),
Nested(5),
Nested(std::vector<Nested>{
Nested(7),
Nested(6),
Nested(std::vector<Nested>{
Nested(2),
Nested(4)
})
}),
Nested(6),
Nested(8)
});
Nested expected1({
Nested(4),
Nested(std::vector<Nested>{
Nested(6),
Nested(std::vector<Nested>{
Nested(2),
Nested(4)
})
}),
Nested(6),
Nested(8)
});
assert(func0(input1) == expected1);
}
{
// Test 2: extract_even((5, 6, (8, 7, (4, 8)), 7, 9)) == (6, (8, (4, 8)))
Nested input2({
Nested(5),
Nested(6),
Nested(std::vector<Nested>{
Nested(8),
Nested(7),
Nested(std::vector<Nested>{
Nested(4),
Nested(8)
})
}),
Nested(7),
Nested(9)
});
Nested expected2({
Nested(6),
Nested(std::vector<Nested>{
Nested(8),
Nested(std::vector<Nested>{
Nested(4),
Nested(8)
})
})
});
assert(func0(input2) == expected2);
}
{
// Test 3: extract_even((5, 6, (9, 8, (4, 6)), 8, 10)) == (6, (8, (4, 6)), 8, 10)
Nested input3({
Nested(5),
Nested(6),
Nested(std::vector<Nested>{
Nested(9),
Nested(8),
Nested(std::vector<Nested>{
Nested(4),
Nested(6)
})
}),
Nested(8),
Nested(10)
});
Nested expected3({
Nested(6),
Nested(std::vector<Nested>{
Nested(8),
Nested(std::vector<Nested>{
Nested(4),
Nested(6)
})
}),
Nested(8),
Nested(10)
});
assert(func0(input3) == expected3);
}
return 0;
}
| O2 | cpp | std::_Function_handler<bool (int), func0(Nested const&)::{lambda(int)#1}>::_M_invoke(std::_Any_data const&, int&&):
endbr64
mov (%rsi),%eax
not %eax
and $0x1,%eax
retq
nopl 0x0(%rax)
| _ZNSt17_Function_handlerIFbiEZ5func0RK6NestedEUliE_E9_M_invokeERKSt9_Any_dataOi:
endbr64
mov eax, [rsi]
not eax
and eax, 1
retn | _BOOL8 std::_Function_handler<bool ()(int),func0(Nested const&)::{lambda(int)#1}>::_M_invoke(
long long a1,
_DWORD *a2)
{
return (*a2 & 1) == 0;
} | func0:
ENDBR64
PUSH RBP
PXOR XMM0,XMM0
LEA RCX,[0x103310]
PUSH RBX
MOV RBX,RDI
SUB RSP,0x38
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x28],RAX
XOR EAX,EAX
LEA RAX,[0x103300]
MOVAPS xmmword ptr [RSP],XMM0
MOV RBP,RSP
MOVQ XMM0,RCX
MOVQ XMM1,RAX
MOV RDX,RBP
PUNPCKLQDQ XMM0,XMM1
MOVAPS xmmword ptr [RSP + 0x10],XMM0
LAB_0010385c:
CALL 0x00103490
MOV RAX,qword ptr [RSP + 0x10]
TEST RAX,RAX
JZ 0x00103878
MOV EDX,0x3
MOV RSI,RBP
MOV RDI,RBP
CALL RAX
LAB_00103878:
MOV RAX,qword ptr [RSP + 0x28]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x00103892
ADD RSP,0x38
MOV RAX,RBX
POP RBX
POP RBP
RET
LAB_00103892:
CALL 0x001011a0 | /* func0(Nested const&) */
Nested * func0(Nested *param_1)
{
function *in_RSI;
long in_FS_OFFSET;
int local_48 [16];
code *local_38;
code *pcStack_30;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
local_48 = (int [16])0x0;
local_38 = std::_Function_handler<bool(int),func0(Nested_const&)::{lambda(int)#1}>::_M_manager;
pcStack_30 = std::_Function_handler<bool(int),func0(Nested_const&)::{lambda(int)#1}>::_M_invoke;
/* try { // try from 0010385c to 00103860 has its CatchHandler @ 00103897 */
even_ele(param_1,in_RSI);
if (local_38 != (code *)0x0) {
(*local_38)(local_48,local_48,3);
}
if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {
return param_1;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
} |
2,319 | func0 | #include <cassert>
#include <functional>
#include <vector>
#include <variant>
struct Nested {
std::variant<int, std::vector<Nested>> value;
// Constructors for int and vector
Nested(int val) : value(val) {}
Nested(const std::vector<Nested>& vec) : value(vec) {}
};
bool operator==(const Nested &a, const Nested &b);
// Helper function for equality of vectors
bool equal_vector(const std::vector<Nested>& a, const std::vector<Nested>& b) {
if(a.size() != b.size()) return false;
for (size_t i = 0; i < a.size(); i++) {
if (!(a[i] == b[i])) return false;
}
return true;
}
bool operator==(const Nested &a, const Nested &b) {
if(a.value.index() != b.value.index()) return false;
if(a.value.index() == 0)
return std::get<0>(a.value) == std::get<0>(b.value);
else
return equal_vector(std::get<1>(a.value), std::get<1>(b.value));
}
Nested even_ele(const Nested &test, const std::function<bool(int)>& even_fnc) {
std::vector<Nested> res;
// We expect test to hold a vector (i.e. a tuple)
if(test.value.index() != 1) {
// If test is not vector then it's an int. In our usage, this case should not happen.
int val = std::get<0>(test.value);
if(even_fnc(val))
return Nested(val);
else
return Nested(std::vector<Nested>{});
}
const auto &vec = std::get<1>(test.value);
for(const auto &ele : vec) {
if(ele.value.index() == 1) { // ele is a vector (tuple)
res.push_back(even_ele(ele, even_fnc));
} else { // ele is an int
int val = std::get<0>(ele.value);
if(even_fnc(val))
res.push_back(ele);
}
}
return Nested(res);
}
| Nested func0(const Nested &test_tuple) {
return even_ele(test_tuple, [](int x){ return x % 2 == 0; });
}
| int main() {
{
// Test 1: extract_even((4, 5, (7, 6, (2, 4)), 6, 8)) == (4, (6, (2, 4)), 6, 8)
Nested input1({
Nested(4),
Nested(5),
Nested(std::vector<Nested>{
Nested(7),
Nested(6),
Nested(std::vector<Nested>{
Nested(2),
Nested(4)
})
}),
Nested(6),
Nested(8)
});
Nested expected1({
Nested(4),
Nested(std::vector<Nested>{
Nested(6),
Nested(std::vector<Nested>{
Nested(2),
Nested(4)
})
}),
Nested(6),
Nested(8)
});
assert(func0(input1) == expected1);
}
{
// Test 2: extract_even((5, 6, (8, 7, (4, 8)), 7, 9)) == (6, (8, (4, 8)))
Nested input2({
Nested(5),
Nested(6),
Nested(std::vector<Nested>{
Nested(8),
Nested(7),
Nested(std::vector<Nested>{
Nested(4),
Nested(8)
})
}),
Nested(7),
Nested(9)
});
Nested expected2({
Nested(6),
Nested(std::vector<Nested>{
Nested(8),
Nested(std::vector<Nested>{
Nested(4),
Nested(8)
})
})
});
assert(func0(input2) == expected2);
}
{
// Test 3: extract_even((5, 6, (9, 8, (4, 6)), 8, 10)) == (6, (8, (4, 6)), 8, 10)
Nested input3({
Nested(5),
Nested(6),
Nested(std::vector<Nested>{
Nested(9),
Nested(8),
Nested(std::vector<Nested>{
Nested(4),
Nested(6)
})
}),
Nested(8),
Nested(10)
});
Nested expected3({
Nested(6),
Nested(std::vector<Nested>{
Nested(8),
Nested(std::vector<Nested>{
Nested(4),
Nested(6)
})
}),
Nested(8),
Nested(10)
});
assert(func0(input3) == expected3);
}
return 0;
}
| O3 | cpp | std::_Function_handler<bool (int), func0(Nested const&)::{lambda(int)#1}>::_M_invoke(std::_Any_data const&, int&&):
endbr64
mov (%rsi),%eax
not %eax
and $0x1,%eax
retq
nopl 0x0(%rax)
| _ZNSt17_Function_handlerIFbiEZ5func0RK6NestedEUliE_E9_M_invokeERKSt9_Any_dataOi:
endbr64
mov eax, [rsi]
not eax
and eax, 1
retn | _BOOL8 std::_Function_handler<bool ()(int),func0(Nested const&)::{lambda(int)#1}>::_M_invoke(
long long a1,
_DWORD *a2)
{
return (*a2 & 1) == 0;
} | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
LEA RDX,[0x1032a0]
PUSH R14
PUSH R13
MOV R13,RDI
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0xc8
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0xb8],RAX
XOR EAX,EAX
LEA RAX,[0x103290]
MOVAPS xmmword ptr [RSP + 0x70],XMM0
MOVQ XMM0,RDX
MOV qword ptr [RSP + 0x60],0x0
MOVQ XMM1,RAX
MOVZX EAX,byte ptr [RSI + 0x18]
PUNPCKLQDQ XMM0,XMM1
MOVAPS xmmword ptr [RSP + 0x80],XMM0
PXOR XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x50],XMM0
CMP AL,0x1
JZ 0x001042c8
TEST AL,AL
JNZ 0x00101658
MOV EAX,dword ptr [RSI]
TEST AL,0x1
JNZ 0x001042b0
MOV dword ptr [RDI],EAX
MOV byte ptr [RDI + 0x18],0x0
LAB_00104266:
MOV RAX,qword ptr [RSP + 0x80]
TEST RAX,RAX
JZ 0x00104282
LEA RDI,[RSP + 0x70]
MOV EDX,0x3
MOV RSI,RDI
CALL RAX
LAB_00104282:
MOV RAX,qword ptr [RSP + 0xb8]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x0010492c
ADD RSP,0xc8
MOV RAX,R13
POP RBX
POP RBP
POP R12
POP R13
POP R14
POP R15
RET
LAB_001042b0:
MOV qword ptr [RDI + 0x10],0x0
MOV byte ptr [RDI + 0x18],0x1
MOVUPS xmmword ptr [RDI],XMM0
JMP 0x00104266
LAB_001042c8:
MOV RAX,qword ptr [RSI + 0x8]
MOV RBP,qword ptr [RSI]
LEA RDX,[RSP + 0x4c]
MOV qword ptr [RSP + 0x18],RDX
MOV qword ptr [RSP + 0x10],RAX
CMP RBP,RAX
JNZ 0x001042ff
JMP 0x00104839
LAB_001042f0:
ADD RBP,0x20
CMP qword ptr [RSP + 0x10],RBP
JZ 0x00104390
LAB_001042ff:
MOVZX EAX,byte ptr [RBP + 0x18]
CMP AL,0x1
JZ 0x00104440
TEST AL,AL
JNZ 0x00101639
CMP qword ptr [RSP + 0x80],0x0
MOV EAX,dword ptr [RBP]
MOV dword ptr [RSP + 0x4c],EAX
JZ 0x001048e0
MOV RSI,qword ptr [RSP + 0x18]
LEA RDI,[RSP + 0x70]
LEA RBX,[RSP + 0x50]
LAB_00104338:
CALL qword ptr [RSP + 0x88]
TEST AL,AL
JZ 0x001042f0
MOV RCX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x20],RCX
CMP RCX,qword ptr [RSP + 0x60]
JZ 0x00104660
MOV byte ptr [RCX + 0x18],0xff
CMP byte ptr [RBP + 0x18],0x0
JNZ 0x00104680
MOV EAX,dword ptr [RBP]
MOV RDX,RCX
MOV dword ptr [RCX],EAX
LAB_0010436e:
MOVZX EAX,byte ptr [RBP + 0x18]
ADD RBP,0x20
MOV byte ptr [RDX + 0x18],AL
LEA RAX,[RDX + 0x20]
MOV qword ptr [RSP + 0x58],RAX
CMP qword ptr [RSP + 0x10],RBP
JNZ 0x001042ff
NOP dword ptr [RAX]
LAB_00104390:
MOV RBP,qword ptr [RSP + 0x58]
MOV R12,qword ptr [RSP + 0x50]
PXOR XMM0,XMM0
MOV qword ptr [R13 + 0x10],0x0
MOVUPS xmmword ptr [R13],XMM0
MOV R14,RBP
SUB R14,R12
JZ 0x001045fc
MOV RAX,0x7fffffffffffffe0
CMP RAX,R14
JC 0x001048ab
MOV RDI,R14
LEA RBX,[RSP + 0x50]
CALL 0x001011a0
MOV R15,RAX
ADD R14,RAX
LAB_001043dd:
MOVQ XMM0,R15
MOV qword ptr [R13 + 0x10],R14
PUNPCKLQDQ XMM0,XMM0
MOVUPS xmmword ptr [R13],XMM0
CMP RBP,R12
JZ 0x0010490c
MOV RBX,R12
MOV R14,R15
JMP 0x0010441e
LAB_00104400:
MOV EAX,dword ptr [RBX]
MOV dword ptr [R14],EAX
LAB_00104405:
MOVZX EAX,byte ptr [RBX + 0x18]
ADD RBX,0x20
ADD R14,0x20
MOV byte ptr [R14 + -0x8],AL
CMP RBP,RBX
JZ 0x00104610
LAB_0010441e:
MOV byte ptr [R14 + 0x18],0xff
CMP byte ptr [RBX + 0x18],0x0
JZ 0x00104400
MOV RSI,RBX
MOV RDI,R14
LAB_0010442f:
CALL 0x00104ea0
JMP 0x00104405
LAB_00104440:
LEA R12,[RSP + 0x90]
LEA RDX,[RSP + 0x70]
MOV RSI,RBP
MOV RDI,R12
LEA RBX,[RSP + 0x50]
LAB_00104458:
CALL 0x00103a10
MOV RSI,qword ptr [RSP + 0x58]
CMP RSI,qword ptr [RSP + 0x60]
JZ 0x001047f0
CMP byte ptr [RSP + 0xa8],0x0
MOV byte ptr [RSI + 0x18],0xff
JZ 0x001045e0
MOV RAX,qword ptr [RSP + 0xa0]
MOV byte ptr [RSI + 0x18],0x1
ADD RSI,0x20
PXOR XMM0,XMM0
MOVDQA XMM2,xmmword ptr [RSP + 0x90]
MOV qword ptr [RSP + 0xa0],0x0
MOV qword ptr [RSI + -0x10],RAX
MOVUPS xmmword ptr [RSI + -0x20],XMM2
MOV qword ptr [RSP + 0x58],RSI
MOVAPS xmmword ptr [RSP + 0x90],XMM0
LAB_001044bd:
MOV RBX,qword ptr [RSP + 0x90]
MOV RDX,qword ptr [RSP + 0x98]
MOV R12,RBX
CMP RDX,RBX
JZ 0x001045bf
MOV qword ptr [RSP + 0x8],RBX
MOV R15,RDX
MOV qword ptr [RSP + 0x20],RBP
MOV qword ptr [RSP + 0x28],R13
JMP 0x001044fd
LAB_001044f0:
ADD R12,0x20
CMP R15,R12
JZ 0x001045b0
LAB_001044fd:
CMP byte ptr [R12 + 0x18],0x0
JZ 0x001044f0
MOV R14,qword ptr [R12 + 0x8]
MOV RBX,qword ptr [R12]
CMP R14,RBX
JNZ 0x00104521
JMP 0x00104584
LAB_00104518:
ADD RBX,0x20
CMP R14,RBX
JZ 0x00104580
LAB_00104521:
CMP byte ptr [RBX + 0x18],0x0
JZ 0x00104518
MOV R13,qword ptr [RBX + 0x8]
MOV RBP,qword ptr [RBX]
CMP R13,RBP
JNZ 0x00104541
JMP 0x0010455b
LAB_00104538:
ADD RBP,0x20
CMP R13,RBP
JZ 0x00104558
LAB_00104541:
CMP byte ptr [RBP + 0x18],0x0
JZ 0x00104538
MOV RDI,RBP
ADD RBP,0x20
CALL 0x001049e0
CMP R13,RBP
JNZ 0x00104541
LAB_00104558:
MOV RBP,qword ptr [RBX]
LAB_0010455b:
TEST RBP,RBP
JZ 0x00104518
MOV RSI,qword ptr [RBX + 0x10]
MOV RDI,RBP
ADD RBX,0x20
SUB RSI,RBP
CALL 0x001011b0
CMP R14,RBX
JNZ 0x00104521
NOP dword ptr [RAX + RAX*0x1]
LAB_00104580:
MOV RBX,qword ptr [R12]
LAB_00104584:
TEST RBX,RBX
JZ 0x001044f0
MOV RSI,qword ptr [R12 + 0x10]
MOV RDI,RBX
ADD R12,0x20
SUB RSI,RBX
CALL 0x001011b0
CMP R15,R12
JNZ 0x001044fd
NOP word ptr [RAX + RAX*0x1]
LAB_001045b0:
MOV RBX,qword ptr [RSP + 0x8]
MOV RBP,qword ptr [RSP + 0x20]
MOV R13,qword ptr [RSP + 0x28]
LAB_001045bf:
TEST RBX,RBX
JZ 0x001042f0
MOV RSI,qword ptr [RSP + 0xa0]
MOV RDI,RBX
SUB RSI,RBX
CALL 0x001011b0
JMP 0x001042f0
LAB_001045e0:
MOV EAX,dword ptr [RSP + 0x90]
MOV byte ptr [RSI + 0x18],0x0
ADD RSI,0x20
MOV dword ptr [RSI + -0x20],EAX
MOV qword ptr [RSP + 0x58],RSI
JMP 0x001042f0
LAB_001045fc:
XOR R14D,R14D
XOR R15D,R15D
JMP 0x001043dd
LAB_00104610:
MOV qword ptr [R13 + 0x8],R14
MOV RBX,R12
MOV byte ptr [R13 + 0x18],0x1
JMP 0x00104629
LAB_00104620:
ADD RBX,0x20
CMP RBP,RBX
JZ 0x00104640
LAB_00104629:
CMP byte ptr [RBX + 0x18],0x0
JZ 0x00104620
MOV RDI,RBX
ADD RBX,0x20
CALL 0x001049e0
CMP RBP,RBX
JNZ 0x00104629
LAB_00104640:
MOV RSI,qword ptr [RSP + 0x60]
SUB RSI,R12
LAB_00104648:
TEST R12,R12
JZ 0x00104266
MOV RDI,R12
CALL 0x001011b0
JMP 0x00104266
LAB_00104660:
LEA RBX,[RSP + 0x50]
MOV RSI,RCX
MOV RDX,RBP
MOV RDI,RBX
CALL 0x00105120
JMP 0x001042f0
LAB_00104680:
MOV RAX,qword ptr [RBP + 0x8]
PXOR XMM0,XMM0
SUB RAX,qword ptr [RBP]
MOV qword ptr [RCX + 0x10],0x0
MOVUPS xmmword ptr [RCX],XMM0
JZ 0x00104829
MOV RDX,0x7fffffffffffffe0
MOV RBX,RAX
CMP RDX,RAX
JC 0x0010488e
MOV RDI,RAX
LAB_001046b6:
CALL 0x001011a0
MOV qword ptr [RSP + 0x38],RAX
LAB_001046c0:
MOV R15,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RSP + 0x20]
MOVQ XMM0,R15
ADD RBX,R15
PUNPCKLQDQ XMM0,XMM0
MOV qword ptr [RAX + 0x10],RBX
MOVUPS xmmword ptr [RAX],XMM0
MOV RAX,qword ptr [RBP + 0x8]
MOV R14,qword ptr [RBP]
MOV qword ptr [RSP + 0x28],RAX
CMP RAX,R14
JNZ 0x0010471a
JMP 0x00104818
LAB_001046f8:
MOV EAX,dword ptr [R14]
MOV dword ptr [R15],EAX
LAB_001046fe:
MOVZX EAX,byte ptr [R14 + 0x18]
ADD R15,0x20
ADD R14,0x20
MOV byte ptr [R15 + -0x8],AL
CMP qword ptr [RSP + 0x28],R14
JZ 0x00104818
LAB_0010471a:
MOV byte ptr [R15 + 0x18],0xff
CMP byte ptr [R14 + 0x18],0x0
JZ 0x001046f8
MOV RAX,qword ptr [R14 + 0x8]
PXOR XMM0,XMM0
SUB RAX,qword ptr [R14]
MOV qword ptr [R15 + 0x10],0x0
MOVUPS xmmword ptr [R15],XMM0
JZ 0x001047e0
MOV RCX,0x7fffffffffffffe0
MOV RBX,RAX
CMP RCX,RAX
JC 0x00104855
MOV RDI,RAX
LAB_0010475c:
CALL 0x001011a0
MOV qword ptr [RSP + 0x30],RAX
LAB_00104766:
MOV R12,qword ptr [RSP + 0x30]
MOVQ XMM0,R12
ADD RBX,R12
PUNPCKLQDQ XMM0,XMM0
MOV qword ptr [R15 + 0x10],RBX
MOVUPS xmmword ptr [R15],XMM0
MOV RAX,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [R14]
MOV qword ptr [RSP + 0x8],RAX
CMP RAX,RBX
JNZ 0x001047b6
JMP 0x001047d0
LAB_00104798:
MOV EAX,dword ptr [RBX]
MOV dword ptr [R12],EAX
LAB_0010479e:
MOVZX EAX,byte ptr [RBX + 0x18]
ADD R12,0x20
ADD RBX,0x20
MOV byte ptr [R12 + -0x8],AL
CMP qword ptr [RSP + 0x8],RBX
JZ 0x001047d0
LAB_001047b6:
MOV byte ptr [R12 + 0x18],0xff
CMP byte ptr [RBX + 0x18],0x0
JZ 0x00104798
MOV RSI,RBX
MOV RDI,R12
LAB_001047c8:
CALL 0x00104ea0
JMP 0x0010479e
LAB_001047d0:
MOV qword ptr [R15 + 0x8],R12
JMP 0x001046fe
LAB_001047e0:
MOV qword ptr [RSP + 0x30],0x0
XOR EBX,EBX
JMP 0x00104766
LAB_001047f0:
LEA RBX,[RSP + 0x50]
MOV RDX,R12
MOV RDI,RBX
LAB_001047fb:
CALL 0x00104b10
CMP byte ptr [RSP + 0xa8],0x0
JZ 0x001042f0
JMP 0x001044bd
LAB_00104818:
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RAX + 0x8],R15
MOV RDX,RAX
JMP 0x0010436e
LAB_00104829:
MOV qword ptr [RSP + 0x38],0x0
XOR EBX,EBX
JMP 0x001046c0
LAB_00104839:
MOVUPS xmmword ptr [RDI],XMM0
MOV qword ptr [RDI + 0x10],0x0
MOV qword ptr [RDI + 0x8],0x0
MOV byte ptr [RDI + 0x18],0x1
JMP 0x00104266
LAB_00104855:
TEST RAX,RAX
JNS 0x00104876
MOV RAX,qword ptr [RSP + 0xb8]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x001048fd
LAB_00104871:
CALL 0x00101190
LAB_00104876:
MOV RAX,qword ptr [RSP + 0xb8]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x00104907
CALL 0x00101130
LAB_0010488e:
TEST RAX,RAX
JNS 0x001048c8
MOV RAX,qword ptr [RSP + 0xb8]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x00104922
LAB_001048a6:
CALL 0x00101190
LAB_001048ab:
MOV RAX,qword ptr [RSP + 0xb8]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x00104927
LEA RBX,[RSP + 0x50]
LAB_001048c3:
CALL 0x00101190
LAB_001048c8:
MOV RAX,qword ptr [RSP + 0xb8]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x00104931
LAB_001048db:
CALL 0x00101130
LAB_001048e0:
MOV RAX,qword ptr [RSP + 0xb8]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x00104902
LEA RBX,[RSP + 0x50]
LAB_001048f8:
CALL 0x00101140
LAB_001048fd:
CALL 0x001011c0
LAB_00104902:
CALL 0x001011c0
LAB_00104907:
CALL 0x001011c0
LAB_0010490c:
MOV RSI,qword ptr [RSP + 0x60]
MOV qword ptr [R13 + 0x8],R15
MOV byte ptr [R13 + 0x18],0x1
SUB RSI,R12
JMP 0x00104648
LAB_00104922:
CALL 0x001011c0
LAB_00104927:
CALL 0x001011c0
LAB_0010492c:
CALL 0x001011c0
LAB_00104931:
CALL 0x001011c0 | /* func0(Nested const&) */
Nested * func0(Nested *param_1)
{
vector *pvVar1;
long *plVar2;
function *pfVar3;
vector *pvVar4;
int8 uVar5;
int8 uVar6;
long lVar7;
char cVar8;
vector<Nested,std::allocator<Nested>> *pvVar9;
vector *pvVar10;
long *plVar11;
vector *pvVar12;
function *pfVar13;
vector<Nested,std::allocator<Nested>> *pvVar14;
uint *in_RSI;
long *plVar15;
ulong uVar16;
vector<Nested,std::allocator<Nested>> *pvVar17;
long *plVar18;
long in_FS_OFFSET;
vector<Nested,std::allocator<Nested>> *local_c8;
int (*local_c0) [16];
int4 local_ac;
vector *local_a8;
vector *pvStack_a0;
vector *local_98;
int local_88 [16];
code *local_78;
code *pcStack_70;
int local_68 [16];
long local_58;
char local_50;
long local_40;
local_40 = *(long *)(in_FS_OFFSET + 0x28);
local_88 = (int [16])0x0;
local_98 = (vector *)0x0;
local_78 = std::_Function_handler<bool(int),func0(Nested_const&)::{lambda(int)#1}>::_M_manager;
pcStack_70 = std::_Function_handler<bool(int),func0(Nested_const&)::{lambda(int)#1}>::_M_invoke;
local_a8 = (vector *)0x0;
pvStack_a0 = (vector *)0x0;
if (*(char *)(in_RSI + 6) == '\x01') {
pfVar3 = *(function **)(in_RSI + 2);
pfVar13 = *(function **)in_RSI;
if (pfVar13 == pfVar3) {
*(int (*) [16])param_1 = (int [16])0x0;
*(int8 *)(param_1 + 0x10) = 0;
*(int8 *)(param_1 + 8) = 0;
param_1[0x18] = (Nested)0x1;
}
else {
do {
while (pfVar13[0x18] == (function)0x1) {
/* try { // try from 00104458 to 00104672 has its CatchHandler @ 0010494e */
even_ele((Nested *)local_68,pfVar13);
lVar7 = local_58;
if (pvStack_a0 == local_98) {
/* try { // try from 001047fb to 001047ff has its CatchHandler @ 00104966 */
std::vector<Nested,std::allocator<Nested>>::_M_realloc_insert<Nested>
((vector<Nested,std::allocator<Nested>> *)&local_a8,
(__normal_iterator)pvStack_a0,(Nested *)local_68);
if (local_50 != '\0') goto LAB_001044bd;
}
else {
pvStack_a0[0x18] = (vector)0xff;
if (local_50 == '\0') {
pvStack_a0[0x18] = (vector)0x0;
*(int4 *)pvStack_a0 = local_68._0_4_;
pvStack_a0 = pvStack_a0 + 0x20;
}
else {
pvStack_a0[0x18] = (vector)0x1;
local_58 = 0;
*(long *)(pvStack_a0 + 0x10) = lVar7;
*(int8 *)pvStack_a0 = local_68._0_8_;
*(int8 *)(pvStack_a0 + 8) = local_68._8_8_;
local_68 = (int [16])0x0;
pvStack_a0 = pvStack_a0 + 0x20;
LAB_001044bd:
uVar5 = local_68._0_8_;
uVar6 = local_68._8_8_;
for (plVar15 = (long *)local_68._0_8_; (long *)uVar6 != plVar15; plVar15 = plVar15 + 4
) {
while (*(char *)(plVar15 + 3) != '\0') {
plVar18 = (long *)plVar15[1];
plVar11 = (long *)*plVar15;
if (plVar18 != plVar11) {
do {
while (*(char *)(plVar11 + 3) == '\0') {
LAB_00104518:
plVar11 = plVar11 + 4;
if (plVar18 == plVar11) goto LAB_00104580;
}
pvVar9 = (vector<Nested,std::allocator<Nested>> *)plVar11[1];
pvVar17 = (vector<Nested,std::allocator<Nested>> *)*plVar11;
if (pvVar9 != pvVar17) {
do {
while (pvVar17[0x18] == (vector<Nested,std::allocator<Nested>>)0x0) {
pvVar17 = pvVar17 + 0x20;
if (pvVar9 == pvVar17) goto LAB_00104558;
}
pvVar14 = pvVar17 + 0x20;
std::vector<Nested,std::allocator<Nested>>::~vector(pvVar17);
pvVar17 = pvVar14;
} while (pvVar9 != pvVar14);
LAB_00104558:
pvVar17 = (vector<Nested,std::allocator<Nested>> *)*plVar11;
}
if (pvVar17 == (vector<Nested,std::allocator<Nested>> *)0x0)
goto LAB_00104518;
plVar2 = plVar11 + 2;
plVar11 = plVar11 + 4;
operator_delete(pvVar17,*plVar2 - (long)pvVar17);
} while (plVar18 != plVar11);
LAB_00104580:
plVar11 = (long *)*plVar15;
}
if (plVar11 == (long *)0x0) break;
plVar18 = plVar15 + 2;
plVar15 = plVar15 + 4;
operator_delete(plVar11,*plVar18 - (long)plVar11);
if ((long *)uVar6 == plVar15) goto LAB_001045bf;
}
}
LAB_001045bf:
if ((long *)uVar5 != (long *)0x0) {
operator_delete((void *)uVar5,local_58 - uVar5);
}
}
}
LAB_001042f0:
pfVar13 = pfVar13 + 0x20;
if (pfVar3 == pfVar13) goto LAB_00104390;
}
if (pfVar13[0x18] != (function)0x0) {
if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
/* WARNING: Subroutine does not return */
std::__throw_bad_variant_access(false);
}
local_ac = *(int4 *)pfVar13;
if (local_78 == (code *)0x0) goto LAB_001048e0;
/* try { // try from 00104338 to 001043d6 has its CatchHandler @ 0010494e */
cVar8 = (*pcStack_70)(local_88,&local_ac);
pvVar4 = pvStack_a0;
if (cVar8 == '\0') goto LAB_001042f0;
if (pvStack_a0 == local_98) {
std::vector<Nested,std::allocator<Nested>>::_M_realloc_insert<Nested_const&>
((vector<Nested,std::allocator<Nested>> *)&local_a8,
(__normal_iterator)pvStack_a0,(Nested *)pfVar13);
goto LAB_001042f0;
}
pvStack_a0[0x18] = (vector)0xff;
if (pfVar13[0x18] == (function)0x0) {
*(int4 *)pvStack_a0 = *(int4 *)pfVar13;
}
else {
uVar16 = *(long *)(pfVar13 + 8) - *(long *)pfVar13;
*(int8 *)(pvStack_a0 + 0x10) = 0;
*(int (*) [16])pvStack_a0 = (int [16])0x0;
if (uVar16 == 0) {
local_c0 = (int (*) [16])0x0;
uVar16 = 0;
}
else {
if (0x7fffffffffffffe0 < uVar16) {
LAB_0010488e:
if (-1 < (long)uVar16) goto LAB_001048c8;
if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
/* try { // try from 001048a6 to 001048aa has its CatchHandler @ 00104936 */
std::__throw_bad_array_new_length();
goto LAB_001048ab;
}
/* try { // try from 001046b6 to 001046ba has its CatchHandler @ 00104936 */
local_c0 = (int (*) [16])operator_new(uVar16);
}
*(int **)(pvVar4 + 0x10) = *local_c0 + uVar16;
*(int (**) [16])pvVar4 = local_c0;
*(int (**) [16])(pvVar4 + 8) = local_c0;
plVar15 = *(long **)(pfVar13 + 8);
for (plVar18 = *(long **)pfVar13; plVar15 != plVar18; plVar18 = plVar18 + 4) {
local_c0[1][8] = 0xff;
if (*(char *)(plVar18 + 3) == '\0') {
*(int4 *)*local_c0 = *(int4 *)plVar18;
}
else {
uVar16 = plVar18[1] - *plVar18;
*(int8 *)local_c0[1] = 0;
*local_c0 = (int [16])0x0;
if (uVar16 == 0) {
local_c8 = (vector<Nested,std::allocator<Nested>> *)0x0;
uVar16 = 0;
}
else {
if (0x7fffffffffffffe0 < uVar16) {
if ((long)uVar16 < 0) {
if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) goto LAB_001048fd;
/* try { // try from 00104871 to 0010488d has its CatchHandler @ 0010495a */
std::__throw_bad_array_new_length();
}
if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
uVar16 = std::__throw_bad_alloc();
goto LAB_0010488e;
}
/* try { // try from 0010475c to 00104760 has its CatchHandler @ 0010495a */
local_c8 = (vector<Nested,std::allocator<Nested>> *)operator_new(uVar16);
}
*(vector<Nested,std::allocator<Nested>> **)local_c0[1] = local_c8 + uVar16;
*(vector<Nested,std::allocator<Nested>> **)*local_c0 = local_c8;
*(vector<Nested,std::allocator<Nested>> **)(*local_c0 + 8) = local_c8;
pvVar1 = (vector *)plVar18[1];
for (pvVar12 = (vector *)*plVar18; pvVar1 != pvVar12; pvVar12 = pvVar12 + 0x20) {
local_c8[0x18] = (vector<Nested,std::allocator<Nested>>)0xff;
if (pvVar12[0x18] == (vector)0x0) {
*(int4 *)local_c8 = *(int4 *)pvVar12;
}
else {
/* try { // try from 001047c8 to 001047cc has its CatchHandler @ 00104972 */
std::vector<Nested,std::allocator<Nested>>::vector(local_c8,pvVar12);
}
*(vector *)(local_c8 + 0x18) = pvVar12[0x18];
local_c8 = local_c8 + 0x20;
}
*(vector<Nested,std::allocator<Nested>> **)(*local_c0 + 8) = local_c8;
}
local_c0[1][8] = *(int *)(plVar18 + 3);
local_c0 = local_c0 + 2;
}
*(int (**) [16])(pvVar4 + 8) = local_c0;
}
pvVar1 = (vector *)(pfVar13 + 0x18);
pfVar13 = pfVar13 + 0x20;
pvVar4[0x18] = *pvVar1;
pvStack_a0 = pvVar4 + 0x20;
} while (pfVar3 != pfVar13);
LAB_00104390:
pvVar1 = pvStack_a0;
pvVar4 = local_a8;
*(int8 *)(param_1 + 0x10) = 0;
*(int (*) [16])param_1 = (int [16])0x0;
uVar16 = (long)pvStack_a0 - (long)local_a8;
if (uVar16 == 0) {
pvVar17 = (vector<Nested,std::allocator<Nested>> *)0x0;
pvVar9 = (vector<Nested,std::allocator<Nested>> *)0x0;
}
else {
if (0x7fffffffffffffe0 < uVar16) {
LAB_001048ab:
if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
/* try { // try from 001048c3 to 001048c7 has its CatchHandler @ 0010494e */
std::__throw_bad_array_new_length();
LAB_001048c8:
if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
/* try { // try from 001048db to 001048df has its CatchHandler @ 00104936 */
std::__throw_bad_alloc();
LAB_001048e0:
if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
/* try { // try from 001048f8 to 001048fc has its CatchHandler @ 0010494e */
std::__throw_bad_function_call();
LAB_001048fd:
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
pvVar9 = (vector<Nested,std::allocator<Nested>> *)operator_new(uVar16);
pvVar17 = pvVar9 + uVar16;
}
*(vector<Nested,std::allocator<Nested>> **)(param_1 + 0x10) = pvVar17;
*(vector<Nested,std::allocator<Nested>> **)param_1 = pvVar9;
*(vector<Nested,std::allocator<Nested>> **)(param_1 + 8) = pvVar9;
pvVar12 = pvVar4;
if (pvVar1 == pvVar4) {
*(vector<Nested,std::allocator<Nested>> **)(param_1 + 8) = pvVar9;
param_1[0x18] = (Nested)0x1;
uVar16 = (long)local_98 - (long)pvVar4;
}
else {
do {
pvVar9[0x18] = (vector<Nested,std::allocator<Nested>>)0xff;
if (pvVar12[0x18] == (vector)0x0) {
*(int4 *)pvVar9 = *(int4 *)pvVar12;
}
else {
/* try { // try from 0010442f to 00104433 has its CatchHandler @ 00104942 */
std::vector<Nested,std::allocator<Nested>>::vector(pvVar9,pvVar12);
}
pvVar10 = pvVar12 + 0x20;
pvVar17 = pvVar9 + 0x20;
*(vector *)(pvVar9 + 0x18) = pvVar12[0x18];
pvVar12 = pvVar10;
pvVar9 = pvVar17;
} while (pvVar1 != pvVar10);
*(vector<Nested,std::allocator<Nested>> **)(param_1 + 8) = pvVar17;
param_1[0x18] = (Nested)0x1;
pvVar12 = pvVar4;
do {
while (((vector<Nested,std::allocator<Nested>> *)pvVar12)[0x18] ==
(vector<Nested,std::allocator<Nested>>)0x0) {
pvVar12 = (vector *)((vector<Nested,std::allocator<Nested>> *)pvVar12 + 0x20);
if (pvVar1 == pvVar12) goto LAB_00104640;
}
pvVar10 = (vector *)((vector<Nested,std::allocator<Nested>> *)pvVar12 + 0x20);
std::vector<Nested,std::allocator<Nested>>::~vector
((vector<Nested,std::allocator<Nested>> *)pvVar12);
pvVar12 = pvVar10;
} while (pvVar1 != pvVar10);
LAB_00104640:
uVar16 = (long)local_98 - (long)pvVar4;
}
if (pvVar4 != (vector *)0x0) {
operator_delete(pvVar4,uVar16);
}
}
}
else {
if (*(char *)(in_RSI + 6) != '\0') {
if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
/* WARNING: Subroutine does not return */
std::__throw_bad_variant_access(false);
}
if ((*in_RSI & 1) == 0) {
*(uint *)param_1 = *in_RSI;
param_1[0x18] = (Nested)0x0;
}
else {
*(int8 *)(param_1 + 0x10) = 0;
param_1[0x18] = (Nested)0x1;
*(int (*) [16])param_1 = (int [16])0x0;
}
}
if (local_78 != (code *)0x0) {
(*local_78)(local_88,local_88,3);
}
if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return param_1;
} |
2,320 | func0 |
#include <cmath>
#include <cassert>
| double func0(double b, double s) {
return 2 * b * s + pow(b, 2);
}
| int main() {
assert(func0(3, 4) == 33);
assert(func0(4, 5) == 56);
assert(func0(1, 2) == 5);
return 0;
}
| O0 | cpp | func0(double, double):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x20,%rsp
movsd %xmm0,-0x8(%rbp)
movsd %xmm1,-0x10(%rbp)
movsd -0x8(%rbp),%xmm0
addsd %xmm0,%xmm0
mulsd -0x10(%rbp),%xmm0
movsd %xmm0,-0x18(%rbp)
movsd 0xef6(%rip),%xmm0
mov -0x8(%rbp),%rax
movapd %xmm0,%xmm1
movq %rax,%xmm0
callq 1060 <pow@plt>
addsd -0x18(%rbp),%xmm0
leaveq
retq
| _Z5func0dd:
endbr64
push rbp
mov rbp, rsp
sub rsp, 20h
movsd [rbp+x], xmm0
movsd [rbp+var_10], xmm1
movsd xmm0, [rbp+x]
addsd xmm0, xmm0
mulsd xmm0, [rbp+var_10]
movsd [rbp+var_18], xmm0
movsd xmm0, cs:y
mov rax, [rbp+x]
movapd xmm1, xmm0; y
movq xmm0, rax; x
call _pow
addsd xmm0, [rbp+var_18]
leave
retn | double func0(double a1, double a2)
{
return pow(a1, 2.0) + (a1 + a1) * a2;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOVSD qword ptr [RBP + -0x8],XMM0
MOVSD qword ptr [RBP + -0x10],XMM1
MOVSD XMM0,qword ptr [RBP + -0x8]
ADDSD XMM0,XMM0
MULSD XMM0,qword ptr [RBP + -0x10]
MOVSD qword ptr [RBP + -0x18],XMM0
MOVSD XMM0,qword ptr [0x00102070]
MOV RAX,qword ptr [RBP + -0x8]
MOVAPD XMM1,XMM0
MOVQ XMM0,RAX
CALL 0x00101060
ADDSD XMM0,qword ptr [RBP + -0x18]
LEAVE
RET | /* func0(double, double) */
double func0(double param_1,double param_2)
{
double dVar1;
dVar1 = pow(param_1,DAT_00102070);
return dVar1 + (param_1 + param_1) * param_2;
} |
2,321 | func0 |
#include <cmath>
#include <cassert>
| double func0(double b, double s) {
return 2 * b * s + pow(b, 2);
}
| int main() {
assert(func0(3, 4) == 33);
assert(func0(4, 5) == 56);
assert(func0(1, 2) == 5);
return 0;
}
| O1 | cpp | func0(double, double):
endbr64
movapd %xmm0,%xmm2
addsd %xmm0,%xmm2
mulsd %xmm1,%xmm2
mulsd %xmm0,%xmm0
addsd %xmm2,%xmm0
retq
| _Z5func0dd:
endbr64
movapd xmm2, xmm0
addsd xmm0, xmm0
mulsd xmm0, xmm1
mulsd xmm2, xmm2
addsd xmm0, xmm2
retn | double func0(double a1, double a2)
{
return (a1 + a1) * a2 + a1 * a1;
} | func0:
ENDBR64
MOVAPD XMM2,XMM0
ADDSD XMM0,XMM0
MULSD XMM0,XMM1
MULSD XMM2,XMM2
ADDSD XMM0,XMM2
RET | /* func0(double, double) */
double func0(double param_1,double param_2)
{
return (param_1 + param_1) * param_2 + param_1 * param_1;
} |
2,322 | func0 |
#include <cmath>
#include <cassert>
| double func0(double b, double s) {
return 2 * b * s + pow(b, 2);
}
| int main() {
assert(func0(3, 4) == 33);
assert(func0(4, 5) == 56);
assert(func0(1, 2) == 5);
return 0;
}
| O2 | cpp | func0(double, double):
endbr64
movapd %xmm0,%xmm2
addsd %xmm0,%xmm2
mulsd %xmm0,%xmm0
mulsd %xmm1,%xmm2
addsd %xmm2,%xmm0
retq
nopl 0x0(%rax)
| _Z5func0dd:
endbr64
movapd xmm2, xmm0
addsd xmm0, xmm0
mulsd xmm2, xmm2
mulsd xmm0, xmm1
addsd xmm0, xmm2
retn | double func0(double a1, double a2)
{
return (a1 + a1) * a2 + a1 * a1;
} | func0:
ENDBR64
MOVAPD XMM2,XMM0
ADDSD XMM0,XMM0
MULSD XMM2,XMM2
MULSD XMM0,XMM1
ADDSD XMM0,XMM2
RET | /* func0(double, double) */
double func0(double param_1,double param_2)
{
return (param_1 + param_1) * param_2 + param_1 * param_1;
} |
2,323 | func0 |
#include <cmath>
#include <cassert>
| double func0(double b, double s) {
return 2 * b * s + pow(b, 2);
}
| int main() {
assert(func0(3, 4) == 33);
assert(func0(4, 5) == 56);
assert(func0(1, 2) == 5);
return 0;
}
| O3 | cpp | func0(double, double):
endbr64
movapd %xmm0,%xmm2
addsd %xmm0,%xmm2
mulsd %xmm0,%xmm0
mulsd %xmm1,%xmm2
addsd %xmm2,%xmm0
retq
nopl 0x0(%rax)
| _Z5func0dd:
endbr64
movapd xmm2, xmm0
addsd xmm0, xmm0
mulsd xmm2, xmm2
mulsd xmm0, xmm1
addsd xmm0, xmm2
retn | double func0(double a1, double a2)
{
return (a1 + a1) * a2 + a1 * a1;
} | func0:
ENDBR64
MOVAPD XMM2,XMM0
ADDSD XMM0,XMM0
MULSD XMM2,XMM2
MULSD XMM0,XMM1
ADDSD XMM0,XMM2
RET | /* func0(double, double) */
double func0(double param_1,double param_2)
{
return (param_1 + param_1) * param_2 + param_1 * param_1;
} |
2,324 | func0 |
#include <iostream>
#include <assert.h>
#include <unordered_map>
| bool func0(std::unordered_map<int, int> dict1) {
if (!dict1.empty()) {
return false;
} else {
return true;
}
}
| int main() {
std::unordered_map<int, int> non_empty_map1 = {{10, 1}};
std::unordered_map<int, int> non_empty_map2 = {{11, 1}};
std::unordered_map<int, int> empty_map;
assert(func0(non_empty_map1) == false);
assert(func0(non_empty_map2) == false);
assert(func0(empty_map) == true);
return 0;
}
| O0 | cpp | func0(std::unordered_map<int, int, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, int> > >):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x10,%rsp
mov %rdi,-0x8(%rbp)
mov -0x8(%rbp),%rax
mov %rax,%rdi
callq 19ca <_ZNKSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEE5emptyEv>
xor $0x1,%eax
test %al,%al
je 1313 <_Z5func0St13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEE+0x2a>
mov $0x0,%eax
jmp 1318 <_Z5func0St13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEE+0x2f>
mov $0x1,%eax
leaveq
retq
| _Z5func0St13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEE:
endbr64
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov rdi, rax
call _ZNKSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEE5emptyEv; std::unordered_map<int,int>::empty(void)
xor eax, 1
test al, al
jz short loc_12F3
mov eax, 0
jmp short locret_12F8
loc_12F3:
mov eax, 1
locret_12F8:
leave
retn | _BOOL8 func0(long long a1)
{
return (unsigned __int8)std::unordered_map<int,int>::empty(a1) == 1;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,RAX
CALL 0x001018c0
XOR EAX,0x1
TEST AL,AL
JZ 0x001012f3
MOV EAX,0x0
JMP 0x001012f8
LAB_001012f3:
MOV EAX,0x1
LAB_001012f8:
LEAVE
RET | /* func0(std::unordered_map<int, int, std::hash<int>, std::equal_to<int>,
std::allocator<std::pair<int const, int> > >) */
bool func0(unordered_map param_1)
{
char cVar1;
int4 in_register_0000003c;
cVar1 = std::
unordered_map<int,int,std::hash<int>,std::equal_to<int>,std::allocator<std::pair<int_const,int>>>
::empty((unordered_map<int,int,std::hash<int>,std::equal_to<int>,std::allocator<std::pair<int_const,int>>>
*)CONCAT44(in_register_0000003c,param_1));
return cVar1 == '\x01';
} |
2,325 | func0 |
#include <iostream>
#include <assert.h>
#include <unordered_map>
| bool func0(std::unordered_map<int, int> dict1) {
if (!dict1.empty()) {
return false;
} else {
return true;
}
}
| int main() {
std::unordered_map<int, int> non_empty_map1 = {{10, 1}};
std::unordered_map<int, int> non_empty_map2 = {{11, 1}};
std::unordered_map<int, int> empty_map;
assert(func0(non_empty_map1) == false);
assert(func0(non_empty_map2) == false);
assert(func0(empty_map) == true);
return 0;
}
| O1 | cpp | func0(std::unordered_map<int, int, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, int> > >):
endbr64
cmpq $0x0,0x18(%rdi)
sete %al
retq
| _Z5func0St13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEE:
endbr64
cmp qword ptr [rdi+18h], 0
setz al
retn | bool func0(long long a1)
{
return *(_QWORD *)(a1 + 24) == 0LL;
} | func0:
ENDBR64
CMP qword ptr [RDI + 0x18],0x0
SETZ AL
RET | /* func0(std::unordered_map<int, int, std::hash<int>, std::equal_to<int>,
std::allocator<std::pair<int const, int> > >) */
bool func0(unordered_map param_1)
{
int4 in_register_0000003c;
return *(long *)(CONCAT44(in_register_0000003c,param_1) + 0x18) == 0;
} |
2,326 | func0 |
#include <iostream>
#include <assert.h>
#include <unordered_map>
| bool func0(std::unordered_map<int, int> dict1) {
if (!dict1.empty()) {
return false;
} else {
return true;
}
}
| int main() {
std::unordered_map<int, int> non_empty_map1 = {{10, 1}};
std::unordered_map<int, int> non_empty_map2 = {{11, 1}};
std::unordered_map<int, int> empty_map;
assert(func0(non_empty_map1) == false);
assert(func0(non_empty_map2) == false);
assert(func0(empty_map) == true);
return 0;
}
| O2 | cpp | func0(std::unordered_map<int, int, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, int> > >):
endbr64
cmpq $0x0,0x18(%rdi)
sete %al
retq
nopl (%rax)
| _Z5func0St13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEE:
endbr64
cmp qword ptr [rdi+18h], 0
setz al
retn | bool func0(long long a1)
{
return *(_QWORD *)(a1 + 24) == 0LL;
} | func0:
ENDBR64
CMP qword ptr [RDI + 0x18],0x0
SETZ AL
RET | /* func0(std::unordered_map<int, int, std::hash<int>, std::equal_to<int>,
std::allocator<std::pair<int const, int> > >) */
bool func0(unordered_map param_1)
{
int4 in_register_0000003c;
return *(long *)(CONCAT44(in_register_0000003c,param_1) + 0x18) == 0;
} |
2,327 | func0 |
#include <iostream>
#include <assert.h>
#include <unordered_map>
| bool func0(std::unordered_map<int, int> dict1) {
if (!dict1.empty()) {
return false;
} else {
return true;
}
}
| int main() {
std::unordered_map<int, int> non_empty_map1 = {{10, 1}};
std::unordered_map<int, int> non_empty_map2 = {{11, 1}};
std::unordered_map<int, int> empty_map;
assert(func0(non_empty_map1) == false);
assert(func0(non_empty_map2) == false);
assert(func0(empty_map) == true);
return 0;
}
| O3 | cpp | func0(std::unordered_map<int, int, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, int> > >):
endbr64
cmpq $0x0,0x18(%rdi)
sete %al
retq
nopl (%rax)
| _Z5func0St13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEE:
endbr64
cmp qword ptr [rdi+18h], 0
setz al
retn | bool func0(long long a1)
{
return *(_QWORD *)(a1 + 24) == 0LL;
} | func0:
ENDBR64
CMP qword ptr [RDI + 0x18],0x0
SETZ AL
RET | /* func0(std::unordered_map<int, int, std::hash<int>, std::equal_to<int>,
std::allocator<std::pair<int const, int> > >) */
bool func0(unordered_map param_1)
{
int4 in_register_0000003c;
return *(long *)(CONCAT44(in_register_0000003c,param_1) + 0x18) == 0;
} |
2,328 | func0 | #include <iostream>
#include <assert.h>
| int func0(int num) {
if (num <= 1)
return 1;
int res_num = 0;
for (int i = 0; i < num; ++i) {
res_num += func0(i) * func0(num - i - 1);
}
return res_num;
}
| int main() {
assert(func0(10) == 16796);
assert(func0(9) == 4862);
assert(func0(7) == 429);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x28,%rsp
mov %edi,-0x24(%rbp)
cmpl $0x1,-0x24(%rbp)
jg 11a6 <_Z5func0i+0x1d>
mov $0x1,%eax
jmp 11e7 <_Z5func0i+0x5e>
movl $0x0,-0x18(%rbp)
movl $0x0,-0x14(%rbp)
mov -0x14(%rbp),%eax
cmp -0x24(%rbp),%eax
jge 11e4 <_Z5func0i+0x5b>
mov -0x14(%rbp),%eax
mov %eax,%edi
callq 1189 <_Z5func0i>
mov %eax,%ebx
mov -0x24(%rbp),%eax
sub -0x14(%rbp),%eax
sub $0x1,%eax
mov %eax,%edi
callq 1189 <_Z5func0i>
imul %ebx,%eax
add %eax,-0x18(%rbp)
addl $0x1,-0x14(%rbp)
jmp 11b4 <_Z5func0i+0x2b>
mov -0x18(%rbp),%eax
add $0x28,%rsp
pop %rbx
pop %rbp
retq
| _Z5func0i:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 28h
mov [rbp+var_24], edi
cmp [rbp+var_24], 1
jg short loc_1166
mov eax, 1
jmp short loc_11A7
loc_1166:
mov [rbp+var_18], 0
mov [rbp+var_14], 0
jmp short loc_119C
loc_1176:
mov eax, [rbp+var_14]
mov edi, eax; int
call _Z5func0i; func0(int)
mov ebx, eax
mov eax, [rbp+var_24]
sub eax, [rbp+var_14]
sub eax, 1
mov edi, eax; int
call _Z5func0i; func0(int)
imul eax, ebx
add [rbp+var_18], eax
add [rbp+var_14], 1
loc_119C:
mov eax, [rbp+var_14]
cmp eax, [rbp+var_24]
jl short loc_1176
mov eax, [rbp+var_18]
loc_11A7:
mov rbx, [rbp+var_8]
leave
retn | long long func0(int a1)
{
int v2; // ebx
unsigned int v3; // [rsp+18h] [rbp-18h]
int i; // [rsp+1Ch] [rbp-14h]
if ( a1 <= 1 )
return 1LL;
v3 = 0;
for ( i = 0; i < a1; ++i )
{
v2 = func0(i);
v3 += v2 * func0(a1 - i - 1);
}
return v3;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x28
MOV dword ptr [RBP + -0x24],EDI
CMP dword ptr [RBP + -0x24],0x1
JG 0x00101166
MOV EAX,0x1
JMP 0x001011a7
LAB_00101166:
MOV dword ptr [RBP + -0x18],0x0
MOV dword ptr [RBP + -0x14],0x0
JMP 0x0010119c
LAB_00101176:
MOV EAX,dword ptr [RBP + -0x14]
MOV EDI,EAX
CALL 0x00101149
MOV EBX,EAX
MOV EAX,dword ptr [RBP + -0x24]
SUB EAX,dword ptr [RBP + -0x14]
SUB EAX,0x1
MOV EDI,EAX
CALL 0x00101149
IMUL EAX,EBX
ADD dword ptr [RBP + -0x18],EAX
ADD dword ptr [RBP + -0x14],0x1
LAB_0010119c:
MOV EAX,dword ptr [RBP + -0x14]
CMP EAX,dword ptr [RBP + -0x24]
JL 0x00101176
MOV EAX,dword ptr [RBP + -0x18]
LAB_001011a7:
MOV RBX,qword ptr [RBP + -0x8]
LEAVE
RET | /* func0(int) */
int func0(int param_1)
{
int iVar1;
int iVar2;
int4 local_20;
int4 local_1c;
if (param_1 < 2) {
local_20 = 1;
}
else {
local_20 = 0;
for (local_1c = 0; local_1c < param_1; local_1c = local_1c + 1) {
iVar1 = func0(local_1c);
iVar2 = func0((param_1 - local_1c) + -1);
local_20 = local_20 + iVar2 * iVar1;
}
}
return local_20;
} |
2,329 | func0 | #include <iostream>
#include <assert.h>
| int func0(int num) {
if (num <= 1)
return 1;
int res_num = 0;
for (int i = 0; i < num; ++i) {
res_num += func0(i) * func0(num - i - 1);
}
return res_num;
}
| int main() {
assert(func0(10) == 16796);
assert(func0(9) == 4862);
assert(func0(7) == 429);
return 0;
}
| O1 | cpp | func0(int):
endbr64
push %r13
push %r12
push %rbp
push %rbx
sub $0x8,%rsp
mov $0x1,%r12d
cmp $0x1,%edi
jle 11cf <_Z5func0i+0x46>
lea -0x1(%rdi),%ebp
mov $0x0,%r12d
mov %ebp,%r13d
mov %r13d,%edi
sub %ebp,%edi
callq 1189 <_Z5func0i>
mov %eax,%ebx
mov %ebp,%edi
callq 1189 <_Z5func0i>
imul %eax,%ebx
add %ebx,%r12d
sub $0x1,%ebp
cmp $0xffffffff,%ebp
jne 11ae <_Z5func0i+0x25>
mov %r12d,%eax
add $0x8,%rsp
pop %rbx
pop %rbp
pop %r12
pop %r13
retq
| _Z5func0i:
endbr64
push r13
push r12
push rbp
push rbx
sub rsp, 8
mov r12d, 1
cmp edi, 1
jle short loc_118F
lea ebp, [rdi-1]
mov r12d, 0
mov r13d, ebp
loc_116E:
mov edi, r13d
sub edi, ebp; int
call _Z5func0i; func0(int)
mov ebx, eax
mov edi, ebp; int
call _Z5func0i; func0(int)
imul ebx, eax
add r12d, ebx
sub ebp, 1
cmp ebp, 0FFFFFFFFh
jnz short loc_116E
loc_118F:
mov eax, r12d
add rsp, 8
pop rbx
pop rbp
pop r12
pop r13
retn | long long func0(int a1)
{
unsigned int v1; // r12d
int v2; // ebp
int v3; // ebx
v1 = 1;
if ( a1 > 1 )
{
v2 = a1 - 1;
v1 = 0;
do
{
v3 = func0(a1 - 1 - v2);
v1 += func0(v2--) * v3;
}
while ( v2 != -1 );
}
return v1;
} | func0:
ENDBR64
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV R12D,0x1
CMP EDI,0x1
JLE 0x0010118f
LEA EBP,[RDI + -0x1]
MOV R12D,0x0
MOV R13D,EBP
LAB_0010116e:
MOV EDI,R13D
SUB EDI,EBP
CALL 0x00101149
MOV EBX,EAX
MOV EDI,EBP
CALL 0x00101149
IMUL EBX,EAX
ADD R12D,EBX
SUB EBP,0x1
CMP EBP,-0x1
JNZ 0x0010116e
LAB_0010118f:
MOV EAX,R12D
ADD RSP,0x8
POP RBX
POP RBP
POP R12
POP R13
RET | /* func0(int) */
int func0(int param_1)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
iVar4 = 1;
if (1 < param_1) {
iVar4 = 0;
iVar3 = param_1 + -1;
do {
iVar1 = func0((param_1 + -1) - iVar3);
iVar2 = func0(iVar3);
iVar4 = iVar4 + iVar1 * iVar2;
iVar3 = iVar3 + -1;
} while (iVar3 != -1);
}
return iVar4;
} |
2,330 | func0 | #include <iostream>
#include <assert.h>
| int func0(int num) {
if (num <= 1)
return 1;
int res_num = 0;
for (int i = 0; i < num; ++i) {
res_num += func0(i) * func0(num - i - 1);
}
return res_num;
}
| int main() {
assert(func0(10) == 16796);
assert(func0(9) == 4862);
assert(func0(7) == 429);
return 0;
}
| O2 | cpp | func0(int):
endbr64
cmp $0x1,%edi
jle 1280 <_Z5func0i+0x10>
jmp 1290 <_Z5func0i.part.0>
nopl 0x0(%rax,%rax,1)
mov $0x1,%eax
retq
nopw %cs:0x0(%rax,%rax,1)
| _Z5func0i_part_0:
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 48h
mov [rsp+78h+var_5C], 0
test edi, edi
jle loc_2441
mov [rsp+78h+var_60], 0
lea ebx, [rdi-1]
mov [rsp+78h+var_6C], 1
mov r12d, ebx
loc_1224:
cmp r12d, 1
jle loc_2414
loc_122E:
lea ebp, [r12-1]
xor r15d, r15d
mov [rsp+78h+var_68], 0
mov r13d, 1
mov r12d, ebp
mov [rsp+78h+var_58], ebp
mov ebp, r15d
mov r15d, r13d
mov r13d, r12d
loc_1254:
cmp r13d, 1
jle loc_1AF0
mov [rsp+78h+var_64], r15d
sub r13d, 1
xor ebx, ebx
xor esi, esi
mov r14d, r13d
mov r12d, 1
mov r9d, ebx
loc_1277:
cmp r14d, 1
jle loc_1680
sub r14d, 1
xor r11d, r11d
mov [rsp+78h+var_70], esi
xor r10d, r10d
mov edx, r14d
mov r15d, 1
mov esi, r11d
loc_129B:
cmp edx, 1
jle loc_1458
sub edx, 1
xor ecx, ecx
xor r8d, r8d
mov r11d, 1
mov ebx, edx
loc_12B4:
cmp ebx, 1
jle loc_1370
loc_12BD:
mov edi, ebx
mov [rsp+78h+var_3C], edx
sub ebx, 1
mov [rsp+78h+var_40], esi
mov [rsp+78h+var_44], r10d
mov [rsp+78h+var_48], r9d
mov [rsp+78h+var_4C], ecx
mov [rsp+78h+var_50], r8d
mov [rsp+78h+var_54], r11d
call _Z5func0i_part_0; func0(int) [clone]
mov r11d, [rsp+78h+var_54]
mov r8d, [rsp+78h+var_50]
mov ecx, [rsp+78h+var_4C]
mov r9d, [rsp+78h+var_48]
imul eax, r11d
mov r10d, [rsp+78h+var_44]
mov esi, [rsp+78h+var_40]
mov edx, [rsp+78h+var_3C]
add ecx, 1
add r8d, eax
nop dword ptr [rax+00000000h]
loc_1318:
cmp ecx, 1
jz loc_24F8
mov edi, ecx
mov [rsp+78h+var_40], edx
mov [rsp+78h+var_44], esi
mov [rsp+78h+var_48], r10d
mov [rsp+78h+var_4C], r9d
mov [rsp+78h+var_50], r8d
mov [rsp+78h+var_54], ecx
call _Z5func0i_part_0; func0(int) [clone]
mov ecx, [rsp+78h+var_54]
mov r8d, [rsp+78h+var_50]
mov r9d, [rsp+78h+var_4C]
mov r10d, [rsp+78h+var_48]
mov r11d, eax
mov esi, [rsp+78h+var_44]
mov edx, [rsp+78h+var_40]
cmp ebx, 1
jg loc_12BD
nop word ptr [rax+rax+00h]
loc_1370:
add r8d, r11d
add ecx, 1
test ebx, ebx
jz short loc_1380
xor ebx, ebx
jmp short loc_1318
loc_1380:
imul r8d, r15d
add esi, 1
add r10d, r8d
loc_138A:
cmp esi, 1
jz loc_24ED
lea ebx, [rsi-1]
xor r15d, r15d
xor ecx, ecx
mov r8d, 1
loc_13A1:
cmp ebx, 1
jle loc_1440
loc_13AA:
mov edi, ebx
mov [rsp+78h+var_40], esi
sub ebx, 1
mov [rsp+78h+var_44], edx
mov [rsp+78h+var_48], r10d
mov [rsp+78h+var_4C], r9d
mov [rsp+78h+var_50], ecx
mov [rsp+78h+var_54], r8d
call _Z5func0i_part_0; func0(int) [clone]
mov r8d, [rsp+78h+var_54]
mov ecx, [rsp+78h+var_50]
mov r9d, [rsp+78h+var_4C]
mov r10d, [rsp+78h+var_48]
imul eax, r8d
mov edx, [rsp+78h+var_44]
mov esi, [rsp+78h+var_40]
add ecx, 1
add r15d, eax
nop dword ptr [rax+00h]
loc_13F8:
cmp ecx, 1
jz loc_24E2
mov edi, ecx
mov [rsp+78h+var_44], esi
mov [rsp+78h+var_48], edx
mov [rsp+78h+var_4C], r10d
mov [rsp+78h+var_50], r9d
mov [rsp+78h+var_54], ecx
call _Z5func0i_part_0; func0(int) [clone]
mov ecx, [rsp+78h+var_54]
mov r9d, [rsp+78h+var_50]
mov r10d, [rsp+78h+var_4C]
mov edx, [rsp+78h+var_48]
mov r8d, eax
mov esi, [rsp+78h+var_44]
cmp ebx, 1
jg loc_13AA
loc_1440:
add r15d, r8d
add ecx, 1
test ebx, ebx
jz loc_129B
xor ebx, ebx
jmp short loc_13F8
loc_1458:
add r10d, r15d
test edx, edx
jz short loc_1470
add esi, 1
xor edx, edx
jmp loc_138A
loc_1470:
imul r10d, r12d
mov esi, [rsp+78h+var_70]
add esi, 1
add r9d, r10d
loc_147E:
cmp esi, 1
jz loc_24D7
lea r10d, [rsi-1]
xor r12d, r12d
xor r11d, r11d
mov r15d, 1
loc_1497:
cmp r10d, 1
jle loc_1668
lea ecx, [r10-1]
xor r8d, r8d
xor edx, edx
mov r10d, 1
mov ebx, ecx
loc_14B2:
cmp ebx, 1
jle loc_1568
loc_14BB:
mov edi, ebx
mov [rsp+78h+var_40], ecx
sub ebx, 1
mov [rsp+78h+var_44], r11d
mov [rsp+78h+var_48], r9d
mov [rsp+78h+var_4C], esi
mov [rsp+78h+var_50], r10d
mov [rsp+78h+var_54], edx
mov [rsp+78h+var_70], r8d
call _Z5func0i_part_0; func0(int) [clone]
mov r10d, [rsp+78h+var_50]
mov r8d, [rsp+78h+var_70]
mov edx, [rsp+78h+var_54]
mov esi, [rsp+78h+var_4C]
imul eax, r10d
mov r9d, [rsp+78h+var_48]
mov r11d, [rsp+78h+var_44]
mov ecx, [rsp+78h+var_40]
add edx, 1
add r8d, eax
nop
loc_1510:
cmp edx, 1
jz loc_24CC
mov edi, edx
mov [rsp+78h+var_44], ecx
mov [rsp+78h+var_48], r11d
mov [rsp+78h+var_4C], r9d
mov [rsp+78h+var_50], esi
mov [rsp+78h+var_54], r8d
mov [rsp+78h+var_70], edx
call _Z5func0i_part_0; func0(int) [clone]
mov edx, [rsp+78h+var_70]
mov r8d, [rsp+78h+var_54]
mov esi, [rsp+78h+var_50]
mov r9d, [rsp+78h+var_4C]
mov r10d, eax
mov r11d, [rsp+78h+var_48]
mov ecx, [rsp+78h+var_44]
cmp ebx, 1
jg loc_14BB
nop word ptr [rax+rax+00h]
loc_1568:
add r8d, r10d
add edx, 1
test ebx, ebx
jz short loc_1580
xor ebx, ebx
jmp short loc_1510
loc_1580:
imul r8d, r15d
add r11d, 1
mov r10d, ecx
add r12d, r8d
loc_158E:
cmp r11d, 1
jz loc_24C1
lea ebx, [r11-1]
xor edx, edx
xor r15d, r15d
mov r8d, 1
loc_15A7:
cmp ebx, 1
jle loc_1650
loc_15B0:
mov edi, ebx
mov [rsp+78h+var_44], r10d
sub ebx, 1
mov [rsp+78h+var_48], r11d
mov [rsp+78h+var_4C], r9d
mov [rsp+78h+var_50], esi
mov [rsp+78h+var_54], edx
mov [rsp+78h+var_70], r8d
call _Z5func0i_part_0; func0(int) [clone]
mov r8d, [rsp+78h+var_70]
mov edx, [rsp+78h+var_54]
mov esi, [rsp+78h+var_50]
mov r9d, [rsp+78h+var_4C]
imul eax, r8d
mov r11d, [rsp+78h+var_48]
mov r10d, [rsp+78h+var_44]
add edx, 1
add r15d, eax
nop dword ptr [rax+00h]
loc_1600:
cmp edx, 1
jz loc_24B6
mov edi, edx
mov [rsp+78h+var_48], r10d
mov [rsp+78h+var_4C], r11d
mov [rsp+78h+var_50], r9d
mov [rsp+78h+var_54], esi
mov [rsp+78h+var_70], edx
call _Z5func0i_part_0; func0(int) [clone]
mov edx, [rsp+78h+var_70]
mov esi, [rsp+78h+var_54]
mov r9d, [rsp+78h+var_50]
mov r11d, [rsp+78h+var_4C]
mov r8d, eax
mov r10d, [rsp+78h+var_48]
cmp ebx, 1
jg loc_15B0
nop word ptr [rax+rax+00h]
loc_1650:
add r15d, r8d
add edx, 1
test ebx, ebx
jz loc_1497
xor ebx, ebx
jmp short loc_1600
loc_1668:
add r12d, r15d
test r10d, r10d
jz loc_1277
add r11d, 1
xor r10d, r10d
jmp loc_158E
loc_1680:
add r9d, r12d
test r14d, r14d
jz short loc_1698
add esi, 1
xor r14d, r14d
jmp loc_147E
loc_1698:
mov r15d, [rsp+78h+var_64]
add ebp, 1
imul r15d, r9d
add [rsp+78h+var_68], r15d
loc_16A9:
cmp ebp, 1
jz loc_24AB
lea r12d, [rbp-1]
xor r15d, r15d
xor ebx, ebx
mov r14d, 1
loc_16C1:
cmp r12d, 1
jle loc_1AD0
lea edx, [r12-1]
xor r8d, r8d
xor r9d, r9d
mov r12d, 1
mov [rsp+78h+var_70], edx
mov r10d, edx
loc_16E3:
cmp r10d, 1
jle loc_18B8
lea edx, [r10-1]
xor r11d, r11d
xor esi, esi
mov r10d, 1
mov ecx, edx
loc_16FE:
cmp ecx, 1
jle loc_17B8
loc_1707:
mov edi, ecx
mov [rsp+78h+var_40], edx
mov [rsp+78h+var_44], r8d
mov [rsp+78h+var_48], r9d
mov [rsp+78h+var_4C], esi
mov [rsp+78h+var_50], r11d
mov [rsp+78h+var_54], r10d
mov [rsp+78h+var_64], ecx
call _Z5func0i_part_0; func0(int) [clone]
mov r10d, [rsp+78h+var_54]
mov r11d, [rsp+78h+var_50]
mov esi, [rsp+78h+var_4C]
mov ecx, [rsp+78h+var_64]
imul eax, r10d
mov r9d, [rsp+78h+var_48]
mov r8d, [rsp+78h+var_44]
mov edx, [rsp+78h+var_40]
add esi, 1
sub ecx, 1
add r11d, eax
nop dword ptr [rax+rax+00h]
loc_1760:
cmp esi, 1
jz loc_24A0
mov edi, esi
mov [rsp+78h+var_44], edx
mov [rsp+78h+var_48], r8d
mov [rsp+78h+var_4C], r9d
mov [rsp+78h+var_50], ecx
mov [rsp+78h+var_54], r11d
mov [rsp+78h+var_64], esi
call _Z5func0i_part_0; func0(int) [clone]
mov ecx, [rsp+78h+var_50]
mov esi, [rsp+78h+var_64]
mov r11d, [rsp+78h+var_54]
mov r9d, [rsp+78h+var_4C]
mov r10d, eax
mov r8d, [rsp+78h+var_48]
mov edx, [rsp+78h+var_44]
cmp ecx, 1
jg loc_1707
nop word ptr [rax+rax+00h]
loc_17B8:
add r11d, r10d
add esi, 1
test ecx, ecx
jz short loc_17D0
xor ecx, ecx
jmp short loc_1760
loc_17D0:
imul r11d, r12d
add r9d, 1
mov r10d, edx
add r8d, r11d
loc_17DE:
cmp r9d, 1
jz loc_2495
lea ecx, [r9-1]
xor r12d, r12d
xor esi, esi
mov r11d, 1
loc_17F7:
cmp ecx, 1
jle loc_18A0
loc_1800:
mov edi, ecx
mov [rsp+78h+var_44], r10d
mov [rsp+78h+var_48], r8d
mov [rsp+78h+var_4C], r9d
mov [rsp+78h+var_50], esi
mov [rsp+78h+var_54], r11d
mov [rsp+78h+var_64], ecx
call _Z5func0i_part_0; func0(int) [clone]
mov r11d, [rsp+78h+var_54]
mov esi, [rsp+78h+var_50]
mov ecx, [rsp+78h+var_64]
mov r9d, [rsp+78h+var_4C]
imul eax, r11d
mov r8d, [rsp+78h+var_48]
mov r10d, [rsp+78h+var_44]
add esi, 1
sub ecx, 1
add r12d, eax
nop dword ptr [rax+00h]
loc_1850:
cmp esi, 1
jz loc_248A
mov edi, esi
mov [rsp+78h+var_48], r10d
mov [rsp+78h+var_4C], r8d
mov [rsp+78h+var_50], r9d
mov [rsp+78h+var_54], ecx
mov [rsp+78h+var_64], esi
call _Z5func0i_part_0; func0(int) [clone]
mov ecx, [rsp+78h+var_54]
mov esi, [rsp+78h+var_64]
mov r9d, [rsp+78h+var_50]
mov r8d, [rsp+78h+var_4C]
mov r11d, eax
mov r10d, [rsp+78h+var_48]
cmp ecx, 1
jg loc_1800
nop word ptr [rax+rax+00h]
loc_18A0:
add r12d, r11d
add esi, 1
test ecx, ecx
jz loc_16E3
xor ecx, ecx
jmp short loc_1850
loc_18B8:
add r8d, r12d
test r10d, r10d
jz short loc_18D0
add r9d, 1
xor r10d, r10d
jmp loc_17DE
loc_18D0:
imul r8d, r14d
mov edx, [rsp+78h+var_70]
add ebx, 1
mov r12d, edx
add r15d, r8d
loc_18E1:
cmp ebx, 1
jz loc_247F
lea r8d, [rbx-1]
xor r14d, r14d
xor r9d, r9d
mov esi, 1
loc_18F9:
cmp r8d, 1
jle loc_1AB8
sub r8d, 1
xor r10d, r10d
xor ecx, ecx
mov r11d, 1
mov edx, r8d
loc_1915:
cmp edx, 1
jle loc_19D0
loc_191E:
mov edi, edx
mov [rsp+78h+var_44], r8d
mov [rsp+78h+var_48], r9d
mov [rsp+78h+var_4C], r11d
mov [rsp+78h+var_50], ecx
mov [rsp+78h+var_54], r10d
mov [rsp+78h+var_64], esi
mov [rsp+78h+var_70], edx
call _Z5func0i_part_0; func0(int) [clone]
mov r11d, [rsp+78h+var_4C]
mov r10d, [rsp+78h+var_54]
mov ecx, [rsp+78h+var_50]
mov edx, [rsp+78h+var_70]
imul eax, r11d
mov esi, [rsp+78h+var_64]
mov r9d, [rsp+78h+var_48]
mov r8d, [rsp+78h+var_44]
add ecx, 1
sub edx, 1
add r10d, eax
nop word ptr [rax+rax+00h]
loc_1978:
cmp ecx, 1
jz loc_2474
mov edi, ecx
mov [rsp+78h+var_48], r8d
mov [rsp+78h+var_4C], r9d
mov [rsp+78h+var_50], r10d
mov [rsp+78h+var_54], esi
mov [rsp+78h+var_64], edx
mov [rsp+78h+var_70], ecx
call _Z5func0i_part_0; func0(int) [clone]
mov edx, [rsp+78h+var_64]
mov ecx, [rsp+78h+var_70]
mov esi, [rsp+78h+var_54]
mov r10d, [rsp+78h+var_50]
mov r11d, eax
mov r9d, [rsp+78h+var_4C]
mov r8d, [rsp+78h+var_48]
cmp edx, 1
jg loc_191E
nop word ptr [rax+rax+00h]
loc_19D0:
add r10d, r11d
add ecx, 1
test edx, edx
jz short loc_19E0
xor edx, edx
jmp short loc_1978
loc_19E0:
imul r10d, esi
add r9d, 1
add r14d, r10d
loc_19EB:
cmp r9d, 1
jz loc_246A
lea edx, [r9-1]
xor esi, esi
xor ecx, ecx
mov r10d, 1
loc_1A03:
cmp edx, 1
jle loc_1AA0
loc_1A0C:
mov edi, edx
mov [rsp+78h+var_48], r8d
mov [rsp+78h+var_4C], r9d
mov [rsp+78h+var_50], r10d
mov [rsp+78h+var_54], ecx
mov [rsp+78h+var_64], esi
mov [rsp+78h+var_70], edx
call _Z5func0i_part_0; func0(int) [clone]
mov r10d, [rsp+78h+var_50]
mov esi, [rsp+78h+var_64]
mov ecx, [rsp+78h+var_54]
mov edx, [rsp+78h+var_70]
imul eax, r10d
mov r9d, [rsp+78h+var_4C]
mov r8d, [rsp+78h+var_48]
add ecx, 1
sub edx, 1
add esi, eax
nop dword ptr [rax]
loc_1A58:
cmp ecx, 1
jz loc_245F
mov edi, ecx
mov [rsp+78h+var_4C], r8d
mov [rsp+78h+var_50], r9d
mov [rsp+78h+var_54], esi
mov [rsp+78h+var_64], edx
mov [rsp+78h+var_70], ecx
call _Z5func0i_part_0; func0(int) [clone]
mov edx, [rsp+78h+var_64]
mov ecx, [rsp+78h+var_70]
mov esi, [rsp+78h+var_54]
mov r9d, [rsp+78h+var_50]
mov r10d, eax
mov r8d, [rsp+78h+var_4C]
cmp edx, 1
jg loc_1A0C
loc_1AA0:
add esi, r10d
add ecx, 1
test edx, edx
jz loc_18F9
xor edx, edx
jmp short loc_1A58
loc_1AB8:
add r14d, esi
test r8d, r8d
jz loc_16C1
add r9d, 1
xor r8d, r8d
jmp loc_19EB
loc_1AD0:
add r15d, r14d
test r12d, r12d
jz loc_1254
add ebx, 1
xor r12d, r12d
jmp loc_18E1
loc_1AF0:
add [rsp+78h+var_68], r15d
test r13d, r13d
jz short loc_1B05
add ebp, 1
xor r13d, r13d
jmp loc_16A9
loc_1B05:
mov eax, [rsp+78h+var_6C]
mov edi, [rsp+78h+var_68]
mov ebp, [rsp+78h+var_58]
add [rsp+78h+var_60], 1
imul eax, edi
add [rsp+78h+var_5C], eax
cmp [rsp+78h+var_60], 1
mov r12d, ebp
jz loc_2434
loc_1B2B:
mov eax, [rsp+78h+var_60]
mov [rsp+78h+var_6C], 0
xor r15d, r15d
mov r13d, 1
mov [rsp+78h+var_64], r12d
lea ebp, [rax-1]
mov eax, ebp
mov ebp, r15d
mov r15d, r13d
mov r13d, eax
loc_1B53:
cmp r13d, 1
jle loc_23F0
mov [rsp+78h+var_68], r15d
sub r13d, 1
xor ebx, ebx
xor esi, esi
mov r14d, r13d
mov r12d, 1
mov r9d, ebx
loc_1B76:
cmp r14d, 1
jle loc_1F80
sub r14d, 1
xor r11d, r11d
mov [rsp+78h+var_70], esi
xor r10d, r10d
mov edx, r14d
mov r15d, 1
mov esi, r11d
loc_1B9A:
cmp edx, 1
jle loc_1D58
sub edx, 1
xor r8d, r8d
xor ecx, ecx
mov r11d, 1
mov ebx, edx
loc_1BB3:
cmp ebx, 1
jle loc_1C68
loc_1BBC:
mov edi, ebx
mov [rsp+78h+var_40], edx
sub ebx, 1
mov [rsp+78h+var_44], r10d
mov [rsp+78h+var_48], esi
mov [rsp+78h+var_4C], r9d
mov [rsp+78h+var_50], r11d
mov [rsp+78h+var_54], ecx
mov [rsp+78h+var_58], r8d
call _Z5func0i_part_0; func0(int) [clone]
mov r11d, [rsp+78h+var_50]
mov r8d, [rsp+78h+var_58]
mov ecx, [rsp+78h+var_54]
mov r9d, [rsp+78h+var_4C]
imul eax, r11d
mov esi, [rsp+78h+var_48]
mov r10d, [rsp+78h+var_44]
mov edx, [rsp+78h+var_40]
add ecx, 1
add r8d, eax
loc_1C10:
cmp ecx, 1
jz loc_2454
mov edi, ecx
mov [rsp+78h+var_44], edx
mov [rsp+78h+var_48], r10d
mov [rsp+78h+var_4C], esi
mov [rsp+78h+var_50], r9d
mov [rsp+78h+var_54], r8d
mov [rsp+78h+var_58], ecx
call _Z5func0i_part_0; func0(int) [clone]
mov ecx, [rsp+78h+var_58]
mov r8d, [rsp+78h+var_54]
mov r9d, [rsp+78h+var_50]
mov esi, [rsp+78h+var_4C]
mov r11d, eax
mov r10d, [rsp+78h+var_48]
mov edx, [rsp+78h+var_44]
cmp ebx, 1
jg loc_1BBC
nop word ptr [rax+rax+00h]
loc_1C68:
add r8d, r11d
add ecx, 1
test ebx, ebx
jz short loc_1C80
xor ebx, ebx
jmp short loc_1C10
loc_1C80:
imul r8d, r15d
add esi, 1
add r10d, r8d
loc_1C8A:
cmp esi, 1
jz loc_2590
lea ebx, [rsi-1]
xor r15d, r15d
xor ecx, ecx
mov r8d, 1
loc_1CA1:
cmp ebx, 1
jle loc_1D40
loc_1CAA:
mov edi, ebx
mov [rsp+78h+var_44], r10d
sub ebx, 1
mov [rsp+78h+var_48], esi
mov [rsp+78h+var_4C], edx
mov [rsp+78h+var_50], r9d
mov [rsp+78h+var_54], r8d
mov [rsp+78h+var_58], ecx
call _Z5func0i_part_0; func0(int) [clone]
mov r8d, [rsp+78h+var_54]
mov ecx, [rsp+78h+var_58]
mov r9d, [rsp+78h+var_50]
mov edx, [rsp+78h+var_4C]
imul eax, r8d
mov esi, [rsp+78h+var_48]
mov r10d, [rsp+78h+var_44]
add ecx, 1
add r15d, eax
nop dword ptr [rax+00h]
loc_1CF8:
cmp ecx, 1
jz loc_2585
mov edi, ecx
mov [rsp+78h+var_48], r10d
mov [rsp+78h+var_4C], esi
mov [rsp+78h+var_50], edx
mov [rsp+78h+var_54], r9d
mov [rsp+78h+var_58], ecx
call _Z5func0i_part_0; func0(int) [clone]
mov ecx, [rsp+78h+var_58]
mov r9d, [rsp+78h+var_54]
mov edx, [rsp+78h+var_50]
mov esi, [rsp+78h+var_4C]
mov r8d, eax
mov r10d, [rsp+78h+var_48]
cmp ebx, 1
jg loc_1CAA
loc_1D40:
add r15d, r8d
add ecx, 1
test ebx, ebx
jz loc_1B9A
xor ebx, ebx
jmp short loc_1CF8
loc_1D58:
add r10d, r15d
test edx, edx
jz short loc_1D70
add esi, 1
xor edx, edx
jmp loc_1C8A
loc_1D70:
imul r10d, r12d
mov esi, [rsp+78h+var_70]
add esi, 1
add r9d, r10d
loc_1D7E:
cmp esi, 1
jz loc_257A
lea r10d, [rsi-1]
xor r11d, r11d
xor r12d, r12d
mov r15d, 1
loc_1D97:
cmp r10d, 1
jle loc_1F68
lea ecx, [r10-1]
xor r8d, r8d
xor edx, edx
mov r10d, 1
mov ebx, ecx
loc_1DB2:
cmp ebx, 1
jle loc_1E68
loc_1DBB:
mov edi, ebx
mov [rsp+78h+var_44], ecx
sub ebx, 1
mov [rsp+78h+var_48], r11d
mov [rsp+78h+var_4C], esi
mov [rsp+78h+var_50], r9d
mov [rsp+78h+var_54], r10d
mov [rsp+78h+var_58], edx
mov [rsp+78h+var_70], r8d
call _Z5func0i_part_0; func0(int) [clone]
mov r10d, [rsp+78h+var_54]
mov r8d, [rsp+78h+var_70]
mov edx, [rsp+78h+var_58]
mov r9d, [rsp+78h+var_50]
imul eax, r10d
mov esi, [rsp+78h+var_4C]
mov r11d, [rsp+78h+var_48]
mov ecx, [rsp+78h+var_44]
add edx, 1
add r8d, eax
nop
loc_1E10:
cmp edx, 1
jz loc_256F
mov edi, edx
mov [rsp+78h+var_48], ecx
mov [rsp+78h+var_4C], r11d
mov [rsp+78h+var_50], esi
mov [rsp+78h+var_54], r9d
mov [rsp+78h+var_58], r8d
mov [rsp+78h+var_70], edx
call _Z5func0i_part_0; func0(int) [clone]
mov edx, [rsp+78h+var_70]
mov r8d, [rsp+78h+var_58]
mov r9d, [rsp+78h+var_54]
mov esi, [rsp+78h+var_50]
mov r10d, eax
mov r11d, [rsp+78h+var_4C]
mov ecx, [rsp+78h+var_48]
cmp ebx, 1
jg loc_1DBB
nop word ptr [rax+rax+00h]
loc_1E68:
add r8d, r10d
add edx, 1
test ebx, ebx
jz short loc_1E80
xor ebx, ebx
jmp short loc_1E10
loc_1E80:
imul r8d, r15d
add r11d, 1
mov r10d, ecx
add r12d, r8d
loc_1E8E:
cmp r11d, 1
jz loc_2564
lea ebx, [r11-1]
xor edx, edx
xor r15d, r15d
mov r8d, 1
loc_1EA7:
cmp ebx, 1
jle loc_1F50
loc_1EB0:
mov edi, ebx
mov [rsp+78h+var_48], r11d
sub ebx, 1
mov [rsp+78h+var_4C], esi
mov [rsp+78h+var_50], r9d
mov [rsp+78h+var_54], r10d
mov [rsp+78h+var_58], r8d
mov [rsp+78h+var_70], edx
call _Z5func0i_part_0; func0(int) [clone]
mov r8d, [rsp+78h+var_58]
mov edx, [rsp+78h+var_70]
mov r10d, [rsp+78h+var_54]
mov r9d, [rsp+78h+var_50]
imul eax, r8d
mov esi, [rsp+78h+var_4C]
mov r11d, [rsp+78h+var_48]
add edx, 1
add r15d, eax
nop dword ptr [rax+00h]
loc_1F00:
cmp edx, 1
jz loc_2559
mov edi, edx
mov [rsp+78h+var_4C], r11d
mov [rsp+78h+var_50], esi
mov [rsp+78h+var_54], r9d
mov [rsp+78h+var_58], r10d
mov [rsp+78h+var_70], edx
call _Z5func0i_part_0; func0(int) [clone]
mov edx, [rsp+78h+var_70]
mov r10d, [rsp+78h+var_58]
mov r9d, [rsp+78h+var_54]
mov esi, [rsp+78h+var_50]
mov r8d, eax
mov r11d, [rsp+78h+var_4C]
cmp ebx, 1
jg loc_1EB0
nop word ptr [rax+rax+00h]
loc_1F50:
add r15d, r8d
add edx, 1
test ebx, ebx
jz loc_1D97
xor ebx, ebx
jmp short loc_1F00
loc_1F68:
add r12d, r15d
test r10d, r10d
jz loc_1B76
add r11d, 1
xor r10d, r10d
jmp loc_1E8E
loc_1F80:
add r9d, r12d
test r14d, r14d
jz short loc_1F98
add esi, 1
xor r14d, r14d
jmp loc_1D7E
loc_1F98:
mov r15d, [rsp+78h+var_68]
add ebp, 1
imul r15d, r9d
add [rsp+78h+var_6C], r15d
loc_1FA9:
cmp ebp, 1
jz loc_254E
lea ebx, [rbp-1]
xor r15d, r15d
xor r12d, r12d
mov r14d, 1
loc_1FC1:
cmp ebx, 1
jle loc_23D0
lea edx, [rbx-1]
xor r9d, r9d
xor r8d, r8d
mov ebx, 1
mov [rsp+78h+var_70], edx
mov r10d, edx
loc_1FDF:
cmp r10d, 1
jle loc_21B8
lea edx, [r10-1]
xor esi, esi
xor r11d, r11d
mov r10d, 1
mov ecx, edx
loc_1FFA:
cmp ecx, 1
jle loc_20B8
loc_2003:
mov edi, ecx
mov [rsp+78h+var_44], edx
mov [rsp+78h+var_48], r9d
mov [rsp+78h+var_4C], r8d
mov [rsp+78h+var_50], r10d
mov [rsp+78h+var_54], esi
mov [rsp+78h+var_58], r11d
mov [rsp+78h+var_68], ecx
call _Z5func0i_part_0; func0(int) [clone]
mov r10d, [rsp+78h+var_50]
mov r11d, [rsp+78h+var_58]
mov esi, [rsp+78h+var_54]
mov ecx, [rsp+78h+var_68]
imul eax, r10d
mov r8d, [rsp+78h+var_4C]
mov r9d, [rsp+78h+var_48]
mov edx, [rsp+78h+var_44]
add esi, 1
sub ecx, 1
add r11d, eax
nop word ptr [rax+rax+00000000h]
loc_2060:
cmp esi, 1
jz loc_2543
mov edi, esi
mov [rsp+78h+var_48], edx
mov [rsp+78h+var_4C], r9d
mov [rsp+78h+var_50], r8d
mov [rsp+78h+var_54], r11d
mov [rsp+78h+var_58], ecx
mov [rsp+78h+var_68], esi
call _Z5func0i_part_0; func0(int) [clone]
mov ecx, [rsp+78h+var_58]
mov esi, [rsp+78h+var_68]
mov r11d, [rsp+78h+var_54]
mov r8d, [rsp+78h+var_50]
mov r10d, eax
mov r9d, [rsp+78h+var_4C]
mov edx, [rsp+78h+var_48]
cmp ecx, 1
jg loc_2003
nop word ptr [rax+rax+00h]
loc_20B8:
add r11d, r10d
add esi, 1
test ecx, ecx
jz short loc_20D0
xor ecx, ecx
jmp short loc_2060
loc_20D0:
imul r11d, ebx
add r9d, 1
mov r10d, edx
add r8d, r11d
loc_20DE:
cmp r9d, 1
jz loc_2539
lea ecx, [r9-1]
xor ebx, ebx
xor esi, esi
mov r11d, 1
loc_20F6:
cmp ecx, 1
jle loc_21A0
loc_20FF:
mov edi, ecx
mov [rsp+78h+var_48], r9d
mov [rsp+78h+var_4C], r8d
mov [rsp+78h+var_50], r10d
mov [rsp+78h+var_54], r11d
mov [rsp+78h+var_58], esi
mov [rsp+78h+var_68], ecx
call _Z5func0i_part_0; func0(int) [clone]
mov r11d, [rsp+78h+var_54]
mov esi, [rsp+78h+var_58]
mov ecx, [rsp+78h+var_68]
mov r10d, [rsp+78h+var_50]
imul eax, r11d
mov r8d, [rsp+78h+var_4C]
mov r9d, [rsp+78h+var_48]
add esi, 1
sub ecx, 1
add ebx, eax
nop word ptr [rax+rax+00h]
loc_2150:
cmp esi, 1
jz loc_252E
mov edi, esi
mov [rsp+78h+var_4C], r9d
mov [rsp+78h+var_50], r8d
mov [rsp+78h+var_54], r10d
mov [rsp+78h+var_58], ecx
mov [rsp+78h+var_68], esi
call _Z5func0i_part_0; func0(int) [clone]
mov ecx, [rsp+78h+var_58]
mov esi, [rsp+78h+var_68]
mov r10d, [rsp+78h+var_54]
mov r8d, [rsp+78h+var_50]
mov r11d, eax
mov r9d, [rsp+78h+var_4C]
cmp ecx, 1
jg loc_20FF
nop word ptr [rax+rax+00h]
loc_21A0:
add ebx, r11d
add esi, 1
test ecx, ecx
jz loc_1FDF
xor ecx, ecx
jmp short loc_2150
loc_21B8:
add r8d, ebx
test r10d, r10d
jz short loc_21D0
add r9d, 1
xor r10d, r10d
jmp loc_20DE
loc_21D0:
imul r8d, r14d
mov edx, [rsp+78h+var_70]
add r12d, 1
mov ebx, edx
add r15d, r8d
loc_21E1:
cmp r12d, 1
jz loc_2523
lea r8d, [r12-1]
xor r14d, r14d
xor r9d, r9d
mov esi, 1
loc_21FB:
cmp r8d, 1
jle loc_23B8
sub r8d, 1
xor r10d, r10d
xor ecx, ecx
mov r11d, 1
mov edx, r8d
loc_2217:
cmp edx, 1
jle loc_22D0
loc_2220:
mov edi, edx
mov [rsp+78h+var_48], r8d
mov [rsp+78h+var_4C], r9d
mov [rsp+78h+var_50], r11d
mov [rsp+78h+var_54], ecx
mov [rsp+78h+var_58], r10d
mov [rsp+78h+var_68], esi
mov [rsp+78h+var_70], edx
call _Z5func0i_part_0; func0(int) [clone]
mov r11d, [rsp+78h+var_50]
mov r10d, [rsp+78h+var_58]
mov ecx, [rsp+78h+var_54]
mov edx, [rsp+78h+var_70]
imul eax, r11d
mov esi, [rsp+78h+var_68]
mov r9d, [rsp+78h+var_4C]
mov r8d, [rsp+78h+var_48]
add ecx, 1
sub edx, 1
add r10d, eax
nop dword ptr [rax+00h]
loc_2278:
cmp ecx, 1
jz loc_2518
mov edi, ecx
mov [rsp+78h+var_4C], r8d
mov [rsp+78h+var_50], r9d
mov [rsp+78h+var_54], r10d
mov [rsp+78h+var_58], esi
mov [rsp+78h+var_68], edx
mov [rsp+78h+var_70], ecx
call _Z5func0i_part_0; func0(int) [clone]
mov edx, [rsp+78h+var_68]
mov ecx, [rsp+78h+var_70]
mov esi, [rsp+78h+var_58]
mov r10d, [rsp+78h+var_54]
mov r11d, eax
mov r9d, [rsp+78h+var_50]
mov r8d, [rsp+78h+var_4C]
cmp edx, 1
jg loc_2220
nop word ptr [rax+rax+00h]
loc_22D0:
add r10d, r11d
add ecx, 1
test edx, edx
jz short loc_22E0
xor edx, edx
jmp short loc_2278
loc_22E0:
imul r10d, esi
add r9d, 1
add r14d, r10d
loc_22EB:
cmp r9d, 1
jz loc_250E
lea edx, [r9-1]
xor ecx, ecx
xor esi, esi
mov r10d, 1
loc_2303:
cmp edx, 1
jle loc_23A0
loc_230C:
mov edi, edx
mov [rsp+78h+var_4C], r9d
mov [rsp+78h+var_50], r8d
mov [rsp+78h+var_54], r10d
mov [rsp+78h+var_58], ecx
mov [rsp+78h+var_68], esi
mov [rsp+78h+var_70], edx
call _Z5func0i_part_0; func0(int) [clone]
mov r10d, [rsp+78h+var_54]
mov esi, [rsp+78h+var_68]
mov ecx, [rsp+78h+var_58]
mov edx, [rsp+78h+var_70]
imul eax, r10d
mov r8d, [rsp+78h+var_50]
mov r9d, [rsp+78h+var_4C]
add ecx, 1
sub edx, 1
add esi, eax
nop dword ptr [rax]
loc_2358:
cmp ecx, 1
jz loc_2503
mov edi, ecx
mov [rsp+78h+var_50], r9d
mov [rsp+78h+var_54], r8d
mov [rsp+78h+var_58], edx
mov [rsp+78h+var_68], esi
mov [rsp+78h+var_70], ecx
call _Z5func0i_part_0; func0(int) [clone]
mov edx, [rsp+78h+var_58]
mov ecx, [rsp+78h+var_70]
mov esi, [rsp+78h+var_68]
mov r8d, [rsp+78h+var_54]
mov r10d, eax
mov r9d, [rsp+78h+var_50]
cmp edx, 1
jg loc_230C
loc_23A0:
add esi, r10d
add ecx, 1
test edx, edx
jz loc_21FB
xor edx, edx
jmp short loc_2358
loc_23B8:
add r14d, esi
test r8d, r8d
jz loc_1FC1
add r9d, 1
xor r8d, r8d
jmp loc_22EB
loc_23D0:
add r15d, r14d
test ebx, ebx
jz loc_1B53
add r12d, 1
xor ebx, ebx
jmp loc_21E1
loc_23F0:
add [rsp+78h+var_6C], r15d
test r13d, r13d
jz short loc_2405
add ebp, 1
xor r13d, r13d
jmp loc_1FA9
loc_2405:
mov r12d, [rsp+78h+var_64]
cmp r12d, 1
jg loc_122E
loc_2414:
mov edi, [rsp+78h+var_6C]
add [rsp+78h+var_5C], edi
test r12d, r12d
jz short loc_2441
add [rsp+78h+var_60], 1
xor r12d, r12d
cmp [rsp+78h+var_60], 1
jnz loc_1B2B
loc_2434:
mov [rsp+78h+var_6C], 1
jmp loc_1224
loc_2441:
mov eax, [rsp+78h+var_5C]
add rsp, 48h
pop rbx
pop rbp
pop r12
pop r13
pop r14
pop r15
retn
loc_2454:
mov r11d, 1
jmp loc_1BB3
loc_245F:
mov r10d, 1
jmp loc_1A03
loc_246A:
mov esi, 1
jmp loc_18F9
loc_2474:
mov r11d, 1
jmp loc_1915
loc_247F:
mov r14d, 1
jmp loc_16C1
loc_248A:
mov r11d, 1
jmp loc_17F7
loc_2495:
mov r12d, 1
jmp loc_16E3
loc_24A0:
mov r10d, 1
jmp loc_16FE
loc_24AB:
mov r15d, 1
jmp loc_1254
loc_24B6:
mov r8d, 1
jmp loc_15A7
loc_24C1:
mov r15d, 1
jmp loc_1497
loc_24CC:
mov r10d, 1
jmp loc_14B2
loc_24D7:
mov r12d, 1
jmp loc_1277
loc_24E2:
mov r8d, 1
jmp loc_13A1
loc_24ED:
mov r15d, 1
jmp loc_129B
loc_24F8:
mov r11d, 1
jmp loc_12B4
loc_2503:
mov r10d, 1
jmp loc_2303
loc_250E:
mov esi, 1
jmp loc_21FB
loc_2518:
mov r11d, 1
jmp loc_2217
loc_2523:
mov r14d, 1
jmp loc_1FC1
loc_252E:
mov r11d, 1
jmp loc_20F6
loc_2539:
mov ebx, 1
jmp loc_1FDF
loc_2543:
mov r10d, 1
jmp loc_1FFA
loc_254E:
mov r15d, 1
jmp loc_1B53
loc_2559:
mov r8d, 1
jmp loc_1EA7
loc_2564:
mov r15d, 1
jmp loc_1D97
loc_256F:
mov r10d, 1
jmp loc_1DB2
loc_257A:
mov r12d, 1
jmp loc_1B76
loc_2585:
mov r8d, 1
jmp loc_1CA1
loc_2590:
mov r15d, 1
jmp loc_1B9A | long long func0(int a1)
{
int v1; // r12d
int v2; // ebp
int v3; // r15d
int v4; // r13d
int v5; // esi
int v6; // r14d
int v7; // r12d
int v8; // r9d
int v9; // r10d
int v10; // edx
int v11; // r15d
int v12; // esi
unsigned int v13; // ecx
int v14; // r8d
int v15; // r11d
int v16; // ebx
long long v17; // rdi
int v18; // eax
int v19; // eax
int v20; // ebx
unsigned int v21; // ecx
int v22; // r8d
long long v23; // rdi
int v24; // eax
int v25; // eax
int v26; // r10d
int v27; // r11d
int v28; // r15d
int v29; // ecx
int v30; // r8d
unsigned int v31; // edx
int v32; // r10d
int v33; // ebx
long long v34; // rdi
int v35; // eax
int v36; // eax
int v37; // ebx
unsigned int v38; // edx
int v39; // r8d
long long v40; // rdi
int v41; // eax
int v42; // eax
int v43; // r12d
int v44; // ebx
int i; // r14d
int v46; // edx
int v47; // r8d
int v48; // r9d
int v49; // r12d
int v50; // r10d
int v51; // edx
int v52; // r11d
unsigned int v53; // esi
int v54; // r10d
int v55; // ecx
int v56; // eax
int v57; // eax
int v58; // ecx
unsigned int v59; // esi
int v60; // r11d
int v61; // eax
int v62; // eax
int v63; // r8d
int v64; // r9d
int v65; // esi
int v66; // r10d
unsigned int v67; // ecx
int v68; // r11d
int v69; // edx
int v70; // eax
int v71; // eax
int v72; // edx
unsigned int v73; // ecx
int v74; // r10d
int v75; // eax
int v76; // eax
int v77; // ebp
int v78; // r15d
int v79; // r13d
int v80; // esi
int v81; // r14d
int v82; // r12d
int v83; // r9d
int v84; // r10d
int v85; // edx
int v86; // r15d
int v87; // esi
int v88; // r8d
unsigned int v89; // ecx
int v90; // r11d
int v91; // ebx
long long v92; // rdi
int v93; // eax
int v94; // eax
int v95; // ebx
unsigned int v96; // ecx
int v97; // r8d
long long v98; // rdi
int v99; // eax
int v100; // eax
int v101; // r10d
int v102; // r11d
int v103; // r15d
int v104; // ecx
int v105; // r8d
unsigned int v106; // edx
int v107; // r10d
int v108; // ebx
long long v109; // rdi
int v110; // eax
int v111; // eax
int v112; // ebx
unsigned int v113; // edx
int v114; // r8d
long long v115; // rdi
int v116; // eax
int v117; // eax
int v118; // ebx
int v119; // r12d
int j; // r14d
int v121; // edx
int v122; // r9d
int v123; // r8d
int v124; // ebx
int v125; // r10d
int v126; // edx
unsigned int v127; // esi
int v128; // r11d
int v129; // r10d
int v130; // ecx
int v131; // eax
int v132; // eax
int v133; // ecx
unsigned int v134; // esi
int v135; // r11d
int v136; // eax
int v137; // eax
int v138; // r8d
int v139; // r9d
int v140; // esi
int v141; // r10d
unsigned int v142; // ecx
int v143; // r11d
int v144; // edx
int v145; // eax
int v146; // eax
int v147; // edx
unsigned int v148; // ecx
int v149; // r10d
int v150; // eax
int v151; // eax
int v153; // [rsp+8h] [rbp-70h]
int v154; // [rsp+8h] [rbp-70h]
unsigned int v155; // [rsp+8h] [rbp-70h]
int v156; // [rsp+8h] [rbp-70h]
unsigned int v157; // [rsp+8h] [rbp-70h]
int v158; // [rsp+8h] [rbp-70h]
int v159; // [rsp+8h] [rbp-70h]
unsigned int v160; // [rsp+8h] [rbp-70h]
int v161; // [rsp+8h] [rbp-70h]
unsigned int v162; // [rsp+8h] [rbp-70h]
int v163; // [rsp+8h] [rbp-70h]
int v164; // [rsp+8h] [rbp-70h]
unsigned int v165; // [rsp+8h] [rbp-70h]
unsigned int v166; // [rsp+8h] [rbp-70h]
unsigned int v167; // [rsp+8h] [rbp-70h]
int v168; // [rsp+8h] [rbp-70h]
int v169; // [rsp+8h] [rbp-70h]
unsigned int v170; // [rsp+8h] [rbp-70h]
int v171; // [rsp+8h] [rbp-70h]
unsigned int v172; // [rsp+8h] [rbp-70h]
int v173; // [rsp+Ch] [rbp-6Ch]
int v174; // [rsp+10h] [rbp-68h]
int v175; // [rsp+10h] [rbp-68h]
int v176; // [rsp+10h] [rbp-68h]
int v177; // [rsp+10h] [rbp-68h]
int v178; // [rsp+10h] [rbp-68h]
int v179; // [rsp+14h] [rbp-64h]
int v180; // [rsp+14h] [rbp-64h]
int v181; // [rsp+14h] [rbp-64h]
int v182; // [rsp+14h] [rbp-64h]
int v183; // [rsp+14h] [rbp-64h]
int v184; // [rsp+14h] [rbp-64h]
int v185; // [rsp+18h] [rbp-60h]
unsigned int v186; // [rsp+1Ch] [rbp-5Ch]
int v187; // [rsp+20h] [rbp-58h]
int v188; // [rsp+20h] [rbp-58h]
unsigned int v189; // [rsp+20h] [rbp-58h]
unsigned int v190; // [rsp+20h] [rbp-58h]
unsigned int v191; // [rsp+20h] [rbp-58h]
unsigned int v192; // [rsp+20h] [rbp-58h]
int v193; // [rsp+20h] [rbp-58h]
int v194; // [rsp+20h] [rbp-58h]
int v195; // [rsp+20h] [rbp-58h]
int v196; // [rsp+20h] [rbp-58h]
int v197; // [rsp+20h] [rbp-58h]
int v198; // [rsp+20h] [rbp-58h]
int v199; // [rsp+20h] [rbp-58h]
unsigned int v200; // [rsp+20h] [rbp-58h]
int v201; // [rsp+20h] [rbp-58h]
int v202; // [rsp+24h] [rbp-54h]
unsigned int v203; // [rsp+24h] [rbp-54h]
int v204; // [rsp+24h] [rbp-54h]
unsigned int v205; // [rsp+24h] [rbp-54h]
unsigned int v206; // [rsp+24h] [rbp-54h]
int v207; // [rsp+24h] [rbp-54h]
unsigned int v208; // [rsp+24h] [rbp-54h]
int v209; // [rsp+24h] [rbp-54h]
int v210; // [rsp+24h] [rbp-54h]
int v211; // [rsp+24h] [rbp-54h]
int v212; // [rsp+24h] [rbp-54h]
int v213; // [rsp+24h] [rbp-54h]
unsigned int v214; // [rsp+24h] [rbp-54h]
unsigned int v215; // [rsp+24h] [rbp-54h]
int v216; // [rsp+24h] [rbp-54h]
int v217; // [rsp+24h] [rbp-54h]
int v218; // [rsp+24h] [rbp-54h]
int v219; // [rsp+24h] [rbp-54h]
int v220; // [rsp+24h] [rbp-54h]
int v221; // [rsp+24h] [rbp-54h]
int v222; // [rsp+24h] [rbp-54h]
int v223; // [rsp+24h] [rbp-54h]
int v224; // [rsp+24h] [rbp-54h]
int v225; // [rsp+24h] [rbp-54h]
unsigned int v226; // [rsp+24h] [rbp-54h]
int v227; // [rsp+24h] [rbp-54h]
int v228; // [rsp+24h] [rbp-54h]
int v229; // [rsp+24h] [rbp-54h]
int v230; // [rsp+28h] [rbp-50h]
int v231; // [rsp+28h] [rbp-50h]
unsigned int v232; // [rsp+28h] [rbp-50h]
int v233; // [rsp+28h] [rbp-50h]
int v234; // [rsp+28h] [rbp-50h]
int v235; // [rsp+28h] [rbp-50h]
int v236; // [rsp+28h] [rbp-50h]
int v237; // [rsp+28h] [rbp-50h]
int v238; // [rsp+28h] [rbp-50h]
unsigned int v239; // [rsp+28h] [rbp-50h]
int v240; // [rsp+28h] [rbp-50h]
int v241; // [rsp+28h] [rbp-50h]
int v242; // [rsp+28h] [rbp-50h]
int v243; // [rsp+28h] [rbp-50h]
int v244; // [rsp+28h] [rbp-50h]
int v245; // [rsp+28h] [rbp-50h]
int v246; // [rsp+28h] [rbp-50h]
int v247; // [rsp+28h] [rbp-50h]
int v248; // [rsp+28h] [rbp-50h]
int v249; // [rsp+28h] [rbp-50h]
int v250; // [rsp+28h] [rbp-50h]
int v251; // [rsp+28h] [rbp-50h]
int v252; // [rsp+28h] [rbp-50h]
int v253; // [rsp+28h] [rbp-50h]
int v254; // [rsp+28h] [rbp-50h]
int v255; // [rsp+28h] [rbp-50h]
int v256; // [rsp+28h] [rbp-50h]
unsigned int v257; // [rsp+2Ch] [rbp-4Ch]
int v258; // [rsp+2Ch] [rbp-4Ch]
int v259; // [rsp+2Ch] [rbp-4Ch]
int v260; // [rsp+2Ch] [rbp-4Ch]
int v261; // [rsp+2Ch] [rbp-4Ch]
int v262; // [rsp+2Ch] [rbp-4Ch]
int v263; // [rsp+2Ch] [rbp-4Ch]
int v264; // [rsp+2Ch] [rbp-4Ch]
int v265; // [rsp+2Ch] [rbp-4Ch]
int v266; // [rsp+2Ch] [rbp-4Ch]
int v267; // [rsp+2Ch] [rbp-4Ch]
int v268; // [rsp+2Ch] [rbp-4Ch]
int v269; // [rsp+2Ch] [rbp-4Ch]
int v270; // [rsp+2Ch] [rbp-4Ch]
int v271; // [rsp+2Ch] [rbp-4Ch]
int v272; // [rsp+2Ch] [rbp-4Ch]
int v273; // [rsp+2Ch] [rbp-4Ch]
int v274; // [rsp+2Ch] [rbp-4Ch]
int v275; // [rsp+2Ch] [rbp-4Ch]
int v276; // [rsp+2Ch] [rbp-4Ch]
int v277; // [rsp+2Ch] [rbp-4Ch]
int v278; // [rsp+2Ch] [rbp-4Ch]
int v279; // [rsp+2Ch] [rbp-4Ch]
int v280; // [rsp+2Ch] [rbp-4Ch]
int v281; // [rsp+2Ch] [rbp-4Ch]
int v282; // [rsp+30h] [rbp-48h]
int v283; // [rsp+30h] [rbp-48h]
int v284; // [rsp+30h] [rbp-48h]
int v285; // [rsp+30h] [rbp-48h]
int v286; // [rsp+30h] [rbp-48h]
int v287; // [rsp+30h] [rbp-48h]
int v288; // [rsp+30h] [rbp-48h]
int v289; // [rsp+30h] [rbp-48h]
int v290; // [rsp+30h] [rbp-48h]
int v291; // [rsp+30h] [rbp-48h]
int v292; // [rsp+30h] [rbp-48h]
int v293; // [rsp+30h] [rbp-48h]
int v294; // [rsp+30h] [rbp-48h]
int v295; // [rsp+30h] [rbp-48h]
int v296; // [rsp+30h] [rbp-48h]
int v297; // [rsp+30h] [rbp-48h]
int v298; // [rsp+30h] [rbp-48h]
int v299; // [rsp+30h] [rbp-48h]
int v300; // [rsp+30h] [rbp-48h]
int v301; // [rsp+30h] [rbp-48h]
int v302; // [rsp+30h] [rbp-48h]
int v303; // [rsp+30h] [rbp-48h]
int v304; // [rsp+30h] [rbp-48h]
int v305; // [rsp+30h] [rbp-48h]
int v306; // [rsp+34h] [rbp-44h]
int v307; // [rsp+34h] [rbp-44h]
int v308; // [rsp+34h] [rbp-44h]
int v309; // [rsp+34h] [rbp-44h]
int v310; // [rsp+34h] [rbp-44h]
int v311; // [rsp+34h] [rbp-44h]
int v312; // [rsp+34h] [rbp-44h]
int v313; // [rsp+34h] [rbp-44h]
int v314; // [rsp+34h] [rbp-44h]
int v315; // [rsp+34h] [rbp-44h]
int v316; // [rsp+34h] [rbp-44h]
int v317; // [rsp+34h] [rbp-44h]
int v318; // [rsp+34h] [rbp-44h]
int v319; // [rsp+34h] [rbp-44h]
int v320; // [rsp+38h] [rbp-40h]
int v321; // [rsp+38h] [rbp-40h]
int v322; // [rsp+38h] [rbp-40h]
int v323; // [rsp+38h] [rbp-40h]
int v324; // [rsp+3Ch] [rbp-3Ch]
v186 = 0;
if ( a1 <= 0 )
return v186;
v185 = 0;
v173 = 1;
v1 = a1 - 1;
LABEL_3:
if ( v1 <= 1 )
goto LABEL_202;
do
{
v174 = 0;
v187 = v1 - 1;
v2 = 0;
v3 = 1;
v4 = v1 - 1;
while ( 1 )
{
if ( v4 > 1 )
{
v179 = v3;
--v4;
v5 = 0;
v6 = v4;
v7 = 1;
v8 = 0;
while ( 1 )
{
LABEL_7:
if ( v6 > 1 )
{
--v6;
v153 = v5;
v9 = 0;
v10 = v6;
v11 = 1;
v12 = 0;
while ( 1 )
{
if ( v10 <= 1 )
{
v9 += v11;
if ( !v10 )
{
v5 = v153 + 1;
v8 += v7 * v9;
goto LABEL_29;
}
++v12;
v10 = 0;
}
else
{
--v10;
v13 = 0;
v14 = 0;
v15 = 1;
v16 = v10;
LABEL_11:
if ( v16 > 1 )
{
LABEL_12:
v17 = (unsigned int)v16;
v324 = v10;
--v16;
v306 = v9;
v282 = v8;
v257 = v13;
v230 = v14;
v202 = v15;
v18 = func0(v17);
v8 = v282;
v9 = v306;
v10 = v324;
v13 = v257 + 1;
v14 = v202 * v18 + v230;
goto LABEL_13;
}
while ( 1 )
{
v14 += v15;
++v13;
if ( !v16 )
break;
v16 = 0;
LABEL_13:
if ( v13 == 1 )
{
v15 = 1;
goto LABEL_11;
}
v320 = v10;
v283 = v9;
v258 = v8;
v231 = v14;
v203 = v13;
v19 = func0(v13);
v13 = v203;
v14 = v231;
v8 = v258;
v9 = v283;
v15 = v19;
v10 = v320;
if ( v16 > 1 )
goto LABEL_12;
}
++v12;
v9 += v11 * v14;
}
if ( v12 == 1 )
{
v11 = 1;
}
else
{
v20 = v12 - 1;
v11 = 0;
v21 = 0;
v22 = 1;
LABEL_20:
if ( v20 > 1 )
{
LABEL_21:
v23 = (unsigned int)v20--;
v307 = v10;
v284 = v9;
v259 = v8;
v232 = v21;
v204 = v22;
v24 = func0(v23);
v8 = v259;
v9 = v284;
v10 = v307;
v21 = v232 + 1;
v11 += v204 * v24;
goto LABEL_22;
}
while ( 1 )
{
v11 += v22;
++v21;
if ( !v20 )
break;
v20 = 0;
LABEL_22:
if ( v21 == 1 )
{
v22 = 1;
goto LABEL_20;
}
v285 = v10;
v260 = v9;
v233 = v8;
v205 = v21;
v25 = func0(v21);
v21 = v205;
v8 = v233;
v9 = v260;
v10 = v285;
v22 = v25;
if ( v20 > 1 )
goto LABEL_21;
}
}
}
}
v8 += v7;
if ( !v6 )
break;
++v5;
v6 = 0;
LABEL_29:
if ( v5 != 1 )
{
v26 = v5 - 1;
v7 = 0;
v27 = 0;
v28 = 1;
while ( 1 )
{
if ( v26 <= 1 )
{
v7 += v28;
if ( !v26 )
goto LABEL_7;
++v27;
v26 = 0;
}
else
{
v29 = v26 - 1;
v30 = 0;
v31 = 0;
v32 = 1;
v33 = v29;
LABEL_33:
if ( v33 > 1 )
{
LABEL_34:
v34 = (unsigned int)v33;
v321 = v29;
--v33;
v308 = v27;
v286 = v8;
v234 = v32;
v206 = v31;
v154 = v30;
v35 = func0(v34);
v8 = v286;
v27 = v308;
v29 = v321;
v31 = v206 + 1;
v30 = v234 * v35 + v154;
goto LABEL_35;
}
while ( 1 )
{
v30 += v32;
++v31;
if ( !v33 )
break;
v33 = 0;
LABEL_35:
if ( v31 == 1 )
{
v32 = 1;
goto LABEL_33;
}
v309 = v29;
v287 = v27;
v261 = v8;
v207 = v30;
v155 = v31;
v36 = func0(v31);
v31 = v155;
v30 = v207;
v8 = v261;
v32 = v36;
v27 = v287;
v29 = v309;
if ( v33 > 1 )
goto LABEL_34;
}
++v27;
v26 = v29;
v7 += v28 * v30;
}
if ( v27 == 1 )
{
v28 = 1;
}
else
{
v37 = v27 - 1;
v38 = 0;
v28 = 0;
v39 = 1;
LABEL_42:
if ( v37 > 1 )
{
LABEL_43:
v40 = (unsigned int)v37;
v310 = v26;
--v37;
v288 = v27;
v262 = v8;
v208 = v38;
v156 = v39;
v41 = func0(v40);
v8 = v262;
v27 = v288;
v26 = v310;
v38 = v208 + 1;
v28 += v156 * v41;
goto LABEL_44;
}
while ( 1 )
{
v28 += v39;
++v38;
if ( !v37 )
break;
v37 = 0;
LABEL_44:
if ( v38 == 1 )
{
v39 = 1;
goto LABEL_42;
}
v289 = v26;
v263 = v27;
v235 = v8;
v157 = v38;
v42 = func0(v38);
v38 = v157;
v8 = v235;
v27 = v263;
v39 = v42;
v26 = v289;
if ( v37 > 1 )
goto LABEL_43;
}
}
}
}
v7 = 1;
}
++v2;
v174 += v8 * v179;
goto LABEL_53;
}
v174 += v3;
if ( !v4 )
break;
++v2;
v4 = 0;
LABEL_53:
if ( v2 == 1 )
{
v3 = 1;
}
else
{
v43 = v2 - 1;
v3 = 0;
v44 = 0;
for ( i = 1; ; i = 1 )
{
LABEL_55:
if ( v43 > 1 )
{
v46 = v43 - 1;
v47 = 0;
v48 = 0;
v49 = 1;
v158 = v46;
v50 = v46;
while ( 1 )
{
if ( v50 <= 1 )
{
v47 += v49;
if ( !v50 )
{
++v44;
v43 = v158;
v3 += i * v47;
goto LABEL_77;
}
++v48;
v50 = 0;
}
else
{
v51 = v50 - 1;
v52 = 0;
v53 = 0;
v54 = 1;
v55 = v51;
LABEL_59:
if ( v55 > 1 )
{
LABEL_60:
v322 = v51;
v311 = v47;
v290 = v48;
v236 = v52;
v209 = v54;
v180 = v55;
v56 = func0((unsigned int)v55);
v48 = v290;
v47 = v311;
v51 = v322;
++v53;
v55 = v180 - 1;
v52 = v209 * v56 + v236;
goto LABEL_61;
}
while ( 1 )
{
v52 += v54;
++v53;
if ( !v55 )
break;
v55 = 0;
LABEL_61:
if ( v53 == 1 )
{
v54 = 1;
goto LABEL_59;
}
v312 = v51;
v291 = v47;
v264 = v48;
v237 = v55;
v210 = v52;
v57 = func0(v53);
v55 = v237;
v52 = v210;
v48 = v264;
v54 = v57;
v47 = v291;
v51 = v312;
if ( v237 > 1 )
goto LABEL_60;
}
++v48;
v50 = v51;
v47 += v49 * v52;
}
if ( v48 == 1 )
{
v49 = 1;
}
else
{
v58 = v48 - 1;
v49 = 0;
v59 = 0;
v60 = 1;
LABEL_68:
if ( v58 > 1 )
{
LABEL_69:
v313 = v50;
v292 = v47;
v265 = v48;
v211 = v60;
v181 = v58;
v61 = func0((unsigned int)v58);
v48 = v265;
v47 = v292;
v50 = v313;
++v59;
v58 = v181 - 1;
v49 += v211 * v61;
goto LABEL_70;
}
while ( 1 )
{
v49 += v60;
++v59;
if ( !v58 )
break;
v58 = 0;
LABEL_70:
if ( v59 == 1 )
{
v60 = 1;
goto LABEL_68;
}
v293 = v50;
v266 = v47;
v238 = v48;
v212 = v58;
v62 = func0(v59);
v58 = v212;
v48 = v238;
v47 = v266;
v60 = v62;
v50 = v293;
if ( v212 > 1 )
goto LABEL_69;
}
}
}
}
v3 += i;
if ( !v43 )
break;
++v44;
v43 = 0;
LABEL_77:
if ( v44 != 1 )
{
v63 = v44 - 1;
i = 0;
v64 = 0;
v65 = 1;
while ( 1 )
{
if ( v63 <= 1 )
{
i += v65;
if ( !v63 )
goto LABEL_55;
++v64;
v63 = 0;
}
else
{
--v63;
v66 = 0;
v67 = 0;
v68 = 1;
v69 = v63;
LABEL_81:
if ( v69 > 1 )
{
LABEL_82:
v314 = v63;
v294 = v64;
v267 = v68;
v239 = v67;
v213 = v66;
v159 = v69;
v70 = func0((unsigned int)v69);
v64 = v294;
v63 = v314;
v67 = v239 + 1;
v69 = v159 - 1;
v66 = v267 * v70 + v213;
goto LABEL_83;
}
while ( 1 )
{
v66 += v68;
++v67;
if ( !v69 )
break;
v69 = 0;
LABEL_83:
if ( v67 == 1 )
{
v68 = 1;
goto LABEL_81;
}
v295 = v63;
v268 = v64;
v240 = v66;
v182 = v69;
v160 = v67;
v71 = func0(v67);
v69 = v182;
v67 = v160;
v66 = v240;
v68 = v71;
v64 = v268;
v63 = v295;
if ( v182 > 1 )
goto LABEL_82;
}
++v64;
i += v65 * v66;
}
if ( v64 == 1 )
{
v65 = 1;
}
else
{
v72 = v64 - 1;
v65 = 0;
v73 = 0;
v74 = 1;
LABEL_90:
if ( v72 > 1 )
{
LABEL_91:
v296 = v63;
v269 = v64;
v241 = v74;
v214 = v73;
v161 = v72;
v75 = func0((unsigned int)v72);
v64 = v269;
v63 = v296;
v73 = v214 + 1;
v72 = v161 - 1;
v65 += v241 * v75;
goto LABEL_92;
}
while ( 1 )
{
v65 += v74;
++v73;
if ( !v72 )
break;
v72 = 0;
LABEL_92:
if ( v73 == 1 )
{
v74 = 1;
goto LABEL_90;
}
v270 = v63;
v242 = v64;
v183 = v72;
v162 = v73;
v76 = func0(v73);
v72 = v183;
v73 = v162;
v64 = v242;
v74 = v76;
v63 = v270;
if ( v183 > 1 )
goto LABEL_91;
}
}
}
}
}
}
}
++v185;
v186 += v174 * v173;
v1 = v187;
if ( v185 == 1 )
{
LABEL_204:
v173 = 1;
goto LABEL_3;
}
LABEL_103:
v173 = 0;
v184 = v1;
v77 = 0;
v78 = 1;
v79 = v185 - 1;
while ( 2 )
{
if ( v79 > 1 )
{
v175 = v78;
--v79;
v80 = 0;
v81 = v79;
v82 = 1;
v83 = 0;
while ( 1 )
{
LABEL_106:
if ( v81 > 1 )
{
--v81;
v163 = v80;
v84 = 0;
v85 = v81;
v86 = 1;
v87 = 0;
while ( 1 )
{
if ( v85 <= 1 )
{
v84 += v86;
if ( !v85 )
{
v80 = v163 + 1;
v83 += v82 * v84;
goto LABEL_128;
}
++v87;
v85 = 0;
}
else
{
--v85;
v88 = 0;
v89 = 0;
v90 = 1;
v91 = v85;
LABEL_110:
if ( v91 > 1 )
{
LABEL_111:
v92 = (unsigned int)v91;
v323 = v85;
--v91;
v315 = v84;
v271 = v83;
v243 = v90;
v215 = v89;
v188 = v88;
v93 = func0(v92);
v83 = v271;
v84 = v315;
v85 = v323;
v89 = v215 + 1;
v88 = v243 * v93 + v188;
goto LABEL_112;
}
while ( 1 )
{
v88 += v90;
++v89;
if ( !v91 )
break;
v91 = 0;
LABEL_112:
if ( v89 == 1 )
{
v90 = 1;
goto LABEL_110;
}
v316 = v85;
v297 = v84;
v244 = v83;
v216 = v88;
v189 = v89;
v94 = func0(v89);
v89 = v189;
v88 = v216;
v83 = v244;
v90 = v94;
v84 = v297;
v85 = v316;
if ( v91 > 1 )
goto LABEL_111;
}
++v87;
v84 += v86 * v88;
}
if ( v87 == 1 )
{
v86 = 1;
}
else
{
v95 = v87 - 1;
v86 = 0;
v96 = 0;
v97 = 1;
LABEL_119:
if ( v95 > 1 )
{
LABEL_120:
v98 = (unsigned int)v95;
v317 = v84;
--v95;
v272 = v85;
v245 = v83;
v217 = v97;
v190 = v96;
v99 = func0(v98);
v83 = v245;
v85 = v272;
v84 = v317;
v96 = v190 + 1;
v86 += v217 * v99;
goto LABEL_121;
}
while ( 1 )
{
v86 += v97;
++v96;
if ( !v95 )
break;
v95 = 0;
LABEL_121:
if ( v96 == 1 )
{
v97 = 1;
goto LABEL_119;
}
v298 = v84;
v246 = v85;
v218 = v83;
v191 = v96;
v100 = func0(v96);
v96 = v191;
v83 = v218;
v85 = v246;
v97 = v100;
v84 = v298;
if ( v95 > 1 )
goto LABEL_120;
}
}
}
}
v83 += v82;
if ( !v81 )
break;
++v80;
v81 = 0;
LABEL_128:
if ( v80 != 1 )
{
v101 = v80 - 1;
v102 = 0;
v82 = 0;
v103 = 1;
while ( 1 )
{
if ( v101 <= 1 )
{
v82 += v103;
if ( !v101 )
goto LABEL_106;
++v102;
v101 = 0;
}
else
{
v104 = v101 - 1;
v105 = 0;
v106 = 0;
v107 = 1;
v108 = v104;
LABEL_132:
if ( v108 > 1 )
{
LABEL_133:
v109 = (unsigned int)v108;
v318 = v104;
--v108;
v299 = v102;
v247 = v83;
v219 = v107;
v192 = v106;
v164 = v105;
v110 = func0(v109);
v83 = v247;
v102 = v299;
v104 = v318;
v106 = v192 + 1;
v105 = v219 * v110 + v164;
goto LABEL_134;
}
while ( 1 )
{
v105 += v107;
++v106;
if ( !v108 )
break;
v108 = 0;
LABEL_134:
if ( v106 == 1 )
{
v107 = 1;
goto LABEL_132;
}
v300 = v104;
v273 = v102;
v220 = v83;
v193 = v105;
v165 = v106;
v111 = func0(v106);
v106 = v165;
v105 = v193;
v83 = v220;
v107 = v111;
v102 = v273;
v104 = v300;
if ( v108 > 1 )
goto LABEL_133;
}
++v102;
v101 = v104;
v82 += v103 * v105;
}
if ( v102 == 1 )
{
v103 = 1;
}
else
{
v112 = v102 - 1;
v113 = 0;
v103 = 0;
v114 = 1;
LABEL_141:
if ( v112 > 1 )
{
LABEL_142:
v115 = (unsigned int)v112;
v301 = v102;
--v112;
v248 = v83;
v221 = v101;
v194 = v114;
v166 = v113;
v116 = func0(v115);
v101 = v221;
v83 = v248;
v102 = v301;
v113 = v166 + 1;
v103 += v194 * v116;
goto LABEL_143;
}
while ( 1 )
{
v103 += v114;
++v113;
if ( !v112 )
break;
v112 = 0;
LABEL_143:
if ( v113 == 1 )
{
v114 = 1;
goto LABEL_141;
}
v274 = v102;
v222 = v83;
v195 = v101;
v167 = v113;
v117 = func0(v113);
v113 = v167;
v101 = v195;
v83 = v222;
v114 = v117;
v102 = v274;
if ( v112 > 1 )
goto LABEL_142;
}
}
}
}
v82 = 1;
}
++v77;
v173 += v83 * v175;
LABEL_152:
if ( v77 == 1 )
{
v78 = 1;
}
else
{
v118 = v77 - 1;
v78 = 0;
v119 = 0;
for ( j = 1; ; j = 1 )
{
LABEL_154:
if ( v118 > 1 )
{
v121 = v118 - 1;
v122 = 0;
v123 = 0;
v124 = 1;
v168 = v121;
v125 = v121;
while ( 1 )
{
if ( v125 <= 1 )
{
v123 += v124;
if ( !v125 )
{
++v119;
v118 = v168;
v78 += j * v123;
goto LABEL_176;
}
++v122;
v125 = 0;
}
else
{
v126 = v125 - 1;
v127 = 0;
v128 = 0;
v129 = 1;
v130 = v126;
LABEL_158:
if ( v130 > 1 )
{
LABEL_159:
v319 = v126;
v302 = v122;
v275 = v123;
v249 = v129;
v196 = v128;
v176 = v130;
v131 = func0((unsigned int)v130);
v123 = v275;
v122 = v302;
v126 = v319;
++v127;
v130 = v176 - 1;
v128 = v249 * v131 + v196;
goto LABEL_160;
}
while ( 1 )
{
v128 += v129;
++v127;
if ( !v130 )
break;
v130 = 0;
LABEL_160:
if ( v127 == 1 )
{
v129 = 1;
goto LABEL_158;
}
v303 = v126;
v276 = v122;
v250 = v123;
v223 = v128;
v197 = v130;
v132 = func0(v127);
v130 = v197;
v128 = v223;
v123 = v250;
v129 = v132;
v122 = v276;
v126 = v303;
if ( v197 > 1 )
goto LABEL_159;
}
++v122;
v125 = v126;
v123 += v124 * v128;
}
if ( v122 == 1 )
{
v124 = 1;
}
else
{
v133 = v122 - 1;
v124 = 0;
v134 = 0;
v135 = 1;
LABEL_167:
if ( v133 > 1 )
{
LABEL_168:
v304 = v122;
v277 = v123;
v251 = v125;
v224 = v135;
v177 = v133;
v136 = func0((unsigned int)v133);
v125 = v251;
v123 = v277;
v122 = v304;
++v134;
v133 = v177 - 1;
v124 += v224 * v136;
goto LABEL_169;
}
while ( 1 )
{
v124 += v135;
++v134;
if ( !v133 )
break;
v133 = 0;
LABEL_169:
if ( v134 == 1 )
{
v135 = 1;
goto LABEL_167;
}
v278 = v122;
v252 = v123;
v225 = v125;
v198 = v133;
v137 = func0(v134);
v133 = v198;
v125 = v225;
v123 = v252;
v135 = v137;
v122 = v278;
if ( v198 > 1 )
goto LABEL_168;
}
}
}
}
v78 += j;
if ( !v118 )
break;
++v119;
v118 = 0;
LABEL_176:
if ( v119 != 1 )
{
v138 = v119 - 1;
j = 0;
v139 = 0;
v140 = 1;
while ( 1 )
{
if ( v138 <= 1 )
{
j += v140;
if ( !v138 )
goto LABEL_154;
++v139;
v138 = 0;
}
else
{
--v138;
v141 = 0;
v142 = 0;
v143 = 1;
v144 = v138;
LABEL_180:
if ( v144 > 1 )
{
LABEL_181:
v305 = v138;
v279 = v139;
v253 = v143;
v226 = v142;
v199 = v141;
v169 = v144;
v145 = func0((unsigned int)v144);
v139 = v279;
v138 = v305;
v142 = v226 + 1;
v144 = v169 - 1;
v141 = v253 * v145 + v199;
goto LABEL_182;
}
while ( 1 )
{
v141 += v143;
++v142;
if ( !v144 )
break;
v144 = 0;
LABEL_182:
if ( v142 == 1 )
{
v143 = 1;
goto LABEL_180;
}
v280 = v138;
v254 = v139;
v227 = v141;
v178 = v144;
v170 = v142;
v146 = func0(v142);
v144 = v178;
v142 = v170;
v141 = v227;
v143 = v146;
v139 = v254;
v138 = v280;
if ( v178 > 1 )
goto LABEL_181;
}
++v139;
j += v140 * v141;
}
if ( v139 == 1 )
{
v140 = 1;
}
else
{
v147 = v139 - 1;
v148 = 0;
v140 = 0;
v149 = 1;
LABEL_189:
if ( v147 > 1 )
{
LABEL_190:
v281 = v139;
v255 = v138;
v228 = v149;
v200 = v148;
v171 = v147;
v150 = func0((unsigned int)v147);
v138 = v255;
v139 = v281;
v148 = v200 + 1;
v147 = v171 - 1;
v140 += v228 * v150;
goto LABEL_191;
}
while ( 1 )
{
v140 += v149;
++v148;
if ( !v147 )
break;
v147 = 0;
LABEL_191:
if ( v148 == 1 )
{
v149 = 1;
goto LABEL_189;
}
v256 = v139;
v229 = v138;
v201 = v147;
v172 = v148;
v151 = func0(v148);
v147 = v201;
v148 = v172;
v138 = v229;
v149 = v151;
v139 = v256;
if ( v201 > 1 )
goto LABEL_190;
}
}
}
}
}
}
continue;
}
break;
}
v173 += v78;
if ( v79 )
{
++v77;
v79 = 0;
goto LABEL_152;
}
v1 = v184;
}
while ( v184 > 1 );
LABEL_202:
v186 += v173;
if ( v1 )
{
++v185;
v1 = 0;
if ( v185 != 1 )
goto LABEL_103;
goto LABEL_204;
}
return v186;
} | func0:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x48
MOV dword ptr [RSP + 0x1c],0x0
TEST EDI,EDI
JLE 0x00102441
MOV dword ptr [RSP + 0x18],0x0
LEA EBX,[RDI + -0x1]
MOV dword ptr [RSP + 0xc],0x1
MOV R12D,EBX
LAB_00101224:
CMP R12D,0x1
JLE 0x00102414
LAB_0010122e:
LEA EBP,[R12 + -0x1]
XOR R15D,R15D
MOV dword ptr [RSP + 0x10],0x0
MOV R13D,0x1
MOV R12D,EBP
MOV dword ptr [RSP + 0x20],EBP
MOV EBP,R15D
MOV R15D,R13D
MOV R13D,R12D
LAB_00101254:
CMP R13D,0x1
JLE 0x00101af0
MOV dword ptr [RSP + 0x14],R15D
SUB R13D,0x1
XOR EBX,EBX
XOR ESI,ESI
MOV R14D,R13D
MOV R12D,0x1
MOV R9D,EBX
LAB_00101277:
CMP R14D,0x1
JLE 0x00101680
SUB R14D,0x1
XOR R11D,R11D
MOV dword ptr [RSP + 0x8],ESI
XOR R10D,R10D
MOV EDX,R14D
MOV R15D,0x1
MOV ESI,R11D
LAB_0010129b:
CMP EDX,0x1
JLE 0x00101458
SUB EDX,0x1
XOR ECX,ECX
XOR R8D,R8D
MOV R11D,0x1
MOV EBX,EDX
LAB_001012b4:
CMP EBX,0x1
JLE 0x00101370
LAB_001012bd:
MOV EDI,EBX
MOV dword ptr [RSP + 0x3c],EDX
SUB EBX,0x1
MOV dword ptr [RSP + 0x38],ESI
MOV dword ptr [RSP + 0x34],R10D
MOV dword ptr [RSP + 0x30],R9D
MOV dword ptr [RSP + 0x2c],ECX
MOV dword ptr [RSP + 0x28],R8D
MOV dword ptr [RSP + 0x24],R11D
CALL 0x001011f0
MOV R11D,dword ptr [RSP + 0x24]
MOV R8D,dword ptr [RSP + 0x28]
MOV ECX,dword ptr [RSP + 0x2c]
MOV R9D,dword ptr [RSP + 0x30]
IMUL EAX,R11D
MOV R10D,dword ptr [RSP + 0x34]
MOV ESI,dword ptr [RSP + 0x38]
MOV EDX,dword ptr [RSP + 0x3c]
ADD ECX,0x1
ADD R8D,EAX
NOP dword ptr [RAX]
LAB_00101318:
CMP ECX,0x1
JZ 0x001024f8
MOV EDI,ECX
MOV dword ptr [RSP + 0x38],EDX
MOV dword ptr [RSP + 0x34],ESI
MOV dword ptr [RSP + 0x30],R10D
MOV dword ptr [RSP + 0x2c],R9D
MOV dword ptr [RSP + 0x28],R8D
MOV dword ptr [RSP + 0x24],ECX
CALL 0x001011f0
MOV ECX,dword ptr [RSP + 0x24]
MOV R8D,dword ptr [RSP + 0x28]
MOV R9D,dword ptr [RSP + 0x2c]
MOV R10D,dword ptr [RSP + 0x30]
MOV R11D,EAX
MOV ESI,dword ptr [RSP + 0x34]
MOV EDX,dword ptr [RSP + 0x38]
CMP EBX,0x1
JG 0x001012bd
NOP word ptr [RAX + RAX*0x1]
LAB_00101370:
ADD R8D,R11D
ADD ECX,0x1
TEST EBX,EBX
JZ 0x00101380
XOR EBX,EBX
JMP 0x00101318
LAB_00101380:
IMUL R8D,R15D
ADD ESI,0x1
ADD R10D,R8D
LAB_0010138a:
CMP ESI,0x1
JZ 0x001024ed
LEA EBX,[RSI + -0x1]
XOR R15D,R15D
XOR ECX,ECX
MOV R8D,0x1
LAB_001013a1:
CMP EBX,0x1
JLE 0x00101440
LAB_001013aa:
MOV EDI,EBX
MOV dword ptr [RSP + 0x38],ESI
SUB EBX,0x1
MOV dword ptr [RSP + 0x34],EDX
MOV dword ptr [RSP + 0x30],R10D
MOV dword ptr [RSP + 0x2c],R9D
MOV dword ptr [RSP + 0x28],ECX
MOV dword ptr [RSP + 0x24],R8D
CALL 0x001011f0
MOV R8D,dword ptr [RSP + 0x24]
MOV ECX,dword ptr [RSP + 0x28]
MOV R9D,dword ptr [RSP + 0x2c]
MOV R10D,dword ptr [RSP + 0x30]
IMUL EAX,R8D
MOV EDX,dword ptr [RSP + 0x34]
MOV ESI,dword ptr [RSP + 0x38]
ADD ECX,0x1
ADD R15D,EAX
NOP dword ptr [RAX]
LAB_001013f8:
CMP ECX,0x1
JZ 0x001024e2
MOV EDI,ECX
MOV dword ptr [RSP + 0x34],ESI
MOV dword ptr [RSP + 0x30],EDX
MOV dword ptr [RSP + 0x2c],R10D
MOV dword ptr [RSP + 0x28],R9D
MOV dword ptr [RSP + 0x24],ECX
CALL 0x001011f0
MOV ECX,dword ptr [RSP + 0x24]
MOV R9D,dword ptr [RSP + 0x28]
MOV R10D,dword ptr [RSP + 0x2c]
MOV EDX,dword ptr [RSP + 0x30]
MOV R8D,EAX
MOV ESI,dword ptr [RSP + 0x34]
CMP EBX,0x1
JG 0x001013aa
LAB_00101440:
ADD R15D,R8D
ADD ECX,0x1
TEST EBX,EBX
JZ 0x0010129b
XOR EBX,EBX
JMP 0x001013f8
LAB_00101458:
ADD R10D,R15D
TEST EDX,EDX
JZ 0x00101470
ADD ESI,0x1
XOR EDX,EDX
JMP 0x0010138a
LAB_00101470:
IMUL R10D,R12D
MOV ESI,dword ptr [RSP + 0x8]
ADD ESI,0x1
ADD R9D,R10D
LAB_0010147e:
CMP ESI,0x1
JZ 0x001024d7
LEA R10D,[RSI + -0x1]
XOR R12D,R12D
XOR R11D,R11D
MOV R15D,0x1
LAB_00101497:
CMP R10D,0x1
JLE 0x00101668
LEA ECX,[R10 + -0x1]
XOR R8D,R8D
XOR EDX,EDX
MOV R10D,0x1
MOV EBX,ECX
LAB_001014b2:
CMP EBX,0x1
JLE 0x00101568
LAB_001014bb:
MOV EDI,EBX
MOV dword ptr [RSP + 0x38],ECX
SUB EBX,0x1
MOV dword ptr [RSP + 0x34],R11D
MOV dword ptr [RSP + 0x30],R9D
MOV dword ptr [RSP + 0x2c],ESI
MOV dword ptr [RSP + 0x28],R10D
MOV dword ptr [RSP + 0x24],EDX
MOV dword ptr [RSP + 0x8],R8D
CALL 0x001011f0
MOV R10D,dword ptr [RSP + 0x28]
MOV R8D,dword ptr [RSP + 0x8]
MOV EDX,dword ptr [RSP + 0x24]
MOV ESI,dword ptr [RSP + 0x2c]
IMUL EAX,R10D
MOV R9D,dword ptr [RSP + 0x30]
MOV R11D,dword ptr [RSP + 0x34]
MOV ECX,dword ptr [RSP + 0x38]
ADD EDX,0x1
ADD R8D,EAX
NOP
LAB_00101510:
CMP EDX,0x1
JZ 0x001024cc
MOV EDI,EDX
MOV dword ptr [RSP + 0x34],ECX
MOV dword ptr [RSP + 0x30],R11D
MOV dword ptr [RSP + 0x2c],R9D
MOV dword ptr [RSP + 0x28],ESI
MOV dword ptr [RSP + 0x24],R8D
MOV dword ptr [RSP + 0x8],EDX
CALL 0x001011f0
MOV EDX,dword ptr [RSP + 0x8]
MOV R8D,dword ptr [RSP + 0x24]
MOV ESI,dword ptr [RSP + 0x28]
MOV R9D,dword ptr [RSP + 0x2c]
MOV R10D,EAX
MOV R11D,dword ptr [RSP + 0x30]
MOV ECX,dword ptr [RSP + 0x34]
CMP EBX,0x1
JG 0x001014bb
NOP word ptr [RAX + RAX*0x1]
LAB_00101568:
ADD R8D,R10D
ADD EDX,0x1
TEST EBX,EBX
JZ 0x00101580
XOR EBX,EBX
JMP 0x00101510
LAB_00101580:
IMUL R8D,R15D
ADD R11D,0x1
MOV R10D,ECX
ADD R12D,R8D
LAB_0010158e:
CMP R11D,0x1
JZ 0x001024c1
LEA EBX,[R11 + -0x1]
XOR EDX,EDX
XOR R15D,R15D
MOV R8D,0x1
LAB_001015a7:
CMP EBX,0x1
JLE 0x00101650
LAB_001015b0:
MOV EDI,EBX
MOV dword ptr [RSP + 0x34],R10D
SUB EBX,0x1
MOV dword ptr [RSP + 0x30],R11D
MOV dword ptr [RSP + 0x2c],R9D
MOV dword ptr [RSP + 0x28],ESI
MOV dword ptr [RSP + 0x24],EDX
MOV dword ptr [RSP + 0x8],R8D
CALL 0x001011f0
MOV R8D,dword ptr [RSP + 0x8]
MOV EDX,dword ptr [RSP + 0x24]
MOV ESI,dword ptr [RSP + 0x28]
MOV R9D,dword ptr [RSP + 0x2c]
IMUL EAX,R8D
MOV R11D,dword ptr [RSP + 0x30]
MOV R10D,dword ptr [RSP + 0x34]
ADD EDX,0x1
ADD R15D,EAX
NOP dword ptr [RAX]
LAB_00101600:
CMP EDX,0x1
JZ 0x001024b6
MOV EDI,EDX
MOV dword ptr [RSP + 0x30],R10D
MOV dword ptr [RSP + 0x2c],R11D
MOV dword ptr [RSP + 0x28],R9D
MOV dword ptr [RSP + 0x24],ESI
MOV dword ptr [RSP + 0x8],EDX
CALL 0x001011f0
MOV EDX,dword ptr [RSP + 0x8]
MOV ESI,dword ptr [RSP + 0x24]
MOV R9D,dword ptr [RSP + 0x28]
MOV R11D,dword ptr [RSP + 0x2c]
MOV R8D,EAX
MOV R10D,dword ptr [RSP + 0x30]
CMP EBX,0x1
JG 0x001015b0
NOP word ptr [RAX + RAX*0x1]
LAB_00101650:
ADD R15D,R8D
ADD EDX,0x1
TEST EBX,EBX
JZ 0x00101497
XOR EBX,EBX
JMP 0x00101600
LAB_00101668:
ADD R12D,R15D
TEST R10D,R10D
JZ 0x00101277
ADD R11D,0x1
XOR R10D,R10D
JMP 0x0010158e
LAB_00101680:
ADD R9D,R12D
TEST R14D,R14D
JZ 0x00101698
ADD ESI,0x1
XOR R14D,R14D
JMP 0x0010147e
LAB_00101698:
MOV R15D,dword ptr [RSP + 0x14]
ADD EBP,0x1
IMUL R15D,R9D
ADD dword ptr [RSP + 0x10],R15D
LAB_001016a9:
CMP EBP,0x1
JZ 0x001024ab
LEA R12D,[RBP + -0x1]
XOR R15D,R15D
XOR EBX,EBX
MOV R14D,0x1
LAB_001016c1:
CMP R12D,0x1
JLE 0x00101ad0
LEA EDX,[R12 + -0x1]
XOR R8D,R8D
XOR R9D,R9D
MOV R12D,0x1
MOV dword ptr [RSP + 0x8],EDX
MOV R10D,EDX
LAB_001016e3:
CMP R10D,0x1
JLE 0x001018b8
LEA EDX,[R10 + -0x1]
XOR R11D,R11D
XOR ESI,ESI
MOV R10D,0x1
MOV ECX,EDX
LAB_001016fe:
CMP ECX,0x1
JLE 0x001017b8
LAB_00101707:
MOV EDI,ECX
MOV dword ptr [RSP + 0x38],EDX
MOV dword ptr [RSP + 0x34],R8D
MOV dword ptr [RSP + 0x30],R9D
MOV dword ptr [RSP + 0x2c],ESI
MOV dword ptr [RSP + 0x28],R11D
MOV dword ptr [RSP + 0x24],R10D
MOV dword ptr [RSP + 0x14],ECX
CALL 0x001011f0
MOV R10D,dword ptr [RSP + 0x24]
MOV R11D,dword ptr [RSP + 0x28]
MOV ESI,dword ptr [RSP + 0x2c]
MOV ECX,dword ptr [RSP + 0x14]
IMUL EAX,R10D
MOV R9D,dword ptr [RSP + 0x30]
MOV R8D,dword ptr [RSP + 0x34]
MOV EDX,dword ptr [RSP + 0x38]
ADD ESI,0x1
SUB ECX,0x1
ADD R11D,EAX
NOP dword ptr [RAX + RAX*0x1]
LAB_00101760:
CMP ESI,0x1
JZ 0x001024a0
MOV EDI,ESI
MOV dword ptr [RSP + 0x34],EDX
MOV dword ptr [RSP + 0x30],R8D
MOV dword ptr [RSP + 0x2c],R9D
MOV dword ptr [RSP + 0x28],ECX
MOV dword ptr [RSP + 0x24],R11D
MOV dword ptr [RSP + 0x14],ESI
CALL 0x001011f0
MOV ECX,dword ptr [RSP + 0x28]
MOV ESI,dword ptr [RSP + 0x14]
MOV R11D,dword ptr [RSP + 0x24]
MOV R9D,dword ptr [RSP + 0x2c]
MOV R10D,EAX
MOV R8D,dword ptr [RSP + 0x30]
MOV EDX,dword ptr [RSP + 0x34]
CMP ECX,0x1
JG 0x00101707
NOP word ptr [RAX + RAX*0x1]
LAB_001017b8:
ADD R11D,R10D
ADD ESI,0x1
TEST ECX,ECX
JZ 0x001017d0
XOR ECX,ECX
JMP 0x00101760
LAB_001017d0:
IMUL R11D,R12D
ADD R9D,0x1
MOV R10D,EDX
ADD R8D,R11D
LAB_001017de:
CMP R9D,0x1
JZ 0x00102495
LEA ECX,[R9 + -0x1]
XOR R12D,R12D
XOR ESI,ESI
MOV R11D,0x1
LAB_001017f7:
CMP ECX,0x1
JLE 0x001018a0
LAB_00101800:
MOV EDI,ECX
MOV dword ptr [RSP + 0x34],R10D
MOV dword ptr [RSP + 0x30],R8D
MOV dword ptr [RSP + 0x2c],R9D
MOV dword ptr [RSP + 0x28],ESI
MOV dword ptr [RSP + 0x24],R11D
MOV dword ptr [RSP + 0x14],ECX
CALL 0x001011f0
MOV R11D,dword ptr [RSP + 0x24]
MOV ESI,dword ptr [RSP + 0x28]
MOV ECX,dword ptr [RSP + 0x14]
MOV R9D,dword ptr [RSP + 0x2c]
IMUL EAX,R11D
MOV R8D,dword ptr [RSP + 0x30]
MOV R10D,dword ptr [RSP + 0x34]
ADD ESI,0x1
SUB ECX,0x1
ADD R12D,EAX
NOP dword ptr [RAX]
LAB_00101850:
CMP ESI,0x1
JZ 0x0010248a
MOV EDI,ESI
MOV dword ptr [RSP + 0x30],R10D
MOV dword ptr [RSP + 0x2c],R8D
MOV dword ptr [RSP + 0x28],R9D
MOV dword ptr [RSP + 0x24],ECX
MOV dword ptr [RSP + 0x14],ESI
CALL 0x001011f0
MOV ECX,dword ptr [RSP + 0x24]
MOV ESI,dword ptr [RSP + 0x14]
MOV R9D,dword ptr [RSP + 0x28]
MOV R8D,dword ptr [RSP + 0x2c]
MOV R11D,EAX
MOV R10D,dword ptr [RSP + 0x30]
CMP ECX,0x1
JG 0x00101800
NOP word ptr [RAX + RAX*0x1]
LAB_001018a0:
ADD R12D,R11D
ADD ESI,0x1
TEST ECX,ECX
JZ 0x001016e3
XOR ECX,ECX
JMP 0x00101850
LAB_001018b8:
ADD R8D,R12D
TEST R10D,R10D
JZ 0x001018d0
ADD R9D,0x1
XOR R10D,R10D
JMP 0x001017de
LAB_001018d0:
IMUL R8D,R14D
MOV EDX,dword ptr [RSP + 0x8]
ADD EBX,0x1
MOV R12D,EDX
ADD R15D,R8D
LAB_001018e1:
CMP EBX,0x1
JZ 0x0010247f
LEA R8D,[RBX + -0x1]
XOR R14D,R14D
XOR R9D,R9D
MOV ESI,0x1
LAB_001018f9:
CMP R8D,0x1
JLE 0x00101ab8
SUB R8D,0x1
XOR R10D,R10D
XOR ECX,ECX
MOV R11D,0x1
MOV EDX,R8D
LAB_00101915:
CMP EDX,0x1
JLE 0x001019d0
LAB_0010191e:
MOV EDI,EDX
MOV dword ptr [RSP + 0x34],R8D
MOV dword ptr [RSP + 0x30],R9D
MOV dword ptr [RSP + 0x2c],R11D
MOV dword ptr [RSP + 0x28],ECX
MOV dword ptr [RSP + 0x24],R10D
MOV dword ptr [RSP + 0x14],ESI
MOV dword ptr [RSP + 0x8],EDX
CALL 0x001011f0
MOV R11D,dword ptr [RSP + 0x2c]
MOV R10D,dword ptr [RSP + 0x24]
MOV ECX,dword ptr [RSP + 0x28]
MOV EDX,dword ptr [RSP + 0x8]
IMUL EAX,R11D
MOV ESI,dword ptr [RSP + 0x14]
MOV R9D,dword ptr [RSP + 0x30]
MOV R8D,dword ptr [RSP + 0x34]
ADD ECX,0x1
SUB EDX,0x1
ADD R10D,EAX
NOP word ptr [RAX + RAX*0x1]
LAB_00101978:
CMP ECX,0x1
JZ 0x00102474
MOV EDI,ECX
MOV dword ptr [RSP + 0x30],R8D
MOV dword ptr [RSP + 0x2c],R9D
MOV dword ptr [RSP + 0x28],R10D
MOV dword ptr [RSP + 0x24],ESI
MOV dword ptr [RSP + 0x14],EDX
MOV dword ptr [RSP + 0x8],ECX
CALL 0x001011f0
MOV EDX,dword ptr [RSP + 0x14]
MOV ECX,dword ptr [RSP + 0x8]
MOV ESI,dword ptr [RSP + 0x24]
MOV R10D,dword ptr [RSP + 0x28]
MOV R11D,EAX
MOV R9D,dword ptr [RSP + 0x2c]
MOV R8D,dword ptr [RSP + 0x30]
CMP EDX,0x1
JG 0x0010191e
NOP word ptr [RAX + RAX*0x1]
LAB_001019d0:
ADD R10D,R11D
ADD ECX,0x1
TEST EDX,EDX
JZ 0x001019e0
XOR EDX,EDX
JMP 0x00101978
LAB_001019e0:
IMUL R10D,ESI
ADD R9D,0x1
ADD R14D,R10D
LAB_001019eb:
CMP R9D,0x1
JZ 0x0010246a
LEA EDX,[R9 + -0x1]
XOR ESI,ESI
XOR ECX,ECX
MOV R10D,0x1
LAB_00101a03:
CMP EDX,0x1
JLE 0x00101aa0
LAB_00101a0c:
MOV EDI,EDX
MOV dword ptr [RSP + 0x30],R8D
MOV dword ptr [RSP + 0x2c],R9D
MOV dword ptr [RSP + 0x28],R10D
MOV dword ptr [RSP + 0x24],ECX
MOV dword ptr [RSP + 0x14],ESI
MOV dword ptr [RSP + 0x8],EDX
CALL 0x001011f0
MOV R10D,dword ptr [RSP + 0x28]
MOV ESI,dword ptr [RSP + 0x14]
MOV ECX,dword ptr [RSP + 0x24]
MOV EDX,dword ptr [RSP + 0x8]
IMUL EAX,R10D
MOV R9D,dword ptr [RSP + 0x2c]
MOV R8D,dword ptr [RSP + 0x30]
ADD ECX,0x1
SUB EDX,0x1
ADD ESI,EAX
NOP dword ptr [RAX]
LAB_00101a58:
CMP ECX,0x1
JZ 0x0010245f
MOV EDI,ECX
MOV dword ptr [RSP + 0x2c],R8D
MOV dword ptr [RSP + 0x28],R9D
MOV dword ptr [RSP + 0x24],ESI
MOV dword ptr [RSP + 0x14],EDX
MOV dword ptr [RSP + 0x8],ECX
CALL 0x001011f0
MOV EDX,dword ptr [RSP + 0x14]
MOV ECX,dword ptr [RSP + 0x8]
MOV ESI,dword ptr [RSP + 0x24]
MOV R9D,dword ptr [RSP + 0x28]
MOV R10D,EAX
MOV R8D,dword ptr [RSP + 0x2c]
CMP EDX,0x1
JG 0x00101a0c
LAB_00101aa0:
ADD ESI,R10D
ADD ECX,0x1
TEST EDX,EDX
JZ 0x001018f9
XOR EDX,EDX
JMP 0x00101a58
LAB_00101ab8:
ADD R14D,ESI
TEST R8D,R8D
JZ 0x001016c1
ADD R9D,0x1
XOR R8D,R8D
JMP 0x001019eb
LAB_00101ad0:
ADD R15D,R14D
TEST R12D,R12D
JZ 0x00101254
ADD EBX,0x1
XOR R12D,R12D
JMP 0x001018e1
LAB_00101af0:
ADD dword ptr [RSP + 0x10],R15D
TEST R13D,R13D
JZ 0x00101b05
ADD EBP,0x1
XOR R13D,R13D
JMP 0x001016a9
LAB_00101b05:
MOV EAX,dword ptr [RSP + 0xc]
MOV EDI,dword ptr [RSP + 0x10]
MOV EBP,dword ptr [RSP + 0x20]
ADD dword ptr [RSP + 0x18],0x1
IMUL EAX,EDI
ADD dword ptr [RSP + 0x1c],EAX
CMP dword ptr [RSP + 0x18],0x1
MOV R12D,EBP
JZ 0x00102434
LAB_00101b2b:
MOV EAX,dword ptr [RSP + 0x18]
MOV dword ptr [RSP + 0xc],0x0
XOR R15D,R15D
MOV R13D,0x1
MOV dword ptr [RSP + 0x14],R12D
LEA EBP,[RAX + -0x1]
MOV EAX,EBP
MOV EBP,R15D
MOV R15D,R13D
MOV R13D,EAX
LAB_00101b53:
CMP R13D,0x1
JLE 0x001023f0
MOV dword ptr [RSP + 0x10],R15D
SUB R13D,0x1
XOR EBX,EBX
XOR ESI,ESI
MOV R14D,R13D
MOV R12D,0x1
MOV R9D,EBX
LAB_00101b76:
CMP R14D,0x1
JLE 0x00101f80
SUB R14D,0x1
XOR R11D,R11D
MOV dword ptr [RSP + 0x8],ESI
XOR R10D,R10D
MOV EDX,R14D
MOV R15D,0x1
MOV ESI,R11D
LAB_00101b9a:
CMP EDX,0x1
JLE 0x00101d58
SUB EDX,0x1
XOR R8D,R8D
XOR ECX,ECX
MOV R11D,0x1
MOV EBX,EDX
LAB_00101bb3:
CMP EBX,0x1
JLE 0x00101c68
LAB_00101bbc:
MOV EDI,EBX
MOV dword ptr [RSP + 0x38],EDX
SUB EBX,0x1
MOV dword ptr [RSP + 0x34],R10D
MOV dword ptr [RSP + 0x30],ESI
MOV dword ptr [RSP + 0x2c],R9D
MOV dword ptr [RSP + 0x28],R11D
MOV dword ptr [RSP + 0x24],ECX
MOV dword ptr [RSP + 0x20],R8D
CALL 0x001011f0
MOV R11D,dword ptr [RSP + 0x28]
MOV R8D,dword ptr [RSP + 0x20]
MOV ECX,dword ptr [RSP + 0x24]
MOV R9D,dword ptr [RSP + 0x2c]
IMUL EAX,R11D
MOV ESI,dword ptr [RSP + 0x30]
MOV R10D,dword ptr [RSP + 0x34]
MOV EDX,dword ptr [RSP + 0x38]
ADD ECX,0x1
ADD R8D,EAX
LAB_00101c10:
CMP ECX,0x1
JZ 0x00102454
MOV EDI,ECX
MOV dword ptr [RSP + 0x34],EDX
MOV dword ptr [RSP + 0x30],R10D
MOV dword ptr [RSP + 0x2c],ESI
MOV dword ptr [RSP + 0x28],R9D
MOV dword ptr [RSP + 0x24],R8D
MOV dword ptr [RSP + 0x20],ECX
CALL 0x001011f0
MOV ECX,dword ptr [RSP + 0x20]
MOV R8D,dword ptr [RSP + 0x24]
MOV R9D,dword ptr [RSP + 0x28]
MOV ESI,dword ptr [RSP + 0x2c]
MOV R11D,EAX
MOV R10D,dword ptr [RSP + 0x30]
MOV EDX,dword ptr [RSP + 0x34]
CMP EBX,0x1
JG 0x00101bbc
NOP word ptr [RAX + RAX*0x1]
LAB_00101c68:
ADD R8D,R11D
ADD ECX,0x1
TEST EBX,EBX
JZ 0x00101c80
XOR EBX,EBX
JMP 0x00101c10
LAB_00101c80:
IMUL R8D,R15D
ADD ESI,0x1
ADD R10D,R8D
LAB_00101c8a:
CMP ESI,0x1
JZ 0x00102590
LEA EBX,[RSI + -0x1]
XOR R15D,R15D
XOR ECX,ECX
MOV R8D,0x1
LAB_00101ca1:
CMP EBX,0x1
JLE 0x00101d40
LAB_00101caa:
MOV EDI,EBX
MOV dword ptr [RSP + 0x34],R10D
SUB EBX,0x1
MOV dword ptr [RSP + 0x30],ESI
MOV dword ptr [RSP + 0x2c],EDX
MOV dword ptr [RSP + 0x28],R9D
MOV dword ptr [RSP + 0x24],R8D
MOV dword ptr [RSP + 0x20],ECX
CALL 0x001011f0
MOV R8D,dword ptr [RSP + 0x24]
MOV ECX,dword ptr [RSP + 0x20]
MOV R9D,dword ptr [RSP + 0x28]
MOV EDX,dword ptr [RSP + 0x2c]
IMUL EAX,R8D
MOV ESI,dword ptr [RSP + 0x30]
MOV R10D,dword ptr [RSP + 0x34]
ADD ECX,0x1
ADD R15D,EAX
NOP dword ptr [RAX]
LAB_00101cf8:
CMP ECX,0x1
JZ 0x00102585
MOV EDI,ECX
MOV dword ptr [RSP + 0x30],R10D
MOV dword ptr [RSP + 0x2c],ESI
MOV dword ptr [RSP + 0x28],EDX
MOV dword ptr [RSP + 0x24],R9D
MOV dword ptr [RSP + 0x20],ECX
CALL 0x001011f0
MOV ECX,dword ptr [RSP + 0x20]
MOV R9D,dword ptr [RSP + 0x24]
MOV EDX,dword ptr [RSP + 0x28]
MOV ESI,dword ptr [RSP + 0x2c]
MOV R8D,EAX
MOV R10D,dword ptr [RSP + 0x30]
CMP EBX,0x1
JG 0x00101caa
LAB_00101d40:
ADD R15D,R8D
ADD ECX,0x1
TEST EBX,EBX
JZ 0x00101b9a
XOR EBX,EBX
JMP 0x00101cf8
LAB_00101d58:
ADD R10D,R15D
TEST EDX,EDX
JZ 0x00101d70
ADD ESI,0x1
XOR EDX,EDX
JMP 0x00101c8a
LAB_00101d70:
IMUL R10D,R12D
MOV ESI,dword ptr [RSP + 0x8]
ADD ESI,0x1
ADD R9D,R10D
LAB_00101d7e:
CMP ESI,0x1
JZ 0x0010257a
LEA R10D,[RSI + -0x1]
XOR R11D,R11D
XOR R12D,R12D
MOV R15D,0x1
LAB_00101d97:
CMP R10D,0x1
JLE 0x00101f68
LEA ECX,[R10 + -0x1]
XOR R8D,R8D
XOR EDX,EDX
MOV R10D,0x1
MOV EBX,ECX
LAB_00101db2:
CMP EBX,0x1
JLE 0x00101e68
LAB_00101dbb:
MOV EDI,EBX
MOV dword ptr [RSP + 0x34],ECX
SUB EBX,0x1
MOV dword ptr [RSP + 0x30],R11D
MOV dword ptr [RSP + 0x2c],ESI
MOV dword ptr [RSP + 0x28],R9D
MOV dword ptr [RSP + 0x24],R10D
MOV dword ptr [RSP + 0x20],EDX
MOV dword ptr [RSP + 0x8],R8D
CALL 0x001011f0
MOV R10D,dword ptr [RSP + 0x24]
MOV R8D,dword ptr [RSP + 0x8]
MOV EDX,dword ptr [RSP + 0x20]
MOV R9D,dword ptr [RSP + 0x28]
IMUL EAX,R10D
MOV ESI,dword ptr [RSP + 0x2c]
MOV R11D,dword ptr [RSP + 0x30]
MOV ECX,dword ptr [RSP + 0x34]
ADD EDX,0x1
ADD R8D,EAX
NOP
LAB_00101e10:
CMP EDX,0x1
JZ 0x0010256f
MOV EDI,EDX
MOV dword ptr [RSP + 0x30],ECX
MOV dword ptr [RSP + 0x2c],R11D
MOV dword ptr [RSP + 0x28],ESI
MOV dword ptr [RSP + 0x24],R9D
MOV dword ptr [RSP + 0x20],R8D
MOV dword ptr [RSP + 0x8],EDX
CALL 0x001011f0
MOV EDX,dword ptr [RSP + 0x8]
MOV R8D,dword ptr [RSP + 0x20]
MOV R9D,dword ptr [RSP + 0x24]
MOV ESI,dword ptr [RSP + 0x28]
MOV R10D,EAX
MOV R11D,dword ptr [RSP + 0x2c]
MOV ECX,dword ptr [RSP + 0x30]
CMP EBX,0x1
JG 0x00101dbb
NOP word ptr [RAX + RAX*0x1]
LAB_00101e68:
ADD R8D,R10D
ADD EDX,0x1
TEST EBX,EBX
JZ 0x00101e80
XOR EBX,EBX
JMP 0x00101e10
LAB_00101e80:
IMUL R8D,R15D
ADD R11D,0x1
MOV R10D,ECX
ADD R12D,R8D
LAB_00101e8e:
CMP R11D,0x1
JZ 0x00102564
LEA EBX,[R11 + -0x1]
XOR EDX,EDX
XOR R15D,R15D
MOV R8D,0x1
LAB_00101ea7:
CMP EBX,0x1
JLE 0x00101f50
LAB_00101eb0:
MOV EDI,EBX
MOV dword ptr [RSP + 0x30],R11D
SUB EBX,0x1
MOV dword ptr [RSP + 0x2c],ESI
MOV dword ptr [RSP + 0x28],R9D
MOV dword ptr [RSP + 0x24],R10D
MOV dword ptr [RSP + 0x20],R8D
MOV dword ptr [RSP + 0x8],EDX
CALL 0x001011f0
MOV R8D,dword ptr [RSP + 0x20]
MOV EDX,dword ptr [RSP + 0x8]
MOV R10D,dword ptr [RSP + 0x24]
MOV R9D,dword ptr [RSP + 0x28]
IMUL EAX,R8D
MOV ESI,dword ptr [RSP + 0x2c]
MOV R11D,dword ptr [RSP + 0x30]
ADD EDX,0x1
ADD R15D,EAX
NOP dword ptr [RAX]
LAB_00101f00:
CMP EDX,0x1
JZ 0x00102559
MOV EDI,EDX
MOV dword ptr [RSP + 0x2c],R11D
MOV dword ptr [RSP + 0x28],ESI
MOV dword ptr [RSP + 0x24],R9D
MOV dword ptr [RSP + 0x20],R10D
MOV dword ptr [RSP + 0x8],EDX
CALL 0x001011f0
MOV EDX,dword ptr [RSP + 0x8]
MOV R10D,dword ptr [RSP + 0x20]
MOV R9D,dword ptr [RSP + 0x24]
MOV ESI,dword ptr [RSP + 0x28]
MOV R8D,EAX
MOV R11D,dword ptr [RSP + 0x2c]
CMP EBX,0x1
JG 0x00101eb0
NOP word ptr [RAX + RAX*0x1]
LAB_00101f50:
ADD R15D,R8D
ADD EDX,0x1
TEST EBX,EBX
JZ 0x00101d97
XOR EBX,EBX
JMP 0x00101f00
LAB_00101f68:
ADD R12D,R15D
TEST R10D,R10D
JZ 0x00101b76
ADD R11D,0x1
XOR R10D,R10D
JMP 0x00101e8e
LAB_00101f80:
ADD R9D,R12D
TEST R14D,R14D
JZ 0x00101f98
ADD ESI,0x1
XOR R14D,R14D
JMP 0x00101d7e
LAB_00101f98:
MOV R15D,dword ptr [RSP + 0x10]
ADD EBP,0x1
IMUL R15D,R9D
ADD dword ptr [RSP + 0xc],R15D
LAB_00101fa9:
CMP EBP,0x1
JZ 0x0010254e
LEA EBX,[RBP + -0x1]
XOR R15D,R15D
XOR R12D,R12D
MOV R14D,0x1
LAB_00101fc1:
CMP EBX,0x1
JLE 0x001023d0
LEA EDX,[RBX + -0x1]
XOR R9D,R9D
XOR R8D,R8D
MOV EBX,0x1
MOV dword ptr [RSP + 0x8],EDX
MOV R10D,EDX
LAB_00101fdf:
CMP R10D,0x1
JLE 0x001021b8
LEA EDX,[R10 + -0x1]
XOR ESI,ESI
XOR R11D,R11D
MOV R10D,0x1
MOV ECX,EDX
LAB_00101ffa:
CMP ECX,0x1
JLE 0x001020b8
LAB_00102003:
MOV EDI,ECX
MOV dword ptr [RSP + 0x34],EDX
MOV dword ptr [RSP + 0x30],R9D
MOV dword ptr [RSP + 0x2c],R8D
MOV dword ptr [RSP + 0x28],R10D
MOV dword ptr [RSP + 0x24],ESI
MOV dword ptr [RSP + 0x20],R11D
MOV dword ptr [RSP + 0x10],ECX
CALL 0x001011f0
MOV R10D,dword ptr [RSP + 0x28]
MOV R11D,dword ptr [RSP + 0x20]
MOV ESI,dword ptr [RSP + 0x24]
MOV ECX,dword ptr [RSP + 0x10]
IMUL EAX,R10D
MOV R8D,dword ptr [RSP + 0x2c]
MOV R9D,dword ptr [RSP + 0x30]
MOV EDX,dword ptr [RSP + 0x34]
ADD ESI,0x1
SUB ECX,0x1
ADD R11D,EAX
NOP word ptr [RAX + RAX*0x1]
LAB_00102060:
CMP ESI,0x1
JZ 0x00102543
MOV EDI,ESI
MOV dword ptr [RSP + 0x30],EDX
MOV dword ptr [RSP + 0x2c],R9D
MOV dword ptr [RSP + 0x28],R8D
MOV dword ptr [RSP + 0x24],R11D
MOV dword ptr [RSP + 0x20],ECX
MOV dword ptr [RSP + 0x10],ESI
CALL 0x001011f0
MOV ECX,dword ptr [RSP + 0x20]
MOV ESI,dword ptr [RSP + 0x10]
MOV R11D,dword ptr [RSP + 0x24]
MOV R8D,dword ptr [RSP + 0x28]
MOV R10D,EAX
MOV R9D,dword ptr [RSP + 0x2c]
MOV EDX,dword ptr [RSP + 0x30]
CMP ECX,0x1
JG 0x00102003
NOP word ptr [RAX + RAX*0x1]
LAB_001020b8:
ADD R11D,R10D
ADD ESI,0x1
TEST ECX,ECX
JZ 0x001020d0
XOR ECX,ECX
JMP 0x00102060
LAB_001020d0:
IMUL R11D,EBX
ADD R9D,0x1
MOV R10D,EDX
ADD R8D,R11D
LAB_001020de:
CMP R9D,0x1
JZ 0x00102539
LEA ECX,[R9 + -0x1]
XOR EBX,EBX
XOR ESI,ESI
MOV R11D,0x1
LAB_001020f6:
CMP ECX,0x1
JLE 0x001021a0
LAB_001020ff:
MOV EDI,ECX
MOV dword ptr [RSP + 0x30],R9D
MOV dword ptr [RSP + 0x2c],R8D
MOV dword ptr [RSP + 0x28],R10D
MOV dword ptr [RSP + 0x24],R11D
MOV dword ptr [RSP + 0x20],ESI
MOV dword ptr [RSP + 0x10],ECX
CALL 0x001011f0
MOV R11D,dword ptr [RSP + 0x24]
MOV ESI,dword ptr [RSP + 0x20]
MOV ECX,dword ptr [RSP + 0x10]
MOV R10D,dword ptr [RSP + 0x28]
IMUL EAX,R11D
MOV R8D,dword ptr [RSP + 0x2c]
MOV R9D,dword ptr [RSP + 0x30]
ADD ESI,0x1
SUB ECX,0x1
ADD EBX,EAX
NOP word ptr [RAX + RAX*0x1]
LAB_00102150:
CMP ESI,0x1
JZ 0x0010252e
MOV EDI,ESI
MOV dword ptr [RSP + 0x2c],R9D
MOV dword ptr [RSP + 0x28],R8D
MOV dword ptr [RSP + 0x24],R10D
MOV dword ptr [RSP + 0x20],ECX
MOV dword ptr [RSP + 0x10],ESI
CALL 0x001011f0
MOV ECX,dword ptr [RSP + 0x20]
MOV ESI,dword ptr [RSP + 0x10]
MOV R10D,dword ptr [RSP + 0x24]
MOV R8D,dword ptr [RSP + 0x28]
MOV R11D,EAX
MOV R9D,dword ptr [RSP + 0x2c]
CMP ECX,0x1
JG 0x001020ff
NOP word ptr [RAX + RAX*0x1]
LAB_001021a0:
ADD EBX,R11D
ADD ESI,0x1
TEST ECX,ECX
JZ 0x00101fdf
XOR ECX,ECX
JMP 0x00102150
LAB_001021b8:
ADD R8D,EBX
TEST R10D,R10D
JZ 0x001021d0
ADD R9D,0x1
XOR R10D,R10D
JMP 0x001020de
LAB_001021d0:
IMUL R8D,R14D
MOV EDX,dword ptr [RSP + 0x8]
ADD R12D,0x1
MOV EBX,EDX
ADD R15D,R8D
LAB_001021e1:
CMP R12D,0x1
JZ 0x00102523
LEA R8D,[R12 + -0x1]
XOR R14D,R14D
XOR R9D,R9D
MOV ESI,0x1
LAB_001021fb:
CMP R8D,0x1
JLE 0x001023b8
SUB R8D,0x1
XOR R10D,R10D
XOR ECX,ECX
MOV R11D,0x1
MOV EDX,R8D
LAB_00102217:
CMP EDX,0x1
JLE 0x001022d0
LAB_00102220:
MOV EDI,EDX
MOV dword ptr [RSP + 0x30],R8D
MOV dword ptr [RSP + 0x2c],R9D
MOV dword ptr [RSP + 0x28],R11D
MOV dword ptr [RSP + 0x24],ECX
MOV dword ptr [RSP + 0x20],R10D
MOV dword ptr [RSP + 0x10],ESI
MOV dword ptr [RSP + 0x8],EDX
CALL 0x001011f0
MOV R11D,dword ptr [RSP + 0x28]
MOV R10D,dword ptr [RSP + 0x20]
MOV ECX,dword ptr [RSP + 0x24]
MOV EDX,dword ptr [RSP + 0x8]
IMUL EAX,R11D
MOV ESI,dword ptr [RSP + 0x10]
MOV R9D,dword ptr [RSP + 0x2c]
MOV R8D,dword ptr [RSP + 0x30]
ADD ECX,0x1
SUB EDX,0x1
ADD R10D,EAX
NOP dword ptr [RAX]
LAB_00102278:
CMP ECX,0x1
JZ 0x00102518
MOV EDI,ECX
MOV dword ptr [RSP + 0x2c],R8D
MOV dword ptr [RSP + 0x28],R9D
MOV dword ptr [RSP + 0x24],R10D
MOV dword ptr [RSP + 0x20],ESI
MOV dword ptr [RSP + 0x10],EDX
MOV dword ptr [RSP + 0x8],ECX
CALL 0x001011f0
MOV EDX,dword ptr [RSP + 0x10]
MOV ECX,dword ptr [RSP + 0x8]
MOV ESI,dword ptr [RSP + 0x20]
MOV R10D,dword ptr [RSP + 0x24]
MOV R11D,EAX
MOV R9D,dword ptr [RSP + 0x28]
MOV R8D,dword ptr [RSP + 0x2c]
CMP EDX,0x1
JG 0x00102220
NOP word ptr [RAX + RAX*0x1]
LAB_001022d0:
ADD R10D,R11D
ADD ECX,0x1
TEST EDX,EDX
JZ 0x001022e0
XOR EDX,EDX
JMP 0x00102278
LAB_001022e0:
IMUL R10D,ESI
ADD R9D,0x1
ADD R14D,R10D
LAB_001022eb:
CMP R9D,0x1
JZ 0x0010250e
LEA EDX,[R9 + -0x1]
XOR ECX,ECX
XOR ESI,ESI
MOV R10D,0x1
LAB_00102303:
CMP EDX,0x1
JLE 0x001023a0
LAB_0010230c:
MOV EDI,EDX
MOV dword ptr [RSP + 0x2c],R9D
MOV dword ptr [RSP + 0x28],R8D
MOV dword ptr [RSP + 0x24],R10D
MOV dword ptr [RSP + 0x20],ECX
MOV dword ptr [RSP + 0x10],ESI
MOV dword ptr [RSP + 0x8],EDX
CALL 0x001011f0
MOV R10D,dword ptr [RSP + 0x24]
MOV ESI,dword ptr [RSP + 0x10]
MOV ECX,dword ptr [RSP + 0x20]
MOV EDX,dword ptr [RSP + 0x8]
IMUL EAX,R10D
MOV R8D,dword ptr [RSP + 0x28]
MOV R9D,dword ptr [RSP + 0x2c]
ADD ECX,0x1
SUB EDX,0x1
ADD ESI,EAX
NOP dword ptr [RAX]
LAB_00102358:
CMP ECX,0x1
JZ 0x00102503
MOV EDI,ECX
MOV dword ptr [RSP + 0x28],R9D
MOV dword ptr [RSP + 0x24],R8D
MOV dword ptr [RSP + 0x20],EDX
MOV dword ptr [RSP + 0x10],ESI
MOV dword ptr [RSP + 0x8],ECX
CALL 0x001011f0
MOV EDX,dword ptr [RSP + 0x20]
MOV ECX,dword ptr [RSP + 0x8]
MOV ESI,dword ptr [RSP + 0x10]
MOV R8D,dword ptr [RSP + 0x24]
MOV R10D,EAX
MOV R9D,dword ptr [RSP + 0x28]
CMP EDX,0x1
JG 0x0010230c
LAB_001023a0:
ADD ESI,R10D
ADD ECX,0x1
TEST EDX,EDX
JZ 0x001021fb
XOR EDX,EDX
JMP 0x00102358
LAB_001023b8:
ADD R14D,ESI
TEST R8D,R8D
JZ 0x00101fc1
ADD R9D,0x1
XOR R8D,R8D
JMP 0x001022eb
LAB_001023d0:
ADD R15D,R14D
TEST EBX,EBX
JZ 0x00101b53
ADD R12D,0x1
XOR EBX,EBX
JMP 0x001021e1
LAB_001023f0:
ADD dword ptr [RSP + 0xc],R15D
TEST R13D,R13D
JZ 0x00102405
ADD EBP,0x1
XOR R13D,R13D
JMP 0x00101fa9
LAB_00102405:
MOV R12D,dword ptr [RSP + 0x14]
CMP R12D,0x1
JG 0x0010122e
LAB_00102414:
MOV EDI,dword ptr [RSP + 0xc]
ADD dword ptr [RSP + 0x1c],EDI
TEST R12D,R12D
JZ 0x00102441
ADD dword ptr [RSP + 0x18],0x1
XOR R12D,R12D
CMP dword ptr [RSP + 0x18],0x1
JNZ 0x00101b2b
LAB_00102434:
MOV dword ptr [RSP + 0xc],0x1
JMP 0x00101224
LAB_00102441:
MOV EAX,dword ptr [RSP + 0x1c]
ADD RSP,0x48
POP RBX
POP RBP
POP R12
POP R13
POP R14
POP R15
RET
LAB_00102454:
MOV R11D,0x1
JMP 0x00101bb3
LAB_0010245f:
MOV R10D,0x1
JMP 0x00101a03
LAB_0010246a:
MOV ESI,0x1
JMP 0x001018f9
LAB_00102474:
MOV R11D,0x1
JMP 0x00101915
LAB_0010247f:
MOV R14D,0x1
JMP 0x001016c1
LAB_0010248a:
MOV R11D,0x1
JMP 0x001017f7
LAB_00102495:
MOV R12D,0x1
JMP 0x001016e3
LAB_001024a0:
MOV R10D,0x1
JMP 0x001016fe
LAB_001024ab:
MOV R15D,0x1
JMP 0x00101254
LAB_001024b6:
MOV R8D,0x1
JMP 0x001015a7
LAB_001024c1:
MOV R15D,0x1
JMP 0x00101497
LAB_001024cc:
MOV R10D,0x1
JMP 0x001014b2
LAB_001024d7:
MOV R12D,0x1
JMP 0x00101277
LAB_001024e2:
MOV R8D,0x1
JMP 0x001013a1
LAB_001024ed:
MOV R15D,0x1
JMP 0x0010129b
LAB_001024f8:
MOV R11D,0x1
JMP 0x001012b4
LAB_00102503:
MOV R10D,0x1
JMP 0x00102303
LAB_0010250e:
MOV ESI,0x1
JMP 0x001021fb
LAB_00102518:
MOV R11D,0x1
JMP 0x00102217
LAB_00102523:
MOV R14D,0x1
JMP 0x00101fc1
LAB_0010252e:
MOV R11D,0x1
JMP 0x001020f6
LAB_00102539:
MOV EBX,0x1
JMP 0x00101fdf
LAB_00102543:
MOV R10D,0x1
JMP 0x00101ffa
LAB_0010254e:
MOV R15D,0x1
JMP 0x00101b53
LAB_00102559:
MOV R8D,0x1
JMP 0x00101ea7
LAB_00102564:
MOV R15D,0x1
JMP 0x00101d97
LAB_0010256f:
MOV R10D,0x1
JMP 0x00101db2
LAB_0010257a:
MOV R12D,0x1
JMP 0x00101b76
LAB_00102585:
MOV R8D,0x1
JMP 0x00101ca1
LAB_00102590:
MOV R15D,0x1
JMP 0x00101b9a | /* func0(int) [clone .part.0] */
int func0(int param_1)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
int iVar6;
int iVar7;
int iVar8;
int iVar9;
int iVar10;
int iVar11;
int iVar12;
int iVar13;
int iVar14;
int iVar15;
int iVar16;
int iVar17;
bool bVar18;
int local_6c;
int local_68;
int local_60;
int local_5c;
local_5c = 0;
if (param_1 < 1) {
return 0;
}
local_60 = 0;
iVar6 = param_1 + -1;
LAB_00101224:
local_6c = 1;
if (iVar6 < 2) goto LAB_00102414;
LAB_0010122e:
iVar6 = iVar6 + -1;
local_68 = 0;
iVar17 = 1;
iVar5 = 0;
iVar14 = iVar6;
LAB_00101254:
if (1 < iVar14) {
iVar14 = iVar14 + -1;
iVar7 = 0;
iVar13 = 1;
iVar15 = iVar14;
iVar12 = 0;
LAB_00101277:
if (iVar15 < 2) {
iVar7 = iVar7 + iVar13;
if (iVar15 == 0) goto LAB_00101698;
iVar15 = 0;
}
else {
iVar15 = iVar15 + -1;
iVar11 = 0;
iVar16 = 1;
iVar4 = iVar15;
iVar9 = 0;
LAB_0010129b:
if (1 < iVar4) {
iVar4 = iVar4 + -1;
iVar3 = 0;
iVar10 = 0;
iVar8 = iVar4;
LAB_001012b4:
iVar2 = 1;
iVar1 = iVar8;
if (iVar8 < 2) goto LAB_00101370;
do {
iVar8 = iVar1 + -1;
iVar1 = func0(iVar1);
iVar10 = iVar10 + iVar1 * iVar2;
while( true ) {
iVar3 = iVar3 + 1;
if (iVar3 == 1) goto LAB_001012b4;
iVar2 = func0(iVar3);
iVar1 = iVar8;
if (1 < iVar8) break;
LAB_00101370:
iVar10 = iVar10 + iVar2;
if (iVar8 == 0) {
iVar11 = iVar11 + iVar10 * iVar16;
goto LAB_0010138a;
}
iVar8 = 0;
}
} while( true );
}
iVar11 = iVar11 + iVar16;
if (iVar4 != 0) {
iVar4 = 0;
LAB_0010138a:
iVar8 = iVar9 + 1;
if (iVar8 != 1) {
iVar16 = 0;
iVar3 = 0;
LAB_001013a1:
iVar1 = 1;
iVar10 = iVar9;
if (iVar9 < 2) goto LAB_00101440;
do {
iVar9 = iVar10 + -1;
iVar10 = func0(iVar10);
iVar16 = iVar16 + iVar10 * iVar1;
while( true ) {
iVar3 = iVar3 + 1;
if (iVar3 == 1) goto LAB_001013a1;
iVar1 = func0(iVar3);
iVar10 = iVar9;
if (1 < iVar9) break;
LAB_00101440:
iVar16 = iVar16 + iVar1;
bVar18 = iVar9 == 0;
iVar9 = iVar8;
if (bVar18) goto LAB_0010129b;
iVar9 = 0;
}
} while( true );
}
iVar16 = 1;
iVar9 = iVar8;
goto LAB_0010129b;
}
iVar7 = iVar7 + iVar11 * iVar13;
}
iVar4 = iVar12 + 1;
if (iVar4 == 1) {
iVar13 = 1;
iVar12 = iVar4;
}
else {
iVar13 = 0;
iVar11 = 1;
iVar9 = 0;
LAB_00101497:
if (1 < iVar12) {
iVar12 = iVar12 + -1;
iVar3 = 0;
iVar8 = 0;
iVar16 = iVar12;
LAB_001014b2:
iVar1 = 1;
iVar10 = iVar16;
if (iVar16 < 2) goto LAB_00101568;
do {
iVar16 = iVar10 + -1;
iVar10 = func0(iVar10);
iVar3 = iVar3 + iVar10 * iVar1;
while( true ) {
iVar8 = iVar8 + 1;
if (iVar8 == 1) goto LAB_001014b2;
iVar1 = func0(iVar8);
iVar10 = iVar16;
if (1 < iVar16) break;
LAB_00101568:
iVar3 = iVar3 + iVar1;
if (iVar16 == 0) {
iVar13 = iVar13 + iVar3 * iVar11;
goto LAB_0010158e;
}
iVar16 = 0;
}
} while( true );
}
iVar13 = iVar13 + iVar11;
bVar18 = iVar12 != 0;
iVar12 = iVar4;
if (bVar18) {
iVar12 = 0;
LAB_0010158e:
iVar16 = iVar9 + 1;
if (iVar16 != 1) {
iVar8 = 0;
iVar11 = 0;
LAB_001015a7:
iVar10 = 1;
iVar3 = iVar9;
if (iVar9 < 2) goto LAB_00101650;
do {
iVar9 = iVar3 + -1;
iVar3 = func0(iVar3);
iVar11 = iVar11 + iVar3 * iVar10;
while( true ) {
iVar8 = iVar8 + 1;
if (iVar8 == 1) goto LAB_001015a7;
iVar10 = func0(iVar8);
iVar3 = iVar9;
if (1 < iVar9) break;
LAB_00101650:
iVar11 = iVar11 + iVar10;
bVar18 = iVar9 == 0;
iVar9 = iVar16;
if (bVar18) goto LAB_00101497;
iVar9 = 0;
}
} while( true );
}
iVar11 = 1;
iVar9 = iVar16;
goto LAB_00101497;
}
}
goto LAB_00101277;
}
local_68 = local_68 + iVar17;
if (iVar14 != 0) {
iVar14 = 0;
goto LAB_001016a9;
}
local_5c = local_5c + local_6c * local_68;
iVar5 = local_60;
do {
local_60 = iVar5 + 1;
if (local_60 == 1) goto LAB_00101224;
local_6c = 0;
iVar17 = 1;
iVar14 = 0;
LAB_00101b53:
if (1 < iVar5) {
iVar5 = iVar5 + -1;
iVar7 = 0;
iVar13 = 1;
iVar12 = 0;
iVar15 = iVar5;
LAB_00101b76:
if (iVar15 < 2) {
iVar7 = iVar7 + iVar13;
if (iVar15 == 0) goto LAB_00101f98;
iVar15 = 0;
}
else {
iVar15 = iVar15 + -1;
iVar11 = 0;
iVar16 = 1;
iVar4 = iVar15;
iVar9 = 0;
LAB_00101b9a:
if (1 < iVar4) {
iVar4 = iVar4 + -1;
iVar10 = 0;
iVar3 = 0;
iVar8 = iVar4;
LAB_00101bb3:
iVar2 = 1;
iVar1 = iVar8;
if (iVar8 < 2) goto LAB_00101c68;
do {
iVar8 = iVar1 + -1;
iVar1 = func0(iVar1);
iVar10 = iVar10 + iVar1 * iVar2;
while( true ) {
iVar3 = iVar3 + 1;
if (iVar3 == 1) goto LAB_00101bb3;
iVar2 = func0(iVar3);
iVar1 = iVar8;
if (1 < iVar8) break;
LAB_00101c68:
iVar10 = iVar10 + iVar2;
if (iVar8 == 0) {
iVar11 = iVar11 + iVar10 * iVar16;
goto LAB_00101c8a;
}
iVar8 = 0;
}
} while( true );
}
iVar11 = iVar11 + iVar16;
if (iVar4 != 0) {
iVar4 = 0;
LAB_00101c8a:
iVar8 = iVar9 + 1;
if (iVar8 != 1) {
iVar16 = 0;
iVar3 = 0;
LAB_00101ca1:
iVar1 = 1;
iVar10 = iVar9;
if (iVar9 < 2) goto LAB_00101d40;
do {
iVar9 = iVar10 + -1;
iVar10 = func0(iVar10);
iVar16 = iVar16 + iVar10 * iVar1;
while( true ) {
iVar3 = iVar3 + 1;
if (iVar3 == 1) goto LAB_00101ca1;
iVar1 = func0(iVar3);
iVar10 = iVar9;
if (1 < iVar9) break;
LAB_00101d40:
iVar16 = iVar16 + iVar1;
bVar18 = iVar9 == 0;
iVar9 = iVar8;
if (bVar18) goto LAB_00101b9a;
iVar9 = 0;
}
} while( true );
}
iVar16 = 1;
iVar9 = iVar8;
goto LAB_00101b9a;
}
iVar7 = iVar7 + iVar11 * iVar13;
}
iVar4 = iVar12 + 1;
if (iVar4 == 1) {
iVar13 = 1;
iVar12 = iVar4;
}
else {
iVar13 = 0;
iVar11 = 1;
iVar9 = 0;
LAB_00101d97:
if (1 < iVar12) {
iVar12 = iVar12 + -1;
iVar3 = 0;
iVar8 = 0;
iVar16 = iVar12;
LAB_00101db2:
iVar1 = 1;
iVar10 = iVar16;
if (iVar16 < 2) goto LAB_00101e68;
do {
iVar16 = iVar10 + -1;
iVar10 = func0(iVar10);
iVar3 = iVar3 + iVar10 * iVar1;
while( true ) {
iVar8 = iVar8 + 1;
if (iVar8 == 1) goto LAB_00101db2;
iVar1 = func0(iVar8);
iVar10 = iVar16;
if (1 < iVar16) break;
LAB_00101e68:
iVar3 = iVar3 + iVar1;
if (iVar16 == 0) {
iVar13 = iVar13 + iVar3 * iVar11;
goto LAB_00101e8e;
}
iVar16 = 0;
}
} while( true );
}
iVar13 = iVar13 + iVar11;
bVar18 = iVar12 != 0;
iVar12 = iVar4;
if (bVar18) {
iVar12 = 0;
LAB_00101e8e:
iVar16 = iVar9 + 1;
if (iVar16 != 1) {
iVar8 = 0;
iVar11 = 0;
LAB_00101ea7:
iVar10 = 1;
iVar3 = iVar9;
if (iVar9 < 2) goto LAB_00101f50;
do {
iVar9 = iVar3 + -1;
iVar3 = func0(iVar3);
iVar11 = iVar11 + iVar3 * iVar10;
while( true ) {
iVar8 = iVar8 + 1;
if (iVar8 == 1) goto LAB_00101ea7;
iVar10 = func0(iVar8);
iVar3 = iVar9;
if (1 < iVar9) break;
LAB_00101f50:
iVar11 = iVar11 + iVar10;
bVar18 = iVar9 == 0;
iVar9 = iVar16;
if (bVar18) goto LAB_00101d97;
iVar9 = 0;
}
} while( true );
}
iVar11 = 1;
iVar9 = iVar16;
goto LAB_00101d97;
}
}
goto LAB_00101b76;
}
local_6c = local_6c + iVar17;
if (iVar5 != 0) {
iVar5 = 0;
goto LAB_00101fa9;
}
if (1 < iVar6) goto LAB_0010122e;
LAB_00102414:
local_5c = local_5c + local_6c;
if (iVar6 == 0) {
return local_5c;
}
iVar6 = 0;
iVar5 = local_60;
} while( true );
LAB_00101698:
local_68 = local_68 + iVar17 * iVar7;
LAB_001016a9:
iVar12 = iVar5 + 1;
if (iVar12 != 1) {
iVar17 = 0;
iVar7 = 1;
iVar15 = 0;
LAB_001016c1:
if (iVar5 < 2) {
iVar17 = iVar17 + iVar7;
bVar18 = iVar5 == 0;
iVar5 = iVar12;
if (bVar18) goto LAB_00101254;
iVar5 = 0;
}
else {
iVar5 = iVar5 + -1;
iVar9 = 0;
iVar11 = 1;
iVar4 = 0;
iVar13 = iVar5;
LAB_001016e3:
if (1 < iVar13) {
iVar13 = iVar13 + -1;
iVar3 = 0;
iVar8 = 0;
iVar16 = iVar13;
LAB_001016fe:
iVar10 = 1;
if (iVar16 < 2) goto LAB_001017b8;
do {
iVar1 = func0(iVar16);
iVar16 = iVar16 + -1;
iVar3 = iVar3 + iVar1 * iVar10;
while( true ) {
iVar8 = iVar8 + 1;
if (iVar8 == 1) goto LAB_001016fe;
iVar10 = func0(iVar8);
if (1 < iVar16) break;
LAB_001017b8:
iVar3 = iVar3 + iVar10;
if (iVar16 == 0) {
iVar9 = iVar9 + iVar3 * iVar11;
goto LAB_001017de;
}
iVar16 = 0;
}
} while( true );
}
iVar9 = iVar9 + iVar11;
if (iVar13 != 0) {
iVar13 = 0;
LAB_001017de:
iVar16 = iVar4 + 1;
if (iVar16 != 1) {
iVar11 = 0;
iVar8 = 0;
LAB_001017f7:
iVar3 = 1;
if (iVar4 < 2) goto LAB_001018a0;
do {
iVar10 = func0(iVar4);
iVar4 = iVar4 + -1;
iVar11 = iVar11 + iVar10 * iVar3;
while( true ) {
iVar8 = iVar8 + 1;
if (iVar8 == 1) goto LAB_001017f7;
iVar3 = func0(iVar8);
if (1 < iVar4) break;
LAB_001018a0:
iVar11 = iVar11 + iVar3;
bVar18 = iVar4 == 0;
iVar4 = iVar16;
if (bVar18) goto LAB_001016e3;
iVar4 = 0;
}
} while( true );
}
iVar11 = 1;
iVar4 = iVar16;
goto LAB_001016e3;
}
iVar17 = iVar17 + iVar9 * iVar7;
}
iVar13 = iVar15 + 1;
if (iVar13 == 1) {
iVar7 = 1;
iVar15 = iVar13;
}
else {
iVar7 = 0;
iVar9 = 1;
iVar4 = 0;
LAB_001018f9:
if (1 < iVar15) {
iVar15 = iVar15 + -1;
iVar8 = 0;
iVar16 = 0;
iVar11 = iVar15;
LAB_00101915:
iVar3 = 1;
if (iVar11 < 2) goto LAB_001019d0;
do {
iVar10 = func0(iVar11);
iVar11 = iVar11 + -1;
iVar8 = iVar8 + iVar10 * iVar3;
while( true ) {
iVar16 = iVar16 + 1;
if (iVar16 == 1) goto LAB_00101915;
iVar3 = func0(iVar16);
if (1 < iVar11) break;
LAB_001019d0:
iVar8 = iVar8 + iVar3;
if (iVar11 == 0) {
iVar7 = iVar7 + iVar8 * iVar9;
goto LAB_001019eb;
}
iVar11 = 0;
}
} while( true );
}
iVar7 = iVar7 + iVar9;
bVar18 = iVar15 != 0;
iVar15 = iVar13;
if (bVar18) {
iVar15 = 0;
LAB_001019eb:
iVar11 = iVar4 + 1;
if (iVar11 != 1) {
iVar9 = 0;
iVar16 = 0;
LAB_00101a03:
iVar8 = 1;
if (iVar4 < 2) goto LAB_00101aa0;
do {
iVar3 = func0(iVar4);
iVar4 = iVar4 + -1;
iVar9 = iVar9 + iVar3 * iVar8;
while( true ) {
iVar16 = iVar16 + 1;
if (iVar16 == 1) goto LAB_00101a03;
iVar8 = func0(iVar16);
if (1 < iVar4) break;
LAB_00101aa0:
iVar9 = iVar9 + iVar8;
bVar18 = iVar4 == 0;
iVar4 = iVar11;
if (bVar18) goto LAB_001018f9;
iVar4 = 0;
}
} while( true );
}
iVar9 = 1;
iVar4 = iVar11;
goto LAB_001018f9;
}
}
goto LAB_001016c1;
}
iVar17 = 1;
iVar5 = iVar12;
goto LAB_00101254;
LAB_00101f98:
local_6c = local_6c + iVar17 * iVar7;
LAB_00101fa9:
iVar12 = iVar14 + 1;
if (iVar12 != 1) {
iVar17 = 0;
iVar7 = 1;
iVar15 = 0;
LAB_00101fc1:
if (iVar14 < 2) {
iVar17 = iVar17 + iVar7;
bVar18 = iVar14 == 0;
iVar14 = iVar12;
if (bVar18) goto LAB_00101b53;
iVar14 = 0;
}
else {
iVar14 = iVar14 + -1;
iVar11 = 0;
iVar9 = 1;
iVar4 = 0;
iVar13 = iVar14;
LAB_00101fdf:
if (1 < iVar13) {
iVar13 = iVar13 + -1;
iVar8 = 0;
iVar3 = 0;
iVar16 = iVar13;
LAB_00101ffa:
iVar10 = 1;
if (iVar16 < 2) goto LAB_001020b8;
do {
iVar1 = func0(iVar16);
iVar16 = iVar16 + -1;
iVar3 = iVar3 + iVar1 * iVar10;
while( true ) {
iVar8 = iVar8 + 1;
if (iVar8 == 1) goto LAB_00101ffa;
iVar10 = func0(iVar8);
if (1 < iVar16) break;
LAB_001020b8:
iVar3 = iVar3 + iVar10;
if (iVar16 == 0) {
iVar11 = iVar11 + iVar3 * iVar9;
goto LAB_001020de;
}
iVar16 = 0;
}
} while( true );
}
iVar11 = iVar11 + iVar9;
if (iVar13 != 0) {
iVar13 = 0;
LAB_001020de:
iVar16 = iVar4 + 1;
if (iVar16 != 1) {
iVar9 = 0;
iVar8 = 0;
LAB_001020f6:
iVar3 = 1;
if (iVar4 < 2) goto LAB_001021a0;
do {
iVar10 = func0(iVar4);
iVar4 = iVar4 + -1;
iVar9 = iVar9 + iVar10 * iVar3;
while( true ) {
iVar8 = iVar8 + 1;
if (iVar8 == 1) goto LAB_001020f6;
iVar3 = func0(iVar8);
if (1 < iVar4) break;
LAB_001021a0:
iVar9 = iVar9 + iVar3;
bVar18 = iVar4 == 0;
iVar4 = iVar16;
if (bVar18) goto LAB_00101fdf;
iVar4 = 0;
}
} while( true );
}
iVar9 = 1;
iVar4 = iVar16;
goto LAB_00101fdf;
}
iVar17 = iVar17 + iVar11 * iVar7;
}
iVar13 = iVar15 + 1;
if (iVar13 == 1) {
iVar7 = 1;
iVar15 = iVar13;
}
else {
iVar7 = 0;
iVar9 = 1;
iVar4 = 0;
LAB_001021fb:
if (1 < iVar15) {
iVar15 = iVar15 + -1;
iVar8 = 0;
iVar16 = 0;
iVar11 = iVar15;
LAB_00102217:
iVar3 = 1;
if (iVar11 < 2) goto LAB_001022d0;
do {
iVar10 = func0(iVar11);
iVar11 = iVar11 + -1;
iVar8 = iVar8 + iVar10 * iVar3;
while( true ) {
iVar16 = iVar16 + 1;
if (iVar16 == 1) goto LAB_00102217;
iVar3 = func0(iVar16);
if (1 < iVar11) break;
LAB_001022d0:
iVar8 = iVar8 + iVar3;
if (iVar11 == 0) {
iVar7 = iVar7 + iVar8 * iVar9;
goto LAB_001022eb;
}
iVar11 = 0;
}
} while( true );
}
iVar7 = iVar7 + iVar9;
bVar18 = iVar15 != 0;
iVar15 = iVar13;
if (bVar18) {
iVar15 = 0;
LAB_001022eb:
iVar11 = iVar4 + 1;
if (iVar11 != 1) {
iVar16 = 0;
iVar9 = 0;
LAB_00102303:
iVar8 = 1;
if (iVar4 < 2) goto LAB_001023a0;
do {
iVar3 = func0(iVar4);
iVar4 = iVar4 + -1;
iVar9 = iVar9 + iVar3 * iVar8;
while( true ) {
iVar16 = iVar16 + 1;
if (iVar16 == 1) goto LAB_00102303;
iVar8 = func0(iVar16);
if (1 < iVar4) break;
LAB_001023a0:
iVar9 = iVar9 + iVar8;
bVar18 = iVar4 == 0;
iVar4 = iVar11;
if (bVar18) goto LAB_001021fb;
iVar4 = 0;
}
} while( true );
}
iVar9 = 1;
iVar4 = iVar11;
goto LAB_001021fb;
}
}
goto LAB_00101fc1;
}
iVar17 = 1;
iVar14 = iVar12;
goto LAB_00101b53;
} |
2,331 | func0 | #include <iostream>
#include <assert.h>
| int func0(int num) {
if (num <= 1)
return 1;
int res_num = 0;
for (int i = 0; i < num; ++i) {
res_num += func0(i) * func0(num - i - 1);
}
return res_num;
}
| int main() {
assert(func0(10) == 16796);
assert(func0(9) == 4862);
assert(func0(7) == 429);
return 0;
}
| O3 | cpp | func0(int) [clone .part.0]:
push %r13
xor %r13d,%r13d
push %r12
push %rbp
push %rbx
sub $0x8,%rsp
test %edi,%edi
jle 12c3 <_Z5func0i.part.0+0x53>
lea -0x1(%rdi),%ebx
xor %ebp,%ebp
mov $0x1,%r12d
cmp $0x1,%ebx
jbe 12b9 <_Z5func0i.part.0+0x49>
mov %ebx,%edi
add $0x1,%ebp
callq 1270 <_Z5func0i.part.0>
imul %eax,%r12d
add %r12d,%r13d
cmp $0x1,%ebp
je 12d8 <_Z5func0i.part.0+0x68>
mov %ebp,%edi
callq 1270 <_Z5func0i.part.0>
mov %eax,%r12d
sub $0x1,%ebx
cmp $0x1,%ebx
ja 1291 <_Z5func0i.part.0+0x21>
add %r12d,%r13d
add $0x1,%ebp
test %ebx,%ebx
jne 12a2 <_Z5func0i.part.0+0x32>
add $0x8,%rsp
mov %r13d,%eax
pop %rbx
pop %rbp
pop %r12
pop %r13
retq
nopl 0x0(%rax)
mov $0x1,%r12d
jmp 12b1 <_Z5func0i.part.0+0x41>
| _Z5func0i_part_0:
push r15
push r14
push r13
push r12
push rbp
xor ebp, ebp
push rbx
sub rsp, 48h
test edi, edi
jle loc_2571
xor r12d, r12d
mov [rsp+78h+var_58], 1
lea ebx, [rdi-1]
mov [rsp+78h+var_4C], r12d
mov [rsp+78h+var_48], ebp
loc_121F:
cmp ebx, 1
jle loc_2542
loc_1228:
sub ebx, 1
mov [rsp+78h+var_5C], 0
mov [rsp+78h+var_54], 0
mov r12d, ebx
mov [rsp+78h+var_68], 1
mov [rsp+78h+var_44], ebx
loc_124A:
cmp r12d, 1
jle loc_1B27
loc_1254:
sub r12d, 1
xor r14d, r14d
mov [rsp+78h+var_6C], 0
mov [rsp+78h+var_74], 1
mov ebp, r12d
mov [rsp+78h+var_64], r14d
mov [rsp+78h+var_50], r12d
loc_1278:
cmp ebp, 1
jle loc_162D
loc_1281:
lea eax, [rbp-1]
sub ebp, 2
xor r12d, r12d
mov ebx, 1
mov [rsp+78h+var_60], eax
mov r14d, eax
mov r15d, ebp
mov [rsp+78h+var_70], 0
loc_12A1:
cmp r14d, 1
jle loc_1420
mov edi, r15d
cmp r15d, 1
jle loc_1350
mov edx, r15d
xor ecx, ecx
lea ebp, [r15-1]
xor r13d, r13d
loc_12C4:
mov [rsp+78h+var_3C], ecx
mov [rsp+78h+var_40], edx
call _Z5func0i_part_0; func0(int) [clone]
mov ecx, [rsp+78h+var_3C]
mov edi, 1
mov edx, [rsp+78h+var_40]
add r13d, eax
test r15d, r15d
cmovle edi, r15d
lea eax, [rcx+1]
cmp edi, eax
jge loc_2683
nop dword ptr [rax+rax+00h]
loc_12F8:
cmp r14d, eax
jle short loc_136D
nop dword ptr [rax]
loc_1300:
mov edx, r14d
sub r14d, 1
sub edx, eax
lea r15d, [rdx-1]
loc_130D:
mov edi, r14d
sub edi, r15d
call _Z5func0i_part_0; func0(int) [clone]
cmp r15d, 1
jle short loc_1340
mov edi, r15d
mov [rsp+78h+var_40], eax
sub r15d, 1
call _Z5func0i_part_0; func0(int) [clone]
mov edx, [rsp+78h+var_40]
imul edx, eax
add r13d, edx
jmp short loc_130D
loc_1340:
add r13d, eax
test r15d, r15d
jz short loc_1371
xor r15d, r15d
jmp short loc_130D
loc_1350:
test r15d, r15d
jg loc_1678
mov eax, 1
mov r13d, 1
lea ebp, [r15-1]
cmp r14d, eax
jg short loc_1300
loc_136D:
sub r14d, 1
loc_1371:
mov esi, r13d
add r12d, 1
mov r15d, ebp
imul esi, ebx
add [rsp+78h+var_70], esi
loc_1382:
cmp r12d, 1
jz loc_26DD
lea r13d, [r12-1]
mov edi, r13d
cmp r13d, 1
jz loc_1B58
mov ebp, r13d
xor ebx, ebx
xor edx, edx
loc_13A5:
mov [rsp+78h+var_40], edx
call _Z5func0i_part_0; func0(int) [clone]
mov edx, [rsp+78h+var_40]
add ebx, eax
test edx, edx
jz loc_266B
nop dword ptr [rax+00h]
loc_13C0:
lea ebp, [r12-3]
cmp r12d, 2
jz loc_12A1
loc_13CF:
mov edi, r13d
sub edi, ebp
call _Z5func0i_part_0; func0(int) [clone]
cmp ebp, 1
jle short loc_1408
loc_13DE:
mov edi, ebp
mov [rsp+78h+var_40], eax
sub ebp, 1
call _Z5func0i_part_0; func0(int) [clone]
mov edx, [rsp+78h+var_40]
mov edi, r13d
sub edi, ebp
imul edx, eax
add ebx, edx
call _Z5func0i_part_0; func0(int) [clone]
cmp ebp, 1
jg short loc_13DE
nop dword ptr [rax+00h]
loc_1408:
add ebx, eax
test ebp, ebp
jz loc_12A1
xor ebp, ebp
jmp short loc_13CF
loc_1420:
add [rsp+78h+var_70], ebx
test r14d, r14d
jz short loc_1440
add r12d, 1
sub r15d, 1
xor r14d, r14d
jmp loc_1382
loc_1440:
mov r13d, [rsp+78h+var_74]
mov eax, [rsp+78h+var_70]
add [rsp+78h+var_6C], 1
mov ebp, [rsp+78h+var_60]
imul r13d, eax
add [rsp+78h+var_64], r13d
loc_145B:
cmp [rsp+78h+var_6C], 1
jz loc_26A2
mov eax, [rsp+78h+var_6C]
mov [rsp+78h+var_70], ebp
xor r13d, r13d
mov ebx, 1
mov [rsp+78h+var_74], 0
lea r12d, [rax-2]
lea r14d, [rax-1]
mov ebp, r12d
loc_1489:
cmp r14d, 1
jle loc_1600
mov edi, ebp
cmp ebp, 1
jle loc_1540
mov r8d, ebp
xor r15d, r15d
lea r12d, [rbp-1]
xor edx, edx
loc_14AA:
mov [rsp+78h+var_40], edx
mov [rsp+78h+var_60], r8d
call _Z5func0i_part_0; func0(int) [clone]
mov edx, [rsp+78h+var_40]
mov r8d, [rsp+78h+var_60]
add r15d, eax
test ebp, ebp
lea eax, [rdx+1]
mov edx, 1
cmovle edx, ebp
cmp edx, eax
jge loc_2662
nop dword ptr [rax+00000000h]
loc_14E0:
cmp r14d, eax
jle short loc_155C
nop dword ptr [rax]
loc_14E8:
mov edx, r14d
sub r14d, 1
sub edx, eax
lea ebp, [rdx-1]
loc_14F4:
mov edi, r14d
sub edi, ebp
call _Z5func0i_part_0; func0(int) [clone]
cmp ebp, 1
jle short loc_1530
loc_1503:
mov edi, ebp
mov [rsp+78h+var_60], eax
sub ebp, 1
call _Z5func0i_part_0; func0(int) [clone]
mov edx, [rsp+78h+var_60]
mov edi, r14d
sub edi, ebp
imul edx, eax
add r15d, edx
call _Z5func0i_part_0; func0(int) [clone]
cmp ebp, 1
jg short loc_1503
nop word ptr [rax+rax+00h]
loc_1530:
add r15d, eax
test ebp, ebp
jz short loc_1560
xor ebp, ebp
jmp short loc_14F4
loc_1540:
test ebp, ebp
jg loc_1648
mov eax, 1
mov r15d, 1
lea r12d, [rbp-1]
cmp r14d, eax
jg short loc_14E8
loc_155C:
sub r14d, 1
loc_1560:
mov esi, ebx
add r13d, 1
mov ebp, r12d
imul esi, r15d
add [rsp+78h+var_74], esi
loc_1571:
cmp r13d, 1
jz loc_268B
lea r12d, [r13-1]
mov edi, r12d
cmp r12d, 1
jz loc_1B78
mov edx, r12d
xor r15d, r15d
xor ebx, ebx
loc_1594:
mov [rsp+78h+var_60], edx
call _Z5func0i_part_0; func0(int) [clone]
mov edx, [rsp+78h+var_60]
add ebx, eax
test r15d, r15d
jz loc_2649
nop dword ptr [rax+00h]
loc_15B0:
lea r15d, [r13-3]
cmp r13d, 2
jz loc_1489
loc_15BE:
mov edi, r12d
sub edi, r15d
call _Z5func0i_part_0; func0(int) [clone]
cmp r15d, 1
jle short loc_15F0
mov edi, r15d
mov [rsp+78h+var_60], eax
sub r15d, 1
call _Z5func0i_part_0; func0(int) [clone]
mov edx, [rsp+78h+var_60]
imul eax, edx
add ebx, eax
jmp short loc_15BE
loc_15F0:
add ebx, eax
test r15d, r15d
jz loc_1489
xor r15d, r15d
jmp short loc_15BE
loc_1600:
add [rsp+78h+var_74], ebx
test r14d, r14d
jz short loc_1620
add r13d, 1
sub ebp, 1
xor r14d, r14d
jmp loc_1571
loc_1620:
mov ebp, [rsp+78h+var_70]
cmp ebp, 1
jg loc_1281
loc_162D:
mov ecx, [rsp+78h+var_74]
add [rsp+78h+var_64], ecx
test ebp, ebp
jz short loc_16A8
add [rsp+78h+var_6C], 1
xor ebp, ebp
jmp loc_145B
loc_1648:
lea r12d, [rbp-1]
mov r15d, 1
mov r8d, r12d
loc_1655:
mov edi, r8d
mov edx, 1
cmp r8d, 1
jg loc_14AA
add r15d, 1
mov eax, 2
jmp loc_14E0
loc_1678:
lea ebp, [r15-1]
mov r13d, 1
mov edx, ebp
loc_1684:
mov edi, edx
mov ecx, 1
cmp edx, 1
jg loc_12C4
add r13d, 1
mov eax, 2
jmp loc_12F8
loc_16A8:
mov r14d, [rsp+78h+var_64]
mov eax, [rsp+78h+var_68]
add [rsp+78h+var_5C], 1
mov r12d, [rsp+78h+var_50]
imul eax, r14d
add [rsp+78h+var_54], eax
loc_16C3:
cmp [rsp+78h+var_5C], 1
jz loc_26D0
mov eax, [rsp+78h+var_5C]
mov [rsp+78h+var_68], 0
mov [rsp+78h+var_6C], 0
mov [rsp+78h+var_74], 1
sub eax, 1
mov [rsp+78h+var_60], r12d
mov ebp, eax
loc_16F4:
cmp ebp, 1
jle loc_1A9D
loc_16FD:
lea eax, [rbp-1]
sub ebp, 2
xor r12d, r12d
mov ebx, 1
mov [rsp+78h+var_64], eax
mov r14d, ebp
mov r15d, eax
mov [rsp+78h+var_70], 0
loc_171D:
cmp r15d, 1
jle loc_1890
mov edi, r14d
cmp r14d, 1
jle loc_17C8
mov edx, r14d
xor r13d, r13d
lea ebp, [r14-1]
xor ecx, ecx
loc_1740:
mov [rsp+78h+var_40], ecx
mov [rsp+78h+var_50], edx
call _Z5func0i_part_0; func0(int) [clone]
mov ecx, [rsp+78h+var_40]
mov edi, 1
mov edx, [rsp+78h+var_50]
add r13d, eax
test r14d, r14d
cmovle edi, r14d
lea eax, [rcx+1]
cmp eax, edi
jle loc_2641
nop
loc_1770:
cmp r15d, eax
jle short loc_17E5
nop dword ptr [rax]
loc_1778:
mov edx, r15d
sub r15d, 1
sub edx, eax
lea r14d, [rdx-1]
loc_1785:
mov edi, r15d
sub edi, r14d
call _Z5func0i_part_0; func0(int) [clone]
cmp r14d, 1
jle short loc_17B8
mov edi, r14d
mov [rsp+78h+var_50], eax
sub r14d, 1
call _Z5func0i_part_0; func0(int) [clone]
mov edx, [rsp+78h+var_50]
imul edx, eax
add r13d, edx
jmp short loc_1785
loc_17B8:
add r13d, eax
test r14d, r14d
jz short loc_17E9
xor r14d, r14d
jmp short loc_1785
loc_17C8:
test r14d, r14d
jg loc_1AB8
mov eax, 1
mov r13d, 1
lea ebp, [r14-1]
cmp r15d, eax
jg short loc_1778
loc_17E5:
sub r15d, 1
loc_17E9:
mov esi, ebx
add r12d, 1
mov r14d, ebp
imul esi, r13d
add [rsp+78h+var_70], esi
loc_17FA:
cmp r12d, 1
jz loc_26C6
lea r13d, [r12-1]
mov edi, r13d
cmp r13d, 1
jz loc_1B48
mov ebp, r13d
xor ebx, ebx
xor edx, edx
loc_181D:
mov [rsp+78h+var_50], edx
call _Z5func0i_part_0; func0(int) [clone]
mov edx, [rsp+78h+var_50]
add ebx, eax
test edx, edx
jz loc_2629
nop dword ptr [rax+00h]
loc_1838:
lea ebp, [r12-3]
cmp r12d, 2
jz loc_171D
loc_1847:
mov edi, r13d
sub edi, ebp
call _Z5func0i_part_0; func0(int) [clone]
cmp ebp, 1
jle short loc_1880
loc_1856:
mov edi, ebp
mov [rsp+78h+var_50], eax
sub ebp, 1
call _Z5func0i_part_0; func0(int) [clone]
mov edx, [rsp+78h+var_50]
mov edi, r13d
sub edi, ebp
imul edx, eax
add ebx, edx
call _Z5func0i_part_0; func0(int) [clone]
cmp ebp, 1
jg short loc_1856
nop dword ptr [rax+00h]
loc_1880:
add ebx, eax
test ebp, ebp
jz loc_171D
xor ebp, ebp
jmp short loc_1847
loc_1890:
add [rsp+78h+var_70], ebx
test r15d, r15d
jz short loc_18B0
add r12d, 1
sub r14d, 1
xor r15d, r15d
jmp loc_17FA
loc_18B0:
mov r13d, [rsp+78h+var_74]
mov eax, [rsp+78h+var_70]
add [rsp+78h+var_6C], 1
mov ebp, [rsp+78h+var_64]
imul r13d, eax
add [rsp+78h+var_68], r13d
loc_18CB:
cmp [rsp+78h+var_6C], 1
jz loc_26B9
mov eax, [rsp+78h+var_6C]
mov [rsp+78h+var_70], ebp
xor r13d, r13d
mov ebx, 1
mov [rsp+78h+var_74], 0
lea r12d, [rax-2]
lea r14d, [rax-1]
mov ebp, r12d
loc_18F9:
cmp r14d, 1
jle loc_1A70
mov edi, ebp
cmp ebp, 1
jle loc_19B0
mov r8d, ebp
xor r15d, r15d
lea r12d, [rbp-1]
xor edx, edx
loc_191A:
mov [rsp+78h+var_50], edx
mov [rsp+78h+var_64], r8d
call _Z5func0i_part_0; func0(int) [clone]
mov edx, [rsp+78h+var_50]
mov r8d, [rsp+78h+var_64]
add r15d, eax
test ebp, ebp
lea eax, [rdx+1]
mov edx, 1
cmovle edx, ebp
cmp edx, eax
jge loc_2620
nop dword ptr [rax+00000000h]
loc_1950:
cmp r14d, eax
jle short loc_19CC
nop dword ptr [rax]
loc_1958:
mov edx, r14d
sub r14d, 1
sub edx, eax
lea ebp, [rdx-1]
loc_1964:
mov edi, r14d
sub edi, ebp
call _Z5func0i_part_0; func0(int) [clone]
cmp ebp, 1
jle short loc_19A0
loc_1973:
mov edi, ebp
mov [rsp+78h+var_64], eax
sub ebp, 1
call _Z5func0i_part_0; func0(int) [clone]
mov edx, [rsp+78h+var_64]
mov edi, r14d
sub edi, ebp
imul edx, eax
add r15d, edx
call _Z5func0i_part_0; func0(int) [clone]
cmp ebp, 1
jg short loc_1973
nop word ptr [rax+rax+00h]
loc_19A0:
add r15d, eax
test ebp, ebp
jz short loc_19D0
xor ebp, ebp
jmp short loc_1964
loc_19B0:
test ebp, ebp
jg loc_1AE8
mov eax, 1
mov r15d, 1
lea r12d, [rbp-1]
cmp r14d, eax
jg short loc_1958
loc_19CC:
sub r14d, 1
loc_19D0:
mov esi, ebx
add r13d, 1
mov ebp, r12d
imul esi, r15d
add [rsp+78h+var_74], esi
loc_19E1:
cmp r13d, 1
jz loc_26AF
lea r12d, [r13-1]
mov edi, r12d
cmp r12d, 1
jz loc_1B68
mov edx, r12d
xor ebx, ebx
xor r15d, r15d
loc_1A04:
mov [rsp+78h+var_64], edx
call _Z5func0i_part_0; func0(int) [clone]
mov edx, [rsp+78h+var_64]
add ebx, eax
test r15d, r15d
jz loc_2607
nop dword ptr [rax+00h]
loc_1A20:
lea r15d, [r13-3]
cmp r13d, 2
jz loc_18F9
loc_1A2E:
mov edi, r12d
sub edi, r15d
call _Z5func0i_part_0; func0(int) [clone]
cmp r15d, 1
jle short loc_1A60
mov edi, r15d
mov [rsp+78h+var_64], eax
sub r15d, 1
call _Z5func0i_part_0; func0(int) [clone]
mov edx, [rsp+78h+var_64]
imul eax, edx
add ebx, eax
jmp short loc_1A2E
loc_1A60:
add ebx, eax
test r15d, r15d
jz loc_18F9
xor r15d, r15d
jmp short loc_1A2E
loc_1A70:
add [rsp+78h+var_74], ebx
test r14d, r14d
jz short loc_1A90
add r13d, 1
sub ebp, 1
xor r14d, r14d
jmp loc_19E1
loc_1A90:
mov ebp, [rsp+78h+var_70]
cmp ebp, 1
jg loc_16FD
loc_1A9D:
mov ecx, [rsp+78h+var_74]
add [rsp+78h+var_68], ecx
test ebp, ebp
jz short loc_1B18
add [rsp+78h+var_6C], 1
xor ebp, ebp
jmp loc_18CB
loc_1AB8:
lea ebp, [r14-1]
mov r13d, 1
mov edx, ebp
loc_1AC4:
mov edi, edx
mov ecx, 1
cmp edx, 1
jg loc_1740
add r13d, 1
mov eax, 2
jmp loc_1770
loc_1AE8:
lea r12d, [rbp-1]
mov r15d, 1
mov r8d, r12d
loc_1AF5:
mov edi, r8d
mov edx, 1
cmp r8d, 1
jg loc_191A
add r15d, 1
mov eax, 2
jmp loc_1950
loc_1B18:
mov r12d, [rsp+78h+var_60]
cmp r12d, 1
jg loc_1254
loc_1B27:
mov ecx, [rsp+78h+var_68]
add [rsp+78h+var_54], ecx
test r12d, r12d
jz short loc_1B85
add [rsp+78h+var_5C], 1
xor r12d, r12d
jmp loc_16C3
loc_1B48:
mov ebx, 1
loc_1B4D:
add ebx, 1
jmp loc_1838
loc_1B58:
mov ebx, 1
loc_1B5D:
add ebx, 1
jmp loc_13C0
loc_1B68:
mov ebx, 1
loc_1B6D:
add ebx, 1
jmp loc_1A20
loc_1B78:
mov ebx, 1
loc_1B7D:
add ebx, 1
jmp loc_15B0
loc_1B85:
mov eax, [rsp+78h+var_58]
mov ecx, [rsp+78h+var_54]
add [rsp+78h+var_4C], 1
mov ebx, [rsp+78h+var_44]
imul eax, ecx
add [rsp+78h+var_48], eax
cmp [rsp+78h+var_4C], 1
jz loc_2560
loc_1BA8:
mov eax, [rsp+78h+var_4C]
xor r15d, r15d
mov [rsp+78h+var_50], ebx
mov [rsp+78h+var_58], 0
mov [rsp+78h+var_68], 1
lea r14d, [rax-1]
mov [rsp+78h+var_5C], r15d
mov ebp, r14d
loc_1BCF:
cmp ebp, 1
jle loc_24DD
loc_1BD8:
lea r12d, [rbp-1]
mov [rsp+78h+var_70], 0
mov ebp, 1
mov [rsp+78h+var_6C], 0
mov r15d, r12d
mov [rsp+78h+var_54], r12d
loc_1BF9:
cmp r15d, 1
jle loc_1FCF
loc_1C03:
lea eax, [r15-1]
lea r12d, [r15-2]
mov [rsp+78h+var_60], ebp
xor r13d, r13d
mov [rsp+78h+var_64], eax
mov ebx, 1
mov r15d, r12d
mov ebp, eax
mov [rsp+78h+var_74], 0
loc_1C28:
cmp ebp, 1
jle loc_1DA0
mov edi, r15d
cmp r15d, 1
jle loc_1CE0
mov edx, r15d
xor r14d, r14d
lea r12d, [r15-1]
xor ecx, ecx
loc_1C4A:
mov [rsp+78h+var_40], ecx
mov [rsp+78h+var_44], edx
call _Z5func0i_part_0; func0(int) [clone]
mov ecx, [rsp+78h+var_40]
mov edi, 1
mov edx, [rsp+78h+var_44]
add r14d, eax
test r15d, r15d
cmovle edi, r15d
lea eax, [rcx+1]
cmp eax, edi
jle loc_25FF
nop dword ptr [rax+00000000h]
loc_1C80:
cmp ebp, eax
jle short loc_1CFC
nop dword ptr [rax+00h]
loc_1C88:
mov edx, ebp
sub ebp, 1
sub edx, eax
lea r15d, [rdx-1]
loc_1C93:
mov edi, ebp
sub edi, r15d
call _Z5func0i_part_0; func0(int) [clone]
cmp r15d, 1
jle short loc_1CD0
loc_1CA3:
mov edi, r15d
mov [rsp+78h+var_44], eax
sub r15d, 1
call _Z5func0i_part_0; func0(int) [clone]
mov edx, [rsp+78h+var_44]
mov edi, ebp
sub edi, r15d
imul edx, eax
add r14d, edx
call _Z5func0i_part_0; func0(int) [clone]
cmp r15d, 1
jg short loc_1CA3
nop dword ptr [rax]
loc_1CD0:
add r14d, eax
test r15d, r15d
jz short loc_1CFF
xor r15d, r15d
jmp short loc_1C93
loc_1CE0:
test r15d, r15d
jg loc_2020
mov eax, 1
mov r14d, 1
lea r12d, [r15-1]
cmp ebp, eax
jg short loc_1C88
loc_1CFC:
sub ebp, 1
loc_1CFF:
mov esi, ebx
add r13d, 1
mov r15d, r12d
imul esi, r14d
add [rsp+78h+var_74], esi
loc_1D10:
cmp r13d, 1
jz loc_26E7
lea r14d, [r13-1]
mov edi, r14d
cmp r14d, 1
jz loc_2508
mov r12d, r14d
xor ebx, ebx
xor edx, edx
loc_1D32:
mov [rsp+78h+var_44], edx
call _Z5func0i_part_0; func0(int) [clone]
mov edx, [rsp+78h+var_44]
add ebx, eax
test edx, edx
jz loc_25E4
nop dword ptr [rax+00000000h]
loc_1D50:
lea r12d, [r13-3]
cmp r13d, 2
jz loc_1C28
loc_1D5E:
mov edi, r14d
sub edi, r12d
call _Z5func0i_part_0; func0(int) [clone]
cmp r12d, 1
jle short loc_1D90
mov edi, r12d
mov [rsp+78h+var_44], eax
sub r12d, 1
call _Z5func0i_part_0; func0(int) [clone]
mov edx, [rsp+78h+var_44]
imul eax, edx
add ebx, eax
jmp short loc_1D5E
loc_1D90:
add ebx, eax
test r12d, r12d
jz loc_1C28
xor r12d, r12d
jmp short loc_1D5E
loc_1DA0:
add [rsp+78h+var_74], ebx
test ebp, ebp
jz short loc_1DC0
add r13d, 1
sub r15d, 1
xor ebp, ebp
jmp loc_1D10
loc_1DC0:
mov ebp, [rsp+78h+var_60]
mov r14d, [rsp+78h+var_74]
add [rsp+78h+var_70], 1
mov r15d, [rsp+78h+var_64]
imul r14d, ebp
add [rsp+78h+var_6C], r14d
loc_1DDC:
cmp [rsp+78h+var_70], 1
jz loc_26FB
mov eax, [rsp+78h+var_70]
mov [rsp+78h+var_64], r15d
xor r13d, r13d
xor ebp, ebp
mov ebx, 1
lea r12d, [rax-1]
lea esi, [rax-2]
mov ecx, r12d
mov r15d, esi
loc_1E07:
cmp ecx, 1
jle loc_1F90
mov edi, r15d
cmp r15d, 1
jle loc_1EB8
lea eax, [r15-1]
mov edx, r15d
xor r14d, r14d
xor r12d, r12d
mov [rsp+78h+var_74], eax
loc_1E2E:
mov [rsp+78h+var_44], ecx
mov [rsp+78h+var_60], edx
call _Z5func0i_part_0; func0(int) [clone]
mov edi, 1
mov edx, [rsp+78h+var_60]
mov ecx, [rsp+78h+var_44]
add r14d, eax
test r15d, r15d
lea eax, [r12+1]
cmovle edi, r15d
cmp edi, eax
jge loc_25DC
nop
loc_1E60:
cmp ecx, eax
jle short loc_1ED8
nop dword ptr [rax+00h]
loc_1E68:
mov edx, ecx
lea r12d, [rcx-1]
sub edx, eax
lea r15d, [rdx-1]
loc_1E74:
mov edi, r12d
sub edi, r15d
call _Z5func0i_part_0; func0(int) [clone]
cmp r15d, 1
jle short loc_1EA8
mov edi, r15d
mov [rsp+78h+var_60], eax
sub r15d, 1
call _Z5func0i_part_0; func0(int) [clone]
mov edx, [rsp+78h+var_60]
imul edx, eax
add r14d, edx
jmp short loc_1E74
loc_1EA8:
add r14d, eax
test r15d, r15d
jz short loc_1EDC
xor r15d, r15d
jmp short loc_1E74
loc_1EB8:
test r15d, r15d
jg loc_1FE8
lea esi, [r15-1]
mov eax, 1
mov r14d, 1
mov [rsp+78h+var_74], esi
cmp ecx, eax
jg short loc_1E68
loc_1ED8:
lea r12d, [rcx-1]
loc_1EDC:
imul ebx, r14d
mov r15d, [rsp+78h+var_74]
add r13d, 1
mov ecx, r12d
add ebp, ebx
loc_1EEE:
cmp r13d, 1
jz loc_26F1
lea r12d, [r13-1]
mov edi, r12d
cmp r12d, 1
jz loc_2528
mov r14d, r12d
xor edx, edx
xor ebx, ebx
loc_1F10:
mov [rsp+78h+var_60], edx
mov [rsp+78h+var_74], ecx
call _Z5func0i_part_0; func0(int) [clone]
mov edx, [rsp+78h+var_60]
mov ecx, [rsp+78h+var_74]
add ebx, eax
test edx, edx
jz loc_25C1
nop
loc_1F30:
lea r14d, [r13-3]
cmp r13d, 2
jz loc_1E07
mov [rsp+78h+var_74], ebp
mov ebp, ebx
mov ebx, r14d
mov r14d, ecx
loc_1F4A:
mov edi, r12d
sub edi, ebx
call _Z5func0i_part_0; func0(int) [clone]
cmp ebx, 1
jle short loc_1F80
loc_1F59:
mov edi, ebx
mov [rsp+78h+var_60], eax
sub ebx, 1
call _Z5func0i_part_0; func0(int) [clone]
mov edx, [rsp+78h+var_60]
mov edi, r12d
sub edi, ebx
imul edx, eax
add ebp, edx
call _Z5func0i_part_0; func0(int) [clone]
cmp ebx, 1
jg short loc_1F59
nop
loc_1F80:
add ebp, eax
test ebx, ebx
jz short loc_1FA8
xor ebx, ebx
jmp short loc_1F4A
loc_1F90:
add ebp, ebx
test ecx, ecx
jz short loc_1FC0
add r13d, 1
sub r15d, 1
xor ecx, ecx
jmp loc_1EEE
loc_1FA8:
mov ebx, ebp
mov ecx, r14d
mov ebp, [rsp+78h+var_74]
jmp loc_1E07
loc_1FC0:
mov r15d, [rsp+78h+var_64]
cmp r15d, 1
jg loc_1C03
loc_1FCF:
add [rsp+78h+var_6C], ebp
test r15d, r15d
jz short loc_2050
add [rsp+78h+var_70], 1
xor r15d, r15d
jmp loc_1DDC
loc_1FE8:
lea eax, [r15-1]
mov r14d, 1
mov [rsp+78h+var_74], eax
mov edx, eax
loc_1FF8:
mov edi, edx
mov r12d, 1
cmp edx, 1
jg loc_1E2E
add r14d, 1
mov eax, 2
jmp loc_1E60
loc_2020:
lea r12d, [r15-1]
mov r14d, 1
mov edx, r12d
loc_202D:
mov edi, edx
mov ecx, 1
cmp edx, 1
jg loc_1C4A
add r14d, 1
mov eax, 2
jmp loc_1C80
loc_2050:
mov eax, [rsp+78h+var_68]
mov ecx, [rsp+78h+var_6C]
add [rsp+78h+var_5C], 1
mov r12d, [rsp+78h+var_54]
imul eax, ecx
add [rsp+78h+var_58], eax
mov ebp, r12d
loc_206C:
cmp [rsp+78h+var_5C], 1
jz loc_2695
mov eax, [rsp+78h+var_5C]
mov [rsp+78h+var_68], 0
mov [rsp+78h+var_6C], 0
mov [rsp+78h+var_74], 1
lea r12d, [rax-1]
mov [rsp+78h+var_60], ebp
loc_209B:
cmp r12d, 1
jle loc_244F
loc_20A5:
lea r15d, [r12-1]
lea ebp, [r12-2]
xor r13d, r13d
mov ebx, 1
mov [rsp+78h+var_70], 0
mov r12d, ebp
mov [rsp+78h+var_64], r15d
loc_20C7:
cmp r15d, 1
jle loc_2240
mov edi, r12d
cmp r12d, 1
jle loc_2178
mov edx, r12d
xor ecx, ecx
lea ebp, [r12-1]
xor r14d, r14d
loc_20EB:
mov [rsp+78h+var_44], ecx
mov [rsp+78h+var_54], edx
call _Z5func0i_part_0; func0(int) [clone]
mov ecx, [rsp+78h+var_44]
mov edi, 1
mov edx, [rsp+78h+var_54]
add r14d, eax
test r12d, r12d
cmovle edi, r12d
lea eax, [rcx+1]
cmp edi, eax
jge loc_25B9
nop word ptr [rax+rax+00h]
loc_2120:
cmp r15d, eax
jle short loc_2196
nop dword ptr [rax]
loc_2128:
mov edx, r15d
sub r15d, 1
sub edx, eax
lea r12d, [rdx-1]
loc_2135:
mov edi, r15d
sub edi, r12d
call _Z5func0i_part_0; func0(int) [clone]
cmp r12d, 1
jle short loc_2168
mov edi, r12d
mov [rsp+78h+var_54], eax
sub r12d, 1
call _Z5func0i_part_0; func0(int) [clone]
mov edx, [rsp+78h+var_54]
imul edx, eax
add r14d, edx
jmp short loc_2135
loc_2168:
add r14d, eax
test r12d, r12d
jz short loc_219A
xor r12d, r12d
jmp short loc_2135
loc_2178:
test r12d, r12d
jg loc_2470
mov eax, 1
mov r14d, 1
lea ebp, [r12-1]
cmp r15d, eax
jg short loc_2128
loc_2196:
sub r15d, 1
loc_219A:
mov esi, ebx
add r13d, 1
mov r12d, ebp
imul esi, r14d
add [rsp+78h+var_70], esi
loc_21AB:
cmp r13d, 1
jz loc_271C
lea r14d, [r13-1]
mov edi, r14d
cmp r14d, 1
jz loc_24F8
mov ebp, r14d
xor ebx, ebx
xor edx, edx
loc_21CD:
mov [rsp+78h+var_54], edx
call _Z5func0i_part_0; func0(int) [clone]
mov edx, [rsp+78h+var_54]
add ebx, eax
test edx, edx
jz loc_25A1
nop dword ptr [rax+00h]
loc_21E8:
lea ebp, [r13-3]
cmp r13d, 2
jz loc_20C7
loc_21F6:
mov edi, r14d
sub edi, ebp
call _Z5func0i_part_0; func0(int) [clone]
cmp ebp, 1
jle short loc_2230
loc_2205:
mov edi, ebp
mov [rsp+78h+var_54], eax
sub ebp, 1
call _Z5func0i_part_0; func0(int) [clone]
mov edx, [rsp+78h+var_54]
mov edi, r14d
sub edi, ebp
imul edx, eax
add ebx, edx
call _Z5func0i_part_0; func0(int) [clone]
cmp ebp, 1
jg short loc_2205
nop dword ptr [rax+rax+00h]
loc_2230:
add ebx, eax
test ebp, ebp
jz loc_20C7
xor ebp, ebp
jmp short loc_21F6
loc_2240:
add [rsp+78h+var_70], ebx
test r15d, r15d
jz short loc_2260
add r13d, 1
sub r12d, 1
xor r15d, r15d
jmp loc_21AB
loc_2260:
mov r14d, [rsp+78h+var_74]
mov eax, [rsp+78h+var_70]
add [rsp+78h+var_6C], 1
mov r15d, [rsp+78h+var_64]
imul r14d, eax
add [rsp+78h+var_68], r14d
mov r12d, r15d
loc_227F:
cmp [rsp+78h+var_6C], 1
jz loc_270F
mov eax, [rsp+78h+var_6C]
mov [rsp+78h+var_70], r12d
xor r13d, r13d
mov ebx, 1
mov [rsp+78h+var_74], 0
lea ebp, [rax-1]
lea r15d, [rax-2]
mov r14d, r15d
mov r12d, ebp
loc_22B0:
cmp r12d, 1
jle loc_2420
mov edi, r14d
cmp r14d, 1
jle loc_2358
mov edx, r14d
xor ebp, ebp
lea r15d, [r14-1]
xor ecx, ecx
loc_22D2:
mov [rsp+78h+var_54], ecx
mov [rsp+78h+var_64], edx
call _Z5func0i_part_0; func0(int) [clone]
mov ecx, [rsp+78h+var_54]
mov edi, 1
mov edx, [rsp+78h+var_64]
add ebp, eax
test r14d, r14d
cmovle edi, r14d
lea eax, [rcx+1]
cmp edi, eax
jge loc_2599
loc_2300:
cmp r12d, eax
jle short loc_2374
nop dword ptr [rax]
loc_2308:
mov edx, r12d
sub r12d, 1
sub edx, eax
lea r14d, [rdx-1]
loc_2315:
mov edi, r12d
sub edi, r14d
call _Z5func0i_part_0; func0(int) [clone]
cmp r14d, 1
jle short loc_2348
mov edi, r14d
mov [rsp+78h+var_64], eax
sub r14d, 1
call _Z5func0i_part_0; func0(int) [clone]
mov edx, [rsp+78h+var_64]
imul edx, eax
add ebp, edx
jmp short loc_2315
loc_2348:
add ebp, eax
test r14d, r14d
jz short loc_2378
xor r14d, r14d
jmp short loc_2315
loc_2358:
test r14d, r14d
jg loc_24A0
mov eax, 1
mov ebp, 1
lea r15d, [r14-1]
cmp r12d, eax
jg short loc_2308
loc_2374:
sub r12d, 1
loc_2378:
mov esi, ebx
add r13d, 1
mov r14d, r15d
imul esi, ebp
add [rsp+78h+var_74], esi
loc_2388:
cmp r13d, 1
jz loc_2705
lea ebp, [r13-1]
mov edi, ebp
cmp ebp, 1
jz loc_2518
mov r15d, ebp
xor edx, edx
xor ebx, ebx
loc_23A8:
mov [rsp+78h+var_64], edx
call _Z5func0i_part_0; func0(int) [clone]
mov edx, [rsp+78h+var_64]
add ebx, eax
test edx, edx
jz loc_2582
nop
loc_23C0:
lea r15d, [r13-3]
cmp r13d, 2
jz loc_22B0
loc_23CE:
mov edi, ebp
sub edi, r15d
call _Z5func0i_part_0; func0(int) [clone]
cmp r15d, 1
jle short loc_2410
loc_23DE:
mov edi, r15d
mov [rsp+78h+var_64], eax
sub r15d, 1
call _Z5func0i_part_0; func0(int) [clone]
mov edx, [rsp+78h+var_64]
mov edi, ebp
sub edi, r15d
imul edx, eax
add ebx, edx
call _Z5func0i_part_0; func0(int) [clone]
cmp r15d, 1
jg short loc_23DE
nop word ptr [rax+rax+00000000h]
loc_2410:
add ebx, eax
test r15d, r15d
jz loc_22B0
xor r15d, r15d
jmp short loc_23CE
loc_2420:
add [rsp+78h+var_74], ebx
test r12d, r12d
jz short loc_2440
add r13d, 1
sub r14d, 1
xor r12d, r12d
jmp loc_2388
loc_2440:
mov r12d, [rsp+78h+var_70]
cmp r12d, 1
jg loc_20A5
loc_244F:
mov ecx, [rsp+78h+var_74]
add [rsp+78h+var_68], ecx
test r12d, r12d
jz short loc_24D0
add [rsp+78h+var_6C], 1
xor r12d, r12d
jmp loc_227F
loc_2470:
lea ebp, [r12-1]
mov r14d, 1
mov edx, ebp
loc_247D:
mov edi, edx
mov ecx, 1
cmp edx, 1
jg loc_20EB
add r14d, 1
mov eax, 2
jmp loc_2120
loc_24A0:
lea r15d, [r14-1]
mov ebp, 1
mov edx, r15d
loc_24AC:
mov edi, edx
mov ecx, 1
cmp edx, 1
jg loc_22D2
add ebp, 1
mov eax, 2
jmp loc_2300
loc_24D0:
mov ebp, [rsp+78h+var_60]
cmp ebp, 1
jg loc_1BD8
loc_24DD:
mov ecx, [rsp+78h+var_68]
add [rsp+78h+var_58], ecx
test ebp, ebp
jz short loc_2535
add [rsp+78h+var_5C], 1
xor ebp, ebp
jmp loc_206C
loc_24F8:
mov ebx, 1
loc_24FD:
add ebx, 1
jmp loc_21E8
loc_2508:
mov ebx, 1
loc_250D:
add ebx, 1
jmp loc_1D50
loc_2518:
mov ebx, 1
loc_251D:
add ebx, 1
jmp loc_23C0
loc_2528:
mov ebx, 1
loc_252D:
add ebx, 1
jmp loc_1F30
loc_2535:
mov ebx, [rsp+78h+var_50]
cmp ebx, 1
jg loc_1228
loc_2542:
mov ecx, [rsp+78h+var_58]
add [rsp+78h+var_48], ecx
test ebx, ebx
jz short loc_256D
add [rsp+78h+var_4C], 1
xor ebx, ebx
cmp [rsp+78h+var_4C], 1
jnz loc_1BA8
loc_2560:
mov [rsp+78h+var_58], 1
jmp loc_121F
loc_256D:
mov ebp, [rsp+78h+var_48]
loc_2571:
add rsp, 48h
mov eax, ebp
pop rbx
pop rbp
pop r12
pop r13
pop r14
pop r15
retn
loc_2582:
sub r15d, 1
cmp r15d, 1
jbe short loc_251D
mov edi, r15d
mov edx, 1
jmp loc_23A8
loc_2599:
sub edx, 1
jmp loc_24AC
loc_25A1:
sub ebp, 1
cmp ebp, 1
jbe loc_24FD
mov edi, ebp
mov edx, 1
jmp loc_21CD
loc_25B9:
sub edx, 1
jmp loc_247D
loc_25C1:
sub r14d, 1
cmp r14d, 1
jbe loc_252D
mov edi, r14d
mov edx, 1
jmp loc_1F10
loc_25DC:
sub edx, 1
jmp loc_1FF8
loc_25E4:
sub r12d, 1
cmp r12d, 1
jbe loc_250D
mov edi, r12d
mov edx, 1
jmp loc_1D32
loc_25FF:
sub edx, 1
jmp loc_202D
loc_2607:
sub edx, 1
cmp edx, 1
jbe loc_1B6D
mov edi, edx
mov r15d, 1
jmp loc_1A04
loc_2620:
sub r8d, 1
jmp loc_1AF5
loc_2629:
sub ebp, 1
cmp ebp, 1
jbe loc_1B4D
mov edi, ebp
mov edx, 1
jmp loc_181D
loc_2641:
sub edx, 1
jmp loc_1AC4
loc_2649:
sub edx, 1
cmp edx, 1
jbe loc_1B7D
mov edi, edx
mov r15d, 1
jmp loc_1594
loc_2662:
sub r8d, 1
jmp loc_1655
loc_266B:
sub ebp, 1
cmp ebp, 1
jbe loc_1B5D
mov edi, ebp
mov edx, 1
jmp loc_13A5
loc_2683:
sub edx, 1
jmp loc_1684
loc_268B:
mov ebx, 1
jmp loc_1489
loc_2695:
mov [rsp+78h+var_68], 1
jmp loc_1BCF
loc_26A2:
mov [rsp+78h+var_74], 1
jmp loc_1278
loc_26AF:
mov ebx, 1
jmp loc_18F9
loc_26B9:
mov [rsp+78h+var_74], 1
jmp loc_16F4
loc_26C6:
mov ebx, 1
jmp loc_171D
loc_26D0:
mov [rsp+78h+var_68], 1
jmp loc_124A
loc_26DD:
mov ebx, 1
jmp loc_12A1
loc_26E7:
mov ebx, 1
jmp loc_1C28
loc_26F1:
mov ebx, 1
jmp loc_1E07
loc_26FB:
mov ebp, 1
jmp loc_1BF9
loc_2705:
mov ebx, 1
jmp loc_22B0
loc_270F:
mov [rsp+78h+var_74], 1
jmp loc_209B
loc_271C:
mov ebx, 1
jmp loc_20C7 | long long func0(int a1)
{
unsigned int v1; // ebp
int v2; // ebx
int v3; // r12d
int v4; // ebp
int v5; // r12d
int v6; // ebx
int v7; // r14d
int v8; // r15d
long long v9; // rdi
int j; // edx
int v11; // ecx
int v12; // ebp
int v13; // r13d
int v14; // eax
int v15; // edx
int i; // r15d
int v17; // eax
long long v18; // rdi
int v19; // r13d
long long v20; // rdi
unsigned int v21; // ebp
int k; // edx
int v23; // ebp
int m; // eax
long long v25; // rdi
int v26; // r13d
int v27; // ebx
int v28; // r14d
int v29; // ebp
long long v30; // rdi
int n; // r8d
int v32; // r15d
int v33; // r12d
int v34; // edx
int v35; // eax
int v36; // edx
int ii; // ebp
int jj; // eax
long long v39; // rdi
long long v40; // rdi
unsigned int v41; // edx
int v42; // r15d
int v43; // r15d
int v44; // eax
long long v45; // rdi
int v46; // ebp
int v47; // r12d
int v48; // ebx
int v49; // r14d
int v50; // r15d
long long v51; // rdi
int kk; // edx
int v53; // r13d
int v54; // ebp
int v55; // ecx
int v56; // eax
int v57; // edx
int mm; // r14d
int v59; // eax
long long v60; // rdi
int v61; // r13d
long long v62; // rdi
unsigned int v63; // ebp
int nn; // edx
int v65; // ebp
int i1; // eax
long long v67; // rdi
int v68; // r13d
int v69; // ebx
int v70; // r14d
int v71; // ebp
long long v72; // rdi
int i2; // r8d
int v74; // r15d
int v75; // r12d
int v76; // edx
int v77; // eax
int v78; // edx
int i3; // ebp
int i4; // eax
long long v81; // rdi
long long v82; // rdi
unsigned int v83; // edx
int i5; // r15d
int v85; // r15d
int v86; // eax
long long v87; // rdi
int v88; // ebp
int v89; // r12d
int v90; // ebp
int v91; // r15d
int v92; // r13d
int v93; // ebx
int v94; // r15d
int v95; // ebp
long long v96; // rdi
int i6; // edx
int v98; // r14d
int v99; // r12d
int v100; // ecx
int v101; // eax
int v102; // edx
int i7; // r15d
int i8; // eax
long long v105; // rdi
long long v106; // rdi
unsigned int v107; // r12d
int i9; // edx
int v109; // r12d
int v110; // eax
long long v111; // rdi
int v112; // r13d
int v113; // ebx
int v114; // ecx
int v115; // r15d
long long v116; // rdi
int i10; // edx
int v118; // r14d
int v119; // r12d
int v120; // eax
int v121; // eax
int v122; // r12d
int i11; // r15d
int v124; // eax
long long v125; // rdi
int v126; // r12d
long long v127; // rdi
unsigned int v128; // r14d
int v129; // edx
int v130; // eax
int v131; // ebp
int v132; // ebx
int v133; // r14d
int i12; // eax
long long v135; // rdi
int v136; // r12d
int v137; // r15d
int v138; // r13d
int v139; // ebx
int v140; // r12d
long long v141; // rdi
int i13; // edx
int v143; // ecx
int v144; // ebp
int v145; // r14d
int v146; // eax
int v147; // edx
int i14; // r12d
int v149; // eax
long long v150; // rdi
int v151; // r14d
long long v152; // rdi
unsigned int v153; // ebp
int i15; // edx
int v155; // ebp
int i16; // eax
long long v157; // rdi
int v158; // r13d
int v159; // ebx
int v160; // r14d
int v161; // r12d
long long v162; // rdi
int i17; // edx
int v164; // ebp
int v165; // r15d
int v166; // ecx
int v167; // eax
int v168; // edx
int i18; // r14d
int v170; // eax
long long v171; // rdi
int v172; // ebp
long long v173; // rdi
unsigned int v174; // r15d
int v175; // edx
int v176; // r15d
int i19; // eax
long long v178; // rdi
int v180; // [rsp+4h] [rbp-74h]
int v181; // [rsp+4h] [rbp-74h]
int v182; // [rsp+4h] [rbp-74h]
int v183; // [rsp+4h] [rbp-74h]
int v184; // [rsp+4h] [rbp-74h]
int v185; // [rsp+4h] [rbp-74h]
int v186; // [rsp+4h] [rbp-74h]
int v187; // [rsp+8h] [rbp-70h]
int v188; // [rsp+8h] [rbp-70h]
int v189; // [rsp+8h] [rbp-70h]
int v190; // [rsp+8h] [rbp-70h]
int v191; // [rsp+8h] [rbp-70h]
int v192; // [rsp+8h] [rbp-70h]
int v193; // [rsp+8h] [rbp-70h]
int v194; // [rsp+Ch] [rbp-6Ch]
int v195; // [rsp+Ch] [rbp-6Ch]
int v196; // [rsp+Ch] [rbp-6Ch]
int v197; // [rsp+Ch] [rbp-6Ch]
int v198; // [rsp+10h] [rbp-68h]
int v199; // [rsp+10h] [rbp-68h]
int v200; // [rsp+14h] [rbp-64h]
int v201; // [rsp+14h] [rbp-64h]
int v202; // [rsp+14h] [rbp-64h]
unsigned int v203; // [rsp+14h] [rbp-64h]
int v204; // [rsp+14h] [rbp-64h]
int v205; // [rsp+14h] [rbp-64h]
int v206; // [rsp+14h] [rbp-64h]
int v207; // [rsp+14h] [rbp-64h]
int v208; // [rsp+14h] [rbp-64h]
int v209; // [rsp+18h] [rbp-60h]
int v210; // [rsp+18h] [rbp-60h]
unsigned int v211; // [rsp+18h] [rbp-60h]
int v212; // [rsp+18h] [rbp-60h]
int v213; // [rsp+18h] [rbp-60h]
int v214; // [rsp+18h] [rbp-60h]
int v215; // [rsp+18h] [rbp-60h]
int v216; // [rsp+18h] [rbp-60h]
int v217; // [rsp+1Ch] [rbp-5Ch]
int v218; // [rsp+1Ch] [rbp-5Ch]
int v219; // [rsp+20h] [rbp-58h]
int v220; // [rsp+24h] [rbp-54h]
int v221; // [rsp+24h] [rbp-54h]
int v222; // [rsp+24h] [rbp-54h]
int v223; // [rsp+24h] [rbp-54h]
int v224; // [rsp+24h] [rbp-54h]
int v225; // [rsp+28h] [rbp-50h]
int v226; // [rsp+28h] [rbp-50h]
int v227; // [rsp+28h] [rbp-50h]
int v228; // [rsp+28h] [rbp-50h]
int v229; // [rsp+28h] [rbp-50h]
int v230; // [rsp+2Ch] [rbp-4Ch]
unsigned int v231; // [rsp+30h] [rbp-48h]
int v232; // [rsp+34h] [rbp-44h]
int v233; // [rsp+34h] [rbp-44h]
int v234; // [rsp+34h] [rbp-44h]
int v235; // [rsp+34h] [rbp-44h]
int v236; // [rsp+34h] [rbp-44h]
int v237; // [rsp+38h] [rbp-40h]
int v238; // [rsp+38h] [rbp-40h]
int v239; // [rsp+38h] [rbp-40h]
int v240; // [rsp+38h] [rbp-40h]
int v241; // [rsp+38h] [rbp-40h]
int v242; // [rsp+3Ch] [rbp-3Ch]
v1 = 0;
if ( a1 <= 0 )
return v1;
v219 = 1;
v2 = a1 - 1;
v230 = 0;
v231 = 0;
LABEL_3:
if ( v2 <= 1 )
goto LABEL_298;
do
{
v217 = 0;
v220 = 0;
v3 = v2 - 1;
v198 = 1;
v232 = v2 - 1;
LABEL_5:
if ( v3 <= 1 )
goto LABEL_139;
do
{
v194 = 0;
v180 = 1;
v4 = v3 - 1;
v200 = 0;
v225 = v3 - 1;
LABEL_7:
if ( v4 <= 1 )
goto LABEL_63;
do
{
v5 = 0;
v6 = 1;
v209 = v4 - 1;
v7 = v4 - 1;
v8 = v4 - 2;
v187 = 0;
while ( v7 > 1 )
{
v9 = (unsigned int)v8;
if ( v8 > 1 )
{
j = v8;
v11 = 0;
v12 = v8 - 1;
v13 = 0;
goto LABEL_12;
}
if ( v8 <= 0 )
{
v14 = 1;
v13 = 1;
v12 = v8 - 1;
LABEL_14:
v15 = v7--;
for ( i = v15 - v14 - 1; ; i = 0 )
{
while ( 1 )
{
v17 = func0((unsigned int)(v7 - i));
if ( i <= 1 )
break;
v18 = (unsigned int)i--;
v13 += func0(v18) * v17;
}
v13 += v17;
if ( !i )
break;
}
goto LABEL_22;
}
v12 = v8 - 1;
v13 = 1;
for ( j = v8 - 1; ; j = v237 - 1 )
{
v9 = (unsigned int)j;
v11 = 1;
if ( j <= 1 )
break;
LABEL_12:
v242 = v11;
v237 = j;
v13 += func0(v9);
v14 = v242 + 1;
if ( v242 + 1 > 1 )
goto LABEL_13;
}
++v13;
v14 = 2;
LABEL_13:
if ( v7 > v14 )
goto LABEL_14;
--v7;
LABEL_22:
++v5;
v8 = v12;
v187 += v6 * v13;
LABEL_23:
if ( v5 == 1 )
{
v6 = 1;
}
else
{
v19 = v5 - 1;
v20 = (unsigned int)(v5 - 1);
if ( v5 == 2 )
{
v6 = 1;
LABEL_144:
++v6;
}
else
{
v21 = v5 - 1;
v6 = 0;
for ( k = 0; ; k = 1 )
{
v238 = k;
v6 += func0(v20);
if ( v238 )
break;
if ( --v21 <= 1 )
goto LABEL_144;
v20 = v21;
}
}
v23 = v5 - 3;
if ( v5 != 2 )
{
while ( 1 )
{
for ( m = func0((unsigned int)(v19 - v23)); v23 > 1; m = func0((unsigned int)(v19 - v23)) )
{
v25 = (unsigned int)v23--;
v6 += func0(v25) * m;
}
v6 += m;
if ( !v23 )
break;
v23 = 0;
}
}
}
}
v187 += v6;
if ( v7 )
{
++v5;
--v8;
v7 = 0;
goto LABEL_23;
}
++v194;
v4 = v209;
v200 += v187 * v180;
LABEL_35:
if ( v194 == 1 )
{
v180 = 1;
goto LABEL_7;
}
v188 = v4;
v26 = 0;
v27 = 1;
v180 = 0;
v28 = v194 - 1;
v29 = v194 - 2;
while ( 2 )
{
if ( v28 > 1 )
{
v30 = (unsigned int)v29;
if ( v29 > 1 )
{
n = v29;
v32 = 0;
v33 = v29 - 1;
v34 = 0;
goto LABEL_40;
}
if ( v29 <= 0 )
{
v35 = 1;
v32 = 1;
v33 = v29 - 1;
goto LABEL_42;
}
v33 = v29 - 1;
v32 = 1;
for ( n = v29 - 1; ; n = v210 - 1 )
{
v30 = (unsigned int)n;
v34 = 1;
if ( n <= 1 )
break;
LABEL_40:
v239 = v34;
v210 = n;
v32 += func0(v30);
v35 = v239 + 1;
if ( v239 + 1 > 1 )
goto LABEL_41;
}
++v32;
v35 = 2;
LABEL_41:
if ( v28 <= v35 )
{
--v28;
}
else
{
LABEL_42:
v36 = v28--;
for ( ii = v36 - v35 - 1; ; ii = 0 )
{
for ( jj = func0((unsigned int)(v28 - ii)); ii > 1; jj = func0((unsigned int)(v28 - ii)) )
{
v39 = (unsigned int)ii--;
v32 += func0(v39) * jj;
}
v32 += jj;
if ( !ii )
break;
}
}
++v26;
v29 = v33;
v180 += v32 * v27;
LABEL_51:
if ( v26 == 1 )
{
v27 = 1;
}
else
{
v40 = (unsigned int)(v26 - 1);
if ( v26 == 2 )
{
v27 = 1;
LABEL_148:
++v27;
}
else
{
v41 = v26 - 1;
v42 = 0;
v27 = 0;
while ( 1 )
{
v211 = v41;
v27 += func0(v40);
if ( v42 )
break;
v41 = v211 - 1;
if ( v211 - 1 <= 1 )
goto LABEL_148;
v40 = v41;
v42 = 1;
}
}
v43 = v26 - 3;
if ( v26 != 2 )
{
while ( 1 )
{
while ( 1 )
{
v44 = func0((unsigned int)(v26 - 1 - v43));
if ( v43 <= 1 )
break;
v45 = (unsigned int)v43--;
v27 += v44 * func0(v45);
}
v27 += v44;
if ( !v43 )
break;
v43 = 0;
}
}
}
continue;
}
break;
}
v180 += v27;
if ( v28 )
{
++v26;
--v29;
v28 = 0;
goto LABEL_51;
}
v4 = v188;
}
while ( v188 > 1 );
LABEL_63:
v200 += v180;
if ( v4 )
{
++v194;
v4 = 0;
goto LABEL_35;
}
++v217;
v3 = v225;
v220 += v200 * v198;
LABEL_72:
if ( v217 == 1 )
{
v198 = 1;
goto LABEL_5;
}
v198 = 0;
v195 = 0;
v181 = 1;
v212 = v3;
v46 = v217 - 1;
while ( 2 )
{
if ( v46 <= 1 )
goto LABEL_130;
LABEL_75:
v47 = 0;
v48 = 1;
v201 = v46 - 1;
v49 = v46 - 2;
v50 = v46 - 1;
v189 = 0;
while ( 2 )
{
if ( v50 > 1 )
{
v51 = (unsigned int)v49;
if ( v49 > 1 )
{
kk = v49;
v53 = 0;
v54 = v49 - 1;
v55 = 0;
goto LABEL_79;
}
if ( v49 <= 0 )
{
v56 = 1;
v53 = 1;
v54 = v49 - 1;
goto LABEL_81;
}
v54 = v49 - 1;
v53 = 1;
for ( kk = v49 - 1; ; kk = v226 - 1 )
{
v51 = (unsigned int)kk;
v55 = 1;
if ( kk <= 1 )
break;
LABEL_79:
v240 = v55;
v226 = kk;
v53 += func0(v51);
v56 = v240 + 1;
if ( v240 + 1 > 1 )
goto LABEL_80;
}
++v53;
v56 = 2;
LABEL_80:
if ( v50 <= v56 )
{
--v50;
}
else
{
LABEL_81:
v57 = v50--;
for ( mm = v57 - v56 - 1; ; mm = 0 )
{
while ( 1 )
{
v59 = func0((unsigned int)(v50 - mm));
if ( mm <= 1 )
break;
v60 = (unsigned int)mm--;
v53 += func0(v60) * v59;
}
v53 += v59;
if ( !mm )
break;
}
}
++v47;
v49 = v54;
v189 += v53 * v48;
LABEL_90:
if ( v47 == 1 )
{
v48 = 1;
}
else
{
v61 = v47 - 1;
v62 = (unsigned int)(v47 - 1);
if ( v47 == 2 )
{
v48 = 1;
LABEL_142:
++v48;
}
else
{
v63 = v47 - 1;
v48 = 0;
for ( nn = 0; ; nn = 1 )
{
v227 = nn;
v48 += func0(v62);
if ( v227 )
break;
if ( --v63 <= 1 )
goto LABEL_142;
v62 = v63;
}
}
v65 = v47 - 3;
if ( v47 != 2 )
{
while ( 1 )
{
for ( i1 = func0((unsigned int)(v61 - v65)); v65 > 1; i1 = func0((unsigned int)(v61 - v65)) )
{
v67 = (unsigned int)v65--;
v48 += func0(v67) * i1;
}
v48 += i1;
if ( !v65 )
break;
v65 = 0;
}
}
}
continue;
}
break;
}
v189 += v48;
if ( v50 )
{
++v47;
--v49;
v50 = 0;
goto LABEL_90;
}
++v195;
v46 = v201;
v198 += v189 * v181;
LABEL_102:
if ( v195 == 1 )
{
v181 = 1;
continue;
}
break;
}
v190 = v46;
v68 = 0;
v69 = 1;
v181 = 0;
v70 = v195 - 1;
v71 = v195 - 2;
while ( 2 )
{
if ( v70 > 1 )
{
v72 = (unsigned int)v71;
if ( v71 > 1 )
{
i2 = v71;
v74 = 0;
v75 = v71 - 1;
v76 = 0;
goto LABEL_107;
}
if ( v71 <= 0 )
{
v77 = 1;
v74 = 1;
v75 = v71 - 1;
goto LABEL_109;
}
v75 = v71 - 1;
v74 = 1;
for ( i2 = v71 - 1; ; i2 = v202 - 1 )
{
v72 = (unsigned int)i2;
v76 = 1;
if ( i2 <= 1 )
break;
LABEL_107:
v228 = v76;
v202 = i2;
v74 += func0(v72);
v77 = v228 + 1;
if ( v228 + 1 > 1 )
goto LABEL_108;
}
++v74;
v77 = 2;
LABEL_108:
if ( v70 <= v77 )
{
--v70;
}
else
{
LABEL_109:
v78 = v70--;
for ( i3 = v78 - v77 - 1; ; i3 = 0 )
{
for ( i4 = func0((unsigned int)(v70 - i3)); i3 > 1; i4 = func0((unsigned int)(v70 - i3)) )
{
v81 = (unsigned int)i3--;
v74 += func0(v81) * i4;
}
v74 += i4;
if ( !i3 )
break;
}
}
++v68;
v71 = v75;
v181 += v74 * v69;
LABEL_118:
if ( v68 == 1 )
{
v69 = 1;
}
else
{
v82 = (unsigned int)(v68 - 1);
if ( v68 == 2 )
{
v69 = 1;
LABEL_146:
++v69;
}
else
{
v83 = v68 - 1;
v69 = 0;
for ( i5 = 0; ; i5 = 1 )
{
v203 = v83;
v69 += func0(v82);
if ( i5 )
break;
v83 = v203 - 1;
if ( v203 - 1 <= 1 )
goto LABEL_146;
v82 = v83;
}
}
v85 = v68 - 3;
if ( v68 != 2 )
{
while ( 1 )
{
while ( 1 )
{
v86 = func0((unsigned int)(v68 - 1 - v85));
if ( v85 <= 1 )
break;
v87 = (unsigned int)v85--;
v69 += v86 * func0(v87);
}
v69 += v86;
if ( !v85 )
break;
v85 = 0;
}
}
}
continue;
}
break;
}
v181 += v69;
if ( v70 )
{
++v68;
--v71;
v70 = 0;
goto LABEL_118;
}
v46 = v190;
if ( v190 > 1 )
goto LABEL_75;
LABEL_130:
v198 += v181;
if ( v46 )
{
++v195;
v46 = 0;
goto LABEL_102;
}
v3 = v212;
}
while ( v212 > 1 );
LABEL_139:
v220 += v198;
if ( v3 )
{
++v217;
v3 = 0;
goto LABEL_72;
}
++v230;
v2 = v232;
v231 += v220 * v219;
if ( v230 == 1 )
{
LABEL_300:
v219 = 1;
goto LABEL_3;
}
LABEL_150:
v229 = v2;
v219 = 0;
v199 = 1;
v218 = 0;
v88 = v230 - 1;
while ( 2 )
{
if ( v88 <= 1 )
goto LABEL_287;
LABEL_152:
v89 = v88 - 1;
v191 = 0;
v90 = 1;
v196 = 0;
v91 = v89;
v221 = v89;
while ( 2 )
{
if ( v91 <= 1 )
goto LABEL_211;
LABEL_154:
v213 = v90;
v92 = 0;
v204 = v91 - 1;
v93 = 1;
v94 = v91 - 2;
v95 = v204;
v182 = 0;
while ( 2 )
{
if ( v95 > 1 )
{
v96 = (unsigned int)v94;
if ( v94 > 1 )
{
i6 = v94;
v98 = 0;
v99 = v94 - 1;
v100 = 0;
goto LABEL_158;
}
if ( v94 <= 0 )
{
v101 = 1;
v98 = 1;
v99 = v94 - 1;
goto LABEL_160;
}
v99 = v94 - 1;
v98 = 1;
for ( i6 = v94 - 1; ; i6 = v233 - 1 )
{
v96 = (unsigned int)i6;
v100 = 1;
if ( i6 <= 1 )
break;
LABEL_158:
v241 = v100;
v233 = i6;
v98 += func0(v96);
v101 = v241 + 1;
if ( v241 + 1 > 1 )
goto LABEL_159;
}
++v98;
v101 = 2;
LABEL_159:
if ( v95 <= v101 )
{
--v95;
}
else
{
LABEL_160:
v102 = v95--;
for ( i7 = v102 - v101 - 1; ; i7 = 0 )
{
for ( i8 = func0((unsigned int)(v95 - i7)); i7 > 1; i8 = func0((unsigned int)(v95 - i7)) )
{
v105 = (unsigned int)i7--;
v98 += func0(v105) * i8;
}
v98 += i8;
if ( !i7 )
break;
}
}
++v92;
v94 = v99;
v182 += v98 * v93;
LABEL_169:
if ( v92 == 1 )
{
v93 = 1;
}
else
{
v106 = (unsigned int)(v92 - 1);
if ( v92 == 2 )
{
v93 = 1;
LABEL_292:
++v93;
}
else
{
v107 = v92 - 1;
v93 = 0;
for ( i9 = 0; ; i9 = 1 )
{
v234 = i9;
v93 += func0(v106);
if ( v234 )
break;
if ( --v107 <= 1 )
goto LABEL_292;
v106 = v107;
}
}
v109 = v92 - 3;
if ( v92 != 2 )
{
while ( 1 )
{
while ( 1 )
{
v110 = func0((unsigned int)(v92 - 1 - v109));
if ( v109 <= 1 )
break;
v111 = (unsigned int)v109--;
v93 += v110 * func0(v111);
}
v93 += v110;
if ( !v109 )
break;
v109 = 0;
}
}
}
continue;
}
break;
}
v182 += v93;
if ( v95 )
{
++v92;
--v94;
v95 = 0;
goto LABEL_169;
}
++v191;
v91 = v204;
v196 += v213 * v182;
LABEL_181:
if ( v191 == 1 )
{
v90 = 1;
continue;
}
break;
}
v205 = v91;
v112 = 0;
v90 = 0;
v113 = 1;
v114 = v191 - 1;
v115 = v191 - 2;
while ( 2 )
{
if ( v114 > 1 )
{
v116 = (unsigned int)v115;
if ( v115 > 1 )
{
i10 = v115;
v118 = 0;
v119 = 0;
v183 = v115 - 1;
goto LABEL_186;
}
if ( v115 <= 0 )
{
v121 = 1;
v118 = 1;
v183 = v115 - 1;
goto LABEL_188;
}
v118 = 1;
v183 = v115 - 1;
for ( i10 = v115 - 1; ; i10 = v214 - 1 )
{
v116 = (unsigned int)i10;
v119 = 1;
if ( i10 <= 1 )
break;
LABEL_186:
v235 = v114;
v214 = i10;
v120 = func0(v116);
v114 = v235;
v118 += v120;
v121 = v119 + 1;
if ( v119 + 1 > 1 )
goto LABEL_187;
}
++v118;
v121 = 2;
LABEL_187:
if ( v114 <= v121 )
{
v122 = v114 - 1;
}
else
{
LABEL_188:
v122 = v114 - 1;
for ( i11 = v114 - v121 - 1; ; i11 = 0 )
{
while ( 1 )
{
v124 = func0((unsigned int)(v122 - i11));
if ( i11 <= 1 )
break;
v125 = (unsigned int)i11--;
v118 += func0(v125) * v124;
}
v118 += v124;
if ( !i11 )
break;
}
}
v115 = v183;
++v112;
v114 = v122;
v90 += v118 * v113;
LABEL_197:
if ( v112 == 1 )
{
v113 = 1;
}
else
{
v126 = v112 - 1;
v127 = (unsigned int)(v112 - 1);
if ( v112 == 2 )
{
v113 = 1;
LABEL_296:
++v113;
}
else
{
v128 = v112 - 1;
v129 = 0;
v113 = 0;
while ( 1 )
{
v215 = v129;
v184 = v114;
v130 = func0(v127);
v114 = v184;
v113 += v130;
if ( v215 )
break;
if ( --v128 <= 1 )
goto LABEL_296;
v127 = v128;
v129 = 1;
}
}
if ( v112 != 2 )
{
v185 = v90;
v131 = v113;
v132 = v112 - 3;
v133 = v114;
while ( 1 )
{
for ( i12 = func0((unsigned int)(v126 - v132)); v132 > 1; i12 = func0((unsigned int)(v126 - v132)) )
{
v135 = (unsigned int)v132--;
v131 += func0(v135) * i12;
}
v131 += i12;
if ( !v132 )
break;
v132 = 0;
}
v113 = v131;
v114 = v133;
v90 = v185;
}
}
continue;
}
break;
}
v90 += v113;
if ( v114 )
{
++v112;
--v115;
v114 = 0;
goto LABEL_197;
}
v91 = v205;
if ( v205 > 1 )
goto LABEL_154;
LABEL_211:
v196 += v90;
if ( v91 )
{
++v191;
v91 = 0;
goto LABEL_181;
}
++v218;
v219 += v196 * v199;
v88 = v221;
LABEL_220:
if ( v218 == 1 )
{
v199 = 1;
continue;
}
break;
}
v199 = 0;
v197 = 0;
v186 = 1;
v136 = v218 - 1;
v216 = v88;
while ( 2 )
{
if ( v136 <= 1 )
goto LABEL_278;
LABEL_223:
v137 = v136 - 1;
v138 = 0;
v139 = 1;
v192 = 0;
v140 = v136 - 2;
v206 = v137;
while ( 2 )
{
if ( v137 > 1 )
{
v141 = (unsigned int)v140;
if ( v140 > 1 )
{
i13 = v140;
v143 = 0;
v144 = v140 - 1;
v145 = 0;
goto LABEL_227;
}
if ( v140 <= 0 )
{
v146 = 1;
v145 = 1;
v144 = v140 - 1;
goto LABEL_229;
}
v144 = v140 - 1;
v145 = 1;
for ( i13 = v140 - 1; ; i13 = v222 - 1 )
{
v141 = (unsigned int)i13;
v143 = 1;
if ( i13 <= 1 )
break;
LABEL_227:
v236 = v143;
v222 = i13;
v145 += func0(v141);
v146 = v236 + 1;
if ( v236 + 1 > 1 )
goto LABEL_228;
}
++v145;
v146 = 2;
LABEL_228:
if ( v137 <= v146 )
{
--v137;
}
else
{
LABEL_229:
v147 = v137--;
for ( i14 = v147 - v146 - 1; ; i14 = 0 )
{
while ( 1 )
{
v149 = func0((unsigned int)(v137 - i14));
if ( i14 <= 1 )
break;
v150 = (unsigned int)i14--;
v145 += func0(v150) * v149;
}
v145 += v149;
if ( !i14 )
break;
}
}
++v138;
v140 = v144;
v192 += v145 * v139;
LABEL_238:
if ( v138 == 1 )
{
v139 = 1;
}
else
{
v151 = v138 - 1;
v152 = (unsigned int)(v138 - 1);
if ( v138 == 2 )
{
v139 = 1;
LABEL_290:
++v139;
}
else
{
v153 = v138 - 1;
v139 = 0;
for ( i15 = 0; ; i15 = 1 )
{
v223 = i15;
v139 += func0(v152);
if ( v223 )
break;
if ( --v153 <= 1 )
goto LABEL_290;
v152 = v153;
}
}
v155 = v138 - 3;
if ( v138 != 2 )
{
while ( 1 )
{
for ( i16 = func0((unsigned int)(v151 - v155)); v155 > 1; i16 = func0((unsigned int)(v151 - v155)) )
{
v157 = (unsigned int)v155--;
v139 += func0(v157) * i16;
}
v139 += i16;
if ( !v155 )
break;
v155 = 0;
}
}
}
continue;
}
break;
}
v192 += v139;
if ( v137 )
{
++v138;
--v140;
v137 = 0;
goto LABEL_238;
}
++v197;
v199 += v192 * v186;
v136 = v206;
LABEL_250:
if ( v197 == 1 )
{
v186 = 1;
continue;
}
break;
}
v193 = v136;
v158 = 0;
v159 = 1;
v186 = 0;
v160 = v197 - 2;
v161 = v197 - 1;
while ( 2 )
{
if ( v161 > 1 )
{
v162 = (unsigned int)v160;
if ( v160 > 1 )
{
i17 = v160;
v164 = 0;
v165 = v160 - 1;
v166 = 0;
goto LABEL_255;
}
if ( v160 <= 0 )
{
v167 = 1;
v164 = 1;
v165 = v160 - 1;
goto LABEL_257;
}
v165 = v160 - 1;
v164 = 1;
for ( i17 = v160 - 1; ; i17 = v207 - 1 )
{
v162 = (unsigned int)i17;
v166 = 1;
if ( i17 <= 1 )
break;
LABEL_255:
v224 = v166;
v207 = i17;
v164 += func0(v162);
v167 = v224 + 1;
if ( v224 + 1 > 1 )
goto LABEL_256;
}
++v164;
v167 = 2;
LABEL_256:
if ( v161 <= v167 )
{
--v161;
}
else
{
LABEL_257:
v168 = v161--;
for ( i18 = v168 - v167 - 1; ; i18 = 0 )
{
while ( 1 )
{
v170 = func0((unsigned int)(v161 - i18));
if ( i18 <= 1 )
break;
v171 = (unsigned int)i18--;
v164 += func0(v171) * v170;
}
v164 += v170;
if ( !i18 )
break;
}
}
++v158;
v160 = v165;
v186 += v164 * v159;
LABEL_266:
if ( v158 == 1 )
{
v159 = 1;
}
else
{
v172 = v158 - 1;
v173 = (unsigned int)(v158 - 1);
if ( v158 == 2 )
{
v159 = 1;
LABEL_294:
++v159;
}
else
{
v174 = v158 - 1;
v175 = 0;
v159 = 0;
while ( 1 )
{
v208 = v175;
v159 += func0(v173);
if ( v208 )
break;
if ( --v174 <= 1 )
goto LABEL_294;
v173 = v174;
v175 = 1;
}
}
v176 = v158 - 3;
if ( v158 != 2 )
{
while ( 1 )
{
for ( i19 = func0((unsigned int)(v172 - v176)); v176 > 1; i19 = func0((unsigned int)(v172 - v176)) )
{
v178 = (unsigned int)v176--;
v159 += func0(v178) * i19;
}
v159 += i19;
if ( !v176 )
break;
v176 = 0;
}
}
}
continue;
}
break;
}
v186 += v159;
if ( v161 )
{
++v158;
--v160;
v161 = 0;
goto LABEL_266;
}
v136 = v193;
if ( v193 > 1 )
goto LABEL_223;
LABEL_278:
v199 += v186;
if ( v136 )
{
++v197;
v136 = 0;
goto LABEL_250;
}
v88 = v216;
if ( v216 > 1 )
goto LABEL_152;
LABEL_287:
v219 += v199;
if ( v88 )
{
++v218;
v88 = 0;
goto LABEL_220;
}
v2 = v229;
}
while ( v229 > 1 );
LABEL_298:
v231 += v219;
if ( v2 )
{
++v230;
v2 = 0;
if ( v230 != 1 )
goto LABEL_150;
goto LABEL_300;
}
return v231;
} | func0:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
XOR EBP,EBP
PUSH RBX
SUB RSP,0x48
TEST EDI,EDI
JLE 0x00102571
XOR R12D,R12D
MOV dword ptr [RSP + 0x20],0x1
LEA EBX,[RDI + -0x1]
MOV dword ptr [RSP + 0x2c],R12D
MOV dword ptr [RSP + 0x30],EBP
LAB_0010121f:
CMP EBX,0x1
JLE 0x00102542
LAB_00101228:
SUB EBX,0x1
MOV dword ptr [RSP + 0x1c],0x0
MOV dword ptr [RSP + 0x24],0x0
MOV R12D,EBX
MOV dword ptr [RSP + 0x10],0x1
MOV dword ptr [RSP + 0x34],EBX
LAB_0010124a:
CMP R12D,0x1
JLE 0x00101b27
LAB_00101254:
SUB R12D,0x1
XOR R14D,R14D
MOV dword ptr [RSP + 0xc],0x0
MOV dword ptr [RSP + 0x4],0x1
MOV EBP,R12D
MOV dword ptr [RSP + 0x14],R14D
MOV dword ptr [RSP + 0x28],R12D
LAB_00101278:
CMP EBP,0x1
JLE 0x0010162d
LAB_00101281:
LEA EAX,[RBP + -0x1]
SUB EBP,0x2
XOR R12D,R12D
MOV EBX,0x1
MOV dword ptr [RSP + 0x18],EAX
MOV R14D,EAX
MOV R15D,EBP
MOV dword ptr [RSP + 0x8],0x0
LAB_001012a1:
CMP R14D,0x1
JLE 0x00101420
MOV EDI,R15D
CMP R15D,0x1
JLE 0x00101350
MOV EDX,R15D
XOR ECX,ECX
LEA EBP,[R15 + -0x1]
XOR R13D,R13D
LAB_001012c4:
MOV dword ptr [RSP + 0x3c],ECX
MOV dword ptr [RSP + 0x38],EDX
CALL 0x001011f0
MOV ECX,dword ptr [RSP + 0x3c]
MOV EDI,0x1
MOV EDX,dword ptr [RSP + 0x38]
ADD R13D,EAX
TEST R15D,R15D
CMOVLE EDI,R15D
LEA EAX,[RCX + 0x1]
CMP EDI,EAX
JGE 0x00102683
NOP dword ptr [RAX + RAX*0x1]
LAB_001012f8:
CMP R14D,EAX
JLE 0x0010136d
NOP dword ptr [RAX]
LAB_00101300:
MOV EDX,R14D
SUB R14D,0x1
SUB EDX,EAX
LEA R15D,[RDX + -0x1]
LAB_0010130d:
MOV EDI,R14D
SUB EDI,R15D
CALL 0x001011f0
CMP R15D,0x1
JLE 0x00101340
MOV EDI,R15D
MOV dword ptr [RSP + 0x38],EAX
SUB R15D,0x1
CALL 0x001011f0
MOV EDX,dword ptr [RSP + 0x38]
IMUL EDX,EAX
ADD R13D,EDX
JMP 0x0010130d
LAB_00101340:
ADD R13D,EAX
TEST R15D,R15D
JZ 0x00101371
XOR R15D,R15D
JMP 0x0010130d
LAB_00101350:
TEST R15D,R15D
JG 0x00101678
MOV EAX,0x1
MOV R13D,0x1
LEA EBP,[R15 + -0x1]
CMP R14D,EAX
JG 0x00101300
LAB_0010136d:
SUB R14D,0x1
LAB_00101371:
MOV ESI,R13D
ADD R12D,0x1
MOV R15D,EBP
IMUL ESI,EBX
ADD dword ptr [RSP + 0x8],ESI
LAB_00101382:
CMP R12D,0x1
JZ 0x001026dd
LEA R13D,[R12 + -0x1]
MOV EDI,R13D
CMP R13D,0x1
JZ 0x00101b58
MOV EBP,R13D
XOR EBX,EBX
XOR EDX,EDX
LAB_001013a5:
MOV dword ptr [RSP + 0x38],EDX
CALL 0x001011f0
MOV EDX,dword ptr [RSP + 0x38]
ADD EBX,EAX
TEST EDX,EDX
JZ 0x0010266b
NOP dword ptr [RAX]
LAB_001013c0:
LEA EBP,[R12 + -0x3]
CMP R12D,0x2
JZ 0x001012a1
LAB_001013cf:
MOV EDI,R13D
SUB EDI,EBP
CALL 0x001011f0
CMP EBP,0x1
JLE 0x00101408
LAB_001013de:
MOV EDI,EBP
MOV dword ptr [RSP + 0x38],EAX
SUB EBP,0x1
CALL 0x001011f0
MOV EDX,dword ptr [RSP + 0x38]
MOV EDI,R13D
SUB EDI,EBP
IMUL EDX,EAX
ADD EBX,EDX
CALL 0x001011f0
CMP EBP,0x1
JG 0x001013de
NOP dword ptr [RAX]
LAB_00101408:
ADD EBX,EAX
TEST EBP,EBP
JZ 0x001012a1
XOR EBP,EBP
JMP 0x001013cf
LAB_00101420:
ADD dword ptr [RSP + 0x8],EBX
TEST R14D,R14D
JZ 0x00101440
ADD R12D,0x1
SUB R15D,0x1
XOR R14D,R14D
JMP 0x00101382
LAB_00101440:
MOV R13D,dword ptr [RSP + 0x4]
MOV EAX,dword ptr [RSP + 0x8]
ADD dword ptr [RSP + 0xc],0x1
MOV EBP,dword ptr [RSP + 0x18]
IMUL R13D,EAX
ADD dword ptr [RSP + 0x14],R13D
LAB_0010145b:
CMP dword ptr [RSP + 0xc],0x1
JZ 0x001026a2
MOV EAX,dword ptr [RSP + 0xc]
MOV dword ptr [RSP + 0x8],EBP
XOR R13D,R13D
MOV EBX,0x1
MOV dword ptr [RSP + 0x4],0x0
LEA R12D,[RAX + -0x2]
LEA R14D,[RAX + -0x1]
MOV EBP,R12D
LAB_00101489:
CMP R14D,0x1
JLE 0x00101600
MOV EDI,EBP
CMP EBP,0x1
JLE 0x00101540
MOV R8D,EBP
XOR R15D,R15D
LEA R12D,[RBP + -0x1]
XOR EDX,EDX
LAB_001014aa:
MOV dword ptr [RSP + 0x38],EDX
MOV dword ptr [RSP + 0x18],R8D
CALL 0x001011f0
MOV EDX,dword ptr [RSP + 0x38]
MOV R8D,dword ptr [RSP + 0x18]
ADD R15D,EAX
TEST EBP,EBP
LEA EAX,[RDX + 0x1]
MOV EDX,0x1
CMOVLE EDX,EBP
CMP EDX,EAX
JGE 0x00102662
NOP dword ptr [RAX]
LAB_001014e0:
CMP R14D,EAX
JLE 0x0010155c
NOP dword ptr [RAX]
LAB_001014e8:
MOV EDX,R14D
SUB R14D,0x1
SUB EDX,EAX
LEA EBP,[RDX + -0x1]
LAB_001014f4:
MOV EDI,R14D
SUB EDI,EBP
CALL 0x001011f0
CMP EBP,0x1
JLE 0x00101530
LAB_00101503:
MOV EDI,EBP
MOV dword ptr [RSP + 0x18],EAX
SUB EBP,0x1
CALL 0x001011f0
MOV EDX,dword ptr [RSP + 0x18]
MOV EDI,R14D
SUB EDI,EBP
IMUL EDX,EAX
ADD R15D,EDX
CALL 0x001011f0
CMP EBP,0x1
JG 0x00101503
NOP word ptr [RAX + RAX*0x1]
LAB_00101530:
ADD R15D,EAX
TEST EBP,EBP
JZ 0x00101560
XOR EBP,EBP
JMP 0x001014f4
LAB_00101540:
TEST EBP,EBP
JG 0x00101648
MOV EAX,0x1
MOV R15D,0x1
LEA R12D,[RBP + -0x1]
CMP R14D,EAX
JG 0x001014e8
LAB_0010155c:
SUB R14D,0x1
LAB_00101560:
MOV ESI,EBX
ADD R13D,0x1
MOV EBP,R12D
IMUL ESI,R15D
ADD dword ptr [RSP + 0x4],ESI
LAB_00101571:
CMP R13D,0x1
JZ 0x0010268b
LEA R12D,[R13 + -0x1]
MOV EDI,R12D
CMP R12D,0x1
JZ 0x00101b78
MOV EDX,R12D
XOR R15D,R15D
XOR EBX,EBX
LAB_00101594:
MOV dword ptr [RSP + 0x18],EDX
CALL 0x001011f0
MOV EDX,dword ptr [RSP + 0x18]
ADD EBX,EAX
TEST R15D,R15D
JZ 0x00102649
NOP dword ptr [RAX]
LAB_001015b0:
LEA R15D,[R13 + -0x3]
CMP R13D,0x2
JZ 0x00101489
LAB_001015be:
MOV EDI,R12D
SUB EDI,R15D
CALL 0x001011f0
CMP R15D,0x1
JLE 0x001015f0
MOV EDI,R15D
MOV dword ptr [RSP + 0x18],EAX
SUB R15D,0x1
CALL 0x001011f0
MOV EDX,dword ptr [RSP + 0x18]
IMUL EAX,EDX
ADD EBX,EAX
JMP 0x001015be
LAB_001015f0:
ADD EBX,EAX
TEST R15D,R15D
JZ 0x00101489
XOR R15D,R15D
JMP 0x001015be
LAB_00101600:
ADD dword ptr [RSP + 0x4],EBX
TEST R14D,R14D
JZ 0x00101620
ADD R13D,0x1
SUB EBP,0x1
XOR R14D,R14D
JMP 0x00101571
LAB_00101620:
MOV EBP,dword ptr [RSP + 0x8]
CMP EBP,0x1
JG 0x00101281
LAB_0010162d:
MOV ECX,dword ptr [RSP + 0x4]
ADD dword ptr [RSP + 0x14],ECX
TEST EBP,EBP
JZ 0x001016a8
ADD dword ptr [RSP + 0xc],0x1
XOR EBP,EBP
JMP 0x0010145b
LAB_00101648:
LEA R12D,[RBP + -0x1]
MOV R15D,0x1
MOV R8D,R12D
LAB_00101655:
MOV EDI,R8D
MOV EDX,0x1
CMP R8D,0x1
JG 0x001014aa
ADD R15D,0x1
MOV EAX,0x2
JMP 0x001014e0
LAB_00101678:
LEA EBP,[R15 + -0x1]
MOV R13D,0x1
MOV EDX,EBP
LAB_00101684:
MOV EDI,EDX
MOV ECX,0x1
CMP EDX,0x1
JG 0x001012c4
ADD R13D,0x1
MOV EAX,0x2
JMP 0x001012f8
LAB_001016a8:
MOV R14D,dword ptr [RSP + 0x14]
MOV EAX,dword ptr [RSP + 0x10]
ADD dword ptr [RSP + 0x1c],0x1
MOV R12D,dword ptr [RSP + 0x28]
IMUL EAX,R14D
ADD dword ptr [RSP + 0x24],EAX
LAB_001016c3:
CMP dword ptr [RSP + 0x1c],0x1
JZ 0x001026d0
MOV EAX,dword ptr [RSP + 0x1c]
MOV dword ptr [RSP + 0x10],0x0
MOV dword ptr [RSP + 0xc],0x0
MOV dword ptr [RSP + 0x4],0x1
SUB EAX,0x1
MOV dword ptr [RSP + 0x18],R12D
MOV EBP,EAX
LAB_001016f4:
CMP EBP,0x1
JLE 0x00101a9d
LAB_001016fd:
LEA EAX,[RBP + -0x1]
SUB EBP,0x2
XOR R12D,R12D
MOV EBX,0x1
MOV dword ptr [RSP + 0x14],EAX
MOV R14D,EBP
MOV R15D,EAX
MOV dword ptr [RSP + 0x8],0x0
LAB_0010171d:
CMP R15D,0x1
JLE 0x00101890
MOV EDI,R14D
CMP R14D,0x1
JLE 0x001017c8
MOV EDX,R14D
XOR R13D,R13D
LEA EBP,[R14 + -0x1]
XOR ECX,ECX
LAB_00101740:
MOV dword ptr [RSP + 0x38],ECX
MOV dword ptr [RSP + 0x28],EDX
CALL 0x001011f0
MOV ECX,dword ptr [RSP + 0x38]
MOV EDI,0x1
MOV EDX,dword ptr [RSP + 0x28]
ADD R13D,EAX
TEST R14D,R14D
CMOVLE EDI,R14D
LEA EAX,[RCX + 0x1]
CMP EAX,EDI
JLE 0x00102641
NOP
LAB_00101770:
CMP R15D,EAX
JLE 0x001017e5
NOP dword ptr [RAX]
LAB_00101778:
MOV EDX,R15D
SUB R15D,0x1
SUB EDX,EAX
LEA R14D,[RDX + -0x1]
LAB_00101785:
MOV EDI,R15D
SUB EDI,R14D
CALL 0x001011f0
CMP R14D,0x1
JLE 0x001017b8
MOV EDI,R14D
MOV dword ptr [RSP + 0x28],EAX
SUB R14D,0x1
CALL 0x001011f0
MOV EDX,dword ptr [RSP + 0x28]
IMUL EDX,EAX
ADD R13D,EDX
JMP 0x00101785
LAB_001017b8:
ADD R13D,EAX
TEST R14D,R14D
JZ 0x001017e9
XOR R14D,R14D
JMP 0x00101785
LAB_001017c8:
TEST R14D,R14D
JG 0x00101ab8
MOV EAX,0x1
MOV R13D,0x1
LEA EBP,[R14 + -0x1]
CMP R15D,EAX
JG 0x00101778
LAB_001017e5:
SUB R15D,0x1
LAB_001017e9:
MOV ESI,EBX
ADD R12D,0x1
MOV R14D,EBP
IMUL ESI,R13D
ADD dword ptr [RSP + 0x8],ESI
LAB_001017fa:
CMP R12D,0x1
JZ 0x001026c6
LEA R13D,[R12 + -0x1]
MOV EDI,R13D
CMP R13D,0x1
JZ 0x00101b48
MOV EBP,R13D
XOR EBX,EBX
XOR EDX,EDX
LAB_0010181d:
MOV dword ptr [RSP + 0x28],EDX
CALL 0x001011f0
MOV EDX,dword ptr [RSP + 0x28]
ADD EBX,EAX
TEST EDX,EDX
JZ 0x00102629
NOP dword ptr [RAX]
LAB_00101838:
LEA EBP,[R12 + -0x3]
CMP R12D,0x2
JZ 0x0010171d
LAB_00101847:
MOV EDI,R13D
SUB EDI,EBP
CALL 0x001011f0
CMP EBP,0x1
JLE 0x00101880
LAB_00101856:
MOV EDI,EBP
MOV dword ptr [RSP + 0x28],EAX
SUB EBP,0x1
CALL 0x001011f0
MOV EDX,dword ptr [RSP + 0x28]
MOV EDI,R13D
SUB EDI,EBP
IMUL EDX,EAX
ADD EBX,EDX
CALL 0x001011f0
CMP EBP,0x1
JG 0x00101856
NOP dword ptr [RAX]
LAB_00101880:
ADD EBX,EAX
TEST EBP,EBP
JZ 0x0010171d
XOR EBP,EBP
JMP 0x00101847
LAB_00101890:
ADD dword ptr [RSP + 0x8],EBX
TEST R15D,R15D
JZ 0x001018b0
ADD R12D,0x1
SUB R14D,0x1
XOR R15D,R15D
JMP 0x001017fa
LAB_001018b0:
MOV R13D,dword ptr [RSP + 0x4]
MOV EAX,dword ptr [RSP + 0x8]
ADD dword ptr [RSP + 0xc],0x1
MOV EBP,dword ptr [RSP + 0x14]
IMUL R13D,EAX
ADD dword ptr [RSP + 0x10],R13D
LAB_001018cb:
CMP dword ptr [RSP + 0xc],0x1
JZ 0x001026b9
MOV EAX,dword ptr [RSP + 0xc]
MOV dword ptr [RSP + 0x8],EBP
XOR R13D,R13D
MOV EBX,0x1
MOV dword ptr [RSP + 0x4],0x0
LEA R12D,[RAX + -0x2]
LEA R14D,[RAX + -0x1]
MOV EBP,R12D
LAB_001018f9:
CMP R14D,0x1
JLE 0x00101a70
MOV EDI,EBP
CMP EBP,0x1
JLE 0x001019b0
MOV R8D,EBP
XOR R15D,R15D
LEA R12D,[RBP + -0x1]
XOR EDX,EDX
LAB_0010191a:
MOV dword ptr [RSP + 0x28],EDX
MOV dword ptr [RSP + 0x14],R8D
CALL 0x001011f0
MOV EDX,dword ptr [RSP + 0x28]
MOV R8D,dword ptr [RSP + 0x14]
ADD R15D,EAX
TEST EBP,EBP
LEA EAX,[RDX + 0x1]
MOV EDX,0x1
CMOVLE EDX,EBP
CMP EDX,EAX
JGE 0x00102620
NOP dword ptr [RAX]
LAB_00101950:
CMP R14D,EAX
JLE 0x001019cc
NOP dword ptr [RAX]
LAB_00101958:
MOV EDX,R14D
SUB R14D,0x1
SUB EDX,EAX
LEA EBP,[RDX + -0x1]
LAB_00101964:
MOV EDI,R14D
SUB EDI,EBP
CALL 0x001011f0
CMP EBP,0x1
JLE 0x001019a0
LAB_00101973:
MOV EDI,EBP
MOV dword ptr [RSP + 0x14],EAX
SUB EBP,0x1
CALL 0x001011f0
MOV EDX,dword ptr [RSP + 0x14]
MOV EDI,R14D
SUB EDI,EBP
IMUL EDX,EAX
ADD R15D,EDX
CALL 0x001011f0
CMP EBP,0x1
JG 0x00101973
NOP word ptr [RAX + RAX*0x1]
LAB_001019a0:
ADD R15D,EAX
TEST EBP,EBP
JZ 0x001019d0
XOR EBP,EBP
JMP 0x00101964
LAB_001019b0:
TEST EBP,EBP
JG 0x00101ae8
MOV EAX,0x1
MOV R15D,0x1
LEA R12D,[RBP + -0x1]
CMP R14D,EAX
JG 0x00101958
LAB_001019cc:
SUB R14D,0x1
LAB_001019d0:
MOV ESI,EBX
ADD R13D,0x1
MOV EBP,R12D
IMUL ESI,R15D
ADD dword ptr [RSP + 0x4],ESI
LAB_001019e1:
CMP R13D,0x1
JZ 0x001026af
LEA R12D,[R13 + -0x1]
MOV EDI,R12D
CMP R12D,0x1
JZ 0x00101b68
MOV EDX,R12D
XOR EBX,EBX
XOR R15D,R15D
LAB_00101a04:
MOV dword ptr [RSP + 0x14],EDX
CALL 0x001011f0
MOV EDX,dword ptr [RSP + 0x14]
ADD EBX,EAX
TEST R15D,R15D
JZ 0x00102607
NOP dword ptr [RAX]
LAB_00101a20:
LEA R15D,[R13 + -0x3]
CMP R13D,0x2
JZ 0x001018f9
LAB_00101a2e:
MOV EDI,R12D
SUB EDI,R15D
CALL 0x001011f0
CMP R15D,0x1
JLE 0x00101a60
MOV EDI,R15D
MOV dword ptr [RSP + 0x14],EAX
SUB R15D,0x1
CALL 0x001011f0
MOV EDX,dword ptr [RSP + 0x14]
IMUL EAX,EDX
ADD EBX,EAX
JMP 0x00101a2e
LAB_00101a60:
ADD EBX,EAX
TEST R15D,R15D
JZ 0x001018f9
XOR R15D,R15D
JMP 0x00101a2e
LAB_00101a70:
ADD dword ptr [RSP + 0x4],EBX
TEST R14D,R14D
JZ 0x00101a90
ADD R13D,0x1
SUB EBP,0x1
XOR R14D,R14D
JMP 0x001019e1
LAB_00101a90:
MOV EBP,dword ptr [RSP + 0x8]
CMP EBP,0x1
JG 0x001016fd
LAB_00101a9d:
MOV ECX,dword ptr [RSP + 0x4]
ADD dword ptr [RSP + 0x10],ECX
TEST EBP,EBP
JZ 0x00101b18
ADD dword ptr [RSP + 0xc],0x1
XOR EBP,EBP
JMP 0x001018cb
LAB_00101ab8:
LEA EBP,[R14 + -0x1]
MOV R13D,0x1
MOV EDX,EBP
LAB_00101ac4:
MOV EDI,EDX
MOV ECX,0x1
CMP EDX,0x1
JG 0x00101740
ADD R13D,0x1
MOV EAX,0x2
JMP 0x00101770
LAB_00101ae8:
LEA R12D,[RBP + -0x1]
MOV R15D,0x1
MOV R8D,R12D
LAB_00101af5:
MOV EDI,R8D
MOV EDX,0x1
CMP R8D,0x1
JG 0x0010191a
ADD R15D,0x1
MOV EAX,0x2
JMP 0x00101950
LAB_00101b18:
MOV R12D,dword ptr [RSP + 0x18]
CMP R12D,0x1
JG 0x00101254
LAB_00101b27:
MOV ECX,dword ptr [RSP + 0x10]
ADD dword ptr [RSP + 0x24],ECX
TEST R12D,R12D
JZ 0x00101b85
ADD dword ptr [RSP + 0x1c],0x1
XOR R12D,R12D
JMP 0x001016c3
LAB_00101b48:
MOV EBX,0x1
LAB_00101b4d:
ADD EBX,0x1
JMP 0x00101838
LAB_00101b58:
MOV EBX,0x1
LAB_00101b5d:
ADD EBX,0x1
JMP 0x001013c0
LAB_00101b68:
MOV EBX,0x1
LAB_00101b6d:
ADD EBX,0x1
JMP 0x00101a20
LAB_00101b78:
MOV EBX,0x1
LAB_00101b7d:
ADD EBX,0x1
JMP 0x001015b0
LAB_00101b85:
MOV EAX,dword ptr [RSP + 0x20]
MOV ECX,dword ptr [RSP + 0x24]
ADD dword ptr [RSP + 0x2c],0x1
MOV EBX,dword ptr [RSP + 0x34]
IMUL EAX,ECX
ADD dword ptr [RSP + 0x30],EAX
CMP dword ptr [RSP + 0x2c],0x1
JZ 0x00102560
LAB_00101ba8:
MOV EAX,dword ptr [RSP + 0x2c]
XOR R15D,R15D
MOV dword ptr [RSP + 0x28],EBX
MOV dword ptr [RSP + 0x20],0x0
MOV dword ptr [RSP + 0x10],0x1
LEA R14D,[RAX + -0x1]
MOV dword ptr [RSP + 0x1c],R15D
MOV EBP,R14D
LAB_00101bcf:
CMP EBP,0x1
JLE 0x001024dd
LAB_00101bd8:
LEA R12D,[RBP + -0x1]
MOV dword ptr [RSP + 0x8],0x0
MOV EBP,0x1
MOV dword ptr [RSP + 0xc],0x0
MOV R15D,R12D
MOV dword ptr [RSP + 0x24],R12D
LAB_00101bf9:
CMP R15D,0x1
JLE 0x00101fcf
LAB_00101c03:
LEA EAX,[R15 + -0x1]
LEA R12D,[R15 + -0x2]
MOV dword ptr [RSP + 0x18],EBP
XOR R13D,R13D
MOV dword ptr [RSP + 0x14],EAX
MOV EBX,0x1
MOV R15D,R12D
MOV EBP,EAX
MOV dword ptr [RSP + 0x4],0x0
LAB_00101c28:
CMP EBP,0x1
JLE 0x00101da0
MOV EDI,R15D
CMP R15D,0x1
JLE 0x00101ce0
MOV EDX,R15D
XOR R14D,R14D
LEA R12D,[R15 + -0x1]
XOR ECX,ECX
LAB_00101c4a:
MOV dword ptr [RSP + 0x38],ECX
MOV dword ptr [RSP + 0x34],EDX
CALL 0x001011f0
MOV ECX,dword ptr [RSP + 0x38]
MOV EDI,0x1
MOV EDX,dword ptr [RSP + 0x34]
ADD R14D,EAX
TEST R15D,R15D
CMOVLE EDI,R15D
LEA EAX,[RCX + 0x1]
CMP EAX,EDI
JLE 0x001025ff
NOP dword ptr [RAX]
LAB_00101c80:
CMP EBP,EAX
JLE 0x00101cfc
NOP dword ptr [RAX]
LAB_00101c88:
MOV EDX,EBP
SUB EBP,0x1
SUB EDX,EAX
LEA R15D,[RDX + -0x1]
LAB_00101c93:
MOV EDI,EBP
SUB EDI,R15D
CALL 0x001011f0
CMP R15D,0x1
JLE 0x00101cd0
LAB_00101ca3:
MOV EDI,R15D
MOV dword ptr [RSP + 0x34],EAX
SUB R15D,0x1
CALL 0x001011f0
MOV EDX,dword ptr [RSP + 0x34]
MOV EDI,EBP
SUB EDI,R15D
IMUL EDX,EAX
ADD R14D,EDX
CALL 0x001011f0
CMP R15D,0x1
JG 0x00101ca3
NOP dword ptr [RAX]
LAB_00101cd0:
ADD R14D,EAX
TEST R15D,R15D
JZ 0x00101cff
XOR R15D,R15D
JMP 0x00101c93
LAB_00101ce0:
TEST R15D,R15D
JG 0x00102020
MOV EAX,0x1
MOV R14D,0x1
LEA R12D,[R15 + -0x1]
CMP EBP,EAX
JG 0x00101c88
LAB_00101cfc:
SUB EBP,0x1
LAB_00101cff:
MOV ESI,EBX
ADD R13D,0x1
MOV R15D,R12D
IMUL ESI,R14D
ADD dword ptr [RSP + 0x4],ESI
LAB_00101d10:
CMP R13D,0x1
JZ 0x001026e7
LEA R14D,[R13 + -0x1]
MOV EDI,R14D
CMP R14D,0x1
JZ 0x00102508
MOV R12D,R14D
XOR EBX,EBX
XOR EDX,EDX
LAB_00101d32:
MOV dword ptr [RSP + 0x34],EDX
CALL 0x001011f0
MOV EDX,dword ptr [RSP + 0x34]
ADD EBX,EAX
TEST EDX,EDX
JZ 0x001025e4
NOP dword ptr [RAX]
LAB_00101d50:
LEA R12D,[R13 + -0x3]
CMP R13D,0x2
JZ 0x00101c28
LAB_00101d5e:
MOV EDI,R14D
SUB EDI,R12D
CALL 0x001011f0
CMP R12D,0x1
JLE 0x00101d90
MOV EDI,R12D
MOV dword ptr [RSP + 0x34],EAX
SUB R12D,0x1
CALL 0x001011f0
MOV EDX,dword ptr [RSP + 0x34]
IMUL EAX,EDX
ADD EBX,EAX
JMP 0x00101d5e
LAB_00101d90:
ADD EBX,EAX
TEST R12D,R12D
JZ 0x00101c28
XOR R12D,R12D
JMP 0x00101d5e
LAB_00101da0:
ADD dword ptr [RSP + 0x4],EBX
TEST EBP,EBP
JZ 0x00101dc0
ADD R13D,0x1
SUB R15D,0x1
XOR EBP,EBP
JMP 0x00101d10
LAB_00101dc0:
MOV EBP,dword ptr [RSP + 0x18]
MOV R14D,dword ptr [RSP + 0x4]
ADD dword ptr [RSP + 0x8],0x1
MOV R15D,dword ptr [RSP + 0x14]
IMUL R14D,EBP
ADD dword ptr [RSP + 0xc],R14D
LAB_00101ddc:
CMP dword ptr [RSP + 0x8],0x1
JZ 0x001026fb
MOV EAX,dword ptr [RSP + 0x8]
MOV dword ptr [RSP + 0x14],R15D
XOR R13D,R13D
XOR EBP,EBP
MOV EBX,0x1
LEA R12D,[RAX + -0x1]
LEA ESI,[RAX + -0x2]
MOV ECX,R12D
MOV R15D,ESI
LAB_00101e07:
CMP ECX,0x1
JLE 0x00101f90
MOV EDI,R15D
CMP R15D,0x1
JLE 0x00101eb8
LEA EAX,[R15 + -0x1]
MOV EDX,R15D
XOR R14D,R14D
XOR R12D,R12D
MOV dword ptr [RSP + 0x4],EAX
LAB_00101e2e:
MOV dword ptr [RSP + 0x34],ECX
MOV dword ptr [RSP + 0x18],EDX
CALL 0x001011f0
MOV EDI,0x1
MOV EDX,dword ptr [RSP + 0x18]
MOV ECX,dword ptr [RSP + 0x34]
ADD R14D,EAX
TEST R15D,R15D
LEA EAX,[R12 + 0x1]
CMOVLE EDI,R15D
CMP EDI,EAX
JGE 0x001025dc
NOP
LAB_00101e60:
CMP ECX,EAX
JLE 0x00101ed8
NOP dword ptr [RAX]
LAB_00101e68:
MOV EDX,ECX
LEA R12D,[RCX + -0x1]
SUB EDX,EAX
LEA R15D,[RDX + -0x1]
LAB_00101e74:
MOV EDI,R12D
SUB EDI,R15D
CALL 0x001011f0
CMP R15D,0x1
JLE 0x00101ea8
MOV EDI,R15D
MOV dword ptr [RSP + 0x18],EAX
SUB R15D,0x1
CALL 0x001011f0
MOV EDX,dword ptr [RSP + 0x18]
IMUL EDX,EAX
ADD R14D,EDX
JMP 0x00101e74
LAB_00101ea8:
ADD R14D,EAX
TEST R15D,R15D
JZ 0x00101edc
XOR R15D,R15D
JMP 0x00101e74
LAB_00101eb8:
TEST R15D,R15D
JG 0x00101fe8
LEA ESI,[R15 + -0x1]
MOV EAX,0x1
MOV R14D,0x1
MOV dword ptr [RSP + 0x4],ESI
CMP ECX,EAX
JG 0x00101e68
LAB_00101ed8:
LEA R12D,[RCX + -0x1]
LAB_00101edc:
IMUL EBX,R14D
MOV R15D,dword ptr [RSP + 0x4]
ADD R13D,0x1
MOV ECX,R12D
ADD EBP,EBX
LAB_00101eee:
CMP R13D,0x1
JZ 0x001026f1
LEA R12D,[R13 + -0x1]
MOV EDI,R12D
CMP R12D,0x1
JZ 0x00102528
MOV R14D,R12D
XOR EDX,EDX
XOR EBX,EBX
LAB_00101f10:
MOV dword ptr [RSP + 0x18],EDX
MOV dword ptr [RSP + 0x4],ECX
CALL 0x001011f0
MOV EDX,dword ptr [RSP + 0x18]
MOV ECX,dword ptr [RSP + 0x4]
ADD EBX,EAX
TEST EDX,EDX
JZ 0x001025c1
NOP
LAB_00101f30:
LEA R14D,[R13 + -0x3]
CMP R13D,0x2
JZ 0x00101e07
MOV dword ptr [RSP + 0x4],EBP
MOV EBP,EBX
MOV EBX,R14D
MOV R14D,ECX
LAB_00101f4a:
MOV EDI,R12D
SUB EDI,EBX
CALL 0x001011f0
CMP EBX,0x1
JLE 0x00101f80
LAB_00101f59:
MOV EDI,EBX
MOV dword ptr [RSP + 0x18],EAX
SUB EBX,0x1
CALL 0x001011f0
MOV EDX,dword ptr [RSP + 0x18]
MOV EDI,R12D
SUB EDI,EBX
IMUL EDX,EAX
ADD EBP,EDX
CALL 0x001011f0
CMP EBX,0x1
JG 0x00101f59
NOP
LAB_00101f80:
ADD EBP,EAX
TEST EBX,EBX
JZ 0x00101fa8
XOR EBX,EBX
JMP 0x00101f4a
LAB_00101f90:
ADD EBP,EBX
TEST ECX,ECX
JZ 0x00101fc0
ADD R13D,0x1
SUB R15D,0x1
XOR ECX,ECX
JMP 0x00101eee
LAB_00101fa8:
MOV EBX,EBP
MOV ECX,R14D
MOV EBP,dword ptr [RSP + 0x4]
JMP 0x00101e07
LAB_00101fc0:
MOV R15D,dword ptr [RSP + 0x14]
CMP R15D,0x1
JG 0x00101c03
LAB_00101fcf:
ADD dword ptr [RSP + 0xc],EBP
TEST R15D,R15D
JZ 0x00102050
ADD dword ptr [RSP + 0x8],0x1
XOR R15D,R15D
JMP 0x00101ddc
LAB_00101fe8:
LEA EAX,[R15 + -0x1]
MOV R14D,0x1
MOV dword ptr [RSP + 0x4],EAX
MOV EDX,EAX
LAB_00101ff8:
MOV EDI,EDX
MOV R12D,0x1
CMP EDX,0x1
JG 0x00101e2e
ADD R14D,0x1
MOV EAX,0x2
JMP 0x00101e60
LAB_00102020:
LEA R12D,[R15 + -0x1]
MOV R14D,0x1
MOV EDX,R12D
LAB_0010202d:
MOV EDI,EDX
MOV ECX,0x1
CMP EDX,0x1
JG 0x00101c4a
ADD R14D,0x1
MOV EAX,0x2
JMP 0x00101c80
LAB_00102050:
MOV EAX,dword ptr [RSP + 0x10]
MOV ECX,dword ptr [RSP + 0xc]
ADD dword ptr [RSP + 0x1c],0x1
MOV R12D,dword ptr [RSP + 0x24]
IMUL EAX,ECX
ADD dword ptr [RSP + 0x20],EAX
MOV EBP,R12D
LAB_0010206c:
CMP dword ptr [RSP + 0x1c],0x1
JZ 0x00102695
MOV EAX,dword ptr [RSP + 0x1c]
MOV dword ptr [RSP + 0x10],0x0
MOV dword ptr [RSP + 0xc],0x0
MOV dword ptr [RSP + 0x4],0x1
LEA R12D,[RAX + -0x1]
MOV dword ptr [RSP + 0x18],EBP
LAB_0010209b:
CMP R12D,0x1
JLE 0x0010244f
LAB_001020a5:
LEA R15D,[R12 + -0x1]
LEA EBP,[R12 + -0x2]
XOR R13D,R13D
MOV EBX,0x1
MOV dword ptr [RSP + 0x8],0x0
MOV R12D,EBP
MOV dword ptr [RSP + 0x14],R15D
LAB_001020c7:
CMP R15D,0x1
JLE 0x00102240
MOV EDI,R12D
CMP R12D,0x1
JLE 0x00102178
MOV EDX,R12D
XOR ECX,ECX
LEA EBP,[R12 + -0x1]
XOR R14D,R14D
LAB_001020eb:
MOV dword ptr [RSP + 0x34],ECX
MOV dword ptr [RSP + 0x24],EDX
CALL 0x001011f0
MOV ECX,dword ptr [RSP + 0x34]
MOV EDI,0x1
MOV EDX,dword ptr [RSP + 0x24]
ADD R14D,EAX
TEST R12D,R12D
CMOVLE EDI,R12D
LEA EAX,[RCX + 0x1]
CMP EDI,EAX
JGE 0x001025b9
NOP word ptr [RAX + RAX*0x1]
LAB_00102120:
CMP R15D,EAX
JLE 0x00102196
NOP dword ptr [RAX]
LAB_00102128:
MOV EDX,R15D
SUB R15D,0x1
SUB EDX,EAX
LEA R12D,[RDX + -0x1]
LAB_00102135:
MOV EDI,R15D
SUB EDI,R12D
CALL 0x001011f0
CMP R12D,0x1
JLE 0x00102168
MOV EDI,R12D
MOV dword ptr [RSP + 0x24],EAX
SUB R12D,0x1
CALL 0x001011f0
MOV EDX,dword ptr [RSP + 0x24]
IMUL EDX,EAX
ADD R14D,EDX
JMP 0x00102135
LAB_00102168:
ADD R14D,EAX
TEST R12D,R12D
JZ 0x0010219a
XOR R12D,R12D
JMP 0x00102135
LAB_00102178:
TEST R12D,R12D
JG 0x00102470
MOV EAX,0x1
MOV R14D,0x1
LEA EBP,[R12 + -0x1]
CMP R15D,EAX
JG 0x00102128
LAB_00102196:
SUB R15D,0x1
LAB_0010219a:
MOV ESI,EBX
ADD R13D,0x1
MOV R12D,EBP
IMUL ESI,R14D
ADD dword ptr [RSP + 0x8],ESI
LAB_001021ab:
CMP R13D,0x1
JZ 0x0010271c
LEA R14D,[R13 + -0x1]
MOV EDI,R14D
CMP R14D,0x1
JZ 0x001024f8
MOV EBP,R14D
XOR EBX,EBX
XOR EDX,EDX
LAB_001021cd:
MOV dword ptr [RSP + 0x24],EDX
CALL 0x001011f0
MOV EDX,dword ptr [RSP + 0x24]
ADD EBX,EAX
TEST EDX,EDX
JZ 0x001025a1
NOP dword ptr [RAX]
LAB_001021e8:
LEA EBP,[R13 + -0x3]
CMP R13D,0x2
JZ 0x001020c7
LAB_001021f6:
MOV EDI,R14D
SUB EDI,EBP
CALL 0x001011f0
CMP EBP,0x1
JLE 0x00102230
LAB_00102205:
MOV EDI,EBP
MOV dword ptr [RSP + 0x24],EAX
SUB EBP,0x1
CALL 0x001011f0
MOV EDX,dword ptr [RSP + 0x24]
MOV EDI,R14D
SUB EDI,EBP
IMUL EDX,EAX
ADD EBX,EDX
CALL 0x001011f0
CMP EBP,0x1
JG 0x00102205
NOP dword ptr [RAX + RAX*0x1]
LAB_00102230:
ADD EBX,EAX
TEST EBP,EBP
JZ 0x001020c7
XOR EBP,EBP
JMP 0x001021f6
LAB_00102240:
ADD dword ptr [RSP + 0x8],EBX
TEST R15D,R15D
JZ 0x00102260
ADD R13D,0x1
SUB R12D,0x1
XOR R15D,R15D
JMP 0x001021ab
LAB_00102260:
MOV R14D,dword ptr [RSP + 0x4]
MOV EAX,dword ptr [RSP + 0x8]
ADD dword ptr [RSP + 0xc],0x1
MOV R15D,dword ptr [RSP + 0x14]
IMUL R14D,EAX
ADD dword ptr [RSP + 0x10],R14D
MOV R12D,R15D
LAB_0010227f:
CMP dword ptr [RSP + 0xc],0x1
JZ 0x0010270f
MOV EAX,dword ptr [RSP + 0xc]
MOV dword ptr [RSP + 0x8],R12D
XOR R13D,R13D
MOV EBX,0x1
MOV dword ptr [RSP + 0x4],0x0
LEA EBP,[RAX + -0x1]
LEA R15D,[RAX + -0x2]
MOV R14D,R15D
MOV R12D,EBP
LAB_001022b0:
CMP R12D,0x1
JLE 0x00102420
MOV EDI,R14D
CMP R14D,0x1
JLE 0x00102358
MOV EDX,R14D
XOR EBP,EBP
LEA R15D,[R14 + -0x1]
XOR ECX,ECX
LAB_001022d2:
MOV dword ptr [RSP + 0x24],ECX
MOV dword ptr [RSP + 0x14],EDX
CALL 0x001011f0
MOV ECX,dword ptr [RSP + 0x24]
MOV EDI,0x1
MOV EDX,dword ptr [RSP + 0x14]
ADD EBP,EAX
TEST R14D,R14D
CMOVLE EDI,R14D
LEA EAX,[RCX + 0x1]
CMP EDI,EAX
JGE 0x00102599
LAB_00102300:
CMP R12D,EAX
JLE 0x00102374
NOP dword ptr [RAX]
LAB_00102308:
MOV EDX,R12D
SUB R12D,0x1
SUB EDX,EAX
LEA R14D,[RDX + -0x1]
LAB_00102315:
MOV EDI,R12D
SUB EDI,R14D
CALL 0x001011f0
CMP R14D,0x1
JLE 0x00102348
MOV EDI,R14D
MOV dword ptr [RSP + 0x14],EAX
SUB R14D,0x1
CALL 0x001011f0
MOV EDX,dword ptr [RSP + 0x14]
IMUL EDX,EAX
ADD EBP,EDX
JMP 0x00102315
LAB_00102348:
ADD EBP,EAX
TEST R14D,R14D
JZ 0x00102378
XOR R14D,R14D
JMP 0x00102315
LAB_00102358:
TEST R14D,R14D
JG 0x001024a0
MOV EAX,0x1
MOV EBP,0x1
LEA R15D,[R14 + -0x1]
CMP R12D,EAX
JG 0x00102308
LAB_00102374:
SUB R12D,0x1
LAB_00102378:
MOV ESI,EBX
ADD R13D,0x1
MOV R14D,R15D
IMUL ESI,EBP
ADD dword ptr [RSP + 0x4],ESI
LAB_00102388:
CMP R13D,0x1
JZ 0x00102705
LEA EBP,[R13 + -0x1]
MOV EDI,EBP
CMP EBP,0x1
JZ 0x00102518
MOV R15D,EBP
XOR EDX,EDX
XOR EBX,EBX
LAB_001023a8:
MOV dword ptr [RSP + 0x14],EDX
CALL 0x001011f0
MOV EDX,dword ptr [RSP + 0x14]
ADD EBX,EAX
TEST EDX,EDX
JZ 0x00102582
NOP
LAB_001023c0:
LEA R15D,[R13 + -0x3]
CMP R13D,0x2
JZ 0x001022b0
LAB_001023ce:
MOV EDI,EBP
SUB EDI,R15D
CALL 0x001011f0
CMP R15D,0x1
JLE 0x00102410
LAB_001023de:
MOV EDI,R15D
MOV dword ptr [RSP + 0x14],EAX
SUB R15D,0x1
CALL 0x001011f0
MOV EDX,dword ptr [RSP + 0x14]
MOV EDI,EBP
SUB EDI,R15D
IMUL EDX,EAX
ADD EBX,EDX
CALL 0x001011f0
CMP R15D,0x1
JG 0x001023de
NOP word ptr [RAX + RAX*0x1]
LAB_00102410:
ADD EBX,EAX
TEST R15D,R15D
JZ 0x001022b0
XOR R15D,R15D
JMP 0x001023ce
LAB_00102420:
ADD dword ptr [RSP + 0x4],EBX
TEST R12D,R12D
JZ 0x00102440
ADD R13D,0x1
SUB R14D,0x1
XOR R12D,R12D
JMP 0x00102388
LAB_00102440:
MOV R12D,dword ptr [RSP + 0x8]
CMP R12D,0x1
JG 0x001020a5
LAB_0010244f:
MOV ECX,dword ptr [RSP + 0x4]
ADD dword ptr [RSP + 0x10],ECX
TEST R12D,R12D
JZ 0x001024d0
ADD dword ptr [RSP + 0xc],0x1
XOR R12D,R12D
JMP 0x0010227f
LAB_00102470:
LEA EBP,[R12 + -0x1]
MOV R14D,0x1
MOV EDX,EBP
LAB_0010247d:
MOV EDI,EDX
MOV ECX,0x1
CMP EDX,0x1
JG 0x001020eb
ADD R14D,0x1
MOV EAX,0x2
JMP 0x00102120
LAB_001024a0:
LEA R15D,[R14 + -0x1]
MOV EBP,0x1
MOV EDX,R15D
LAB_001024ac:
MOV EDI,EDX
MOV ECX,0x1
CMP EDX,0x1
JG 0x001022d2
ADD EBP,0x1
MOV EAX,0x2
JMP 0x00102300
LAB_001024d0:
MOV EBP,dword ptr [RSP + 0x18]
CMP EBP,0x1
JG 0x00101bd8
LAB_001024dd:
MOV ECX,dword ptr [RSP + 0x10]
ADD dword ptr [RSP + 0x20],ECX
TEST EBP,EBP
JZ 0x00102535
ADD dword ptr [RSP + 0x1c],0x1
XOR EBP,EBP
JMP 0x0010206c
LAB_001024f8:
MOV EBX,0x1
LAB_001024fd:
ADD EBX,0x1
JMP 0x001021e8
LAB_00102508:
MOV EBX,0x1
LAB_0010250d:
ADD EBX,0x1
JMP 0x00101d50
LAB_00102518:
MOV EBX,0x1
LAB_0010251d:
ADD EBX,0x1
JMP 0x001023c0
LAB_00102528:
MOV EBX,0x1
LAB_0010252d:
ADD EBX,0x1
JMP 0x00101f30
LAB_00102535:
MOV EBX,dword ptr [RSP + 0x28]
CMP EBX,0x1
JG 0x00101228
LAB_00102542:
MOV ECX,dword ptr [RSP + 0x20]
ADD dword ptr [RSP + 0x30],ECX
TEST EBX,EBX
JZ 0x0010256d
ADD dword ptr [RSP + 0x2c],0x1
XOR EBX,EBX
CMP dword ptr [RSP + 0x2c],0x1
JNZ 0x00101ba8
LAB_00102560:
MOV dword ptr [RSP + 0x20],0x1
JMP 0x0010121f
LAB_0010256d:
MOV EBP,dword ptr [RSP + 0x30]
LAB_00102571:
ADD RSP,0x48
MOV EAX,EBP
POP RBX
POP RBP
POP R12
POP R13
POP R14
POP R15
RET
LAB_00102582:
SUB R15D,0x1
CMP R15D,0x1
JBE 0x0010251d
MOV EDI,R15D
MOV EDX,0x1
JMP 0x001023a8
LAB_00102599:
SUB EDX,0x1
JMP 0x001024ac
LAB_001025a1:
SUB EBP,0x1
CMP EBP,0x1
JBE 0x001024fd
MOV EDI,EBP
MOV EDX,0x1
JMP 0x001021cd
LAB_001025b9:
SUB EDX,0x1
JMP 0x0010247d
LAB_001025c1:
SUB R14D,0x1
CMP R14D,0x1
JBE 0x0010252d
MOV EDI,R14D
MOV EDX,0x1
JMP 0x00101f10
LAB_001025dc:
SUB EDX,0x1
JMP 0x00101ff8
LAB_001025e4:
SUB R12D,0x1
CMP R12D,0x1
JBE 0x0010250d
MOV EDI,R12D
MOV EDX,0x1
JMP 0x00101d32
LAB_001025ff:
SUB EDX,0x1
JMP 0x0010202d
LAB_00102607:
SUB EDX,0x1
CMP EDX,0x1
JBE 0x00101b6d
MOV EDI,EDX
MOV R15D,0x1
JMP 0x00101a04
LAB_00102620:
SUB R8D,0x1
JMP 0x00101af5
LAB_00102629:
SUB EBP,0x1
CMP EBP,0x1
JBE 0x00101b4d
MOV EDI,EBP
MOV EDX,0x1
JMP 0x0010181d
LAB_00102641:
SUB EDX,0x1
JMP 0x00101ac4
LAB_00102649:
SUB EDX,0x1
CMP EDX,0x1
JBE 0x00101b7d
MOV EDI,EDX
MOV R15D,0x1
JMP 0x00101594
LAB_00102662:
SUB R8D,0x1
JMP 0x00101655
LAB_0010266b:
SUB EBP,0x1
CMP EBP,0x1
JBE 0x00101b5d
MOV EDI,EBP
MOV EDX,0x1
JMP 0x001013a5
LAB_00102683:
SUB EDX,0x1
JMP 0x00101684
LAB_0010268b:
MOV EBX,0x1
JMP 0x00101489
LAB_00102695:
MOV dword ptr [RSP + 0x10],0x1
JMP 0x00101bcf
LAB_001026a2:
MOV dword ptr [RSP + 0x4],0x1
JMP 0x00101278
LAB_001026af:
MOV EBX,0x1
JMP 0x001018f9
LAB_001026b9:
MOV dword ptr [RSP + 0x4],0x1
JMP 0x001016f4
LAB_001026c6:
MOV EBX,0x1
JMP 0x0010171d
LAB_001026d0:
MOV dword ptr [RSP + 0x10],0x1
JMP 0x0010124a
LAB_001026dd:
MOV EBX,0x1
JMP 0x001012a1
LAB_001026e7:
MOV EBX,0x1
JMP 0x00101c28
LAB_001026f1:
MOV EBX,0x1
JMP 0x00101e07
LAB_001026fb:
MOV EBP,0x1
JMP 0x00101bf9
LAB_00102705:
MOV EBX,0x1
JMP 0x001022b0
LAB_0010270f:
MOV dword ptr [RSP + 0x4],0x1
JMP 0x0010209b
LAB_0010271c:
MOV EBX,0x1
JMP 0x001020c7 | /* func0(int) [clone .part.0] */
int func0(int param_1)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
int iVar6;
int iVar7;
int iVar8;
uint uVar9;
int iVar10;
uint uVar11;
uint uVar12;
int iVar13;
int iVar14;
int iVar15;
bool bVar16;
int local_74;
int local_70;
int local_6c;
int local_68;
int local_64;
int local_5c;
int local_58;
int local_54;
int local_4c;
int local_48;
if (param_1 < 1) {
return 0;
}
iVar3 = param_1 + -1;
local_4c = 0;
local_48 = 0;
do {
local_58 = 1;
iVar13 = local_4c;
joined_r0x00101222:
if (1 < iVar3) {
iVar3 = iVar3 + -1;
local_5c = 0;
local_54 = 0;
iVar10 = iVar3;
do {
local_68 = 1;
iVar8 = local_5c;
joined_r0x0010124e:
if (1 < iVar10) {
iVar10 = iVar10 + -1;
local_6c = 0;
local_64 = 0;
iVar7 = iVar10;
LAB_00101278:
local_74 = 1;
if (iVar7 < 2) goto LAB_0010162d;
LAB_00101281:
iVar6 = iVar7 + -2;
iVar4 = 1;
local_70 = 0;
uVar11 = 0;
iVar5 = iVar7 + -1;
LAB_001012a1:
uVar12 = uVar11;
if (iVar5 < 2) {
local_70 = local_70 + iVar4;
if (iVar5 == 0) goto LAB_00101440;
iVar5 = 0;
}
else {
iVar15 = iVar6;
if (iVar6 < 2) {
if (0 < iVar6) {
iVar14 = 1;
goto LAB_00101684;
}
iVar2 = 1;
iVar14 = 1;
if (1 < iVar5) goto LAB_00101300;
}
else {
iVar2 = 0;
iVar14 = 0;
do {
iVar1 = func0(iVar15);
iVar14 = iVar14 + iVar1;
iVar1 = 1;
if (iVar6 < 1) {
iVar1 = iVar6;
}
iVar2 = iVar2 + 1;
if (iVar1 < iVar2) goto LAB_001012f8;
LAB_00101684:
iVar15 = iVar15 + -1;
iVar2 = 1;
} while (1 < iVar15);
iVar14 = iVar14 + 1;
iVar2 = 2;
LAB_001012f8:
if (iVar2 < iVar5) {
LAB_00101300:
iVar15 = (iVar5 - iVar2) + -1;
while( true ) {
for (; iVar2 = func0((iVar5 + -1) - iVar15), 1 < iVar15; iVar15 = iVar15 + -1) {
iVar1 = func0(iVar15);
iVar14 = iVar14 + iVar2 * iVar1;
}
iVar14 = iVar14 + iVar2;
if (iVar15 == 0) break;
iVar15 = 0;
}
}
}
iVar5 = iVar5 + -1;
local_70 = local_70 + iVar14 * iVar4;
}
iVar6 = iVar6 + -1;
uVar11 = uVar12 + 1;
if (uVar11 == 1) {
iVar4 = 1;
}
else {
if (uVar12 == 1) {
iVar4 = 1;
LAB_00101b5d:
iVar4 = iVar4 + 1;
}
else {
iVar4 = 0;
bVar16 = false;
uVar9 = uVar12;
while( true ) {
iVar15 = func0(uVar9);
iVar4 = iVar4 + iVar15;
if (bVar16) break;
uVar9 = uVar9 - 1;
if (uVar9 < 2) goto LAB_00101b5d;
bVar16 = true;
}
}
iVar15 = uVar12 - 2;
if (uVar11 != 2) {
while( true ) {
iVar14 = func0(uVar12 - iVar15);
while (1 < iVar15) {
iVar2 = func0(iVar15);
iVar4 = iVar4 + iVar14 * iVar2;
iVar14 = func0(uVar12 - (iVar15 + -1));
iVar15 = iVar15 + -1;
}
iVar4 = iVar4 + iVar14;
if (iVar15 == 0) break;
iVar15 = 0;
}
}
}
goto LAB_001012a1;
}
local_54 = local_54 + local_68;
if (iVar10 == 0) {
local_48 = local_48 + local_58 * local_54;
goto joined_r0x00101ba2;
}
iVar10 = 0;
LAB_001016c3:
local_5c = iVar8 + 1;
if (local_5c != 1) {
local_68 = 0;
local_6c = 0;
LAB_001016f4:
local_74 = 1;
if (iVar8 < 2) goto LAB_00101a9d;
LAB_001016fd:
iVar7 = iVar8 + -2;
iVar6 = 1;
local_70 = 0;
uVar11 = 0;
iVar4 = iVar8 + -1;
LAB_0010171d:
uVar12 = uVar11;
if (iVar4 < 2) {
local_70 = local_70 + iVar6;
if (iVar4 == 0) goto LAB_001018b0;
iVar4 = 0;
}
else {
iVar5 = iVar7;
if (iVar7 < 2) {
if (0 < iVar7) {
iVar15 = 1;
goto LAB_00101ac4;
}
iVar14 = 1;
iVar15 = 1;
if (1 < iVar4) goto LAB_00101778;
}
else {
iVar15 = 0;
iVar14 = 0;
do {
iVar2 = func0(iVar5);
iVar15 = iVar15 + iVar2;
iVar2 = 1;
if (iVar7 < 1) {
iVar2 = iVar7;
}
iVar14 = iVar14 + 1;
if (iVar2 < iVar14) goto LAB_00101770;
LAB_00101ac4:
iVar5 = iVar5 + -1;
iVar14 = 1;
} while (1 < iVar5);
iVar15 = iVar15 + 1;
iVar14 = 2;
LAB_00101770:
if (iVar14 < iVar4) {
LAB_00101778:
iVar5 = (iVar4 - iVar14) + -1;
while( true ) {
for (; iVar14 = func0((iVar4 + -1) - iVar5), 1 < iVar5; iVar5 = iVar5 + -1) {
iVar2 = func0(iVar5);
iVar15 = iVar15 + iVar14 * iVar2;
}
iVar15 = iVar15 + iVar14;
if (iVar5 == 0) break;
iVar5 = 0;
}
}
}
iVar4 = iVar4 + -1;
local_70 = local_70 + iVar6 * iVar15;
}
iVar7 = iVar7 + -1;
uVar11 = uVar12 + 1;
if (uVar11 == 1) {
iVar6 = 1;
}
else {
if (uVar12 == 1) {
iVar6 = 1;
LAB_00101b4d:
iVar6 = iVar6 + 1;
}
else {
iVar6 = 0;
bVar16 = false;
uVar9 = uVar12;
while( true ) {
iVar5 = func0(uVar9);
iVar6 = iVar6 + iVar5;
if (bVar16) break;
uVar9 = uVar9 - 1;
if (uVar9 < 2) goto LAB_00101b4d;
bVar16 = true;
}
}
iVar5 = uVar12 - 2;
if (uVar11 != 2) {
while( true ) {
iVar15 = func0(uVar12 - iVar5);
while (1 < iVar5) {
iVar14 = func0(iVar5);
iVar6 = iVar6 + iVar15 * iVar14;
iVar15 = func0(uVar12 - (iVar5 + -1));
iVar5 = iVar5 + -1;
}
iVar6 = iVar6 + iVar15;
if (iVar5 == 0) break;
iVar5 = 0;
}
}
}
goto LAB_0010171d;
}
} while( true );
}
local_48 = local_48 + local_58;
if (iVar3 == 0) {
return local_48;
}
iVar3 = 0;
joined_r0x00101ba2:
if (iVar13 != 0) {
local_4c = iVar13 + 1;
local_58 = 0;
local_5c = 0;
do {
local_68 = 1;
iVar10 = local_5c;
joined_r0x00101bd2:
if (1 < iVar13) {
iVar13 = iVar13 + -1;
local_70 = 0;
local_6c = 0;
iVar8 = iVar13;
LAB_00101bf9:
iVar7 = 1;
if (iVar8 < 2) goto LAB_00101fcf;
LAB_00101c03:
iVar5 = iVar8 + -2;
iVar4 = 1;
local_74 = 0;
iVar6 = iVar8 + -1;
uVar11 = 0;
LAB_00101c28:
uVar12 = uVar11;
if (iVar6 < 2) {
local_74 = local_74 + iVar4;
if (iVar6 == 0) goto LAB_00101dc0;
iVar6 = 0;
}
else {
iVar15 = iVar5;
if (iVar5 < 2) {
if (0 < iVar5) {
iVar14 = 1;
goto LAB_0010202d;
}
iVar2 = 1;
iVar14 = 1;
if (1 < iVar6) goto LAB_00101c88;
}
else {
iVar14 = 0;
iVar2 = 0;
do {
iVar1 = func0(iVar15);
iVar14 = iVar14 + iVar1;
iVar1 = 1;
if (iVar5 < 1) {
iVar1 = iVar5;
}
iVar2 = iVar2 + 1;
if (iVar1 < iVar2) goto LAB_00101c80;
LAB_0010202d:
iVar15 = iVar15 + -1;
iVar2 = 1;
} while (1 < iVar15);
iVar14 = iVar14 + 1;
iVar2 = 2;
LAB_00101c80:
if (iVar2 < iVar6) {
LAB_00101c88:
iVar15 = (iVar6 - iVar2) + -1;
while( true ) {
iVar2 = func0((iVar6 + -1) - iVar15);
while (1 < iVar15) {
iVar1 = func0(iVar15);
iVar14 = iVar14 + iVar2 * iVar1;
iVar2 = func0((iVar6 + -1) - (iVar15 + -1));
iVar15 = iVar15 + -1;
}
iVar14 = iVar14 + iVar2;
if (iVar15 == 0) break;
iVar15 = 0;
}
}
}
iVar6 = iVar6 + -1;
local_74 = local_74 + iVar4 * iVar14;
}
iVar5 = iVar5 + -1;
uVar11 = uVar12 + 1;
if (uVar11 == 1) {
iVar4 = 1;
}
else {
if (uVar12 == 1) {
iVar4 = 1;
LAB_0010250d:
iVar4 = iVar4 + 1;
}
else {
iVar4 = 0;
bVar16 = false;
uVar9 = uVar12;
while( true ) {
iVar15 = func0(uVar9);
iVar4 = iVar4 + iVar15;
if (bVar16) break;
uVar9 = uVar9 - 1;
if (uVar9 < 2) goto LAB_0010250d;
bVar16 = true;
}
}
iVar15 = uVar12 - 2;
if (uVar11 != 2) {
while( true ) {
for (; iVar14 = func0(uVar12 - iVar15), 1 < iVar15; iVar15 = iVar15 + -1) {
iVar2 = func0(iVar15);
iVar4 = iVar4 + iVar2 * iVar14;
}
iVar4 = iVar4 + iVar14;
if (iVar15 == 0) break;
iVar15 = 0;
}
}
}
goto LAB_00101c28;
}
local_58 = local_58 + local_68;
bVar16 = iVar13 == 0;
iVar13 = local_4c;
if (bVar16) goto joined_r0x00101222;
iVar13 = 0;
LAB_0010206c:
local_5c = iVar10 + 1;
if (local_5c != 1) {
local_68 = 0;
local_6c = 0;
LAB_0010209b:
local_74 = 1;
if (iVar10 < 2) goto LAB_0010244f;
LAB_001020a5:
iVar6 = iVar10 + -2;
iVar8 = 1;
local_70 = 0;
iVar7 = iVar10 + -1;
uVar11 = 0;
LAB_001020c7:
uVar12 = uVar11;
if (iVar7 < 2) {
local_70 = local_70 + iVar8;
if (iVar7 == 0) goto LAB_00102260;
iVar7 = 0;
}
else {
iVar4 = iVar6;
if (iVar6 < 2) {
if (0 < iVar6) {
iVar5 = 1;
goto LAB_0010247d;
}
iVar15 = 1;
iVar5 = 1;
if (1 < iVar7) goto LAB_00102128;
}
else {
iVar15 = 0;
iVar5 = 0;
do {
iVar14 = func0(iVar4);
iVar5 = iVar5 + iVar14;
iVar14 = 1;
if (iVar6 < 1) {
iVar14 = iVar6;
}
iVar15 = iVar15 + 1;
if (iVar14 < iVar15) goto LAB_00102120;
LAB_0010247d:
iVar4 = iVar4 + -1;
iVar15 = 1;
} while (1 < iVar4);
iVar5 = iVar5 + 1;
iVar15 = 2;
LAB_00102120:
if (iVar15 < iVar7) {
LAB_00102128:
iVar4 = (iVar7 - iVar15) + -1;
while( true ) {
for (; iVar15 = func0((iVar7 + -1) - iVar4), 1 < iVar4; iVar4 = iVar4 + -1) {
iVar14 = func0(iVar4);
iVar5 = iVar5 + iVar15 * iVar14;
}
iVar5 = iVar5 + iVar15;
if (iVar4 == 0) break;
iVar4 = 0;
}
}
}
iVar7 = iVar7 + -1;
local_70 = local_70 + iVar8 * iVar5;
}
iVar6 = iVar6 + -1;
uVar11 = uVar12 + 1;
if (uVar11 == 1) {
iVar8 = 1;
}
else {
if (uVar12 == 1) {
iVar8 = 1;
LAB_001024fd:
iVar8 = iVar8 + 1;
}
else {
iVar8 = 0;
bVar16 = false;
uVar9 = uVar12;
while( true ) {
iVar4 = func0(uVar9);
iVar8 = iVar8 + iVar4;
if (bVar16) break;
uVar9 = uVar9 - 1;
if (uVar9 < 2) goto LAB_001024fd;
bVar16 = true;
}
}
iVar4 = uVar12 - 2;
if (uVar11 != 2) {
while( true ) {
iVar5 = func0(uVar12 - iVar4);
while (1 < iVar4) {
iVar15 = func0(iVar4);
iVar8 = iVar8 + iVar5 * iVar15;
iVar5 = func0(uVar12 - (iVar4 + -1));
iVar4 = iVar4 + -1;
}
iVar8 = iVar8 + iVar5;
if (iVar4 == 0) break;
iVar4 = 0;
}
}
}
goto LAB_001020c7;
}
} while( true );
}
local_4c = 1;
} while( true );
LAB_00101440:
local_64 = local_64 + local_74 * local_70;
iVar7 = iVar7 + -1;
iVar6 = local_6c;
LAB_0010145b:
local_6c = iVar6 + 1;
if (local_6c != 1) {
iVar5 = 1;
local_74 = 0;
iVar4 = iVar6 + -1;
uVar11 = 0;
LAB_00101489:
uVar12 = uVar11;
if (iVar6 < 2) {
local_74 = local_74 + iVar5;
if (iVar6 == 0) goto LAB_00101620;
iVar6 = 0;
}
else {
iVar15 = iVar4;
if (iVar4 < 2) {
if (0 < iVar4) {
iVar14 = 1;
goto LAB_00101655;
}
iVar14 = 1;
iVar2 = 1;
if (1 < iVar6) goto LAB_001014e8;
}
else {
iVar14 = 0;
iVar2 = 0;
do {
iVar1 = func0(iVar15);
iVar14 = iVar14 + iVar1;
iVar2 = iVar2 + 1;
iVar1 = 1;
if (iVar4 < 1) {
iVar1 = iVar4;
}
if (iVar1 < iVar2) goto LAB_001014e0;
LAB_00101655:
iVar15 = iVar15 + -1;
iVar2 = 1;
} while (1 < iVar15);
iVar14 = iVar14 + 1;
iVar2 = 2;
LAB_001014e0:
if (iVar2 < iVar6) {
LAB_001014e8:
iVar15 = (iVar6 - iVar2) + -1;
while( true ) {
iVar2 = func0((iVar6 + -1) - iVar15);
while (1 < iVar15) {
iVar1 = func0(iVar15);
iVar14 = iVar14 + iVar2 * iVar1;
iVar2 = func0((iVar6 + -1) - (iVar15 + -1));
iVar15 = iVar15 + -1;
}
iVar14 = iVar14 + iVar2;
if (iVar15 == 0) break;
iVar15 = 0;
}
}
}
iVar6 = iVar6 + -1;
local_74 = local_74 + iVar5 * iVar14;
}
iVar4 = iVar4 + -1;
uVar11 = uVar12 + 1;
if (uVar11 == 1) {
iVar5 = 1;
}
else {
if (uVar12 == 1) {
iVar5 = 1;
LAB_00101b7d:
iVar5 = iVar5 + 1;
}
else {
bVar16 = false;
iVar5 = 0;
uVar9 = uVar12;
while( true ) {
iVar15 = func0(uVar9);
iVar5 = iVar5 + iVar15;
if (bVar16) break;
uVar9 = uVar9 - 1;
if (uVar9 < 2) goto LAB_00101b7d;
bVar16 = true;
}
}
iVar15 = uVar12 - 2;
if (uVar11 != 2) {
while( true ) {
for (; iVar14 = func0(uVar12 - iVar15), 1 < iVar15; iVar15 = iVar15 + -1) {
iVar2 = func0(iVar15);
iVar5 = iVar5 + iVar2 * iVar14;
}
iVar5 = iVar5 + iVar14;
if (iVar15 == 0) break;
iVar15 = 0;
}
}
}
goto LAB_00101489;
}
goto LAB_00101278;
LAB_00101620:
if (1 < iVar7) goto LAB_00101281;
LAB_0010162d:
local_64 = local_64 + local_74;
if (iVar7 == 0) {
local_54 = local_54 + local_68 * local_64;
goto LAB_001016c3;
}
iVar7 = 0;
iVar6 = local_6c;
goto LAB_0010145b;
LAB_001018b0:
local_68 = local_68 + local_74 * local_70;
iVar8 = iVar8 + -1;
iVar7 = local_6c;
LAB_001018cb:
local_6c = iVar7 + 1;
if (local_6c != 1) {
iVar4 = 1;
local_74 = 0;
iVar6 = iVar7 + -1;
uVar11 = 0;
LAB_001018f9:
uVar12 = uVar11;
if (iVar7 < 2) {
local_74 = local_74 + iVar4;
if (iVar7 == 0) goto LAB_00101a90;
iVar7 = 0;
}
else {
iVar5 = iVar6;
if (iVar6 < 2) {
if (0 < iVar6) {
iVar15 = 1;
goto LAB_00101af5;
}
iVar15 = 1;
iVar14 = 1;
if (1 < iVar7) goto LAB_00101958;
}
else {
iVar15 = 0;
iVar14 = 0;
do {
iVar2 = func0(iVar5);
iVar15 = iVar15 + iVar2;
iVar14 = iVar14 + 1;
iVar2 = 1;
if (iVar6 < 1) {
iVar2 = iVar6;
}
if (iVar2 < iVar14) goto LAB_00101950;
LAB_00101af5:
iVar5 = iVar5 + -1;
iVar14 = 1;
} while (1 < iVar5);
iVar15 = iVar15 + 1;
iVar14 = 2;
LAB_00101950:
if (iVar14 < iVar7) {
LAB_00101958:
iVar5 = (iVar7 - iVar14) + -1;
while( true ) {
iVar14 = func0((iVar7 + -1) - iVar5);
while (1 < iVar5) {
iVar2 = func0(iVar5);
iVar15 = iVar15 + iVar14 * iVar2;
iVar14 = func0((iVar7 + -1) - (iVar5 + -1));
iVar5 = iVar5 + -1;
}
iVar15 = iVar15 + iVar14;
if (iVar5 == 0) break;
iVar5 = 0;
}
}
}
iVar7 = iVar7 + -1;
local_74 = local_74 + iVar4 * iVar15;
}
iVar6 = iVar6 + -1;
uVar11 = uVar12 + 1;
if (uVar11 == 1) {
iVar4 = 1;
}
else {
if (uVar12 == 1) {
iVar4 = 1;
LAB_00101b6d:
iVar4 = iVar4 + 1;
}
else {
iVar4 = 0;
bVar16 = false;
uVar9 = uVar12;
while( true ) {
iVar5 = func0(uVar9);
iVar4 = iVar4 + iVar5;
if (bVar16) break;
uVar9 = uVar9 - 1;
if (uVar9 < 2) goto LAB_00101b6d;
bVar16 = true;
}
}
iVar5 = uVar12 - 2;
if (uVar11 != 2) {
while( true ) {
for (; iVar15 = func0(uVar12 - iVar5), 1 < iVar5; iVar5 = iVar5 + -1) {
iVar14 = func0(iVar5);
iVar4 = iVar4 + iVar14 * iVar15;
}
iVar4 = iVar4 + iVar15;
if (iVar5 == 0) break;
iVar5 = 0;
}
}
}
goto LAB_001018f9;
}
goto LAB_001016f4;
LAB_00101a90:
if (1 < iVar8) goto LAB_001016fd;
LAB_00101a9d:
local_68 = local_68 + local_74;
bVar16 = iVar8 == 0;
iVar8 = local_5c;
if (bVar16) goto joined_r0x0010124e;
iVar8 = 0;
iVar7 = local_6c;
goto LAB_001018cb;
LAB_00101dc0:
local_6c = local_6c + local_74 * iVar7;
iVar8 = iVar8 + -1;
iVar6 = local_70;
LAB_00101ddc:
local_70 = iVar6 + 1;
if (local_70 != 1) {
iVar7 = 0;
iVar5 = 1;
iVar4 = iVar6 + -1;
uVar11 = 0;
LAB_00101e07:
uVar12 = uVar11;
if (iVar6 < 2) {
iVar7 = iVar7 + iVar5;
if (iVar6 == 0) goto LAB_00101fc0;
iVar6 = 0;
}
else {
iVar15 = iVar4;
if (iVar4 < 2) {
if (0 < iVar4) {
iVar14 = 1;
goto LAB_00101ff8;
}
iVar2 = 1;
iVar14 = 1;
if (1 < iVar6) goto LAB_00101e68;
}
else {
iVar14 = 0;
iVar2 = 0;
do {
iVar1 = func0(iVar15);
iVar14 = iVar14 + iVar1;
iVar2 = iVar2 + 1;
iVar1 = 1;
if (iVar4 < 1) {
iVar1 = iVar4;
}
if (iVar1 < iVar2) goto LAB_00101e60;
LAB_00101ff8:
iVar15 = iVar15 + -1;
iVar2 = 1;
} while (1 < iVar15);
iVar14 = iVar14 + 1;
iVar2 = 2;
LAB_00101e60:
if (iVar2 < iVar6) {
LAB_00101e68:
iVar15 = (iVar6 - iVar2) + -1;
while( true ) {
for (; iVar2 = func0((iVar6 + -1) - iVar15), 1 < iVar15; iVar15 = iVar15 + -1) {
iVar1 = func0(iVar15);
iVar14 = iVar14 + iVar2 * iVar1;
}
iVar14 = iVar14 + iVar2;
if (iVar15 == 0) break;
iVar15 = 0;
}
}
}
iVar6 = iVar6 + -1;
iVar7 = iVar7 + iVar5 * iVar14;
}
iVar4 = iVar4 + -1;
uVar11 = uVar12 + 1;
if (uVar11 == 1) {
iVar5 = 1;
}
else {
if (uVar12 == 1) {
iVar5 = 1;
LAB_0010252d:
iVar5 = iVar5 + 1;
}
else {
bVar16 = false;
iVar5 = 0;
uVar9 = uVar12;
while( true ) {
iVar15 = func0(uVar9);
iVar5 = iVar5 + iVar15;
if (bVar16) break;
uVar9 = uVar9 - 1;
if (uVar9 < 2) goto LAB_0010252d;
bVar16 = true;
}
}
iVar15 = uVar12 - 2;
if (uVar11 != 2) {
while( true ) {
iVar14 = func0(uVar12 - iVar15);
while (1 < iVar15) {
iVar2 = func0(iVar15);
iVar5 = iVar5 + iVar14 * iVar2;
iVar14 = func0(uVar12 - (iVar15 + -1));
iVar15 = iVar15 + -1;
}
iVar5 = iVar5 + iVar14;
if (iVar15 == 0) break;
iVar15 = 0;
}
}
}
goto LAB_00101e07;
}
goto LAB_00101bf9;
LAB_00101fc0:
if (1 < iVar8) goto LAB_00101c03;
LAB_00101fcf:
local_6c = local_6c + iVar7;
if (iVar8 == 0) {
local_58 = local_58 + local_68 * local_6c;
goto LAB_0010206c;
}
iVar8 = 0;
iVar6 = local_70;
goto LAB_00101ddc;
LAB_00102260:
local_68 = local_68 + local_74 * local_70;
iVar10 = iVar10 + -1;
iVar8 = local_6c;
LAB_0010227f:
local_6c = iVar8 + 1;
if (local_6c != 1) {
iVar6 = 1;
local_74 = 0;
iVar7 = iVar8 + -1;
uVar11 = 0;
LAB_001022b0:
uVar12 = uVar11;
if (iVar8 < 2) {
local_74 = local_74 + iVar6;
if (iVar8 == 0) goto LAB_00102440;
iVar8 = 0;
}
else {
iVar4 = iVar7;
if (iVar7 < 2) {
if (0 < iVar7) {
iVar5 = 1;
goto LAB_001024ac;
}
iVar15 = 1;
iVar5 = 1;
if (1 < iVar8) goto LAB_00102308;
}
else {
iVar5 = 0;
iVar15 = 0;
do {
iVar14 = func0(iVar4);
iVar5 = iVar5 + iVar14;
iVar14 = 1;
if (iVar7 < 1) {
iVar14 = iVar7;
}
iVar15 = iVar15 + 1;
if (iVar14 < iVar15) goto LAB_00102300;
LAB_001024ac:
iVar4 = iVar4 + -1;
iVar15 = 1;
} while (1 < iVar4);
iVar5 = iVar5 + 1;
iVar15 = 2;
LAB_00102300:
if (iVar15 < iVar8) {
LAB_00102308:
iVar4 = (iVar8 - iVar15) + -1;
while( true ) {
for (; iVar15 = func0((iVar8 + -1) - iVar4), 1 < iVar4; iVar4 = iVar4 + -1) {
iVar14 = func0(iVar4);
iVar5 = iVar5 + iVar15 * iVar14;
}
iVar5 = iVar5 + iVar15;
if (iVar4 == 0) break;
iVar4 = 0;
}
}
}
iVar8 = iVar8 + -1;
local_74 = local_74 + iVar6 * iVar5;
}
iVar7 = iVar7 + -1;
uVar11 = uVar12 + 1;
if (uVar11 == 1) {
iVar6 = 1;
}
else {
if (uVar12 == 1) {
iVar6 = 1;
LAB_0010251d:
iVar6 = iVar6 + 1;
}
else {
bVar16 = false;
iVar6 = 0;
uVar9 = uVar12;
while( true ) {
iVar4 = func0(uVar9);
iVar6 = iVar6 + iVar4;
if (bVar16) break;
uVar9 = uVar9 - 1;
if (uVar9 < 2) goto LAB_0010251d;
bVar16 = true;
}
}
iVar4 = uVar12 - 2;
if (uVar11 != 2) {
while( true ) {
iVar5 = func0(uVar12 - iVar4);
while (1 < iVar4) {
iVar15 = func0(iVar4);
iVar6 = iVar6 + iVar5 * iVar15;
iVar5 = func0(uVar12 - (iVar4 + -1));
iVar4 = iVar4 + -1;
}
iVar6 = iVar6 + iVar5;
if (iVar4 == 0) break;
iVar4 = 0;
}
}
}
goto LAB_001022b0;
}
goto LAB_0010209b;
LAB_00102440:
if (1 < iVar10) goto LAB_001020a5;
LAB_0010244f:
local_68 = local_68 + local_74;
bVar16 = iVar10 == 0;
iVar10 = local_5c;
if (bVar16) goto joined_r0x00101bd2;
iVar10 = 0;
iVar8 = local_6c;
goto LAB_0010227f;
} |
2,332 | func0 | #include <iostream>
#include <regex>
#include <assert.h>
| std::string func0(const std::string &text) {
std::regex word_regex("\\w+ly");
std::smatch match;
if (std::regex_search(text, match, word_regex)) {
return std::to_string(match.position(0)) + '-' + std::to_string(match.position(0) + match.length(0)) + ": " + match.str(0);
}
return "";
}
| int main() {
assert(func0("Clearly, he has no excuse for such behavior.") == "0-7: Clearly");
assert(func0("Please handle the situation carefuly") == "28-36: carefuly");
assert(func0("Complete the task quickly") == "18-25: quickly");
return 0;
}
| O0 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x138,%rsp
mov %rdi,-0x138(%rbp)
mov %rsi,-0x140(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
lea -0x120(%rbp),%rax
mov $0x10,%edx
lea 0x2c320(%rip),%rsi
mov %rax,%rdi
callq 776e <_ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC1EPKcNSt15regex_constants18syntax_option_typeE>
lea -0x100(%rbp),%rax
mov %rax,%rdi
callq 782c <_ZNSt7__cxx1113match_resultsIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISA_EEEEC1Ev>
lea -0x120(%rbp),%rdx
lea -0x100(%rbp),%rsi
mov -0x140(%rbp),%rax
mov $0x0,%ecx
mov %rax,%rdi
callq 78d6 <_ZSt12regex_searchISt11char_traitsIcESaIcESaINSt7__cxx119sub_matchIN9__gnu_cxx17__normal_iteratorIPKcNS3_12basic_stringIcS1_S2_EEEEEEEcNS3_12regex_traitsIcEEEbRKNS9_IT2_T_T0_EERNS3_13match_resultsINSJ_14const_iteratorET1_EERKNS3_11basic_regexISG_T3_EENSt15regex_constants15match_flag_typeE>
test %al,%al
je 5ef2 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x1c9>
lea -0x40(%rbp),%rax
lea -0x100(%rbp),%rcx
mov $0x0,%edx
mov %rcx,%rsi
mov %rax,%rdi
callq 7a3e <_ZNKSt7__cxx1113match_resultsIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISA_EEEE3strEm>
lea -0x100(%rbp),%rax
mov $0x0,%esi
mov %rax,%rdi
callq 7934 <_ZNKSt7__cxx1113match_resultsIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISA_EEEE8positionEm>
mov %rax,%rbx
lea -0x100(%rbp),%rax
mov $0x0,%esi
mov %rax,%rdi
callq 79c2 <_ZNKSt7__cxx1113match_resultsIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISA_EEEE6lengthEm>
lea (%rbx,%rax,1),%rdx
lea -0xa0(%rbp),%rax
mov %rdx,%rsi
mov %rax,%rdi
callq 660c <_ZNSt7__cxx119to_stringEl>
lea -0x100(%rbp),%rax
mov $0x0,%esi
mov %rax,%rdi
callq 7934 <_ZNKSt7__cxx1113match_resultsIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISA_EEEE8positionEm>
mov %rax,%rdx
lea -0xe0(%rbp),%rax
mov %rdx,%rsi
mov %rax,%rdi
callq 660c <_ZNSt7__cxx119to_stringEl>
lea -0xc0(%rbp),%rax
lea -0xe0(%rbp),%rcx
mov $0x2d,%edx
mov %rcx,%rsi
mov %rax,%rdi
callq 7973 <_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S5_>
lea -0x80(%rbp),%rax
lea -0xa0(%rbp),%rdx
lea -0xc0(%rbp),%rcx
mov %rcx,%rsi
mov %rax,%rdi
callq 7563 <_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_>
lea -0x60(%rbp),%rax
lea -0x80(%rbp),%rcx
lea 0x2c216(%rip),%rdx
mov %rcx,%rsi
mov %rax,%rdi
callq 79f3 <_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_>
mov -0x138(%rbp),%rax
lea -0x40(%rbp),%rdx
lea -0x60(%rbp),%rcx
mov %rcx,%rsi
mov %rax,%rdi
callq 7563 <_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_>
lea -0x60(%rbp),%rax
mov %rax,%rdi
callq 5800 <_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev@plt>
lea -0x80(%rbp),%rax
mov %rax,%rdi
callq 5800 <_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev@plt>
lea -0xc0(%rbp),%rax
mov %rax,%rdi
callq 5800 <_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev@plt>
lea -0xe0(%rbp),%rax
mov %rax,%rdi
callq 5800 <_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev@plt>
lea -0xa0(%rbp),%rax
mov %rax,%rdi
callq 5800 <_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev@plt>
lea -0x40(%rbp),%rax
mov %rax,%rdi
callq 5800 <_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev@plt>
jmp 5f2d <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x204>
lea -0x121(%rbp),%rax
mov %rax,%rdi
callq 5b90 <_ZNSaIcEC1Ev@plt>
lea -0x121(%rbp),%rdx
mov -0x138(%rbp),%rax
lea 0x2c17c(%rip),%rsi
mov %rax,%rdi
callq 7aa4 <_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1IS3_EEPKcRKS3_>
lea -0x121(%rbp),%rax
mov %rax,%rdi
callq 5980 <_ZNSaIcED1Ev@plt>
lea -0x100(%rbp),%rax
mov %rax,%rdi
callq 7296 <_ZNSt7__cxx1113match_resultsIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISA_EEEED1Ev>
lea -0x120(%rbp),%rax
mov %rax,%rdi
callq 77f8 <_ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED1Ev>
mov -0x18(%rbp),%rax
xor %fs:0x28,%rax
je 6037 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x30e>
jmpq 6032 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x309>
endbr64
mov %rax,%rbx
lea -0x60(%rbp),%rax
mov %rax,%rdi
callq 5800 <_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev@plt>
jmp 5f7f <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x256>
endbr64
mov %rax,%rbx
lea -0x80(%rbp),%rax
mov %rax,%rdi
callq 5800 <_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev@plt>
jmp 5f94 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x26b>
endbr64
mov %rax,%rbx
lea -0xc0(%rbp),%rax
mov %rax,%rdi
callq 5800 <_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev@plt>
jmp 5fac <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x283>
endbr64
mov %rax,%rbx
lea -0xe0(%rbp),%rax
mov %rax,%rdi
callq 5800 <_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev@plt>
jmp 5fc4 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x29b>
endbr64
mov %rax,%rbx
lea -0xa0(%rbp),%rax
mov %rax,%rdi
callq 5800 <_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev@plt>
jmp 5fdc <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x2b3>
endbr64
mov %rax,%rbx
lea -0x40(%rbp),%rax
mov %rax,%rdi
callq 5800 <_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev@plt>
jmp 6009 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x2e0>
endbr64
mov %rax,%rbx
lea -0x121(%rbp),%rax
mov %rax,%rdi
callq 5980 <_ZNSaIcED1Ev@plt>
jmp 6009 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x2e0>
endbr64
mov %rax,%rbx
lea -0x100(%rbp),%rax
mov %rax,%rdi
callq 7296 <_ZNSt7__cxx1113match_resultsIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISA_EEEED1Ev>
lea -0x120(%rbp),%rax
mov %rax,%rdi
callq 77f8 <_ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED1Ev>
mov %rbx,%rax
mov %rax,%rdi
callq 5b80 <_Unwind_Resume@plt>
callq 59d0 <__stack_chk_fail@plt>
mov -0x138(%rbp),%rax
add $0x138,%rsp
pop %rbx
pop %rbp
retq
| _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 138h
mov [rbp+var_138], rdi
mov [rbp+var_140], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_120]
mov edx, 10h
lea rcx, aWLy; "\\w+ly"
mov rsi, rcx
mov rdi, rax
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type)
lea rax, [rbp+var_100]
mov rdi, rax
call _ZNSt7__cxx1113match_resultsIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISA_EEEEC2Ev; std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::match_results(void)
lea rdx, [rbp+var_120]
lea rsi, [rbp+var_100]
mov rax, [rbp+var_140]
mov ecx, 0
mov rdi, rax
call _ZSt12regex_searchISt11char_traitsIcESaIcESaINSt7__cxx119sub_matchIN9__gnu_cxx17__normal_iteratorIPKcNS3_12basic_stringIcS1_S2_EEEEEEEcNS3_12regex_traitsIcEEEbRKNS9_IT2_T_T0_EERNS3_13match_resultsINSJ_14const_iteratorET1_EERKNS3_11basic_regexISG_T3_EENSt15regex_constants15match_flag_typeE; std::regex_search<std::char_traits<char>,std::allocator<char>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>>(std::string const&,std::match_results<std::string::const_iterator> &,std::basic_regex<char,std::regex_traits<char>> const&,std::regex_constants::match_flag_type)
test al, al
jz loc_5D95
lea rax, [rbp+var_40]
lea rcx, [rbp+var_100]
mov edx, 0
mov rsi, rcx
mov rdi, rax
call _ZNKSt7__cxx1113match_resultsIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISA_EEEE3strEm; std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::str(ulong)
lea rax, [rbp+var_100]
mov esi, 0
mov rdi, rax
call _ZNKSt7__cxx1113match_resultsIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISA_EEEE8positionEm; std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::position(ulong)
mov rbx, rax
lea rax, [rbp+var_100]
mov esi, 0
mov rdi, rax
call _ZNKSt7__cxx1113match_resultsIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISA_EEEE6lengthEm; std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::length(ulong)
lea rdx, [rbx+rax]
lea rax, [rbp+var_A0]
mov rsi, rdx; __int64
mov rdi, rax; this
call _ZNSt7__cxx119to_stringEl; std::to_string(long)
lea rax, [rbp+var_100]
mov esi, 0
mov rdi, rax
call _ZNKSt7__cxx1113match_resultsIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISA_EEEE8positionEm; std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::position(ulong)
mov rdx, rax
lea rax, [rbp+var_E0]
mov rsi, rdx; __int64
mov rdi, rax; this
call _ZNSt7__cxx119to_stringEl; std::to_string(long)
lea rax, [rbp+var_C0]
lea rcx, [rbp+var_E0]
mov edx, 2Dh ; '-'
mov rsi, rcx
mov rdi, rax
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S5_; std::operator+<char>(std::string&&,char)
lea rax, [rbp+var_80]
lea rdx, [rbp+var_A0]
lea rcx, [rbp+var_C0]
mov rsi, rcx
mov rdi, rax
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&)
lea rax, [rbp+var_60]
lea rcx, [rbp+var_80]
lea rdx, asc_34057; ": "
mov rsi, rcx
mov rdi, rax
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
mov rax, [rbp+var_138]
lea rdx, [rbp+var_40]
lea rcx, [rbp+var_60]
mov rsi, rcx
mov rdi, rax
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&)
nop
lea rax, [rbp+var_60]
mov rdi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rax, [rbp+var_80]
mov rdi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rax, [rbp+var_C0]
mov rdi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rax, [rbp+var_E0]
mov rdi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rax, [rbp+var_A0]
mov rdi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rax, [rbp+var_40]
mov rdi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_5DD5
loc_5D95:
lea rax, [rbp+var_129]
mov [rbp+var_128], rax
nop
nop
lea rdx, [rbp+var_129]
mov rax, [rbp+var_138]
lea rcx, unk_3405A
mov rsi, rcx
mov rdi, rax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rax, [rbp+var_129]
mov rdi, rax
call _ZNSt15__new_allocatorIcED2Ev; std::__new_allocator<char>::~__new_allocator()
nop
loc_5DD5:
lea rax, [rbp+var_100]
mov rdi, rax
call _ZNSt7__cxx1113match_resultsIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISA_EEEED2Ev; std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::~match_results()
lea rax, [rbp+var_120]
mov rdi, rax
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; std::basic_regex<char,std::regex_traits<char>>::~basic_regex()
mov rax, [rbp+var_18]
sub rax, fs:28h
jz loc_5EF4
jmp loc_5EEF
endbr64
mov rbx, rax
lea rax, [rbp+var_60]
mov rdi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_5E27
endbr64
mov rbx, rax
loc_5E27:
lea rax, [rbp+var_80]
mov rdi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_5E3C
endbr64
mov rbx, rax
loc_5E3C:
lea rax, [rbp+var_C0]
mov rdi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_5E54
endbr64
mov rbx, rax
loc_5E54:
lea rax, [rbp+var_E0]
mov rdi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_5E6C
endbr64
mov rbx, rax
loc_5E6C:
lea rax, [rbp+var_A0]
mov rdi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_5E84
endbr64
mov rbx, rax
loc_5E84:
lea rax, [rbp+var_40]
mov rdi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_5EB2
endbr64
mov rbx, rax
lea rax, [rbp+var_129]
mov rdi, rax
call _ZNSt15__new_allocatorIcED2Ev; std::__new_allocator<char>::~__new_allocator()
nop
jmp short loc_5EB2
endbr64
mov rbx, rax
loc_5EB2:
lea rax, [rbp+var_100]
mov rdi, rax
call _ZNSt7__cxx1113match_resultsIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISA_EEEED2Ev; std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::~match_results()
lea rax, [rbp+var_120]
mov rdi, rax
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; std::basic_regex<char,std::regex_traits<char>>::~basic_regex()
mov rax, rbx
mov rdx, [rbp+var_18]
sub rdx, fs:28h
jz short loc_5EE7
call ___stack_chk_fail
loc_5EE7:
mov rdi, rax; struct _Unwind_Exception *
call __Unwind_Resume
loc_5EEF:
call ___stack_chk_fail
loc_5EF4:
mov rax, [rbp+var_138]
mov rbx, [rbp+var_8]
leave
retn | long long func0(long long a1, long long a2)
{
long long v2; // rbx
long long v3; // rax
long long v4; // rax
char v6; // [rsp+17h] [rbp-129h] BYREF
char *v7; // [rsp+18h] [rbp-128h]
_BYTE v8[32]; // [rsp+20h] [rbp-120h] BYREF
_BYTE v9[32]; // [rsp+40h] [rbp-100h] BYREF
_BYTE v10[32]; // [rsp+60h] [rbp-E0h] BYREF
_BYTE v11[32]; // [rsp+80h] [rbp-C0h] BYREF
_BYTE v12[32]; // [rsp+A0h] [rbp-A0h] BYREF
_BYTE v13[32]; // [rsp+C0h] [rbp-80h] BYREF
_BYTE v14[32]; // [rsp+E0h] [rbp-60h] BYREF
_BYTE v15[40]; // [rsp+100h] [rbp-40h] BYREF
unsigned long long v16; // [rsp+128h] [rbp-18h]
v16 = __readfsqword(0x28u);
std::basic_regex<char,std::regex_traits<char>>::basic_regex(v8, "\\w+ly", 16LL);
std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::match_results(v9);
if ( (unsigned __int8)std::regex_search<std::char_traits<char>,std::allocator<char>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>>(
a2,
v9,
v8,
0LL) )
{
std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::str(v15, v9, 0LL);
v2 = std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::position(v9, 0LL);
v3 = std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::length(v9, 0LL);
std::to_string((std::__cxx11 *)v12, v2 + v3);
v4 = std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::position(v9, 0LL);
std::to_string((std::__cxx11 *)v10, v4);
std::operator+<char>(v11, v10, 45LL);
std::operator+<char>(v13, v11, v12);
std::operator+<char>(v14, v13, ": ");
std::operator+<char>(a1, v14, v15);
std::string::~string(v14);
std::string::~string(v13);
std::string::~string(v11);
std::string::~string(v10);
std::string::~string(v12);
std::string::~string(v15);
}
else
{
v7 = &v6;
std::string::basic_string<std::allocator<char>>(a1, &unk_3405A, &v6);
std::__new_allocator<char>::~__new_allocator(&v6);
}
std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::~match_results(v9);
std::basic_regex<char,std::regex_traits<char>>::~basic_regex(v8);
return a1;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x138
MOV qword ptr [RBP + -0x138],RDI
MOV qword ptr [RBP + -0x140],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x120]
MOV EDX,0x10
LEA RCX,[0x134051]
MOV RSI,RCX
MOV RDI,RAX
LAB_00105c0f:
CALL 0x00107992
LEA RAX,[RBP + -0x100]
MOV RDI,RAX
CALL 0x00107a64
LEA RDX,[RBP + -0x120]
LEA RSI,[RBP + -0x100]
MOV RAX,qword ptr [RBP + -0x140]
MOV ECX,0x0
MOV RDI,RAX
LAB_00105c40:
CALL 0x00107b1e
TEST AL,AL
JZ 0x00105d95
LEA RAX,[RBP + -0x40]
LEA RCX,[RBP + -0x100]
MOV EDX,0x0
MOV RSI,RCX
MOV RDI,RAX
CALL 0x00107db4
LEA RAX,[RBP + -0x100]
MOV ESI,0x0
MOV RDI,RAX
LAB_00105c77:
CALL 0x00107b7a
MOV RBX,RAX
LEA RAX,[RBP + -0x100]
MOV ESI,0x0
MOV RDI,RAX
CALL 0x00107c4e
LEA RDX,[RBX + RAX*0x1]
LEA RAX,[RBP + -0xa0]
MOV RSI,RDX
MOV RDI,RAX
CALL 0x0010649c
LEA RAX,[RBP + -0x100]
MOV ESI,0x0
MOV RDI,RAX
LAB_00105cb8:
CALL 0x00107b7a
MOV RDX,RAX
LEA RAX,[RBP + -0xe0]
MOV RSI,RDX
MOV RDI,RAX
CALL 0x0010649c
LEA RAX,[RBP + -0xc0]
LEA RCX,[RBP + -0xe0]
MOV EDX,0x2d
MOV RSI,RCX
MOV RDI,RAX
LAB_00105ceb:
CALL 0x00107bff
LEA RAX,[RBP + -0x80]
LEA RDX,[RBP + -0xa0]
LEA RCX,[RBP + -0xc0]
MOV RSI,RCX
MOV RDI,RAX
LAB_00105d08:
CALL 0x00107c7f
LEA RAX,[RBP + -0x60]
LEA RCX,[RBP + -0x80]
LEA RDX,[0x134057]
MOV RSI,RCX
MOV RDI,RAX
LAB_00105d22:
CALL 0x00107d68
MOV RAX,qword ptr [RBP + -0x138]
LEA RDX,[RBP + -0x40]
LEA RCX,[RBP + -0x60]
MOV RSI,RCX
MOV RDI,RAX
LAB_00105d3c:
CALL 0x00107c7f
NOP
LEA RAX,[RBP + -0x60]
MOV RDI,RAX
CALL 0x00105720
LEA RAX,[RBP + -0x80]
MOV RDI,RAX
CALL 0x00105720
LEA RAX,[RBP + -0xc0]
MOV RDI,RAX
CALL 0x00105720
LEA RAX,[RBP + -0xe0]
MOV RDI,RAX
CALL 0x00105720
LEA RAX,[RBP + -0xa0]
MOV RDI,RAX
CALL 0x00105720
LEA RAX,[RBP + -0x40]
MOV RDI,RAX
CALL 0x00105720
JMP 0x00105dd5
LAB_00105d95:
LEA RAX,[RBP + -0x129]
MOV qword ptr [RBP + -0x128],RAX
NOP
NOP
LEA RDX,[RBP + -0x129]
MOV RAX,qword ptr [RBP + -0x138]
LEA RCX,[0x13405a]
MOV RSI,RCX
MOV RDI,RAX
LAB_00105dc0:
CALL 0x00107e1a
LEA RAX,[RBP + -0x129]
MOV RDI,RAX
CALL 0x00107f62
NOP
LAB_00105dd5:
LEA RAX,[RBP + -0x100]
MOV RDI,RAX
CALL 0x00107322
LEA RAX,[RBP + -0x120]
MOV RDI,RAX
CALL 0x00107a30
MOV RAX,qword ptr [RBP + -0x18]
SUB RAX,qword ptr FS:[0x28]
JZ 0x00105ef4
JMP 0x00105eef
LAB_00105eef:
CALL 0x001058d0
LAB_00105ef4:
MOV RAX,qword ptr [RBP + -0x138]
MOV RBX,qword ptr [RBP + -0x8]
LEAVE
RET | /* func0(std::string const&) */
string * func0(string *param_1)
{
bool bVar1;
string *in_RSI;
long in_FS_OFFSET;
allocator local_131;
allocator *local_130;
regex local_128 [32];
match_results<__normal_iterator<char_const*,std::string>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::string>>>>
local_108 [32];
string local_e8 [32];
string local_c8 [32];
string local_a8 [32];
string local_88 [32];
string local_68 [32];
string local_48 [40];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
std::regex::basic_regex(local_128,"\\w+ly",0x10);
std::
match_results<__normal_iterator<char_const*,std::string>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::string>>>>
::match_results(local_108);
/* try { // try from 00105c40 to 00105c67 has its CatchHandler @ 00105eab */
bVar1 = std::
regex_search<std::char_traits<char>,std::allocator<char>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::string>>>,char,std::regex_traits<char>>
(in_RSI,(match_results *)local_108,local_128,0);
if (bVar1) {
std::
match_results<__normal_iterator<char_const*,std::string>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::string>>>>
::str((ulong)local_48);
/* try { // try from 00105c77 to 00105ca8 has its CatchHandler @ 00105e7d */
std::
match_results<__normal_iterator<char_const*,std::string>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::string>>>>
::position(local_108,0);
std::
match_results<__normal_iterator<char_const*,std::string>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::string>>>>
::length(local_108,0);
std::to_string((long)local_a8);
/* try { // try from 00105cb8 to 00105cd1 has its CatchHandler @ 00105e65 */
std::
match_results<__normal_iterator<char_const*,std::string>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::string>>>>
::position(local_108,0);
std::to_string((long)local_e8);
/* try { // try from 00105ceb to 00105cef has its CatchHandler @ 00105e4d */
std::operator+(local_c8,local_e8,0x2d);
/* try { // try from 00105d08 to 00105d0c has its CatchHandler @ 00105e35 */
std::operator+(local_88,local_c8,local_a8);
/* try { // try from 00105d22 to 00105d26 has its CatchHandler @ 00105e20 */
std::operator+(local_68,local_88,&DAT_00134057);
/* try { // try from 00105d3c to 00105d40 has its CatchHandler @ 00105e0b */
std::operator+(param_1,local_68,local_48);
std::string::~string(local_68);
std::string::~string(local_88);
std::string::~string(local_c8);
std::string::~string(local_e8);
std::string::~string(local_a8);
std::string::~string(local_48);
}
else {
local_130 = &local_131;
/* try { // try from 00105dc0 to 00105dc4 has its CatchHandler @ 00105e92 */
std::string::string<std::allocator<char>>(param_1,"",&local_131);
std::__new_allocator<char>::~__new_allocator((__new_allocator<char> *)&local_131);
}
std::
match_results<__normal_iterator<char_const*,std::string>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::string>>>>
::~match_results(local_108);
std::regex::~basic_regex(local_128);
if (local_20 != *(long *)(in_FS_OFFSET + 0x28)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return param_1;
} |
2,333 | func0 | #include <iostream>
#include <regex>
#include <assert.h>
| std::string func0(const std::string &text) {
std::regex word_regex("\\w+ly");
std::smatch match;
if (std::regex_search(text, match, word_regex)) {
return std::to_string(match.position(0)) + '-' + std::to_string(match.position(0) + match.length(0)) + ": " + match.str(0);
}
return "";
}
| int main() {
assert(func0("Clearly, he has no excuse for such behavior.") == "0-7: Clearly");
assert(func0("Please handle the situation carefuly") == "28-36: carefuly");
assert(func0("Complete the task quickly") == "18-25: quickly");
return 0;
}
| O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r13
push %r12
push %rbp
push %rbx
sub $0x298,%rsp
mov %rdi,%rbx
mov %rsi,%rbp
mov %fs:0x28,%rax
mov %rax,0x288(%rsp)
xor %eax,%eax
lea 0x30(%rsp),%r13
mov %r13,%rdi
callq 4770 <_ZNSt6localeC1Ev@plt>
movl $0x10,0x10(%rsp)
lea 0x18(%rsp),%r12
mov %r13,%rsi
mov %r12,%rdi
callq 4500 <_ZNSt6localeC1ERKS_@plt>
lea 0xf0(%rsp),%rdi
mov 0x10(%rsp),%r8d
mov %r12,%rcx
lea 0x15de5(%rip),%rdx
lea -0x5(%rdx),%rsi
callq 18212 <_ZNSt8__detail9_CompilerINSt7__cxx1112regex_traitsIcEEEC1EPKcS6_RKSt6localeNSt15regex_constants18syntax_option_typeE>
mov 0x1f0(%rsp),%rax
mov %rax,0x20(%rsp)
mov 0x1f8(%rsp),%rax
movq $0x0,0x1f8(%rsp)
mov %rax,0x28(%rsp)
movq $0x0,0x1f0(%rsp)
lea 0x220(%rsp),%rdi
callq 634c <_ZNSt11_Deque_baseINSt8__detail9_StateSeqINSt7__cxx1112regex_traitsIcEEEESaIS5_EED1Ev>
mov 0x200(%rsp),%rdi
lea 0x210(%rsp),%rax
cmp %rax,%rdi
je 4931 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0xc8>
callq 45a0 <_ZdlPv@plt>
mov 0x1f8(%rsp),%r12
test %r12,%r12
je 4959 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0xf0>
cmpq $0x0,0x1c67a(%rip)
je 49c4 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x15b>
mov $0xffffffff,%eax
lock xadd %eax,0x8(%r12)
cmp $0x1,%eax
je 49d3 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x16a>
mov 0x1c0(%rsp),%rdi
lea 0x1d0(%rsp),%rax
cmp %rax,%rdi
je 4973 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x10a>
callq 45a0 <_ZdlPv@plt>
lea 0x30(%rsp),%r12
mov %r12,%rdi
callq 4690 <_ZNSt6localeD1Ev@plt>
movq $0x0,0x30(%rsp)
movq $0x0,0x38(%rsp)
movq $0x0,0x40(%rsp)
movq $0x0,0x48(%rsp)
mov 0x0(%rbp),%rdi
mov %rdi,%rsi
add 0x8(%rbp),%rsi
lea 0x10(%rsp),%rcx
mov $0x0,%r8d
mov %r12,%rdx
callq a265 <_ZNSt8__detail17__regex_algo_implIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS5_9sub_matchISB_EEEcNS5_12regex_traitsIcEELNS_20_RegexExecutorPolicyE0ELb0EEEbT_SI_RNS5_13match_resultsISI_T0_EERKNS5_11basic_regexIT1_T2_EENSt15regex_constants15match_flag_typeE>
jmp 4a1a <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x1b1>
mov 0x8(%r12),%eax
lea -0x1(%rax),%edx
mov %edx,0x8(%r12)
jmp 4954 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0xeb>
mov (%r12),%rax
mov %r12,%rdi
callq *0x10(%rax)
cmpq $0x0,0x1c5db(%rip)
je 4a0b <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x1a2>
mov $0xffffffff,%eax
lock xadd %eax,0xc(%r12)
cmp $0x1,%eax
jne 4959 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0xf0>
mov (%r12),%rax
mov %r12,%rdi
callq *0x18(%rax)
jmpq 4959 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0xf0>
mov 0xc(%r12),%eax
lea -0x1(%rax),%edx
mov %edx,0xc(%r12)
jmp 49f3 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x18a>
test %al,%al
je 4fd8 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x76f>
mov 0x38(%rsp),%rdx
mov 0x30(%rsp),%rax
cmp %rax,%rdx
je 4b12 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x2a9>
mov %rdx,%rcx
sub %rax,%rcx
cmp $0x48,%rcx
je 4b12 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x2a9>
cmpb $0x0,0x10(%rax)
jne 4b1b <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x2b2>
lea 0x100(%rsp),%rax
mov %rax,0xf0(%rsp)
movq $0x0,0xf8(%rsp)
movb $0x0,0x100(%rsp)
mov 0x38(%rsp),%rdx
mov 0x30(%rsp),%rax
cmp %rax,%rdx
je 513a <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x8d1>
mov %rdx,%rcx
sub %rax,%rcx
cmp $0x48,%rcx
jne 512d <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x8c4>
mov %rdx,%rsi
sub %rax,%rsi
mov -0x48(%rdx),%rcx
sub 0x48(%rsp),%rcx
cmp $0x48,%rsi
jne 4aaf <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x246>
lea -0x48(%rdx),%rax
mov $0x0,%r8d
cmpb $0x0,0x10(%rax)
je 4ac2 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x259>
mov 0x8(%rax),%r8
sub (%rax),%r8
lea 0x90(%rsp),%rdi
add %rcx,%r8
lea 0x15be1(%rip),%rcx
mov $0x20,%edx
mov 0x1c4d8(%rip),%rsi
mov $0x0,%eax
callq 6222 <_ZN9__gnu_cxx12__to_xstringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcEET_PFiPT0_mPKS8_P13__va_list_tagEmSB_z>
jmpq 4bbb <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x352>
endbr64
mov %rax,%rbx
lea 0x18(%rsp),%rdi
callq 4690 <_ZNSt6localeD1Ev@plt>
lea 0x30(%rsp),%rdi
callq 4690 <_ZNSt6localeD1Ev@plt>
mov %rbx,%rdi
callq 4700 <_Unwind_Resume@plt>
lea -0x48(%rdx),%rax
jmpq 4a45 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x1dc>
mov (%rax),%r12
mov 0x8(%rax),%rbp
lea 0x100(%rsp),%rax
mov %rax,0xf0(%rsp)
sub %r12,%rbp
mov %rbp,0x8(%rsp)
cmp $0xf,%rbp
ja 4b70 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x307>
cmp $0x1,%rbp
jne 4bac <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x343>
movzbl (%r12),%eax
mov %al,0x100(%rsp)
mov 0x8(%rsp),%rax
mov %rax,0xf8(%rsp)
mov 0xf0(%rsp),%rdx
movb $0x0,(%rdx,%rax,1)
jmpq 4a73 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x20a>
lea 0x8(%rsp),%rsi
lea 0xf0(%rsp),%rdi
mov $0x0,%edx
callq 4710 <_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_createERmm@plt>
mov %rax,%rdi
mov %rax,0xf0(%rsp)
mov 0x8(%rsp),%rax
mov %rax,0x100(%rsp)
mov %rbp,%rdx
mov %r12,%rsi
callq 4570 <memcpy@plt>
jmp 4b52 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x2e9>
test %rbp,%rbp
je 4b52 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x2e9>
lea 0x100(%rsp),%rdi
jmp 4b9f <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x336>
mov 0x38(%rsp),%rdx
mov 0x30(%rsp),%rax
cmp %rax,%rdx
je 4bd6 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x36d>
mov %rdx,%rcx
sub %rax,%rcx
cmp $0x48,%rcx
jne 4bda <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x371>
lea -0x48(%rdx),%rax
lea 0x50(%rsp),%rdi
mov (%rax),%r8
sub 0x48(%rsp),%r8
lea 0x15ac7(%rip),%rcx
mov $0x20,%edx
mov 0x1c3be(%rip),%rsi
mov $0x0,%eax
callq 6222 <_ZN9__gnu_cxx12__to_xstringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcEET_PFiPT0_mPKS8_P13__va_list_tagEmSB_z>
lea 0x50(%rsp),%rdi
mov $0x2d,%r8d
mov $0x1,%ecx
mov $0x0,%edx
mov 0x58(%rsp),%rsi
callq 4740 <_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE14_M_replace_auxEmmmc@plt>
lea 0x80(%rsp),%rdx
mov %rdx,0x70(%rsp)
mov (%rax),%rcx
lea 0x10(%rax),%rdx
cmp %rdx,%rcx
je 4cd0 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x467>
mov %rcx,0x70(%rsp)
mov 0x10(%rax),%rcx
mov %rcx,0x80(%rsp)
mov 0x8(%rax),%rcx
mov %rcx,0x78(%rsp)
mov %rdx,(%rax)
movq $0x0,0x8(%rax)
movb $0x0,0x10(%rax)
mov 0x78(%rsp),%r8
mov 0x98(%rsp),%rdx
lea (%r8,%rdx,1),%rcx
mov 0x70(%rsp),%rsi
lea 0x80(%rsp),%rax
cmp %rax,%rsi
mov $0xf,%eax
cmovne 0x80(%rsp),%rax
cmp %rax,%rcx
jbe 4cbc <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x453>
lea 0xa0(%rsp),%rax
cmp %rax,0x90(%rsp)
je 4ce2 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x479>
mov 0xa0(%rsp),%rax
cmp %rax,%rcx
jbe 4ce9 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x480>
lea 0x70(%rsp),%rdi
mov 0x90(%rsp),%rsi
callq 4420 <_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm@plt>
jmp 4d03 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x49a>
movdqu 0x10(%rax),%xmm0
movaps %xmm0,0x80(%rsp)
jmpq 4c51 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x3e8>
mov $0xf,%eax
jmp 4cb7 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x44e>
lea 0x90(%rsp),%rdi
mov %rsi,%rcx
mov $0x0,%edx
mov $0x0,%esi
callq 46c0 <_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm@plt>
lea 0xc0(%rsp),%rdx
mov %rdx,0xb0(%rsp)
mov (%rax),%rcx
lea 0x10(%rax),%rdx
cmp %rdx,%rcx
je 4d81 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x518>
mov %rcx,0xb0(%rsp)
mov 0x10(%rax),%rcx
mov %rcx,0xc0(%rsp)
mov 0x8(%rax),%rcx
mov %rcx,0xb8(%rsp)
mov %rdx,(%rax)
movq $0x0,0x8(%rax)
movb $0x0,0x10(%rax)
movabs $0x3fffffffffffffff,%rax
sub 0xb8(%rsp),%rax
cmp $0x1,%rax
jbe 4d90 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x527>
lea 0xb0(%rsp),%rdi
mov $0x2,%edx
lea 0x15954(%rip),%rsi
callq 4420 <_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm@plt>
jmp 4da8 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x53f>
movdqu 0x10(%rax),%xmm1
movaps %xmm1,0xc0(%rsp)
jmp 4d33 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x4ca>
lea 0x15922(%rip),%rdi
callq 44e0 <_ZSt20__throw_length_errorPKc@plt>
endbr64
mov %rax,%rbx
jmpq 5063 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x7fa>
lea 0xe0(%rsp),%rdx
mov %rdx,0xd0(%rsp)
mov (%rax),%rcx
lea 0x10(%rax),%rdx
cmp %rdx,%rcx
je 4e67 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x5fe>
mov %rcx,0xd0(%rsp)
mov 0x10(%rax),%rcx
mov %rcx,0xe0(%rsp)
mov 0x8(%rax),%rcx
mov %rcx,0xd8(%rsp)
mov %rdx,(%rax)
movq $0x0,0x8(%rax)
movb $0x0,0x10(%rax)
mov 0xd8(%rsp),%r8
mov 0xf8(%rsp),%rdx
lea (%r8,%rdx,1),%rcx
mov 0xd0(%rsp),%rsi
lea 0xe0(%rsp),%rax
cmp %rax,%rsi
mov $0xf,%eax
cmovne 0xe0(%rsp),%rax
cmp %rax,%rcx
jbe 4e50 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x5e7>
lea 0x100(%rsp),%rax
cmp %rax,0xf0(%rsp)
je 4e79 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x610>
mov 0x100(%rsp),%rax
cmp %rax,%rcx
jbe 4e80 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x617>
lea 0xd0(%rsp),%rdi
mov 0xf0(%rsp),%rsi
callq 4420 <_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm@plt>
jmp 4e9a <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x631>
movdqu 0x10(%rax),%xmm2
movaps %xmm2,0xe0(%rsp)
jmpq 4ddc <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x573>
mov $0xf,%eax
jmp 4e4b <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x5e2>
lea 0xf0(%rsp),%rdi
mov %rsi,%rcx
mov $0x0,%edx
mov $0x0,%esi
callq 46c0 <_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm@plt>
lea 0x10(%rbx),%rdx
mov %rdx,(%rbx)
mov (%rax),%rcx
lea 0x10(%rax),%rdx
cmp %rdx,%rcx
je 4fca <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x761>
mov %rcx,(%rbx)
mov 0x10(%rax),%rcx
mov %rcx,0x10(%rbx)
mov 0x8(%rax),%rcx
mov %rcx,0x8(%rbx)
mov %rdx,(%rax)
movq $0x0,0x8(%rax)
movb $0x0,0x10(%rax)
mov 0xd0(%rsp),%rdi
lea 0xe0(%rsp),%rax
cmp %rax,%rdi
je 4eed <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x684>
callq 45a0 <_ZdlPv@plt>
mov 0xb0(%rsp),%rdi
lea 0xc0(%rsp),%rax
cmp %rax,%rdi
je 4f07 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x69e>
callq 45a0 <_ZdlPv@plt>
mov 0x70(%rsp),%rdi
lea 0x80(%rsp),%rax
cmp %rax,%rdi
je 4f1e <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x6b5>
callq 45a0 <_ZdlPv@plt>
mov 0x50(%rsp),%rdi
lea 0x60(%rsp),%rax
cmp %rax,%rdi
je 4f32 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x6c9>
callq 45a0 <_ZdlPv@plt>
mov 0x90(%rsp),%rdi
lea 0xa0(%rsp),%rax
cmp %rax,%rdi
je 4f4c <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x6e3>
callq 45a0 <_ZdlPv@plt>
mov 0xf0(%rsp),%rdi
lea 0x100(%rsp),%rax
cmp %rax,%rdi
je 4f66 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x6fd>
callq 45a0 <_ZdlPv@plt>
mov 0x30(%rsp),%rdi
test %rdi,%rdi
je 4f75 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x70c>
callq 45a0 <_ZdlPv@plt>
mov 0x28(%rsp),%rbp
test %rbp,%rbp
je 4f98 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x72f>
cmpq $0x0,0x1c039(%rip)
je 4ff6 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x78d>
mov $0xffffffff,%eax
lock xadd %eax,0x8(%rbp)
cmp $0x1,%eax
je 5001 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x798>
lea 0x18(%rsp),%rdi
callq 4690 <_ZNSt6localeD1Ev@plt>
mov 0x288(%rsp),%rax
xor %fs:0x28,%rax
jne 5148 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x8df>
mov %rbx,%rax
add $0x298,%rsp
pop %rbx
pop %rbp
pop %r12
pop %r13
retq
movdqu 0x10(%rax),%xmm3
movups %xmm3,0x10(%rbx)
jmpq 4ebc <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x653>
lea 0x10(%rbx),%rax
mov %rax,(%rbx)
lea 0x152bb(%rip),%rdx
mov %rdx,%rsi
mov %rbx,%rdi
callq 6026 <_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag>
jmpq 4f66 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x6fd>
mov 0x8(%rbp),%eax
lea -0x1(%rax),%edx
mov %edx,0x8(%rbp)
jmp 4f93 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x72a>
mov 0x0(%rbp),%rax
mov %rbp,%rdi
callq *0x10(%rax)
cmpq $0x0,0x1bfad(%rip)
je 5037 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x7ce>
mov $0xffffffff,%eax
lock xadd %eax,0xc(%rbp)
cmp $0x1,%eax
jne 4f98 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x72f>
mov 0x0(%rbp),%rax
mov %rbp,%rdi
callq *0x18(%rax)
jmpq 4f98 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x72f>
mov 0xc(%rbp),%eax
lea -0x1(%rax),%edx
mov %edx,0xc(%rbp)
jmp 501f <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x7b6>
endbr64
mov %rax,%rbx
mov 0xd0(%rsp),%rdi
lea 0xe0(%rsp),%rax
cmp %rax,%rdi
je 5063 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x7fa>
callq 45a0 <_ZdlPv@plt>
mov 0xb0(%rsp),%rdi
lea 0xc0(%rsp),%rax
cmp %rax,%rdi
je 507d <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x814>
callq 45a0 <_ZdlPv@plt>
mov 0x70(%rsp),%rdi
lea 0x80(%rsp),%rax
cmp %rax,%rdi
je 5094 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x82b>
callq 45a0 <_ZdlPv@plt>
mov 0x50(%rsp),%rdi
lea 0x60(%rsp),%rax
cmp %rax,%rdi
je 50a8 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x83f>
callq 45a0 <_ZdlPv@plt>
mov 0x90(%rsp),%rdi
lea 0xa0(%rsp),%rax
cmp %rax,%rdi
je 50c2 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x859>
callq 45a0 <_ZdlPv@plt>
mov 0xf0(%rsp),%rdi
lea 0x100(%rsp),%rax
cmp %rax,%rdi
je 50dc <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x873>
callq 45a0 <_ZdlPv@plt>
mov 0x30(%rsp),%rdi
test %rdi,%rdi
je 50eb <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x882>
callq 45a0 <_ZdlPv@plt>
lea 0x10(%rsp),%rdi
callq 5f0e <_ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED1Ev>
mov %rbx,%rdi
callq 4700 <_Unwind_Resume@plt>
endbr64
mov %rax,%rbx
jmpq 507d <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x814>
endbr64
mov %rax,%rbx
jmp 5094 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x82b>
endbr64
mov %rax,%rbx
jmp 50a8 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x83f>
endbr64
mov %rax,%rbx
jmp 50c2 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x859>
endbr64
mov %rax,%rbx
jmp 50dc <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x873>
mov (%rax),%rcx
sub 0x48(%rsp),%rcx
jmpq 4aaf <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x246>
mov -0x48(%rdx),%rcx
sub 0x48(%rsp),%rcx
jmpq 4aab <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x242>
callq 4600 <__stack_chk_fail@plt>
| _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r14
push r13
push r12
push rbx
sub rsp, 290h
mov r14, rdi
mov rbx, rsi
mov rax, fs:28h
mov [rbp+var_28], rax
xor eax, eax
lea r12, [rbp+var_298]
mov rdi, r12; this
call __ZNSt6localeC1Ev; std::locale::locale(void)
mov [rbp+var_290], 0
mov [rbp+var_288], 0
lea rdi, [rbp+var_1C0]
mov r8d, 10h
mov rcx, r12
lea rdx, aWLy+5; ""
lea rsi, [rdx-5]
call _ZNSt8__detail9_CompilerINSt7__cxx1112regex_traitsIcEEEC2EPKcS6_RKSt6localeNSt15regex_constants18syntax_option_typeE; std::__detail::_Compiler<std::regex_traits<char>>::_Compiler(char const*,char const*,std::locale const&,std::regex_constants::syntax_option_type)
mov rdx, [rbp+var_C0]
mov rax, [rbp+var_B8]
mov [rbp+var_B8], 0
mov [rbp+var_C0], 0
mov [rbp+var_290], rdx
mov rdi, [rbp+var_288]
mov [rbp+var_288], rax
test rdi, rdi
jz short loc_48DC
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_48DC:
mov [rbp+var_2A0], 10h
lea rdi, [rbp+var_90]
call _ZNSt11_Deque_baseINSt8__detail9_StateSeqINSt7__cxx1112regex_traitsIcEEEESaIS5_EED2Ev; std::_Deque_base<std::__detail::_StateSeq<std::regex_traits<char>>>::~_Deque_base()
mov rdi, [rbp+var_B0]; void *
lea rax, [rbp+var_A0]
cmp rdi, rax
jz short loc_4915
mov rax, [rbp+var_A0]
lea rsi, [rax+1]; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4915:
mov rdi, [rbp+var_B8]
test rdi, rdi
jz short loc_4926
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_4926:
mov rdi, [rbp+var_F0]; void *
lea rax, [rbp+var_E0]
cmp rdi, rax
jz short loc_4949
mov rax, [rbp+var_E0]
lea rsi, [rax+1]; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4949:
mov [rbp+var_280], 0
mov [rbp+var_278], 0
mov [rbp+var_270], 0
mov [rbp+var_268], 0
mov rdi, [rbx]
mov rsi, rdi
add rsi, [rbx+8]
lea rcx, [rbp+var_2A0]
lea rdx, [rbp+var_280]
sub rsp, 8
push 0
mov r9d, 0
mov r8d, 0
call _ZNSt8__detail17__regex_algo_implIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS5_9sub_matchISB_EEEcNS5_12regex_traitsIcEEEEbT_SH_RNS5_13match_resultsISH_T0_EERKNS5_11basic_regexIT1_T2_EENSt15regex_constants15match_flag_typeENS_20_RegexExecutorPolicyEb; std::__detail::__regex_algo_impl<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>> &,std::basic_regex<char,std::regex_traits<char>> const&,std::regex_constants::match_flag_type,std::__detail::_RegexExecutorPolicy,bool)
add rsp, 10h
test al, al
jz loc_53F6
mov rdx, [rbp+var_278]
mov rax, [rbp+var_280]
cmp rdx, rax
jz short loc_49CF
mov rcx, rdx
sub rcx, rax
cmp rcx, 48h ; 'H'
jnz short loc_49D3
loc_49CF:
lea rax, [rdx-48h]
loc_49D3:
cmp byte ptr [rax+10h], 0
jnz loc_4B2A
lea rax, [rbp+var_1B0]
mov [rbp+var_1C0], rax
mov [rbp+var_1B8], 0
mov byte ptr [rbp+var_1B0], 0
loc_49FD:
mov rcx, [rbp+var_278]
mov rdx, [rbp+var_280]
cmp rcx, rdx
jz loc_545B
mov rax, rcx
sub rax, rdx
cmp rax, 48h ; 'H'
jnz loc_544C
mov rsi, rcx
sub rsi, rdx
mov rax, [rcx-48h]
sub rax, [rbp+var_268]
cmp rsi, 48h ; 'H'
jnz short loc_4A3F
loc_4A3B:
lea rdx, [rcx-48h]
loc_4A3F:
mov ecx, 0
cmp byte ptr [rdx+10h], 0
jnz loc_4BD4
loc_4A4E:
add rax, rcx
mov r13, rax
shr r13, 3Fh
mov r12, rax
neg r12
cmovs r12, rax
cmp r12, 9
jbe loc_4C21
cmp r12, 63h ; 'c'
jbe loc_4BE0
cmp r12, 3E7h
jbe loc_4C0D
cmp r12, 270Fh
jbe loc_4C17
mov rdx, r12
mov ebx, 1
mov rsi, 346DC5D63886594Bh
loc_4AA2:
mov rcx, rdx
mov rax, rdx
mul rsi
shr rdx, 0Bh
add ebx, 4
cmp rcx, 1869Fh
jbe loc_4BE8
cmp rcx, 0F423Fh
jbe loc_4BE5
cmp rcx, 98967Fh
jbe loc_4C12
cmp rcx, 5F5E0FFh
ja short loc_4AA2
loc_4AE2:
add ebx, 3
jmp loc_4BE8
endbr64
mov rbx, rax
mov rdi, [rbp+var_288]
test rdi, rdi
jz short loc_4B02
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_4B02:
lea rdi, [rbp+var_298]; this
call __ZNSt6localeD1Ev; std::locale::~locale()
mov rax, [rbp+var_28]
sub rax, fs:28h
jz short loc_4B22
call ___stack_chk_fail
loc_4B22:
mov rdi, rbx; struct _Unwind_Exception *
call __Unwind_Resume
loc_4B2A:
mov r12, [rax]
mov rbx, [rax+8]
lea rax, [rbp+var_1B0]
mov [rbp+var_1C0], rax
mov [rbp+var_1B8], 0
sub rbx, r12
mov [rbp+var_2A8], rbx
cmp rbx, 0Fh
ja short loc_4B89
cmp rbx, 1
jnz short loc_4BC6
movzx eax, byte ptr [r12]
mov byte ptr [rbp+var_1B0], al
loc_4B6B:
mov rax, [rbp+var_2A8]
mov [rbp+var_1B8], rax
mov rdx, [rbp+var_1C0]
mov byte ptr [rdx+rax], 0
jmp loc_49FD
loc_4B89:
lea rsi, [rbp+var_2A8]
lea rdi, [rbp+var_1C0]
mov edx, 0
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_createERmm; std::string::_M_create(ulong &,ulong)
mov rdi, rax; dest
mov [rbp+var_1C0], rax
mov rax, [rbp+var_2A8]
mov [rbp+var_1B0], rax
loc_4BB9:
mov rdx, rbx; n
mov rsi, r12; src
call _memcpy
jmp short loc_4B6B
loc_4BC6:
test rbx, rbx
jz short loc_4B6B
lea rdi, [rbp+var_1B0]
jmp short loc_4BB9
loc_4BD4:
mov rcx, [rdx+8]
sub rcx, [rdx]
jmp loc_4A4E
loc_4BE0:
mov ebx, 1
loc_4BE5:
add ebx, 1
loc_4BE8:
lea rdi, [rbp+var_220]
lea rax, [rbp+var_210]
mov [rbp+var_220], rax
lea esi, [rbx+r13]
mov edx, 2Dh ; '-'
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char)
jmp short loc_4C28
loc_4C0D:
mov ebx, 1
loc_4C12:
add ebx, 2
jmp short loc_4BE8
loc_4C17:
mov ebx, 1
jmp loc_4AE2
loc_4C21:
mov ebx, 1
jmp short loc_4BE8
loc_4C28:
mov rdi, r13
add rdi, [rbp+var_220]
mov rdx, r12
mov esi, ebx
call _ZNSt8__detail18__to_chars_10_implImEEvPcjT_; std::__detail::__to_chars_10_impl<ulong>(char *,uint,ulong)
mov rdx, [rbp+var_278]
mov rax, [rbp+var_280]
cmp rdx, rax
jz short loc_4C5B
mov rcx, rdx
sub rcx, rax
cmp rcx, 48h ; 'H'
jnz short loc_4C5F
loc_4C5B:
lea rax, [rdx-48h]
loc_4C5F:
mov rax, [rax]
sub rax, [rbp+var_268]
mov r13, rax
shr r13, 3Fh
mov r12, rax
neg r12
cmovs r12, rax
cmp r12, 9
jbe loc_4D2D
cmp r12, 63h ; 'c'
jbe short loc_4CEF
cmp r12, 3E7h
jbe loc_4D1C
cmp r12, 270Fh
jbe loc_4D26
mov rdx, r12
mov ebx, 1
mov rsi, 346DC5D63886594Bh
loc_4CB6:
mov rcx, rdx
mov rax, rdx
mul rsi
shr rdx, 0Bh
add ebx, 4
cmp rcx, 1869Fh
jbe short loc_4CF7
cmp rcx, 0F423Fh
jbe short loc_4CF4
cmp rcx, 98967Fh
jbe short loc_4D21
cmp rcx, 5F5E0FFh
ja short loc_4CB6
loc_4CEA:
add ebx, 3
jmp short loc_4CF7
loc_4CEF:
mov ebx, 1
loc_4CF4:
add ebx, 1
loc_4CF7:
lea rdi, [rbp+var_260]
lea rax, [rbp+var_250]
mov [rbp+var_260], rax
lea esi, [rbx+r13]
mov edx, 2Dh ; '-'
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char)
jmp short loc_4D34
loc_4D1C:
mov ebx, 1
loc_4D21:
add ebx, 2
jmp short loc_4CF7
loc_4D26:
mov ebx, 1
jmp short loc_4CEA
loc_4D2D:
mov ebx, 1
jmp short loc_4CF7
loc_4D34:
mov rdi, r13
add rdi, [rbp+var_260]
mov rdx, r12
mov esi, ebx
call _ZNSt8__detail18__to_chars_10_implImEEvPcjT_; std::__detail::__to_chars_10_impl<ulong>(char *,uint,ulong)
lea rdi, [rbp+var_260]
mov r8d, 2Dh ; '-'
mov ecx, 1
mov edx, 0
mov rsi, [rbp+var_258]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE14_M_replace_auxEmmmc; std::string::_M_replace_aux(ulong,ulong,ulong,char)
lea rdx, [rbp+var_230]
mov [rbp+var_240], rdx
mov rcx, [rax]
lea rdx, [rax+10h]
cmp rcx, rdx
jz loc_4E35
mov [rbp+var_240], rcx
mov rcx, [rax+10h]
mov [rbp+var_230], rcx
loc_4D9B:
mov r8, [rax+8]
mov [rbp+var_238], r8
mov [rax], rdx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
mov rdx, [rbp+var_218]
lea rax, [r8+rdx]
mov rcx, [rbp+var_240]
lea rsi, [rbp+var_230]
cmp rcx, rsi
jz loc_4EB8
mov rsi, [rbp+var_230]
loc_4DDE:
cmp rsi, rax
jnb short loc_4E07
lea rsi, [rbp+var_210]
cmp [rbp+var_220], rsi
jz loc_4EC2
mov rsi, [rbp+var_210]
loc_4DFE:
cmp rsi, rax
jnb loc_4ECC
loc_4E07:
mov rsi, [rbp+var_220]
mov rax, 3FFFFFFFFFFFFFFFh
sub rax, r8
cmp rax, rdx
jb loc_4EF3
lea rdi, [rbp+var_240]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
jmp loc_4F1F
loc_4E35:
lea r8, [rbp+var_230]
mov rbx, [rax+8]
lea rsi, [rbx+1]
mov r9, r8
mov rcx, rdx
cmp esi, 8
jnb short loc_4E8F
loc_4E4F:
mov edi, 0
test sil, 4
jz short loc_4E64
mov edi, [rcx]
mov [r9], edi
mov edi, 4
loc_4E64:
test sil, 2
jz short loc_4E78
movzx r8d, word ptr [rcx+rdi]
mov [r9+rdi], r8w
add rdi, 2
loc_4E78:
test sil, 1
jz loc_4D9B
movzx ecx, byte ptr [rcx+rdi]
mov [r9+rdi], cl
jmp loc_4D9B
loc_4E8F:
mov r10d, esi
and r10d, 0FFFFFFF8h
mov ecx, 0
loc_4E9B:
mov edi, ecx
mov r9, [rdx+rdi]
mov [r8+rdi], r9
add ecx, 8
cmp ecx, r10d
jb short loc_4E9B
mov ecx, ecx
lea r9, [r8+rcx]
add rcx, rdx
jmp short loc_4E4F
loc_4EB8:
mov esi, 0Fh
jmp loc_4DDE
loc_4EC2:
mov esi, 0Fh
jmp loc_4DFE
loc_4ECC:
lea rdi, [rbp+var_220]
mov edx, 0
mov esi, 0
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
mov rsi, rax
lea rdi, [rbp+var_200]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EOS4_; std::string::basic_string(std::string&&)
jmp short loc_4F65
loc_4EF3:
mov rax, [rbp+var_28]
sub rax, fs:28h
jnz short loc_4F1A
lea rdi, aBasicStringApp; "basic_string::append"
call __ZSt20__throw_length_errorPKc; std::__throw_length_error(char const*)
endbr64
mov rbx, rax
jmp loc_5211
loc_4F1A:
call ___stack_chk_fail
loc_4F1F:
lea rdx, [rbp+var_1F0]
mov [rbp+var_200], rdx
mov rcx, [rax]
lea rdx, [rax+10h]
cmp rcx, rdx
jz short loc_4F9D
mov [rbp+var_200], rcx
mov rcx, [rax+10h]
mov [rbp+var_1F0], rcx
loc_4F4B:
mov rcx, [rax+8]
mov [rbp+var_1F8], rcx
mov [rax], rdx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
loc_4F65:
mov rax, 3FFFFFFFFFFFFFFFh
sub rax, [rbp+var_1F8]
cmp rax, 1
jbe loc_5020
lea rdi, [rbp+var_200]
mov edx, 2
lea rsi, asc_1971A; ": "
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
jmp loc_504C
loc_4F9D:
lea r8, [rbp+var_1F0]
mov rbx, [rax+8]
lea rsi, [rbx+1]
mov r9, r8
mov rcx, rdx
cmp esi, 8
jnb short loc_4FF7
loc_4FB7:
mov edi, 0
test sil, 4
jz short loc_4FCC
mov edi, [rcx]
mov [r9], edi
mov edi, 4
loc_4FCC:
test sil, 2
jz short loc_4FE0
movzx r8d, word ptr [rcx+rdi]
mov [r9+rdi], r8w
add rdi, 2
loc_4FE0:
test sil, 1
jz loc_4F4B
movzx ecx, byte ptr [rcx+rdi]
mov [r9+rdi], cl
jmp loc_4F4B
loc_4FF7:
mov r10d, esi
and r10d, 0FFFFFFF8h
mov ecx, 0
loc_5003:
mov edi, ecx
mov r9, [rdx+rdi]
mov [r8+rdi], r9
add ecx, 8
cmp ecx, r10d
jb short loc_5003
mov ecx, ecx
lea r9, [r8+rcx]
add rcx, rdx
jmp short loc_4FB7
loc_5020:
mov rax, [rbp+var_28]
sub rax, fs:28h
jnz short loc_5047
lea rdi, aBasicStringApp; "basic_string::append"
call __ZSt20__throw_length_errorPKc; std::__throw_length_error(char const*)
endbr64
mov rbx, rax
jmp loc_5205
loc_5047:
call ___stack_chk_fail
loc_504C:
lea rdx, [rbp+var_1D0]
mov [rbp+var_1E0], rdx
mov rcx, [rax]
lea rdx, [rax+10h]
cmp rcx, rdx
jz loc_5116
mov [rbp+var_1E0], rcx
mov rcx, [rax+10h]
mov [rbp+var_1D0], rcx
loc_507C:
mov r8, [rax+8]
mov [rbp+var_1D8], r8
mov [rax], rdx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
mov rdx, [rbp+var_1B8]
lea rax, [r8+rdx]
mov rcx, [rbp+var_1E0]
lea rsi, [rbp+var_1D0]
cmp rcx, rsi
jz loc_5199
mov rsi, [rbp+var_1D0]
loc_50BF:
cmp rsi, rax
jnb short loc_50E8
lea rsi, [rbp+var_1B0]
cmp [rbp+var_1C0], rsi
jz loc_51A3
mov rsi, [rbp+var_1B0]
loc_50DF:
cmp rsi, rax
jnb loc_51AD
loc_50E8:
mov rsi, [rbp+var_1C0]
mov rax, 3FFFFFFFFFFFFFFFh
sub rax, r8
cmp rax, rdx
jb loc_51D3
lea rdi, [rbp+var_1E0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
jmp loc_5276
loc_5116:
lea r8, [rbp+var_1D0]
mov rbx, [rax+8]
lea rsi, [rbx+1]
mov r9, r8
mov rcx, rdx
cmp esi, 8
jnb short loc_5170
loc_5130:
mov edi, 0
test sil, 4
jz short loc_5145
mov edi, [rcx]
mov [r9], edi
mov edi, 4
loc_5145:
test sil, 2
jz short loc_5159
movzx r8d, word ptr [rcx+rdi]
mov [r9+rdi], r8w
add rdi, 2
loc_5159:
test sil, 1
jz loc_507C
movzx ecx, byte ptr [rcx+rdi]
mov [r9+rdi], cl
jmp loc_507C
loc_5170:
mov r10d, esi
and r10d, 0FFFFFFF8h
mov ecx, 0
loc_517C:
mov edi, ecx
mov r9, [rdx+rdi]
mov [r8+rdi], r9
add ecx, 8
cmp ecx, r10d
jb short loc_517C
mov ecx, ecx
lea r9, [r8+rcx]
add rcx, rdx
jmp short loc_5130
loc_5199:
mov esi, 0Fh
jmp loc_50BF
loc_51A3:
mov esi, 0Fh
jmp loc_50DF
loc_51AD:
lea rdi, [rbp+var_1C0]
mov edx, 0
mov esi, 0
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
mov rsi, rax
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EOS4_; std::string::basic_string(std::string&&)
jmp loc_52B2
loc_51D3:
mov rax, [rbp+var_28]
sub rax, fs:28h
jnz loc_5271
lea rdi, aBasicStringApp; "basic_string::append"
call __ZSt20__throw_length_errorPKc; std::__throw_length_error(char const*)
endbr64
mov rbx, rax
lea rdi, [rbp+var_1E0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv; std::string::_M_dispose(void)
loc_5205:
lea rdi, [rbp+var_200]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv; std::string::_M_dispose(void)
loc_5211:
lea rdi, [rbp+var_240]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv; std::string::_M_dispose(void)
loc_521D:
lea rdi, [rbp+var_260]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv; std::string::_M_dispose(void)
loc_5229:
lea rdi, [rbp+var_220]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv; std::string::_M_dispose(void)
loc_5235:
lea rdi, [rbp+var_1C0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv; std::string::_M_dispose(void)
loc_5241:
lea rdi, [rbp+var_280]
call _ZNSt6vectorINSt7__cxx119sub_matchIN9__gnu_cxx17__normal_iteratorIPKcNS0_12basic_stringIcSt11char_traitsIcESaIcEEEEEEESaISC_EED2Ev; std::vector<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~vector()
lea rdi, [rbp+var_2A0]
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; std::basic_regex<char,std::regex_traits<char>>::~basic_regex()
mov rax, [rbp+var_28]
sub rax, fs:28h
jz loc_5444
call ___stack_chk_fail
loc_5271:
call ___stack_chk_fail
loc_5276:
mov rdx, rax
lea rcx, [r14+10h]
mov [r14], rcx
mov rax, [rax]
lea rsi, [rdx+10h]
cmp rax, rsi
jz loc_5355
mov [r14], rax
mov rax, [rdx+10h]
mov [r14+10h], rax
loc_529B:
mov rax, [rdx+8]
mov [r14+8], rax
mov [rdx], rsi
mov qword ptr [rdx+8], 0
mov byte ptr [rdx+10h], 0
loc_52B2:
lea rdi, [rbp+var_1E0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv; std::string::_M_dispose(void)
lea rdi, [rbp+var_200]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv; std::string::_M_dispose(void)
lea rdi, [rbp+var_240]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv; std::string::_M_dispose(void)
lea rdi, [rbp+var_260]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv; std::string::_M_dispose(void)
lea rdi, [rbp+var_220]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv; std::string::_M_dispose(void)
lea rdi, [rbp+var_1C0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv; std::string::_M_dispose(void)
loc_52FA:
mov rdi, [rbp+var_280]; void *
test rdi, rdi
jz short loc_5315
mov rsi, [rbp+var_270]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5315:
mov rdi, [rbp+var_288]
test rdi, rdi
jz short loc_5326
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_5326:
lea rdi, [rbp+var_298]; this
call __ZNSt6localeD1Ev; std::locale::~locale()
mov rax, [rbp+var_28]
sub rax, fs:28h
jnz loc_546B
mov rax, r14
lea rsp, [rbp-20h]
pop rbx
pop r12
pop r13
pop r14
pop rbp
retn
loc_5355:
mov rax, [rdx+8]
add rax, 1
cmp eax, 8
jnb short loc_53A5
test al, 4
jnz short loc_538F
test eax, eax
jz loc_529B
movzx edi, byte ptr [rdx+10h]
mov [r14+10h], dil
test al, 2
jz loc_529B
mov eax, eax
movzx edi, word ptr [rsi+rax-2]
mov [rcx+rax-2], di
jmp loc_529B
loc_538F:
mov edi, [rdx+10h]
mov [r14+10h], edi
mov eax, eax
mov edi, [rsi+rax-4]
mov [rcx+rax-4], edi
jmp loc_529B
loc_53A5:
mov rdi, [rdx+10h]
mov [r14+10h], rdi
mov edi, eax
mov r8, [rsi+rdi-8]
mov [rcx+rdi-8], r8
lea r8, [rcx+8]
and r8, 0FFFFFFFFFFFFFFF8h
sub rcx, r8
mov r10, rsi
sub r10, rcx
add eax, ecx
and eax, 0FFFFFFF8h
cmp eax, 8
jb loc_529B
and eax, 0FFFFFFF8h
mov ecx, 0
loc_53E0:
mov edi, ecx
mov r9, [r10+rdi]
mov [r8+rdi], r9
add ecx, 8
cmp ecx, eax
jb short loc_53E0
jmp loc_529B
loc_53F6:
mov rdi, r14
lea rax, [r14+10h]
mov [r14], rax
lea rsi, asc_19669+7; ""
mov rdx, rsi
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)
jmp loc_52FA
endbr64
mov rbx, rax
jmp loc_521D
endbr64
mov rbx, rax
jmp loc_5229
endbr64
mov rbx, rax
jmp loc_5235
endbr64
mov rbx, rax
jmp loc_5241
loc_5444:
mov rdi, rbx; struct _Unwind_Exception *
call __Unwind_Resume
loc_544C:
mov rax, [rdx]
sub rax, [rbp+var_268]
jmp loc_4A3F
loc_545B:
mov rax, [rcx-48h]
sub rax, [rbp+var_268]
jmp loc_4A3B
loc_546B:
call ___stack_chk_fail | char ** func0(char **a1, long long a2)
{
long long v3; // rdx
long long v4; // rax
long long v5; // rdi
_BYTE *v6; // rax
_QWORD *v7; // rdx
long long v8; // rax
long long v9; // rcx
long long v10; // rax
unsigned long long v11; // r13
unsigned long long v12; // r12
unsigned long long v13; // rdx
unsigned int v14; // ebx
unsigned long long v15; // rcx
_BYTE *v16; // r12
long long v17; // rbx
size_t v18; // rbx
_QWORD *v19; // rdi
_QWORD *v20; // rax
long long v21; // rax
unsigned long long v22; // r13
unsigned long long v23; // r12
unsigned long long v24; // rdx
unsigned int v25; // ebx
unsigned long long v26; // rcx
_QWORD *v27; // rax
_QWORD *v28; // rdx
long long v29; // r8
unsigned long long v30; // rax
unsigned long long v31; // rsi
unsigned long long v32; // rsi
_QWORD *v33; // rax
unsigned int v34; // esi
_DWORD *v35; // r9
_DWORD *v36; // rcx
long long v37; // rdi
unsigned int v38; // ecx
long long v39; // rax
_QWORD *v40; // rdx
_QWORD *v41; // rax
unsigned int v42; // esi
_DWORD *v43; // r9
_DWORD *v44; // rcx
long long v45; // rdi
unsigned int v46; // ecx
_QWORD *v47; // rdx
long long v48; // r8
unsigned long long v49; // rax
unsigned long long v50; // rsi
unsigned long long v51; // rsi
char **v52; // rax
unsigned int v53; // esi
_DWORD *v54; // r9
_DWORD *v55; // rcx
long long v56; // rdi
unsigned int v57; // ecx
long long v58; // rsi
char **v59; // rdx
_QWORD *v60; // rcx
char *v61; // rax
char *v62; // rsi
long long v64; // rax
unsigned long long v65; // r8
char *v66; // rcx
char *v67; // r10
unsigned int v68; // eax
unsigned int v69; // eax
unsigned int v70; // ecx
size_t v71; // [rsp+8h] [rbp-2A8h] BYREF
int v72; // [rsp+10h] [rbp-2A0h] BYREF
char v73[8]; // [rsp+18h] [rbp-298h] BYREF
long long v74; // [rsp+20h] [rbp-290h]
long long v75; // [rsp+28h] [rbp-288h]
void *v76; // [rsp+30h] [rbp-280h] BYREF
_BYTE *v77; // [rsp+38h] [rbp-278h]
long long v78; // [rsp+40h] [rbp-270h]
long long v79; // [rsp+48h] [rbp-268h]
_QWORD v80[2]; // [rsp+50h] [rbp-260h] BYREF
char v81; // [rsp+60h] [rbp-250h] BYREF
_QWORD *v82; // [rsp+70h] [rbp-240h] BYREF
long long v83; // [rsp+78h] [rbp-238h]
_QWORD v84[2]; // [rsp+80h] [rbp-230h] BYREF
_QWORD *v85; // [rsp+90h] [rbp-220h] BYREF
unsigned long long v86; // [rsp+98h] [rbp-218h]
_QWORD v87[2]; // [rsp+A0h] [rbp-210h] BYREF
_QWORD *v88; // [rsp+B0h] [rbp-200h] BYREF
long long v89; // [rsp+B8h] [rbp-1F8h]
_QWORD v90[2]; // [rsp+C0h] [rbp-1F0h] BYREF
_QWORD *v91; // [rsp+D0h] [rbp-1E0h] BYREF
long long v92; // [rsp+D8h] [rbp-1D8h]
_QWORD v93[2]; // [rsp+E0h] [rbp-1D0h] BYREF
_QWORD *v94; // [rsp+F0h] [rbp-1C0h] BYREF
unsigned long long v95; // [rsp+F8h] [rbp-1B8h]
_QWORD v96[24]; // [rsp+100h] [rbp-1B0h] BYREF
void *v97; // [rsp+1C0h] [rbp-F0h]
long long v98; // [rsp+1D0h] [rbp-E0h] BYREF
long long v99; // [rsp+1F0h] [rbp-C0h]
long long v100; // [rsp+1F8h] [rbp-B8h]
void *v101; // [rsp+200h] [rbp-B0h]
long long v102; // [rsp+210h] [rbp-A0h] BYREF
char v103[104]; // [rsp+220h] [rbp-90h] BYREF
unsigned long long v104; // [rsp+288h] [rbp-28h]
v104 = __readfsqword(0x28u);
std::locale::locale((std::locale *)v73);
v74 = 0LL;
v75 = 0LL;
std::__detail::_Compiler<std::regex_traits<char>>::_Compiler(&v94, "\\w+ly", "", v73, 16LL);
v3 = v99;
v4 = v100;
v100 = 0LL;
v99 = 0LL;
v74 = v3;
v5 = v75;
v75 = v4;
if ( v5 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release();
v72 = 16;
std::_Deque_base<std::__detail::_StateSeq<std::regex_traits<char>>>::~_Deque_base(v103);
if ( v101 != &v102 )
operator delete(v101, v102 + 1);
if ( v100 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release();
if ( v97 != &v98 )
operator delete(v97, v98 + 1);
v76 = 0LL;
v77 = 0LL;
v78 = 0LL;
v79 = 0LL;
if ( !(unsigned __int8)std::__detail::__regex_algo_impl<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>>(
*(_QWORD *)a2,
*(_DWORD *)(a2 + 8) + *(_DWORD *)a2,
(unsigned int)&v76,
(unsigned int)&v72,
0,
0,
0) )
{
*a1 = (char *)(a1 + 2);
std::string::_M_construct<char const*>(a1, "", "");
goto LABEL_138;
}
v6 = v76;
if ( v77 == v76 || v77 - (_BYTE *)v76 == 72 )
v6 = v77 - 72;
if ( !v6[16] )
{
v94 = v96;
v95 = 0LL;
LOBYTE(v96[0]) = 0;
goto LABEL_15;
}
v16 = *(_BYTE **)v6;
v17 = *((_QWORD *)v6 + 1);
v94 = v96;
v95 = 0LL;
v18 = v17 - (_QWORD)v16;
v71 = v18;
if ( v18 > 0xF )
{
v19 = (_QWORD *)std::string::_M_create(&v94, &v71, 0LL);
v94 = v19;
v96[0] = v71;
LABEL_38:
memcpy(v19, v16, v18);
goto LABEL_36;
}
if ( v18 != 1 )
{
if ( !v18 )
goto LABEL_36;
v19 = v96;
goto LABEL_38;
}
LOBYTE(v96[0]) = *v16;
LABEL_36:
v95 = v71;
*((_BYTE *)v94 + v71) = 0;
LABEL_15:
v7 = v76;
if ( v77 == v76 )
{
v8 = *((_QWORD *)v77 - 9) - v79;
}
else
{
if ( v77 - (_BYTE *)v76 != 72 )
{
v8 = *(_QWORD *)v76 - v79;
goto LABEL_19;
}
v8 = *((_QWORD *)v77 - 9) - v79;
}
v7 = v77 - 72;
LABEL_19:
v9 = 0LL;
if ( *((_BYTE *)v7 + 16) )
v9 = v7[1] - *v7;
v10 = v9 + v8;
v11 = (unsigned long long)v10 >> 63;
v12 = -v10;
if ( v10 > 0 )
v12 = v10;
if ( v12 <= 9 )
{
v14 = 1;
}
else if ( v12 <= 0x63 )
{
v14 = 1;
LABEL_42:
++v14;
}
else if ( v12 <= 0x3E7 )
{
v14 = 1;
LABEL_45:
v14 += 2;
}
else if ( v12 <= 0x270F )
{
v14 = 1;
LABEL_32:
v14 += 3;
}
else
{
v13 = v12;
v14 = 1;
while ( 1 )
{
v15 = v13;
v13 /= 0x2710uLL;
v14 += 4;
if ( v15 <= 0x1869F )
break;
if ( v15 <= 0xF423F )
goto LABEL_42;
if ( v15 <= 0x98967F )
goto LABEL_45;
if ( v15 <= 0x5F5E0FF )
goto LABEL_32;
}
}
v85 = v87;
std::string::_M_construct(&v85, v14 + (unsigned int)v11, 45LL);
std::__detail::__to_chars_10_impl<unsigned long>((char *)v85 + v11, v14, v12);
v20 = v76;
if ( v77 == v76 || v77 - (_BYTE *)v76 == 72 )
v20 = v77 - 72;
v21 = *v20 - v79;
v22 = (unsigned long long)v21 >> 63;
v23 = -v21;
if ( v21 > 0 )
v23 = v21;
if ( v23 <= 9 )
{
v25 = 1;
}
else if ( v23 <= 0x63 )
{
v25 = 1;
LABEL_64:
++v25;
}
else if ( v23 <= 0x3E7 )
{
v25 = 1;
LABEL_67:
v25 += 2;
}
else if ( v23 <= 0x270F )
{
v25 = 1;
LABEL_62:
v25 += 3;
}
else
{
v24 = v23;
v25 = 1;
while ( 1 )
{
v26 = v24;
v24 /= 0x2710uLL;
v25 += 4;
if ( v26 <= 0x1869F )
break;
if ( v26 <= 0xF423F )
goto LABEL_64;
if ( v26 <= 0x98967F )
goto LABEL_67;
if ( v26 <= 0x5F5E0FF )
goto LABEL_62;
}
}
v80[0] = &v81;
std::string::_M_construct(v80, v25 + (unsigned int)v22, 45LL);
std::__detail::__to_chars_10_impl<unsigned long>(v80[0] + v22, v25, v23);
v27 = (_QWORD *)std::string::_M_replace_aux(v80, v80[1], 0LL, 1LL, 45LL);
v82 = v84;
v28 = v27 + 2;
if ( (_QWORD *)*v27 == v27 + 2 )
{
v34 = v27[1] + 1;
v35 = v84;
v36 = v27 + 2;
if ( v34 >= 8 )
{
v38 = 0;
do
{
v84[v38 / 8] = v28[v38 / 8];
v38 += 8;
}
while ( v38 < (v34 & 0xFFFFFFF8) );
v35 = &v84[v38 / 8];
v36 = &v28[v38 / 8];
}
v37 = 0LL;
if ( (v34 & 4) != 0 )
{
*v35 = *v36;
v37 = 4LL;
}
if ( (v34 & 2) != 0 )
{
*(_WORD *)((char *)v35 + v37) = *(_WORD *)((char *)v36 + v37);
v37 += 2LL;
}
if ( (v34 & 1) != 0 )
*((_BYTE *)v35 + v37) = *((_BYTE *)v36 + v37);
}
else
{
v82 = (_QWORD *)*v27;
v84[0] = v27[2];
}
v83 = v27[1];
v29 = v83;
*v27 = v28;
v27[1] = 0LL;
*((_BYTE *)v27 + 16) = 0;
v30 = v29 + v86;
if ( v82 == v84 )
v31 = 15LL;
else
v31 = v84[0];
if ( v31 < v30 && (v85 == v87 ? (v32 = 15LL) : (v32 = v87[0]), v32 >= v30) )
{
v39 = std::string::_M_replace(&v85, 0LL, 0LL);
std::string::basic_string(&v88, v39);
}
else
{
if ( 0x3FFFFFFFFFFFFFFFLL - v29 < v86 )
std::__throw_length_error("basic_string::append");
v33 = (_QWORD *)std::string::_M_append(&v82, v85);
v88 = v90;
v40 = v33 + 2;
if ( (_QWORD *)*v33 == v33 + 2 )
{
v42 = v33[1] + 1;
v43 = v90;
v44 = v33 + 2;
if ( v42 >= 8 )
{
v46 = 0;
do
{
v90[v46 / 8] = v40[v46 / 8];
v46 += 8;
}
while ( v46 < (v42 & 0xFFFFFFF8) );
v43 = &v90[v46 / 8];
v44 = &v40[v46 / 8];
}
v45 = 0LL;
if ( (v42 & 4) != 0 )
{
*v43 = *v44;
v45 = 4LL;
}
if ( (v42 & 2) != 0 )
{
*(_WORD *)((char *)v43 + v45) = *(_WORD *)((char *)v44 + v45);
v45 += 2LL;
}
if ( (v42 & 1) != 0 )
*((_BYTE *)v43 + v45) = *((_BYTE *)v44 + v45);
}
else
{
v88 = (_QWORD *)*v33;
v90[0] = v33[2];
}
v89 = v33[1];
*v33 = v40;
v33[1] = 0LL;
*((_BYTE *)v33 + 16) = 0;
}
if ( v89 == 0x3FFFFFFFFFFFFFFFLL || v89 == 4611686018427387902LL )
std::__throw_length_error("basic_string::append");
v41 = (_QWORD *)std::string::_M_append(&v88, ": ");
v91 = v93;
v47 = v41 + 2;
if ( (_QWORD *)*v41 == v41 + 2 )
{
v53 = v41[1] + 1;
v54 = v93;
v55 = v41 + 2;
if ( v53 >= 8 )
{
v57 = 0;
do
{
v93[v57 / 8] = v47[v57 / 8];
v57 += 8;
}
while ( v57 < (v53 & 0xFFFFFFF8) );
v54 = &v93[v57 / 8];
v55 = &v47[v57 / 8];
}
v56 = 0LL;
if ( (v53 & 4) != 0 )
{
*v54 = *v55;
v56 = 4LL;
}
if ( (v53 & 2) != 0 )
{
*(_WORD *)((char *)v54 + v56) = *(_WORD *)((char *)v55 + v56);
v56 += 2LL;
}
if ( (v53 & 1) != 0 )
*((_BYTE *)v54 + v56) = *((_BYTE *)v55 + v56);
}
else
{
v91 = (_QWORD *)*v41;
v93[0] = v41[2];
}
v92 = v41[1];
v48 = v92;
*v41 = v47;
v41[1] = 0LL;
*((_BYTE *)v41 + 16) = 0;
v49 = v48 + v95;
if ( v91 == v93 )
v50 = 15LL;
else
v50 = v93[0];
if ( v50 < v49 && (v94 == v96 ? (v51 = 15LL) : (v51 = v96[0]), v51 >= v49) )
{
v58 = std::string::_M_replace(&v94, 0LL, 0LL);
std::string::basic_string(a1, v58);
}
else
{
if ( 0x3FFFFFFFFFFFFFFFLL - v48 < v95 )
std::__throw_length_error("basic_string::append");
v52 = (char **)std::string::_M_append(&v91, v94);
v59 = v52;
v60 = a1 + 2;
*a1 = (char *)(a1 + 2);
v61 = *v52;
v62 = (char *)(v59 + 2);
if ( v61 == (char *)(v59 + 2) )
{
v64 = (long long)(v59[1] + 1);
if ( (unsigned int)v64 >= 8 )
{
a1[2] = v59[2];
*(_QWORD *)((char *)v60 + (unsigned int)v64 - 8) = *(_QWORD *)&v62[(unsigned int)v64 - 8];
v65 = (unsigned long long)(a1 + 3) & 0xFFFFFFFFFFFFFFF8LL;
v66 = (char *)v60 - v65;
v67 = (char *)(v62 - v66);
v68 = ((_DWORD)v66 + v64) & 0xFFFFFFF8;
if ( v68 >= 8 )
{
v69 = v68 & 0xFFFFFFF8;
v70 = 0;
do
{
*(_QWORD *)(v65 + v70) = *(_QWORD *)&v67[v70];
v70 += 8;
}
while ( v70 < v69 );
}
}
else if ( (v64 & 4) != 0 )
{
*((_DWORD *)a1 + 4) = *((_DWORD *)v59 + 4);
*(_DWORD *)((char *)v60 + (unsigned int)v64 - 4) = *(_DWORD *)&v62[(unsigned int)v64 - 4];
}
else if ( *((_DWORD *)v59 + 2) != -1 )
{
*((_BYTE *)a1 + 16) = *((_BYTE *)v59 + 16);
if ( (v64 & 2) != 0 )
*(_WORD *)((char *)v60 + (unsigned int)v64 - 2) = *(_WORD *)&v62[(unsigned int)v64 - 2];
}
}
else
{
*a1 = v61;
a1[2] = v59[2];
}
a1[1] = v59[1];
*v59 = v62;
v59[1] = 0LL;
*((_BYTE *)v59 + 16) = 0;
}
std::string::_M_dispose(&v91);
std::string::_M_dispose(&v88);
std::string::_M_dispose(&v82);
std::string::_M_dispose(v80);
std::string::_M_dispose(&v85);
std::string::_M_dispose(&v94);
LABEL_138:
if ( v76 )
operator delete(v76, v78 - (_QWORD)v76);
if ( v75 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release();
std::locale::~locale((std::locale *)v73);
return a1;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x290
MOV R14,RDI
MOV RBX,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
XOR EAX,EAX
LEA R12,[RBP + -0x298]
MOV RDI,R12
CALL 0x00104730
MOV qword ptr [RBP + -0x290],0x0
MOV qword ptr [RBP + -0x288],0x0
LEA RDI,[RBP + -0x1c0]
MOV R8D,0x10
MOV RCX,R12
LEA RDX,[0x119704]
LEA RSI,[RDX + -0x5]
LAB_00104894:
CALL 0x00116c84
MOV RDX,qword ptr [RBP + -0xc0]
MOV RAX,qword ptr [RBP + -0xb8]
MOV qword ptr [RBP + -0xb8],0x0
MOV qword ptr [RBP + -0xc0],0x0
MOV qword ptr [RBP + -0x290],RDX
MOV RDI,qword ptr [RBP + -0x288]
MOV qword ptr [RBP + -0x288],RAX
TEST RDI,RDI
JZ 0x001048dc
CALL 0x00106650
LAB_001048dc:
MOV dword ptr [RBP + -0x2a0],0x10
LEA RDI,[RBP + -0x90]
CALL 0x001069c4
MOV RDI,qword ptr [RBP + -0xb0]
LEA RAX,[RBP + -0xa0]
CMP RDI,RAX
JZ 0x00104915
MOV RAX,qword ptr [RBP + -0xa0]
LEA RSI,[RAX + 0x1]
CALL 0x00104580
LAB_00104915:
MOV RDI,qword ptr [RBP + -0xb8]
TEST RDI,RDI
JZ 0x00104926
CALL 0x00106650
LAB_00104926:
MOV RDI,qword ptr [RBP + -0xf0]
LEA RAX,[RBP + -0xe0]
CMP RDI,RAX
JZ 0x00104949
MOV RAX,qword ptr [RBP + -0xe0]
LEA RSI,[RAX + 0x1]
CALL 0x00104580
LAB_00104949:
MOV qword ptr [RBP + -0x280],0x0
MOV qword ptr [RBP + -0x278],0x0
MOV qword ptr [RBP + -0x270],0x0
MOV qword ptr [RBP + -0x268],0x0
MOV RDI,qword ptr [RBX]
MOV RSI,RDI
ADD RSI,qword ptr [RBX + 0x8]
LEA RCX,[RBP + -0x2a0]
LEA RDX,[RBP + -0x280]
SUB RSP,0x8
PUSH 0x0
MOV R9D,0x0
MOV R8D,0x0
LAB_0010499f:
CALL 0x0010dea3
ADD RSP,0x10
TEST AL,AL
JZ 0x001053f6
MOV RDX,qword ptr [RBP + -0x278]
MOV RAX,qword ptr [RBP + -0x280]
CMP RDX,RAX
JZ 0x001049cf
MOV RCX,RDX
SUB RCX,RAX
CMP RCX,0x48
JNZ 0x001049d3
LAB_001049cf:
LEA RAX,[RDX + -0x48]
LAB_001049d3:
CMP byte ptr [RAX + 0x10],0x0
JNZ 0x00104b2a
LEA RAX,[RBP + -0x1b0]
MOV qword ptr [RBP + -0x1c0],RAX
MOV qword ptr [RBP + -0x1b8],0x0
MOV byte ptr [RBP + -0x1b0],0x0
LAB_001049fd:
MOV RCX,qword ptr [RBP + -0x278]
MOV RDX,qword ptr [RBP + -0x280]
CMP RCX,RDX
JZ 0x0010545b
MOV RAX,RCX
SUB RAX,RDX
CMP RAX,0x48
JNZ 0x0010544c
MOV RSI,RCX
SUB RSI,RDX
MOV RAX,qword ptr [RCX + -0x48]
SUB RAX,qword ptr [RBP + -0x268]
CMP RSI,0x48
JNZ 0x00104a3f
LAB_00104a3b:
LEA RDX,[RCX + -0x48]
LAB_00104a3f:
MOV ECX,0x0
CMP byte ptr [RDX + 0x10],0x0
JNZ 0x00104bd4
LAB_00104a4e:
ADD RAX,RCX
MOV R13,RAX
SHR R13,0x3f
MOV R12,RAX
NEG R12
CMOVS R12,RAX
CMP R12,0x9
JBE 0x00104c21
CMP R12,0x63
JBE 0x00104be0
CMP R12,0x3e7
JBE 0x00104c0d
CMP R12,0x270f
JBE 0x00104c17
MOV RDX,R12
MOV EBX,0x1
MOV RSI,0x346dc5d63886594b
LAB_00104aa2:
MOV RCX,RDX
MOV RAX,RDX
MUL RSI
SHR RDX,0xb
ADD EBX,0x4
CMP RCX,0x1869f
JBE 0x00104be8
CMP RCX,0xf423f
JBE 0x00104be5
CMP RCX,0x98967f
JBE 0x00104c12
CMP RCX,0x5f5e0ff
JA 0x00104aa2
LAB_00104ae2:
ADD EBX,0x3
JMP 0x00104be8
LAB_00104b2a:
MOV R12,qword ptr [RAX]
MOV RBX,qword ptr [RAX + 0x8]
LEA RAX,[RBP + -0x1b0]
MOV qword ptr [RBP + -0x1c0],RAX
MOV qword ptr [RBP + -0x1b8],0x0
SUB RBX,R12
MOV qword ptr [RBP + -0x2a8],RBX
CMP RBX,0xf
JA 0x00104b89
CMP RBX,0x1
JNZ 0x00104bc6
MOVZX EAX,byte ptr [R12]
MOV byte ptr [RBP + -0x1b0],AL
LAB_00104b6b:
MOV RAX,qword ptr [RBP + -0x2a8]
MOV qword ptr [RBP + -0x1b8],RAX
MOV RDX,qword ptr [RBP + -0x1c0]
MOV byte ptr [RDX + RAX*0x1],0x0
JMP 0x001049fd
LAB_00104b89:
LEA RSI,[RBP + -0x2a8]
LEA RDI,[RBP + -0x1c0]
MOV EDX,0x0
LAB_00104b9c:
CALL 0x001046e0
MOV RDI,RAX
MOV qword ptr [RBP + -0x1c0],RAX
MOV RAX,qword ptr [RBP + -0x2a8]
MOV qword ptr [RBP + -0x1b0],RAX
LAB_00104bb9:
MOV RDX,RBX
MOV RSI,R12
CALL 0x00104560
JMP 0x00104b6b
LAB_00104bc6:
TEST RBX,RBX
JZ 0x00104b6b
LEA RDI,[RBP + -0x1b0]
JMP 0x00104bb9
LAB_00104bd4:
MOV RCX,qword ptr [RDX + 0x8]
SUB RCX,qword ptr [RDX]
JMP 0x00104a4e
LAB_00104be0:
MOV EBX,0x1
LAB_00104be5:
ADD EBX,0x1
LAB_00104be8:
LEA RDI,[RBP + -0x220]
LEA RAX,[RBP + -0x210]
MOV qword ptr [RBP + -0x220],RAX
LEA ESI,[RBX + R13*0x1]
MOV EDX,0x2d
LAB_00104c06:
CALL 0x001045f0
JMP 0x00104c28
LAB_00104c0d:
MOV EBX,0x1
LAB_00104c12:
ADD EBX,0x2
JMP 0x00104be8
LAB_00104c17:
MOV EBX,0x1
JMP 0x00104ae2
LAB_00104c21:
MOV EBX,0x1
JMP 0x00104be8
LAB_00104c28:
MOV RDI,R13
ADD RDI,qword ptr [RBP + -0x220]
MOV RDX,R12
MOV ESI,EBX
CALL 0x001063a9
MOV RDX,qword ptr [RBP + -0x278]
MOV RAX,qword ptr [RBP + -0x280]
CMP RDX,RAX
JZ 0x00104c5b
MOV RCX,RDX
SUB RCX,RAX
CMP RCX,0x48
JNZ 0x00104c5f
LAB_00104c5b:
LEA RAX,[RDX + -0x48]
LAB_00104c5f:
MOV RAX,qword ptr [RAX]
SUB RAX,qword ptr [RBP + -0x268]
MOV R13,RAX
SHR R13,0x3f
MOV R12,RAX
NEG R12
CMOVS R12,RAX
CMP R12,0x9
JBE 0x00104d2d
CMP R12,0x63
JBE 0x00104cef
CMP R12,0x3e7
JBE 0x00104d1c
CMP R12,0x270f
JBE 0x00104d26
MOV RDX,R12
MOV EBX,0x1
MOV RSI,0x346dc5d63886594b
LAB_00104cb6:
MOV RCX,RDX
MOV RAX,RDX
MUL RSI
SHR RDX,0xb
ADD EBX,0x4
CMP RCX,0x1869f
JBE 0x00104cf7
CMP RCX,0xf423f
JBE 0x00104cf4
CMP RCX,0x98967f
JBE 0x00104d21
CMP RCX,0x5f5e0ff
JA 0x00104cb6
LAB_00104cea:
ADD EBX,0x3
JMP 0x00104cf7
LAB_00104cef:
MOV EBX,0x1
LAB_00104cf4:
ADD EBX,0x1
LAB_00104cf7:
LEA RDI,[RBP + -0x260]
LEA RAX,[RBP + -0x250]
MOV qword ptr [RBP + -0x260],RAX
LEA ESI,[RBX + R13*0x1]
MOV EDX,0x2d
LAB_00104d15:
CALL 0x001045f0
JMP 0x00104d34
LAB_00104d1c:
MOV EBX,0x1
LAB_00104d21:
ADD EBX,0x2
JMP 0x00104cf7
LAB_00104d26:
MOV EBX,0x1
JMP 0x00104cea
LAB_00104d2d:
MOV EBX,0x1
JMP 0x00104cf7
LAB_00104d34:
MOV RDI,R13
ADD RDI,qword ptr [RBP + -0x260]
MOV RDX,R12
MOV ESI,EBX
CALL 0x001063a9
LEA RDI,[RBP + -0x260]
MOV R8D,0x2d
MOV ECX,0x1
MOV EDX,0x0
MOV RSI,qword ptr [RBP + -0x258]
LAB_00104d66:
CALL 0x00104710
LEA RDX,[RBP + -0x230]
MOV qword ptr [RBP + -0x240],RDX
MOV RCX,qword ptr [RAX]
LEA RDX,[RAX + 0x10]
CMP RCX,RDX
JZ 0x00104e35
MOV qword ptr [RBP + -0x240],RCX
MOV RCX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x230],RCX
LAB_00104d9b:
MOV R8,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x238],R8
MOV qword ptr [RAX],RDX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
MOV RDX,qword ptr [RBP + -0x218]
LEA RAX,[R8 + RDX*0x1]
MOV RCX,qword ptr [RBP + -0x240]
LEA RSI,[RBP + -0x230]
CMP RCX,RSI
JZ 0x00104eb8
MOV RSI,qword ptr [RBP + -0x230]
LAB_00104dde:
CMP RSI,RAX
JNC 0x00104e07
LEA RSI,[RBP + -0x210]
CMP qword ptr [RBP + -0x220],RSI
JZ 0x00104ec2
MOV RSI,qword ptr [RBP + -0x210]
LAB_00104dfe:
CMP RSI,RAX
JNC 0x00104ecc
LAB_00104e07:
MOV RSI,qword ptr [RBP + -0x220]
MOV RAX,0x3fffffffffffffff
SUB RAX,R8
CMP RAX,RDX
JC 0x00104ef3
LEA RDI,[RBP + -0x240]
LAB_00104e2b:
CALL 0x001043f0
JMP 0x00104f1f
LAB_00104e35:
LEA R8,[RBP + -0x230]
MOV RBX,qword ptr [RAX + 0x8]
LEA RSI,[RBX + 0x1]
MOV R9,R8
MOV RCX,RDX
CMP ESI,0x8
JNC 0x00104e8f
LAB_00104e4f:
MOV EDI,0x0
TEST SIL,0x4
JZ 0x00104e64
MOV EDI,dword ptr [RCX]
MOV dword ptr [R9],EDI
MOV EDI,0x4
LAB_00104e64:
TEST SIL,0x2
JZ 0x00104e78
MOVZX R8D,word ptr [RCX + RDI*0x1]
MOV word ptr [R9 + RDI*0x1],R8W
ADD RDI,0x2
LAB_00104e78:
TEST SIL,0x1
JZ 0x00104d9b
MOVZX ECX,byte ptr [RCX + RDI*0x1]
MOV byte ptr [R9 + RDI*0x1],CL
JMP 0x00104d9b
LAB_00104e8f:
MOV R10D,ESI
AND R10D,0xfffffff8
MOV ECX,0x0
LAB_00104e9b:
MOV EDI,ECX
MOV R9,qword ptr [RDX + RDI*0x1]
MOV qword ptr [R8 + RDI*0x1],R9
ADD ECX,0x8
CMP ECX,R10D
JC 0x00104e9b
MOV ECX,ECX
LEA R9,[R8 + RCX*0x1]
ADD RCX,RDX
JMP 0x00104e4f
LAB_00104eb8:
MOV ESI,0xf
JMP 0x00104dde
LAB_00104ec2:
MOV ESI,0xf
JMP 0x00104dfe
LAB_00104ecc:
LEA RDI,[RBP + -0x220]
MOV EDX,0x0
MOV ESI,0x0
CALL 0x00104690
MOV RSI,RAX
LEA RDI,[RBP + -0x200]
CALL 0x001044d0
JMP 0x00104f65
LAB_00104ef3:
MOV RAX,qword ptr [RBP + -0x28]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x00104f1a
LEA RDI,[0x119705]
CALL 0x001044b0
LAB_00104f0e:
ENDBR64
MOV RBX,RAX
JMP 0x00105211
LAB_00104f1a:
CALL 0x001045c0
LAB_00104f1f:
LEA RDX,[RBP + -0x1f0]
MOV qword ptr [RBP + -0x200],RDX
MOV RCX,qword ptr [RAX]
LEA RDX,[RAX + 0x10]
CMP RCX,RDX
JZ 0x00104f9d
MOV qword ptr [RBP + -0x200],RCX
MOV RCX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x1f0],RCX
LAB_00104f4b:
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x1f8],RCX
MOV qword ptr [RAX],RDX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
LAB_00104f65:
MOV RAX,0x3fffffffffffffff
SUB RAX,qword ptr [RBP + -0x1f8]
CMP RAX,0x1
JBE 0x00105020
LEA RDI,[RBP + -0x200]
MOV EDX,0x2
LEA RSI,[0x11971a]
LAB_00104f93:
CALL 0x001043f0
JMP 0x0010504c
LAB_00104f9d:
LEA R8,[RBP + -0x1f0]
MOV RBX,qword ptr [RAX + 0x8]
LEA RSI,[RBX + 0x1]
MOV R9,R8
MOV RCX,RDX
CMP ESI,0x8
JNC 0x00104ff7
LAB_00104fb7:
MOV EDI,0x0
TEST SIL,0x4
JZ 0x00104fcc
MOV EDI,dword ptr [RCX]
MOV dword ptr [R9],EDI
MOV EDI,0x4
LAB_00104fcc:
TEST SIL,0x2
JZ 0x00104fe0
MOVZX R8D,word ptr [RCX + RDI*0x1]
MOV word ptr [R9 + RDI*0x1],R8W
ADD RDI,0x2
LAB_00104fe0:
TEST SIL,0x1
JZ 0x00104f4b
MOVZX ECX,byte ptr [RCX + RDI*0x1]
MOV byte ptr [R9 + RDI*0x1],CL
JMP 0x00104f4b
LAB_00104ff7:
MOV R10D,ESI
AND R10D,0xfffffff8
MOV ECX,0x0
LAB_00105003:
MOV EDI,ECX
MOV R9,qword ptr [RDX + RDI*0x1]
MOV qword ptr [R8 + RDI*0x1],R9
ADD ECX,0x8
CMP ECX,R10D
JC 0x00105003
MOV ECX,ECX
LEA R9,[R8 + RCX*0x1]
ADD RCX,RDX
JMP 0x00104fb7
LAB_00105020:
MOV RAX,qword ptr [RBP + -0x28]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x00105047
LEA RDI,[0x119705]
CALL 0x001044b0
LAB_0010503b:
ENDBR64
MOV RBX,RAX
JMP 0x00105205
LAB_00105047:
CALL 0x001045c0
LAB_0010504c:
LEA RDX,[RBP + -0x1d0]
MOV qword ptr [RBP + -0x1e0],RDX
MOV RCX,qword ptr [RAX]
LEA RDX,[RAX + 0x10]
CMP RCX,RDX
JZ 0x00105116
MOV qword ptr [RBP + -0x1e0],RCX
MOV RCX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x1d0],RCX
LAB_0010507c:
MOV R8,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x1d8],R8
MOV qword ptr [RAX],RDX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
MOV RDX,qword ptr [RBP + -0x1b8]
LEA RAX,[R8 + RDX*0x1]
MOV RCX,qword ptr [RBP + -0x1e0]
LEA RSI,[RBP + -0x1d0]
CMP RCX,RSI
JZ 0x00105199
MOV RSI,qword ptr [RBP + -0x1d0]
LAB_001050bf:
CMP RSI,RAX
JNC 0x001050e8
LEA RSI,[RBP + -0x1b0]
CMP qword ptr [RBP + -0x1c0],RSI
JZ 0x001051a3
MOV RSI,qword ptr [RBP + -0x1b0]
LAB_001050df:
CMP RSI,RAX
JNC 0x001051ad
LAB_001050e8:
MOV RSI,qword ptr [RBP + -0x1c0]
MOV RAX,0x3fffffffffffffff
SUB RAX,R8
CMP RAX,RDX
JC 0x001051d3
LEA RDI,[RBP + -0x1e0]
LAB_0010510c:
CALL 0x001043f0
JMP 0x00105276
LAB_00105116:
LEA R8,[RBP + -0x1d0]
MOV RBX,qword ptr [RAX + 0x8]
LEA RSI,[RBX + 0x1]
MOV R9,R8
MOV RCX,RDX
CMP ESI,0x8
JNC 0x00105170
LAB_00105130:
MOV EDI,0x0
TEST SIL,0x4
JZ 0x00105145
MOV EDI,dword ptr [RCX]
MOV dword ptr [R9],EDI
MOV EDI,0x4
LAB_00105145:
TEST SIL,0x2
JZ 0x00105159
MOVZX R8D,word ptr [RCX + RDI*0x1]
MOV word ptr [R9 + RDI*0x1],R8W
ADD RDI,0x2
LAB_00105159:
TEST SIL,0x1
JZ 0x0010507c
MOVZX ECX,byte ptr [RCX + RDI*0x1]
MOV byte ptr [R9 + RDI*0x1],CL
JMP 0x0010507c
LAB_00105170:
MOV R10D,ESI
AND R10D,0xfffffff8
MOV ECX,0x0
LAB_0010517c:
MOV EDI,ECX
MOV R9,qword ptr [RDX + RDI*0x1]
MOV qword ptr [R8 + RDI*0x1],R9
ADD ECX,0x8
CMP ECX,R10D
JC 0x0010517c
MOV ECX,ECX
LEA R9,[R8 + RCX*0x1]
ADD RCX,RDX
JMP 0x00105130
LAB_00105199:
MOV ESI,0xf
JMP 0x001050bf
LAB_001051a3:
MOV ESI,0xf
JMP 0x001050df
LAB_001051ad:
LEA RDI,[RBP + -0x1c0]
MOV EDX,0x0
MOV ESI,0x0
CALL 0x00104690
MOV RSI,RAX
MOV RDI,R14
CALL 0x001044d0
JMP 0x001052b2
LAB_001051d3:
MOV RAX,qword ptr [RBP + -0x28]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x00105271
LEA RDI,[0x119705]
CALL 0x001044b0
LAB_001051f2:
ENDBR64
MOV RBX,RAX
LEA RDI,[RBP + -0x1e0]
CALL 0x00104610
LAB_00105205:
LEA RDI,[RBP + -0x200]
CALL 0x00104610
LAB_00105211:
LEA RDI,[RBP + -0x240]
CALL 0x00104610
LAB_0010521d:
LEA RDI,[RBP + -0x260]
CALL 0x00104610
LAB_00105229:
LEA RDI,[RBP + -0x220]
CALL 0x00104610
LAB_00105235:
LEA RDI,[RBP + -0x1c0]
CALL 0x00104610
LAB_00105241:
LEA RDI,[RBP + -0x280]
CALL 0x0010674a
LEA RDI,[RBP + -0x2a0]
CALL 0x001066bc
MOV RAX,qword ptr [RBP + -0x28]
SUB RAX,qword ptr FS:[0x28]
JZ 0x00105444
CALL 0x001045c0
LAB_00105271:
CALL 0x001045c0
LAB_00105276:
MOV RDX,RAX
LEA RCX,[R14 + 0x10]
MOV qword ptr [R14],RCX
MOV RAX,qword ptr [RAX]
LEA RSI,[RDX + 0x10]
CMP RAX,RSI
JZ 0x00105355
MOV qword ptr [R14],RAX
MOV RAX,qword ptr [RDX + 0x10]
MOV qword ptr [R14 + 0x10],RAX
LAB_0010529b:
MOV RAX,qword ptr [RDX + 0x8]
MOV qword ptr [R14 + 0x8],RAX
MOV qword ptr [RDX],RSI
MOV qword ptr [RDX + 0x8],0x0
MOV byte ptr [RDX + 0x10],0x0
LAB_001052b2:
LEA RDI,[RBP + -0x1e0]
CALL 0x00104610
LEA RDI,[RBP + -0x200]
CALL 0x00104610
LEA RDI,[RBP + -0x240]
CALL 0x00104610
LEA RDI,[RBP + -0x260]
CALL 0x00104610
LEA RDI,[RBP + -0x220]
CALL 0x00104610
LEA RDI,[RBP + -0x1c0]
CALL 0x00104610
LAB_001052fa:
MOV RDI,qword ptr [RBP + -0x280]
TEST RDI,RDI
JZ 0x00105315
MOV RSI,qword ptr [RBP + -0x270]
SUB RSI,RDI
CALL 0x00104580
LAB_00105315:
MOV RDI,qword ptr [RBP + -0x288]
TEST RDI,RDI
JZ 0x00105326
CALL 0x00106650
LAB_00105326:
LEA RDI,[RBP + -0x298]
CALL 0x00104670
MOV RAX,qword ptr [RBP + -0x28]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x0010546b
MOV RAX,R14
LEA RSP,[RBP + -0x20]
POP RBX
POP R12
POP R13
POP R14
POP RBP
RET
LAB_00105355:
MOV RAX,qword ptr [RDX + 0x8]
ADD RAX,0x1
CMP EAX,0x8
JNC 0x001053a5
TEST AL,0x4
JNZ 0x0010538f
TEST EAX,EAX
JZ 0x0010529b
MOVZX EDI,byte ptr [RDX + 0x10]
MOV byte ptr [R14 + 0x10],DIL
TEST AL,0x2
JZ 0x0010529b
MOV EAX,EAX
MOVZX EDI,word ptr [RSI + RAX*0x1 + -0x2]
MOV word ptr [RCX + RAX*0x1 + -0x2],DI
JMP 0x0010529b
LAB_0010538f:
MOV EDI,dword ptr [RDX + 0x10]
MOV dword ptr [R14 + 0x10],EDI
MOV EAX,EAX
MOV EDI,dword ptr [RSI + RAX*0x1 + -0x4]
MOV dword ptr [RCX + RAX*0x1 + -0x4],EDI
JMP 0x0010529b
LAB_001053a5:
MOV RDI,qword ptr [RDX + 0x10]
MOV qword ptr [R14 + 0x10],RDI
MOV EDI,EAX
MOV R8,qword ptr [RSI + RDI*0x1 + -0x8]
MOV qword ptr [RCX + RDI*0x1 + -0x8],R8
LEA R8,[RCX + 0x8]
AND R8,-0x8
SUB RCX,R8
MOV R10,RSI
SUB R10,RCX
ADD EAX,ECX
AND EAX,0xfffffff8
CMP EAX,0x8
JC 0x0010529b
AND EAX,0xfffffff8
MOV ECX,0x0
LAB_001053e0:
MOV EDI,ECX
MOV R9,qword ptr [R10 + RDI*0x1]
MOV qword ptr [R8 + RDI*0x1],R9
ADD ECX,0x8
CMP ECX,EAX
JC 0x001053e0
JMP 0x0010529b
LAB_001053f6:
MOV RDI,R14
LEA RAX,[R14 + 0x10]
MOV qword ptr [R14],RAX
LEA RSI,[0x119670]
MOV RDX,RSI
LAB_0010540a:
CALL 0x001067bc
JMP 0x001052fa
LAB_00105444:
MOV RDI,RBX
LAB_00105447:
CALL 0x001046d0
LAB_0010544c:
MOV RAX,qword ptr [RDX]
SUB RAX,qword ptr [RBP + -0x268]
JMP 0x00104a3f
LAB_0010545b:
MOV RAX,qword ptr [RCX + -0x48]
SUB RAX,qword ptr [RBP + -0x268]
JMP 0x00104a3b
LAB_0010546b:
CALL 0x001045c0 | /* func0(std::string const&) */
string * func0(string *param_1)
{
ulong *puVar1;
int *__src;
_Sp_counted_base<(_Lock_policy)2> *this;
_Sp_counted_base<(_Lock_policy)2> *p_Var2;
bool bVar3;
long lVar4;
ulong uVar5;
long *plVar6;
long *plVar7;
string *psVar8;
int8 uVar9;
ulong uVar10;
uint uVar11;
long lVar12;
long *plVar13;
ulong *puVar14;
ulong uVar15;
uint uVar16;
int8 *in_RSI;
long *plVar17;
ulong *puVar18;
long in_FS_OFFSET;
ulong local_2b0;
int4 local_2a8 [2];
locale local_2a0 [2];
int8 local_298;
_Sp_counted_base<(_Lock_policy)2> *local_290;
long *local_288;
long *local_280;
long local_278;
long local_270;
int *local_268;
ulong local_260;
int local_258 [16];
ulong *local_248;
long local_240;
ulong local_238 [2];
ulong *local_228;
ulong local_220;
ulong local_218 [2];
long *local_208;
long local_200;
long local_1f8 [2];
ulong *local_1e8;
long local_1e0;
ulong local_1d8 [2];
ulong *local_1c8;
ulong local_1c0;
ulong local_1b8 [24];
long *local_f8;
long local_e8 [4];
int8 local_c8;
_Sp_counted_base<(_Lock_policy)2> *local_c0;
long *local_b8;
long local_a8 [2];
_Deque_base<std::__detail::_StateSeq<std::regex_traits<char>>,std::allocator<std::__detail::_StateSeq<std::regex_traits<char>>>>
local_98 [104];
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
std::locale::locale(local_2a0);
local_298 = 0;
local_290 = (_Sp_counted_base<(_Lock_policy)2> *)0x0;
/* try { // try from 00104894 to 00104898 has its CatchHandler @ 00104aea */
std::__detail::_Compiler<std::regex_traits<char>>::_Compiler
((_Compiler<std::regex_traits<char>> *)&local_1c8,"\\w+ly","",local_2a0,0x10);
p_Var2 = local_c0;
local_298 = local_c8;
this = local_290;
local_c0 = (_Sp_counted_base<(_Lock_policy)2> *)0x0;
local_c8 = 0;
local_290 = p_Var2;
if (this != (_Sp_counted_base<(_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(_Lock_policy)2>::_M_release(this);
}
local_2a8[0] = 0x10;
std::
_Deque_base<std::__detail::_StateSeq<std::regex_traits<char>>,std::allocator<std::__detail::_StateSeq<std::regex_traits<char>>>>
::~_Deque_base(local_98);
if (local_b8 != local_a8) {
operator_delete(local_b8,local_a8[0] + 1);
}
if (local_c0 != (_Sp_counted_base<(_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(_Lock_policy)2>::_M_release(local_c0);
}
if (local_f8 != local_e8) {
operator_delete(local_f8,local_e8[0] + 1);
}
local_288 = (long *)0x0;
local_280 = (long *)0x0;
local_278 = 0;
local_270 = 0;
/* try { // try from 0010499f to 001049a3 has its CatchHandler @ 00105438 */
bVar3 = std::__detail::
__regex_algo_impl<__normal_iterator<char_const*,std::string>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::string>>>,char,std::regex_traits<char>>
((__normal_iterator)*in_RSI,(__normal_iterator)*in_RSI + (int)in_RSI[1],
(match_results *)&local_288,(regex *)local_2a8,0,0,false);
if (!bVar3) {
*(string **)param_1 = param_1 + 0x10;
/* try { // try from 0010540a to 0010540e has its CatchHandler @ 00105438 */
std::string::_M_construct<char_const*>((char *)param_1,"",0x119670);
goto LAB_001052fa;
}
if ((local_280 == local_288) || (plVar6 = local_288, (long)local_280 - (long)local_288 == 0x48)) {
plVar6 = local_280 + -9;
}
if (*(char *)(plVar6 + 2) == '\0') {
local_1c8 = local_1b8;
local_1c0 = 0;
local_1b8[0] = (ulong)local_1b8[0]._1_7_ << 8;
}
else {
__src = (int *)*plVar6;
local_1c8 = local_1b8;
local_1c0 = 0;
uVar10 = plVar6[1] - (long)__src;
local_2b0 = uVar10;
if (uVar10 < 0x10) {
if (uVar10 == 1) {
local_1b8[0] = CONCAT71(local_1b8[0]._1_7_,*__src);
}
else if (uVar10 != 0) goto LAB_00104bb9;
}
else {
/* try { // try from 00104b9c to 00104ba0 has its CatchHandler @ 00105438 */
local_1c8 = (ulong *)std::string::_M_create((ulong *)&local_1c8,(ulong)&local_2b0);
local_1b8[0] = local_2b0;
LAB_00104bb9:
memcpy(local_1c8,__src,uVar10);
}
local_1c0 = local_2b0;
*(int *)((long)local_1c8 + local_2b0) = 0;
}
if (local_280 == local_288) {
lVar4 = local_280[-9] - local_270;
LAB_00104a3b:
plVar6 = local_280 + -9;
}
else {
plVar6 = local_288;
if ((long)local_280 - (long)local_288 == 0x48) {
lVar4 = local_280[-9] - local_270;
if ((long)local_280 - (long)local_288 == 0x48) goto LAB_00104a3b;
}
else {
lVar4 = *local_288 - local_270;
}
}
lVar12 = 0;
if (*(char *)(plVar6 + 2) != '\0') {
lVar12 = plVar6[1] - *plVar6;
}
uVar5 = lVar4 + lVar12;
uVar10 = -uVar5;
if (0 < (long)uVar5) {
uVar10 = uVar5;
}
if (uVar10 < 10) {
uVar16 = 1;
}
else if (uVar10 < 100) {
uVar16 = 1;
LAB_00104be5:
uVar16 = uVar16 + 1;
}
else if (uVar10 < 1000) {
uVar16 = 1;
LAB_00104c12:
uVar16 = uVar16 + 2;
}
else {
if (uVar10 < 10000) {
uVar16 = 1;
}
else {
uVar16 = 1;
uVar15 = uVar10;
do {
uVar16 = uVar16 + 4;
if (uVar15 < 100000) goto LAB_00104be8;
if (uVar15 < 1000000) goto LAB_00104be5;
if (uVar15 < 10000000) goto LAB_00104c12;
bVar3 = 99999999 < uVar15;
uVar15 = uVar15 / 10000;
} while (bVar3);
}
uVar16 = uVar16 + 3;
}
LAB_00104be8:
local_228 = local_218;
/* try { // try from 00104c06 to 00104c0a has its CatchHandler @ 0010542c */
std::string::_M_construct((ulong)&local_228,(char)uVar16 - (char)((long)uVar5 >> 0x3f));
std::__detail::__to_chars_10_impl<unsigned_long>
((char *)((long)local_228 - ((long)uVar5 >> 0x3f)),uVar16,uVar10);
if ((local_280 == local_288) || (plVar6 = local_288, (long)local_280 - (long)local_288 == 0x48)) {
plVar6 = local_280 + -9;
}
uVar5 = *plVar6 - local_270;
uVar10 = -uVar5;
if (0 < (long)uVar5) {
uVar10 = uVar5;
}
if (uVar10 < 10) {
uVar16 = 1;
}
else if (uVar10 < 100) {
uVar16 = 1;
LAB_00104cf4:
uVar16 = uVar16 + 1;
}
else if (uVar10 < 1000) {
uVar16 = 1;
LAB_00104d21:
uVar16 = uVar16 + 2;
}
else {
if (uVar10 < 10000) {
uVar16 = 1;
}
else {
uVar16 = 1;
uVar15 = uVar10;
do {
uVar16 = uVar16 + 4;
if (uVar15 < 100000) goto LAB_00104cf7;
if (uVar15 < 1000000) goto LAB_00104cf4;
if (uVar15 < 10000000) goto LAB_00104d21;
bVar3 = 99999999 < uVar15;
uVar15 = uVar15 / 10000;
} while (bVar3);
}
uVar16 = uVar16 + 3;
}
LAB_00104cf7:
local_268 = local_258;
/* try { // try from 00104d15 to 00104d19 has its CatchHandler @ 00105420 */
std::string::_M_construct((ulong)&local_268,(char)uVar16 - (char)((long)uVar5 >> 0x3f));
std::__detail::__to_chars_10_impl<unsigned_long>(local_268 + -((long)uVar5 >> 0x3f),uVar16,uVar10)
;
/* try { // try from 00104d66 to 00104d6a has its CatchHandler @ 00105414 */
plVar6 = (long *)std::string::_M_replace_aux((ulong)&local_268,local_260,0,'\x01');
local_248 = local_238;
puVar1 = (ulong *)(plVar6 + 2);
if ((ulong *)*plVar6 == puVar1) {
puVar18 = local_238;
uVar10 = plVar6[1] + 1;
puVar14 = puVar1;
if (7 < (uint)uVar10) {
uVar16 = 0;
do {
*(int8 *)((long)puVar18 + (ulong)uVar16) =
*(int8 *)((long)puVar1 + (ulong)uVar16);
uVar16 = uVar16 + 8;
} while (uVar16 < ((uint)uVar10 & 0xfffffff8));
puVar18 = (ulong *)((long)puVar18 + (ulong)uVar16);
puVar14 = (ulong *)((ulong)uVar16 + (long)puVar1);
}
lVar4 = 0;
if ((uVar10 & 4) != 0) {
*(int4 *)puVar18 = *(int4 *)puVar14;
lVar4 = 4;
}
if ((uVar10 & 2) != 0) {
*(int2 *)((long)puVar18 + lVar4) = *(int2 *)((long)puVar14 + lVar4);
lVar4 = lVar4 + 2;
}
if ((uVar10 & 1) != 0) {
*(int *)((long)puVar18 + lVar4) = *(int *)((long)puVar14 + lVar4);
}
}
else {
local_238[0] = plVar6[2];
local_248 = (ulong *)*plVar6;
}
local_240 = plVar6[1];
*plVar6 = (long)puVar1;
plVar6[1] = 0;
*(int *)(plVar6 + 2) = 0;
uVar10 = local_238[0];
if (local_248 == local_238) {
uVar10 = 0xf;
}
if (uVar10 < local_240 + local_220) {
if (local_228 == local_218) {
local_218[0] = 0xf;
}
if (local_218[0] < local_240 + local_220) goto LAB_00104e07;
psVar8 = (string *)std::string::_M_replace((ulong)&local_228,0,(char *)0x0,(ulong)local_248);
std::string::string((string *)&local_208,psVar8);
}
else {
LAB_00104e07:
if (0x3fffffffffffffffU - local_240 < local_220) {
if (local_30 != *(long *)(in_FS_OFFSET + 0x28)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
uVar9 = std::__throw_length_error("basic_string::append");
/* catch() { ... } // from try @ 00104e2b with catch @ 00104f0e */
goto LAB_00105211;
}
/* try { // try from 00104e2b to 00104f0d has its CatchHandler @ 00104f0e */
plVar7 = (long *)std::string::_M_append((char *)&local_248,(ulong)local_228);
local_208 = local_1f8;
plVar6 = plVar7 + 2;
if ((long *)*plVar7 == plVar6) {
plVar17 = local_1f8;
uVar10 = plVar7[1] + 1;
plVar13 = plVar6;
if (7 < (uint)uVar10) {
uVar16 = 0;
do {
*(int8 *)((long)plVar17 + (ulong)uVar16) =
*(int8 *)((long)plVar6 + (ulong)uVar16);
uVar16 = uVar16 + 8;
} while (uVar16 < ((uint)uVar10 & 0xfffffff8));
plVar17 = (long *)((long)plVar17 + (ulong)uVar16);
plVar13 = (long *)((ulong)uVar16 + (long)plVar6);
}
lVar4 = 0;
if ((uVar10 & 4) != 0) {
*(int4 *)plVar17 = *(int4 *)plVar13;
lVar4 = 4;
}
if ((uVar10 & 2) != 0) {
*(int2 *)((long)plVar17 + lVar4) = *(int2 *)((long)plVar13 + lVar4);
lVar4 = lVar4 + 2;
}
if ((uVar10 & 1) != 0) {
*(int *)((long)plVar17 + lVar4) = *(int *)((long)plVar13 + lVar4);
}
}
else {
local_1f8[0] = plVar7[2];
local_208 = (long *)*plVar7;
}
local_200 = plVar7[1];
*plVar7 = (long)plVar6;
plVar7[1] = 0;
*(int *)(plVar7 + 2) = 0;
}
if (0x3fffffffffffffffU - local_200 < 2) {
if (local_30 != *(long *)(in_FS_OFFSET + 0x28)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
uVar9 = std::__throw_length_error("basic_string::append");
/* catch() { ... } // from try @ 00104f93 with catch @ 0010503b */
LAB_00105205:
std::string::_M_dispose();
LAB_00105211:
std::string::_M_dispose();
std::string::_M_dispose();
std::string::_M_dispose();
std::string::_M_dispose();
std::
vector<std::sub_match<__normal_iterator<char_const*,std::string>>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::string>>>>
::~vector((vector<std::sub_match<__normal_iterator<char_const*,std::string>>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::string>>>>
*)&local_288);
std::regex::~basic_regex((regex *)local_2a8);
if (local_30 == *(long *)(in_FS_OFFSET + 0x28)) {
/* WARNING: Subroutine does not return */
_Unwind_Resume(uVar9);
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
/* try { // try from 00104f93 to 0010503a has its CatchHandler @ 0010503b */
plVar6 = (long *)std::string::_M_append((char *)&local_208,0x11971a);
local_1e8 = local_1d8;
puVar1 = (ulong *)(plVar6 + 2);
if ((ulong *)*plVar6 == puVar1) {
puVar18 = local_1d8;
uVar10 = plVar6[1] + 1;
puVar14 = puVar1;
if (7 < (uint)uVar10) {
uVar16 = 0;
do {
*(int8 *)((long)puVar18 + (ulong)uVar16) =
*(int8 *)((long)puVar1 + (ulong)uVar16);
uVar16 = uVar16 + 8;
} while (uVar16 < ((uint)uVar10 & 0xfffffff8));
puVar18 = (ulong *)((long)puVar18 + (ulong)uVar16);
puVar14 = (ulong *)((ulong)uVar16 + (long)puVar1);
}
lVar4 = 0;
if ((uVar10 & 4) != 0) {
*(int4 *)puVar18 = *(int4 *)puVar14;
lVar4 = 4;
}
if ((uVar10 & 2) != 0) {
*(int2 *)((long)puVar18 + lVar4) = *(int2 *)((long)puVar14 + lVar4);
lVar4 = lVar4 + 2;
}
if ((uVar10 & 1) != 0) {
*(int *)((long)puVar18 + lVar4) = *(int *)((long)puVar14 + lVar4);
}
}
else {
local_1d8[0] = plVar6[2];
local_1e8 = (ulong *)*plVar6;
}
local_1e0 = plVar6[1];
*plVar6 = (long)puVar1;
plVar6[1] = 0;
*(int *)(plVar6 + 2) = 0;
uVar10 = local_1d8[0];
if (local_1e8 == local_1d8) {
uVar10 = 0xf;
}
if (uVar10 < local_1e0 + local_1c0) {
uVar10 = local_1b8[0];
if (local_1c8 == local_1b8) {
uVar10 = 0xf;
}
if (uVar10 < local_1e0 + local_1c0) goto LAB_001050e8;
psVar8 = (string *)std::string::_M_replace((ulong)&local_1c8,0,(char *)0x0,(ulong)local_1e8);
std::string::string(param_1,psVar8);
}
else {
LAB_001050e8:
if (0x3fffffffffffffffU - local_1e0 < local_1c0) {
if (local_30 != *(long *)(in_FS_OFFSET + 0x28)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
uVar9 = std::__throw_length_error("basic_string::append");
/* catch() { ... } // from try @ 0010510c with catch @ 001051f2 */
std::string::_M_dispose();
goto LAB_00105205;
}
/* try { // try from 0010510c to 001051f1 has its CatchHandler @ 001051f2 */
plVar7 = (long *)std::string::_M_append((char *)&local_1e8,(ulong)local_1c8);
*(string **)param_1 = param_1 + 0x10;
plVar6 = plVar7 + 2;
if ((long *)*plVar7 == plVar6) {
uVar10 = plVar7[1] + 1;
uVar16 = (uint)uVar10;
if (uVar16 < 8) {
if ((uVar10 & 4) == 0) {
if ((uVar16 != 0) && (param_1[0x10] = *(string *)(plVar7 + 2), (uVar10 & 2) != 0)) {
*(int2 *)(param_1 + (uVar10 & 0xffffffff) + 0xe) =
*(int2 *)((long)plVar7 + (uVar10 & 0xffffffff) + 0xe);
}
}
else {
*(int4 *)(param_1 + 0x10) = *(int4 *)(plVar7 + 2);
*(int4 *)(param_1 + (uVar10 & 0xffffffff) + 0xc) =
*(int4 *)((long)plVar7 + (uVar10 & 0xffffffff) + 0xc);
}
}
else {
*(long *)(param_1 + 0x10) = plVar7[2];
*(int8 *)(param_1 + (uVar10 & 0xffffffff) + 8) =
*(int8 *)((long)plVar7 + (uVar10 & 0xffffffff) + 8);
lVar4 = (long)(param_1 + 0x10) - ((ulong)(param_1 + 0x18) & 0xfffffffffffffff8);
uVar16 = uVar16 + (int)lVar4 & 0xfffffff8;
if (7 < uVar16) {
uVar11 = 0;
do {
*(int8 *)(((ulong)(param_1 + 0x18) & 0xfffffffffffffff8) + (ulong)uVar11) =
*(int8 *)((long)plVar6 + ((ulong)uVar11 - lVar4));
uVar11 = uVar11 + 8;
} while (uVar11 < uVar16);
}
}
}
else {
*(long *)param_1 = *plVar7;
*(long *)(param_1 + 0x10) = plVar7[2];
}
*(long *)(param_1 + 8) = plVar7[1];
*plVar7 = (long)plVar6;
plVar7[1] = 0;
*(int *)(plVar7 + 2) = 0;
}
std::string::_M_dispose();
std::string::_M_dispose();
std::string::_M_dispose();
std::string::_M_dispose();
std::string::_M_dispose();
std::string::_M_dispose();
LAB_001052fa:
if (local_288 != (long *)0x0) {
operator_delete(local_288,local_278 - (long)local_288);
}
if (local_290 != (_Sp_counted_base<(_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(_Lock_policy)2>::_M_release(local_290);
}
std::locale::~locale(local_2a0);
if (local_30 != *(long *)(in_FS_OFFSET + 0x28)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return param_1;
} |
2,334 | func0 | #include <iostream>
#include <regex>
#include <assert.h>
| std::string func0(const std::string &text) {
std::regex word_regex("\\w+ly");
std::smatch match;
if (std::regex_search(text, match, word_regex)) {
return std::to_string(match.position(0)) + '-' + std::to_string(match.position(0) + match.length(0)) + ": " + match.str(0);
}
return "";
}
| int main() {
assert(func0("Clearly, he has no excuse for such behavior.") == "0-7: Clearly");
assert(func0("Please handle the situation carefuly") == "28-36: carefuly");
assert(func0("Complete the task quickly") == "18-25: quickly");
return 0;
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
mov %rsi,%rbx
sub $0x2b8,%rsp
mov %fs:0x28,%rax
mov %rax,0x2a8(%rsp)
xor %eax,%eax
lea 0x50(%rsp),%r14
lea 0x38(%rsp),%rbp
mov %r14,%rdi
lea 0x110(%rsp),%r13
callq 4790 <_ZNSt6localeC1Ev@plt>
mov %r14,%rsi
mov %rbp,%rdi
movl $0x10,0x30(%rsp)
callq 4520 <_ZNSt6localeC1ERKS_@plt>
mov 0x30(%rsp),%r8d
mov %rbp,%rcx
mov %r13,%rdi
lea 0x16a37(%rip),%rdx
lea -0x5(%rdx),%rsi
callq 19790 <_ZNSt8__detail9_CompilerINSt7__cxx1112regex_traitsIcEEEC1EPKcS6_RKSt6localeNSt15regex_constants18syntax_option_typeE>
mov 0x210(%rsp),%rax
lea 0x240(%rsp),%rdi
movq $0x0,0x210(%rsp)
mov %rax,0x40(%rsp)
mov 0x218(%rsp),%rax
movq $0x0,0x218(%rsp)
mov %rax,0x48(%rsp)
callq 6670 <_ZNSt11_Deque_baseINSt8__detail9_StateSeqINSt7__cxx1112regex_traitsIcEEEESaIS5_EED1Ev>
mov 0x220(%rsp),%rdi
lea 0x230(%rsp),%rax
cmp %rax,%rdi
je 4cdf <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0xcf>
callq 45c0 <_ZdlPv@plt>
mov 0x218(%rsp),%r15
test %r15,%r15
je 4d10 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x100>
mov 0x1d2d5(%rip),%rax
test %rax,%rax
je 51a8 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x598>
mov $0xffffffff,%edx
lock xadd %edx,0x8(%r15)
cmp $0x1,%edx
je 51bc <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x5ac>
mov 0x1e0(%rsp),%rdi
lea 0x1f0(%rsp),%rax
cmp %rax,%rdi
je 4d2a <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x11a>
callq 45c0 <_ZdlPv@plt>
mov %r14,%rdi
callq 46b0 <_ZNSt6localeD1Ev@plt>
mov (%rbx),%rdi
mov 0x8(%rbx),%rsi
xor %r8d,%r8d
lea 0x30(%rsp),%rax
mov %r14,%rdx
movq $0x0,0x50(%rsp)
add %rdi,%rsi
mov %rax,%rcx
movq $0x0,0x58(%rsp)
movq $0x0,0x60(%rsp)
movq $0x0,0x68(%rsp)
mov %rax,0x18(%rsp)
callq abe0 <_ZNSt8__detail17__regex_algo_implIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS5_9sub_matchISB_EEEcNS5_12regex_traitsIcEELNS_20_RegexExecutorPolicyE0ELb0EEEbT_SI_RNS5_13match_resultsISI_T0_EERKNS5_11basic_regexIT1_T2_EENSt15regex_constants15match_flag_typeE>
test %al,%al
je 52a0 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x690>
mov 0x58(%rsp),%rdx
mov 0x50(%rsp),%rax
mov %rdx,%rcx
sub %rax,%rcx
cmp %rax,%rdx
je 5210 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x600>
mov %rax,%rsi
cmp $0x48,%rcx
je 5210 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x600>
cmpb $0x0,0x10(%rsi)
jne 521f <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x60f>
lea 0x120(%rsp),%rbx
movb $0x0,0x120(%rsp)
mov 0x68(%rsp),%rsi
mov %rbx,0x8(%rsp)
mov %rbx,0x110(%rsp)
movq $0x0,0x118(%rsp)
cmp %rdx,%rax
je 5292 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x682>
mov (%rax),%r8
sub %rsi,%r8
cmpb $0x0,0x10(%rax)
je 4dfd <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x1ed>
mov 0x8(%rax),%rdx
sub (%rax),%rdx
add %rdx,%r8
mov 0x1d1bc(%rip),%r15
lea 0xb0(%rsp),%rbx
lea 0x168a2(%rip),%rcx
xor %eax,%eax
mov $0x20,%edx
mov %rbx,%rdi
mov %r15,%rsi
callq 6530 <_ZN9__gnu_cxx12__to_xstringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcEET_PFiPT0_mPKS8_P13__va_list_tagEmSB_z>
mov 0x58(%rsp),%rdx
mov 0x50(%rsp),%rax
mov %rdx,%rcx
sub %rax,%rcx
cmp %rax,%rdx
je 5200 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x5f0>
cmp $0x48,%rcx
je 5200 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x5f0>
lea 0x70(%rsp),%r14
mov (%rax),%r8
mov $0x20,%edx
mov %r15,%rsi
sub 0x68(%rsp),%r8
lea 0x16851(%rip),%rcx
mov %r14,%rdi
xor %eax,%eax
callq 6530 <_ZN9__gnu_cxx12__to_xstringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcEET_PFiPT0_mPKS8_P13__va_list_tagEmSB_z>
mov 0x78(%rsp),%rsi
mov $0x2d,%r8d
xor %edx,%edx
mov %r14,%rdi
mov $0x1,%ecx
callq 4760 <_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE14_M_replace_auxEmmmc@plt>
lea 0xa0(%rsp),%r14
lea 0x10(%rax),%rdx
mov %r14,0x90(%rsp)
mov (%rax),%rcx
cmp %rdx,%rcx
je 5330 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x720>
mov %rcx,0x90(%rsp)
mov 0x10(%rax),%rcx
mov %rcx,0xa0(%rsp)
mov 0x8(%rax),%rcx
movb $0x0,0x10(%rax)
mov %rcx,0x98(%rsp)
mov %rdx,(%rax)
mov 0x90(%rsp),%r9
movq $0x0,0x8(%rax)
mov $0xf,%eax
mov 0x98(%rsp),%r8
mov 0xb8(%rsp),%rdx
cmp %r14,%r9
mov %rax,%rdi
cmovne 0xa0(%rsp),%rdi
mov 0xb0(%rsp),%rsi
lea (%r8,%rdx,1),%rcx
cmp %rdi,%rcx
jbe 5318 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x708>
lea 0xc0(%rsp),%rdi
cmp %rdi,%rsi
mov %rdi,0x10(%rsp)
cmovne 0xc0(%rsp),%rax
cmp %rax,%rcx
jbe 5390 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x780>
lea 0x90(%rsp),%rdi
callq 4430 <_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm@plt>
lea 0xe0(%rsp),%r15
lea 0x10(%rax),%rdx
mov %r15,0xd0(%rsp)
mov (%rax),%rcx
cmp %rdx,%rcx
je 5348 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x738>
mov %rcx,0xd0(%rsp)
mov 0x10(%rax),%rcx
mov %rcx,0xe0(%rsp)
mov 0x8(%rax),%rcx
movb $0x0,0x10(%rax)
mov %rcx,0xd8(%rsp)
movq $0x0,0x8(%rax)
mov %rdx,(%rax)
movabs $0x3fffffffffffffff,%rax
sub 0xd8(%rsp),%rax
cmp $0x1,%rax
jbe 5439 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x829>
lea 0xd0(%rsp),%rdi
mov $0x2,%edx
lea 0x16708(%rip),%rsi
callq 4430 <_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm@plt>
lea 0x100(%rsp),%rbx
lea 0x10(%rax),%rdx
mov %rbx,0xf0(%rsp)
mov (%rax),%rcx
cmp %rdx,%rcx
je 5360 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x750>
mov %rcx,0xf0(%rsp)
mov 0x10(%rax),%rcx
mov %rcx,0x100(%rsp)
mov 0x8(%rax),%rcx
movb $0x0,0x10(%rax)
mov %rcx,0xf8(%rsp)
mov %rdx,(%rax)
mov 0xf0(%rsp),%r9
movq $0x0,0x8(%rax)
mov $0xf,%eax
mov 0xf8(%rsp),%r8
mov 0x118(%rsp),%rdx
cmp %rbx,%r9
mov %rax,%rdi
cmovne 0x100(%rsp),%rdi
mov 0x110(%rsp),%rsi
lea (%r8,%rdx,1),%rcx
cmp %rdi,%rcx
jbe 506e <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x45e>
cmp 0x8(%rsp),%rsi
cmovne 0x120(%rsp),%rax
cmp %rax,%rcx
jbe 53a8 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x798>
lea 0xf0(%rsp),%rdi
callq 4430 <_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm@plt>
lea 0x10(%r12),%rdx
mov %rdx,(%r12)
mov (%rax),%rcx
lea 0x10(%rax),%rdx
cmp %rdx,%rcx
je 5378 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x768>
mov %rcx,(%r12)
mov 0x10(%rax),%rcx
mov %rcx,0x10(%r12)
mov 0x8(%rax),%rcx
mov %rdx,(%rax)
mov 0xf0(%rsp),%rdi
movq $0x0,0x8(%rax)
mov %rcx,0x8(%r12)
movb $0x0,0x10(%rax)
cmp %rbx,%rdi
je 50cb <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x4bb>
callq 45c0 <_ZdlPv@plt>
mov 0xd0(%rsp),%rdi
cmp %r15,%rdi
je 50dd <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x4cd>
callq 45c0 <_ZdlPv@plt>
mov 0x90(%rsp),%rdi
cmp %r14,%rdi
je 50ef <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x4df>
callq 45c0 <_ZdlPv@plt>
mov 0x70(%rsp),%rdi
lea 0x80(%rsp),%rax
cmp %rax,%rdi
je 5106 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x4f6>
callq 45c0 <_ZdlPv@plt>
mov 0xb0(%rsp),%rdi
cmp 0x10(%rsp),%rdi
je 511a <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x50a>
callq 45c0 <_ZdlPv@plt>
mov 0x110(%rsp),%rdi
cmp 0x8(%rsp),%rdi
je 512e <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x51e>
callq 45c0 <_ZdlPv@plt>
mov 0x50(%rsp),%rdi
test %rdi,%rdi
je 513d <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x52d>
callq 45c0 <_ZdlPv@plt>
mov 0x48(%rsp),%r13
test %r13,%r13
je 5170 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x560>
mov 0x1ce7a(%rip),%rax
test %rax,%rax
je 52c0 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x6b0>
mov $0xffffffff,%edx
lock xadd %edx,0x8(%r13)
cmp $0x1,%edx
je 52d4 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x6c4>
nopl 0x0(%rax,%rax,1)
mov %rbp,%rdi
callq 46b0 <_ZNSt6localeD1Ev@plt>
mov 0x2a8(%rsp),%rax
xor %fs:0x28,%rax
jne 5434 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x824>
add $0x2b8,%rsp
mov %r12,%rax
pop %rbx
pop %rbp
pop %r12
pop %r13
pop %r14
pop %r15
retq
nopl 0x0(%rax)
mov 0x8(%r15),%edx
lea -0x1(%rdx),%ecx
mov %ecx,0x8(%r15)
cmp $0x1,%edx
jne 4d10 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x100>
mov (%r15),%rdx
mov %rax,0x8(%rsp)
mov %r15,%rdi
callq *0x10(%rdx)
mov 0x8(%rsp),%rax
test %rax,%rax
je 53d0 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x7c0>
mov $0xffffffff,%eax
lock xadd %eax,0xc(%r15)
cmp $0x1,%eax
jne 4d10 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x100>
mov (%r15),%rax
mov %r15,%rdi
callq *0x18(%rax)
jmpq 4d10 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x100>
nopw 0x0(%rax,%rax,1)
lea -0x48(%rax,%rcx,1),%rax
jmpq 4e48 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x238>
nopw 0x0(%rax,%rax,1)
lea -0x48(%rax,%rcx,1),%rsi
cmpb $0x0,0x10(%rsi)
je 4db0 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x1a0>
mov (%rsi),%r15
mov 0x8(%rsi),%r14
lea 0x120(%rsp),%rax
mov %rax,0x8(%rsp)
sub %r15,%r14
mov %rax,0x110(%rsp)
mov %r14,0x28(%rsp)
cmp $0xf,%r14
ja 53f0 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x7e0>
cmp $0x1,%r14
jne 53e0 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x7d0>
movzbl (%r15),%eax
mov %al,0x120(%rsp)
mov 0x8(%rsp),%rax
mov %r14,0x118(%rsp)
movb $0x0,(%rax,%r14,1)
mov 0x58(%rsp),%rdx
mov 0x50(%rsp),%rax
mov 0x68(%rsp),%rsi
mov %rdx,%rcx
sub %rax,%rcx
cmp %rdx,%rax
jne 4de7 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x1d7>
lea -0x48(%rax,%rcx,1),%rax
jmpq 4de7 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x1d7>
nopl 0x0(%rax)
lea 0x10(%r12),%rax
lea 0x15ff5(%rip),%rdx
mov %r12,%rdi
mov %rax,(%r12)
mov %rdx,%rsi
callq 62e0 <_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag>
jmpq 512e <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x51e>
mov 0x8(%r13),%edx
lea -0x1(%rdx),%ecx
mov %ecx,0x8(%r13)
cmp $0x1,%edx
jne 5170 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x560>
mov 0x0(%r13),%rdx
mov %rax,0x8(%rsp)
mov %r13,%rdi
callq *0x10(%rdx)
mov 0x8(%rsp),%rax
test %rax,%rax
je 53c0 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x7b0>
mov $0xffffffff,%eax
lock xadd %eax,0xc(%r13)
cmp $0x1,%eax
jne 5170 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x560>
mov 0x0(%r13),%rax
mov %r13,%rdi
callq *0x18(%rax)
jmpq 5170 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x560>
nopl 0x0(%rax)
lea 0xc0(%rsp),%rax
mov %rax,0x10(%rsp)
jmpq 4f3a <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x32a>
nopw 0x0(%rax,%rax,1)
movdqu 0x10(%rax),%xmm0
movaps %xmm0,0xa0(%rsp)
jmpq 4ebc <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x2ac>
nopw 0x0(%rax,%rax,1)
movdqu 0x10(%rax),%xmm1
movaps %xmm1,0xe0(%rsp)
jmpq 4f7b <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x36b>
nopw 0x0(%rax,%rax,1)
movdqu 0x10(%rax),%xmm2
movaps %xmm2,0x100(%rsp)
jmpq 4fff <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x3ef>
nopw 0x0(%rax,%rax,1)
movdqu 0x10(%rax),%xmm3
movups %xmm3,0x10(%r12)
jmpq 50a1 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x491>
nopl 0x0(%rax,%rax,1)
mov %r9,%rcx
xor %edx,%edx
xor %esi,%esi
mov %rbx,%rdi
callq 46e0 <_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm@plt>
jmpq 4f47 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x337>
nopl 0x0(%rax)
mov %r9,%rcx
xor %edx,%edx
xor %esi,%esi
mov %r13,%rdi
callq 46e0 <_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm@plt>
jmpq 507b <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x46b>
nopl 0x0(%rax)
mov 0xc(%r13),%eax
lea -0x1(%rax),%edx
mov %edx,0xc(%r13)
jmpq 52fc <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x6ec>
mov 0xc(%r15),%eax
lea -0x1(%rax),%edx
mov %edx,0xc(%r15)
jmpq 51e3 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x5d3>
test %r14,%r14
jne 5445 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x835>
mov 0x8(%rsp),%rax
jmpq 5267 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x657>
lea 0x28(%rsp),%rsi
xor %edx,%edx
mov %r13,%rdi
callq 4730 <_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_createERmm@plt>
mov %rax,0x110(%rsp)
mov %rax,%rdi
mov 0x28(%rsp),%rax
mov %rax,0x120(%rsp)
mov %r14,%rdx
mov %r15,%rsi
callq 4590 <memcpy@plt>
mov 0x28(%rsp),%r14
mov 0x110(%rsp),%rax
jmpq 5267 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x657>
callq 4620 <__stack_chk_fail@plt>
lea 0x16279(%rip),%rdi
callq 4500 <_ZSt20__throw_length_errorPKc@plt>
mov 0x8(%rsp),%rdi
jmp 5417 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x807>
endbr64
mov %rax,%r12
jmpq 4803 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE.cold>
endbr64
mov %rax,%rbp
jmpq 482d <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE.cold+0x2a>
endbr64
mov %rax,%rbp
jmpq 483f <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE.cold+0x3c>
endbr64
mov %rax,%rbp
jmpq 487c <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE.cold+0x79>
endbr64
mov %rax,%rbp
jmpq 4890 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE.cold+0x8d>
endbr64
mov %rax,%rbp
lea 0xc0(%rsp),%rax
mov %rax,0x10(%rsp)
jmpq 4868 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE.cold+0x65>
endbr64
mov %rax,%rbp
lea 0xc0(%rsp),%rax
mov %rax,0x10(%rsp)
jmpq 4851 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE.cold+0x4e>
endbr64
mov %rax,%rbp
jmpq 481b <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE.cold+0x18>
nopw %cs:0x0(%rax,%rax,1)
| _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r15
push r14
lea r14, [rbp+var_2A0]
push r13
lea r13, [rbp+var_378]
push r12
mov r12, rdi
mov rdi, r13; this
push rbx
mov rbx, rsi
sub rsp, 3A8h
mov rax, fs:28h
mov [rbp+var_38], rax
xor eax, eax
call __ZNSt6localeC1Ev; std::locale::locale(void)
pxor xmm0, xmm0
mov rcx, r13
mov rdi, r14
lea rdx, aWLy+5; ""
mov r8d, 10h
movaps xmmword ptr [rbp-370h], xmm0
lea rsi, [rdx-5]
call _ZNSt8__detail9_CompilerINSt7__cxx1112regex_traitsIcEEEC2EPKcS6_RKSt6localeNSt15regex_constants18syntax_option_typeE; std::__detail::_Compiler<std::regex_traits<char>>::_Compiler(char const*,char const*,std::locale const&,std::regex_constants::syntax_option_type)
movdqa xmm0, [rbp+var_1A0]
mov rax, [rbp+var_368]
pxor xmm1, xmm1
movaps [rbp+var_1A0], xmm1
mov rdi, rax
movaps xmmword ptr [rbp-370h], xmm0
test rax, rax
jz short loc_5CDD
mov rdx, [rax+8]
lea rcx, [rax+8]
mov rax, 100000001h
cmp rdx, rax
jz loc_6770
cmp cs:__libc_single_threaded@GLIBC_2_32, 0
jz loc_67E0
mov eax, [rdi+8]
lea edx, [rax-1]
mov [rdi+8], edx
loc_5CD4:
cmp eax, 1
jz loc_6A87
loc_5CDD:
lea rdi, [rbp+var_170]
mov [rbp+var_380], 10h
call _ZNSt11_Deque_baseINSt8__detail9_StateSeqINSt7__cxx1112regex_traitsIcEEEESaIS5_EED2Ev; std::_Deque_base<std::__detail::_StateSeq<std::regex_traits<char>>>::~_Deque_base()
mov rdi, [rbp+var_190]; void *
lea rax, [rbp+var_180]
cmp rdi, rax
jz short loc_5D16
mov rax, [rbp+var_180]
lea rsi, [rax+1]; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5D16:
mov rax, qword ptr [rbp+var_1A0+8]
mov rdi, rax
test rax, rax
jz short loc_5D5F
mov rdx, [rax+8]
lea rcx, [rax+8]
mov rax, 100000001h
cmp rdx, rax
jz loc_6790
cmp cs:__libc_single_threaded@GLIBC_2_32, 0
jz loc_67F0
mov eax, [rdi+8]
lea edx, [rax-1]
mov [rdi+8], edx
loc_5D56:
cmp eax, 1
jz loc_6A9E
loc_5D5F:
mov rdi, [rbp+var_1D0]; void *
lea rax, [rbp+var_1C0]
cmp rdi, rax
jz short loc_5D82
mov rax, [rbp+var_1C0]
lea rsi, [rax+1]; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5D82:
pxor xmm0, xmm0
sub rsp, 8
mov rdi, [rbx]
mov rsi, [rbx+8]
lea rax, [rbp+var_360]
xor r9d, r9d
xor r8d, r8d
movaps xmmword ptr [rbp+var_360], xmm0
lea rcx, [rbp+var_380]
mov [rbp+var_3B0], rax
add rsi, rdi
mov rdx, rax
mov [rbp+var_3A8], rcx
movaps [rbp+var_350], xmm0
push 0
call _ZNSt8__detail17__regex_algo_implIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS5_9sub_matchISB_EEEcNS5_12regex_traitsIcEEEEbT_SH_RNS5_13match_resultsISH_T0_EERKNS5_11basic_regexIT1_T2_EENSt15regex_constants15match_flag_typeENS_20_RegexExecutorPolicyEb; std::__detail::__regex_algo_impl<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>> &,std::basic_regex<char,std::regex_traits<char>> const&,std::regex_constants::match_flag_type,std::__detail::_RegexExecutorPolicy,bool)
mov edx, eax
pop rax
mov rax, [rbp+var_360]
pop rcx
test dl, dl
jz loc_6610
mov rdx, [rbp+var_360+8]
mov rsi, rdx
sub rsi, rax
cmp rdx, rax
jz loc_66C0
mov rcx, rax
cmp rsi, 48h ; 'H'
jz loc_66C0
cmp byte ptr [rcx+10h], 0
jnz loc_66CF
loc_5E0E:
lea rbx, [rbp+var_290]
mov byte ptr [rbp+var_290], 0
mov [rbp+var_3C8], rbx
mov [rbp+var_2A0], rbx
mov [rbp+var_298], 0
loc_5E35:
mov rcx, rdx
mov rsi, qword ptr [rbp+var_350+8]
sub rcx, rax
cmp rdx, rax
jz loc_6748
mov rdx, [rax]
sub rdx, rsi
cmp rcx, 48h ; 'H'
jz loc_674F
cmp byte ptr [rax+10h], 0
jnz loc_675E
loc_5E65:
mov r15, rdx
mov rax, rdx
shr r15, 3Fh
neg rax
cmovns rdx, rax
mov [rbp+var_398], rdx
cmp rdx, 9
jbe loc_6C28
cmp rdx, 63h ; 'c'
jbe loc_6C32
cmp rdx, 3E7h
jbe loc_6C64
cmp rdx, 270Fh
jbe loc_6C5A
mov ebx, 1
mov rdi, rdx
mov rsi, 346DC5D63886594Bh
jmp short loc_5EE7
loc_5EC0:
cmp rcx, 0F423Fh
jbe loc_6810
cmp rcx, 98967Fh
jbe loc_6840
cmp rcx, 5F5E0FFh
jbe loc_68B0
loc_5EE7:
mov rax, rdx
mov rcx, rdx
mul rsi
mov eax, ebx
add ebx, 4
shr rdx, 0Bh
cmp rcx, 1869Fh
ja short loc_5EC0
mov [rbp+var_398], rdi
loc_5F09:
lea rax, [rbp+var_2F0]
lea esi, [rbx+r15]
mov edx, 2Dh ; '-'
lea rdi, [rbp+var_300]
mov [rbp+var_3A0], rax
mov [rbp+var_3D0], rdi
mov [rbp+var_300], rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char)
movdqa xmm0, cs:xmmword_1B1F0
mov rax, [rbp+var_398]
sub ebx, 1
add r15, [rbp+var_300]
movaps [rbp+var_110], xmm0
movdqa xmm0, cs:xmmword_1B200
movaps [rbp+var_100], xmm0
movdqa xmm0, cs:xmmword_1B210
movaps [rbp+var_F0], xmm0
movdqa xmm0, cs:xmmword_1B220
movaps [rbp+var_E0], xmm0
movdqa xmm0, cs:xmmword_1B230
movaps [rbp+var_D0], xmm0
movdqa xmm0, cs:xmmword_1B240
movaps [rbp+var_C0], xmm0
movdqa xmm0, cs:xmmword_1B250
movaps [rbp+var_B0], xmm0
movdqa xmm0, cs:xmmword_1B260
movaps [rbp+var_A0], xmm0
movdqa xmm0, cs:xmmword_1B270
movaps [rbp+var_90], xmm0
movdqa xmm0, cs:xmmword_1B280
movaps [rbp+var_80], xmm0
movdqa xmm0, cs:xmmword_1B290
movaps [rbp+var_70], xmm0
movdqa xmm0, cs:xmmword_1B2A0
movaps [rbp+var_60], xmm0
movdqa xmm0, cs:xmmword_1B2B0
movups [rbp+var_60+9], xmm0
cmp rax, 63h ; 'c'
jbe short loc_607A
mov rcx, 28F5C28F5C28F5C3h
mov r10, rax
nop dword ptr [rax]
loc_6018:
mov rdx, r10
shr rdx, 2
mov rax, rdx
mul rcx
mov rax, r10
mov rsi, rdx
and rdx, 0FFFFFFFFFFFFFFFCh
shr rsi, 2
add rdx, rsi
lea rdx, [rdx+rdx*4]
shl rdx, 2
sub rax, rdx
mov rdx, r10
mov r10, rsi
mov esi, ebx
add rax, rax
movzx edi, byte ptr [rbp+rax+var_110+1]
movzx eax, byte ptr [rbp+rax+var_110]
mov [r15+rsi], dil
lea esi, [rbx-1]
sub ebx, 2
mov [r15+rsi], al
cmp rdx, 270Fh
ja short loc_6018
mov [rbp+var_398], r10
loc_607A:
mov rbx, [rbp+var_398]
mov eax, ebx
add eax, 30h ; '0'
cmp rbx, 9
jbe short loc_60A3
add rbx, rbx
movzx eax, byte ptr [rbp+rbx+var_110+1]
mov [r15+1], al
movzx eax, byte ptr [rbp+rbx+var_110]
loc_60A3:
mov [r15], al
mov rax, [rbp+var_360+8]
mov rdx, [rbp+var_360]
cmp rax, rdx
jz loc_67D0
sub rax, rdx
cmp rax, 48h ; 'H'
jnz short loc_60CB
loc_60C6:
lea rdx, [rdx+rax-48h]
loc_60CB:
mov rax, [rdx]
sub rax, qword ptr [rbp+var_350+8]
mov r15, rax
mov rbx, rax
shr r15, 3Fh
neg rbx
cmovns rax, rbx
mov [rbp+var_398], rax
cmp rax, 9
jbe loc_6C1E
cmp rax, 63h ; 'c'
jbe loc_6C3C
cmp rax, 3E7h
jbe loc_6C46
cmp rax, 270Fh
jbe loc_6C50
mov rdx, rax
mov ebx, 1
mov rdi, rax
mov rsi, 346DC5D63886594Bh
jmp short loc_6157
loc_6130:
cmp rcx, 0F423Fh
jbe loc_6820
cmp rcx, 98967Fh
jbe loc_6830
cmp rcx, 5F5E0FFh
jbe loc_68C0
loc_6157:
mov rax, rdx
mov rcx, rdx
mul rsi
mov eax, ebx
add ebx, 4
shr rdx, 0Bh
cmp rcx, 1869Fh
ja short loc_6130
mov [rbp+var_398], rdi
loc_6179:
lea rax, [rbp+var_330]
lea esi, [rbx+r15]
mov edx, 2Dh ; '-'
lea rdi, [rbp+var_340]
mov [rbp+var_3C0], rax
mov [rbp+var_3B8], rdi
mov [rbp+var_340], rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char)
movdqa xmm0, cs:xmmword_1B1F0
mov rax, [rbp+var_398]
sub ebx, 1
add r15, [rbp+var_340]
movaps [rbp+var_110], xmm0
movdqa xmm0, cs:xmmword_1B200
movaps [rbp+var_100], xmm0
movdqa xmm0, cs:xmmword_1B210
movaps [rbp+var_F0], xmm0
movdqa xmm0, cs:xmmword_1B220
movaps [rbp+var_E0], xmm0
movdqa xmm0, cs:xmmword_1B230
movaps [rbp+var_D0], xmm0
movdqa xmm0, cs:xmmword_1B240
movaps [rbp+var_C0], xmm0
movdqa xmm0, cs:xmmword_1B250
movaps [rbp+var_B0], xmm0
movdqa xmm0, cs:xmmword_1B260
movaps [rbp+var_A0], xmm0
movdqa xmm0, cs:xmmword_1B270
movaps [rbp+var_90], xmm0
movdqa xmm0, cs:xmmword_1B280
movaps [rbp+var_80], xmm0
movdqa xmm0, cs:xmmword_1B290
movaps [rbp+var_70], xmm0
movdqa xmm0, cs:xmmword_1B2A0
movaps [rbp+var_60], xmm0
movdqa xmm0, cs:xmmword_1B2B0
movups [rbp+var_60+9], xmm0
cmp rax, 63h ; 'c'
jbe short loc_62EA
mov rcx, 28F5C28F5C28F5C3h
mov r11, rax
nop dword ptr [rax]
loc_6288:
mov rdx, r11
shr rdx, 2
mov rax, rdx
mul rcx
mov rax, r11
mov rsi, rdx
and rdx, 0FFFFFFFFFFFFFFFCh
shr rsi, 2
add rdx, rsi
lea rdx, [rdx+rdx*4]
shl rdx, 2
sub rax, rdx
mov rdx, r11
mov r11, rsi
mov esi, ebx
add rax, rax
movzx edi, byte ptr [rbp+rax+var_110+1]
movzx eax, byte ptr [rbp+rax+var_110]
mov [r15+rsi], dil
lea esi, [rbx-1]
sub ebx, 2
mov [r15+rsi], al
cmp rdx, 270Fh
ja short loc_6288
mov [rbp+var_398], r11
loc_62EA:
mov rbx, [rbp+var_398]
mov eax, ebx
add eax, 30h ; '0'
cmp rbx, 9
jbe short loc_6313
add rbx, rbx
movzx eax, byte ptr [rbp+rbx+var_110+1]
mov [r15+1], al
movzx eax, byte ptr [rbp+rbx+var_110]
loc_6313:
mov [r15], al
mov r8d, 2Dh ; '-'
mov ecx, 1
xor edx, edx
mov rsi, [rbp+var_338]
mov rdi, [rbp+var_3B8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE14_M_replace_auxEmmmc; std::string::_M_replace_aux(ulong,ulong,ulong,char)
lea rsi, [rbp+var_310]
lea rcx, [rax+10h]
mov r8, [rax+8]
mov [rbp+var_320], rsi
mov rdx, [rax]
cmp rdx, rcx
jz loc_68D0
mov [rbp+var_320], rdx
mov rdx, [rax+10h]
mov [rbp+var_310], rdx
loc_636A:
mov [rax], rcx
mov rcx, [rbp+var_320]
mov qword ptr [rax+8], 0
mov rdi, [rbp+var_2F8]
mov [rbp+var_318], r8
mov byte ptr [rax+10h], 0
lea rdx, [r8+rdi]
cmp rcx, rsi
jz loc_6910
mov rax, [rbp+var_300]
mov rsi, rax
cmp [rbp+var_310], rdx
jnb short loc_63D1
mov rbx, [rbp+var_3A0]
cmp rax, rbx
jz loc_6BC0
loc_63BE:
mov rsi, [rbp+var_2F0]
loc_63C5:
cmp rsi, rdx
jnb loc_6878
mov rsi, rax
loc_63D1:
mov rax, 3FFFFFFFFFFFFFFFh
sub rax, r8
cmp rax, rdi
jb loc_6CEA
lea rbx, [rbp+var_320]
mov rdx, rdi
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
lea rcx, [rbp+var_2D0]
lea rdi, [rax+10h]
mov rsi, rax
mov [rbp+var_2E0], rcx
mov rdx, [rax]
mov rax, [rax+8]
cmp rdx, rdi
jz loc_69F0
mov [rbp+var_2E0], rdx
mov rdx, [rsi+10h]
mov [rbp+var_2D0], rdx
loc_6430:
mov [rbp+var_2D8], rax
mov [rsi], rdi
mov qword ptr [rsi+8], 0
mov byte ptr [rsi+10h], 0
loc_6446:
mov rax, 3FFFFFFFFFFFFFFFh
sub rax, [rbp+var_2D8]
cmp rax, 1
jbe loc_6CC5
lea rax, [rbp+var_2E0]
mov edx, 2
lea rsi, asc_1A71A; ": "
mov rdi, rax
mov r15, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
lea rsi, [rbp+var_2B0]
lea rcx, [rax+10h]
mov r8, [rax+8]
mov [rbp+var_2C0], rsi
mov rdx, [rax]
cmp rdx, rcx
jz loc_6940
mov [rbp+var_2C0], rdx
mov rdx, [rax+10h]
mov [rbp+var_2B0], rdx
loc_64B3:
mov [rax], rcx
mov rcx, [rbp+var_2C0]
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
mov rdi, [rbp+var_298]
mov [rbp+var_2B8], r8
lea rdx, [r8+rdi]
cmp rcx, rsi
jz loc_6980
mov rax, [rbp+var_2A0]
mov rsi, rax
cmp [rbp+var_2B0], rdx
jnb short loc_651A
mov rbx, [rbp+var_3C8]
cmp rax, rbx
jz loc_6BB0
loc_6507:
mov rsi, [rbp+var_290]
loc_650E:
cmp rsi, rdx
jnb loc_6850
mov rsi, rax
loc_651A:
mov rax, 3FFFFFFFFFFFFFFFh
sub rax, r8
cmp rax, rdi
jb loc_6CA3
lea rbx, [rbp+var_2C0]
mov rdx, rdi
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
lea rcx, [r12+10h]
mov rdx, rax
mov [r12], rcx
mov rax, [rax]
lea rdi, [rdx+10h]
mov rsi, [rdx+8]
cmp rax, rdi
jz loc_69B0
mov [r12], rax
mov rax, [rdx+10h]
mov [r12+10h], rax
loc_656F:
mov [r12+8], rsi
mov [rdx], rdi
mov qword ptr [rdx+8], 0
mov byte ptr [rdx+10h], 0
loc_6583:
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv; std::string::_M_dispose(void)
mov rdi, [rbp+var_2E0]; void *
lea rax, [rbp+var_2D0]
cmp rdi, rax
jz short loc_65AE
mov rax, [rbp+var_2D0]
lea rsi, [rax+1]; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_65AE:
lea rdi, [rbp+var_320]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv; std::string::_M_dispose(void)
mov rdi, [rbp+var_340]; void *
mov rax, [rbp+var_3C0]
cmp rdi, rax
jz short loc_65DD
mov rax, [rbp+var_330]
lea rsi, [rax+1]; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_65DD:
mov rdi, [rbp+var_300]; void *
mov rax, [rbp+var_3A0]
cmp rdi, rax
jz short loc_6600
mov rax, [rbp+var_2F0]
lea rsi, [rax+1]; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_6600:
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv; std::string::_M_dispose(void)
jmp short loc_6628
loc_6610:
lea rax, [r12+10h]
mov byte ptr [r12+10h], 0
mov [r12], rax
mov qword ptr [r12+8], 0
loc_6628:
mov rdi, [rbp+var_360]; void *
test rdi, rdi
jz short loc_6643
mov rsi, qword ptr [rbp+var_350]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_6643:
mov rbx, [rbp+var_368]
test rbx, rbx
jz short loc_6689
mov rdx, [rbx+8]
lea rcx, [rbx+8]
mov rax, 100000001h
cmp rdx, rax
jz loc_67B0
cmp cs:__libc_single_threaded@GLIBC_2_32, 0
jz loc_6800
mov eax, [rbx+8]
lea edx, [rax-1]
mov [rbx+8], edx
loc_6680:
cmp eax, 1
jz loc_6A91
loc_6689:
mov rdi, r13; this
call __ZNSt6localeD1Ev; std::locale::~locale()
mov rax, [rbp+var_38]
sub rax, fs:28h
jnz loc_6C9E
lea rsp, [rbp-28h]
mov rax, r12
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_66C0:
lea rcx, [rax+rsi-48h]
cmp byte ptr [rcx+10h], 0
jz loc_5E0E
loc_66CF:
mov rax, [rcx]
mov rbx, [rcx+8]
lea rcx, [rbp+var_290]
mov [rbp+var_298], 0
mov [rbp+var_3C8], rcx
sub rbx, rax
mov [rbp+var_2A0], rcx
mov r15, rax
mov [rbp+var_388], rbx
cmp rbx, 0Fh
ja loc_6A40
cmp rbx, 1
jnz loc_6A26
movzx eax, byte ptr [rax]
mov byte ptr [rbp+var_290], al
loc_6720:
mov rax, [rbp+var_3C8]
loc_6727:
mov [rbp+var_298], rbx
mov byte ptr [rax+rbx], 0
mov rdx, [rbp+var_360+8]
mov rax, [rbp+var_360]
jmp loc_5E35
loc_6748:
mov rdx, [rax-48h]
sub rdx, rsi
loc_674F:
lea rax, [rax+rcx-48h]
cmp byte ptr [rax+10h], 0
jz loc_5E65
loc_675E:
mov rcx, [rax+8]
sub rcx, [rax]
add rdx, rcx
jmp loc_5E65
loc_6770:
mov rax, [rdi]
mov r15, rdi
mov qword ptr [rdi+8], 0
call qword ptr [rax+10h]
mov rax, [r15]
mov rdi, r15
call qword ptr [rax+18h]
jmp loc_5CDD
loc_6790:
mov rax, [rdi]
mov r15, rdi
mov qword ptr [rdi+8], 0
call qword ptr [rax+10h]
mov rax, [r15]
mov rdi, r15
call qword ptr [rax+18h]
jmp loc_5D5F
loc_67B0:
mov rax, [rbx]
mov rdi, rbx
mov qword ptr [rbx+8], 0
call qword ptr [rax+10h]
mov rax, [rbx]
mov rdi, rbx
call qword ptr [rax+18h]
jmp loc_6689
loc_67D0:
xor eax, eax
jmp loc_60C6
loc_67E0:
mov eax, 0FFFFFFFFh
lock xadd [rcx], eax
jmp loc_5CD4
loc_67F0:
mov eax, 0FFFFFFFFh
lock xadd [rcx], eax
jmp loc_5D56
loc_6800:
mov eax, 0FFFFFFFFh
lock xadd [rcx], eax
jmp loc_6680
loc_6810:
mov [rbp+var_398], rdi
lea ebx, [rax+5]
jmp loc_5F09
loc_6820:
mov [rbp+var_398], rdi
lea ebx, [rax+5]
jmp loc_6179
loc_6830:
mov [rbp+var_398], rdi
lea ebx, [rax+6]
jmp loc_6179
loc_6840:
mov [rbp+var_398], rdi
lea ebx, [rax+6]
jmp loc_5F09
loc_6850:
xor edx, edx
xor esi, esi
lea rbx, [rbp+var_2C0]
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
mov rsi, rax
mov rdi, r12
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EOS4_; std::string::basic_string(std::string&&)
jmp loc_6583
loc_6878:
mov rdi, [rbp+var_3D0]
xor edx, edx
xor esi, esi
lea rbx, [rbp+var_320]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
mov rsi, rax
lea rax, [rbp+var_2E0]
mov rdi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EOS4_; std::string::basic_string(std::string&&)
jmp loc_6446
loc_68B0:
mov [rbp+var_398], rdi
lea ebx, [rax+7]
jmp loc_5F09
loc_68C0:
mov [rbp+var_398], rdi
lea ebx, [rax+7]
jmp loc_6179
loc_68D0:
add r8, 1
mov r9, rsi
mov rdx, rcx
cmp r8d, 8
jnb loc_6BF7
loc_68E4:
xor edi, edi
test r8b, 4
jnz loc_6AA8
loc_68F0:
test r8b, 2
jnz loc_6AD3
loc_68FA:
and r8d, 1
jnz loc_6AC6
loc_6904:
mov r8, [rax+8]
jmp loc_636A
loc_6910:
mov rsi, [rbp+var_300]
mov rax, rsi
cmp rdx, 0Fh
jbe loc_63D1
mov rbx, [rbp+var_3A0]
cmp rsi, rbx
jnz loc_63BE
jmp loc_63D1
loc_6940:
add r8, 1
mov r9, rsi
mov rdx, rcx
cmp r8d, 8
jnb loc_6BCA
loc_6954:
xor edi, edi
test r8b, 4
jnz loc_6AB7
loc_6960:
test r8b, 2
jnz loc_6AF3
loc_696A:
and r8d, 1
jnz loc_6AE6
loc_6974:
mov r8, [rax+8]
jmp loc_64B3
loc_6980:
mov rsi, [rbp+var_2A0]
mov rax, rsi
cmp rdx, 0Fh
jbe loc_651A
mov rbx, [rbp+var_3C8]
cmp rsi, rbx
jnz loc_6507
jmp loc_651A
loc_69B0:
lea rax, [rsi+1]
cmp eax, 8
jnb loc_6B06
test al, 4
jnz loc_6C6E
test eax, eax
jz loc_656F
movzx esi, byte ptr [rdx+10h]
mov [r12+10h], sil
test al, 2
jnz loc_6C89
loc_69DE:
mov rsi, [rdx+8]
jmp loc_656F
loc_69F0:
add rax, 1
mov r8, rcx
mov rdx, rdi
cmp eax, 8
jnb loc_6B86
loc_6A03:
xor ecx, ecx
test al, 4
jnz loc_6B77
loc_6A0D:
test al, 2
jnz loc_6B64
loc_6A15:
test al, 1
jnz loc_6B57
loc_6A1D:
mov rax, [rsi+8]
jmp loc_6430
loc_6A26:
test rbx, rbx
jz loc_6720
mov rdi, [rbp+var_3C8]
jmp short loc_6A69
loc_6A40:
lea rsi, [rbp+var_388]
xor edx, edx
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_createERmm; std::string::_M_create(ulong &,ulong)
mov [rbp+var_2A0], rax
mov rdi, rax; dest
mov rax, [rbp+var_388]
mov [rbp+var_290], rax
loc_6A69:
mov rdx, rbx; n
mov rsi, r15; src
call _memcpy
mov rbx, [rbp+var_388]
mov rax, [rbp+var_2A0]
jmp loc_6727
loc_6A87:
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE24_M_release_last_use_coldEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release_last_use_cold(void)
jmp loc_5CDD
loc_6A91:
mov rdi, rbx
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE24_M_release_last_use_coldEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release_last_use_cold(void)
jmp loc_6689
loc_6A9E:
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE24_M_release_last_use_coldEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release_last_use_cold(void)
jmp loc_5D5F
loc_6AA8:
mov edi, [rdx]
mov [r9], edi
mov edi, 4
jmp loc_68F0
loc_6AB7:
mov edi, [rdx]
mov [r9], edi
mov edi, 4
jmp loc_6960
loc_6AC6:
movzx edx, byte ptr [rdx+rdi]
mov [r9+rdi], dl
jmp loc_6904
loc_6AD3:
movzx r10d, word ptr [rdx+rdi]
mov [r9+rdi], r10w
add rdi, 2
jmp loc_68FA
loc_6AE6:
movzx edx, byte ptr [rdx+rdi]
mov [r9+rdi], dl
jmp loc_6974
loc_6AF3:
movzx r10d, word ptr [rdx+rdi]
mov [r9+rdi], r10w
add rdi, 2
jmp loc_696A
loc_6B06:
mov rsi, [rdx+10h]
mov [r12+10h], rsi
mov esi, eax
mov r8, [rdi+rsi-8]
mov [rcx+rsi-8], r8
lea rsi, [r12+18h]
mov r8, rdi
and rsi, 0FFFFFFFFFFFFFFF8h
sub rcx, rsi
add eax, ecx
sub r8, rcx
and eax, 0FFFFFFF8h
cmp eax, 8
jb loc_69DE
and eax, 0FFFFFFF8h
xor ecx, ecx
loc_6B40:
mov r9d, ecx
add ecx, 8
mov r10, [r8+r9]
mov [rsi+r9], r10
cmp ecx, eax
jb short loc_6B40
jmp loc_69DE
loc_6B57:
movzx eax, byte ptr [rdx+rcx]
mov [r8+rcx], al
jmp loc_6A1D
loc_6B64:
movzx r9d, word ptr [rdx+rcx]
mov [r8+rcx], r9w
add rcx, 2
jmp loc_6A15
loc_6B77:
mov ecx, [rdx]
mov [r8], ecx
mov ecx, 4
jmp loc_6A0D
loc_6B86:
mov r10d, eax
xor edx, edx
and r10d, 0FFFFFFF8h
loc_6B8F:
mov r8d, edx
add edx, 8
mov r9, [rdi+r8]
mov [rcx+r8], r9
cmp edx, r10d
jb short loc_6B8F
lea r8, [rcx+rdx]
add rdx, rdi
jmp loc_6A03
loc_6BB0:
mov esi, 0Fh
jmp loc_650E
loc_6BC0:
mov esi, 0Fh
jmp loc_63C5
loc_6BCA:
mov r10d, r8d
xor edx, edx
mov rbx, r15
and r10d, 0FFFFFFF8h
loc_6BD6:
mov edi, edx
add edx, 8
mov r9, [rcx+rdi]
mov [rsi+rdi], r9
cmp edx, r10d
jb short loc_6BD6
lea r9, [rsi+rdx]
mov r15, rbx
add rdx, rcx
jmp loc_6954
loc_6BF7:
mov r10d, r8d
xor edx, edx
and r10d, 0FFFFFFF8h
loc_6C00:
mov edi, edx
add edx, 8
mov r9, [rcx+rdi]
mov [rsi+rdi], r9
cmp edx, r10d
jb short loc_6C00
lea r9, [rsi+rdx]
add rdx, rcx
jmp loc_68E4
loc_6C1E:
mov ebx, 1
jmp loc_6179
loc_6C28:
mov ebx, 1
jmp loc_5F09
loc_6C32:
mov ebx, 2
jmp loc_5F09
loc_6C3C:
mov ebx, 2
jmp loc_6179
loc_6C46:
mov ebx, 3
jmp loc_6179
loc_6C50:
mov ebx, 4
jmp loc_6179
loc_6C5A:
mov ebx, 4
jmp loc_5F09
loc_6C64:
mov ebx, 3
jmp loc_5F09
loc_6C6E:
mov esi, [rdx+10h]
mov eax, eax
mov [r12+10h], esi
mov esi, [rdi+rax-4]
mov [rcx+rax-4], esi
mov rsi, [rdx+8]
jmp loc_656F
loc_6C89:
mov eax, eax
movzx esi, word ptr [rdi+rax-2]
mov [rcx+rax-2], si
mov rsi, [rdx+8]
jmp loc_656F
loc_6C9E:
call ___stack_chk_fail
loc_6CA3:
mov rax, [rbp+var_38]
sub rax, fs:28h
jnz short loc_6D0C
lea rdi, aBasicStringApp; "basic_string::append"
lea rbx, [rbp+var_2C0]
call __ZSt20__throw_length_errorPKc; std::__throw_length_error(char const*)
loc_6CC5:
mov rax, [rbp+var_38]
sub rax, fs:28h
jnz short loc_6D11
lea rax, [rbp+var_2E0]
lea rdi, aBasicStringApp; "basic_string::append"
mov r15, rax
call __ZSt20__throw_length_errorPKc; std::__throw_length_error(char const*)
loc_6CEA:
mov rax, [rbp+var_38]
sub rax, fs:28h
jnz short loc_6D16
lea rdi, aBasicStringApp; "basic_string::append"
lea rbx, [rbp+var_320]
call __ZSt20__throw_length_errorPKc; std::__throw_length_error(char const*)
loc_6D0C:
call ___stack_chk_fail
loc_6D11:
call ___stack_chk_fail
loc_6D16:
call ___stack_chk_fail
endbr64
mov r15, rax
jmp loc_47E1
endbr64
mov r12, rax
jmp loc_47CF
endbr64
mov rbx, rax
jmp loc_47F8
endbr64
mov rbx, rax
jmp loc_47EC
endbr64
mov rbx, rax
jmp loc_480C
endbr64
mov rbx, rax
jmp loc_4840
endbr64
mov r12, rax
jmp _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE_cold; func0(std::string const&) [clone]
endbr64
mov rbx, rax
jmp loc_4804 | long long func0(long long a1, long long *a2)
{
char *v4; // rsi
__m128i v5; // xmm0
long long v6; // rax
signed __int32 *v7; // rdi
long long v8; // rdx
volatile signed __int32 *v9; // rcx
signed __int32 v10; // eax
long long v11; // rdi
long long v12; // rdx
volatile signed __int32 *v13; // rcx
signed __int32 v14; // eax
long long v15; // rdi
long long v16; // rsi
long long v17; // rsi
char v18; // dl
_BYTE *v19; // rax
_BYTE *v20; // rdx
char *v21; // rcx
signed long long v22; // rcx
unsigned long long v23; // rdx
unsigned long long v24; // r15
int v25; // ebx
unsigned long long v26; // rdi
unsigned long long v27; // rcx
int v28; // eax
int v29; // ebx
__int8 *v30; // r15
unsigned long long v31; // r10
long long v32; // rax
unsigned long long v33; // rdx
__int8 v34; // di
long long v35; // rsi
__int8 v36; // al
_QWORD *v37; // rdx
signed long long v38; // rax
unsigned long long v39; // rax
unsigned long long v40; // r15
unsigned long long v41; // rdx
int v42; // ebx
unsigned long long v43; // rdi
unsigned long long v44; // rcx
int v45; // eax
int v46; // ebx
__int8 *v47; // r15
unsigned long long v48; // r11
long long v49; // rax
unsigned long long v50; // rdx
__int8 v51; // di
long long v52; // rsi
__int8 v53; // al
_QWORD *v54; // rax
_QWORD *v55; // rcx
long long v56; // r8
_QWORD *v57; // rcx
void *v58; // rdi
unsigned long long v59; // rdx
void *v60; // rax
void *v61; // rsi
unsigned long long v62; // rsi
long long v63; // rax
_DWORD *v64; // rdi
_QWORD *v65; // rsi
_DWORD *v66; // rdx
long long v67; // rax
_QWORD *v68; // rax
_QWORD *v69; // rcx
long long v70; // r8
_QWORD *v71; // rcx
unsigned long long v72; // rdx
_QWORD *v73; // rax
_QWORD *v74; // rsi
unsigned long long v75; // rsi
_QWORD *v76; // rax
long long v77; // rcx
_QWORD *v78; // rdx
_QWORD *v79; // rax
_QWORD *v80; // rdi
long long v81; // rbx
long long v82; // rdx
volatile signed __int32 *v83; // rcx
signed __int32 v84; // eax
_BYTE *v86; // rax
long long v87; // rbx
size_t v88; // rbx
const void *v89; // r15
_QWORD *v90; // rax
long long v91; // rax
long long v92; // rax
long long v93; // rax
long long v94; // rdi
long long v95; // rax
unsigned int v96; // r8d
_DWORD *v97; // r9
_DWORD *v98; // rdx
long long v99; // rdi
unsigned int v100; // r8d
_DWORD *v101; // r9
_DWORD *v102; // rdx
long long v103; // rdi
unsigned int v104; // eax
unsigned int v105; // eax
_DWORD *v106; // r8
_DWORD *v107; // rdx
long long v108; // rcx
_QWORD *v109; // rdi
unsigned long long v110; // rsi
long long v111; // rcx
char *v112; // r8
unsigned int v113; // eax
unsigned int v114; // eax
unsigned int v115; // ecx
long long v116; // r9
long long v117; // rdx
long long v118; // r8
long long v119; // rdx
long long v120; // rdi
long long v121; // rdx
long long v122; // rdi
unsigned long long v123; // [rsp+38h] [rbp-398h]
unsigned long long v124; // [rsp+38h] [rbp-398h]
size_t v125; // [rsp+48h] [rbp-388h] BYREF
int v126; // [rsp+50h] [rbp-380h] BYREF
char v127[8]; // [rsp+58h] [rbp-378h] BYREF
__m128i v128; // [rsp+60h] [rbp-370h]
void *v129[2]; // [rsp+70h] [rbp-360h] BYREF
__int128 v130; // [rsp+80h] [rbp-350h]
void *v131[2]; // [rsp+90h] [rbp-340h] BYREF
_QWORD v132[2]; // [rsp+A0h] [rbp-330h] BYREF
_QWORD v133[2]; // [rsp+B0h] [rbp-320h] BYREF
_QWORD v134[2]; // [rsp+C0h] [rbp-310h] BYREF
void *v135[2]; // [rsp+D0h] [rbp-300h] BYREF
_QWORD v136[2]; // [rsp+E0h] [rbp-2F0h] BYREF
void *v137; // [rsp+F0h] [rbp-2E0h] BYREF
long long v138; // [rsp+F8h] [rbp-2D8h]
_QWORD v139[2]; // [rsp+100h] [rbp-2D0h] BYREF
_QWORD v140[2]; // [rsp+110h] [rbp-2C0h] BYREF
_QWORD v141[2]; // [rsp+120h] [rbp-2B0h] BYREF
_QWORD *v142; // [rsp+130h] [rbp-2A0h] BYREF
unsigned long long v143; // [rsp+138h] [rbp-298h]
_QWORD v144[24]; // [rsp+140h] [rbp-290h] BYREF
void *v145; // [rsp+200h] [rbp-1D0h]
long long v146; // [rsp+210h] [rbp-1C0h] BYREF
__m128i v147; // [rsp+230h] [rbp-1A0h] BYREF
void *v148; // [rsp+240h] [rbp-190h]
long long v149; // [rsp+250h] [rbp-180h] BYREF
char v150[96]; // [rsp+260h] [rbp-170h] BYREF
__m128i si128; // [rsp+2C0h] [rbp-110h]
__m128i v152; // [rsp+2D0h] [rbp-100h]
__m128i v153; // [rsp+2E0h] [rbp-F0h]
__m128i v154; // [rsp+2F0h] [rbp-E0h]
__m128i v155; // [rsp+300h] [rbp-D0h]
__m128i v156; // [rsp+310h] [rbp-C0h]
__m128i v157; // [rsp+320h] [rbp-B0h]
__m128i v158; // [rsp+330h] [rbp-A0h]
__m128i v159; // [rsp+340h] [rbp-90h]
__m128i v160; // [rsp+350h] [rbp-80h]
__m128i v161; // [rsp+360h] [rbp-70h]
__m128i v162[2]; // [rsp+370h] [rbp-60h]
unsigned long long v163; // [rsp+398h] [rbp-38h]
v163 = __readfsqword(0x28u);
std::locale::locale((std::locale *)v127);
v128 = 0LL;
v4 = "\\w+ly";
std::__detail::_Compiler<std::regex_traits<char>>::_Compiler(&v142, "\\w+ly", "", v127, 16LL);
v5 = _mm_load_si128(&v147);
v6 = v128.m128i_i64[1];
v147 = 0LL;
v7 = (signed __int32 *)v128.m128i_i64[1];
v128 = v5;
if ( v7 )
{
v8 = *(_QWORD *)(v6 + 8);
v9 = (volatile signed __int32 *)(v6 + 8);
if ( v8 == 0x100000001LL )
{
v91 = *(_QWORD *)v7;
*((_QWORD *)v7 + 1) = 0LL;
(*(void ( **)(signed __int32 *, char *, long long, volatile signed __int32 *))(v91 + 16))(
v7,
v4,
0x100000001LL,
v9);
(*(void ( **)(signed __int32 *))(*(_QWORD *)v7 + 24LL))(v7);
}
else
{
if ( _libc_single_threaded )
{
v10 = v7[2];
v8 = (unsigned int)(v10 - 1);
v7[2] = v8;
}
else
{
v10 = _InterlockedExchangeAdd(v9, 0xFFFFFFFF);
}
if ( v10 == 1 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release_last_use_cold(v7, v4, v8, v9);
}
}
v126 = 16;
std::_Deque_base<std::__detail::_StateSeq<std::regex_traits<char>>>::~_Deque_base(v150);
if ( v148 != &v149 )
{
v4 = (char *)(v149 + 1);
operator delete(v148, v149 + 1);
}
v11 = v147.m128i_i64[1];
if ( v147.m128i_i64[1] )
{
v12 = *(_QWORD *)(v147.m128i_i64[1] + 8);
v13 = (volatile signed __int32 *)(v147.m128i_i64[1] + 8);
if ( v12 == 0x100000001LL )
{
v92 = *(_QWORD *)v147.m128i_i64[1];
*(_QWORD *)(v147.m128i_i64[1] + 8) = 0LL;
(*(void ( **)(long long, char *, long long, volatile signed __int32 *))(v92 + 16))(
v11,
v4,
0x100000001LL,
v13);
(*(void ( **)(long long))(*(_QWORD *)v11 + 24LL))(v11);
}
else
{
if ( _libc_single_threaded )
{
v14 = *(_DWORD *)(v147.m128i_i64[1] + 8);
v12 = (unsigned int)(v14 - 1);
*(_DWORD *)(v147.m128i_i64[1] + 8) = v12;
}
else
{
v14 = _InterlockedExchangeAdd(v13, 0xFFFFFFFF);
}
if ( v14 == 1 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release_last_use_cold(v11, v4, v12, v13);
}
}
if ( v145 != &v146 )
operator delete(v145, v146 + 1);
v15 = *a2;
v16 = a2[1];
*(_OWORD *)v129 = 0LL;
v17 = v15 + v16;
v130 = 0LL;
v18 = std::__detail::__regex_algo_impl<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>>(
v15,
v17,
(unsigned int)v129,
(unsigned int)&v126,
0,
0,
0);
v19 = v129[0];
if ( !v18 )
{
*(_BYTE *)(a1 + 16) = 0;
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
goto LABEL_97;
}
v20 = v129[1];
if ( v129[1] == v129[0] || (v21 = (char *)v129[0], (long long *)((char *)v129[1] - (char *)v129[0]) == &qword_48) )
{
v21 = (char *)v129[1] - 72;
if ( !*((_BYTE *)v129[1] - 56) )
goto LABEL_21;
}
else if ( !*((_BYTE *)v129[0] + 16) )
{
LABEL_21:
LOBYTE(v144[0]) = 0;
v142 = v144;
v143 = 0LL;
goto LABEL_22;
}
v86 = *(_BYTE **)v21;
v87 = *((_QWORD *)v21 + 1);
v143 = 0LL;
v88 = v87 - (_QWORD)v86;
v142 = v144;
v89 = v86;
v125 = v88;
if ( v88 > 0xF )
{
v142 = (_QWORD *)std::string::_M_create(&v142, &v125, 0LL);
v109 = v142;
v144[0] = v125;
goto LABEL_168;
}
if ( v88 != 1 )
{
if ( !v88 )
goto LABEL_110;
v109 = v144;
LABEL_168:
memcpy(v109, v89, v88);
v88 = v125;
v90 = v142;
goto LABEL_111;
}
LOBYTE(v144[0]) = *v86;
LABEL_110:
v90 = v144;
LABEL_111:
v143 = v88;
*((_BYTE *)v90 + v88) = 0;
v20 = v129[1];
v19 = v129[0];
LABEL_22:
v22 = v20 - v19;
if ( v20 == v19 )
{
v23 = *((_QWORD *)v19 - 9) - *((_QWORD *)&v130 + 1);
LABEL_113:
v19 = &v19[v22 - 72];
if ( !v19[16] )
goto LABEL_25;
goto LABEL_114;
}
v23 = *(_QWORD *)v19 - *((_QWORD *)&v130 + 1);
if ( v22 == 72 )
goto LABEL_113;
if ( !v19[16] )
goto LABEL_25;
LABEL_114:
v23 += *((_QWORD *)v19 + 1) - *(_QWORD *)v19;
LABEL_25:
v24 = v23 >> 63;
if ( (long long)v23 <= 0 )
v23 = -(long long)v23;
v123 = v23;
if ( v23 <= 9 )
{
v25 = 1;
}
else if ( v23 <= 0x63 )
{
v25 = 2;
}
else if ( v23 <= 0x3E7 )
{
v25 = 3;
}
else if ( v23 <= 0x270F )
{
v25 = 4;
}
else
{
v25 = 1;
v26 = v23;
do
{
v27 = v23;
v28 = v25;
v25 += 4;
v23 /= 0x2710uLL;
if ( v27 <= 0x1869F )
{
v123 = v26;
goto LABEL_37;
}
if ( v27 <= 0xF423F )
{
v123 = v26;
v25 = v28 + 5;
goto LABEL_37;
}
if ( v27 <= 0x98967F )
{
v123 = v26;
v25 = v28 + 6;
goto LABEL_37;
}
}
while ( v27 > 0x5F5E0FF );
v123 = v26;
v25 = v28 + 7;
}
LABEL_37:
v135[0] = v136;
std::string::_M_construct(v135, (unsigned int)(v25 + v24), 45LL);
v29 = v25 - 1;
v30 = (char *)v135[0] + v24;
si128 = _mm_load_si128((const __m128i *)&xmmword_1B1F0);
v152 = _mm_load_si128((const __m128i *)&xmmword_1B200);
v153 = _mm_load_si128((const __m128i *)&xmmword_1B210);
v154 = _mm_load_si128((const __m128i *)&xmmword_1B220);
v155 = _mm_load_si128((const __m128i *)&xmmword_1B230);
v156 = _mm_load_si128((const __m128i *)&xmmword_1B240);
v157 = _mm_load_si128((const __m128i *)&xmmword_1B250);
v158 = _mm_load_si128((const __m128i *)&xmmword_1B260);
v159 = _mm_load_si128((const __m128i *)&xmmword_1B270);
v160 = _mm_load_si128((const __m128i *)&xmmword_1B280);
v161 = _mm_load_si128((const __m128i *)&xmmword_1B290);
v162[0] = _mm_load_si128((const __m128i *)&xmmword_1B2A0);
*(__m128i *)((char *)v162 + 9) = _mm_load_si128((const __m128i *)&xmmword_1B2B0);
if ( v123 > 0x63 )
{
v31 = v123;
do
{
v32 = v31
- 20 * (v31 / 0x64 + (((0x28F5C28F5C28F5C3LL * (unsigned __int128)(v31 >> 2)) >> 64) & 0xFFFFFFFFFFFFFFFCLL));
v33 = v31;
v31 /= 0x64uLL;
v32 *= 2LL;
v34 = si128.m128i_i8[v32 + 1];
LOBYTE(v32) = si128.m128i_i8[v32];
v30[v29] = v34;
v35 = (unsigned int)(v29 - 1);
v29 -= 2;
v30[v35] = v32;
}
while ( v33 > 0x270F );
v123 = v31;
}
v36 = v123 + 48;
if ( v123 > 9 )
{
v30[1] = si128.m128i_i8[2 * v123 + 1];
v36 = si128.m128i_i8[2 * v123];
}
*v30 = v36;
v37 = v129[0];
if ( v129[1] == v129[0] )
{
v38 = 0LL;
}
else
{
v38 = (char *)v129[1] - (char *)v129[0];
if ( (long long *)((char *)v129[1] - (char *)v129[0]) != &qword_48 )
goto LABEL_46;
}
v37 = (char *)v129[0] + v38 - 72;
LABEL_46:
v39 = *v37 - *((_QWORD *)&v130 + 1);
v40 = v39 >> 63;
if ( (long long)(*((_QWORD *)&v130 + 1) - *v37) >= 0 )
v39 = *((_QWORD *)&v130 + 1) - *v37;
v124 = v39;
if ( v39 <= 9 )
{
v42 = 1;
}
else if ( v39 <= 0x63 )
{
v42 = 2;
}
else if ( v39 <= 0x3E7 )
{
v42 = 3;
}
else if ( v39 <= 0x270F )
{
v42 = 4;
}
else
{
v41 = v39;
v42 = 1;
v43 = v39;
do
{
v44 = v41;
v45 = v42;
v42 += 4;
v41 /= 0x2710uLL;
if ( v44 <= 0x1869F )
{
v124 = v43;
goto LABEL_58;
}
if ( v44 <= 0xF423F )
{
v124 = v43;
v42 = v45 + 5;
goto LABEL_58;
}
if ( v44 <= 0x98967F )
{
v124 = v43;
v42 = v45 + 6;
goto LABEL_58;
}
}
while ( v44 > 0x5F5E0FF );
v124 = v43;
v42 = v45 + 7;
}
LABEL_58:
v131[0] = v132;
std::string::_M_construct(v131, (unsigned int)(v42 + v40), 45LL);
v46 = v42 - 1;
v47 = (char *)v131[0] + v40;
si128 = _mm_load_si128((const __m128i *)&xmmword_1B1F0);
v152 = _mm_load_si128((const __m128i *)&xmmword_1B200);
v153 = _mm_load_si128((const __m128i *)&xmmword_1B210);
v154 = _mm_load_si128((const __m128i *)&xmmword_1B220);
v155 = _mm_load_si128((const __m128i *)&xmmword_1B230);
v156 = _mm_load_si128((const __m128i *)&xmmword_1B240);
v157 = _mm_load_si128((const __m128i *)&xmmword_1B250);
v158 = _mm_load_si128((const __m128i *)&xmmword_1B260);
v159 = _mm_load_si128((const __m128i *)&xmmword_1B270);
v160 = _mm_load_si128((const __m128i *)&xmmword_1B280);
v161 = _mm_load_si128((const __m128i *)&xmmword_1B290);
v162[0] = _mm_load_si128((const __m128i *)&xmmword_1B2A0);
*(__m128i *)((char *)v162 + 9) = _mm_load_si128((const __m128i *)&xmmword_1B2B0);
if ( v124 > 0x63 )
{
v48 = v124;
do
{
v49 = v48
- 20 * (v48 / 0x64 + (((0x28F5C28F5C28F5C3LL * (unsigned __int128)(v48 >> 2)) >> 64) & 0xFFFFFFFFFFFFFFFCLL));
v50 = v48;
v48 /= 0x64uLL;
v49 *= 2LL;
v51 = si128.m128i_i8[v49 + 1];
LOBYTE(v49) = si128.m128i_i8[v49];
v47[v46] = v51;
v52 = (unsigned int)(v46 - 1);
v46 -= 2;
v47[v52] = v49;
}
while ( v50 > 0x270F );
v124 = v48;
}
v53 = v124 + 48;
if ( v124 > 9 )
{
v47[1] = si128.m128i_i8[2 * v124 + 1];
v53 = si128.m128i_i8[2 * v124];
}
*v47 = v53;
v54 = (_QWORD *)std::string::_M_replace_aux(v131, v131[1], 0LL, 1LL, 45LL);
v55 = v54 + 2;
v56 = v54[1];
v133[0] = v134;
if ( (_QWORD *)*v54 == v54 + 2 )
{
v96 = v56 + 1;
v97 = v134;
v98 = v54 + 2;
if ( v96 >= 8 )
{
LODWORD(v121) = 0;
do
{
v122 = (unsigned int)v121;
v121 = (unsigned int)(v121 + 8);
*(_QWORD *)((char *)v134 + v122) = *(_QWORD *)((char *)v55 + v122);
}
while ( (unsigned int)v121 < (v96 & 0xFFFFFFF8) );
v97 = (_DWORD *)((char *)v134 + v121);
v98 = (_DWORD *)((char *)v55 + v121);
}
v99 = 0LL;
if ( (v96 & 4) != 0 )
{
*v97 = *v98;
v99 = 4LL;
}
if ( (v96 & 2) != 0 )
{
*(_WORD *)((char *)v97 + v99) = *(_WORD *)((char *)v98 + v99);
v99 += 2LL;
}
if ( (v96 & 1) != 0 )
*((_BYTE *)v97 + v99) = *((_BYTE *)v98 + v99);
v56 = v54[1];
}
else
{
v133[0] = *v54;
v134[0] = v54[2];
}
*v54 = v55;
v57 = (_QWORD *)v133[0];
v54[1] = 0LL;
v58 = v135[1];
v133[1] = v56;
*((_BYTE *)v54 + 16) = 0;
v59 = (unsigned long long)v58 + v56;
if ( v57 == v134 )
{
v61 = v135[0];
v60 = v135[0];
if ( v59 <= 0xF || v135[0] == v136 )
goto LABEL_72;
}
else
{
v60 = v135[0];
v61 = v135[0];
if ( v134[0] >= v59 )
goto LABEL_72;
if ( v135[0] == v136 )
{
v62 = 15LL;
goto LABEL_70;
}
}
v62 = v136[0];
LABEL_70:
if ( v62 >= v59 )
{
v95 = std::string::_M_replace(v135, 0LL, 0LL);
std::string::basic_string(&v137, v95);
goto LABEL_76;
}
v61 = v60;
LABEL_72:
if ( 0x3FFFFFFFFFFFFFFFLL - v56 < (unsigned long long)v58 )
std::__throw_length_error("basic_string::append");
v63 = std::string::_M_append(v133, v61, v58);
v64 = (_DWORD *)(v63 + 16);
v65 = (_QWORD *)v63;
v137 = v139;
v66 = *(_DWORD **)v63;
v67 = *(_QWORD *)(v63 + 8);
if ( v66 == v64 )
{
v105 = v67 + 1;
v106 = v139;
v107 = v64;
if ( v105 >= 8 )
{
LODWORD(v117) = 0;
do
{
v118 = (unsigned int)v117;
v117 = (unsigned int)(v117 + 8);
*(_QWORD *)((char *)v139 + v118) = *(_QWORD *)((char *)v64 + v118);
}
while ( (unsigned int)v117 < (v105 & 0xFFFFFFF8) );
v106 = (_DWORD *)((char *)v139 + v117);
v107 = (_DWORD *)((char *)v64 + v117);
}
v108 = 0LL;
if ( (v105 & 4) != 0 )
{
*v106 = *v107;
v108 = 4LL;
}
if ( (v105 & 2) != 0 )
{
*(_WORD *)((char *)v106 + v108) = *(_WORD *)((char *)v107 + v108);
v108 += 2LL;
}
if ( (v105 & 1) != 0 )
*((_BYTE *)v106 + v108) = *((_BYTE *)v107 + v108);
v67 = v65[1];
}
else
{
v137 = v66;
v139[0] = v65[2];
}
v138 = v67;
*v65 = v64;
v65[1] = 0LL;
*((_BYTE *)v65 + 16) = 0;
LABEL_76:
if ( v138 == 0x3FFFFFFFFFFFFFFFLL || v138 == 4611686018427387902LL )
std::__throw_length_error("basic_string::append");
v68 = (_QWORD *)std::string::_M_append(&v137, ": ", 2LL);
v69 = v68 + 2;
v70 = v68[1];
v140[0] = v141;
if ( (_QWORD *)*v68 == v68 + 2 )
{
v100 = v70 + 1;
v101 = v141;
v102 = v68 + 2;
if ( v100 >= 8 )
{
LODWORD(v119) = 0;
do
{
v120 = (unsigned int)v119;
v119 = (unsigned int)(v119 + 8);
*(_QWORD *)((char *)v141 + v120) = *(_QWORD *)((char *)v69 + v120);
}
while ( (unsigned int)v119 < (v100 & 0xFFFFFFF8) );
v101 = (_DWORD *)((char *)v141 + v119);
v102 = (_DWORD *)((char *)v69 + v119);
}
v103 = 0LL;
if ( (v100 & 4) != 0 )
{
*v101 = *v102;
v103 = 4LL;
}
if ( (v100 & 2) != 0 )
{
*(_WORD *)((char *)v101 + v103) = *(_WORD *)((char *)v102 + v103);
v103 += 2LL;
}
if ( (v100 & 1) != 0 )
*((_BYTE *)v101 + v103) = *((_BYTE *)v102 + v103);
v70 = v68[1];
}
else
{
v140[0] = *v68;
v141[0] = v68[2];
}
*v68 = v69;
v71 = (_QWORD *)v140[0];
v68[1] = 0LL;
*((_BYTE *)v68 + 16) = 0;
v140[1] = v70;
v72 = v70 + v143;
if ( v71 == v141 )
{
v74 = v142;
v73 = v142;
if ( v72 <= 0xF || v142 == v144 )
goto LABEL_85;
}
else
{
v73 = v142;
v74 = v142;
if ( v141[0] >= v72 )
goto LABEL_85;
if ( v142 == v144 )
{
v75 = 15LL;
goto LABEL_83;
}
}
v75 = v144[0];
LABEL_83:
if ( v75 >= v72 )
{
v17 = std::string::_M_replace(&v142, 0LL, 0LL);
std::string::basic_string(a1, v17);
goto LABEL_89;
}
v74 = v73;
LABEL_85:
if ( 0x3FFFFFFFFFFFFFFFLL - v70 < v143 )
std::__throw_length_error("basic_string::append");
v76 = (_QWORD *)std::string::_M_append(v140, v74, v143);
v77 = a1 + 16;
v78 = v76;
*(_QWORD *)a1 = a1 + 16;
v79 = (_QWORD *)*v76;
v80 = v78 + 2;
v17 = v78[1];
if ( v79 != v78 + 2 )
{
*(_QWORD *)a1 = v79;
*(_QWORD *)(a1 + 16) = v78[2];
goto LABEL_88;
}
v104 = v17 + 1;
if ( (unsigned int)(v17 + 1) >= 8 )
{
*(_QWORD *)(a1 + 16) = v78[2];
*(_QWORD *)(v77 + v104 - 8) = *(_QWORD *)((char *)v80 + v104 - 8);
v110 = (a1 + 24) & 0xFFFFFFFFFFFFFFF8LL;
v111 = v77 - v110;
v112 = (char *)v80 - v111;
v113 = (v111 + v104) & 0xFFFFFFF8;
if ( v113 >= 8 )
{
v114 = v113 & 0xFFFFFFF8;
v115 = 0;
do
{
v116 = v115;
v115 += 8;
*(_QWORD *)(v110 + v116) = *(_QWORD *)&v112[v116];
}
while ( v115 < v114 );
}
LABEL_156:
v17 = v78[1];
goto LABEL_88;
}
if ( (v104 & 4) != 0 )
{
*(_DWORD *)(a1 + 16) = *((_DWORD *)v78 + 4);
*(_DWORD *)(v77 + v104 - 4) = *(_DWORD *)((char *)v80 + v104 - 4);
v17 = v78[1];
goto LABEL_88;
}
if ( (_DWORD)v17 != -1 )
{
*(_BYTE *)(a1 + 16) = *((_BYTE *)v78 + 16);
if ( (v104 & 2) != 0 )
{
*(_WORD *)(v77 + v104 - 2) = *(_WORD *)((char *)v80 + v104 - 2);
v17 = v78[1];
goto LABEL_88;
}
goto LABEL_156;
}
LABEL_88:
*(_QWORD *)(a1 + 8) = v17;
*v78 = v80;
v78[1] = 0LL;
*((_BYTE *)v78 + 16) = 0;
LABEL_89:
std::string::_M_dispose(v140);
if ( v137 != v139 )
{
v17 = v139[0] + 1LL;
operator delete(v137, v139[0] + 1LL);
}
std::string::_M_dispose(v133);
if ( v131[0] != v132 )
{
v17 = v132[0] + 1LL;
operator delete(v131[0], v132[0] + 1LL);
}
if ( v135[0] != v136 )
{
v17 = v136[0] + 1LL;
operator delete(v135[0], v136[0] + 1LL);
}
std::string::_M_dispose(&v142);
LABEL_97:
if ( v129[0] )
{
v17 = v130 - (unsigned long long)v129[0];
operator delete(v129[0], v130 - (unsigned long long)v129[0]);
}
v81 = v128.m128i_i64[1];
if ( v128.m128i_i64[1] )
{
v82 = *(_QWORD *)(v128.m128i_i64[1] + 8);
v83 = (volatile signed __int32 *)(v128.m128i_i64[1] + 8);
if ( v82 == 0x100000001LL )
{
v93 = *(_QWORD *)v128.m128i_i64[1];
v94 = v128.m128i_i64[1];
*(_QWORD *)(v128.m128i_i64[1] + 8) = 0LL;
(*(void ( **)(long long, long long, long long, volatile signed __int32 *))(v93 + 16))(
v94,
v17,
0x100000001LL,
v83);
(*(void ( **)(long long))(*(_QWORD *)v81 + 24LL))(v81);
}
else
{
if ( _libc_single_threaded )
{
v84 = *(_DWORD *)(v128.m128i_i64[1] + 8);
v82 = (unsigned int)(v84 - 1);
*(_DWORD *)(v128.m128i_i64[1] + 8) = v82;
}
else
{
v84 = _InterlockedExchangeAdd(v83, 0xFFFFFFFF);
}
if ( v84 == 1 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release_last_use_cold(v81, v17, v82, v83);
}
}
std::locale::~locale((std::locale *)v127);
return a1;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
LEA R14,[RBP + -0x2a0]
PUSH R13
LEA R13,[RBP + -0x378]
PUSH R12
MOV R12,RDI
MOV RDI,R13
PUSH RBX
MOV RBX,RSI
SUB RSP,0x3a8
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x38],RAX
XOR EAX,EAX
CALL 0x00104730
PXOR XMM0,XMM0
MOV RCX,R13
MOV RDI,R14
LEA RDX,[0x11a704]
MOV R8D,0x10
MOVAPS xmmword ptr [RBP + -0x370],XMM0
LEA RSI,[RDX + -0x5]
LAB_00105c75:
CALL 0x00118e30
MOVDQA XMM0,xmmword ptr [RBP + -0x1a0]
MOV RAX,qword ptr [RBP + -0x368]
PXOR XMM1,XMM1
MOVAPS xmmword ptr [RBP + -0x1a0],XMM1
MOV RDI,RAX
MOVAPS xmmword ptr [RBP + -0x370],XMM0
TEST RAX,RAX
JZ 0x00105cdd
MOV RDX,qword ptr [RAX + 0x8]
LEA RCX,[RAX + 0x8]
MOV RAX,0x100000001
CMP RDX,RAX
JZ 0x00106770
CMP byte ptr [0x00120460],0x0
JZ 0x001067e0
MOV EAX,dword ptr [RDI + 0x8]
LEA EDX,[RAX + -0x1]
MOV dword ptr [RDI + 0x8],EDX
LAB_00105cd4:
CMP EAX,0x1
JZ 0x00106a87
LAB_00105cdd:
LEA RDI,[RBP + -0x170]
MOV dword ptr [RBP + -0x380],0x10
CALL 0x00108460
MOV RDI,qword ptr [RBP + -0x190]
LEA RAX,[RBP + -0x180]
CMP RDI,RAX
JZ 0x00105d16
MOV RAX,qword ptr [RBP + -0x180]
LEA RSI,[RAX + 0x1]
CALL 0x00104590
LAB_00105d16:
MOV RAX,qword ptr [RBP + -0x198]
MOV RDI,RAX
TEST RAX,RAX
JZ 0x00105d5f
MOV RDX,qword ptr [RAX + 0x8]
LEA RCX,[RAX + 0x8]
MOV RAX,0x100000001
CMP RDX,RAX
JZ 0x00106790
CMP byte ptr [0x00120460],0x0
JZ 0x001067f0
MOV EAX,dword ptr [RDI + 0x8]
LEA EDX,[RAX + -0x1]
MOV dword ptr [RDI + 0x8],EDX
LAB_00105d56:
CMP EAX,0x1
JZ 0x00106a9e
LAB_00105d5f:
MOV RDI,qword ptr [RBP + -0x1d0]
LEA RAX,[RBP + -0x1c0]
CMP RDI,RAX
JZ 0x00105d82
MOV RAX,qword ptr [RBP + -0x1c0]
LEA RSI,[RAX + 0x1]
CALL 0x00104590
LAB_00105d82:
PXOR XMM0,XMM0
SUB RSP,0x8
MOV RDI,qword ptr [RBX]
MOV RSI,qword ptr [RBX + 0x8]
LEA RAX,[RBP + -0x360]
XOR R9D,R9D
XOR R8D,R8D
MOVAPS xmmword ptr [RBP + -0x360],XMM0
LEA RCX,[RBP + -0x380]
MOV qword ptr [RBP + -0x3b0],RAX
ADD RSI,RDI
MOV RDX,RAX
MOV qword ptr [RBP + -0x3a8],RCX
MOVAPS xmmword ptr [RBP + -0x350],XMM0
PUSH 0x0
LAB_00105dc9:
CALL 0x0010ebe0
MOV EDX,EAX
POP RAX
MOV RAX,qword ptr [RBP + -0x360]
POP RCX
TEST DL,DL
JZ 0x00106610
MOV RDX,qword ptr [RBP + -0x358]
MOV RSI,RDX
SUB RSI,RAX
CMP RDX,RAX
JZ 0x001066c0
MOV RCX,RAX
CMP RSI,0x48
JZ 0x001066c0
CMP byte ptr [RCX + 0x10],0x0
JNZ 0x001066cf
LAB_00105e0e:
LEA RBX,[RBP + -0x290]
MOV byte ptr [RBP + -0x290],0x0
MOV qword ptr [RBP + -0x3c8],RBX
MOV qword ptr [RBP + -0x2a0],RBX
MOV qword ptr [RBP + -0x298],0x0
LAB_00105e35:
MOV RCX,RDX
MOV RSI,qword ptr [RBP + -0x348]
SUB RCX,RAX
CMP RDX,RAX
JZ 0x00106748
MOV RDX,qword ptr [RAX]
SUB RDX,RSI
CMP RCX,0x48
JZ 0x0010674f
CMP byte ptr [RAX + 0x10],0x0
JNZ 0x0010675e
LAB_00105e65:
MOV R15,RDX
MOV RAX,RDX
SHR R15,0x3f
NEG RAX
CMOVNS RDX,RAX
MOV qword ptr [RBP + -0x398],RDX
CMP RDX,0x9
JBE 0x00106c28
CMP RDX,0x63
JBE 0x00106c32
CMP RDX,0x3e7
JBE 0x00106c64
CMP RDX,0x270f
JBE 0x00106c5a
MOV EBX,0x1
MOV RDI,RDX
MOV RSI,0x346dc5d63886594b
JMP 0x00105ee7
LAB_00105ec0:
CMP RCX,0xf423f
JBE 0x00106810
CMP RCX,0x98967f
JBE 0x00106840
CMP RCX,0x5f5e0ff
JBE 0x001068b0
LAB_00105ee7:
MOV RAX,RDX
MOV RCX,RDX
MUL RSI
MOV EAX,EBX
ADD EBX,0x4
SHR RDX,0xb
CMP RCX,0x1869f
JA 0x00105ec0
MOV qword ptr [RBP + -0x398],RDI
LAB_00105f09:
LEA RAX,[RBP + -0x2f0]
LEA ESI,[RBX + R15*0x1]
MOV EDX,0x2d
LEA RDI,[RBP + -0x300]
MOV qword ptr [RBP + -0x3a0],RAX
MOV qword ptr [RBP + -0x3d0],RDI
MOV qword ptr [RBP + -0x300],RAX
LAB_00105f35:
CALL 0x00104600
MOVDQA XMM0,xmmword ptr [0x0011b1f0]
MOV RAX,qword ptr [RBP + -0x398]
SUB EBX,0x1
ADD R15,qword ptr [RBP + -0x300]
MOVAPS xmmword ptr [RBP + -0x110],XMM0
MOVDQA XMM0,xmmword ptr [0x0011b200]
MOVAPS xmmword ptr [RBP + -0x100],XMM0
MOVDQA XMM0,xmmword ptr [0x0011b210]
MOVAPS xmmword ptr [RBP + -0xf0],XMM0
MOVDQA XMM0,xmmword ptr [0x0011b220]
MOVAPS xmmword ptr [RBP + -0xe0],XMM0
MOVDQA XMM0,xmmword ptr [0x0011b230]
MOVAPS xmmword ptr [RBP + -0xd0],XMM0
MOVDQA XMM0,xmmword ptr [0x0011b240]
MOVAPS xmmword ptr [RBP + -0xc0],XMM0
MOVDQA XMM0,xmmword ptr [0x0011b250]
MOVAPS xmmword ptr [RBP + -0xb0],XMM0
MOVDQA XMM0,xmmword ptr [0x0011b260]
MOVAPS xmmword ptr [RBP + -0xa0],XMM0
MOVDQA XMM0,xmmword ptr [0x0011b270]
MOVAPS xmmword ptr [RBP + -0x90],XMM0
MOVDQA XMM0,xmmword ptr [0x0011b280]
MOVAPS xmmword ptr [RBP + -0x80],XMM0
MOVDQA XMM0,xmmword ptr [0x0011b290]
MOVAPS xmmword ptr [RBP + -0x70],XMM0
MOVDQA XMM0,xmmword ptr [0x0011b2a0]
MOVAPS xmmword ptr [RBP + -0x60],XMM0
MOVDQA XMM0,xmmword ptr [0x0011b2b0]
MOVUPS xmmword ptr [RBP + -0x57],XMM0
CMP RAX,0x63
JBE 0x0010607a
MOV RCX,0x28f5c28f5c28f5c3
MOV R10,RAX
NOP dword ptr [RAX]
LAB_00106018:
MOV RDX,R10
SHR RDX,0x2
MOV RAX,RDX
MUL RCX
MOV RAX,R10
MOV RSI,RDX
AND RDX,-0x4
SHR RSI,0x2
ADD RDX,RSI
LEA RDX,[RDX + RDX*0x4]
SHL RDX,0x2
SUB RAX,RDX
MOV RDX,R10
MOV R10,RSI
MOV ESI,EBX
ADD RAX,RAX
MOVZX EDI,byte ptr [RBP + RAX*0x1 + -0x10f]
MOVZX EAX,byte ptr [RBP + RAX*0x1 + -0x110]
MOV byte ptr [R15 + RSI*0x1],DIL
LEA ESI,[RBX + -0x1]
SUB EBX,0x2
MOV byte ptr [R15 + RSI*0x1],AL
CMP RDX,0x270f
JA 0x00106018
MOV qword ptr [RBP + -0x398],R10
LAB_0010607a:
MOV RBX,qword ptr [RBP + -0x398]
MOV EAX,EBX
ADD EAX,0x30
CMP RBX,0x9
JBE 0x001060a3
ADD RBX,RBX
MOVZX EAX,byte ptr [RBP + RBX*0x1 + -0x10f]
MOV byte ptr [R15 + 0x1],AL
MOVZX EAX,byte ptr [RBP + RBX*0x1 + -0x110]
LAB_001060a3:
MOV byte ptr [R15],AL
MOV RAX,qword ptr [RBP + -0x358]
MOV RDX,qword ptr [RBP + -0x360]
CMP RAX,RDX
JZ 0x001067d0
SUB RAX,RDX
CMP RAX,0x48
JNZ 0x001060cb
LAB_001060c6:
LEA RDX,[RDX + RAX*0x1 + -0x48]
LAB_001060cb:
MOV RAX,qword ptr [RDX]
SUB RAX,qword ptr [RBP + -0x348]
MOV R15,RAX
MOV RBX,RAX
SHR R15,0x3f
NEG RBX
CMOVNS RAX,RBX
MOV qword ptr [RBP + -0x398],RAX
CMP RAX,0x9
JBE 0x00106c1e
CMP RAX,0x63
JBE 0x00106c3c
CMP RAX,0x3e7
JBE 0x00106c46
CMP RAX,0x270f
JBE 0x00106c50
MOV RDX,RAX
MOV EBX,0x1
MOV RDI,RAX
MOV RSI,0x346dc5d63886594b
JMP 0x00106157
LAB_00106130:
CMP RCX,0xf423f
JBE 0x00106820
CMP RCX,0x98967f
JBE 0x00106830
CMP RCX,0x5f5e0ff
JBE 0x001068c0
LAB_00106157:
MOV RAX,RDX
MOV RCX,RDX
MUL RSI
MOV EAX,EBX
ADD EBX,0x4
SHR RDX,0xb
CMP RCX,0x1869f
JA 0x00106130
MOV qword ptr [RBP + -0x398],RDI
LAB_00106179:
LEA RAX,[RBP + -0x330]
LEA ESI,[RBX + R15*0x1]
MOV EDX,0x2d
LEA RDI,[RBP + -0x340]
MOV qword ptr [RBP + -0x3c0],RAX
MOV qword ptr [RBP + -0x3b8],RDI
MOV qword ptr [RBP + -0x340],RAX
LAB_001061a5:
CALL 0x00104600
MOVDQA XMM0,xmmword ptr [0x0011b1f0]
MOV RAX,qword ptr [RBP + -0x398]
SUB EBX,0x1
ADD R15,qword ptr [RBP + -0x340]
MOVAPS xmmword ptr [RBP + -0x110],XMM0
MOVDQA XMM0,xmmword ptr [0x0011b200]
MOVAPS xmmword ptr [RBP + -0x100],XMM0
MOVDQA XMM0,xmmword ptr [0x0011b210]
MOVAPS xmmword ptr [RBP + -0xf0],XMM0
MOVDQA XMM0,xmmword ptr [0x0011b220]
MOVAPS xmmword ptr [RBP + -0xe0],XMM0
MOVDQA XMM0,xmmword ptr [0x0011b230]
MOVAPS xmmword ptr [RBP + -0xd0],XMM0
MOVDQA XMM0,xmmword ptr [0x0011b240]
MOVAPS xmmword ptr [RBP + -0xc0],XMM0
MOVDQA XMM0,xmmword ptr [0x0011b250]
MOVAPS xmmword ptr [RBP + -0xb0],XMM0
MOVDQA XMM0,xmmword ptr [0x0011b260]
MOVAPS xmmword ptr [RBP + -0xa0],XMM0
MOVDQA XMM0,xmmword ptr [0x0011b270]
MOVAPS xmmword ptr [RBP + -0x90],XMM0
MOVDQA XMM0,xmmword ptr [0x0011b280]
MOVAPS xmmword ptr [RBP + -0x80],XMM0
MOVDQA XMM0,xmmword ptr [0x0011b290]
MOVAPS xmmword ptr [RBP + -0x70],XMM0
MOVDQA XMM0,xmmword ptr [0x0011b2a0]
MOVAPS xmmword ptr [RBP + -0x60],XMM0
MOVDQA XMM0,xmmword ptr [0x0011b2b0]
MOVUPS xmmword ptr [RBP + -0x57],XMM0
CMP RAX,0x63
JBE 0x001062ea
MOV RCX,0x28f5c28f5c28f5c3
MOV R11,RAX
NOP dword ptr [RAX]
LAB_00106288:
MOV RDX,R11
SHR RDX,0x2
MOV RAX,RDX
MUL RCX
MOV RAX,R11
MOV RSI,RDX
AND RDX,-0x4
SHR RSI,0x2
ADD RDX,RSI
LEA RDX,[RDX + RDX*0x4]
SHL RDX,0x2
SUB RAX,RDX
MOV RDX,R11
MOV R11,RSI
MOV ESI,EBX
ADD RAX,RAX
MOVZX EDI,byte ptr [RBP + RAX*0x1 + -0x10f]
MOVZX EAX,byte ptr [RBP + RAX*0x1 + -0x110]
MOV byte ptr [R15 + RSI*0x1],DIL
LEA ESI,[RBX + -0x1]
SUB EBX,0x2
MOV byte ptr [R15 + RSI*0x1],AL
CMP RDX,0x270f
JA 0x00106288
MOV qword ptr [RBP + -0x398],R11
LAB_001062ea:
MOV RBX,qword ptr [RBP + -0x398]
MOV EAX,EBX
ADD EAX,0x30
CMP RBX,0x9
JBE 0x00106313
ADD RBX,RBX
MOVZX EAX,byte ptr [RBP + RBX*0x1 + -0x10f]
MOV byte ptr [R15 + 0x1],AL
MOVZX EAX,byte ptr [RBP + RBX*0x1 + -0x110]
LAB_00106313:
MOV byte ptr [R15],AL
MOV R8D,0x2d
MOV ECX,0x1
XOR EDX,EDX
MOV RSI,qword ptr [RBP + -0x338]
MOV RDI,qword ptr [RBP + -0x3b8]
LAB_00106331:
CALL 0x00104710
LEA RSI,[RBP + -0x310]
LEA RCX,[RAX + 0x10]
MOV R8,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x320],RSI
MOV RDX,qword ptr [RAX]
CMP RDX,RCX
JZ 0x001068d0
MOV qword ptr [RBP + -0x320],RDX
MOV RDX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x310],RDX
LAB_0010636a:
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x320]
MOV qword ptr [RAX + 0x8],0x0
MOV RDI,qword ptr [RBP + -0x2f8]
MOV qword ptr [RBP + -0x318],R8
MOV byte ptr [RAX + 0x10],0x0
LEA RDX,[R8 + RDI*0x1]
CMP RCX,RSI
JZ 0x00106910
MOV RAX,qword ptr [RBP + -0x300]
MOV RSI,RAX
CMP qword ptr [RBP + -0x310],RDX
JNC 0x001063d1
MOV RBX,qword ptr [RBP + -0x3a0]
CMP RAX,RBX
JZ 0x00106bc0
LAB_001063be:
MOV RSI,qword ptr [RBP + -0x2f0]
LAB_001063c5:
CMP RSI,RDX
JNC 0x00106878
MOV RSI,RAX
LAB_001063d1:
MOV RAX,0x3fffffffffffffff
SUB RAX,R8
CMP RAX,RDI
JC 0x00106cea
LEA RBX,[RBP + -0x320]
MOV RDX,RDI
MOV RDI,RBX
LAB_001063f4:
CALL 0x001043f0
LEA RCX,[RBP + -0x2d0]
LEA RDI,[RAX + 0x10]
MOV RSI,RAX
MOV qword ptr [RBP + -0x2e0],RCX
MOV RDX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x8]
CMP RDX,RDI
JZ 0x001069f0
MOV qword ptr [RBP + -0x2e0],RDX
MOV RDX,qword ptr [RSI + 0x10]
MOV qword ptr [RBP + -0x2d0],RDX
LAB_00106430:
MOV qword ptr [RBP + -0x2d8],RAX
MOV qword ptr [RSI],RDI
MOV qword ptr [RSI + 0x8],0x0
MOV byte ptr [RSI + 0x10],0x0
LAB_00106446:
MOV RAX,0x3fffffffffffffff
SUB RAX,qword ptr [RBP + -0x2d8]
CMP RAX,0x1
JBE 0x00106cc5
LEA RAX,[RBP + -0x2e0]
MOV EDX,0x2
LEA RSI,[0x11a71a]
MOV RDI,RAX
MOV R15,RAX
LAB_0010647a:
CALL 0x001043f0
LEA RSI,[RBP + -0x2b0]
LEA RCX,[RAX + 0x10]
MOV R8,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x2c0],RSI
MOV RDX,qword ptr [RAX]
CMP RDX,RCX
JZ 0x00106940
MOV qword ptr [RBP + -0x2c0],RDX
MOV RDX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x2b0],RDX
LAB_001064b3:
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x2c0]
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
MOV RDI,qword ptr [RBP + -0x298]
MOV qword ptr [RBP + -0x2b8],R8
LEA RDX,[R8 + RDI*0x1]
CMP RCX,RSI
JZ 0x00106980
MOV RAX,qword ptr [RBP + -0x2a0]
MOV RSI,RAX
CMP qword ptr [RBP + -0x2b0],RDX
JNC 0x0010651a
MOV RBX,qword ptr [RBP + -0x3c8]
CMP RAX,RBX
JZ 0x00106bb0
LAB_00106507:
MOV RSI,qword ptr [RBP + -0x290]
LAB_0010650e:
CMP RSI,RDX
JNC 0x00106850
MOV RSI,RAX
LAB_0010651a:
MOV RAX,0x3fffffffffffffff
SUB RAX,R8
CMP RAX,RDI
JC 0x00106ca3
LEA RBX,[RBP + -0x2c0]
MOV RDX,RDI
MOV RDI,RBX
LAB_0010653d:
CALL 0x001043f0
LEA RCX,[R12 + 0x10]
MOV RDX,RAX
MOV qword ptr [R12],RCX
MOV RAX,qword ptr [RAX]
LEA RDI,[RDX + 0x10]
MOV RSI,qword ptr [RDX + 0x8]
CMP RAX,RDI
JZ 0x001069b0
MOV qword ptr [R12],RAX
MOV RAX,qword ptr [RDX + 0x10]
MOV qword ptr [R12 + 0x10],RAX
LAB_0010656f:
MOV qword ptr [R12 + 0x8],RSI
MOV qword ptr [RDX],RDI
MOV qword ptr [RDX + 0x8],0x0
MOV byte ptr [RDX + 0x10],0x0
LAB_00106583:
MOV RDI,RBX
CALL 0x00104610
MOV RDI,qword ptr [RBP + -0x2e0]
LEA RAX,[RBP + -0x2d0]
CMP RDI,RAX
JZ 0x001065ae
MOV RAX,qword ptr [RBP + -0x2d0]
LEA RSI,[RAX + 0x1]
CALL 0x00104590
LAB_001065ae:
LEA RDI,[RBP + -0x320]
CALL 0x00104610
MOV RDI,qword ptr [RBP + -0x340]
MOV RAX,qword ptr [RBP + -0x3c0]
CMP RDI,RAX
JZ 0x001065dd
MOV RAX,qword ptr [RBP + -0x330]
LEA RSI,[RAX + 0x1]
CALL 0x00104590
LAB_001065dd:
MOV RDI,qword ptr [RBP + -0x300]
MOV RAX,qword ptr [RBP + -0x3a0]
CMP RDI,RAX
JZ 0x00106600
MOV RAX,qword ptr [RBP + -0x2f0]
LEA RSI,[RAX + 0x1]
CALL 0x00104590
LAB_00106600:
MOV RDI,R14
CALL 0x00104610
JMP 0x00106628
LAB_00106610:
LEA RAX,[R12 + 0x10]
MOV byte ptr [R12 + 0x10],0x0
MOV qword ptr [R12],RAX
MOV qword ptr [R12 + 0x8],0x0
LAB_00106628:
MOV RDI,qword ptr [RBP + -0x360]
TEST RDI,RDI
JZ 0x00106643
MOV RSI,qword ptr [RBP + -0x350]
SUB RSI,RDI
CALL 0x00104590
LAB_00106643:
MOV RBX,qword ptr [RBP + -0x368]
TEST RBX,RBX
JZ 0x00106689
MOV RDX,qword ptr [RBX + 0x8]
LEA RCX,[RBX + 0x8]
MOV RAX,0x100000001
CMP RDX,RAX
JZ 0x001067b0
CMP byte ptr [0x00120460],0x0
JZ 0x00106800
MOV EAX,dword ptr [RBX + 0x8]
LEA EDX,[RAX + -0x1]
MOV dword ptr [RBX + 0x8],EDX
LAB_00106680:
CMP EAX,0x1
JZ 0x00106a91
LAB_00106689:
MOV RDI,R13
CALL 0x00104670
MOV RAX,qword ptr [RBP + -0x38]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x00106c9e
LEA RSP,[RBP + -0x28]
MOV RAX,R12
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001066c0:
LEA RCX,[RAX + RSI*0x1 + -0x48]
CMP byte ptr [RCX + 0x10],0x0
JZ 0x00105e0e
LAB_001066cf:
MOV RAX,qword ptr [RCX]
MOV RBX,qword ptr [RCX + 0x8]
LEA RCX,[RBP + -0x290]
MOV qword ptr [RBP + -0x298],0x0
MOV qword ptr [RBP + -0x3c8],RCX
SUB RBX,RAX
MOV qword ptr [RBP + -0x2a0],RCX
MOV R15,RAX
MOV qword ptr [RBP + -0x388],RBX
CMP RBX,0xf
JA 0x00106a40
CMP RBX,0x1
JNZ 0x00106a26
MOVZX EAX,byte ptr [RAX]
MOV byte ptr [RBP + -0x290],AL
LAB_00106720:
MOV RAX,qword ptr [RBP + -0x3c8]
LAB_00106727:
MOV qword ptr [RBP + -0x298],RBX
MOV byte ptr [RAX + RBX*0x1],0x0
MOV RDX,qword ptr [RBP + -0x358]
MOV RAX,qword ptr [RBP + -0x360]
JMP 0x00105e35
LAB_00106748:
MOV RDX,qword ptr [RAX + -0x48]
SUB RDX,RSI
LAB_0010674f:
LEA RAX,[RAX + RCX*0x1 + -0x48]
CMP byte ptr [RAX + 0x10],0x0
JZ 0x00105e65
LAB_0010675e:
MOV RCX,qword ptr [RAX + 0x8]
SUB RCX,qword ptr [RAX]
ADD RDX,RCX
JMP 0x00105e65
LAB_00106770:
MOV RAX,qword ptr [RDI]
MOV R15,RDI
MOV qword ptr [RDI + 0x8],0x0
CALL qword ptr [RAX + 0x10]
MOV RAX,qword ptr [R15]
MOV RDI,R15
CALL qword ptr [RAX + 0x18]
JMP 0x00105cdd
LAB_00106790:
MOV RAX,qword ptr [RDI]
MOV R15,RDI
MOV qword ptr [RDI + 0x8],0x0
CALL qword ptr [RAX + 0x10]
MOV RAX,qword ptr [R15]
MOV RDI,R15
CALL qword ptr [RAX + 0x18]
JMP 0x00105d5f
LAB_001067b0:
MOV RAX,qword ptr [RBX]
MOV RDI,RBX
MOV qword ptr [RBX + 0x8],0x0
CALL qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBX]
MOV RDI,RBX
CALL qword ptr [RAX + 0x18]
JMP 0x00106689
LAB_001067d0:
XOR EAX,EAX
JMP 0x001060c6
LAB_001067e0:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RCX],EAX
JMP 0x00105cd4
LAB_001067f0:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RCX],EAX
JMP 0x00105d56
LAB_00106800:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RCX],EAX
JMP 0x00106680
LAB_00106810:
MOV qword ptr [RBP + -0x398],RDI
LEA EBX,[RAX + 0x5]
JMP 0x00105f09
LAB_00106820:
MOV qword ptr [RBP + -0x398],RDI
LEA EBX,[RAX + 0x5]
JMP 0x00106179
LAB_00106830:
MOV qword ptr [RBP + -0x398],RDI
LEA EBX,[RAX + 0x6]
JMP 0x00106179
LAB_00106840:
MOV qword ptr [RBP + -0x398],RDI
LEA EBX,[RAX + 0x6]
JMP 0x00105f09
LAB_00106850:
XOR EDX,EDX
XOR ESI,ESI
LEA RBX,[RBP + -0x2c0]
MOV RDI,R14
CALL 0x00104690
MOV RSI,RAX
MOV RDI,R12
CALL 0x001044e0
JMP 0x00106583
LAB_00106878:
MOV RDI,qword ptr [RBP + -0x3d0]
XOR EDX,EDX
XOR ESI,ESI
LEA RBX,[RBP + -0x320]
LAB_0010688a:
CALL 0x00104690
MOV RSI,RAX
LEA RAX,[RBP + -0x2e0]
MOV RDI,RAX
CALL 0x001044e0
JMP 0x00106446
LAB_001068b0:
MOV qword ptr [RBP + -0x398],RDI
LEA EBX,[RAX + 0x7]
JMP 0x00105f09
LAB_001068c0:
MOV qword ptr [RBP + -0x398],RDI
LEA EBX,[RAX + 0x7]
JMP 0x00106179
LAB_001068d0:
ADD R8,0x1
MOV R9,RSI
MOV RDX,RCX
CMP R8D,0x8
JNC 0x00106bf7
LAB_001068e4:
XOR EDI,EDI
TEST R8B,0x4
JNZ 0x00106aa8
LAB_001068f0:
TEST R8B,0x2
JNZ 0x00106ad3
LAB_001068fa:
AND R8D,0x1
JNZ 0x00106ac6
LAB_00106904:
MOV R8,qword ptr [RAX + 0x8]
JMP 0x0010636a
LAB_00106910:
MOV RSI,qword ptr [RBP + -0x300]
MOV RAX,RSI
CMP RDX,0xf
JBE 0x001063d1
MOV RBX,qword ptr [RBP + -0x3a0]
CMP RSI,RBX
JNZ 0x001063be
JMP 0x001063d1
LAB_00106940:
ADD R8,0x1
MOV R9,RSI
MOV RDX,RCX
CMP R8D,0x8
JNC 0x00106bca
LAB_00106954:
XOR EDI,EDI
TEST R8B,0x4
JNZ 0x00106ab7
LAB_00106960:
TEST R8B,0x2
JNZ 0x00106af3
LAB_0010696a:
AND R8D,0x1
JNZ 0x00106ae6
LAB_00106974:
MOV R8,qword ptr [RAX + 0x8]
JMP 0x001064b3
LAB_00106980:
MOV RSI,qword ptr [RBP + -0x2a0]
MOV RAX,RSI
CMP RDX,0xf
JBE 0x0010651a
MOV RBX,qword ptr [RBP + -0x3c8]
CMP RSI,RBX
JNZ 0x00106507
JMP 0x0010651a
LAB_001069b0:
LEA RAX,[RSI + 0x1]
CMP EAX,0x8
JNC 0x00106b06
TEST AL,0x4
JNZ 0x00106c6e
TEST EAX,EAX
JZ 0x0010656f
MOVZX ESI,byte ptr [RDX + 0x10]
MOV byte ptr [R12 + 0x10],SIL
TEST AL,0x2
JNZ 0x00106c89
LAB_001069de:
MOV RSI,qword ptr [RDX + 0x8]
JMP 0x0010656f
LAB_001069f0:
ADD RAX,0x1
MOV R8,RCX
MOV RDX,RDI
CMP EAX,0x8
JNC 0x00106b86
LAB_00106a03:
XOR ECX,ECX
TEST AL,0x4
JNZ 0x00106b77
LAB_00106a0d:
TEST AL,0x2
JNZ 0x00106b64
LAB_00106a15:
TEST AL,0x1
JNZ 0x00106b57
LAB_00106a1d:
MOV RAX,qword ptr [RSI + 0x8]
JMP 0x00106430
LAB_00106a26:
TEST RBX,RBX
JZ 0x00106720
MOV RDI,qword ptr [RBP + -0x3c8]
JMP 0x00106a69
LAB_00106a40:
LEA RSI,[RBP + -0x388]
XOR EDX,EDX
MOV RDI,R14
LAB_00106a4c:
CALL 0x001046e0
MOV qword ptr [RBP + -0x2a0],RAX
MOV RDI,RAX
MOV RAX,qword ptr [RBP + -0x388]
MOV qword ptr [RBP + -0x290],RAX
LAB_00106a69:
MOV RDX,RBX
MOV RSI,R15
CALL 0x00104570
MOV RBX,qword ptr [RBP + -0x388]
MOV RAX,qword ptr [RBP + -0x2a0]
JMP 0x00106727
LAB_00106a87:
CALL 0x00108000
JMP 0x00105cdd
LAB_00106a91:
MOV RDI,RBX
CALL 0x00108000
JMP 0x00106689
LAB_00106a9e:
CALL 0x00108000
JMP 0x00105d5f
LAB_00106aa8:
MOV EDI,dword ptr [RDX]
MOV dword ptr [R9],EDI
MOV EDI,0x4
JMP 0x001068f0
LAB_00106ab7:
MOV EDI,dword ptr [RDX]
MOV dword ptr [R9],EDI
MOV EDI,0x4
JMP 0x00106960
LAB_00106ac6:
MOVZX EDX,byte ptr [RDX + RDI*0x1]
MOV byte ptr [R9 + RDI*0x1],DL
JMP 0x00106904
LAB_00106ad3:
MOVZX R10D,word ptr [RDX + RDI*0x1]
MOV word ptr [R9 + RDI*0x1],R10W
ADD RDI,0x2
JMP 0x001068fa
LAB_00106ae6:
MOVZX EDX,byte ptr [RDX + RDI*0x1]
MOV byte ptr [R9 + RDI*0x1],DL
JMP 0x00106974
LAB_00106af3:
MOVZX R10D,word ptr [RDX + RDI*0x1]
MOV word ptr [R9 + RDI*0x1],R10W
ADD RDI,0x2
JMP 0x0010696a
LAB_00106b06:
MOV RSI,qword ptr [RDX + 0x10]
MOV qword ptr [R12 + 0x10],RSI
MOV ESI,EAX
MOV R8,qword ptr [RDI + RSI*0x1 + -0x8]
MOV qword ptr [RCX + RSI*0x1 + -0x8],R8
LEA RSI,[R12 + 0x18]
MOV R8,RDI
AND RSI,-0x8
SUB RCX,RSI
ADD EAX,ECX
SUB R8,RCX
AND EAX,0xfffffff8
CMP EAX,0x8
JC 0x001069de
AND EAX,0xfffffff8
XOR ECX,ECX
LAB_00106b40:
MOV R9D,ECX
ADD ECX,0x8
MOV R10,qword ptr [R8 + R9*0x1]
MOV qword ptr [RSI + R9*0x1],R10
CMP ECX,EAX
JC 0x00106b40
JMP 0x001069de
LAB_00106b57:
MOVZX EAX,byte ptr [RDX + RCX*0x1]
MOV byte ptr [R8 + RCX*0x1],AL
JMP 0x00106a1d
LAB_00106b64:
MOVZX R9D,word ptr [RDX + RCX*0x1]
MOV word ptr [R8 + RCX*0x1],R9W
ADD RCX,0x2
JMP 0x00106a15
LAB_00106b77:
MOV ECX,dword ptr [RDX]
MOV dword ptr [R8],ECX
MOV ECX,0x4
JMP 0x00106a0d
LAB_00106b86:
MOV R10D,EAX
XOR EDX,EDX
AND R10D,0xfffffff8
LAB_00106b8f:
MOV R8D,EDX
ADD EDX,0x8
MOV R9,qword ptr [RDI + R8*0x1]
MOV qword ptr [RCX + R8*0x1],R9
CMP EDX,R10D
JC 0x00106b8f
LEA R8,[RCX + RDX*0x1]
ADD RDX,RDI
JMP 0x00106a03
LAB_00106bb0:
MOV ESI,0xf
JMP 0x0010650e
LAB_00106bc0:
MOV ESI,0xf
JMP 0x001063c5
LAB_00106bca:
MOV R10D,R8D
XOR EDX,EDX
MOV RBX,R15
AND R10D,0xfffffff8
LAB_00106bd6:
MOV EDI,EDX
ADD EDX,0x8
MOV R9,qword ptr [RCX + RDI*0x1]
MOV qword ptr [RSI + RDI*0x1],R9
CMP EDX,R10D
JC 0x00106bd6
LEA R9,[RSI + RDX*0x1]
MOV R15,RBX
ADD RDX,RCX
JMP 0x00106954
LAB_00106bf7:
MOV R10D,R8D
XOR EDX,EDX
AND R10D,0xfffffff8
LAB_00106c00:
MOV EDI,EDX
ADD EDX,0x8
MOV R9,qword ptr [RCX + RDI*0x1]
MOV qword ptr [RSI + RDI*0x1],R9
CMP EDX,R10D
JC 0x00106c00
LEA R9,[RSI + RDX*0x1]
ADD RDX,RCX
JMP 0x001068e4
LAB_00106c1e:
MOV EBX,0x1
JMP 0x00106179
LAB_00106c28:
MOV EBX,0x1
JMP 0x00105f09
LAB_00106c32:
MOV EBX,0x2
JMP 0x00105f09
LAB_00106c3c:
MOV EBX,0x2
JMP 0x00106179
LAB_00106c46:
MOV EBX,0x3
JMP 0x00106179
LAB_00106c50:
MOV EBX,0x4
JMP 0x00106179
LAB_00106c5a:
MOV EBX,0x4
JMP 0x00105f09
LAB_00106c64:
MOV EBX,0x3
JMP 0x00105f09
LAB_00106c6e:
MOV ESI,dword ptr [RDX + 0x10]
MOV EAX,EAX
MOV dword ptr [R12 + 0x10],ESI
MOV ESI,dword ptr [RDI + RAX*0x1 + -0x4]
MOV dword ptr [RCX + RAX*0x1 + -0x4],ESI
MOV RSI,qword ptr [RDX + 0x8]
JMP 0x0010656f
LAB_00106c89:
MOV EAX,EAX
MOVZX ESI,word ptr [RDI + RAX*0x1 + -0x2]
MOV word ptr [RCX + RAX*0x1 + -0x2],SI
MOV RSI,qword ptr [RDX + 0x8]
JMP 0x0010656f
LAB_00106c9e:
CALL 0x001045d0
LAB_00106ca3:
MOV RAX,qword ptr [RBP + -0x38]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x00106d0c
LEA RDI,[0x11a705]
LEA RBX,[RBP + -0x2c0]
LAB_00106cc0:
CALL 0x001044b0
LAB_00106cc5:
MOV RAX,qword ptr [RBP + -0x38]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x00106d11
LEA RAX,[RBP + -0x2e0]
LEA RDI,[0x11a705]
MOV R15,RAX
LAB_00106ce5:
CALL 0x001044b0
LAB_00106cea:
MOV RAX,qword ptr [RBP + -0x38]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x00106d16
LEA RDI,[0x11a705]
LEA RBX,[RBP + -0x320]
LAB_00106d07:
CALL 0x001044b0
LAB_00106d0c:
CALL 0x001045d0
LAB_00106d11:
CALL 0x001045d0
LAB_00106d16:
CALL 0x001045d0 | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(std::string const&) */
string * func0(string *param_1)
{
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
ulong *puVar2;
int *__src;
int auVar3 [16];
int auVar4 [16];
int8 uVar5;
int8 uVar6;
bool bVar7;
char cVar8;
long lVar9;
ulong uVar10;
long *plVar11;
long *plVar12;
string *psVar13;
uint uVar14;
ulong uVar15;
ulong uVar16;
long *plVar17;
ulong *puVar18;
int iVar19;
int iVar20;
uint uVar21;
int8 *in_RSI;
long *plVar22;
ulong *puVar23;
char *pcVar24;
long in_FS_OFFSET;
ulong *local_3d0;
ulong local_3a0;
ulong local_390;
int4 local_388 [2];
locale local_380 [2];
int local_378 [16];
int local_368 [16];
int local_358 [16];
long *local_348;
ulong local_340;
long local_338 [2];
ulong *local_328;
long local_320;
ulong local_318 [2];
ulong *local_308;
ulong local_300;
ulong local_2f8 [2];
long *local_2e8;
long local_2e0;
long local_2d8 [2];
ulong *local_2c8;
long local_2c0;
ulong local_2b8 [2];
ulong *local_2a8;
ulong local_2a0;
ulong local_298 [24];
long *local_1d8;
long local_1c8 [4];
int local_1a8 [16];
long *local_198;
long local_188 [2];
_Deque_base<std::__detail::_StateSeq<std::regex_traits<char>>,std::allocator<std::__detail::_StateSeq<std::regex_traits<char>>>>
local_178 [96];
int8 local_118;
int8 uStack_110;
int8 local_108;
int8 uStack_100;
int8 local_f8;
int8 uStack_f0;
int8 local_e8;
int8 uStack_e0;
int8 local_d8;
int8 uStack_d0;
int8 local_c8;
int8 uStack_c0;
int8 local_b8;
int8 uStack_b0;
int8 local_a8;
int8 uStack_a0;
int8 local_98;
int8 uStack_90;
int8 local_88;
int8 uStack_80;
int8 local_78;
int8 uStack_70;
int8 local_68;
int uStack_60;
int7 uStack_5f;
char cStack_58;
char acStack_57 [23];
long local_40;
local_1a8._8_8_ = local_1a8._0_8_;
local_40 = *(long *)(in_FS_OFFSET + 0x28);
std::locale::locale(local_380);
local_378 = (int [16])0x0;
/* try { // try from 00105c75 to 00105c79 has its CatchHandler @ 00106d57 */
std::__detail::_Compiler<std::regex_traits<char>>::_Compiler
((_Compiler<std::regex_traits<char>> *)&local_2a8,"\\w+ly","",local_380,0x10);
uVar6 = local_1a8._8_8_;
uVar5 = local_378._8_8_;
local_1a8 = (int [16])0x0;
local_378._8_8_ = uVar6;
if ((_Sp_counted_base<(_Lock_policy)2> *)uVar5 != (_Sp_counted_base<(_Lock_policy)2> *)0x0) {
p_Var1 = (_Sp_counted_base<(_Lock_policy)2> *)(uVar5 + 8);
if (*(long *)(uVar5 + 8) == 0x100000001) {
*(int8 *)(uVar5 + 8) = 0;
(**(code **)(*(long *)uVar5 + 0x10))();
(**(code **)(*(long *)uVar5 + 0x18))(uVar5);
}
else {
if (__libc_single_threaded == '\0') {
LOCK();
iVar20 = *(int *)p_Var1;
*(int *)p_Var1 = *(int *)p_Var1 + -1;
UNLOCK();
}
else {
iVar20 = *(int *)(uVar5 + 8);
*(int *)(uVar5 + 8) = iVar20 + -1;
}
if (iVar20 == 1) {
std::_Sp_counted_base<(_Lock_policy)2>::_M_release_last_use_cold
((_Sp_counted_base<(_Lock_policy)2> *)uVar5);
}
}
}
local_388[0] = 0x10;
std::
_Deque_base<std::__detail::_StateSeq<std::regex_traits<char>>,std::allocator<std::__detail::_StateSeq<std::regex_traits<char>>>>
::~_Deque_base(local_178);
if (local_198 != local_188) {
operator_delete(local_198,local_188[0] + 1);
}
uVar5 = local_1a8._8_8_;
if ((_Sp_counted_base<(_Lock_policy)2> *)local_1a8._8_8_ !=
(_Sp_counted_base<(_Lock_policy)2> *)0x0) {
p_Var1 = (_Sp_counted_base<(_Lock_policy)2> *)(local_1a8._8_8_ + 8);
if (*(long *)(local_1a8._8_8_ + 8) == 0x100000001) {
*(int8 *)(local_1a8._8_8_ + 8) = 0;
(**(code **)(*(long *)local_1a8._8_8_ + 0x10))();
(**(code **)(*(long *)uVar5 + 0x18))(uVar5);
}
else {
if (__libc_single_threaded == '\0') {
LOCK();
iVar20 = *(int *)p_Var1;
*(int *)p_Var1 = *(int *)p_Var1 + -1;
UNLOCK();
}
else {
iVar20 = *(int *)(local_1a8._8_8_ + 8);
*(int *)(local_1a8._8_8_ + 8) = iVar20 + -1;
}
if (iVar20 == 1) {
std::_Sp_counted_base<(_Lock_policy)2>::_M_release_last_use_cold
((_Sp_counted_base<(_Lock_policy)2> *)local_1a8._8_8_);
}
}
}
if (local_1d8 != local_1c8) {
operator_delete(local_1d8,local_1c8[0] + 1);
}
local_368 = (int [16])0x0;
local_358 = (int [16])0x0;
/* try { // try from 00105dc9 to 00105dcd has its CatchHandler @ 00106d4b */
bVar7 = std::__detail::
__regex_algo_impl<__normal_iterator<char_const*,std::string>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::string>>>,char,std::regex_traits<char>>
((__normal_iterator)*in_RSI,(int)in_RSI[1] + (__normal_iterator)*in_RSI,
(match_results *)local_368,(regex *)local_388,0,0,false);
if (!bVar7) {
param_1[0x10] = (string)0x0;
*(string **)param_1 = param_1 + 0x10;
*(int8 *)(param_1 + 8) = 0;
goto LAB_00106628;
}
if ((local_368._8_8_ == local_368._0_8_) || (local_368._8_8_ - local_368._0_8_ == 0x48)) {
plVar11 = (long *)(local_368._0_8_ + (local_368._8_8_ - local_368._0_8_) + -0x48);
if (*(char *)(plVar11 + 2) != '\0') goto LAB_001066cf;
LAB_00105e0e:
local_2a8 = local_298;
local_298[0] = (ulong)local_298[0]._1_7_ << 8;
local_2a0 = 0;
}
else {
plVar11 = (long *)local_368._0_8_;
if (*(char *)(local_368._0_8_ + 0x10) == '\0') goto LAB_00105e0e;
LAB_001066cf:
__src = (int *)*plVar11;
local_2a8 = local_298;
local_2a0 = 0;
uVar15 = plVar11[1] - (long)__src;
local_390 = uVar15;
if (uVar15 < 0x10) {
if (uVar15 == 1) {
local_298[0] = CONCAT71(local_298[0]._1_7_,*__src);
}
else if (uVar15 != 0) goto LAB_00106a69;
}
else {
/* try { // try from 00106a4c to 00106a50 has its CatchHandler @ 00106d4b */
local_2a8 = (ulong *)std::string::_M_create((ulong *)&local_2a8,(ulong)&local_390);
local_298[0] = local_390;
LAB_00106a69:
memcpy(local_2a8,__src,uVar15);
}
*(int *)((long)local_2a8 + local_390) = 0;
local_2a0 = local_390;
}
local_3d0 = local_298;
if (local_368._8_8_ == local_368._0_8_) {
uVar15 = *(long *)(local_368._0_8_ + -0x48) - local_358._8_8_;
LAB_0010674f:
plVar11 = (long *)(local_368._0_8_ + (local_368._8_8_ - local_368._0_8_) + -0x48);
cVar8 = *(char *)(plVar11 + 2);
}
else {
uVar15 = *(long *)local_368._0_8_ - local_358._8_8_;
if (local_368._8_8_ - local_368._0_8_ == 0x48) goto LAB_0010674f;
cVar8 = *(char *)(local_368._0_8_ + 0x10);
plVar11 = (long *)local_368._0_8_;
}
if (cVar8 != '\0') {
uVar15 = uVar15 + (plVar11[1] - *plVar11);
}
uVar10 = uVar15;
if ((long)uVar15 < 1) {
uVar10 = -uVar15;
}
if (uVar10 < 10) {
iVar20 = 1;
}
else if (uVar10 < 100) {
iVar20 = 2;
}
else if (uVar10 < 1000) {
iVar20 = 3;
}
else if (uVar10 < 10000) {
iVar20 = 4;
}
else {
uVar16 = uVar10;
iVar20 = 1;
do {
iVar19 = iVar20;
iVar20 = iVar19 + 4;
if (uVar16 < 100000) goto LAB_00105f09;
if (uVar16 < 1000000) {
iVar20 = iVar19 + 5;
goto LAB_00105f09;
}
if (uVar16 < 10000000) {
iVar20 = iVar19 + 6;
goto LAB_00105f09;
}
bVar7 = 99999999 < uVar16;
uVar16 = uVar16 / 10000;
} while (bVar7);
iVar20 = iVar19 + 7;
}
LAB_00105f09:
local_308 = local_2f8;
/* try { // try from 00105f35 to 00105f39 has its CatchHandler @ 00106d6f */
std::string::_M_construct((ulong)&local_308,(char)iVar20 - (char)((long)uVar15 >> 0x3f));
uVar21 = iVar20 - 1;
pcVar24 = (char *)((long)local_308 - ((long)uVar15 >> 0x3f));
local_118 = _DAT_0011b1f0;
uStack_110 = _UNK_0011b1f8;
local_108 = _DAT_0011b200;
uStack_100 = _UNK_0011b208;
local_f8 = _DAT_0011b210;
uStack_f0 = _UNK_0011b218;
local_e8 = _DAT_0011b220;
uStack_e0 = _UNK_0011b228;
local_d8 = _DAT_0011b230;
uStack_d0 = _UNK_0011b238;
local_c8 = _DAT_0011b240;
uStack_c0 = _UNK_0011b248;
local_b8 = _DAT_0011b250;
uStack_b0 = _UNK_0011b258;
local_a8 = _DAT_0011b260;
uStack_a0 = _UNK_0011b268;
local_98 = _DAT_0011b270;
uStack_90 = _UNK_0011b278;
local_88 = _DAT_0011b280;
uStack_80 = _UNK_0011b288;
local_78 = _DAT_0011b290;
uStack_70 = _UNK_0011b298;
local_68 = _DAT_0011b2a0;
uStack_60 = (int)_UNK_0011b2a8;
uStack_5f = (int7)s_293949596979899_0011b2b0._0_8_;
cStack_58 = SUB81(s_293949596979899_0011b2b0._0_8_,7);
acStack_57[0] = s_293949596979899_0011b2b0[8];
acStack_57[1] = s_293949596979899_0011b2b0[9];
acStack_57[2] = s_293949596979899_0011b2b0[10];
acStack_57[3] = s_293949596979899_0011b2b0[0xb];
acStack_57[4] = s_293949596979899_0011b2b0[0xc];
acStack_57[5] = s_293949596979899_0011b2b0[0xd];
acStack_57[6] = s_293949596979899_0011b2b0[0xe];
acStack_57[7] = s_293949596979899_0011b2b0[0xf];
local_3a0 = uVar10;
if (99 < uVar10) {
do {
auVar3._8_8_ = 0;
auVar3._0_8_ = uVar10 >> 2;
local_3a0 = (uVar10 >> 2) / 0x19;
lVar9 = (uVar10 + ((SUB168(auVar3 * ZEXT816(0x28f5c28f5c28f5c3),8) & 0xfffffffffffffffc) +
local_3a0) * -0x14) * 2;
cVar8 = *(char *)((long)&local_118 + lVar9);
pcVar24[uVar21] = *(char *)((long)&local_118 + lVar9 + 1);
uVar14 = uVar21 - 1;
uVar21 = uVar21 - 2;
pcVar24[uVar14] = cVar8;
bVar7 = 9999 < uVar10;
uVar10 = local_3a0;
} while (bVar7);
}
cVar8 = (char)local_3a0 + '0';
if (9 < local_3a0) {
pcVar24[1] = *(char *)((long)&local_118 + local_3a0 * 2 + 1);
cVar8 = *(char *)((long)&local_118 + local_3a0 * 2);
}
*pcVar24 = cVar8;
if (local_368._8_8_ == local_368._0_8_) {
lVar9 = 0;
LAB_001060c6:
plVar11 = (long *)(local_368._0_8_ + lVar9 + -0x48);
}
else {
lVar9 = local_368._8_8_ - local_368._0_8_;
plVar11 = (long *)local_368._0_8_;
if (lVar9 == 0x48) goto LAB_001060c6;
}
uVar10 = *plVar11 - local_358._8_8_;
uVar15 = uVar10;
if ((long)uVar10 < 1) {
uVar15 = -uVar10;
}
if (uVar15 < 10) {
iVar20 = 1;
}
else if (uVar15 < 100) {
iVar20 = 2;
}
else if (uVar15 < 1000) {
iVar20 = 3;
}
else if (uVar15 < 10000) {
iVar20 = 4;
}
else {
uVar16 = uVar15;
iVar20 = 1;
do {
iVar19 = iVar20;
iVar20 = iVar19 + 4;
if (uVar16 < 100000) goto LAB_00106179;
if (uVar16 < 1000000) {
iVar20 = iVar19 + 5;
goto LAB_00106179;
}
if (uVar16 < 10000000) {
iVar20 = iVar19 + 6;
goto LAB_00106179;
}
bVar7 = 99999999 < uVar16;
uVar16 = uVar16 / 10000;
} while (bVar7);
iVar20 = iVar19 + 7;
}
LAB_00106179:
local_348 = local_338;
/* try { // try from 001061a5 to 001061a9 has its CatchHandler @ 00106d33 */
std::string::_M_construct((ulong)&local_348,(char)iVar20 - (char)((long)uVar10 >> 0x3f));
uVar21 = iVar20 - 1;
pcVar24 = (char *)((long)local_348 - ((long)uVar10 >> 0x3f));
local_118 = _DAT_0011b1f0;
uStack_110 = _UNK_0011b1f8;
local_108 = _DAT_0011b200;
uStack_100 = _UNK_0011b208;
local_f8 = _DAT_0011b210;
uStack_f0 = _UNK_0011b218;
local_e8 = _DAT_0011b220;
uStack_e0 = _UNK_0011b228;
local_d8 = _DAT_0011b230;
uStack_d0 = _UNK_0011b238;
local_c8 = _DAT_0011b240;
uStack_c0 = _UNK_0011b248;
local_b8 = _DAT_0011b250;
uStack_b0 = _UNK_0011b258;
local_a8 = _DAT_0011b260;
uStack_a0 = _UNK_0011b268;
local_98 = _DAT_0011b270;
uStack_90 = _UNK_0011b278;
local_88 = _DAT_0011b280;
uStack_80 = _UNK_0011b288;
local_78 = _DAT_0011b290;
uStack_70 = _UNK_0011b298;
local_68 = _DAT_0011b2a0;
uStack_60 = (int)_UNK_0011b2a8;
uStack_5f = (int7)s_293949596979899_0011b2b0._0_8_;
cStack_58 = SUB81(s_293949596979899_0011b2b0._0_8_,7);
acStack_57[0] = s_293949596979899_0011b2b0[8];
acStack_57[1] = s_293949596979899_0011b2b0[9];
acStack_57[2] = s_293949596979899_0011b2b0[10];
acStack_57[3] = s_293949596979899_0011b2b0[0xb];
acStack_57[4] = s_293949596979899_0011b2b0[0xc];
acStack_57[5] = s_293949596979899_0011b2b0[0xd];
acStack_57[6] = s_293949596979899_0011b2b0[0xe];
acStack_57[7] = s_293949596979899_0011b2b0[0xf];
local_3a0 = uVar15;
if (99 < uVar15) {
do {
auVar4._8_8_ = 0;
auVar4._0_8_ = uVar15 >> 2;
local_3a0 = (uVar15 >> 2) / 0x19;
lVar9 = (uVar15 + ((SUB168(auVar4 * ZEXT816(0x28f5c28f5c28f5c3),8) & 0xfffffffffffffffc) +
local_3a0) * -0x14) * 2;
cVar8 = *(char *)((long)&local_118 + lVar9);
pcVar24[uVar21] = *(char *)((long)&local_118 + lVar9 + 1);
uVar14 = uVar21 - 1;
uVar21 = uVar21 - 2;
pcVar24[uVar14] = cVar8;
bVar7 = 9999 < uVar15;
uVar15 = local_3a0;
} while (bVar7);
}
cVar8 = (char)local_3a0 + '0';
if (9 < local_3a0) {
pcVar24[1] = *(char *)((long)&local_118 + local_3a0 * 2 + 1);
cVar8 = *(char *)((long)&local_118 + local_3a0 * 2);
}
*pcVar24 = cVar8;
/* try { // try from 00106331 to 00106335 has its CatchHandler @ 00106d3f */
plVar11 = (long *)std::string::_M_replace_aux((ulong)&local_348,local_340,0,'\x01');
puVar2 = (ulong *)(plVar11 + 2);
local_320 = plVar11[1];
if ((ulong *)*plVar11 == puVar2) {
uVar15 = local_320 + 1;
puVar18 = puVar2;
puVar23 = local_318;
if (7 < (uint)uVar15) {
uVar10 = 0;
do {
uVar21 = (int)uVar10 + 8;
uVar16 = (ulong)uVar21;
*(int8 *)((long)local_318 + uVar10) = *(int8 *)((long)puVar2 + uVar10);
uVar10 = uVar16;
} while (uVar21 < ((uint)uVar15 & 0xfffffff8));
puVar23 = (ulong *)((long)local_318 + uVar16);
puVar18 = (ulong *)(uVar16 + (long)puVar2);
}
lVar9 = 0;
if ((uVar15 & 4) != 0) {
*(int4 *)puVar23 = *(int4 *)puVar18;
lVar9 = 4;
}
if ((uVar15 & 2) != 0) {
*(int2 *)((long)puVar23 + lVar9) = *(int2 *)((long)puVar18 + lVar9);
lVar9 = lVar9 + 2;
}
if ((uVar15 & 1) != 0) {
*(int *)((long)puVar23 + lVar9) = *(int *)((long)puVar18 + lVar9);
}
local_320 = plVar11[1];
local_328 = local_318;
}
else {
local_318[0] = plVar11[2];
local_328 = (ulong *)*plVar11;
}
*plVar11 = (long)puVar2;
plVar11[1] = 0;
*(int *)(plVar11 + 2) = 0;
uVar15 = local_320 + local_300;
uVar10 = local_2f8[0];
if (local_328 == local_318) {
if ((0xf < uVar15) && (local_308 != local_2f8)) goto LAB_001063c5;
LAB_001063d1:
if (0x3fffffffffffffffU - local_320 < local_300) {
if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {
/* WARNING: Subroutine does not return */
/* try { // try from 00106d07 to 00106d0b has its CatchHandler @ 00106d1b */
std::__throw_length_error("basic_string::append");
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
/* try { // try from 001063f4 to 001063f8 has its CatchHandler @ 00106d1b */
plVar12 = (long *)std::string::_M_append((char *)&local_328,(ulong)local_308);
local_2e8 = local_2d8;
plVar11 = plVar12 + 2;
local_2e0 = plVar12[1];
if ((long *)*plVar12 == plVar11) {
uVar15 = local_2e0 + 1;
plVar17 = plVar11;
plVar22 = local_2e8;
if (7 < (uint)uVar15) {
uVar10 = 0;
do {
uVar21 = (int)uVar10 + 8;
uVar16 = (ulong)uVar21;
*(int8 *)((long)local_2e8 + uVar10) = *(int8 *)((long)plVar11 + uVar10);
uVar10 = uVar16;
} while (uVar21 < ((uint)uVar15 & 0xfffffff8));
plVar22 = (long *)((long)local_2e8 + uVar16);
plVar17 = (long *)(uVar16 + (long)plVar11);
}
lVar9 = 0;
if ((uVar15 & 4) != 0) {
*(int4 *)plVar22 = *(int4 *)plVar17;
lVar9 = 4;
}
if ((uVar15 & 2) != 0) {
*(int2 *)((long)plVar22 + lVar9) = *(int2 *)((long)plVar17 + lVar9);
lVar9 = lVar9 + 2;
}
if ((uVar15 & 1) != 0) {
*(int *)((long)plVar22 + lVar9) = *(int *)((long)plVar17 + lVar9);
}
local_2e0 = plVar12[1];
}
else {
local_2d8[0] = plVar12[2];
local_2e8 = (long *)*plVar12;
}
*plVar12 = (long)plVar11;
plVar12[1] = 0;
*(int *)(plVar12 + 2) = 0;
}
else {
if (uVar15 <= local_318[0]) goto LAB_001063d1;
if (local_308 == local_2f8) {
uVar10 = 0xf;
}
LAB_001063c5:
if (uVar10 < uVar15) goto LAB_001063d1;
/* try { // try from 0010688a to 0010688e has its CatchHandler @ 00106d1b */
psVar13 = (string *)std::string::_M_replace((ulong)&local_308,0,(char *)0x0,(ulong)local_328);
std::string::string((string *)&local_2e8,psVar13);
}
if (0x3fffffffffffffffU - local_2e0 < 2) {
if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {
/* WARNING: Subroutine does not return */
/* try { // try from 00106ce5 to 00106ce9 has its CatchHandler @ 00106d27 */
std::__throw_length_error("basic_string::append");
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
/* try { // try from 0010647a to 0010647e has its CatchHandler @ 00106d27 */
plVar11 = (long *)std::string::_M_append((char *)&local_2e8,0x11a71a);
puVar2 = (ulong *)(plVar11 + 2);
local_2c0 = plVar11[1];
if ((ulong *)*plVar11 == puVar2) {
uVar15 = local_2c0 + 1;
puVar18 = puVar2;
puVar23 = local_2b8;
if (7 < (uint)uVar15) {
uVar10 = 0;
do {
uVar21 = (int)uVar10 + 8;
uVar16 = (ulong)uVar21;
*(int8 *)((long)local_2b8 + uVar10) = *(int8 *)((long)puVar2 + uVar10);
uVar10 = uVar16;
} while (uVar21 < ((uint)uVar15 & 0xfffffff8));
puVar23 = (ulong *)((long)local_2b8 + uVar16);
puVar18 = (ulong *)(uVar16 + (long)puVar2);
}
lVar9 = 0;
if ((uVar15 & 4) != 0) {
*(int4 *)puVar23 = *(int4 *)puVar18;
lVar9 = 4;
}
if ((uVar15 & 2) != 0) {
*(int2 *)((long)puVar23 + lVar9) = *(int2 *)((long)puVar18 + lVar9);
lVar9 = lVar9 + 2;
}
if ((uVar15 & 1) != 0) {
*(int *)((long)puVar23 + lVar9) = *(int *)((long)puVar18 + lVar9);
}
local_2c0 = plVar11[1];
local_2c8 = local_2b8;
}
else {
local_2b8[0] = plVar11[2];
local_2c8 = (ulong *)*plVar11;
}
*plVar11 = (long)puVar2;
plVar11[1] = 0;
*(int *)(plVar11 + 2) = 0;
uVar15 = local_2c0 + local_2a0;
uVar10 = local_298[0];
if (local_2c8 == local_2b8) {
if ((0xf < uVar15) && (local_2a8 != local_3d0)) goto LAB_0010650e;
LAB_0010651a:
if (0x3fffffffffffffffU - local_2c0 < local_2a0) {
if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {
/* WARNING: Subroutine does not return */
/* try { // try from 00106cc0 to 00106cc4 has its CatchHandler @ 00106d63 */
std::__throw_length_error("basic_string::append");
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
/* try { // try from 0010653d to 00106862 has its CatchHandler @ 00106d63 */
plVar12 = (long *)std::string::_M_append((char *)&local_2c8,(ulong)local_2a8);
*(string **)param_1 = param_1 + 0x10;
plVar11 = plVar12 + 2;
lVar9 = plVar12[1];
if ((long *)*plVar12 == plVar11) {
uVar15 = lVar9 + 1;
uVar21 = (uint)uVar15;
if (uVar21 < 8) {
if ((uVar15 & 4) == 0) {
if (uVar21 != 0) {
param_1[0x10] = *(string *)(plVar12 + 2);
if ((uVar15 & 2) == 0) goto LAB_001069de;
*(int2 *)(param_1 + (uVar15 & 0xffffffff) + 0xe) =
*(int2 *)((long)plVar12 + (uVar15 & 0xffffffff) + 0xe);
lVar9 = plVar12[1];
}
}
else {
*(int4 *)(param_1 + 0x10) = *(int4 *)(plVar12 + 2);
*(int4 *)(param_1 + (uVar15 & 0xffffffff) + 0xc) =
*(int4 *)((long)plVar12 + (uVar15 & 0xffffffff) + 0xc);
lVar9 = plVar12[1];
}
}
else {
*(long *)(param_1 + 0x10) = plVar12[2];
*(int8 *)(param_1 + (uVar15 & 0xffffffff) + 8) =
*(int8 *)((long)plVar12 + (uVar15 & 0xffffffff) + 8);
lVar9 = (long)(param_1 + 0x10) - ((ulong)(param_1 + 0x18) & 0xfffffffffffffff8);
uVar21 = uVar21 + (int)lVar9 & 0xfffffff8;
if (7 < uVar21) {
uVar14 = 0;
do {
uVar15 = (ulong)uVar14;
uVar14 = uVar14 + 8;
*(int8 *)(((ulong)(param_1 + 0x18) & 0xfffffffffffffff8) + uVar15) =
*(int8 *)((long)plVar11 + (uVar15 - lVar9));
} while (uVar14 < uVar21);
}
LAB_001069de:
lVar9 = plVar12[1];
}
}
else {
*(long *)param_1 = *plVar12;
*(long *)(param_1 + 0x10) = plVar12[2];
}
*(long *)(param_1 + 8) = lVar9;
*plVar12 = (long)plVar11;
plVar12[1] = 0;
*(int *)(plVar12 + 2) = 0;
}
else {
if (uVar15 <= local_2b8[0]) goto LAB_0010651a;
if (local_2a8 == local_3d0) {
uVar10 = 0xf;
}
LAB_0010650e:
if (uVar10 < uVar15) goto LAB_0010651a;
psVar13 = (string *)std::string::_M_replace((ulong)&local_2a8,0,(char *)0x0,(ulong)local_2c8);
std::string::string(param_1,psVar13);
}
std::string::_M_dispose();
if (local_2e8 != local_2d8) {
operator_delete(local_2e8,local_2d8[0] + 1);
}
std::string::_M_dispose();
if (local_348 != local_338) {
operator_delete(local_348,local_338[0] + 1);
}
if (local_308 != local_2f8) {
operator_delete(local_308,local_2f8[0] + 1);
}
std::string::_M_dispose();
LAB_00106628:
if ((void *)local_368._0_8_ != (void *)0x0) {
operator_delete((void *)local_368._0_8_,local_358._0_8_ - local_368._0_8_);
}
if ((_Sp_counted_base<(_Lock_policy)2> *)local_378._8_8_ !=
(_Sp_counted_base<(_Lock_policy)2> *)0x0) {
p_Var1 = (_Sp_counted_base<(_Lock_policy)2> *)(local_378._8_8_ + 8);
if (*(long *)(local_378._8_8_ + 8) == 0x100000001) {
*(int8 *)(local_378._8_8_ + 8) = 0;
(**(code **)(*(long *)local_378._8_8_ + 0x10))(local_378._8_8_);
(**(code **)(*(long *)local_378._8_8_ + 0x18))(local_378._8_8_);
}
else {
if (__libc_single_threaded == '\0') {
LOCK();
iVar20 = *(int *)p_Var1;
*(int *)p_Var1 = *(int *)p_Var1 + -1;
UNLOCK();
}
else {
iVar20 = *(int *)(local_378._8_8_ + 8);
*(int *)(local_378._8_8_ + 8) = iVar20 + -1;
}
if (iVar20 == 1) {
std::_Sp_counted_base<(_Lock_policy)2>::_M_release_last_use_cold
((_Sp_counted_base<(_Lock_policy)2> *)local_378._8_8_);
}
}
}
std::locale::~locale(local_380);
if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {
return param_1;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
} |
2,335 | func0 | #include <iostream>
#include <regex>
#include <assert.h>
| std::string func0(const std::string &text) {
std::regex word_regex("\\w+ly");
std::smatch match;
if (std::regex_search(text, match, word_regex)) {
return std::to_string(match.position(0)) + '-' + std::to_string(match.position(0) + match.length(0)) + ": " + match.str(0);
}
return "";
}
| int main() {
assert(func0("Clearly, he has no excuse for such behavior.") == "0-7: Clearly");
assert(func0("Please handle the situation carefuly") == "28-36: carefuly");
assert(func0("Complete the task quickly") == "18-25: quickly");
return 0;
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r15
mov %rsi,%r15
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x2b8,%rsp
mov %fs:0x28,%rax
mov %rax,0x2a8(%rsp)
xor %eax,%eax
lea 0x50(%rsp),%r14
lea 0x38(%rsp),%rbp
mov %r14,%rdi
lea 0x110(%rsp),%r13
callq 4810 <_ZNSt6localeC1Ev@plt>
mov %r14,%rsi
mov %rbp,%rdi
movl $0x10,0x30(%rsp)
callq 4570 <_ZNSt6localeC1ERKS_@plt>
mov 0x30(%rsp),%r8d
mov %rbp,%rcx
mov %r13,%rdi
lea 0x157f0(%rip),%rdx
lea -0x5(%rdx),%rsi
callq 19d10 <_ZNSt8__detail9_CompilerINSt7__cxx1112regex_traitsIcEEEC1EPKcS6_RKSt6localeNSt15regex_constants18syntax_option_typeE>
movdqa 0x210(%rsp),%xmm1
mov 0x240(%rsp),%rdi
pxor %xmm0,%xmm0
movaps %xmm0,0x210(%rsp)
movaps %xmm1,0x40(%rsp)
test %rdi,%rdi
je 589c <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0xec>
mov 0x288(%rsp),%rax
mov 0x268(%rsp),%rbx
add $0x8,%rax
cmp %rbx,%rax
jbe 5897 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0xe7>
mov %rbp,0x8(%rsp)
mov %rbx,%rbp
mov %rax,%rbx
nopl 0x0(%rax)
mov 0x0(%rbp),%rdi
add $0x8,%rbp
callq 4630 <_ZdlPv@plt>
cmp %rbp,%rbx
ja 5878 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0xc8>
mov 0x8(%rsp),%rbp
mov 0x240(%rsp),%rdi
callq 4630 <_ZdlPv@plt>
mov 0x220(%rsp),%rdi
lea 0x230(%rsp),%rax
cmp %rax,%rdi
je 58b6 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x106>
callq 4630 <_ZdlPv@plt>
mov 0x218(%rsp),%rbx
test %rbx,%rbx
je 58f0 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x140>
mov 0x1c6fe(%rip),%rax
test %rax,%rax
je 5d88 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x5d8>
mov $0xffffffff,%edx
lock xadd %edx,0x8(%rbx)
cmp $0x1,%edx
je 5d9a <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x5ea>
nopw %cs:0x0(%rax,%rax,1)
mov 0x1e0(%rsp),%rdi
lea 0x1f0(%rsp),%rax
cmp %rax,%rdi
je 590a <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x15a>
callq 4630 <_ZdlPv@plt>
mov %r14,%rdi
callq 4730 <_ZNSt6localeD1Ev@plt>
mov (%r15),%rdi
mov 0x8(%r15),%rsi
pxor %xmm0,%xmm0
lea 0x30(%rsp),%rax
xor %r8d,%r8d
mov %r14,%rdx
movaps %xmm0,0x50(%rsp)
add %rdi,%rsi
mov %rax,%rcx
mov %rax,0x18(%rsp)
movaps %xmm0,0x60(%rsp)
callq c1e0 <_ZNSt8__detail17__regex_algo_implIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS5_9sub_matchISB_EEEcNS5_12regex_traitsIcEELNS_20_RegexExecutorPolicyE0ELb0EEEbT_SI_RNS5_13match_resultsISI_T0_EERKNS5_11basic_regexIT1_T2_EENSt15regex_constants15match_flag_typeE>
mov 0x50(%rsp),%rdi
test %al,%al
je 5d00 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x550>
mov 0x58(%rsp),%rax
mov %rax,%rdx
sub %rdi,%rdx
cmp %rax,%rdi
je 5e48 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x698>
mov %rdi,%rcx
cmp $0x48,%rdx
je 5e48 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x698>
cmpb $0x0,0x10(%rcx)
jne 5e57 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x6a7>
lea 0x120(%rsp),%rbx
movb $0x0,0x120(%rsp)
mov 0x68(%rsp),%rcx
mov %rbx,0x8(%rsp)
mov %rbx,0x110(%rsp)
movq $0x0,0x118(%rsp)
cmp %rax,%rdi
je 5eca <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x71a>
mov (%rdi),%r8
sub %rcx,%r8
cmpb $0x0,0x10(%rdi)
je 59c7 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x217>
mov 0x8(%rdi),%rax
sub (%rdi),%rax
add %rax,%r8
mov 0x1c5f2(%rip),%r15
lea 0xb0(%rsp),%rbx
lea 0x15627(%rip),%rcx
xor %eax,%eax
mov $0x20,%edx
mov %rbx,%rdi
mov %r15,%rsi
callq 4c70 <_ZN9__gnu_cxx12__to_xstringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcEET_PFiPT0_mPKS8_P13__va_list_tagEmSB_z.constprop.0>
mov 0x58(%rsp),%rdx
mov 0x50(%rsp),%rax
mov %rdx,%rcx
sub %rax,%rcx
cmp %rax,%rdx
je 5e38 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x688>
cmp $0x48,%rcx
je 5e38 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x688>
lea 0x70(%rsp),%r14
mov (%rax),%r8
mov $0x20,%edx
mov %r15,%rsi
sub 0x68(%rsp),%r8
lea 0x155d6(%rip),%rcx
mov %r14,%rdi
xor %eax,%eax
callq 4c70 <_ZN9__gnu_cxx12__to_xstringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcEET_PFiPT0_mPKS8_P13__va_list_tagEmSB_z.constprop.0>
mov 0x78(%rsp),%rsi
mov $0x2d,%r8d
xor %edx,%edx
mov %r14,%rdi
mov $0x1,%ecx
callq 47e0 <_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE14_M_replace_auxEmmmc@plt>
lea 0xa0(%rsp),%r14
lea 0x10(%rax),%rdx
mov %r14,0x90(%rsp)
mov (%rax),%rcx
cmp %rdx,%rcx
je 5ef0 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x740>
mov %rcx,0x90(%rsp)
mov 0x10(%rax),%rcx
mov %rcx,0xa0(%rsp)
mov 0x8(%rax),%rcx
movb $0x0,0x10(%rax)
mov %rcx,0x98(%rsp)
mov %rdx,(%rax)
mov 0x90(%rsp),%r9
movq $0x0,0x8(%rax)
mov $0xf,%eax
mov 0x98(%rsp),%r8
mov 0xb8(%rsp),%rdx
cmp %r14,%r9
mov %rax,%rdi
cmovne 0xa0(%rsp),%rdi
mov 0xb0(%rsp),%rsi
lea (%r8,%rdx,1),%rcx
cmp %rdi,%rcx
jbe 5ed8 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x728>
lea 0xc0(%rsp),%rdi
cmp %rdi,%rsi
mov %rdi,0x10(%rsp)
cmovne 0xc0(%rsp),%rax
cmp %rax,%rcx
jbe 5f48 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x798>
lea 0x90(%rsp),%rdi
callq 4470 <_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm@plt>
lea 0xe0(%rsp),%r15
lea 0x10(%rax),%rdx
mov %r15,0xd0(%rsp)
mov (%rax),%rcx
cmp %rdx,%rcx
je 5f08 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x758>
mov %rcx,0xd0(%rsp)
mov 0x10(%rax),%rcx
mov %rcx,0xe0(%rsp)
mov 0x8(%rax),%rcx
movb $0x0,0x10(%rax)
mov %rcx,0xd8(%rsp)
movq $0x0,0x8(%rax)
mov %rdx,(%rax)
movabs $0x3fffffffffffffff,%rax
sub 0xd8(%rsp),%rax
cmp $0x1,%rax
jbe 5ff9 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x849>
lea 0xd0(%rsp),%rdi
mov $0x2,%edx
lea 0x15493(%rip),%rsi
callq 4470 <_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm@plt>
lea 0x100(%rsp),%rbx
lea 0x10(%rax),%rdx
mov %rbx,0xf0(%rsp)
mov (%rax),%rcx
cmp %rdx,%rcx
je 5f30 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x780>
mov %rcx,0xf0(%rsp)
mov 0x10(%rax),%rcx
mov %rcx,0x100(%rsp)
mov 0x8(%rax),%rcx
movb $0x0,0x10(%rax)
mov %rcx,0xf8(%rsp)
mov %rdx,(%rax)
mov 0xf0(%rsp),%r9
movq $0x0,0x8(%rax)
mov $0xf,%eax
mov 0xf8(%rsp),%r8
mov 0x118(%rsp),%rdx
cmp %rbx,%r9
mov %rax,%rdi
cmovne 0x100(%rsp),%rdi
mov 0x110(%rsp),%rsi
lea (%r8,%rdx,1),%rcx
cmp %rdi,%rcx
jbe 5c38 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x488>
cmp 0x8(%rsp),%rsi
cmovne 0x120(%rsp),%rax
cmp %rax,%rcx
jbe 5f60 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x7b0>
lea 0xf0(%rsp),%rdi
callq 4470 <_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm@plt>
lea 0x10(%r12),%rdx
mov %rdx,(%r12)
mov (%rax),%rcx
lea 0x10(%rax),%rdx
cmp %rdx,%rcx
je 5f20 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x770>
mov %rcx,(%r12)
mov 0x10(%rax),%rcx
mov %rcx,0x10(%r12)
mov 0x8(%rax),%rcx
mov %rdx,(%rax)
mov 0xf0(%rsp),%rdi
movq $0x0,0x8(%rax)
mov %rcx,0x8(%r12)
movb $0x0,0x10(%rax)
cmp %rbx,%rdi
je 5c95 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x4e5>
callq 4630 <_ZdlPv@plt>
mov 0xd0(%rsp),%rdi
cmp %r15,%rdi
je 5ca7 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x4f7>
callq 4630 <_ZdlPv@plt>
mov 0x90(%rsp),%rdi
cmp %r14,%rdi
je 5cb9 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x509>
callq 4630 <_ZdlPv@plt>
mov 0x70(%rsp),%rdi
lea 0x80(%rsp),%rax
cmp %rax,%rdi
je 5cd0 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x520>
callq 4630 <_ZdlPv@plt>
mov 0xb0(%rsp),%rdi
cmp 0x10(%rsp),%rdi
je 5ce4 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x534>
callq 4630 <_ZdlPv@plt>
mov 0x110(%rsp),%rdi
cmp 0x8(%rsp),%rdi
je 5cf8 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x548>
callq 4630 <_ZdlPv@plt>
mov 0x50(%rsp),%rdi
jmp 5d18 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x568>
lea 0x10(%r12),%rax
movb $0x0,0x10(%r12)
mov %rax,(%r12)
movq $0x0,0x8(%r12)
test %rdi,%rdi
je 5d22 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x572>
callq 4630 <_ZdlPv@plt>
mov 0x48(%rsp),%r13
test %r13,%r13
je 5d50 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x5a0>
mov 0x1c295(%rip),%rax
test %rax,%rax
je 5de0 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x630>
mov $0xffffffff,%edx
lock xadd %edx,0x8(%r13)
cmp $0x1,%edx
je 5df4 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x644>
mov %rbp,%rdi
callq 4730 <_ZNSt6localeD1Ev@plt>
mov 0x2a8(%rsp),%rax
xor %fs:0x28,%rax
jne 5ff4 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x844>
add $0x2b8,%rsp
mov %r12,%rax
pop %rbx
pop %rbp
pop %r12
pop %r13
pop %r14
pop %r15
retq
nopl 0x0(%rax)
mov 0x8(%rbx),%edx
lea -0x1(%rdx),%ecx
mov %ecx,0x8(%rbx)
cmp $0x1,%edx
jne 58f0 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x140>
mov (%rbx),%rdx
mov %rax,0x8(%rsp)
mov %rbx,%rdi
callq *0x10(%rdx)
mov 0x8(%rsp),%rax
test %rax,%rax
je 5f78 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x7c8>
mov $0xffffffff,%eax
lock xadd %eax,0xc(%rbx)
cmp $0x1,%eax
jne 58f0 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x140>
mov (%rbx),%rax
mov %rbx,%rdi
callq *0x18(%rax)
jmpq 58f0 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x140>
nopw 0x0(%rax,%rax,1)
mov 0x8(%r13),%edx
lea -0x1(%rdx),%ecx
mov %ecx,0x8(%r13)
cmp $0x1,%edx
jne 5d50 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x5a0>
mov 0x0(%r13),%rdx
mov %rax,0x8(%rsp)
mov %r13,%rdi
callq *0x10(%rdx)
mov 0x8(%rsp),%rax
test %rax,%rax
je 5f90 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x7e0>
mov $0xffffffff,%eax
lock xadd %eax,0xc(%r13)
cmp $0x1,%eax
jne 5d50 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x5a0>
mov 0x0(%r13),%rax
mov %r13,%rdi
callq *0x18(%rax)
jmpq 5d50 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x5a0>
nopl 0x0(%rax)
lea -0x48(%rax,%rcx,1),%rax
jmpq 5a12 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x262>
nopw 0x0(%rax,%rax,1)
lea -0x48(%rdi,%rdx,1),%rcx
cmpb $0x0,0x10(%rcx)
je 597a <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x1ca>
mov (%rcx),%r15
mov 0x8(%rcx),%r14
lea 0x120(%rsp),%rax
mov %rax,0x8(%rsp)
sub %r15,%r14
mov %rax,0x110(%rsp)
mov %r14,0x28(%rsp)
cmp $0xf,%r14
ja 5fb0 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x800>
cmp $0x1,%r14
jne 5fa0 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x7f0>
movzbl (%r15),%eax
mov %al,0x120(%rsp)
mov 0x8(%rsp),%rax
mov %r14,0x118(%rsp)
movb $0x0,(%rax,%r14,1)
mov 0x58(%rsp),%rax
mov 0x50(%rsp),%rdi
mov 0x68(%rsp),%rcx
mov %rax,%rdx
sub %rdi,%rdx
cmp %rax,%rdi
jne 59b1 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x201>
lea -0x48(%rdi,%rdx,1),%rdi
jmpq 59b1 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x201>
nopl 0x0(%rax)
lea 0xc0(%rsp),%rax
mov %rax,0x10(%rsp)
jmpq 5b04 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x354>
nopw 0x0(%rax,%rax,1)
movdqu 0x10(%rax),%xmm2
movaps %xmm2,0xa0(%rsp)
jmpq 5a86 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x2d6>
nopw 0x0(%rax,%rax,1)
movdqu 0x10(%rax),%xmm3
movaps %xmm3,0xe0(%rsp)
jmpq 5b45 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x395>
nopw 0x0(%rax,%rax,1)
movdqu 0x10(%rax),%xmm5
movups %xmm5,0x10(%r12)
jmpq 5c6b <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x4bb>
movdqu 0x10(%rax),%xmm4
movaps %xmm4,0x100(%rsp)
jmpq 5bc9 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x419>
nopw 0x0(%rax,%rax,1)
mov %r9,%rcx
xor %edx,%edx
xor %esi,%esi
mov %rbx,%rdi
callq 4760 <_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm@plt>
jmpq 5b11 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x361>
nopl 0x0(%rax)
mov %r9,%rcx
xor %edx,%edx
xor %esi,%esi
mov %r13,%rdi
callq 4760 <_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm@plt>
jmpq 5c45 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x495>
nopl 0x0(%rax)
mov 0xc(%rbx),%eax
lea -0x1(%rax),%edx
mov %edx,0xc(%rbx)
jmpq 5dc0 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x610>
nopw %cs:0x0(%rax,%rax,1)
mov 0xc(%r13),%eax
lea -0x1(%rax),%edx
mov %edx,0xc(%r13)
jmpq 5e1c <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x66c>
test %r14,%r14
je 5e9f <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x6ef>
mov 0x8(%rsp),%rdi
jmp 5fd7 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x827>
lea 0x28(%rsp),%rsi
xor %edx,%edx
mov %r13,%rdi
callq 47b0 <_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_createERmm@plt>
mov %rax,0x110(%rsp)
mov %rax,%rdi
mov 0x28(%rsp),%rax
mov %rax,0x120(%rsp)
mov %r14,%rdx
mov %r15,%rsi
callq 45f0 <memcpy@plt>
mov 0x28(%rsp),%r14
mov 0x110(%rsp),%rax
jmpq 5e9f <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x6ef>
callq 4690 <__stack_chk_fail@plt>
lea 0x1500e(%rip),%rdi
callq 4540 <_ZSt20__throw_length_errorPKc@plt>
endbr64
mov %rax,%rbp
jmpq 48a8 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE.cold+0x12>
endbr64
mov %rax,%rbp
jmpq 4896 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE.cold>
endbr64
mov %rax,%rbp
jmpq 48ba <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE.cold+0x24>
endbr64
mov %rax,%rbp
lea 0xc0(%rsp),%rax
mov %rax,0x10(%rsp)
jmpq 48e3 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE.cold+0x4d>
endbr64
mov %rax,%r12
jmpq 492c <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE.cold+0x96>
endbr64
mov %rax,%rbp
lea 0xc0(%rsp),%rax
mov %rax,0x10(%rsp)
jmpq 48cc <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE.cold+0x36>
endbr64
mov %rax,%rbp
jmpq 48f7 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE.cold+0x61>
endbr64
mov %rax,%rbp
jmpq 490b <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE.cold+0x75>
| _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r15
push r14
mov r14, rsi
push r13
lea r13, [rbp+var_378]
push r12
mov r12, rdi
mov rdi, r13; this
push rbx
sub rsp, 3A8h
mov rax, fs:28h
mov [rbp+var_38], rax
xor eax, eax
call __ZNSt6localeC1Ev; std::locale::locale(void)
lea rdx, aWLy+5; ""
pxor xmm0, xmm0
lea rdi, [rbp+var_2A0]
mov r8d, 10h
mov rcx, r13
lea rsi, [rdx-5]
mov [rbp+var_3A0], rdi
movaps xmmword ptr [rbp-370h], xmm0
call _ZNSt8__detail9_CompilerINSt7__cxx1112regex_traitsIcEEEC2EPKcS6_RKSt6localeNSt15regex_constants18syntax_option_typeE; std::__detail::_Compiler<std::regex_traits<char>>::_Compiler(char const*,char const*,std::locale const&,std::regex_constants::syntax_option_type)
movdqa xmm0, [rbp+var_1A0]
mov rdi, [rbp+var_368]
pxor xmm1, xmm1
movaps [rbp+var_1A0], xmm1
movaps xmmword ptr [rbp-370h], xmm0
test rdi, rdi
jz short loc_5D19
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_5D19:
mov rdi, [rbp+var_170]
mov [rbp+var_380], 10h
test rdi, rdi
jz short loc_5D81
mov rax, [rbp+var_128]
mov rbx, [rbp+var_148]
add rax, 8
cmp rbx, rax
jnb short loc_5D6D
mov r15, rax
nop dword ptr [rax+00000000h]
loc_5D50:
mov rdi, [rbx]; void *
mov esi, 1F8h; unsigned __int64
add rbx, 8
call __ZdlPvm; operator delete(void *,ulong)
cmp rbx, r15
jb short loc_5D50
mov rdi, [rbp+var_170]; void *
loc_5D6D:
mov rax, [rbp+var_168]
lea rsi, ds:0[rax*8]; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5D81:
lea rdi, [rbp+var_190]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv; std::string::_M_dispose(void)
mov rdi, qword ptr [rbp+var_1A0+8]
test rdi, rdi
jz short loc_5D9E
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_5D9E:
lea rdi, [rbp+var_1D0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv; std::string::_M_dispose(void)
pxor xmm0, xmm0
sub rsp, 8
mov rdi, [r14]
lea rax, [rbp+var_380]
mov rsi, [r14+8]
xor r9d, r9d
xor r8d, r8d
mov [rbp+var_3B8], rax
lea r14, [rbp+var_360]
mov rcx, rax
movaps [rbp+var_360], xmm0
add rsi, rdi
mov rdx, r14
movaps [rbp+var_350], xmm0
push 0
call _ZNSt8__detail17__regex_algo_implIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS5_9sub_matchISB_EEEcNS5_12regex_traitsIcEEEEbT_SH_RNS5_13match_resultsISH_T0_EERKNS5_11basic_regexIT1_T2_EENSt15regex_constants15match_flag_typeENS_20_RegexExecutorPolicyEb; std::__detail::__regex_algo_impl<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>> &,std::basic_regex<char,std::regex_traits<char>> const&,std::regex_constants::match_flag_type,std::__detail::_RegexExecutorPolicy,bool)
pop rdx
pop rcx
test al, al
jz loc_65B8
mov rdx, qword ptr [rbp+var_360+8]
mov rax, qword ptr [rbp+var_360]
mov rcx, rdx
sub rcx, rax
cmp rdx, rax
jz loc_6528
mov rsi, rax
cmp rcx, 48h ; 'H'
jz loc_6528
cmp byte ptr [rsi+10h], 0
jnz loc_6537
loc_5E30:
lea rbx, [rbp+var_290]
mov byte ptr [rbp+var_290], 0
mov [rbp+var_3C0], rbx
mov [rbp+var_2A0], rbx
mov [rbp+var_298], 0
loc_5E57:
mov rsi, qword ptr [rbp+var_350+8]
cmp rdx, rax
jz loc_6500
mov rdx, [rax]
sub rdx, rsi
cmp rcx, 48h ; 'H'
jz loc_6507
cmp byte ptr [rax+10h], 0
jnz loc_6516
loc_5E81:
mov r15, rdx
mov rax, rdx
shr r15, 3Fh
neg rax
cmovns rdx, rax
mov [rbp+var_398], rdx
cmp rdx, 9
jbe loc_6781
cmp rdx, 63h ; 'c'
jbe loc_678B
cmp rdx, 3E7h
jbe loc_67A9
cmp rdx, 270Fh
jbe loc_679F
mov ebx, 1
mov rdi, rdx
mov rsi, 346DC5D63886594Bh
jmp short loc_5F07
loc_5EE0:
cmp rcx, 0F423Fh
jbe loc_6640
cmp rcx, 98967Fh
jbe loc_6680
cmp rcx, 5F5E0FFh
jbe loc_66B0
loc_5F07:
mov rax, rdx
mov rcx, rdx
mul rsi
mov eax, ebx
add ebx, 4
shr rdx, 0Bh
cmp rcx, 1869Fh
ja short loc_5EE0
mov [rbp+var_398], rdi
loc_5F29:
lea rax, [rbp+var_2F0]
lea esi, [rbx+r15]
mov edx, 2Dh ; '-'
lea rdi, [rbp+var_300]
mov [rbp+var_3C8], rax
mov [rbp+var_3B0], rdi
mov [rbp+var_300], rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char)
movdqa xmm0, cs:xmmword_1C210
mov rax, [rbp+var_398]
sub ebx, 1
add r15, [rbp+var_300]
movaps [rbp+var_110], xmm0
movdqa xmm0, cs:xmmword_1C220
movaps [rbp+var_100], xmm0
movdqa xmm0, cs:xmmword_1C230
movaps [rbp+var_F0], xmm0
movdqa xmm0, cs:xmmword_1C240
movaps [rbp+var_E0], xmm0
movdqa xmm0, cs:xmmword_1C250
movaps [rbp+var_D0], xmm0
movdqa xmm0, cs:xmmword_1C260
movaps [rbp+var_C0], xmm0
movdqa xmm0, cs:xmmword_1C270
movaps [rbp+var_B0], xmm0
movdqa xmm0, cs:xmmword_1C280
movaps [rbp+var_A0], xmm0
movdqa xmm0, cs:xmmword_1C290
movaps [rbp+var_90], xmm0
movdqa xmm0, cs:xmmword_1C2A0
movaps [rbp+var_80], xmm0
movdqa xmm0, cs:xmmword_1C2B0
movaps [rbp+var_70], xmm0
movdqa xmm0, cs:xmmword_1C2C0
movaps [rbp+var_60], xmm0
movdqa xmm0, cs:xmmword_1C2D0
movups [rbp+var_60+9], xmm0
cmp rax, 63h ; 'c'
jbe short loc_609A
mov rcx, 28F5C28F5C28F5C3h
mov r11, rax
nop dword ptr [rax]
loc_6038:
mov rdx, r11
shr rdx, 2
mov rax, rdx
mul rcx
mov rax, r11
mov rsi, rdx
and rdx, 0FFFFFFFFFFFFFFFCh
shr rsi, 2
add rdx, rsi
lea rdx, [rdx+rdx*4]
shl rdx, 2
sub rax, rdx
mov rdx, r11
mov r11, rsi
mov esi, ebx
add rax, rax
movzx edi, byte ptr [rbp+rax+var_110+1]
movzx eax, byte ptr [rbp+rax+var_110]
mov [r15+rsi], dil
lea esi, [rbx-1]
sub ebx, 2
mov [r15+rsi], al
cmp rdx, 270Fh
ja short loc_6038
mov [rbp+var_398], r11
loc_609A:
mov rcx, [rbp+var_398]
mov eax, ecx
add eax, 30h ; '0'
cmp rcx, 9
jbe short loc_60C3
add rcx, rcx
movzx eax, byte ptr [rbp+rcx+var_110+1]
mov [r15+1], al
movzx eax, byte ptr [rbp+rcx+var_110]
loc_60C3:
mov [r15], al
mov rax, qword ptr [rbp+var_360+8]
mov rdx, qword ptr [rbp+var_360]
cmp rax, rdx
jz loc_6620
sub rax, rdx
cmp rax, 48h ; 'H'
jnz short loc_60EB
loc_60E6:
lea rdx, [rdx+rax-48h]
loc_60EB:
mov rax, [rdx]
sub rax, qword ptr [rbp+var_350+8]
mov r15, rax
mov rbx, rax
shr r15, 3Fh
neg rbx
cmovns rax, rbx
mov [rbp+var_398], rax
cmp rax, 9
jbe loc_6777
cmp rax, 63h ; 'c'
jbe loc_6795
cmp rax, 3E7h
jbe loc_67BD
cmp rax, 270Fh
jbe loc_67B3
mov rdx, rax
mov ebx, 1
mov rdi, rax
mov rsi, 346DC5D63886594Bh
jmp short loc_6177
loc_6150:
cmp rcx, 0F423Fh
jbe loc_6630
cmp rcx, 98967Fh
jbe loc_6690
cmp rcx, 5F5E0FFh
jbe loc_66A0
loc_6177:
mov rax, rdx
mov rcx, rdx
mul rsi
mov eax, ebx
add ebx, 4
shr rdx, 0Bh
cmp rcx, 1869Fh
ja short loc_6150
mov [rbp+var_398], rdi
loc_6199:
lea rdi, [rbp+var_340]
lea esi, [rbx+r15]
mov edx, 2Dh ; '-'
lea rax, [rbp+var_330]
mov [rbp+var_3A8], rdi
mov [rbp+var_340], rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char)
movdqa xmm0, cs:xmmword_1C210
mov rax, [rbp+var_398]
sub ebx, 1
add r15, [rbp+var_340]
movaps [rbp+var_110], xmm0
movdqa xmm0, cs:xmmword_1C220
movaps [rbp+var_100], xmm0
movdqa xmm0, cs:xmmword_1C230
movaps [rbp+var_F0], xmm0
movdqa xmm0, cs:xmmword_1C240
movaps [rbp+var_E0], xmm0
movdqa xmm0, cs:xmmword_1C250
movaps [rbp+var_D0], xmm0
movdqa xmm0, cs:xmmword_1C260
movaps [rbp+var_C0], xmm0
movdqa xmm0, cs:xmmword_1C270
movaps [rbp+var_B0], xmm0
movdqa xmm0, cs:xmmword_1C280
movaps [rbp+var_A0], xmm0
movdqa xmm0, cs:xmmword_1C290
movaps [rbp+var_90], xmm0
movdqa xmm0, cs:xmmword_1C2A0
movaps [rbp+var_80], xmm0
movdqa xmm0, cs:xmmword_1C2B0
movaps [rbp+var_70], xmm0
movdqa xmm0, cs:xmmword_1C2C0
movaps [rbp+var_60], xmm0
movdqa xmm0, cs:xmmword_1C2D0
movups [rbp+var_60+9], xmm0
cmp rax, 63h ; 'c'
jbe short loc_6302
mov rcx, 28F5C28F5C28F5C3h
mov r10, rax
xchg ax, ax
loc_62A0:
mov rdx, r10
shr rdx, 2
mov rax, rdx
mul rcx
mov rax, r10
mov rsi, rdx
and rdx, 0FFFFFFFFFFFFFFFCh
shr rsi, 2
add rdx, rsi
lea rdx, [rdx+rdx*4]
shl rdx, 2
sub rax, rdx
mov rdx, r10
mov r10, rsi
mov esi, ebx
add rax, rax
movzx edi, byte ptr [rbp+rax+var_110+1]
movzx eax, byte ptr [rbp+rax+var_110]
mov [r15+rsi], dil
lea esi, [rbx-1]
sub ebx, 2
mov [r15+rsi], al
cmp rdx, 270Fh
ja short loc_62A0
mov [rbp+var_398], r10
loc_6302:
mov rcx, [rbp+var_398]
mov eax, ecx
add eax, 30h ; '0'
cmp rcx, 9
jbe short loc_632B
add rcx, rcx
movzx eax, byte ptr [rbp+rcx+var_110+1]
mov [r15+1], al
movzx eax, byte ptr [rbp+rcx+var_110]
loc_632B:
mov [r15], al
mov r8d, 2Dh ; '-'
mov ecx, 1
xor edx, edx
mov rsi, [rbp+var_338]
mov rdi, [rbp+var_3A8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE14_M_replace_auxEmmmc; std::string::_M_replace_aux(ulong,ulong,ulong,char)
lea r15, [rbp+var_320]
mov rsi, rax
mov rdi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EOS4_; std::string::basic_string(std::string&&)
mov rcx, [rbp+var_320]
lea rsi, [rbp+var_310]
mov r8, [rbp+var_318]
mov rdx, [rbp+var_2F8]
cmp rcx, rsi
mov rsi, [rbp+var_300]
lea rax, [r8+rdx]
jz loc_66C0
cmp [rbp+var_310], rax
jnb short loc_63B9
mov rbx, [rbp+var_3C8]
cmp rsi, rbx
jz loc_6763
loc_63A9:
mov rdi, [rbp+var_2F0]
loc_63B0:
cmp rdi, rax
jnb loc_6650
loc_63B9:
mov rax, 3FFFFFFFFFFFFFFFh
sub rax, r8
cmp rax, rdx
jb loc_6802
mov rdi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
loc_63D7:
lea rbx, [rbp+var_2E0]
mov rsi, rax
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EOS4_; std::string::basic_string(std::string&&)
mov rax, 3FFFFFFFFFFFFFFFh
sub rax, [rbp+var_2D8]
cmp rax, 1
jbe loc_67E7
mov edx, 2
lea rsi, asc_1B75F; ": "
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rsi, rax
lea rax, [rbp+var_2C0]
mov rdi, rax
mov [rbp+var_398], rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EOS4_; std::string::basic_string(std::string&&)
mov rcx, [rbp+var_2C0]
lea rsi, [rbp+var_2B0]
mov r8, [rbp+var_2B8]
mov rdx, [rbp+var_298]
cmp rcx, rsi
mov rsi, [rbp+var_2A0]
lea rax, [r8+rdx]
jz loc_66E0
cmp [rbp+var_2B0], rax
jnb short loc_648A
mov rdi, [rbp+var_3C0]
cmp rsi, rdi
jz loc_676D
loc_647A:
mov rdi, [rbp+var_290]
loc_6481:
cmp rdi, rax
jnb loc_6668
loc_648A:
mov rax, 3FFFFFFFFFFFFFFFh
sub rax, r8
cmp rax, rdx
jb loc_67CC
mov rdi, [rbp+var_398]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
loc_64AC:
mov rsi, rax
mov rdi, r12
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EOS4_; std::string::basic_string(std::string&&)
mov rdi, [rbp+var_398]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv; std::string::_M_dispose(void)
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv; std::string::_M_dispose(void)
mov rdi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv; std::string::_M_dispose(void)
mov rdi, [rbp+var_3A8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv; std::string::_M_dispose(void)
mov rdi, [rbp+var_3B0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv; std::string::_M_dispose(void)
mov rdi, [rbp+var_3A0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv; std::string::_M_dispose(void)
jmp loc_65D0
loc_6500:
mov rdx, [rax-48h]
sub rdx, rsi
loc_6507:
lea rax, [rax+rcx-48h]
cmp byte ptr [rax+10h], 0
jz loc_5E81
loc_6516:
mov rcx, [rax+8]
sub rcx, [rax]
add rdx, rcx
jmp loc_5E81
loc_6528:
lea rsi, [rax+rcx-48h]
cmp byte ptr [rsi+10h], 0
jz loc_5E30
loc_6537:
mov rax, [rsi]
mov rbx, [rsi+8]
lea rcx, [rbp+var_290]
mov [rbp+var_298], 0
mov [rbp+var_3C0], rcx
sub rbx, rax
mov [rbp+var_2A0], rcx
mov r15, rax
mov [rbp+var_388], rbx
cmp rbx, 0Fh
ja loc_6718
cmp rbx, 1
jnz loc_66FF
movzx eax, byte ptr [rax]
mov byte ptr [rbp+var_290], al
loc_6588:
mov rax, [rbp+var_3C0]
loc_658F:
mov [rbp+var_298], rbx
mov byte ptr [rax+rbx], 0
mov rdx, qword ptr [rbp+var_360+8]
mov rax, qword ptr [rbp+var_360]
mov rcx, rdx
sub rcx, rax
jmp loc_5E57
loc_65B8:
lea rax, [r12+10h]
mov byte ptr [r12+10h], 0
mov [r12], rax
mov qword ptr [r12+8], 0
loc_65D0:
mov rdi, r14
call _ZNSt6vectorINSt7__cxx119sub_matchIN9__gnu_cxx17__normal_iteratorIPKcNS0_12basic_stringIcSt11char_traitsIcESaIcEEEEEEESaISC_EED2Ev; std::vector<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~vector()
mov rdi, [rbp+var_368]
test rdi, rdi
jz short loc_65E9
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_65E9:
mov rdi, r13; this
call __ZNSt6localeD1Ev; std::locale::~locale()
mov rax, [rbp+var_38]
sub rax, fs:28h
jnz loc_67C7
lea rsp, [rbp-28h]
mov rax, r12
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_6620:
xor eax, eax
jmp loc_60E6
loc_6630:
mov [rbp+var_398], rdi
lea ebx, [rax+5]
jmp loc_6199
loc_6640:
mov [rbp+var_398], rdi
lea ebx, [rax+5]
jmp loc_5F29
loc_6650:
mov rdi, [rbp+var_3B0]
xor edx, edx
xor esi, esi
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
jmp loc_63D7
loc_6668:
mov rdi, [rbp+var_3A0]
xor edx, edx
xor esi, esi
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
jmp loc_64AC
loc_6680:
mov [rbp+var_398], rdi
lea ebx, [rax+6]
jmp loc_5F29
loc_6690:
mov [rbp+var_398], rdi
lea ebx, [rax+6]
jmp loc_6199
loc_66A0:
mov [rbp+var_398], rdi
lea ebx, [rax+7]
jmp loc_6199
loc_66B0:
mov [rbp+var_398], rdi
lea ebx, [rax+7]
jmp loc_5F29
loc_66C0:
cmp rax, 0Fh
jbe loc_63B9
mov rbx, [rbp+var_3C8]
cmp rsi, rbx
jnz loc_63A9
jmp loc_63B9
loc_66E0:
cmp rax, 0Fh
jbe loc_648A
mov rdi, [rbp+var_3C0]
cmp rsi, rdi
jnz loc_647A
jmp loc_648A
loc_66FF:
test rbx, rbx
jz loc_6588
mov rdi, [rbp+var_3C0]
jmp short loc_6745
loc_6718:
mov rdi, [rbp+var_3A0]
lea rsi, [rbp+var_388]
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_createERmm; std::string::_M_create(ulong &,ulong)
mov [rbp+var_2A0], rax
mov rdi, rax; dest
mov rax, [rbp+var_388]
mov [rbp+var_290], rax
loc_6745:
mov rdx, rbx; n
mov rsi, r15; src
call _memcpy
mov rbx, [rbp+var_388]
mov rax, [rbp+var_2A0]
jmp loc_658F
loc_6763:
mov edi, 0Fh
jmp loc_63B0
loc_676D:
mov edi, 0Fh
jmp loc_6481
loc_6777:
mov ebx, 1
jmp loc_6199
loc_6781:
mov ebx, 1
jmp loc_5F29
loc_678B:
mov ebx, 2
jmp loc_5F29
loc_6795:
mov ebx, 2
jmp loc_6199
loc_679F:
mov ebx, 4
jmp loc_5F29
loc_67A9:
mov ebx, 3
jmp loc_5F29
loc_67B3:
mov ebx, 4
jmp loc_6199
loc_67BD:
mov ebx, 3
jmp loc_6199
loc_67C7:
call ___stack_chk_fail
loc_67CC:
mov rax, [rbp+var_38]
sub rax, fs:28h
jnz short loc_681D
lea rdi, aBasicStringApp; "basic_string::append"
call __ZSt20__throw_length_errorPKc; std::__throw_length_error(char const*)
loc_67E7:
mov rax, [rbp+var_38]
sub rax, fs:28h
jnz short loc_6822
lea rdi, aBasicStringApp; "basic_string::append"
call __ZSt20__throw_length_errorPKc; std::__throw_length_error(char const*)
loc_6802:
mov rax, [rbp+var_38]
sub rax, fs:28h
jnz short loc_6827
lea rdi, aBasicStringApp; "basic_string::append"
call __ZSt20__throw_length_errorPKc; std::__throw_length_error(char const*)
loc_681D:
call ___stack_chk_fail
loc_6822:
call ___stack_chk_fail
loc_6827:
call ___stack_chk_fail
endbr64
mov rbx, rax
jmp loc_4801
endbr64
mov r12, rax
jmp _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE_cold; func0(std::string const&) [clone]
endbr64
mov rbx, rax
jmp loc_4809
endbr64
mov rbx, rax
jmp loc_4815
endbr64
mov rbx, rax
jmp loc_4821
endbr64
mov rbx, rax
jmp loc_482D
endbr64
mov rbx, rax
jmp loc_485D
endbr64
mov r12, rax
jmp loc_47F6 | long long func0(long long a1, long long *a2)
{
__m128i v3; // xmm0
long long v4; // rdi
void *v5; // rdi
void **v6; // rbx
unsigned long long v7; // r15
void *v8; // rdi
long long v9; // rdi
long long v10; // rsi
__int128 v11; // rax
long long v12; // rcx
long long v13; // rsi
long long v14; // r15
int v15; // ebx
unsigned long long v16; // rdi
unsigned long long v17; // rcx
int v18; // ebx
__int8 *v19; // r15
unsigned long long v20; // r11
long long v21; // rax
unsigned long long v22; // rdx
__int8 v23; // di
long long v24; // rsi
__int8 v25; // al
_QWORD *v26; // rdx
long long v27; // rax
unsigned long long v28; // rax
unsigned long long v29; // r15
unsigned long long v30; // rdx
int v31; // ebx
unsigned long long v32; // rdi
unsigned long long v33; // rcx
int v34; // eax
int v35; // ebx
__int8 *v36; // r15
unsigned long long v37; // r10
long long v38; // rax
unsigned long long v39; // rdx
__int8 v40; // di
long long v41; // rsi
__int8 v42; // al
long long v43; // rax
unsigned long long v44; // rax
unsigned long long v45; // rdi
long long v46; // rax
long long v47; // rax
unsigned long long v48; // rax
unsigned long long v49; // rdi
long long v50; // rax
_BYTE *v51; // rax
long long v52; // rbx
size_t v53; // rbx
const void *v54; // r15
_QWORD *v55; // rax
_QWORD *v57; // rdi
unsigned long long v58; // [rsp+38h] [rbp-398h]
unsigned long long v59; // [rsp+38h] [rbp-398h]
size_t v60; // [rsp+48h] [rbp-388h] BYREF
int v61; // [rsp+50h] [rbp-380h] BYREF
char v62[8]; // [rsp+58h] [rbp-378h] BYREF
__m128i v63; // [rsp+60h] [rbp-370h]
__int128 v64; // [rsp+70h] [rbp-360h] BYREF
__int128 v65; // [rsp+80h] [rbp-350h]
_QWORD v66[2]; // [rsp+90h] [rbp-340h] BYREF
char v67; // [rsp+A0h] [rbp-330h] BYREF
unsigned long long *v68; // [rsp+B0h] [rbp-320h] BYREF
long long v69; // [rsp+B8h] [rbp-318h]
unsigned long long v70; // [rsp+C0h] [rbp-310h] BYREF
_QWORD *v71; // [rsp+D0h] [rbp-300h] BYREF
unsigned long long v72; // [rsp+D8h] [rbp-2F8h]
_QWORD v73[2]; // [rsp+E0h] [rbp-2F0h] BYREF
char v74[8]; // [rsp+F0h] [rbp-2E0h] BYREF
long long v75; // [rsp+F8h] [rbp-2D8h]
unsigned long long *v76; // [rsp+110h] [rbp-2C0h] BYREF
long long v77; // [rsp+118h] [rbp-2B8h]
unsigned long long v78; // [rsp+120h] [rbp-2B0h] BYREF
_QWORD *v79; // [rsp+130h] [rbp-2A0h] BYREF
unsigned long long v80; // [rsp+138h] [rbp-298h]
_QWORD v81[24]; // [rsp+140h] [rbp-290h] BYREF
char v82[48]; // [rsp+200h] [rbp-1D0h] BYREF
__m128i v83; // [rsp+230h] [rbp-1A0h] BYREF
char v84[32]; // [rsp+240h] [rbp-190h] BYREF
void *v85; // [rsp+260h] [rbp-170h]
long long v86; // [rsp+268h] [rbp-168h]
unsigned long long v87; // [rsp+288h] [rbp-148h]
long long v88; // [rsp+2A8h] [rbp-128h]
__m128i si128; // [rsp+2C0h] [rbp-110h]
__m128i v90; // [rsp+2D0h] [rbp-100h]
__m128i v91; // [rsp+2E0h] [rbp-F0h]
__m128i v92; // [rsp+2F0h] [rbp-E0h]
__m128i v93; // [rsp+300h] [rbp-D0h]
__m128i v94; // [rsp+310h] [rbp-C0h]
__m128i v95; // [rsp+320h] [rbp-B0h]
__m128i v96; // [rsp+330h] [rbp-A0h]
__m128i v97; // [rsp+340h] [rbp-90h]
__m128i v98; // [rsp+350h] [rbp-80h]
__m128i v99; // [rsp+360h] [rbp-70h]
__m128i v100[2]; // [rsp+370h] [rbp-60h]
unsigned long long v101; // [rsp+398h] [rbp-38h]
v101 = __readfsqword(0x28u);
std::locale::locale((std::locale *)v62);
v63 = 0LL;
std::__detail::_Compiler<std::regex_traits<char>>::_Compiler(&v79, "\\w+ly", "", v62, 16LL);
v3 = _mm_load_si128(&v83);
v4 = v63.m128i_i64[1];
v83 = 0LL;
v63 = v3;
if ( v4 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release();
v5 = v85;
v61 = 16;
if ( v85 )
{
v6 = (void **)v87;
if ( v87 < v88 + 8 )
{
v7 = v88 + 8;
do
{
v8 = *v6++;
operator delete(v8, 0x1F8uLL);
}
while ( (unsigned long long)v6 < v7 );
v5 = v85;
}
operator delete(v5, 8 * v86);
}
std::string::_M_dispose(v84);
if ( v83.m128i_i64[1] )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release();
std::string::_M_dispose(v82);
v9 = *a2;
v10 = a2[1];
v64 = 0LL;
v65 = 0LL;
if ( (unsigned __int8)std::__detail::__regex_algo_impl<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>>(
v9,
(int)v9 + (int)v10,
(unsigned int)&v64,
(unsigned int)&v61,
0,
0,
0) )
{
v11 = v64;
v12 = *((_QWORD *)&v64 + 1) - v64;
if ( *((_QWORD *)&v64 + 1) == (_QWORD)v64 || (v13 = v64, v12 == 72) )
{
v13 = *((_QWORD *)&v64 + 1) - 72LL;
if ( !*(_BYTE *)(*((_QWORD *)&v64 + 1) - 72LL + 16) )
goto LABEL_15;
}
else if ( !*(_BYTE *)(v64 + 16) )
{
LABEL_15:
LOBYTE(v81[0]) = 0;
v79 = v81;
v80 = 0LL;
goto LABEL_16;
}
v51 = *(_BYTE **)v13;
v52 = *(_QWORD *)(v13 + 8);
v80 = 0LL;
v53 = v52 - (_QWORD)v51;
v79 = v81;
v54 = v51;
v60 = v53;
if ( v53 > 0xF )
{
v79 = (_QWORD *)std::string::_M_create(&v79, &v60, 0LL);
v57 = v79;
v81[0] = v60;
}
else
{
if ( v53 == 1 )
{
LOBYTE(v81[0]) = *v51;
LABEL_81:
v55 = v81;
LABEL_82:
v80 = v53;
*((_BYTE *)v55 + v53) = 0;
v11 = v64;
v12 = *((_QWORD *)&v64 + 1) - v64;
LABEL_16:
if ( *((_QWORD *)&v11 + 1) == (_QWORD)v11 )
{
*((_QWORD *)&v11 + 1) = *(_QWORD *)(v11 - 72) - *((_QWORD *)&v65 + 1);
}
else
{
*((_QWORD *)&v11 + 1) = *(_QWORD *)v11 - *((_QWORD *)&v65 + 1);
if ( v12 != 72 )
{
if ( !*(_BYTE *)(v11 + 16) )
goto LABEL_19;
LABEL_76:
*((_QWORD *)&v11 + 1) += *(_QWORD *)(v11 + 8) - *(_QWORD *)v11;
LABEL_19:
v14 = *((_QWORD *)&v11 + 1) >> 63;
if ( *((long long *)&v11 + 1) <= 0 )
*((_QWORD *)&v11 + 1) = -*((_QWORD *)&v11 + 1);
v58 = *((_QWORD *)&v11 + 1);
if ( *((_QWORD *)&v11 + 1) <= 9uLL )
{
v15 = 1;
}
else if ( *((_QWORD *)&v11 + 1) <= 0x63uLL )
{
v15 = 2;
}
else if ( *((_QWORD *)&v11 + 1) <= 0x3E7uLL )
{
v15 = 3;
}
else if ( *((_QWORD *)&v11 + 1) <= 0x270FuLL )
{
v15 = 4;
}
else
{
v15 = 1;
v16 = *((_QWORD *)&v11 + 1);
do
{
v17 = *((_QWORD *)&v11 + 1);
LODWORD(v11) = v15;
v15 += 4;
*((_QWORD *)&v11 + 1) /= 0x2710uLL;
if ( v17 <= 0x1869F )
{
v58 = v16;
goto LABEL_31;
}
if ( v17 <= 0xF423F )
{
v58 = v16;
v15 = v11 + 5;
goto LABEL_31;
}
if ( v17 <= 0x98967F )
{
v58 = v16;
v15 = v11 + 6;
goto LABEL_31;
}
}
while ( v17 > 0x5F5E0FF );
v58 = v16;
v15 = v11 + 7;
}
LABEL_31:
v71 = v73;
std::string::_M_construct(&v71, (unsigned int)(v15 + v14), 45LL);
v18 = v15 - 1;
v19 = (char *)v71 + v14;
si128 = _mm_load_si128((const __m128i *)&xmmword_1C210);
v90 = _mm_load_si128((const __m128i *)&xmmword_1C220);
v91 = _mm_load_si128((const __m128i *)&xmmword_1C230);
v92 = _mm_load_si128((const __m128i *)&xmmword_1C240);
v93 = _mm_load_si128((const __m128i *)&xmmword_1C250);
v94 = _mm_load_si128((const __m128i *)&xmmword_1C260);
v95 = _mm_load_si128((const __m128i *)&xmmword_1C270);
v96 = _mm_load_si128((const __m128i *)&xmmword_1C280);
v97 = _mm_load_si128((const __m128i *)&xmmword_1C290);
v98 = _mm_load_si128((const __m128i *)&xmmword_1C2A0);
v99 = _mm_load_si128((const __m128i *)&xmmword_1C2B0);
v100[0] = _mm_load_si128((const __m128i *)&xmmword_1C2C0);
*(__m128i *)((char *)v100 + 9) = _mm_load_si128((const __m128i *)&xmmword_1C2D0);
if ( v58 > 0x63 )
{
v20 = v58;
do
{
v21 = v20
- 20
* (v20 / 0x64
+ (((0x28F5C28F5C28F5C3LL * (unsigned __int128)(v20 >> 2)) >> 64) & 0xFFFFFFFFFFFFFFFCLL));
v22 = v20;
v20 /= 0x64uLL;
v21 *= 2LL;
v23 = si128.m128i_i8[v21 + 1];
LOBYTE(v21) = si128.m128i_i8[v21];
v19[v18] = v23;
v24 = (unsigned int)(v18 - 1);
v18 -= 2;
v19[v24] = v21;
}
while ( v22 > 0x270F );
v58 = v20;
}
v25 = v58 + 48;
if ( v58 > 9 )
{
v19[1] = si128.m128i_i8[2 * v58 + 1];
v25 = si128.m128i_i8[2 * v58];
}
*v19 = v25;
v26 = (_QWORD *)v64;
if ( *((_QWORD *)&v64 + 1) == (_QWORD)v64 )
{
v27 = 0LL;
}
else
{
v27 = *((_QWORD *)&v64 + 1) - v64;
if ( *((_QWORD *)&v64 + 1) - (_QWORD)v64 != 72LL )
goto LABEL_40;
}
v26 = (_QWORD *)(v64 + v27 - 72);
LABEL_40:
v28 = *v26 - *((_QWORD *)&v65 + 1);
v29 = v28 >> 63;
if ( (long long)(*((_QWORD *)&v65 + 1) - *v26) >= 0 )
v28 = *((_QWORD *)&v65 + 1) - *v26;
v59 = v28;
if ( v28 <= 9 )
{
v31 = 1;
}
else if ( v28 <= 0x63 )
{
v31 = 2;
}
else if ( v28 <= 0x3E7 )
{
v31 = 3;
}
else if ( v28 <= 0x270F )
{
v31 = 4;
}
else
{
v30 = v28;
v31 = 1;
v32 = v28;
do
{
v33 = v30;
v34 = v31;
v31 += 4;
v30 /= 0x2710uLL;
if ( v33 <= 0x1869F )
{
v59 = v32;
goto LABEL_52;
}
if ( v33 <= 0xF423F )
{
v59 = v32;
v31 = v34 + 5;
goto LABEL_52;
}
if ( v33 <= 0x98967F )
{
v59 = v32;
v31 = v34 + 6;
goto LABEL_52;
}
}
while ( v33 > 0x5F5E0FF );
v59 = v32;
v31 = v34 + 7;
}
LABEL_52:
v66[0] = &v67;
std::string::_M_construct(v66, (unsigned int)(v31 + v29), 45LL);
v35 = v31 - 1;
v36 = (__int8 *)(v66[0] + v29);
si128 = _mm_load_si128((const __m128i *)&xmmword_1C210);
v90 = _mm_load_si128((const __m128i *)&xmmword_1C220);
v91 = _mm_load_si128((const __m128i *)&xmmword_1C230);
v92 = _mm_load_si128((const __m128i *)&xmmword_1C240);
v93 = _mm_load_si128((const __m128i *)&xmmword_1C250);
v94 = _mm_load_si128((const __m128i *)&xmmword_1C260);
v95 = _mm_load_si128((const __m128i *)&xmmword_1C270);
v96 = _mm_load_si128((const __m128i *)&xmmword_1C280);
v97 = _mm_load_si128((const __m128i *)&xmmword_1C290);
v98 = _mm_load_si128((const __m128i *)&xmmword_1C2A0);
v99 = _mm_load_si128((const __m128i *)&xmmword_1C2B0);
v100[0] = _mm_load_si128((const __m128i *)&xmmword_1C2C0);
*(__m128i *)((char *)v100 + 9) = _mm_load_si128((const __m128i *)&xmmword_1C2D0);
if ( v59 > 0x63 )
{
v37 = v59;
do
{
v38 = v37
- 20
* (v37 / 0x64
+ (((0x28F5C28F5C28F5C3LL * (unsigned __int128)(v37 >> 2)) >> 64) & 0xFFFFFFFFFFFFFFFCLL));
v39 = v37;
v37 /= 0x64uLL;
v38 *= 2LL;
v40 = si128.m128i_i8[v38 + 1];
LOBYTE(v38) = si128.m128i_i8[v38];
v36[v35] = v40;
v41 = (unsigned int)(v35 - 1);
v35 -= 2;
v36[v41] = v38;
}
while ( v39 > 0x270F );
v59 = v37;
}
v42 = v59 + 48;
if ( v59 > 9 )
{
v36[1] = si128.m128i_i8[2 * v59 + 1];
v42 = si128.m128i_i8[2 * v59];
}
*v36 = v42;
v43 = std::string::_M_replace_aux(v66, v66[1], 0LL, 1LL, 45LL);
std::string::basic_string(&v68, v43);
v44 = v69 + v72;
if ( v68 == &v70 )
{
if ( v44 <= 0xF || v71 == v73 )
goto LABEL_63;
}
else
{
if ( v70 >= v44 )
goto LABEL_63;
if ( v71 == v73 )
{
v45 = 15LL;
LABEL_62:
if ( v45 >= v44 )
{
v46 = std::string::_M_replace(&v71, 0LL, 0LL);
goto LABEL_65;
}
LABEL_63:
if ( 0x3FFFFFFFFFFFFFFFLL - v69 < v72 )
std::__throw_length_error("basic_string::append");
v46 = std::string::_M_append(&v68, v71);
LABEL_65:
std::string::basic_string(v74, v46);
if ( v75 == 0x3FFFFFFFFFFFFFFFLL || v75 == 4611686018427387902LL )
std::__throw_length_error("basic_string::append");
v47 = std::string::_M_append(v74, ": ");
std::string::basic_string(&v76, v47);
v48 = v77 + v80;
if ( v76 == &v78 )
{
if ( v48 <= 0xF || v79 == v81 )
goto LABEL_71;
}
else
{
if ( v78 >= v48 )
goto LABEL_71;
if ( v79 == v81 )
{
v49 = 15LL;
LABEL_70:
if ( v49 >= v48 )
{
v50 = std::string::_M_replace(&v79, 0LL, 0LL);
LABEL_73:
std::string::basic_string(a1, v50);
std::string::_M_dispose(&v76);
std::string::_M_dispose(v74);
std::string::_M_dispose(&v68);
std::string::_M_dispose(v66);
std::string::_M_dispose(&v71);
std::string::_M_dispose(&v79);
goto LABEL_84;
}
LABEL_71:
if ( 0x3FFFFFFFFFFFFFFFLL - v77 < v80 )
std::__throw_length_error("basic_string::append");
v50 = std::string::_M_append(&v76, v79);
goto LABEL_73;
}
}
v49 = v81[0];
goto LABEL_70;
}
}
v45 = v73[0];
goto LABEL_62;
}
}
*(_QWORD *)&v11 = v11 + v12 - 72;
if ( !*(_BYTE *)(v11 + 16) )
goto LABEL_19;
goto LABEL_76;
}
if ( !v53 )
goto LABEL_81;
v57 = v81;
}
memcpy(v57, v54, v53);
v53 = v60;
v55 = v79;
goto LABEL_82;
}
*(_BYTE *)(a1 + 16) = 0;
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
LABEL_84:
std::vector<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~vector(&v64);
if ( v63.m128i_i64[1] )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release();
std::locale::~locale((std::locale *)v62);
return a1;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
MOV R14,RSI
PUSH R13
LEA R13,[RBP + -0x378]
PUSH R12
MOV R12,RDI
MOV RDI,R13
PUSH RBX
SUB RSP,0x3a8
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x38],RAX
XOR EAX,EAX
CALL 0x00104750
LEA RDX,[0x11b749]
PXOR XMM0,XMM0
LEA RDI,[RBP + -0x2a0]
MOV R8D,0x10
MOV RCX,R13
LEA RSI,[RDX + -0x5]
MOV qword ptr [RBP + -0x3a0],RDI
MOVAPS xmmword ptr [RBP + -0x370],XMM0
LAB_00105ce9:
CALL 0x00119540
MOVDQA XMM0,xmmword ptr [RBP + -0x1a0]
MOV RDI,qword ptr [RBP + -0x368]
PXOR XMM1,XMM1
MOVAPS xmmword ptr [RBP + -0x1a0],XMM1
MOVAPS xmmword ptr [RBP + -0x370],XMM0
TEST RDI,RDI
JZ 0x00105d19
CALL 0x00107ad0
LAB_00105d19:
MOV RDI,qword ptr [RBP + -0x170]
MOV dword ptr [RBP + -0x380],0x10
TEST RDI,RDI
JZ 0x00105d81
MOV RAX,qword ptr [RBP + -0x128]
MOV RBX,qword ptr [RBP + -0x148]
ADD RAX,0x8
CMP RBX,RAX
JNC 0x00105d6d
MOV R15,RAX
NOP dword ptr [RAX]
LAB_00105d50:
MOV RDI,qword ptr [RBX]
MOV ESI,0x1f8
ADD RBX,0x8
CALL 0x001045b0
CMP RBX,R15
JC 0x00105d50
MOV RDI,qword ptr [RBP + -0x170]
LAB_00105d6d:
MOV RAX,qword ptr [RBP + -0x168]
LEA RSI,[RAX*0x8]
CALL 0x001045b0
LAB_00105d81:
LEA RDI,[RBP + -0x190]
CALL 0x00104630
MOV RDI,qword ptr [RBP + -0x198]
TEST RDI,RDI
JZ 0x00105d9e
CALL 0x00107ad0
LAB_00105d9e:
LEA RDI,[RBP + -0x1d0]
CALL 0x00104630
PXOR XMM0,XMM0
SUB RSP,0x8
MOV RDI,qword ptr [R14]
LEA RAX,[RBP + -0x380]
MOV RSI,qword ptr [R14 + 0x8]
XOR R9D,R9D
XOR R8D,R8D
MOV qword ptr [RBP + -0x3b8],RAX
LEA R14,[RBP + -0x360]
MOV RCX,RAX
MOVAPS xmmword ptr [RBP + -0x360],XMM0
ADD RSI,RDI
MOV RDX,R14
MOVAPS xmmword ptr [RBP + -0x350],XMM0
PUSH 0x0
LAB_00105ded:
CALL 0x00111c00
POP RDX
POP RCX
TEST AL,AL
JZ 0x001065b8
MOV RDX,qword ptr [RBP + -0x358]
MOV RAX,qword ptr [RBP + -0x360]
MOV RCX,RDX
SUB RCX,RAX
CMP RDX,RAX
JZ 0x00106528
MOV RSI,RAX
CMP RCX,0x48
JZ 0x00106528
CMP byte ptr [RSI + 0x10],0x0
JNZ 0x00106537
LAB_00105e30:
LEA RBX,[RBP + -0x290]
MOV byte ptr [RBP + -0x290],0x0
MOV qword ptr [RBP + -0x3c0],RBX
MOV qword ptr [RBP + -0x2a0],RBX
MOV qword ptr [RBP + -0x298],0x0
LAB_00105e57:
MOV RSI,qword ptr [RBP + -0x348]
CMP RDX,RAX
JZ 0x00106500
MOV RDX,qword ptr [RAX]
SUB RDX,RSI
CMP RCX,0x48
JZ 0x00106507
CMP byte ptr [RAX + 0x10],0x0
JNZ 0x00106516
LAB_00105e81:
MOV R15,RDX
MOV RAX,RDX
SHR R15,0x3f
NEG RAX
CMOVNS RDX,RAX
MOV qword ptr [RBP + -0x398],RDX
CMP RDX,0x9
JBE 0x00106781
CMP RDX,0x63
JBE 0x0010678b
CMP RDX,0x3e7
JBE 0x001067a9
CMP RDX,0x270f
JBE 0x0010679f
MOV EBX,0x1
MOV RDI,RDX
MOV RSI,0x346dc5d63886594b
JMP 0x00105f07
LAB_00105ee0:
CMP RCX,0xf423f
JBE 0x00106640
CMP RCX,0x98967f
JBE 0x00106680
CMP RCX,0x5f5e0ff
JBE 0x001066b0
LAB_00105f07:
MOV RAX,RDX
MOV RCX,RDX
MUL RSI
MOV EAX,EBX
ADD EBX,0x4
SHR RDX,0xb
CMP RCX,0x1869f
JA 0x00105ee0
MOV qword ptr [RBP + -0x398],RDI
LAB_00105f29:
LEA RAX,[RBP + -0x2f0]
LEA ESI,[RBX + R15*0x1]
MOV EDX,0x2d
LEA RDI,[RBP + -0x300]
MOV qword ptr [RBP + -0x3c8],RAX
MOV qword ptr [RBP + -0x3b0],RDI
MOV qword ptr [RBP + -0x300],RAX
LAB_00105f55:
CALL 0x00104620
MOVDQA XMM0,xmmword ptr [0x0011c210]
MOV RAX,qword ptr [RBP + -0x398]
SUB EBX,0x1
ADD R15,qword ptr [RBP + -0x300]
MOVAPS xmmword ptr [RBP + -0x110],XMM0
MOVDQA XMM0,xmmword ptr [0x0011c220]
MOVAPS xmmword ptr [RBP + -0x100],XMM0
MOVDQA XMM0,xmmword ptr [0x0011c230]
MOVAPS xmmword ptr [RBP + -0xf0],XMM0
MOVDQA XMM0,xmmword ptr [0x0011c240]
MOVAPS xmmword ptr [RBP + -0xe0],XMM0
MOVDQA XMM0,xmmword ptr [0x0011c250]
MOVAPS xmmword ptr [RBP + -0xd0],XMM0
MOVDQA XMM0,xmmword ptr [0x0011c260]
MOVAPS xmmword ptr [RBP + -0xc0],XMM0
MOVDQA XMM0,xmmword ptr [0x0011c270]
MOVAPS xmmword ptr [RBP + -0xb0],XMM0
MOVDQA XMM0,xmmword ptr [0x0011c280]
MOVAPS xmmword ptr [RBP + -0xa0],XMM0
MOVDQA XMM0,xmmword ptr [0x0011c290]
MOVAPS xmmword ptr [RBP + -0x90],XMM0
MOVDQA XMM0,xmmword ptr [0x0011c2a0]
MOVAPS xmmword ptr [RBP + -0x80],XMM0
MOVDQA XMM0,xmmword ptr [0x0011c2b0]
MOVAPS xmmword ptr [RBP + -0x70],XMM0
MOVDQA XMM0,xmmword ptr [0x0011c2c0]
MOVAPS xmmword ptr [RBP + -0x60],XMM0
MOVDQA XMM0,xmmword ptr [0x0011c2d0]
MOVUPS xmmword ptr [RBP + -0x57],XMM0
CMP RAX,0x63
JBE 0x0010609a
MOV RCX,0x28f5c28f5c28f5c3
MOV R11,RAX
NOP dword ptr [RAX]
LAB_00106038:
MOV RDX,R11
SHR RDX,0x2
MOV RAX,RDX
MUL RCX
MOV RAX,R11
MOV RSI,RDX
AND RDX,-0x4
SHR RSI,0x2
ADD RDX,RSI
LEA RDX,[RDX + RDX*0x4]
SHL RDX,0x2
SUB RAX,RDX
MOV RDX,R11
MOV R11,RSI
MOV ESI,EBX
ADD RAX,RAX
MOVZX EDI,byte ptr [RBP + RAX*0x1 + -0x10f]
MOVZX EAX,byte ptr [RBP + RAX*0x1 + -0x110]
MOV byte ptr [R15 + RSI*0x1],DIL
LEA ESI,[RBX + -0x1]
SUB EBX,0x2
MOV byte ptr [R15 + RSI*0x1],AL
CMP RDX,0x270f
JA 0x00106038
MOV qword ptr [RBP + -0x398],R11
LAB_0010609a:
MOV RCX,qword ptr [RBP + -0x398]
MOV EAX,ECX
ADD EAX,0x30
CMP RCX,0x9
JBE 0x001060c3
ADD RCX,RCX
MOVZX EAX,byte ptr [RBP + RCX*0x1 + -0x10f]
MOV byte ptr [R15 + 0x1],AL
MOVZX EAX,byte ptr [RBP + RCX*0x1 + -0x110]
LAB_001060c3:
MOV byte ptr [R15],AL
MOV RAX,qword ptr [RBP + -0x358]
MOV RDX,qword ptr [RBP + -0x360]
CMP RAX,RDX
JZ 0x00106620
SUB RAX,RDX
CMP RAX,0x48
JNZ 0x001060eb
LAB_001060e6:
LEA RDX,[RDX + RAX*0x1 + -0x48]
LAB_001060eb:
MOV RAX,qword ptr [RDX]
SUB RAX,qword ptr [RBP + -0x348]
MOV R15,RAX
MOV RBX,RAX
SHR R15,0x3f
NEG RBX
CMOVNS RAX,RBX
MOV qword ptr [RBP + -0x398],RAX
CMP RAX,0x9
JBE 0x00106777
CMP RAX,0x63
JBE 0x00106795
CMP RAX,0x3e7
JBE 0x001067bd
CMP RAX,0x270f
JBE 0x001067b3
MOV RDX,RAX
MOV EBX,0x1
MOV RDI,RAX
MOV RSI,0x346dc5d63886594b
JMP 0x00106177
LAB_00106150:
CMP RCX,0xf423f
JBE 0x00106630
CMP RCX,0x98967f
JBE 0x00106690
CMP RCX,0x5f5e0ff
JBE 0x001066a0
LAB_00106177:
MOV RAX,RDX
MOV RCX,RDX
MUL RSI
MOV EAX,EBX
ADD EBX,0x4
SHR RDX,0xb
CMP RCX,0x1869f
JA 0x00106150
MOV qword ptr [RBP + -0x398],RDI
LAB_00106199:
LEA RDI,[RBP + -0x340]
LEA ESI,[RBX + R15*0x1]
MOV EDX,0x2d
LEA RAX,[RBP + -0x330]
MOV qword ptr [RBP + -0x3a8],RDI
MOV qword ptr [RBP + -0x340],RAX
LAB_001061be:
CALL 0x00104620
MOVDQA XMM0,xmmword ptr [0x0011c210]
MOV RAX,qword ptr [RBP + -0x398]
SUB EBX,0x1
ADD R15,qword ptr [RBP + -0x340]
MOVAPS xmmword ptr [RBP + -0x110],XMM0
MOVDQA XMM0,xmmword ptr [0x0011c220]
MOVAPS xmmword ptr [RBP + -0x100],XMM0
MOVDQA XMM0,xmmword ptr [0x0011c230]
MOVAPS xmmword ptr [RBP + -0xf0],XMM0
MOVDQA XMM0,xmmword ptr [0x0011c240]
MOVAPS xmmword ptr [RBP + -0xe0],XMM0
MOVDQA XMM0,xmmword ptr [0x0011c250]
MOVAPS xmmword ptr [RBP + -0xd0],XMM0
MOVDQA XMM0,xmmword ptr [0x0011c260]
MOVAPS xmmword ptr [RBP + -0xc0],XMM0
MOVDQA XMM0,xmmword ptr [0x0011c270]
MOVAPS xmmword ptr [RBP + -0xb0],XMM0
MOVDQA XMM0,xmmword ptr [0x0011c280]
MOVAPS xmmword ptr [RBP + -0xa0],XMM0
MOVDQA XMM0,xmmword ptr [0x0011c290]
MOVAPS xmmword ptr [RBP + -0x90],XMM0
MOVDQA XMM0,xmmword ptr [0x0011c2a0]
MOVAPS xmmword ptr [RBP + -0x80],XMM0
MOVDQA XMM0,xmmword ptr [0x0011c2b0]
MOVAPS xmmword ptr [RBP + -0x70],XMM0
MOVDQA XMM0,xmmword ptr [0x0011c2c0]
MOVAPS xmmword ptr [RBP + -0x60],XMM0
MOVDQA XMM0,xmmword ptr [0x0011c2d0]
MOVUPS xmmword ptr [RBP + -0x57],XMM0
CMP RAX,0x63
JBE 0x00106302
MOV RCX,0x28f5c28f5c28f5c3
MOV R10,RAX
NOP
LAB_001062a0:
MOV RDX,R10
SHR RDX,0x2
MOV RAX,RDX
MUL RCX
MOV RAX,R10
MOV RSI,RDX
AND RDX,-0x4
SHR RSI,0x2
ADD RDX,RSI
LEA RDX,[RDX + RDX*0x4]
SHL RDX,0x2
SUB RAX,RDX
MOV RDX,R10
MOV R10,RSI
MOV ESI,EBX
ADD RAX,RAX
MOVZX EDI,byte ptr [RBP + RAX*0x1 + -0x10f]
MOVZX EAX,byte ptr [RBP + RAX*0x1 + -0x110]
MOV byte ptr [R15 + RSI*0x1],DIL
LEA ESI,[RBX + -0x1]
SUB EBX,0x2
MOV byte ptr [R15 + RSI*0x1],AL
CMP RDX,0x270f
JA 0x001062a0
MOV qword ptr [RBP + -0x398],R10
LAB_00106302:
MOV RCX,qword ptr [RBP + -0x398]
MOV EAX,ECX
ADD EAX,0x30
CMP RCX,0x9
JBE 0x0010632b
ADD RCX,RCX
MOVZX EAX,byte ptr [RBP + RCX*0x1 + -0x10f]
MOV byte ptr [R15 + 0x1],AL
MOVZX EAX,byte ptr [RBP + RCX*0x1 + -0x110]
LAB_0010632b:
MOV byte ptr [R15],AL
MOV R8D,0x2d
MOV ECX,0x1
XOR EDX,EDX
MOV RSI,qword ptr [RBP + -0x338]
MOV RDI,qword ptr [RBP + -0x3a8]
LAB_00106349:
CALL 0x00104730
LEA R15,[RBP + -0x320]
MOV RSI,RAX
MOV RDI,R15
CALL 0x001044f0
MOV RCX,qword ptr [RBP + -0x320]
LEA RSI,[RBP + -0x310]
MOV R8,qword ptr [RBP + -0x318]
MOV RDX,qword ptr [RBP + -0x2f8]
CMP RCX,RSI
MOV RSI,qword ptr [RBP + -0x300]
LEA RAX,[R8 + RDX*0x1]
JZ 0x001066c0
CMP qword ptr [RBP + -0x310],RAX
JNC 0x001063b9
MOV RBX,qword ptr [RBP + -0x3c8]
CMP RSI,RBX
JZ 0x00106763
LAB_001063a9:
MOV RDI,qword ptr [RBP + -0x2f0]
LAB_001063b0:
CMP RDI,RAX
JNC 0x00106650
LAB_001063b9:
MOV RAX,0x3fffffffffffffff
SUB RAX,R8
CMP RAX,RDX
JC 0x00106802
MOV RDI,R15
LAB_001063d2:
CALL 0x00104400
LAB_001063d7:
LEA RBX,[RBP + -0x2e0]
MOV RSI,RAX
MOV RDI,RBX
CALL 0x001044f0
MOV RAX,0x3fffffffffffffff
SUB RAX,qword ptr [RBP + -0x2d8]
CMP RAX,0x1
JBE 0x001067e7
MOV EDX,0x2
LEA RSI,[0x11b75f]
MOV RDI,RBX
LAB_00106413:
CALL 0x00104400
MOV RSI,RAX
LEA RAX,[RBP + -0x2c0]
MOV RDI,RAX
MOV qword ptr [RBP + -0x398],RAX
CALL 0x001044f0
MOV RCX,qword ptr [RBP + -0x2c0]
LEA RSI,[RBP + -0x2b0]
MOV R8,qword ptr [RBP + -0x2b8]
MOV RDX,qword ptr [RBP + -0x298]
CMP RCX,RSI
MOV RSI,qword ptr [RBP + -0x2a0]
LEA RAX,[R8 + RDX*0x1]
JZ 0x001066e0
CMP qword ptr [RBP + -0x2b0],RAX
JNC 0x0010648a
MOV RDI,qword ptr [RBP + -0x3c0]
CMP RSI,RDI
JZ 0x0010676d
LAB_0010647a:
MOV RDI,qword ptr [RBP + -0x290]
LAB_00106481:
CMP RDI,RAX
JNC 0x00106668
LAB_0010648a:
MOV RAX,0x3fffffffffffffff
SUB RAX,R8
CMP RAX,RDX
JC 0x001067cc
MOV RDI,qword ptr [RBP + -0x398]
LAB_001064a7:
CALL 0x00104400
LAB_001064ac:
MOV RSI,RAX
MOV RDI,R12
CALL 0x001044f0
MOV RDI,qword ptr [RBP + -0x398]
CALL 0x00104630
MOV RDI,RBX
CALL 0x00104630
MOV RDI,R15
CALL 0x00104630
MOV RDI,qword ptr [RBP + -0x3a8]
CALL 0x00104630
MOV RDI,qword ptr [RBP + -0x3b0]
CALL 0x00104630
MOV RDI,qword ptr [RBP + -0x3a0]
CALL 0x00104630
JMP 0x001065d0
LAB_00106500:
MOV RDX,qword ptr [RAX + -0x48]
SUB RDX,RSI
LAB_00106507:
LEA RAX,[RAX + RCX*0x1 + -0x48]
CMP byte ptr [RAX + 0x10],0x0
JZ 0x00105e81
LAB_00106516:
MOV RCX,qword ptr [RAX + 0x8]
SUB RCX,qword ptr [RAX]
ADD RDX,RCX
JMP 0x00105e81
LAB_00106528:
LEA RSI,[RAX + RCX*0x1 + -0x48]
CMP byte ptr [RSI + 0x10],0x0
JZ 0x00105e30
LAB_00106537:
MOV RAX,qword ptr [RSI]
MOV RBX,qword ptr [RSI + 0x8]
LEA RCX,[RBP + -0x290]
MOV qword ptr [RBP + -0x298],0x0
MOV qword ptr [RBP + -0x3c0],RCX
SUB RBX,RAX
MOV qword ptr [RBP + -0x2a0],RCX
MOV R15,RAX
MOV qword ptr [RBP + -0x388],RBX
CMP RBX,0xf
JA 0x00106718
CMP RBX,0x1
JNZ 0x001066ff
MOVZX EAX,byte ptr [RAX]
MOV byte ptr [RBP + -0x290],AL
LAB_00106588:
MOV RAX,qword ptr [RBP + -0x3c0]
LAB_0010658f:
MOV qword ptr [RBP + -0x298],RBX
MOV byte ptr [RAX + RBX*0x1],0x0
MOV RDX,qword ptr [RBP + -0x358]
MOV RAX,qword ptr [RBP + -0x360]
MOV RCX,RDX
SUB RCX,RAX
JMP 0x00105e57
LAB_001065b8:
LEA RAX,[R12 + 0x10]
MOV byte ptr [R12 + 0x10],0x0
MOV qword ptr [R12],RAX
MOV qword ptr [R12 + 0x8],0x0
LAB_001065d0:
MOV RDI,R14
CALL 0x00107c00
MOV RDI,qword ptr [RBP + -0x368]
TEST RDI,RDI
JZ 0x001065e9
CALL 0x00107ad0
LAB_001065e9:
MOV RDI,R13
CALL 0x00104690
MOV RAX,qword ptr [RBP + -0x38]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x001067c7
LEA RSP,[RBP + -0x28]
MOV RAX,R12
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00106620:
XOR EAX,EAX
JMP 0x001060e6
LAB_00106630:
MOV qword ptr [RBP + -0x398],RDI
LEA EBX,[RAX + 0x5]
JMP 0x00106199
LAB_00106640:
MOV qword ptr [RBP + -0x398],RDI
LEA EBX,[RAX + 0x5]
JMP 0x00105f29
LAB_00106650:
MOV RDI,qword ptr [RBP + -0x3b0]
XOR EDX,EDX
XOR ESI,ESI
LAB_0010665b:
CALL 0x001046b0
JMP 0x001063d7
LAB_00106668:
MOV RDI,qword ptr [RBP + -0x3a0]
XOR EDX,EDX
XOR ESI,ESI
LAB_00106673:
CALL 0x001046b0
JMP 0x001064ac
LAB_00106680:
MOV qword ptr [RBP + -0x398],RDI
LEA EBX,[RAX + 0x6]
JMP 0x00105f29
LAB_00106690:
MOV qword ptr [RBP + -0x398],RDI
LEA EBX,[RAX + 0x6]
JMP 0x00106199
LAB_001066a0:
MOV qword ptr [RBP + -0x398],RDI
LEA EBX,[RAX + 0x7]
JMP 0x00106199
LAB_001066b0:
MOV qword ptr [RBP + -0x398],RDI
LEA EBX,[RAX + 0x7]
JMP 0x00105f29
LAB_001066c0:
CMP RAX,0xf
JBE 0x001063b9
MOV RBX,qword ptr [RBP + -0x3c8]
CMP RSI,RBX
JNZ 0x001063a9
JMP 0x001063b9
LAB_001066e0:
CMP RAX,0xf
JBE 0x0010648a
MOV RDI,qword ptr [RBP + -0x3c0]
CMP RSI,RDI
JNZ 0x0010647a
JMP 0x0010648a
LAB_001066ff:
TEST RBX,RBX
JZ 0x00106588
MOV RDI,qword ptr [RBP + -0x3c0]
JMP 0x00106745
LAB_00106718:
MOV RDI,qword ptr [RBP + -0x3a0]
LEA RSI,[RBP + -0x388]
XOR EDX,EDX
LAB_00106728:
CALL 0x00104700
MOV qword ptr [RBP + -0x2a0],RAX
MOV RDI,RAX
MOV RAX,qword ptr [RBP + -0x388]
MOV qword ptr [RBP + -0x290],RAX
LAB_00106745:
MOV RDX,RBX
MOV RSI,R15
CALL 0x00104580
MOV RBX,qword ptr [RBP + -0x388]
MOV RAX,qword ptr [RBP + -0x2a0]
JMP 0x0010658f
LAB_00106763:
MOV EDI,0xf
JMP 0x001063b0
LAB_0010676d:
MOV EDI,0xf
JMP 0x00106481
LAB_00106777:
MOV EBX,0x1
JMP 0x00106199
LAB_00106781:
MOV EBX,0x1
JMP 0x00105f29
LAB_0010678b:
MOV EBX,0x2
JMP 0x00105f29
LAB_00106795:
MOV EBX,0x2
JMP 0x00106199
LAB_0010679f:
MOV EBX,0x4
JMP 0x00105f29
LAB_001067a9:
MOV EBX,0x3
JMP 0x00105f29
LAB_001067b3:
MOV EBX,0x4
JMP 0x00106199
LAB_001067bd:
MOV EBX,0x3
JMP 0x00106199
LAB_001067c7:
CALL 0x001045f0
LAB_001067cc:
MOV RAX,qword ptr [RBP + -0x38]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x0010681d
LEA RDI,[0x11b74a]
LAB_001067e2:
CALL 0x001044c0
LAB_001067e7:
MOV RAX,qword ptr [RBP + -0x38]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x00106822
LEA RDI,[0x11b74a]
LAB_001067fd:
CALL 0x001044c0
LAB_00106802:
MOV RAX,qword ptr [RBP + -0x38]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x00106827
LEA RDI,[0x11b74a]
LAB_00106818:
CALL 0x001044c0
LAB_0010681d:
CALL 0x001045f0
LAB_00106822:
CALL 0x001045f0
LAB_00106827:
CALL 0x001045f0 | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(std::string const&) */
string * func0(string *param_1)
{
uint uVar1;
int *__src;
int auVar2 [16];
int auVar3 [16];
int8 this;
bool bVar4;
char cVar5;
ulong uVar6;
string *psVar7;
long lVar8;
ulong uVar9;
long *plVar10;
ulong uVar11;
int iVar12;
uint uVar13;
int iVar14;
int8 *puVar15;
int8 *in_RSI;
char *pcVar16;
long in_FS_OFFSET;
ulong *local_3c8;
ulong local_3a0;
ulong local_390;
int4 local_388 [2];
locale local_380 [2];
int local_378 [16];
int local_368 [16];
int local_358 [16];
int *local_348;
ulong local_340;
int local_338 [16];
ulong *local_328;
long local_320;
ulong local_318 [2];
ulong *local_308;
ulong local_300;
ulong local_2f8 [2];
string local_2e8 [8];
long local_2e0;
ulong *local_2c8;
long local_2c0;
ulong local_2b8 [2];
ulong *local_2a8;
ulong local_2a0;
ulong local_298 [30];
int local_1a8 [48];
void *local_178;
long local_170;
int8 *local_150;
long local_130;
int8 local_118;
int8 uStack_110;
int8 local_108;
int8 uStack_100;
int8 local_f8;
int8 uStack_f0;
int8 local_e8;
int8 uStack_e0;
int8 local_d8;
int8 uStack_d0;
int8 local_c8;
int8 uStack_c0;
int8 local_b8;
int8 uStack_b0;
int8 local_a8;
int8 uStack_a0;
int8 local_98;
int8 uStack_90;
int8 local_88;
int8 uStack_80;
int8 local_78;
int8 uStack_70;
int8 local_68;
int uStack_60;
int7 uStack_5f;
char cStack_58;
char acStack_57 [23];
long local_40;
local_40 = *(long *)(in_FS_OFFSET + 0x28);
std::locale::locale(local_380);
local_378 = (int [16])0x0;
/* try { // try from 00105ce9 to 00105ced has its CatchHandler @ 00106874 */
std::__detail::_Compiler<std::regex_traits<char>>::_Compiler
((_Compiler<std::regex_traits<char>> *)&local_2a8,"\\w+ly","",local_380,0x10);
auVar2 = local_1a8._0_16_;
this = local_378._8_8_;
local_1a8._0_16_ = (int [16])0x0;
local_378 = auVar2;
if ((_Sp_counted_base<(_Lock_policy)2> *)this != (_Sp_counted_base<(_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(_Lock_policy)2>::_M_release((_Sp_counted_base<(_Lock_policy)2> *)this);
}
local_388[0] = 0x10;
if (local_178 != (void *)0x0) {
for (puVar15 = local_150; puVar15 < (int8 *)(local_130 + 8); puVar15 = puVar15 + 1) {
operator_delete((void *)*puVar15,0x1f8);
}
operator_delete(local_178,local_170 * 8);
}
std::string::_M_dispose();
if ((_Sp_counted_base<(_Lock_policy)2> *)local_1a8._8_8_ !=
(_Sp_counted_base<(_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(_Lock_policy)2>::_M_release
((_Sp_counted_base<(_Lock_policy)2> *)local_1a8._8_8_);
}
std::string::_M_dispose();
local_368 = (int [16])0x0;
local_358 = (int [16])0x0;
/* try { // try from 00105ded to 00105df1 has its CatchHandler @ 00106868 */
bVar4 = std::__detail::
__regex_algo_impl<__normal_iterator<char_const*,std::string>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::string>>>,char,std::regex_traits<char>>
((__normal_iterator)*in_RSI,(int)in_RSI[1] + (__normal_iterator)*in_RSI,
(match_results *)local_368,(regex *)local_388,0,0,false);
if (!bVar4) {
param_1[0x10] = (string)0x0;
*(string **)param_1 = param_1 + 0x10;
*(int8 *)(param_1 + 8) = 0;
goto LAB_001065d0;
}
lVar8 = local_368._8_8_ - local_368._0_8_;
if ((local_368._8_8_ == local_368._0_8_) || (lVar8 == 0x48)) {
plVar10 = (long *)(local_368._0_8_ + lVar8 + -0x48);
if (*(char *)(plVar10 + 2) == '\0') goto LAB_00105e30;
LAB_00106537:
__src = (int *)*plVar10;
local_2a8 = local_298;
local_2a0 = 0;
uVar9 = plVar10[1] - (long)__src;
local_390 = uVar9;
if (uVar9 < 0x10) {
if (uVar9 == 1) {
local_298[0] = CONCAT71(local_298[0]._1_7_,*__src);
}
else if (uVar9 != 0) goto LAB_00106745;
}
else {
/* try { // try from 00106728 to 0010672c has its CatchHandler @ 00106868 */
local_2a8 = (ulong *)std::string::_M_create((ulong *)&local_2a8,(ulong)&local_390);
local_298[0] = local_390;
LAB_00106745:
memcpy(local_2a8,__src,uVar9);
}
*(int *)((long)local_2a8 + local_390) = 0;
lVar8 = local_368._8_8_ - local_368._0_8_;
local_2a0 = local_390;
}
else {
plVar10 = (long *)local_368._0_8_;
if (*(char *)(local_368._0_8_ + 0x10) != '\0') goto LAB_00106537;
LAB_00105e30:
local_2a8 = local_298;
local_298[0] = (ulong)local_298[0]._1_7_ << 8;
local_2a0 = 0;
}
local_3c8 = local_298;
if (local_368._8_8_ == local_368._0_8_) {
uVar9 = *(long *)(local_368._0_8_ + -0x48) - local_358._8_8_;
LAB_00106507:
plVar10 = (long *)(local_368._0_8_ + lVar8 + -0x48);
cVar5 = *(char *)(plVar10 + 2);
}
else {
uVar9 = *(long *)local_368._0_8_ - local_358._8_8_;
if (lVar8 == 0x48) goto LAB_00106507;
cVar5 = *(char *)(local_368._0_8_ + 0x10);
plVar10 = (long *)local_368._0_8_;
}
if (cVar5 != '\0') {
uVar9 = uVar9 + (plVar10[1] - *plVar10);
}
uVar6 = uVar9;
if ((long)uVar9 < 1) {
uVar6 = -uVar9;
}
if (uVar6 < 10) {
iVar12 = 1;
}
else if (uVar6 < 100) {
iVar12 = 2;
}
else if (uVar6 < 1000) {
iVar12 = 3;
}
else if (uVar6 < 10000) {
iVar12 = 4;
}
else {
uVar11 = uVar6;
iVar12 = 1;
do {
iVar14 = iVar12;
iVar12 = iVar14 + 4;
if (uVar11 < 100000) goto LAB_00105f29;
if (uVar11 < 1000000) {
iVar12 = iVar14 + 5;
goto LAB_00105f29;
}
if (uVar11 < 10000000) {
iVar12 = iVar14 + 6;
goto LAB_00105f29;
}
bVar4 = 99999999 < uVar11;
uVar11 = uVar11 / 10000;
} while (bVar4);
iVar12 = iVar14 + 7;
}
LAB_00105f29:
local_308 = local_2f8;
/* try { // try from 00105f55 to 00105f59 has its CatchHandler @ 0010685c */
std::string::_M_construct((ulong)&local_308,(char)iVar12 - (char)((long)uVar9 >> 0x3f));
uVar13 = iVar12 - 1;
pcVar16 = (char *)((long)local_308 - ((long)uVar9 >> 0x3f));
local_118 = _DAT_0011c210;
uStack_110 = _UNK_0011c218;
local_108 = _DAT_0011c220;
uStack_100 = _UNK_0011c228;
local_f8 = _DAT_0011c230;
uStack_f0 = _UNK_0011c238;
local_e8 = _DAT_0011c240;
uStack_e0 = _UNK_0011c248;
local_d8 = _DAT_0011c250;
uStack_d0 = _UNK_0011c258;
local_c8 = _DAT_0011c260;
uStack_c0 = _UNK_0011c268;
local_b8 = _DAT_0011c270;
uStack_b0 = _UNK_0011c278;
local_a8 = _DAT_0011c280;
uStack_a0 = _UNK_0011c288;
local_98 = _DAT_0011c290;
uStack_90 = _UNK_0011c298;
local_88 = _DAT_0011c2a0;
uStack_80 = _UNK_0011c2a8;
local_78 = _DAT_0011c2b0;
uStack_70 = _UNK_0011c2b8;
local_68 = _DAT_0011c2c0;
uStack_60 = (int)_UNK_0011c2c8;
uStack_5f = (int7)s_293949596979899_0011c2d0._0_8_;
cStack_58 = SUB81(s_293949596979899_0011c2d0._0_8_,7);
acStack_57[0] = s_293949596979899_0011c2d0[8];
acStack_57[1] = s_293949596979899_0011c2d0[9];
acStack_57[2] = s_293949596979899_0011c2d0[10];
acStack_57[3] = s_293949596979899_0011c2d0[0xb];
acStack_57[4] = s_293949596979899_0011c2d0[0xc];
acStack_57[5] = s_293949596979899_0011c2d0[0xd];
acStack_57[6] = s_293949596979899_0011c2d0[0xe];
acStack_57[7] = s_293949596979899_0011c2d0[0xf];
local_3a0 = uVar6;
if (99 < uVar6) {
do {
auVar2._8_8_ = 0;
auVar2._0_8_ = uVar6 >> 2;
local_3a0 = (uVar6 >> 2) / 0x19;
lVar8 = (uVar6 + ((SUB168(auVar2 * ZEXT816(0x28f5c28f5c28f5c3),8) & 0xfffffffffffffffc) +
local_3a0) * -0x14) * 2;
cVar5 = *(char *)((long)&local_118 + lVar8);
pcVar16[uVar13] = *(char *)((long)&local_118 + lVar8 + 1);
uVar1 = uVar13 - 1;
uVar13 = uVar13 - 2;
pcVar16[uVar1] = cVar5;
bVar4 = 9999 < uVar6;
uVar6 = local_3a0;
} while (bVar4);
}
cVar5 = (char)local_3a0 + '0';
if (9 < local_3a0) {
pcVar16[1] = *(char *)((long)&local_118 + local_3a0 * 2 + 1);
cVar5 = *(char *)((long)&local_118 + local_3a0 * 2);
}
*pcVar16 = cVar5;
if (local_368._8_8_ == local_368._0_8_) {
lVar8 = 0;
LAB_001060e6:
plVar10 = (long *)(local_368._0_8_ + lVar8 + -0x48);
}
else {
lVar8 = local_368._8_8_ - local_368._0_8_;
plVar10 = (long *)local_368._0_8_;
if (lVar8 == 0x48) goto LAB_001060e6;
}
uVar6 = *plVar10 - local_358._8_8_;
uVar9 = uVar6;
if ((long)uVar6 < 1) {
uVar9 = -uVar6;
}
if (uVar9 < 10) {
iVar12 = 1;
}
else if (uVar9 < 100) {
iVar12 = 2;
}
else if (uVar9 < 1000) {
iVar12 = 3;
}
else if (uVar9 < 10000) {
iVar12 = 4;
}
else {
uVar11 = uVar9;
iVar12 = 1;
do {
iVar14 = iVar12;
iVar12 = iVar14 + 4;
if (uVar11 < 100000) goto LAB_00106199;
if (uVar11 < 1000000) {
iVar12 = iVar14 + 5;
goto LAB_00106199;
}
if (uVar11 < 10000000) {
iVar12 = iVar14 + 6;
goto LAB_00106199;
}
bVar4 = 99999999 < uVar11;
uVar11 = uVar11 / 10000;
} while (bVar4);
iVar12 = iVar14 + 7;
}
LAB_00106199:
local_348 = local_338;
/* try { // try from 001061be to 001061c2 has its CatchHandler @ 00106850 */
std::string::_M_construct((ulong)&local_348,(char)iVar12 - (char)((long)uVar6 >> 0x3f));
uVar13 = iVar12 - 1;
pcVar16 = local_348 + -((long)uVar6 >> 0x3f);
local_118 = _DAT_0011c210;
uStack_110 = _UNK_0011c218;
local_108 = _DAT_0011c220;
uStack_100 = _UNK_0011c228;
local_f8 = _DAT_0011c230;
uStack_f0 = _UNK_0011c238;
local_e8 = _DAT_0011c240;
uStack_e0 = _UNK_0011c248;
local_d8 = _DAT_0011c250;
uStack_d0 = _UNK_0011c258;
local_c8 = _DAT_0011c260;
uStack_c0 = _UNK_0011c268;
local_b8 = _DAT_0011c270;
uStack_b0 = _UNK_0011c278;
local_a8 = _DAT_0011c280;
uStack_a0 = _UNK_0011c288;
local_98 = _DAT_0011c290;
uStack_90 = _UNK_0011c298;
local_88 = _DAT_0011c2a0;
uStack_80 = _UNK_0011c2a8;
local_78 = _DAT_0011c2b0;
uStack_70 = _UNK_0011c2b8;
local_68 = _DAT_0011c2c0;
uStack_60 = (int)_UNK_0011c2c8;
uStack_5f = (int7)s_293949596979899_0011c2d0._0_8_;
cStack_58 = SUB81(s_293949596979899_0011c2d0._0_8_,7);
acStack_57[0] = s_293949596979899_0011c2d0[8];
acStack_57[1] = s_293949596979899_0011c2d0[9];
acStack_57[2] = s_293949596979899_0011c2d0[10];
acStack_57[3] = s_293949596979899_0011c2d0[0xb];
acStack_57[4] = s_293949596979899_0011c2d0[0xc];
acStack_57[5] = s_293949596979899_0011c2d0[0xd];
acStack_57[6] = s_293949596979899_0011c2d0[0xe];
acStack_57[7] = s_293949596979899_0011c2d0[0xf];
local_3a0 = uVar9;
if (99 < uVar9) {
do {
auVar3._8_8_ = 0;
auVar3._0_8_ = uVar9 >> 2;
local_3a0 = (uVar9 >> 2) / 0x19;
lVar8 = (uVar9 + ((SUB168(auVar3 * ZEXT816(0x28f5c28f5c28f5c3),8) & 0xfffffffffffffffc) +
local_3a0) * -0x14) * 2;
cVar5 = *(char *)((long)&local_118 + lVar8);
pcVar16[uVar13] = *(char *)((long)&local_118 + lVar8 + 1);
uVar1 = uVar13 - 1;
uVar13 = uVar13 - 2;
pcVar16[uVar1] = cVar5;
bVar4 = 9999 < uVar9;
uVar9 = local_3a0;
} while (bVar4);
}
cVar5 = (char)local_3a0 + '0';
if (9 < local_3a0) {
pcVar16[1] = *(char *)((long)&local_118 + local_3a0 * 2 + 1);
cVar5 = *(char *)((long)&local_118 + local_3a0 * 2);
}
*pcVar16 = cVar5;
/* try { // try from 00106349 to 0010634d has its CatchHandler @ 00106844 */
psVar7 = (string *)std::string::_M_replace_aux((ulong)&local_348,local_340,0,'\x01');
std::string::string((string *)&local_328,psVar7);
uVar9 = local_320 + local_300;
if (local_328 == local_318) {
if ((0xf < uVar9) && (local_308 != local_2f8)) goto LAB_001063b0;
LAB_001063b9:
if (0x3fffffffffffffffU - local_320 < local_300) {
if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
/* WARNING: Subroutine does not return */
/* try { // try from 00106818 to 0010681c has its CatchHandler @ 0010682c */
std::__throw_length_error("basic_string::append");
}
/* try { // try from 001063d2 to 001063d6 has its CatchHandler @ 0010682c */
psVar7 = (string *)std::string::_M_append((char *)&local_328,(ulong)local_308);
}
else {
if (uVar9 <= local_318[0]) goto LAB_001063b9;
if (local_308 == local_2f8) {
local_2f8[0] = 0xf;
}
LAB_001063b0:
if (local_2f8[0] < uVar9) goto LAB_001063b9;
/* try { // try from 0010665b to 0010665f has its CatchHandler @ 0010682c */
psVar7 = (string *)std::string::_M_replace((ulong)&local_308,0,(char *)0x0,(ulong)local_328);
}
std::string::string(local_2e8,psVar7);
if (0x3fffffffffffffffU - local_2e0 < 2) {
if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
/* WARNING: Subroutine does not return */
/* try { // try from 001067fd to 00106801 has its CatchHandler @ 00106880 */
std::__throw_length_error("basic_string::append");
}
/* try { // try from 00106413 to 00106417 has its CatchHandler @ 00106880 */
psVar7 = (string *)std::string::_M_append((char *)local_2e8,0x11b75f);
std::string::string((string *)&local_2c8,psVar7);
uVar9 = local_2c0 + local_2a0;
uVar6 = local_298[0];
if (local_2c8 == local_2b8) {
if ((0xf < uVar9) && (local_2a8 != local_3c8)) goto LAB_00106481;
LAB_0010648a:
if (0x3fffffffffffffffU - local_2c0 < local_2a0) {
if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
/* WARNING: Subroutine does not return */
/* try { // try from 001067e2 to 001067e6 has its CatchHandler @ 00106838 */
std::__throw_length_error("basic_string::append");
}
/* try { // try from 001064a7 to 001064ab has its CatchHandler @ 00106838 */
psVar7 = (string *)std::string::_M_append((char *)&local_2c8,(ulong)local_2a8);
}
else {
if (uVar9 <= local_2b8[0]) goto LAB_0010648a;
if (local_2a8 == local_3c8) {
uVar6 = 0xf;
}
LAB_00106481:
if (uVar6 < uVar9) goto LAB_0010648a;
/* try { // try from 00106673 to 00106677 has its CatchHandler @ 00106838 */
psVar7 = (string *)std::string::_M_replace((ulong)&local_2a8,0,(char *)0x0,(ulong)local_2c8);
}
std::string::string(param_1,psVar7);
std::string::_M_dispose();
std::string::_M_dispose();
std::string::_M_dispose();
std::string::_M_dispose();
std::string::_M_dispose();
std::string::_M_dispose();
LAB_001065d0:
std::
vector<std::sub_match<__normal_iterator<char_const*,std::string>>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::string>>>>
::~vector((vector<std::sub_match<__normal_iterator<char_const*,std::string>>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::string>>>>
*)local_368);
if ((_Sp_counted_base<(_Lock_policy)2> *)local_378._8_8_ !=
(_Sp_counted_base<(_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(_Lock_policy)2>::_M_release
((_Sp_counted_base<(_Lock_policy)2> *)local_378._8_8_);
}
std::locale::~locale(local_380);
if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return param_1;
} |
2,336 | func0 |
#include <vector>
#include <string>
#include <algorithm>
#include <cassert>
struct Item {
std::string name;
double price;
bool operator==(const Item& other) const {
return name == other.name && price == other.price;
}
};
| std::vector<Item> func0(const std::vector<Item>& items, int n){
std::vector<Item> sorted_items = items;
std::sort(sorted_items.begin(), sorted_items.end(), [&](const Item& a, const Item& b) {
return a.price > b.price;
});
if(n > sorted_items.size()) n = sorted_items.size();
return std::vector<Item>(sorted_items.begin(), sorted_items.begin() + n);
}
| int main(){
std::vector<Item> result1 = func0(
{ {"Item-1", 101.1}, {"Item-2", 555.22} }, 1
);
std::vector<Item> expected1 = { {"Item-2", 555.22} };
assert(result1 == expected1);
std::vector<Item> result2 = func0(
{ {"Item-1", 101.1}, {"Item-2", 555.22}, {"Item-3", 45.09} }, 2
);
std::vector<Item> expected2 = { {"Item-2", 555.22}, {"Item-1", 101.1} };
assert(result2 == expected2);
std::vector<Item> result3 = func0(
{ {"Item-1", 101.1}, {"Item-2", 555.22}, {"Item-3", 45.09}, {"Item-4", 22.75} }, 1
);
std::vector<Item> expected3 = { {"Item-2", 555.22} };
assert(result3 == expected3);
return 0;
}
| O0 | cpp | func0(std::vector<Item, std::allocator<Item> > const&, int)::{lambda(Item const&, Item const&)#1}::operator()(Item const&, Item const&) const:
push %rbp
mov %rsp,%rbp
mov %rdi,-0x8(%rbp)
mov %rsi,-0x10(%rbp)
mov %rdx,-0x18(%rbp)
mov -0x10(%rbp),%rax
movsd 0x20(%rax),%xmm0
mov -0x18(%rbp),%rax
movsd 0x20(%rax),%xmm1
comisd %xmm1,%xmm0
seta %al
pop %rbp
retq
| _ZZ5func0RKSt6vectorI4ItemSaIS0_EEiENKUlRKS0_S6_E_clES6_S6_:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_10]
movsd xmm0, qword ptr [rax+20h]
mov rax, [rbp+var_18]
movsd xmm1, qword ptr [rax+20h]
comisd xmm0, xmm1
setnbe al
pop rbp
retn | bool func0(std::vector<Item> const&,int)::{lambda(Item const&,Item const&)#1}::operator()(
long long a1,
long long a2,
long long a3)
{
return *(double *)(a2 + 32) > *(double *)(a3 + 32);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x68
MOV qword ptr [RBP + -0x58],RDI
MOV qword ptr [RBP + -0x60],RSI
MOV dword ptr [RBP + -0x64],EDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RDX,qword ptr [RBP + -0x60]
LEA RAX,[RBP + -0x30]
MOV RSI,RDX
MOV RDI,RAX
LAB_0010252a:
CALL 0x00104b44
LEA RAX,[RBP + -0x30]
MOV RDI,RAX
CALL 0x00104d52
MOV RBX,RAX
LEA RAX,[RBP + -0x30]
MOV RDI,RAX
CALL 0x00104d06
MOV RSI,RBX
MOV RDI,RAX
LAB_00102550:
CALL 0x001036b8
MOV EAX,dword ptr [RBP + -0x64]
MOVSXD RBX,EAX
LEA RAX,[RBP + -0x30]
MOV RDI,RAX
CALL 0x00104da2
CMP RAX,RBX
SETC AL
TEST AL,AL
JZ 0x00102580
LEA RAX,[RBP + -0x30]
MOV RDI,RAX
CALL 0x00104da2
MOV dword ptr [RBP + -0x64],EAX
LAB_00102580:
LEA RAX,[RBP + -0x41]
MOV qword ptr [RBP + -0x38],RAX
NOP
NOP
MOV EAX,dword ptr [RBP + -0x64]
MOVSXD RBX,EAX
LEA RAX,[RBP + -0x30]
MOV RDI,RAX
CALL 0x00104d06
MOV qword ptr [RBP + -0x40],RAX
LEA RAX,[RBP + -0x40]
MOV RSI,RBX
MOV RDI,RAX
CALL 0x00104dd4
MOV RBX,RAX
LEA RAX,[RBP + -0x30]
MOV RDI,RAX
CALL 0x00104d06
MOV RSI,RAX
LEA RDX,[RBP + -0x41]
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,RDX
MOV RDX,RBX
MOV RDI,RAX
LAB_001025d2:
CALL 0x00104e44
NOP
LEA RAX,[RBP + -0x41]
MOV RDI,RAX
CALL 0x0010547e
NOP
LEA RAX,[RBP + -0x30]
MOV RDI,RAX
CALL 0x00104cac
NOP
MOV RAX,qword ptr [RBP + -0x18]
SUB RAX,qword ptr FS:[0x28]
JZ 0x00102650
JMP 0x0010264b
LAB_0010264b:
CALL 0x00102350
LAB_00102650:
MOV RAX,qword ptr [RBP + -0x58]
MOV RBX,qword ptr [RBP + -0x8]
LEAVE
RET | /* func0(std::vector<Item, std::allocator<Item> > const&, int) */
vector * func0(vector *param_1,int param_2)
{
__normal_iterator _Var1;
__normal_iterator _Var2;
ulong uVar3;
int in_EDX;
_lambda_Item_const__Item_const___1_ extraout_EDX;
int4 in_register_00000034;
long in_FS_OFFSET;
int local_6c;
allocator local_49;
int8 local_48;
allocator *local_40;
vector<Item,std::allocator<Item>> local_38 [24];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
std::vector<Item,std::allocator<Item>>::vector
(local_38,(vector *)CONCAT44(in_register_00000034,param_2));
_Var1 = std::vector<Item,std::allocator<Item>>::end(local_38);
_Var2 = std::vector<Item,std::allocator<Item>>::begin(local_38);
/* try { // try from 00102550 to 00102554 has its CatchHandler @ 00102619 */
std::
sort<__normal_iterator<Item*,std::vector<Item,std::allocator<Item>>>,func0(std::vector<Item,std::allocator<Item>>const&,int)::_lambda(Item_const&,Item_const&)_1_>
(_Var2,_Var1,extraout_EDX);
uVar3 = std::vector<Item,std::allocator<Item>>::size(local_38);
local_6c = in_EDX;
if (uVar3 < (ulong)(long)in_EDX) {
local_6c = std::vector<Item,std::allocator<Item>>::size(local_38);
}
local_40 = &local_49;
local_48 = std::vector<Item,std::allocator<Item>>::begin(local_38);
_Var1 = __normal_iterator<Item*,std::vector<Item,std::allocator<Item>>>::operator+
((__normal_iterator<Item*,std::vector<Item,std::allocator<Item>>> *)&local_48,
(long)local_6c);
_Var2 = std::vector<Item,std::allocator<Item>>::begin(local_38);
/* try { // try from 001025d2 to 001025d6 has its CatchHandler @ 00102603 */
std::vector<Item,std::allocator<Item>>::
vector<__normal_iterator<Item*,std::vector<Item,std::allocator<Item>>>,void>
((vector<Item,std::allocator<Item>> *)param_1,_Var2,_Var1,&local_49);
std::__new_allocator<Item>::~__new_allocator((__new_allocator<Item> *)&local_49);
std::vector<Item,std::allocator<Item>>::~vector(local_38);
if (local_20 != *(long *)(in_FS_OFFSET + 0x28)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return param_1;
} |
2,337 | func0 |
#include <vector>
#include <string>
#include <algorithm>
#include <cassert>
struct Item {
std::string name;
double price;
bool operator==(const Item& other) const {
return name == other.name && price == other.price;
}
};
| std::vector<Item> func0(const std::vector<Item>& items, int n){
std::vector<Item> sorted_items = items;
std::sort(sorted_items.begin(), sorted_items.end(), [&](const Item& a, const Item& b) {
return a.price > b.price;
});
if(n > sorted_items.size()) n = sorted_items.size();
return std::vector<Item>(sorted_items.begin(), sorted_items.begin() + n);
}
| int main(){
std::vector<Item> result1 = func0(
{ {"Item-1", 101.1}, {"Item-2", 555.22} }, 1
);
std::vector<Item> expected1 = { {"Item-2", 555.22} };
assert(result1 == expected1);
std::vector<Item> result2 = func0(
{ {"Item-1", 101.1}, {"Item-2", 555.22}, {"Item-3", 45.09} }, 2
);
std::vector<Item> expected2 = { {"Item-2", 555.22}, {"Item-1", 101.1} };
assert(result2 == expected2);
std::vector<Item> result3 = func0(
{ {"Item-1", 101.1}, {"Item-2", 555.22}, {"Item-3", 45.09}, {"Item-4", 22.75} }, 1
);
std::vector<Item> expected3 = { {"Item-2", 555.22} };
assert(result3 == expected3);
return 0;
}
| O1 | cpp | void std::__adjust_heap<__gnu_cxx::__normal_iterator<Item*, std::vector<Item, std::allocator<Item> > >, long, Item, __gnu_cxx::__ops::_Iter_comp_iter<func0(std::vector<Item, std::allocator<Item> > const&, int)::{lambda(Item const&, Item const&)#1}> >(__gnu_cxx::__normal_iterator<Item*, std::vector<Item, std::allocator<Item> > >, long, long, Item, __gnu_cxx::__ops::_Iter_comp_iter<func0(std::vector<Item, std::allocator<Item> > const&, int)::{lambda(Item const&, Item const&)#1}>):
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x58,%rsp
mov %rdi,0x10(%rsp)
mov %rsi,%r14
mov %rdx,0x18(%rsp)
mov %rcx,%r15
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
mov %rdi,%r13
sub $0x1,%rdx
mov %rdx,%rax
shr $0x3f,%rax
add %rdx,%rax
sar %rax
mov %rax,0x8(%rsp)
cmp %rax,%rsi
jge 1427 <_ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_SH_T1_T2_+0x13e>
mov %rsi,%rdx
jmp 1390 <_ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_SH_T1_T2_+0xa7>
mov 0x8(%rbp),%rdx
test %rdx,%rdx
je 1356 <_ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_SH_T1_T2_+0x6d>
cmp $0x1,%rdx
je 141c <_ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_SH_T1_T2_+0x133>
callq 1180 <memcpy@plt>
mov 0x8(%rbp),%rax
mov %rax,0x8(%r12)
mov (%r12),%rdx
movb $0x0,(%rdx,%rax,1)
movq $0x0,0x8(%rbp)
mov 0x0(%rbp),%rax
movb $0x0,(%rax)
movsd 0x20(%rbp),%xmm0
movsd %xmm0,0x20(%r12)
cmp 0x8(%rsp),%rbx
jge 142a <_ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_SH_T1_T2_+0x141>
mov %rbx,%rdx
lea 0x1(%rdx),%rcx
lea (%rcx,%rcx,1),%rbx
lea -0x1(%rbx),%rax
lea (%rax,%rax,4),%rsi
lea (%rbx,%rcx,8),%rcx
movsd 0x20(%r13,%rcx,8),%xmm0
ucomisd 0x20(%r13,%rsi,8),%xmm0
cmova %rax,%rbx
lea (%rbx,%rbx,4),%rax
lea 0x0(%r13,%rax,8),%rbp
lea (%rdx,%rdx,4),%rax
lea 0x0(%r13,%rax,8),%r12
mov (%r12),%rdi
mov 0x0(%rbp),%rax
lea 0x10(%rbp),%rsi
cmp %rsi,%rax
je 133e <_ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_SH_T1_T2_+0x55>
lea 0x10(%r12),%rdx
cmp %rdx,%rdi
je 1794 <_ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_SH_T1_T2_+0x4ab>
mov 0x10(%r12),%rdx
mov %rax,(%r12)
mov 0x8(%rbp),%rax
mov %rax,0x8(%r12)
mov 0x10(%rbp),%rax
mov %rax,0x10(%r12)
test %rdi,%rdi
je 17aa <_ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_SH_T1_T2_+0x4c1>
mov %rdi,0x0(%rbp)
mov %rdx,0x10(%rbp)
jmpq 1367 <_ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_SH_T1_T2_+0x7e>
movzbl 0x10(%rbp),%eax
mov %al,(%rdi)
jmpq 1356 <_ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_SH_T1_T2_+0x6d>
mov %rsi,%rbx
mov 0x18(%rsp),%rax
test $0x1,%al
jne 1450 <_ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_SH_T1_T2_+0x167>
mov %rax,%rdx
sub $0x2,%rdx
mov %rdx,%rax
shr $0x3f,%rax
add %rax,%rdx
sar %rdx
cmp %rbx,%rdx
je 1566 <_ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_SH_T1_T2_+0x27d>
lea 0x30(%rsp),%rax
mov %rax,0x20(%rsp)
mov (%r15),%rdx
lea 0x10(%r15),%rax
cmp %rax,%rdx
je 1613 <_ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_SH_T1_T2_+0x32a>
mov %rdx,0x20(%rsp)
mov 0x10(%r15),%rdx
mov %rdx,0x30(%rsp)
mov 0x8(%r15),%rdx
mov %rdx,0x28(%rsp)
mov %rax,(%r15)
movq $0x0,0x8(%r15)
movb $0x0,0x10(%r15)
movsd 0x20(%r15),%xmm0
movsd %xmm0,0x40(%rsp)
lea -0x1(%rbx),%rax
mov %rax,%r12
shr $0x3f,%r12
add %rax,%r12
sar %r12
cmp %r14,%rbx
jg 1684 <_ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_SH_T1_T2_+0x39b>
lea (%rbx,%rbx,4),%rax
mov 0x10(%rsp),%rcx
lea (%rcx,%rax,8),%rbx
mov (%rbx),%rdi
mov 0x20(%rsp),%rax
lea 0x30(%rsp),%rdx
cmp %rdx,%rax
je 1700 <_ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_SH_T1_T2_+0x417>
lea 0x10(%rbx),%rdx
cmp %rdx,%rdi
je 1738 <_ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_SH_T1_T2_+0x44f>
mov 0x10(%rbx),%rdx
mov %rax,(%rbx)
mov 0x28(%rsp),%rax
mov %rax,0x8(%rbx)
mov 0x30(%rsp),%rax
mov %rax,0x10(%rbx)
test %rdi,%rdi
je 174d <_ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_SH_T1_T2_+0x464>
mov %rdi,0x20(%rsp)
mov %rdx,0x30(%rsp)
movq $0x0,0x28(%rsp)
mov 0x20(%rsp),%rax
movb $0x0,(%rax)
movsd 0x40(%rsp),%xmm0
movsd %xmm0,0x20(%rbx)
mov 0x20(%rsp),%rdi
lea 0x30(%rsp),%rax
cmp %rax,%rdi
je 1543 <_ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_SH_T1_T2_+0x25a>
callq 1190 <_ZdlPv@plt>
mov 0x48(%rsp),%rax
xor %fs:0x28,%rax
jne 17b3 <_ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_SH_T1_T2_+0x4ca>
add $0x58,%rsp
pop %rbx
pop %rbp
pop %r12
pop %r13
pop %r14
pop %r15
retq
lea 0x1(%rbx,%rbx,1),%r12
lea (%r12,%r12,4),%rax
mov 0x10(%rsp),%rcx
lea (%rcx,%rax,8),%rbp
lea (%rbx,%rbx,4),%rax
lea (%rcx,%rax,8),%rbx
mov (%rbx),%rdi
mov 0x0(%rbp),%rax
lea 0x10(%rbp),%rsi
cmp %rsi,%rax
je 15e6 <_ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_SH_T1_T2_+0x2fd>
lea 0x10(%rbx),%rdx
cmp %rdx,%rdi
je 1778 <_ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_SH_T1_T2_+0x48f>
mov 0x10(%rbx),%rdx
mov %rax,(%rbx)
mov 0x8(%rbp),%rax
mov %rax,0x8(%rbx)
mov 0x10(%rbp),%rax
mov %rax,0x10(%rbx)
test %rdi,%rdi
je 178b <_ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_SH_T1_T2_+0x4a2>
mov %rdi,0x0(%rbp)
mov %rdx,0x10(%rbp)
movq $0x0,0x8(%rbp)
mov 0x0(%rbp),%rax
movb $0x0,(%rax)
movsd 0x20(%rbp),%xmm0
movsd %xmm0,0x20(%rbx)
mov %r12,%rbx
jmpq 1450 <_ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_SH_T1_T2_+0x167>
mov 0x8(%rbp),%rdx
test %rdx,%rdx
je 15fa <_ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_SH_T1_T2_+0x311>
cmp $0x1,%rdx
je 160b <_ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_SH_T1_T2_+0x322>
callq 1180 <memcpy@plt>
mov 0x8(%rbp),%rax
mov %rax,0x8(%rbx)
mov (%rbx),%rdx
movb $0x0,(%rdx,%rax,1)
jmp 15c5 <_ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_SH_T1_T2_+0x2dc>
movzbl 0x10(%rbp),%eax
mov %al,(%rdi)
jmp 15fa <_ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_SH_T1_T2_+0x311>
movdqu 0x10(%r15),%xmm1
movaps %xmm1,0x30(%rsp)
jmpq 1478 <_ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_SH_T1_T2_+0x18f>
mov 0x8(%rbp),%rdx
test %rdx,%rdx
je 163b <_ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_SH_T1_T2_+0x352>
cmp $0x1,%rdx
je 16f5 <_ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_SH_T1_T2_+0x40c>
callq 1180 <memcpy@plt>
mov 0x8(%rbp),%rax
mov %rax,0x8(%rbx)
mov (%rbx),%rdx
movb $0x0,(%rdx,%rax,1)
movq $0x0,0x8(%rbp)
mov 0x0(%rbp),%rax
movb $0x0,(%rax)
movsd 0x20(%rbp),%xmm0
movsd %xmm0,0x20(%rbx)
lea -0x1(%r12),%rdx
mov %rdx,%rax
shr $0x3f,%rax
add %rdx,%rax
sar %rax
mov %r12,%rbx
cmp %r12,%r14
jge 14b7 <_ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_SH_T1_T2_+0x1ce>
mov %rax,%r12
lea (%r12,%r12,4),%rax
lea 0x0(%r13,%rax,8),%rbp
movsd 0x20(%rbp),%xmm0
comisd 0x40(%rsp),%xmm0
jbe 14b7 <_ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_SH_T1_T2_+0x1ce>
lea (%rbx,%rbx,4),%rax
lea 0x0(%r13,%rax,8),%rbx
mov (%rbx),%rdi
mov 0x0(%rbp),%rax
lea 0x10(%rbp),%rsi
cmp %rsi,%rax
je 1623 <_ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_SH_T1_T2_+0x33a>
lea 0x10(%rbx),%rdx
cmp %rdx,%rdi
je 175c <_ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_SH_T1_T2_+0x473>
mov 0x10(%rbx),%rdx
mov %rax,(%rbx)
mov 0x8(%rbp),%rax
mov %rax,0x8(%rbx)
mov 0x10(%rbp),%rax
mov %rax,0x10(%rbx)
test %rdi,%rdi
je 176f <_ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_SH_T1_T2_+0x486>
mov %rdi,0x0(%rbp)
mov %rdx,0x10(%rbp)
jmpq 164a <_ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_SH_T1_T2_+0x361>
movzbl 0x10(%rbp),%eax
mov %al,(%rdi)
jmpq 163b <_ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_SH_T1_T2_+0x352>
mov 0x28(%rsp),%rdx
test %rdx,%rdx
je 171a <_ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_SH_T1_T2_+0x431>
cmp $0x1,%rdx
je 172f <_ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_SH_T1_T2_+0x446>
lea 0x30(%rsp),%rsi
callq 1180 <memcpy@plt>
mov 0x28(%rsp),%rax
mov %rax,0x8(%rbx)
mov (%rbx),%rdx
movb $0x0,(%rdx,%rax,1)
jmpq 1513 <_ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_SH_T1_T2_+0x22a>
movzbl 0x30(%rsp),%eax
mov %al,(%rdi)
jmp 171a <_ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_SH_T1_T2_+0x431>
mov %rax,(%rbx)
mov 0x28(%rsp),%rax
mov %rax,0x8(%rbx)
mov 0x30(%rsp),%rax
mov %rax,0x10(%rbx)
lea 0x30(%rsp),%rax
mov %rax,0x20(%rsp)
jmpq 1513 <_ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_SH_T1_T2_+0x22a>
mov %rax,(%rbx)
mov 0x8(%rbp),%rax
mov %rax,0x8(%rbx)
mov 0x10(%rbp),%rax
mov %rax,0x10(%rbx)
mov %rsi,0x0(%rbp)
jmpq 164a <_ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_SH_T1_T2_+0x361>
mov %rax,(%rbx)
mov 0x8(%rbp),%rax
mov %rax,0x8(%rbx)
mov 0x10(%rbp),%rax
mov %rax,0x10(%rbx)
mov %rsi,0x0(%rbp)
jmpq 15c5 <_ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_SH_T1_T2_+0x2dc>
mov %rax,(%r12)
mov 0x8(%rbp),%rax
mov %rax,0x8(%r12)
mov 0x10(%rbp),%rax
mov %rax,0x10(%r12)
mov %rsi,0x0(%rbp)
jmpq 1367 <_ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_SH_T1_T2_+0x7e>
callq 11b0 <__stack_chk_fail@plt>
| _ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_:
push rbx
sub rsp, 30h
mov rax, rdi
mov rdx, fs:28h
mov [rsp+38h+var_10], rdx
xor edx, edx
lea rdx, [rsp+38h+var_28]
mov [rsp+38h+var_38], rdx
mov rdx, [rdi]
lea rcx, [rdi+10h]
cmp rdx, rcx
jz short loc_13CA
mov [rsp+38h+var_38], rdx
mov rdx, [rdi+10h]
mov [rsp+38h+var_28], rdx
loc_1363:
mov rdx, [rax+8]
mov [rsp+38h+var_30], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
movsd xmm0, qword ptr [rax+20h]
movsd [rsp+38h+var_18], xmm0
lea rdx, [rax-18h]
comisd xmm0, qword ptr [rax-8]
ja loc_149A
loc_1395:
mov rax, [rsp+38h+var_38]
lea rdx, [rsp+38h+var_28]
cmp rax, rdx
jz loc_1642
mov [rdi], rax
mov rax, [rsp+38h+var_30]
mov [rdi+8], rax
mov rax, [rsp+38h+var_28]
mov [rdi+10h], rax
loc_13BC:
lea rax, [rsp+38h+var_28]
mov [rsp+38h+var_38], rax
jmp loc_15F1
loc_13CA:
lea r9, [rsp+38h+var_28]
mov rbx, [rdi+8]
lea rdx, [rbx+1]
mov r8, r9
mov r10, rcx
cmp edx, 8
jnb short loc_1421
loc_13E2:
mov esi, 0
test dl, 4
jz short loc_13F7
mov esi, [r10]
mov [r8], esi
mov esi, 4
loc_13F7:
test dl, 2
jz short loc_140A
movzx r9d, word ptr [r10+rsi]
mov [r8+rsi], r9w
add rsi, 2
loc_140A:
test dl, 1
jz loc_1363
movzx edx, byte ptr [r10+rsi]
mov [r8+rsi], dl
jmp loc_1363
loc_1421:
mov ebx, edx
and ebx, 0FFFFFFF8h
mov esi, 0
loc_142B:
mov r8d, esi
mov r11, [rcx+r8]
mov [r9+r8], r11
add esi, 8
cmp esi, ebx
jb short loc_142B
mov esi, esi
lea r8, [r9+rsi]
add r10, rsi
jmp short loc_13E2
loc_1448:
mov rsi, [rdx-10h]
cmp rdx, rsi
jz loc_14E0
mov [rdx+18h], rsi
mov rcx, [rdx-8]
mov [rdx+20h], rcx
mov rcx, [rdx]
mov [rdx+28h], rcx
loc_1468:
mov [rax-10h], rax
loc_146C:
mov qword ptr [rax-8], 0
mov rcx, [rax-10h]
mov byte ptr [rcx], 0
movsd xmm0, qword ptr [rax+10h]
movsd qword ptr [rax+38h], xmm0
sub rdx, 28h ; '('
movsd xmm0, [rsp+38h+var_18]
comisd xmm0, qword ptr [rdx+10h]
jbe loc_15A4
loc_149A:
lea rdi, [rdx-10h]
mov rax, rdx
mov rcx, [rdx+18h]
lea rsi, [rdx+28h]
cmp rcx, rsi
jz short loc_1448
mov rsi, [rdx-10h]
cmp rdx, rsi
jz loc_1717
mov r8, [rax+28h]
mov [rax+18h], rsi
mov rsi, [rax-8]
mov [rax+20h], rsi
mov rsi, [rax]
mov [rax+28h], rsi
test rcx, rcx
jz short loc_1468
mov [rax-10h], rcx
mov [rax], r8
jmp short loc_146C
loc_14E0:
mov r8, [rsi-8]
jmp loc_171B
loc_14E9:
cmp r8, 1
jz short loc_152B
mov r10, rsi
cmp r8d, 8
jnb short loc_154C
test r8b, 4
jnz short loc_1536
test r8d, r8d
jz loc_1731
movzx esi, byte ptr [rsi]
mov [rcx], sil
test r8b, 2
jz loc_1731
mov r9d, r8d
movzx esi, word ptr [r10+r9-2]
mov [rcx+r9-2], si
jmp loc_1731
loc_152B:
movzx esi, byte ptr [rsi]
mov [rcx], sil
jmp loc_1731
loc_1536:
mov esi, [rsi]
mov [rcx], esi
mov r9d, r8d
mov esi, [r10+r9-4]
mov [rcx+r9-4], esi
jmp loc_1731
loc_154C:
mov r9, [rsi]
mov [rcx], r9
mov r9d, r8d
mov r10, [rsi+r9-8]
mov [rcx+r9-8], r10
lea r11, [rcx+8]
and r11, 0FFFFFFFFFFFFFFF8h
sub rcx, r11
mov r9, rcx
sub rsi, rcx
mov r10, rsi
add r9d, r8d
and r9d, 0FFFFFFF8h
cmp r9d, 8
jb loc_1731
and r9d, 0FFFFFFF8h
mov ecx, 0
loc_158D:
mov esi, ecx
mov r8, [r10+rsi]
mov [r11+rsi], r8
add ecx, 8
cmp ecx, r9d
jb short loc_158D
jmp loc_1731
loc_15A4:
mov rax, [rdi]
lea rcx, [rdi+10h]
cmp rax, rcx
jz loc_1395
mov rdx, [rsp+38h+var_38]
lea rcx, [rsp+38h+var_28]
cmp rdx, rcx
jz loc_16F4
mov rcx, [rdi+10h]
mov [rdi], rdx
mov rdx, [rsp+38h+var_30]
mov [rdi+8], rdx
mov rdx, [rsp+38h+var_28]
mov [rdi+10h], rdx
test rax, rax
jz loc_13BC
mov [rsp+38h+var_38], rax
mov [rsp+38h+var_28], rcx
loc_15F1:
mov [rsp+38h+var_30], 0
mov rax, [rsp+38h+var_38]
mov byte ptr [rax], 0
movsd xmm0, [rsp+38h+var_18]
movsd qword ptr [rdi+20h], xmm0
mov rdi, [rsp+38h+var_38]; void *
lea rax, [rsp+38h+var_28]
cmp rdi, rax
jz short loc_1628
mov rax, [rsp+38h+var_28]
lea rsi, [rax+1]; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1628:
mov rax, [rsp+38h+var_10]
sub rax, fs:28h
jnz loc_1746
add rsp, 30h
pop rbx
retn
loc_1642:
mov rdx, [rsp+38h+var_30]
mov rax, rcx
jmp loc_16F9
loc_164F:
cmp rdx, 1
jz short loc_168F
lea rsi, [rsp+38h+var_28]
mov r8, rax
cmp edx, 8
jnb short loc_16AC
test dl, 4
jnz short loc_1698
test edx, edx
jz loc_1702
movzx eax, byte ptr [rsp+38h+var_28]
mov [r8], al
test dl, 2
jz loc_1702
mov ecx, edx
movzx eax, word ptr [rsi+rcx-2]
mov [r8+rcx-2], ax
jmp short loc_1702
loc_168F:
movzx edx, byte ptr [rsp+38h+var_28]
mov [rax], dl
jmp short loc_1702
loc_1698:
mov eax, dword ptr [rsp+38h+var_28]
mov [r8], eax
mov ecx, edx
mov eax, [rsi+rcx-4]
mov [r8+rcx-4], eax
jmp short loc_1702
loc_16AC:
mov rcx, [rsp+38h+var_28]
mov [rax], rcx
mov ecx, edx
mov r8, [rsi+rcx-8]
mov [rax+rcx-8], r8
lea r9, [rax+8]
and r9, 0FFFFFFFFFFFFFFF8h
sub rax, r9
sub rsi, rax
lea ecx, [rdx+rax]
and ecx, 0FFFFFFF8h
cmp ecx, 8
jb short loc_1702
and ecx, 0FFFFFFF8h
mov eax, 0
loc_16E1:
mov edx, eax
mov r8, [rsi+rdx]
mov [r9+rdx], r8
add eax, 8
cmp eax, ecx
jb short loc_16E1
jmp short loc_1702
loc_16F4:
mov rdx, [rsp+38h+var_30]
loc_16F9:
test rdx, rdx
jnz loc_164F
loc_1702:
mov rax, [rsp+38h+var_30]
mov [rdi+8], rax
mov rdx, [rdi]
mov byte ptr [rdx+rax], 0
jmp loc_15F1
loc_1717:
mov r8, [rsi-8]
loc_171B:
lea r9, [rdx+18h]
cmp rdi, r9
jz loc_146C
test r8, r8
jnz loc_14E9
loc_1731:
mov rcx, [rax-8]
mov [rax+20h], rcx
mov rsi, [rax+18h]
mov byte ptr [rsi+rcx], 0
jmp loc_146C
loc_1746:
call ___stack_chk_fail | unsigned long long std::__unguarded_linear_insert<__gnu_cxx::__normal_iterator<Item *,std::vector<Item>>,__gnu_cxx::__ops::_Val_comp_iter<func0(std::vector<Item> const&,int)::{lambda(Item const&,Item const&)#1}>>(
double *a1)
{
_BYTE *v1; // rcx
double *v2; // rdx
unsigned int v3; // edx
_DWORD *v4; // r8
_DWORD *v5; // r10
long long v6; // rsi
unsigned int v7; // esi
double *v8; // rsi
double *v9; // rcx
long long v10; // r8
long long v11; // r8
unsigned long long v12; // r11
_BYTE *v13; // rcx
_BYTE *v14; // r10
unsigned int v15; // r9d
unsigned int v16; // ecx
_BYTE *v17; // rax
long long v18; // rcx
long long v20; // rdx
unsigned long long v21; // r9
_BYTE *v22; // rax
char *v23; // rsi
unsigned int v24; // ecx
unsigned int v25; // eax
long long v26; // rax
long long v27; // rcx
void *v28; // [rsp+0h] [rbp-38h]
long long v29; // [rsp+8h] [rbp-30h]
_QWORD v30[2]; // [rsp+10h] [rbp-28h] BYREF
double v31; // [rsp+20h] [rbp-18h]
unsigned long long v32; // [rsp+28h] [rbp-10h]
v32 = __readfsqword(0x28u);
v28 = v30;
v1 = a1 + 2;
if ( *(double **)a1 == a1 + 2 )
{
v3 = *((_QWORD *)a1 + 1) + 1;
v4 = v30;
v5 = a1 + 2;
if ( v3 >= 8 )
{
v7 = 0;
do
{
v30[v7 / 8] = *(_QWORD *)&v1[v7];
v7 += 8;
}
while ( v7 < (v3 & 0xFFFFFFF8) );
v4 = &v30[v7 / 8];
v5 = &v1[v7];
}
v6 = 0LL;
if ( (v3 & 4) != 0 )
{
*v4 = *v5;
v6 = 4LL;
}
if ( (v3 & 2) != 0 )
{
*(_WORD *)((char *)v4 + v6) = *(_WORD *)((char *)v5 + v6);
v6 += 2LL;
}
if ( (v3 & 1) != 0 )
*((_BYTE *)v4 + v6) = *((_BYTE *)v5 + v6);
}
else
{
v28 = *(void **)a1;
*(double *)v30 = a1[2];
}
v29 = *((_QWORD *)a1 + 1);
*(_QWORD *)a1 = v1;
a1[1] = 0.0;
*((_BYTE *)a1 + 16) = 0;
v31 = a1[4];
v2 = a1 - 3;
if ( v31 <= *(a1 - 1) )
goto LABEL_4;
do
{
a1 = v2 - 2;
v9 = (double *)*((_QWORD *)v2 + 3);
if ( v9 == v2 + 5 )
{
v8 = (double *)*((_QWORD *)v2 - 2);
if ( v2 != v8 )
{
*((_QWORD *)v2 + 3) = v8;
v2[4] = *(v2 - 1);
v2[5] = *v2;
LABEL_19:
*((_QWORD *)v2 - 2) = v2;
goto LABEL_20;
}
v11 = *((_QWORD *)v8 - 1);
goto LABEL_62;
}
v8 = (double *)*((_QWORD *)v2 - 2);
if ( v2 == v8 )
{
v11 = *((_QWORD *)v8 - 1);
LABEL_62:
if ( a1 != v2 + 3 )
{
if ( v11 )
{
if ( v11 == 1 )
{
*(_BYTE *)v9 = *(_BYTE *)v8;
}
else if ( (unsigned int)v11 >= 8 )
{
*v9 = *v8;
*(double *)((char *)v9 + (unsigned int)v11 - 8) = *(double *)((char *)v8 + (unsigned int)v11 - 8);
v12 = (unsigned long long)(v9 + 1) & 0xFFFFFFFFFFFFFFF8LL;
v13 = (char *)v9 - v12;
v14 = (_BYTE *)((char *)v8 - v13);
if ( (((_DWORD)v11 + (_DWORD)v13) & 0xFFFFFFF8) >= 8 )
{
v15 = (v11 + (_DWORD)v13) & 0xFFFFFFF8;
v16 = 0;
do
{
*(_QWORD *)(v12 + v16) = *(_QWORD *)&v14[v16];
v16 += 8;
}
while ( v16 < v15 );
}
}
else if ( (v11 & 4) != 0 )
{
*(_DWORD *)v9 = *(_DWORD *)v8;
*(_DWORD *)((char *)v9 + (unsigned int)v11 - 4) = *(_DWORD *)((char *)v8 + (unsigned int)v11 - 4);
}
else if ( (_DWORD)v11 )
{
*(_BYTE *)v9 = *(_BYTE *)v8;
if ( (v11 & 2) != 0 )
*(_WORD *)((char *)v9 + (unsigned int)v11 - 2) = *(_WORD *)((char *)v8 + (unsigned int)v11 - 2);
}
}
v27 = *((_QWORD *)v2 - 1);
*((_QWORD *)v2 + 4) = v27;
*(_BYTE *)(*((_QWORD *)v2 + 3) + v27) = 0;
}
goto LABEL_20;
}
v10 = *((_QWORD *)v2 + 5);
*((_QWORD *)v2 + 3) = v8;
v2[4] = *(v2 - 1);
v2[5] = *v2;
if ( !v9 )
goto LABEL_19;
*((_QWORD *)v2 - 2) = v9;
*(_QWORD *)v2 = v10;
LABEL_20:
*(v2 - 1) = 0.0;
**((_BYTE **)v2 - 2) = 0;
v2[7] = v2[2];
v2 -= 5;
}
while ( v31 > v2[2] );
v17 = *(_BYTE **)a1;
v1 = a1 + 2;
if ( *(double **)a1 == a1 + 2 )
{
LABEL_4:
if ( v28 != v30 )
{
*(_QWORD *)a1 = v28;
*((_QWORD *)a1 + 1) = v29;
a1[2] = *(double *)v30;
goto LABEL_6;
}
v20 = v29;
v17 = v1;
goto LABEL_59;
}
if ( v28 != v30 )
{
v18 = *((_QWORD *)a1 + 2);
*(_QWORD *)a1 = v28;
*((_QWORD *)a1 + 1) = v29;
a1[2] = *(double *)v30;
if ( v17 )
{
v28 = v17;
v30[0] = v18;
goto LABEL_42;
}
LABEL_6:
v28 = v30;
goto LABEL_42;
}
v20 = v29;
LABEL_59:
if ( v20 )
{
if ( v20 == 1 )
{
*v17 = v30[0];
}
else if ( (unsigned int)v20 >= 8 )
{
*(_QWORD *)v17 = v30[0];
*(_QWORD *)&v17[(unsigned int)v20 - 8] = *(_QWORD *)((char *)&v30[-1] + (unsigned int)v20);
v21 = (unsigned long long)(v17 + 8) & 0xFFFFFFFFFFFFFFF8LL;
v22 = &v17[-v21];
v23 = (char *)((char *)v30 - v22);
if ( (((_DWORD)v20 + (_DWORD)v22) & 0xFFFFFFF8) >= 8 )
{
v24 = (v20 + (_DWORD)v22) & 0xFFFFFFF8;
v25 = 0;
do
{
*(_QWORD *)(v21 + v25) = *(_QWORD *)&v23[v25];
v25 += 8;
}
while ( v25 < v24 );
}
}
else if ( (v20 & 4) != 0 )
{
*(_DWORD *)v17 = v30[0];
*(_DWORD *)&v17[(unsigned int)v20 - 4] = *(_DWORD *)((char *)&v29 + (unsigned int)v20 + 4);
}
else if ( (_DWORD)v20 )
{
*v17 = v30[0];
if ( (v20 & 2) != 0 )
*(_WORD *)&v17[(unsigned int)v20 - 2] = *(_WORD *)((char *)&v29 + (unsigned int)v20 + 6);
}
}
v26 = v29;
*((_QWORD *)a1 + 1) = v29;
*(_BYTE *)(*(_QWORD *)a1 + v26) = 0;
LABEL_42:
v29 = 0LL;
*(_BYTE *)v28 = 0;
a1[4] = v31;
if ( v28 != v30 )
operator delete(v28, v30[0] + 1LL);
return v32 - __readfsqword(0x28u);
} | __unguarded_linear_insert<__normal_iterator<Item*,std::vector<Item,std::allocator<Item>>>,__ops::_Val_comp_iter<func0(std::vector<Item,std::allocator<Item>>const&,int)::{lambda(Item_const&,Item_const&)#1}>>:
PUSH RBX
SUB RSP,0x30
MOV RAX,RDI
MOV RDX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x28],RDX
XOR EDX,EDX
LEA RDX,[RSP + 0x10]
MOV qword ptr [RSP],RDX
MOV RDX,qword ptr [RDI]
LEA RCX,[RDI + 0x10]
CMP RDX,RCX
JZ 0x001013ca
MOV qword ptr [RSP],RDX
MOV RDX,qword ptr [RDI + 0x10]
MOV qword ptr [RSP + 0x10],RDX
LAB_00101363:
MOV RDX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
MOVSD XMM0,qword ptr [RAX + 0x20]
MOVSD qword ptr [RSP + 0x20],XMM0
LEA RDX,[RAX + -0x18]
COMISD XMM0,qword ptr [RAX + -0x8]
JA 0x0010149a
LAB_00101395:
MOV RAX,qword ptr [RSP]
LEA RDX,[RSP + 0x10]
CMP RAX,RDX
JZ 0x00101642
MOV qword ptr [RDI],RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RDI + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RDI + 0x10],RAX
LAB_001013bc:
LEA RAX,[RSP + 0x10]
MOV qword ptr [RSP],RAX
JMP 0x001015f1
LAB_001013ca:
LEA R9,[RSP + 0x10]
MOV RBX,qword ptr [RDI + 0x8]
LEA RDX,[RBX + 0x1]
MOV R8,R9
MOV R10,RCX
CMP EDX,0x8
JNC 0x00101421
LAB_001013e2:
MOV ESI,0x0
TEST DL,0x4
JZ 0x001013f7
MOV ESI,dword ptr [R10]
MOV dword ptr [R8],ESI
MOV ESI,0x4
LAB_001013f7:
TEST DL,0x2
JZ 0x0010140a
MOVZX R9D,word ptr [R10 + RSI*0x1]
MOV word ptr [R8 + RSI*0x1],R9W
ADD RSI,0x2
LAB_0010140a:
TEST DL,0x1
JZ 0x00101363
MOVZX EDX,byte ptr [R10 + RSI*0x1]
MOV byte ptr [R8 + RSI*0x1],DL
JMP 0x00101363
LAB_00101421:
MOV EBX,EDX
AND EBX,0xfffffff8
MOV ESI,0x0
LAB_0010142b:
MOV R8D,ESI
MOV R11,qword ptr [RCX + R8*0x1]
MOV qword ptr [R9 + R8*0x1],R11
ADD ESI,0x8
CMP ESI,EBX
JC 0x0010142b
MOV ESI,ESI
LEA R8,[R9 + RSI*0x1]
ADD R10,RSI
JMP 0x001013e2
LAB_00101448:
MOV RSI,qword ptr [RDX + -0x10]
CMP RDX,RSI
JZ 0x001014e0
MOV qword ptr [RDX + 0x18],RSI
MOV RCX,qword ptr [RDX + -0x8]
MOV qword ptr [RDX + 0x20],RCX
MOV RCX,qword ptr [RDX]
MOV qword ptr [RDX + 0x28],RCX
LAB_00101468:
MOV qword ptr [RAX + -0x10],RAX
LAB_0010146c:
MOV qword ptr [RAX + -0x8],0x0
MOV RCX,qword ptr [RAX + -0x10]
MOV byte ptr [RCX],0x0
MOVSD XMM0,qword ptr [RAX + 0x10]
MOVSD qword ptr [RAX + 0x38],XMM0
SUB RDX,0x28
MOVSD XMM0,qword ptr [RSP + 0x20]
COMISD XMM0,qword ptr [RDX + 0x10]
JBE 0x001015a4
LAB_0010149a:
LEA RDI,[RDX + -0x10]
MOV RAX,RDX
MOV RCX,qword ptr [RDX + 0x18]
LEA RSI,[RDX + 0x28]
CMP RCX,RSI
JZ 0x00101448
MOV RSI,qword ptr [RDX + -0x10]
CMP RDX,RSI
JZ 0x00101717
MOV R8,qword ptr [RAX + 0x28]
MOV qword ptr [RAX + 0x18],RSI
MOV RSI,qword ptr [RAX + -0x8]
MOV qword ptr [RAX + 0x20],RSI
MOV RSI,qword ptr [RAX]
MOV qword ptr [RAX + 0x28],RSI
TEST RCX,RCX
JZ 0x00101468
MOV qword ptr [RAX + -0x10],RCX
MOV qword ptr [RAX],R8
JMP 0x0010146c
LAB_001014e0:
MOV R8,qword ptr [RSI + -0x8]
JMP 0x0010171b
LAB_001014e9:
CMP R8,0x1
JZ 0x0010152b
MOV R10,RSI
CMP R8D,0x8
JNC 0x0010154c
TEST R8B,0x4
JNZ 0x00101536
TEST R8D,R8D
JZ 0x00101731
MOVZX ESI,byte ptr [RSI]
MOV byte ptr [RCX],SIL
TEST R8B,0x2
JZ 0x00101731
MOV R9D,R8D
MOVZX ESI,word ptr [R10 + R9*0x1 + -0x2]
MOV word ptr [RCX + R9*0x1 + -0x2],SI
JMP 0x00101731
LAB_0010152b:
MOVZX ESI,byte ptr [RSI]
MOV byte ptr [RCX],SIL
JMP 0x00101731
LAB_00101536:
MOV ESI,dword ptr [RSI]
MOV dword ptr [RCX],ESI
MOV R9D,R8D
MOV ESI,dword ptr [R10 + R9*0x1 + -0x4]
MOV dword ptr [RCX + R9*0x1 + -0x4],ESI
JMP 0x00101731
LAB_0010154c:
MOV R9,qword ptr [RSI]
MOV qword ptr [RCX],R9
MOV R9D,R8D
MOV R10,qword ptr [RSI + R9*0x1 + -0x8]
MOV qword ptr [RCX + R9*0x1 + -0x8],R10
LEA R11,[RCX + 0x8]
AND R11,-0x8
SUB RCX,R11
MOV R9,RCX
SUB RSI,RCX
MOV R10,RSI
ADD R9D,R8D
AND R9D,0xfffffff8
CMP R9D,0x8
JC 0x00101731
AND R9D,0xfffffff8
MOV ECX,0x0
LAB_0010158d:
MOV ESI,ECX
MOV R8,qword ptr [R10 + RSI*0x1]
MOV qword ptr [R11 + RSI*0x1],R8
ADD ECX,0x8
CMP ECX,R9D
JC 0x0010158d
JMP 0x00101731
LAB_001015a4:
MOV RAX,qword ptr [RDI]
LEA RCX,[RDI + 0x10]
CMP RAX,RCX
JZ 0x00101395
MOV RDX,qword ptr [RSP]
LEA RCX,[RSP + 0x10]
CMP RDX,RCX
JZ 0x001016f4
MOV RCX,qword ptr [RDI + 0x10]
MOV qword ptr [RDI],RDX
MOV RDX,qword ptr [RSP + 0x8]
MOV qword ptr [RDI + 0x8],RDX
MOV RDX,qword ptr [RSP + 0x10]
MOV qword ptr [RDI + 0x10],RDX
TEST RAX,RAX
JZ 0x001013bc
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x10],RCX
LAB_001015f1:
MOV qword ptr [RSP + 0x8],0x0
MOV RAX,qword ptr [RSP]
MOV byte ptr [RAX],0x0
MOVSD XMM0,qword ptr [RSP + 0x20]
MOVSD qword ptr [RDI + 0x20],XMM0
MOV RDI,qword ptr [RSP]
LEA RAX,[RSP + 0x10]
CMP RDI,RAX
JZ 0x00101628
MOV RAX,qword ptr [RSP + 0x10]
LEA RSI,[RAX + 0x1]
CALL 0x001011d0
LAB_00101628:
MOV RAX,qword ptr [RSP + 0x28]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x00101746
ADD RSP,0x30
POP RBX
RET
LAB_00101642:
MOV RDX,qword ptr [RSP + 0x8]
MOV RAX,RCX
JMP 0x001016f9
LAB_0010164f:
CMP RDX,0x1
JZ 0x0010168f
LEA RSI,[RSP + 0x10]
MOV R8,RAX
CMP EDX,0x8
JNC 0x001016ac
TEST DL,0x4
JNZ 0x00101698
TEST EDX,EDX
JZ 0x00101702
MOVZX EAX,byte ptr [RSP + 0x10]
MOV byte ptr [R8],AL
TEST DL,0x2
JZ 0x00101702
MOV ECX,EDX
MOVZX EAX,word ptr [RSI + RCX*0x1 + -0x2]
MOV word ptr [R8 + RCX*0x1 + -0x2],AX
JMP 0x00101702
LAB_0010168f:
MOVZX EDX,byte ptr [RSP + 0x10]
MOV byte ptr [RAX],DL
JMP 0x00101702
LAB_00101698:
MOV EAX,dword ptr [RSP + 0x10]
MOV dword ptr [R8],EAX
MOV ECX,EDX
MOV EAX,dword ptr [RSI + RCX*0x1 + -0x4]
MOV dword ptr [R8 + RCX*0x1 + -0x4],EAX
JMP 0x00101702
LAB_001016ac:
MOV RCX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX],RCX
MOV ECX,EDX
MOV R8,qword ptr [RSI + RCX*0x1 + -0x8]
MOV qword ptr [RAX + RCX*0x1 + -0x8],R8
LEA R9,[RAX + 0x8]
AND R9,-0x8
SUB RAX,R9
SUB RSI,RAX
LEA ECX,[RDX + RAX*0x1]
AND ECX,0xfffffff8
CMP ECX,0x8
JC 0x00101702
AND ECX,0xfffffff8
MOV EAX,0x0
LAB_001016e1:
MOV EDX,EAX
MOV R8,qword ptr [RSI + RDX*0x1]
MOV qword ptr [R9 + RDX*0x1],R8
ADD EAX,0x8
CMP EAX,ECX
JC 0x001016e1
JMP 0x00101702
LAB_001016f4:
MOV RDX,qword ptr [RSP + 0x8]
LAB_001016f9:
TEST RDX,RDX
JNZ 0x0010164f
LAB_00101702:
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RDI + 0x8],RAX
MOV RDX,qword ptr [RDI]
MOV byte ptr [RDX + RAX*0x1],0x0
JMP 0x001015f1
LAB_00101717:
MOV R8,qword ptr [RSI + -0x8]
LAB_0010171b:
LEA R9,[RDX + 0x18]
CMP RDI,R9
JZ 0x0010146c
TEST R8,R8
JNZ 0x001014e9
LAB_00101731:
MOV RCX,qword ptr [RAX + -0x8]
MOV qword ptr [RAX + 0x20],RCX
MOV RSI,qword ptr [RAX + 0x18]
MOV byte ptr [RSI + RCX*0x1],0x0
JMP 0x0010146c
LAB_00101746:
CALL 0x001011e0 | /* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* void std::__unguarded_linear_insert<__normal_iterator<Item*, std::vector<Item,
std::allocator<Item> > >, __ops::_Val_comp_iter<func0(std::vector<Item, std::allocator<Item> >
const&, int)::{lambda(Item const&, Item const&)#1}> >(__normal_iterator<Item*, std::vector<Item,
std::allocator<Item> > >, __ops::_Val_comp_iter<func0(std::vector<Item, std::allocator<Item> >
const&, int)::{lambda(Item const&, Item const&)#1}>) */
void std::
__unguarded_linear_insert<__normal_iterator<Item*,std::vector<Item,std::allocator<Item>>>,__ops::_Val_comp_iter<func0(std::vector<Item,std::allocator<Item>>const&,int)::_lambda(Item_const&,Item_const&)_1_>>
(__normal_iterator param_1,_Val_comp_iter param_2)
{
uint uVar1;
long lVar2;
long *plVar3;
uint uVar4;
long *plVar5;
int4 in_register_0000003c;
long *plVar6;
ulong uVar7;
long *plVar8;
long in_FS_OFFSET;
long *local_38;
int8 local_30;
long local_28 [2];
double local_18;
long local_10;
plVar6 = (long *)CONCAT44(in_register_0000003c,param_1);
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_38 = local_28;
plVar5 = plVar6 + 2;
if ((long *)*plVar6 == plVar5) {
plVar3 = local_28;
uVar7 = plVar6[1] + 1;
plVar8 = plVar5;
if (7 < (uint)uVar7) {
uVar4 = 0;
do {
*(int8 *)((long)plVar3 + (ulong)uVar4) = *(int8 *)((long)plVar5 + (ulong)uVar4);
uVar4 = uVar4 + 8;
} while (uVar4 < ((uint)uVar7 & 0xfffffff8));
plVar3 = (long *)((long)plVar3 + (ulong)uVar4);
plVar8 = (long *)((long)plVar5 + (ulong)uVar4);
}
lVar2 = 0;
if ((uVar7 & 4) != 0) {
*(int4 *)plVar3 = *(int4 *)plVar8;
lVar2 = 4;
}
if ((uVar7 & 2) != 0) {
*(int2 *)((long)plVar3 + lVar2) = *(int2 *)((long)plVar8 + lVar2);
lVar2 = lVar2 + 2;
}
if ((uVar7 & 1) != 0) {
*(int *)((long)plVar3 + lVar2) = *(int *)((long)plVar8 + lVar2);
}
}
else {
local_28[0] = plVar6[2];
local_38 = (long *)*plVar6;
}
local_30 = plVar6[1];
*plVar6 = (long)plVar5;
plVar6[1] = 0;
*(int *)(plVar6 + 2) = 0;
local_18 = (double)plVar6[4];
plVar3 = plVar6 + -3;
if ((double)plVar6[-1] <= local_18 && local_18 != (double)plVar6[-1]) {
do {
plVar5 = plVar3;
plVar6 = plVar5 + -2;
plVar3 = (long *)plVar5[3];
if (plVar3 == plVar5 + 5) {
plVar8 = (long *)plVar5[-2];
if (plVar5 == plVar8) {
uVar7 = plVar8[-1];
goto LAB_0010171b;
}
plVar5[3] = (long)plVar8;
plVar5[4] = plVar5[-1];
plVar5[5] = *plVar5;
LAB_00101468:
plVar5[-2] = (long)plVar5;
}
else {
plVar8 = (long *)plVar5[-2];
if (plVar5 == plVar8) {
uVar7 = plVar8[-1];
LAB_0010171b:
if (plVar6 != plVar5 + 3) {
if (uVar7 != 0) {
if (uVar7 == 1) {
*(int *)plVar3 = *(int *)plVar8;
}
else {
uVar4 = (uint)uVar7;
if (uVar4 < 8) {
if ((uVar7 & 4) == 0) {
if ((uVar4 != 0) &&
(*(int *)plVar3 = *(int *)plVar8, (uVar7 & 2) != 0)) {
*(int2 *)((long)plVar3 + ((uVar7 & 0xffffffff) - 2)) =
*(int2 *)((long)plVar8 + ((uVar7 & 0xffffffff) - 2));
}
}
else {
*(int4 *)plVar3 = *(int4 *)plVar8;
*(int4 *)((long)plVar3 + ((uVar7 & 0xffffffff) - 4)) =
*(int4 *)((long)plVar8 + ((uVar7 & 0xffffffff) - 4));
}
}
else {
*plVar3 = *plVar8;
*(int8 *)((long)plVar3 + ((uVar7 & 0xffffffff) - 8)) =
*(int8 *)((long)plVar8 + ((uVar7 & 0xffffffff) - 8));
lVar2 = (long)plVar3 - ((ulong)(plVar3 + 1) & 0xfffffffffffffff8);
uVar4 = (int)lVar2 + uVar4 & 0xfffffff8;
if (7 < uVar4) {
uVar1 = 0;
do {
*(int8 *)(((ulong)(plVar3 + 1) & 0xfffffffffffffff8) + (ulong)uVar1) =
*(int8 *)((long)plVar8 + ((ulong)uVar1 - lVar2));
uVar1 = uVar1 + 8;
} while (uVar1 < uVar4);
}
}
}
}
plVar5[4] = plVar5[-1];
*(int *)(plVar5[3] + plVar5[-1]) = 0;
}
}
else {
lVar2 = plVar5[5];
plVar5[3] = (long)plVar8;
plVar5[4] = plVar5[-1];
plVar5[5] = *plVar5;
if (plVar3 == (long *)0x0) goto LAB_00101468;
plVar5[-2] = (long)plVar3;
*plVar5 = lVar2;
}
}
plVar5[-1] = 0;
*(int *)plVar5[-2] = 0;
plVar5[7] = plVar5[2];
plVar3 = plVar5 + -5;
} while ((double)plVar5[-3] <= local_18 && local_18 != (double)plVar5[-3]);
plVar3 = (long *)*plVar6;
if (plVar3 == plVar5) goto LAB_00101395;
if (local_38 == local_28) goto LAB_001016f9;
lVar2 = *plVar5;
*plVar6 = (long)local_38;
plVar5[-1] = local_30;
*plVar5 = local_28[0];
local_38 = plVar3;
if (plVar3 != (long *)0x0) goto LAB_001015f1;
}
else {
LAB_00101395:
plVar3 = plVar5;
if (local_38 == local_28) {
LAB_001016f9:
if (local_30 != 0) {
if (local_30 == 1) {
*(int *)plVar3 = (int)local_28[0];
}
else {
uVar4 = (uint)local_30;
if (uVar4 < 8) {
if ((local_30 & 4) == 0) {
if ((uVar4 != 0) &&
(*(int *)plVar3 = (int)local_28[0], (local_30 & 2) != 0)) {
*(int2 *)((long)plVar3 + ((local_30 & 0xffffffff) - 2)) =
*(int2 *)((long)local_28 + ((local_30 & 0xffffffff) - 2));
}
}
else {
*(int4 *)plVar3 = (int4)local_28[0];
*(int4 *)((long)plVar3 + ((local_30 & 0xffffffff) - 4)) =
*(int4 *)((long)local_28 + ((local_30 & 0xffffffff) - 4));
}
}
else {
*plVar3 = local_28[0];
*(int8 *)((long)plVar3 + ((local_30 & 0xffffffff) - 8)) =
*(int8 *)((long)local_28 + ((local_30 & 0xffffffff) - 8));
lVar2 = (long)plVar3 - ((ulong)(plVar3 + 1) & 0xfffffffffffffff8);
uVar4 = uVar4 + (int)lVar2 & 0xfffffff8;
if (7 < uVar4) {
uVar1 = 0;
do {
*(int8 *)(((ulong)(plVar3 + 1) & 0xfffffffffffffff8) + (ulong)uVar1) =
*(int8 *)((long)local_28 + ((ulong)uVar1 - lVar2));
uVar1 = uVar1 + 8;
} while (uVar1 < uVar4);
}
}
}
}
plVar6[1] = local_30;
*(int *)(*plVar6 + local_30) = 0;
lVar2 = local_28[0];
goto LAB_001015f1;
}
*plVar6 = (long)local_38;
plVar6[1] = local_30;
plVar6[2] = local_28[0];
}
local_38 = local_28;
lVar2 = local_28[0];
LAB_001015f1:
local_28[0] = lVar2;
local_30 = 0;
*(int *)local_38 = 0;
plVar6[4] = (long)local_18;
if (local_38 != local_28) {
operator_delete(local_38,local_28[0] + 1);
}
if (local_10 != *(long *)(in_FS_OFFSET + 0x28)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return;
} |
2,338 | func0 |
#include <vector>
#include <string>
#include <algorithm>
#include <cassert>
struct Item {
std::string name;
double price;
bool operator==(const Item& other) const {
return name == other.name && price == other.price;
}
};
| std::vector<Item> func0(const std::vector<Item>& items, int n){
std::vector<Item> sorted_items = items;
std::sort(sorted_items.begin(), sorted_items.end(), [&](const Item& a, const Item& b) {
return a.price > b.price;
});
if(n > sorted_items.size()) n = sorted_items.size();
return std::vector<Item>(sorted_items.begin(), sorted_items.begin() + n);
}
| int main(){
std::vector<Item> result1 = func0(
{ {"Item-1", 101.1}, {"Item-2", 555.22} }, 1
);
std::vector<Item> expected1 = { {"Item-2", 555.22} };
assert(result1 == expected1);
std::vector<Item> result2 = func0(
{ {"Item-1", 101.1}, {"Item-2", 555.22}, {"Item-3", 45.09} }, 2
);
std::vector<Item> expected2 = { {"Item-2", 555.22}, {"Item-1", 101.1} };
assert(result2 == expected2);
std::vector<Item> result3 = func0(
{ {"Item-1", 101.1}, {"Item-2", 555.22}, {"Item-3", 45.09}, {"Item-4", 22.75} }, 1
);
std::vector<Item> expected3 = { {"Item-2", 555.22} };
assert(result3 == expected3);
return 0;
}
| O2 | cpp | void std::__unguarded_linear_insert<__gnu_cxx::__normal_iterator<Item*, std::vector<Item, std::allocator<Item> > >, __gnu_cxx::__ops::_Val_comp_iter<func0(std::vector<Item, std::allocator<Item> > const&, int)::{lambda(Item const&, Item const&)#1}> >(__gnu_cxx::__normal_iterator<Item*, std::vector<Item, std::allocator<Item> > >, __gnu_cxx::__ops::_Val_comp_iter<func0(std::vector<Item, std::allocator<Item> > const&, int)::{lambda(Item const&, Item const&)#1}>) [clone .isra.0]:
push %r12
mov %rdi,%rdx
push %rbp
mov %rdi,%rbp
add $0x10,%rdi
push %rbx
sub $0x30,%rsp
mov %fs:0x28,%rax
mov %rax,0x28(%rsp)
xor %eax,%eax
mov -0x10(%rdi),%rax
lea 0x10(%rsp),%r12
mov %r12,(%rsp)
cmp %rdi,%rax
je 1c88 <_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_.isra.0+0x208>
mov %rax,(%rsp)
mov 0x10(%rdx),%rax
mov %rax,0x10(%rsp)
movsd 0x20(%rdx),%xmm0
comisd -0x8(%rdx),%xmm0
mov %rdi,(%rdx)
mov %rdi,%rax
mov 0x8(%rdx),%r8
movb $0x0,0x10(%rdx)
movq $0x0,0x8(%rdx)
mov %r8,0x8(%rsp)
movsd %xmm0,0x20(%rsp)
ja 1b55 <_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_.isra.0+0xd5>
jmpq 1c40 <_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_.isra.0+0x1c0>
nopw 0x0(%rax,%rax,1)
cmp %rdi,%rax
je 1ba0 <_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_.isra.0+0x120>
mov %rdx,0x20(%rbx)
mov (%rbx),%rdx
mov 0x28(%rbx),%rax
mov %rcx,0x18(%rbx)
mov %rdx,0x28(%rbx)
test %rdi,%rdi
je 1baf <_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_.isra.0+0x12f>
mov %rdi,-0x10(%rbx)
mov %rax,(%rbx)
movq $0x0,-0x8(%rbx)
movb $0x0,(%rdi)
movsd 0x10(%rbx),%xmm0
movsd %xmm0,0x38(%rbx)
movsd 0x20(%rsp),%xmm0
comisd -0x18(%rbx),%xmm0
jbe 1bc0 <_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_.isra.0+0x140>
mov -0x10(%rbx),%rdi
mov %rbx,%rax
mov -0x38(%rax),%rcx
lea -0x28(%rax),%rbx
lea -0x38(%rax),%rbp
mov -0x8(%rbx),%rdx
cmp %rcx,%rbx
jne 1b00 <_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_.isra.0+0x80>
test %rdx,%rdx
je 1b89 <_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_.isra.0+0x109>
cmp $0x1,%rdx
je 1c70 <_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_.isra.0+0x1f0>
mov %rbx,%rsi
callq 11a0 <memcpy@plt>
mov -0x8(%rbx),%rdx
mov 0x18(%rbx),%rdi
mov %rdx,0x20(%rbx)
movb $0x0,(%rdi,%rdx,1)
mov -0x10(%rbx),%rdi
jmp 1b2c <_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_.isra.0+0xac>
nopw 0x0(%rax,%rax,1)
mov (%rbx),%rax
mov %rcx,0x18(%rbx)
mov %rdx,0x20(%rbx)
mov %rax,0x28(%rbx)
mov %rbx,-0x10(%rbx)
mov %rbx,%rdi
jmpq 1b2c <_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_.isra.0+0xac>
nopl 0x0(%rax,%rax,1)
mov (%rsp),%rax
mov 0x0(%rbp),%rdi
mov 0x8(%rsp),%r8
cmp %r12,%rax
je 1ca0 <_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_.isra.0+0x220>
mov 0x10(%rsp),%rdx
cmp %rdi,%rbx
je 1c4e <_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_.isra.0+0x1ce>
mov 0x10(%rbp),%rcx
mov %rax,0x0(%rbp)
mov %r8,0x8(%rbp)
mov %rdx,0x10(%rbp)
test %rdi,%rdi
je 1c5a <_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_.isra.0+0x1da>
mov %rdi,(%rsp)
mov %rcx,0x10(%rsp)
movq $0x0,0x8(%rsp)
movb $0x0,(%rdi)
movsd 0x20(%rsp),%xmm0
mov (%rsp),%rdi
movsd %xmm0,0x20(%rbp)
cmp %r12,%rdi
je 1c23 <_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_.isra.0+0x1a3>
callq 11b0 <_ZdlPv@plt>
mov 0x28(%rsp),%rax
xor %fs:0x28,%rax
jne 1ce3 <_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_.isra.0+0x263>
add $0x30,%rsp
pop %rbx
pop %rbp
pop %r12
retq
mov (%rsp),%rax
mov 0x10(%rsp),%rdx
cmp %r12,%rax
je 1ca0 <_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_.isra.0+0x220>
mov %rax,0x0(%rbp)
mov %r8,0x8(%rbp)
mov %rdx,0x10(%rbp)
mov %r12,(%rsp)
lea 0x10(%rsp),%r12
mov %r12,%rdi
jmp 1bfe <_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_.isra.0+0x17e>
nopl 0x0(%rax,%rax,1)
movzbl (%rbx),%eax
mov %al,(%rdi)
mov -0x8(%rbx),%rdx
mov 0x18(%rbx),%rdi
jmpq 1b89 <_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_.isra.0+0x109>
nopw 0x0(%rax,%rax,1)
movdqu 0x10(%rdx),%xmm1
movaps %xmm1,0x10(%rsp)
jmpq 1ac5 <_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_.isra.0+0x45>
nopw 0x0(%rax,%rax,1)
test %r8,%r8
je 1cbf <_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_.isra.0+0x23f>
cmp $0x1,%r8
je 1cd1 <_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_.isra.0+0x251>
mov %r8,%rdx
mov %r12,%rsi
callq 11a0 <memcpy@plt>
mov 0x8(%rsp),%r8
mov 0x0(%rbp),%rdi
mov %r8,0x8(%rbp)
movb $0x0,(%rdi,%r8,1)
mov (%rsp),%rdi
jmpq 1bfe <_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_.isra.0+0x17e>
movzbl 0x10(%rsp),%eax
mov %al,(%rdi)
mov 0x8(%rsp),%r8
mov 0x0(%rbp),%rdi
jmp 1cbf <_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_.isra.0+0x23f>
callq 11d0 <__stack_chk_fail@plt>
nopl 0x0(%rax,%rax,1)
| _ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0__isra_0:
push r12
mov rax, rdi
push rbp
mov rbp, rdi
add rdi, 10h
push rbx
sub rsp, 30h
mov rcx, [rax+8]
mov rdx, fs:28h
mov [rsp+48h+var_20], rdx
xor edx, edx
mov rdx, [rdi-10h]
lea r12, [rsp+48h+var_38]
mov [rsp+48h+var_48], r12
cmp rdx, rdi
jz loc_20E8
mov [rsp+48h+var_48], rdx
mov rdx, [rax+10h]
mov [rsp+48h+var_38], rdx
loc_1EA9:
movsd xmm0, qword ptr [rax+20h]
comisd xmm0, qword ptr [rax-8]
mov [rsp+48h+var_40], rcx
lea rbx, [rax-18h]
mov [rax], rdi
mov rdx, [rsp+48h+var_48]
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
movsd [rsp+48h+var_28], xmm0
ja short loc_1F2E
jmp loc_2060
loc_1EE0:
cmp rbx, rsi
jz short loc_1F60
mov rax, [rbx]
mov rcx, [rbx+28h]
mov [rbx+18h], rsi
mov [rbx+20h], rdx
mov [rbx+28h], rax
test rdi, rdi
jz short loc_1F57
mov [rbx-10h], rdi
mov [rbx], rcx
loc_1F04:
mov qword ptr [rbx-8], 0
sub rbx, 28h ; '('
mov byte ptr [rdi], 0
movsd xmm0, qword ptr [rbx+38h]
movsd qword ptr [rbx+60h], xmm0
movsd xmm0, [rsp+48h+var_28]
comisd xmm0, qword ptr [rbx+10h]
jbe short loc_1FA0
mov rdi, [rbx+18h]; dest
loc_1F2E:
lea rax, [rbx+28h]
mov rdx, [rbx-8]; n
mov rsi, [rbx-10h]; src
lea rbp, [rbx-10h]
cmp rdi, rax
jnz short loc_1EE0
cmp rbx, rsi
jz short loc_1F60
mov rax, [rbx]
mov [rbx+18h], rsi
mov [rbx+20h], rdx
mov [rbx+28h], rax
loc_1F57:
mov [rbx-10h], rbx
mov rdi, rbx
jmp short loc_1F04
loc_1F60:
lea rax, [rbx+18h]
cmp rbp, rax
jz loc_2140
test rdx, rdx
jz short loc_1F89
cmp rdx, 1
jz loc_2040
call _memcpy
mov rdx, [rbx-8]
mov rdi, [rbx+18h]
loc_1F89:
mov [rbx+20h], rdx
mov byte ptr [rdi+rdx], 0
mov rdi, [rbx-10h]
jmp loc_1F04
loc_1FA0:
mov rax, [rbp+0]
lea rdi, [rbp+10h]
mov rcx, [rsp+48h+var_40]
mov rdx, [rsp+48h+var_48]
cmp rax, rdi
jz loc_2060
cmp rdx, r12
jz loc_2090
movq xmm0, rcx
mov rsi, [rbp+10h]
mov [rbp+0], rdx
movhps xmm0, [rsp+48h+var_38]
movups xmmword ptr [rbp+8], xmm0
test rax, rax
jz loc_2077
mov [rsp+48h+var_48], rax
mov [rsp+48h+var_38], rsi
loc_1FEB:
mov [rsp+48h+var_40], 0
mov byte ptr [rax], 0
movsd xmm0, [rsp+48h+var_28]
mov rdi, [rsp+48h+var_48]; void *
movsd qword ptr [rbp+20h], xmm0
cmp rdi, r12
jz short loc_2019
mov rax, [rsp+48h+var_38]
lea rsi, [rax+1]; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2019:
mov rax, [rsp+48h+var_20]
sub rax, fs:28h
jnz loc_21F3
add rsp, 30h
pop rbx
pop rbp
pop r12
retn
loc_2040:
movzx eax, byte ptr [rsi]
mov [rdi], al
mov rdx, [rbx-8]
mov rdi, [rbx+18h]
mov [rbx+20h], rdx
mov byte ptr [rdi+rdx], 0
mov rdi, [rbx-10h]
jmp loc_1F04
loc_2060:
cmp rdx, r12
jz short loc_2088
movq xmm0, rcx
mov [rbp+0], rdx
movhps xmm0, [rsp+48h+var_38]
movups xmmword ptr [rbp+8], xmm0
loc_2077:
mov [rsp+48h+var_48], r12
lea r12, [rsp+48h+var_38]
mov rax, r12
jmp loc_1FEB
loc_2088:
mov rax, rdi
nop dword ptr [rax+rax+00h]
loc_2090:
test rcx, rcx
jz short loc_20CC
cmp rcx, 1
jz loc_21BE
mov edx, ecx
cmp ecx, 8
jnb loc_216D
and ecx, 4
jnz loc_21CF
test edx, edx
jz short loc_20C7
movzx ecx, byte ptr [rsp+48h+var_38]
mov [rax], cl
test dl, 2
jnz loc_21E3
loc_20C7:
mov rcx, [rsp+48h+var_40]
loc_20CC:
mov rax, [rbp+0]
mov [rbp+8], rcx
mov byte ptr [rax+rcx], 0
mov rax, [rsp+48h+var_48]
jmp loc_1FEB
loc_20E8:
lea rsi, [rcx+1]
mov r9, r12
mov rdx, rdi
cmp esi, 8
jnb short loc_2148
loc_20F7:
xor r8d, r8d
test sil, 4
jz short loc_210C
mov r8d, [rdx]
mov [r9], r8d
mov r8d, 4
loc_210C:
test sil, 2
jz short loc_2120
movzx r10d, word ptr [rdx+r8]
mov [r9+r8], r10w
add r8, 2
loc_2120:
and esi, 1
jz loc_1EA9
movzx edx, byte ptr [rdx+r8]
mov [r9+r8], dl
jmp loc_1EA9
loc_2140:
mov rdi, rsi
jmp loc_1F04
loc_2148:
mov r10d, esi
xor edx, edx
and r10d, 0FFFFFFF8h
loc_2151:
mov r8d, edx
add edx, 8
mov r9, [rdi+r8]
mov [r12+r8], r9
cmp edx, r10d
jb short loc_2151
lea r9, [r12+rdx]
add rdx, rdi
jmp short loc_20F7
loc_216D:
mov rdx, [rsp+48h+var_38]
mov r8, r12
mov [rax], rdx
mov edx, ecx
mov rsi, [r12+rdx-8]
mov [rax+rdx-8], rsi
lea rsi, [rax+8]
and rsi, 0FFFFFFFFFFFFFFF8h
sub rax, rsi
mov rdx, rax
sub r8, rax
add edx, ecx
and edx, 0FFFFFFF8h
cmp edx, 8
jb loc_20C7
and edx, 0FFFFFFF8h
xor eax, eax
loc_21A8:
mov ecx, eax
add eax, 8
mov rdi, [r8+rcx]
mov [rsi+rcx], rdi
cmp eax, edx
jb short loc_21A8
jmp loc_20C7
loc_21BE:
movzx edx, byte ptr [rsp+48h+var_38]
mov [rax], dl
mov rcx, [rsp+48h+var_40]
jmp loc_20CC
loc_21CF:
mov ecx, dword ptr [rsp+48h+var_38]
mov [rax], ecx
mov ecx, [r12+rdx-4]
mov [rax+rdx-4], ecx
jmp loc_20C7
loc_21E3:
movzx ecx, word ptr [r12+rdx-2]
mov [rax+rdx-2], cx
jmp loc_20C7
loc_21F3:
call ___stack_chk_fail | unsigned long long std::__unguarded_linear_insert<__gnu_cxx::__normal_iterator<Item *,std::vector<Item>>,__gnu_cxx::__ops::_Val_comp_iter<func0(std::vector<Item> const&,int)::{lambda(Item const&,Item const&)#1}>>(
long long *a1)
{
long long *v2; // rbp
long long *v3; // rdi
long long v4; // rcx
long long *v5; // rdx
double v6; // xmm0_8
bool v7; // cc
long long *v8; // rbx
double *v9; // rdx
long long v10; // rax
long long v11; // rcx
size_t v12; // rdx
long long *v13; // rsi
long long v14; // rax
double *v15; // rax
double v16; // rsi
double *v17; // rdi
long long v19; // rdx
long long v20; // rdi
double *v21; // rax
int v22; // esi
double *v23; // r9
long long *v24; // rdx
long long v25; // r8
long long v26; // rdx
long long v27; // r8
unsigned long long v28; // rsi
char *v29; // rax
char *v30; // r8
unsigned int v31; // edx
unsigned int v32; // eax
long long v33; // rcx
void *v34; // [rsp+0h] [rbp-48h]
long long v35; // [rsp+8h] [rbp-40h]
double v36[2]; // [rsp+10h] [rbp-38h] BYREF
double v37; // [rsp+20h] [rbp-28h]
unsigned long long v38; // [rsp+28h] [rbp-20h]
v2 = a1;
v3 = a1 + 2;
v4 = a1[1];
v38 = __readfsqword(0x28u);
v5 = (long long *)*(v3 - 2);
v34 = v36;
if ( v5 == v3 )
{
v22 = v4 + 1;
v23 = v36;
v24 = v3;
if ( (unsigned int)(v4 + 1) >= 8 )
{
LODWORD(v26) = 0;
do
{
v27 = (unsigned int)v26;
v26 = (unsigned int)(v26 + 8);
*(_QWORD *)((char *)v36 + v27) = *(long long *)((char *)v3 + v27);
}
while ( (unsigned int)v26 < (v22 & 0xFFFFFFF8) );
v23 = (double *)((char *)v36 + v26);
v24 = (long long *)((char *)v3 + v26);
}
v25 = 0LL;
if ( (v22 & 4) != 0 )
{
*(_DWORD *)v23 = *(_DWORD *)v24;
v25 = 4LL;
}
if ( (v22 & 2) != 0 )
{
*(_WORD *)((char *)v23 + v25) = *(_WORD *)((char *)v24 + v25);
v25 += 2LL;
}
if ( (v22 & 1) != 0 )
*((_BYTE *)v23 + v25) = *((_BYTE *)v24 + v25);
}
else
{
v34 = v5;
*(_QWORD *)&v36[0] = a1[2];
}
v6 = *((double *)a1 + 4);
v7 = v6 <= *((double *)a1 - 1);
v35 = v4;
v8 = a1 - 3;
*a1 = (long long)v3;
v9 = (double *)v34;
a1[1] = 0LL;
*((_BYTE *)a1 + 16) = 0;
v37 = v6;
if ( v7 )
goto LABEL_27;
while ( 1 )
{
v12 = *(v8 - 1);
v13 = (long long *)*(v8 - 2);
v2 = v8 - 2;
if ( v3 == v8 + 5 )
{
if ( v8 != v13 )
{
v14 = *v8;
v8[3] = (long long)v13;
v8[4] = v12;
v8[5] = v14;
LABEL_13:
*(v8 - 2) = (long long)v8;
v3 = v8;
goto LABEL_8;
}
}
else if ( v8 != v13 )
{
v10 = *v8;
v11 = v8[5];
v8[3] = (long long)v13;
v8[4] = v12;
v8[5] = v10;
if ( v3 )
{
*(v8 - 2) = (long long)v3;
*v8 = v11;
goto LABEL_8;
}
goto LABEL_13;
}
if ( v2 == v8 + 3 )
{
v3 = (long long *)*(v8 - 2);
}
else
{
if ( !v12 )
goto LABEL_18;
if ( v12 != 1 )
{
memcpy(v3, v13, v12);
v12 = *(v8 - 1);
v3 = (long long *)v8[3];
LABEL_18:
v8[4] = v12;
*((_BYTE *)v3 + v12) = 0;
v3 = (long long *)*(v8 - 2);
goto LABEL_8;
}
*(_BYTE *)v3 = *(_BYTE *)v13;
v19 = *(v8 - 1);
v20 = v8[3];
v8[4] = v19;
*(_BYTE *)(v20 + v19) = 0;
v3 = (long long *)*(v8 - 2);
}
LABEL_8:
*(v8 - 1) = 0LL;
v8 -= 5;
*(_BYTE *)v3 = 0;
v8[12] = v8[7];
if ( v37 <= *((double *)v8 + 2) )
break;
v3 = (long long *)v8[3];
}
v15 = (double *)*v2;
v3 = v2 + 2;
v4 = v35;
v9 = (double *)v34;
if ( (long long *)*v2 == v2 + 2 )
{
LABEL_27:
if ( v9 != v36 )
{
*v2 = (long long)v9;
*(__m128 *)(v2 + 1) = _mm_loadh_ps(v36);
goto LABEL_29;
}
v15 = (double *)v3;
goto LABEL_31;
}
if ( v34 == v36 )
{
LABEL_31:
if ( v4 )
{
if ( v4 == 1 )
{
*(_BYTE *)v15 = LOBYTE(v36[0]);
v4 = v35;
}
else
{
if ( (unsigned int)v4 >= 8 )
{
*v15 = v36[0];
*(_QWORD *)((char *)v15 + (unsigned int)v4 - 8) = *(long long *)((char *)&v36[-1] + (unsigned int)v4);
v28 = (unsigned long long)(v15 + 1) & 0xFFFFFFFFFFFFFFF8LL;
v29 = (char *)v15 - v28;
v30 = (char *)((char *)v36 - v29);
if ( (((_DWORD)v4 + (_DWORD)v29) & 0xFFFFFFF8) >= 8 )
{
v31 = (v4 + (_DWORD)v29) & 0xFFFFFFF8;
v32 = 0;
do
{
v33 = v32;
v32 += 8;
*(_QWORD *)(v28 + v33) = *(_QWORD *)&v30[v33];
}
while ( v32 < v31 );
}
}
else if ( (v4 & 4) != 0 )
{
*(_DWORD *)v15 = LODWORD(v36[0]);
*(_DWORD *)((char *)v15 + (unsigned int)v4 - 4) = *(_DWORD *)((char *)&v35 + (unsigned int)v4 + 4);
}
else if ( (_DWORD)v4 )
{
*(_BYTE *)v15 = LOBYTE(v36[0]);
if ( (v4 & 2) != 0 )
*(_WORD *)((char *)v15 + (unsigned int)v4 - 2) = *(_WORD *)((char *)&v35 + (unsigned int)v4 + 6);
}
v4 = v35;
}
}
v21 = (double *)*v2;
v2[1] = v4;
*((_BYTE *)v21 + v4) = 0;
v15 = (double *)v34;
goto LABEL_23;
}
v16 = *((double *)v2 + 2);
*v2 = (long long)v34;
*(__m128 *)(v2 + 1) = _mm_loadh_ps(v36);
if ( v15 )
{
v34 = v15;
v36[0] = v16;
goto LABEL_23;
}
LABEL_29:
v34 = v36;
v15 = v36;
LABEL_23:
v35 = 0LL;
*(_BYTE *)v15 = 0;
v17 = (double *)v34;
*((double *)v2 + 4) = v37;
if ( v17 != v36 )
operator delete(v17, *(_QWORD *)&v36[0] + 1LL);
return v38 - __readfsqword(0x28u);
} | __unguarded_linear_insert<__normal_iterator<Item*,std::vector<Item,std::allocator<Item>>>,__ops::_Val_comp_iter<func0(std::vector<Item,std::allocator<Item>>const&,int)::{lambda(Item_const&,Item_const&)#1}>>:
PUSH R12
MOV RAX,RDI
PUSH RBP
MOV RBP,RDI
ADD RDI,0x10
PUSH RBX
SUB RSP,0x30
MOV RCX,qword ptr [RAX + 0x8]
MOV RDX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x28],RDX
XOR EDX,EDX
MOV RDX,qword ptr [RDI + -0x10]
LEA R12,[RSP + 0x10]
MOV qword ptr [RSP],R12
CMP RDX,RDI
JZ 0x001020e8
MOV qword ptr [RSP],RDX
MOV RDX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RDX
LAB_00101ea9:
MOVSD XMM0,qword ptr [RAX + 0x20]
COMISD XMM0,qword ptr [RAX + -0x8]
MOV qword ptr [RSP + 0x8],RCX
LEA RBX,[RAX + -0x18]
MOV qword ptr [RAX],RDI
MOV RDX,qword ptr [RSP]
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
MOVSD qword ptr [RSP + 0x20],XMM0
JA 0x00101f2e
JMP 0x00102060
LAB_00101ee0:
CMP RBX,RSI
JZ 0x00101f60
MOV RAX,qword ptr [RBX]
MOV RCX,qword ptr [RBX + 0x28]
MOV qword ptr [RBX + 0x18],RSI
MOV qword ptr [RBX + 0x20],RDX
MOV qword ptr [RBX + 0x28],RAX
TEST RDI,RDI
JZ 0x00101f57
MOV qword ptr [RBX + -0x10],RDI
MOV qword ptr [RBX],RCX
LAB_00101f04:
MOV qword ptr [RBX + -0x8],0x0
SUB RBX,0x28
MOV byte ptr [RDI],0x0
MOVSD XMM0,qword ptr [RBX + 0x38]
MOVSD qword ptr [RBX + 0x60],XMM0
MOVSD XMM0,qword ptr [RSP + 0x20]
COMISD XMM0,qword ptr [RBX + 0x10]
JBE 0x00101fa0
MOV RDI,qword ptr [RBX + 0x18]
LAB_00101f2e:
LEA RAX,[RBX + 0x28]
MOV RDX,qword ptr [RBX + -0x8]
MOV RSI,qword ptr [RBX + -0x10]
LEA RBP,[RBX + -0x10]
CMP RDI,RAX
JNZ 0x00101ee0
CMP RBX,RSI
JZ 0x00101f60
MOV RAX,qword ptr [RBX]
MOV qword ptr [RBX + 0x18],RSI
MOV qword ptr [RBX + 0x20],RDX
MOV qword ptr [RBX + 0x28],RAX
LAB_00101f57:
MOV qword ptr [RBX + -0x10],RBX
MOV RDI,RBX
JMP 0x00101f04
LAB_00101f60:
LEA RAX,[RBX + 0x18]
CMP RBP,RAX
JZ 0x00102140
TEST RDX,RDX
JZ 0x00101f89
CMP RDX,0x1
JZ 0x00102040
CALL 0x001011b0
MOV RDX,qword ptr [RBX + -0x8]
MOV RDI,qword ptr [RBX + 0x18]
LAB_00101f89:
MOV qword ptr [RBX + 0x20],RDX
MOV byte ptr [RDI + RDX*0x1],0x0
MOV RDI,qword ptr [RBX + -0x10]
JMP 0x00101f04
LAB_00101fa0:
MOV RAX,qword ptr [RBP]
LEA RDI,[RBP + 0x10]
MOV RCX,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP]
CMP RAX,RDI
JZ 0x00102060
CMP RDX,R12
JZ 0x00102090
MOVQ XMM0,RCX
MOV RSI,qword ptr [RBP + 0x10]
MOV qword ptr [RBP],RDX
MOVHPS XMM0,qword ptr [RSP + 0x10]
MOVUPS xmmword ptr [RBP + 0x8],XMM0
TEST RAX,RAX
JZ 0x00102077
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x10],RSI
LAB_00101feb:
MOV qword ptr [RSP + 0x8],0x0
MOV byte ptr [RAX],0x0
MOVSD XMM0,qword ptr [RSP + 0x20]
MOV RDI,qword ptr [RSP]
MOVSD qword ptr [RBP + 0x20],XMM0
CMP RDI,R12
JZ 0x00102019
MOV RAX,qword ptr [RSP + 0x10]
LEA RSI,[RAX + 0x1]
CALL 0x001011d0
LAB_00102019:
MOV RAX,qword ptr [RSP + 0x28]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x001021f3
ADD RSP,0x30
POP RBX
POP RBP
POP R12
RET
LAB_00102040:
MOVZX EAX,byte ptr [RSI]
MOV byte ptr [RDI],AL
MOV RDX,qword ptr [RBX + -0x8]
MOV RDI,qword ptr [RBX + 0x18]
MOV qword ptr [RBX + 0x20],RDX
MOV byte ptr [RDI + RDX*0x1],0x0
MOV RDI,qword ptr [RBX + -0x10]
JMP 0x00101f04
LAB_00102060:
CMP RDX,R12
JZ 0x00102088
MOVQ XMM0,RCX
MOV qword ptr [RBP],RDX
MOVHPS XMM0,qword ptr [RSP + 0x10]
MOVUPS xmmword ptr [RBP + 0x8],XMM0
LAB_00102077:
MOV qword ptr [RSP],R12
LEA R12,[RSP + 0x10]
MOV RAX,R12
JMP 0x00101feb
LAB_00102088:
MOV RAX,RDI
NOP dword ptr [RAX + RAX*0x1]
LAB_00102090:
TEST RCX,RCX
JZ 0x001020cc
CMP RCX,0x1
JZ 0x001021be
MOV EDX,ECX
CMP ECX,0x8
JNC 0x0010216d
AND ECX,0x4
JNZ 0x001021cf
TEST EDX,EDX
JZ 0x001020c7
MOVZX ECX,byte ptr [RSP + 0x10]
MOV byte ptr [RAX],CL
TEST DL,0x2
JNZ 0x001021e3
LAB_001020c7:
MOV RCX,qword ptr [RSP + 0x8]
LAB_001020cc:
MOV RAX,qword ptr [RBP]
MOV qword ptr [RBP + 0x8],RCX
MOV byte ptr [RAX + RCX*0x1],0x0
MOV RAX,qword ptr [RSP]
JMP 0x00101feb
LAB_001020e8:
LEA RSI,[RCX + 0x1]
MOV R9,R12
MOV RDX,RDI
CMP ESI,0x8
JNC 0x00102148
LAB_001020f7:
XOR R8D,R8D
TEST SIL,0x4
JZ 0x0010210c
MOV R8D,dword ptr [RDX]
MOV dword ptr [R9],R8D
MOV R8D,0x4
LAB_0010210c:
TEST SIL,0x2
JZ 0x00102120
MOVZX R10D,word ptr [RDX + R8*0x1]
MOV word ptr [R9 + R8*0x1],R10W
ADD R8,0x2
LAB_00102120:
AND ESI,0x1
JZ 0x00101ea9
MOVZX EDX,byte ptr [RDX + R8*0x1]
MOV byte ptr [R9 + R8*0x1],DL
JMP 0x00101ea9
LAB_00102140:
MOV RDI,RSI
JMP 0x00101f04
LAB_00102148:
MOV R10D,ESI
XOR EDX,EDX
AND R10D,0xfffffff8
LAB_00102151:
MOV R8D,EDX
ADD EDX,0x8
MOV R9,qword ptr [RDI + R8*0x1]
MOV qword ptr [R12 + R8*0x1],R9
CMP EDX,R10D
JC 0x00102151
LEA R9,[R12 + RDX*0x1]
ADD RDX,RDI
JMP 0x001020f7
LAB_0010216d:
MOV RDX,qword ptr [RSP + 0x10]
MOV R8,R12
MOV qword ptr [RAX],RDX
MOV EDX,ECX
MOV RSI,qword ptr [R12 + RDX*0x1 + -0x8]
MOV qword ptr [RAX + RDX*0x1 + -0x8],RSI
LEA RSI,[RAX + 0x8]
AND RSI,-0x8
SUB RAX,RSI
MOV RDX,RAX
SUB R8,RAX
ADD EDX,ECX
AND EDX,0xfffffff8
CMP EDX,0x8
JC 0x001020c7
AND EDX,0xfffffff8
XOR EAX,EAX
LAB_001021a8:
MOV ECX,EAX
ADD EAX,0x8
MOV RDI,qword ptr [R8 + RCX*0x1]
MOV qword ptr [RSI + RCX*0x1],RDI
CMP EAX,EDX
JC 0x001021a8
JMP 0x001020c7
LAB_001021be:
MOVZX EDX,byte ptr [RSP + 0x10]
MOV byte ptr [RAX],DL
MOV RCX,qword ptr [RSP + 0x8]
JMP 0x001020cc
LAB_001021cf:
MOV ECX,dword ptr [RSP + 0x10]
MOV dword ptr [RAX],ECX
MOV ECX,dword ptr [R12 + RDX*0x1 + -0x4]
MOV dword ptr [RAX + RDX*0x1 + -0x4],ECX
JMP 0x001020c7
LAB_001021e3:
MOVZX ECX,word ptr [R12 + RDX*0x1 + -0x2]
MOV word ptr [RAX + RDX*0x1 + -0x2],CX
JMP 0x001020c7
LAB_001021f3:
CALL 0x001011e0 | /* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* void std::__unguarded_linear_insert<__normal_iterator<Item*, std::vector<Item,
std::allocator<Item> > >, __ops::_Val_comp_iter<func0(std::vector<Item, std::allocator<Item> >
const&, int)::{lambda(Item const&, Item const&)#1}> >(__normal_iterator<Item*, std::vector<Item,
std::allocator<Item> > >, __ops::_Val_comp_iter<func0(std::vector<Item, std::allocator<Item> >
const&, int)::{lambda(Item const&, Item const&)#1}>) [clone .isra.0] */
void std::
__unguarded_linear_insert<__normal_iterator<Item*,std::vector<Item,std::allocator<Item>>>,__ops::_Val_comp_iter<func0(std::vector<Item,std::allocator<Item>>const&,int)::_lambda(Item_const&,Item_const&)_1_>>
(__normal_iterator param_1,_Val_comp_iter param_2)
{
uint uVar1;
long lVar2;
ulong uVar3;
uint uVar4;
size_t __n;
ulong uVar5;
ulong uVar6;
long *plVar7;
long *plVar8;
long *plVar9;
int4 in_register_0000003c;
long *__dest;
long in_FS_OFFSET;
long *local_48;
int8 local_40;
long local_38 [2];
double local_28;
long local_20;
plVar9 = (long *)CONCAT44(in_register_0000003c,param_1);
__dest = plVar9 + 2;
local_40 = plVar9[1];
local_20 = *(long *)(in_FS_OFFSET + 0x28);
local_48 = local_38;
if ((long *)*plVar9 == __dest) {
uVar3 = local_40 + 1;
plVar7 = __dest;
plVar8 = local_38;
if (7 < (uint)uVar3) {
uVar5 = 0;
do {
uVar4 = (int)uVar5 + 8;
uVar6 = (ulong)uVar4;
*(int8 *)((long)local_38 + uVar5) = *(int8 *)((long)__dest + uVar5);
uVar5 = uVar6;
} while (uVar4 < ((uint)uVar3 & 0xfffffff8));
plVar8 = (long *)((long)local_38 + uVar6);
plVar7 = (long *)(uVar6 + (long)__dest);
}
lVar2 = 0;
if ((uVar3 & 4) != 0) {
*(int4 *)plVar8 = *(int4 *)plVar7;
lVar2 = 4;
}
if ((uVar3 & 2) != 0) {
*(int2 *)((long)plVar8 + lVar2) = *(int2 *)((long)plVar7 + lVar2);
lVar2 = lVar2 + 2;
}
if ((uVar3 & 1) != 0) {
*(int *)((long)plVar8 + lVar2) = *(int *)((long)plVar7 + lVar2);
}
}
else {
local_38[0] = plVar9[2];
local_48 = (long *)*plVar9;
}
local_28 = (double)plVar9[4];
*plVar9 = (long)__dest;
plVar9[1] = 0;
*(int *)(plVar9 + 2) = 0;
plVar8 = plVar9 + -3;
if ((double)plVar9[-1] <= local_28 && local_28 != (double)plVar9[-1]) {
do {
__n = plVar8[-1];
plVar7 = (long *)plVar8[-2];
plVar9 = plVar8 + -2;
if (__dest == plVar8 + 5) {
if (plVar8 == plVar7) {
LAB_00101f60:
if (plVar9 != plVar8 + 3) {
if (__n != 0) {
if (__n == 1) {
*(int *)__dest = *(int *)plVar7;
plVar8[4] = plVar8[-1];
*(int *)(plVar8[3] + plVar8[-1]) = 0;
plVar7 = (long *)plVar8[-2];
goto LAB_00101f04;
}
memcpy(__dest,plVar7,__n);
__n = plVar8[-1];
__dest = (long *)plVar8[3];
}
plVar8[4] = __n;
*(int *)((long)__dest + __n) = 0;
plVar7 = (long *)plVar8[-2];
}
}
else {
plVar8[3] = (long)plVar7;
plVar8[4] = __n;
plVar8[5] = *plVar8;
LAB_00101f57:
plVar8[-2] = (long)plVar8;
plVar7 = plVar8;
}
}
else {
if (plVar8 == plVar7) goto LAB_00101f60;
lVar2 = plVar8[5];
plVar8[3] = (long)plVar7;
plVar8[4] = __n;
plVar8[5] = *plVar8;
if (__dest == (long *)0x0) goto LAB_00101f57;
plVar8[-2] = (long)__dest;
*plVar8 = lVar2;
plVar7 = __dest;
}
LAB_00101f04:
plVar8[-1] = 0;
*(int *)plVar7 = 0;
plVar8[7] = plVar8[2];
if (local_28 < (double)plVar8[-3] || local_28 == (double)plVar8[-3]) goto LAB_00101fa0;
__dest = (long *)plVar8[-2];
plVar8 = plVar8 + -5;
} while( true );
}
LAB_00102060:
plVar7 = __dest;
if (local_48 == local_38) {
LAB_00102090:
if (local_40 != 0) {
if (local_40 == 1) {
*(int *)plVar7 = (int)local_38[0];
}
else {
uVar4 = (uint)local_40;
uVar3 = local_40 & 0xffffffff;
if (uVar4 < 8) {
if ((local_40 & 4) == 0) {
if ((uVar4 != 0) && (*(int *)plVar7 = (int)local_38[0], (local_40 & 2) != 0)
) {
*(int2 *)((long)plVar7 + (uVar3 - 2)) =
*(int2 *)((long)local_38 + (uVar3 - 2));
}
}
else {
*(int4 *)plVar7 = (int4)local_38[0];
*(int4 *)((long)plVar7 + (uVar3 - 4)) =
*(int4 *)((long)local_38 + (uVar3 - 4));
}
}
else {
*plVar7 = local_38[0];
*(int8 *)((long)plVar7 + ((local_40 & 0xffffffff) - 8)) =
*(int8 *)((long)local_38 + ((local_40 & 0xffffffff) - 8));
lVar2 = (long)plVar7 - ((ulong)(plVar7 + 1) & 0xfffffffffffffff8);
uVar4 = (int)lVar2 + uVar4 & 0xfffffff8;
if (7 < uVar4) {
uVar1 = 0;
do {
uVar3 = (ulong)uVar1;
uVar1 = uVar1 + 8;
*(int8 *)(((ulong)(plVar7 + 1) & 0xfffffffffffffff8) + uVar3) =
*(int8 *)((long)local_38 + (uVar3 - lVar2));
} while (uVar1 < uVar4);
}
}
}
}
plVar9[1] = local_40;
*(int *)(*plVar9 + local_40) = 0;
lVar2 = local_38[0];
goto LAB_00101feb;
}
*plVar9 = (long)local_48;
plVar9[1] = local_40;
plVar9[2] = local_38[0];
LAB_00102077:
local_48 = local_38;
lVar2 = local_38[0];
LAB_00101feb:
local_38[0] = lVar2;
local_40 = 0;
*(int *)local_48 = 0;
plVar9[4] = (long)local_28;
if (local_48 != local_38) {
operator_delete(local_48,local_38[0] + 1);
}
if (local_20 != *(long *)(in_FS_OFFSET + 0x28)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return;
LAB_00101fa0:
plVar7 = (long *)*plVar9;
__dest = plVar8;
if (plVar7 == plVar8) goto LAB_00102060;
if (local_48 == local_38) goto LAB_00102090;
lVar2 = *plVar8;
*plVar9 = (long)local_48;
plVar8[-1] = local_40;
*plVar8 = local_38[0];
local_48 = plVar7;
if (plVar7 != (long *)0x0) goto LAB_00101feb;
goto LAB_00102077;
} |
2,339 | func0 |
#include <vector>
#include <string>
#include <algorithm>
#include <cassert>
struct Item {
std::string name;
double price;
bool operator==(const Item& other) const {
return name == other.name && price == other.price;
}
};
| std::vector<Item> func0(const std::vector<Item>& items, int n){
std::vector<Item> sorted_items = items;
std::sort(sorted_items.begin(), sorted_items.end(), [&](const Item& a, const Item& b) {
return a.price > b.price;
});
if(n > sorted_items.size()) n = sorted_items.size();
return std::vector<Item>(sorted_items.begin(), sorted_items.begin() + n);
}
| int main(){
std::vector<Item> result1 = func0(
{ {"Item-1", 101.1}, {"Item-2", 555.22} }, 1
);
std::vector<Item> expected1 = { {"Item-2", 555.22} };
assert(result1 == expected1);
std::vector<Item> result2 = func0(
{ {"Item-1", 101.1}, {"Item-2", 555.22}, {"Item-3", 45.09} }, 2
);
std::vector<Item> expected2 = { {"Item-2", 555.22}, {"Item-1", 101.1} };
assert(result2 == expected2);
std::vector<Item> result3 = func0(
{ {"Item-1", 101.1}, {"Item-2", 555.22}, {"Item-3", 45.09}, {"Item-4", 22.75} }, 1
);
std::vector<Item> expected3 = { {"Item-2", 555.22} };
assert(result3 == expected3);
return 0;
}
| O3 | cpp | void std::__unguarded_linear_insert<__gnu_cxx::__normal_iterator<Item*, std::vector<Item, std::allocator<Item> > >, __gnu_cxx::__ops::_Val_comp_iter<func0(std::vector<Item, std::allocator<Item> > const&, int)::{lambda(Item const&, Item const&)#1}> >(__gnu_cxx::__normal_iterator<Item*, std::vector<Item, std::allocator<Item> > >, __gnu_cxx::__ops::_Val_comp_iter<func0(std::vector<Item, std::allocator<Item> > const&, int)::{lambda(Item const&, Item const&)#1}>) [clone .isra.0]:
push %r12
mov %rdi,%rdx
push %rbp
mov %rdi,%rbp
add $0x10,%rdi
push %rbx
sub $0x30,%rsp
mov -0x10(%rdi),%rcx
mov %fs:0x28,%rax
mov %rax,0x28(%rsp)
xor %eax,%eax
lea 0x10(%rsp),%r12
mov %r12,(%rsp)
cmp %rdi,%rcx
je 1d48 <_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_.isra.0+0x218>
mov 0x10(%rdx),%rax
mov %rcx,(%rsp)
mov %rax,0x10(%rsp)
movsd 0x20(%rdx),%xmm0
comisd -0x8(%rdx),%xmm0
mov %rdi,(%rdx)
mov %rdi,%rax
mov 0x8(%rdx),%r8
movb $0x0,0x10(%rdx)
movq $0x0,0x8(%rdx)
mov %r8,0x8(%rsp)
movsd %xmm0,0x20(%rsp)
ja 1c05 <_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_.isra.0+0xd5>
jmpq 1d00 <_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_.isra.0+0x1d0>
nopw 0x0(%rax,%rax,1)
cmp %rax,%rdi
je 1c50 <_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_.isra.0+0x120>
mov %rdx,0x20(%rbx)
mov (%rbx),%rdx
mov 0x28(%rbx),%rax
mov %rcx,0x18(%rbx)
mov %rdx,0x28(%rbx)
test %rdi,%rdi
je 1c5f <_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_.isra.0+0x12f>
mov %rdi,-0x10(%rbx)
mov %rax,(%rbx)
movq $0x0,-0x8(%rbx)
movb $0x0,(%rdi)
movsd 0x10(%rbx),%xmm0
movsd %xmm0,0x38(%rbx)
movsd 0x20(%rsp),%xmm0
comisd -0x18(%rbx),%xmm0
jbe 1c70 <_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_.isra.0+0x140>
mov -0x10(%rbx),%rdi
mov %rbx,%rax
mov -0x38(%rax),%rcx
lea -0x28(%rax),%rbx
lea -0x38(%rax),%rbp
mov -0x8(%rbx),%rdx
cmp %rbx,%rcx
jne 1bb0 <_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_.isra.0+0x80>
test %rdx,%rdx
je 1c39 <_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_.isra.0+0x109>
cmp $0x1,%rdx
je 1d30 <_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_.isra.0+0x200>
mov %rbx,%rsi
callq 11a0 <memcpy@plt>
mov -0x8(%rbx),%rdx
mov 0x18(%rbx),%rdi
mov %rdx,0x20(%rbx)
movb $0x0,(%rdi,%rdx,1)
mov -0x10(%rbx),%rdi
jmp 1bdc <_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_.isra.0+0xac>
nopw 0x0(%rax,%rax,1)
mov (%rbx),%rax
mov %rcx,0x18(%rbx)
mov %rdx,0x20(%rbx)
mov %rax,0x28(%rbx)
mov %rbx,-0x10(%rbx)
mov %rbx,%rdi
jmpq 1bdc <_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_.isra.0+0xac>
nopl 0x0(%rax,%rax,1)
mov (%rsp),%rcx
mov 0x0(%rbp),%rdi
mov 0x8(%rsp),%r8
cmp %r12,%rcx
je 1d60 <_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_.isra.0+0x230>
mov 0x10(%rsp),%rax
cmp %rdi,%rbx
je 1d0a <_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_.isra.0+0x1da>
movq %r8,%xmm0
movq %rax,%xmm1
mov 0x10(%rbp),%rdx
mov %rcx,0x0(%rbp)
punpcklqdq %xmm1,%xmm0
movups %xmm0,0x8(%rbp)
test %rdi,%rdi
je 1d20 <_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_.isra.0+0x1f0>
mov %rdi,(%rsp)
mov %rdx,0x10(%rsp)
movq $0x0,0x8(%rsp)
movb $0x0,(%rdi)
movsd 0x20(%rsp),%xmm0
mov (%rsp),%rdi
movsd %xmm0,0x20(%rbp)
cmp %r12,%rdi
je 1cdd <_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_.isra.0+0x1ad>
callq 11b0 <_ZdlPv@plt>
mov 0x28(%rsp),%rax
xor %fs:0x28,%rax
jne 1da3 <_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_.isra.0+0x273>
add $0x30,%rsp
pop %rbx
pop %rbp
pop %r12
retq
nopw 0x0(%rax,%rax,1)
mov 0x10(%rsp),%rax
cmp %r12,%rcx
je 1d60 <_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_.isra.0+0x230>
movq %r8,%xmm0
movq %rax,%xmm3
mov %rcx,0x0(%rbp)
punpcklqdq %xmm3,%xmm0
movups %xmm0,0x8(%rbp)
mov %r12,(%rsp)
lea 0x10(%rsp),%r12
mov %r12,%rdi
jmp 1cb8 <_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_.isra.0+0x188>
xchg %ax,%ax
movzbl (%rbx),%eax
mov %al,(%rdi)
mov -0x8(%rbx),%rdx
mov 0x18(%rbx),%rdi
jmpq 1c39 <_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_.isra.0+0x109>
nopw 0x0(%rax,%rax,1)
movdqu 0x10(%rdx),%xmm2
mov %r12,%rcx
movaps %xmm2,0x10(%rsp)
jmpq 1b75 <_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_.isra.0+0x45>
nopw 0x0(%rax,%rax,1)
test %r8,%r8
je 1d7f <_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_.isra.0+0x24f>
cmp $0x1,%r8
je 1d91 <_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_.isra.0+0x261>
mov %r8,%rdx
mov %r12,%rsi
callq 11a0 <memcpy@plt>
mov 0x8(%rsp),%r8
mov 0x0(%rbp),%rdi
mov %r8,0x8(%rbp)
movb $0x0,(%rdi,%r8,1)
mov (%rsp),%rdi
jmpq 1cb8 <_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_.isra.0+0x188>
movzbl 0x10(%rsp),%eax
mov %al,(%rdi)
mov 0x8(%rsp),%r8
mov 0x0(%rbp),%rdi
jmp 1d7f <_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_.isra.0+0x24f>
callq 11d0 <__stack_chk_fail@plt>
nopl 0x0(%rax,%rax,1)
| _ZSt16__insertion_sortIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_SG_T0__isra_0:
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 48h
mov rax, fs:28h
mov [rsp+78h+var_40], rax
xor eax, eax
cmp rdi, rsi
jz loc_2093
lea rax, [rdi+28h]
mov r14, rdi
mov rbp, rsi
cmp rsi, rax
jz loc_2093
lea r15, [rsp+78h+var_58]
lea r13, [rdi+38h]
mov r12, r15
nop word ptr [rax+rax+00000000h]
loc_1DB0:
mov [rsp+78h+var_68], r15
mov rdx, [r13-10h]
lea rcx, [r13-10h]
mov rdi, r13
movsd xmm0, qword ptr [r13+10h]
comisd xmm0, qword ptr [r14+20h]
mov rax, [r13-8]
jbe loc_1EF8
cmp rdx, r13
jz loc_2330
mov rsi, [r13+0]
mov [rsp+78h+var_68], rdx
mov [rsp+78h+var_58], rsi
loc_1DED:
sub rcx, r14
mov [r13-10h], r13
lea rbx, [r13+18h]
mov [rsp+78h+var_60], rax
mov qword ptr [r13-8], 0
mov byte ptr [r13+0], 0
movsd [rsp+78h+var_48], xmm0
test rcx, rcx
jle loc_2180
lea rax, [r13-28h]
mov rdi, rax
sub rdi, rcx
jmp short loc_1E79
loc_1E28:
cmp rax, rdx
jz loc_1EB0
mov [rax+18h], rdx
mov rdx, [rax-8]
mov rsi, [rax+28h]
mov [rax+20h], rdx
mov rdx, [rax]
mov [rax+28h], rdx
test rcx, rcx
jz short loc_1EA2
mov [rax-10h], rcx
mov rdx, rcx
mov [rax], rsi
loc_1E57:
mov qword ptr [rax-8], 0
sub rax, 28h ; '('
mov byte ptr [rdx], 0
movsd xmm0, qword ptr [rax+38h]
movsd qword ptr [rax+60h], xmm0
cmp rax, rdi
jz loc_20C0
loc_1E79:
mov rcx, [rax+18h]
lea rsi, [rax+28h]
mov rdx, [rax-10h]
cmp rcx, rsi
jnz short loc_1E28
cmp rax, rdx
jz short loc_1EB0
mov [rax+18h], rdx
mov rdx, [rax-8]
mov [rax+20h], rdx
mov rdx, [rax]
mov [rax+28h], rdx
loc_1EA2:
mov [rax-10h], rax
mov rdx, rax
jmp short loc_1E57
loc_1EB0:
mov rsi, [rax-8]
test rsi, rsi
jz short loc_1EE0
cmp rsi, 1
jz loc_21D0
cmp esi, 8
jnb loc_2208
test sil, 4
jnz loc_25AA
test esi, esi
jnz loc_23D0
xchg ax, ax
loc_1EE0:
mov [rax+20h], rsi
mov byte ptr [rcx+rsi], 0
mov rdx, [rax-10h]
jmp loc_1E57
loc_1EF8:
cmp rdx, r13
jz loc_2268
comisd xmm0, qword ptr [r13-18h]
mov rsi, [r13+0]
mov [rsp+78h+var_68], rdx
mov [rsp+78h+var_60], rax
mov [rsp+78h+var_58], rsi
mov [r13-10h], r13
mov qword ptr [r13-8], 0
mov byte ptr [r13+0], 0
movsd [rsp+78h+var_48], xmm0
jbe loc_2150
loc_1F37:
lea rbx, [r13-28h]
jmp short loc_1F8E
loc_1F40:
cmp rbx, rsi
jz short loc_1FC0
mov rax, [rbx]
mov r8, [rbx+28h]
mov [rbx+18h], rsi
mov [rbx+20h], rdx
mov [rbx+28h], rax
test rdi, rdi
jz short loc_1FB7
mov [rbx-10h], rdi
mov [rbx], r8
loc_1F64:
mov qword ptr [rbx-8], 0
sub rbx, 28h ; '('
mov byte ptr [rdi], 0
movsd xmm0, qword ptr [rbx+38h]
movsd qword ptr [rbx+60h], xmm0
movsd xmm0, [rsp+78h+var_48]
comisd xmm0, qword ptr [rbx+10h]
jbe short loc_2008
mov rdi, [rbx+18h]; dest
loc_1F8E:
lea rax, [rbx+28h]
mov rsi, [rbx-10h]; src
mov rdx, [rbx-8]; n
lea rcx, [rbx-10h]
cmp rdi, rax
jnz short loc_1F40
cmp rbx, rsi
jz short loc_1FC0
mov rax, [rbx]
mov [rbx+18h], rsi
mov [rbx+20h], rdx
mov [rbx+28h], rax
loc_1FB7:
mov [rbx-10h], rbx
mov rdi, rbx
jmp short loc_1F64
loc_1FC0:
lea rax, [rbx+18h]
cmp rcx, rax
jz loc_24E0
test rdx, rdx
jz short loc_1FF3
cmp rdx, 1
jz loc_21F0
mov [rsp+78h+var_70], rcx
call _memcpy
mov rdx, [rbx-8]
mov rdi, [rbx+18h]
mov rcx, [rsp+78h+var_70]
loc_1FF3:
mov [rbx+20h], rdx
mov byte ptr [rdi+rdx], 0
mov rdi, [rbx-10h]
jmp loc_1F64
loc_2008:
mov rsi, [rcx]
lea rdi, [rcx+10h]
mov rdx, [rsp+78h+var_68]
mov rax, [rsp+78h+var_60]
cmp rsi, rdi
jz loc_2150
cmp rdx, r15
jz loc_22D0
movq xmm0, rax
mov rdi, [rcx+10h]
mov [rcx], rdx
movhps xmm0, [rsp+78h+var_58]
movups xmmword ptr [rcx+8], xmm0
test rsi, rsi
jz loc_216A
mov [rsp+78h+var_68], rsi
mov [rsp+78h+var_58], rdi
loc_2053:
mov [rsp+78h+var_60], 0
mov byte ptr [rsi], 0
movsd xmm0, [rsp+78h+var_48]
mov rdi, [rsp+78h+var_68]; void *
movsd qword ptr [rcx+20h], xmm0
cmp rdi, r15
jz short loc_2082
mov rax, [rsp+78h+var_58]
lea rsi, [rax+1]; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2082:
lea rbx, [r13+18h]
loc_2086:
add r13, 28h ; '('
cmp rbp, rbx
jnz loc_1DB0
loc_2093:
mov rax, [rsp+78h+var_40]
sub rax, fs:28h
jnz loc_25F8
add rsp, 48h
pop rbx
pop rbp
pop r12
pop r13
pop r14
pop r15
retn
loc_20C0:
mov rcx, [r14]
lea rdi, [r14+10h]
mov rdx, [rsp+78h+var_68]
mov rax, [rsp+78h+var_60]
mov rsi, rcx
cmp rcx, rdi
jz loc_21A0
loc_20DD:
cmp rdx, r15
jz loc_2370
movq xmm0, rax
mov rdi, [r14+10h]
mov [r14], rdx
movhps xmm0, [rsp+78h+var_58]
movups xmmword ptr [r14+8], xmm0
test rcx, rcx
jz loc_21BB
mov [rsp+78h+var_68], rcx
mov [rsp+78h+var_58], rdi
loc_210F:
mov [rsp+78h+var_60], 0
mov byte ptr [rsi], 0
movsd xmm0, [rsp+78h+var_48]
mov rdi, [rsp+78h+var_68]; void *
movsd qword ptr [r14+20h], xmm0
cmp rdi, r15
jz loc_2086
mov rax, [rsp+78h+var_58]
lea rsi, [rax+1]; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp loc_2086
loc_2150:
cmp rdx, r15
jz loc_25C7
movq xmm0, rax
mov [rcx], rdx
movhps xmm0, [rsp+78h+var_58]
movups xmmword ptr [rcx+8], xmm0
loc_216A:
mov [rsp+78h+var_68], r15
mov rsi, r12
mov r15, r12
jmp loc_2053
loc_2180:
mov rcx, [r14]
lea rdi, [r14+10h]
mov rsi, rcx
cmp rcx, rdi
jnz loc_20DD
mov rdi, rcx
nop word ptr [rax+rax+00000000h]
loc_21A0:
cmp rdx, r15
jz loc_236A
movq xmm0, rax
mov [r14], rdx
movhps xmm0, [rsp+78h+var_58]
movups xmmword ptr [r14+8], xmm0
loc_21BB:
mov [rsp+78h+var_68], r15
mov rsi, r12
mov r15, r12
jmp loc_210F
loc_21D0:
movzx edx, byte ptr [rdx]
mov [rcx], dl
mov rsi, [rax-8]
mov rcx, [rax+18h]
mov [rax+20h], rsi
mov byte ptr [rcx+rsi], 0
mov rdx, [rax-10h]
jmp loc_1E57
loc_21F0:
movzx eax, byte ptr [rsi]
mov [rdi], al
mov rdx, [rbx-8]
mov rdi, [rbx+18h]
jmp loc_1FF3
loc_2208:
mov r8, [rdx]
mov [rcx], r8
mov r8d, esi
mov r9, [rdx+r8-8]
mov [rcx+r8-8], r9
lea r8, [rcx+8]
and r8, 0FFFFFFFFFFFFFFF8h
sub rcx, r8
sub rdx, rcx
add ecx, esi
and ecx, 0FFFFFFF8h
cmp ecx, 8
jb short loc_224A
and ecx, 0FFFFFFF8h
xor esi, esi
loc_2238:
mov r9d, esi
add esi, 8
mov r10, [rdx+r9]
mov [r8+r9], r10
cmp esi, ecx
jb short loc_2238
loc_224A:
mov rsi, [rax-8]
mov rcx, [rax+18h]
mov [rax+20h], rsi
mov byte ptr [rcx+rsi], 0
mov rdx, [rax-10h]
jmp loc_1E57
loc_2268:
lea rsi, [rax+1]
mov r9, r15
mov rdx, r13
cmp esi, 8
jnb loc_24A9
xor r8d, r8d
test sil, 4
jnz loc_2460
loc_2288:
test sil, 2
jnz loc_2447
loc_2292:
and esi, 1
jnz loc_2423
loc_229B:
comisd xmm0, qword ptr [r13-18h]
mov [rsp+78h+var_60], rax
mov rsi, r13
mov [r13-10h], r13
mov qword ptr [r13-8], 0
mov byte ptr [r13+0], 0
movsd [rsp+78h+var_48], xmm0
ja loc_1F37
nop word ptr [rax+rax+00000000h]
loc_22D0:
test rax, rax
jz short loc_2311
cmp rax, 1
jz loc_24E8
mov edx, eax
cmp eax, 8
jnb loc_250D
test al, 4
jnz loc_25E5
test edx, edx
jz short loc_230C
movzx eax, byte ptr [r15]
mov [rsi], al
test dl, 2
jz short loc_230C
movzx eax, word ptr [r15+rdx-2]
mov [rsi+rdx-2], ax
loc_230C:
mov rax, [rsp+78h+var_60]
loc_2311:
mov rdx, [rcx]
mov [rcx+8], rax
mov byte ptr [rdx+rax], 0
mov rsi, [rsp+78h+var_68]
jmp loc_2053
loc_2330:
lea rsi, [rax+1]
mov r8, r15
mov rdx, r13
cmp esi, 8
jnb loc_2478
xor edi, edi
test sil, 4
jnz loc_2431
loc_234F:
test sil, 2
jnz loc_240A
loc_2359:
and esi, 1
jnz loc_23FA
loc_2362:
mov rdx, r15
jmp loc_1DED
loc_236A:
mov rsi, rdi
nop dword ptr [rax]
loc_2370:
test rax, rax
jz short loc_23B8
cmp rax, 1
jz loc_24F9
mov edx, eax
cmp eax, 8
jnb loc_255C
test al, 4
jnz loc_25CF
test edx, edx
jz short loc_23B3
movzx eax, byte ptr [r15]
mov [rsi], al
test dl, 2
jz loc_25A2
movzx eax, word ptr [r15+rdx-2]
mov [rsi+rdx-2], ax
mov rcx, [r14]
loc_23B3:
mov rax, [rsp+78h+var_60]
loc_23B8:
mov [r14+8], rax
mov byte ptr [rcx+rax], 0
mov rsi, [rsp+78h+var_68]
jmp loc_210F
loc_23D0:
movzx r8d, byte ptr [rdx]
mov [rcx], r8b
test sil, 2
jz loc_224A
mov esi, esi
movzx edx, word ptr [rdx+rsi-2]
mov [rcx+rsi-2], dx
mov rcx, [rax+18h]
mov rsi, [rax-8]
jmp loc_1EE0
loc_23FA:
movzx edx, byte ptr [rdx+rdi]
mov [r8+rdi], dl
mov rdx, r15
jmp loc_1DED
loc_240A:
movzx r9d, word ptr [rdx+rdi]
mov [r8+rdi], r9w
add rdi, 2
and esi, 1
jz loc_2362
jmp short loc_23FA
loc_2423:
movzx edx, byte ptr [rdx+r8]
mov [r9+r8], dl
jmp loc_229B
loc_2431:
mov edi, [rdx]
mov [r8], edi
mov edi, 4
test sil, 2
jz loc_2359
jmp short loc_240A
loc_2447:
movzx r10d, word ptr [rdx+r8]
mov [r9+r8], r10w
add r8, 2
and esi, 1
jz loc_229B
jmp short loc_2423
loc_2460:
mov r8d, [rdx]
mov [r9], r8d
mov r8d, 4
test sil, 2
jz loc_2292
jmp short loc_2447
loc_2478:
mov r9d, esi
xor edx, edx
and r9d, 0FFFFFFF8h
loc_2481:
mov edi, edx
add edx, 8
mov r8, [r13+rdi+0]
mov [r15+rdi], r8
cmp edx, r9d
jb short loc_2481
lea r8, [r15+rdx]
xor edi, edi
add rdx, r13
test sil, 4
jz loc_234F
jmp short loc_2431
loc_24A9:
mov r10d, esi
xor edx, edx
and r10d, 0FFFFFFF8h
loc_24B2:
mov r8d, edx
add edx, 8
mov r9, [r13+r8+0]
mov [r15+r8], r9
cmp edx, r10d
jb short loc_24B2
lea r9, [r15+rdx]
xor r8d, r8d
add rdx, r13
test sil, 4
jz loc_2288
jmp short loc_2460
loc_24E0:
mov rdi, rsi
jmp loc_1F64
loc_24E8:
movzx eax, byte ptr [rsp+78h+var_58]
mov [rsi], al
mov rax, [rsp+78h+var_60]
jmp loc_2311
loc_24F9:
movzx eax, byte ptr [rsp+78h+var_58]
mov [rsi], al
mov rax, [rsp+78h+var_60]
mov rcx, [r14]
jmp loc_23B8
loc_250D:
mov rdx, [r15]
mov r9, r15
mov [rsi], rdx
mov edx, eax
mov rdi, [r15+rdx-8]
mov [rsi+rdx-8], rdi
lea rdi, [rsi+8]
and rdi, 0FFFFFFFFFFFFFFF8h
sub rsi, rdi
mov rdx, rsi
sub r9, rsi
add edx, eax
and edx, 0FFFFFFF8h
cmp edx, 8
jb loc_230C
and edx, 0FFFFFFF8h
xor eax, eax
loc_2546:
mov esi, eax
add eax, 8
mov r8, [r9+rsi]
mov [rdi+rsi], r8
cmp eax, edx
jb short loc_2546
jmp loc_230C
loc_255C:
mov rdx, [r15]
lea rdi, [rsi+8]
mov r8, r15
and rdi, 0FFFFFFFFFFFFFFF8h
mov [rsi], rdx
mov edx, eax
mov rcx, [r15+rdx-8]
mov [rsi+rdx-8], rcx
sub rsi, rdi
mov rdx, rsi
sub r8, rsi
add edx, eax
and edx, 0FFFFFFF8h
cmp edx, 8
jb short loc_25A2
and edx, 0FFFFFFF8h
xor eax, eax
loc_2591:
mov ecx, eax
add eax, 8
mov rsi, [r8+rcx]
mov [rdi+rcx], rsi
cmp eax, edx
jb short loc_2591
loc_25A2:
mov rcx, [r14]
jmp loc_23B3
loc_25AA:
mov r8d, [rdx]
mov esi, esi
mov [rcx], r8d
mov edx, [rdx+rsi-4]
mov [rcx+rsi-4], edx
mov rcx, [rax+18h]
mov rsi, [rax-8]
jmp loc_1EE0
loc_25C7:
mov rsi, rdi
jmp loc_22D0
loc_25CF:
mov eax, [r15]
mov [rsi], eax
mov eax, [r15+rdx-4]
mov [rsi+rdx-4], eax
mov rcx, [r14]
jmp loc_23B3
loc_25E5:
mov eax, [r15]
mov [rsi], eax
mov eax, [r15+rdx-4]
mov [rsi+rdx-4], eax
jmp loc_230C
loc_25F8:
call ___stack_chk_fail | unsigned long long std::__insertion_sort<__gnu_cxx::__normal_iterator<Item *,std::vector<Item>>,__gnu_cxx::__ops::_Iter_comp_iter<func0(std::vector<Item> const&,int)::{lambda(Item const&,Item const&)#1}>>(
long long a1,
long long a2)
{
long long v4; // r13
double *v5; // rdx
long long *v6; // rcx
long long *v7; // rdi
double v8; // xmm0_8
long long v9; // rax
double v10; // rsi
long long v11; // rcx
long long v12; // rbx
_QWORD *v13; // rax
_QWORD *v14; // rdi
long long v15; // rsi
_BYTE *v16; // rdx
_BYTE *v17; // rcx
_BYTE *v18; // rdx
long long v19; // rsi
bool v20; // cc
double v21; // rsi
long long *i; // rbx
long long v23; // rax
long long v24; // r8
long long *v25; // rsi
size_t v26; // rdx
long long v27; // rax
double *v28; // rsi
double v29; // rdi
double *v30; // rdi
double *v32; // rcx
double *v33; // rdi
double *v34; // rsi
double v35; // rdi
double *v36; // rdi
long long v37; // rsi
long long v38; // rcx
unsigned long long v39; // r8
_BYTE *v40; // rcx
_BYTE *v41; // rdx
unsigned int v42; // ecx
unsigned int v43; // ecx
unsigned int v44; // esi
long long v45; // r9
long long v46; // rsi
long long v47; // rcx
int v48; // esi
double *v49; // r9
_DWORD *v50; // rdx
long long v51; // r8
double *v52; // rdx
int v53; // esi
double *v54; // r8
_DWORD *v55; // rdx
long long v56; // rdi
long long v57; // rdx
long long v58; // rdi
long long v59; // rdx
long long v60; // r8
unsigned long long v61; // rdi
char *v62; // rsi
char *v63; // r9
unsigned int v64; // edx
unsigned int v65; // eax
long long v66; // rsi
unsigned long long v67; // rdi
char *v68; // rsi
unsigned int v69; // edx
unsigned int v70; // eax
long long v71; // rcx
long long *v72; // [rsp+8h] [rbp-70h]
void *v73; // [rsp+10h] [rbp-68h]
long long v74; // [rsp+18h] [rbp-60h]
double v75[2]; // [rsp+20h] [rbp-58h] BYREF
double v76; // [rsp+30h] [rbp-48h]
unsigned long long v77; // [rsp+38h] [rbp-40h]
v77 = __readfsqword(0x28u);
if ( a1 == a2 || a2 == a1 + 40 )
return v77 - __readfsqword(0x28u);
v4 = a1 + 56;
do
{
v73 = v75;
v5 = *(double **)(v4 - 16);
v6 = (long long *)(v4 - 16);
v7 = (long long *)v4;
v8 = *(double *)(v4 + 16);
v9 = *(_QWORD *)(v4 - 8);
if ( v8 > *(double *)(a1 + 32) )
{
if ( v5 != (double *)v4 )
{
v10 = *(double *)v4;
v73 = *(void **)(v4 - 16);
v75[0] = v10;
LABEL_7:
v11 = (long long)v6 - a1;
*(_QWORD *)(v4 - 16) = v4;
v12 = v4 + 24;
v74 = v9;
*(_QWORD *)(v4 - 8) = 0LL;
*(_BYTE *)v4 = 0;
v76 = v8;
if ( v11 <= 0 )
{
v32 = *(double **)a1;
v34 = *(double **)a1;
if ( *(_QWORD *)a1 == a1 + 16 )
{
v33 = *(double **)a1;
goto LABEL_60;
}
LABEL_50:
if ( v5 == v75 )
goto LABEL_89;
v35 = *(double *)(a1 + 16);
*(_QWORD *)a1 = v5;
*(__m128 *)(a1 + 8) = _mm_loadh_ps(v75);
if ( !v32 )
goto LABEL_62;
v73 = v32;
v75[0] = v35;
LABEL_53:
v74 = 0LL;
*(_BYTE *)v34 = 0;
v36 = (double *)v73;
*(double *)(a1 + 32) = v76;
if ( v36 != v75 )
operator delete(v36, *(_QWORD *)&v75[0] + 1LL);
goto LABEL_47;
}
v13 = (_QWORD *)(v4 - 40);
v14 = (_QWORD *)(v4 - 40 - v11);
while ( 1 )
{
v17 = (_BYTE *)v13[3];
v18 = (_BYTE *)*(v13 - 2);
if ( v17 == (_BYTE *)(v13 + 5) )
break;
if ( v13 == (_QWORD *)v18 )
goto LABEL_17;
v13[3] = v18;
v15 = v13[5];
v13[4] = *(v13 - 1);
v13[5] = *v13;
if ( !v17 )
goto LABEL_16;
*(v13 - 2) = v17;
v16 = v17;
*v13 = v15;
LABEL_12:
*(v13 - 1) = 0LL;
v13 -= 5;
*v16 = 0;
v13[12] = v13[7];
if ( v13 == v14 )
{
v32 = *(double **)a1;
v33 = (double *)(a1 + 16);
v5 = (double *)v73;
v9 = v74;
v34 = *(double **)a1;
if ( *(_QWORD *)a1 != a1 + 16 )
goto LABEL_50;
LABEL_60:
if ( v5 != v75 )
{
*(_QWORD *)a1 = v5;
*(__m128 *)(a1 + 8) = _mm_loadh_ps(v75);
LABEL_62:
v73 = v75;
v34 = v75;
goto LABEL_53;
}
v34 = v33;
LABEL_89:
if ( v9 )
{
if ( v9 == 1 )
{
*(_BYTE *)v34 = LOBYTE(v75[0]);
v9 = v74;
v32 = *(double **)a1;
}
else
{
if ( (unsigned int)v9 >= 8 )
{
v67 = (unsigned long long)(v34 + 1) & 0xFFFFFFFFFFFFFFF8LL;
*v34 = v75[0];
*(_QWORD *)((char *)v34 + (unsigned int)v9 - 8) = *(long long *)((char *)&v75[-1] + (unsigned int)v9);
v68 = (char *)v34 - v67;
if ( (((_DWORD)v9 + (_DWORD)v68) & 0xFFFFFFF8) >= 8 )
{
v69 = (v9 + (_DWORD)v68) & 0xFFFFFFF8;
v70 = 0;
do
{
v71 = v70;
v70 += 8;
*(_QWORD *)(v67 + v71) = *(_QWORD *)((char *)v75 - v68 + v71);
}
while ( v70 < v69 );
}
goto LABEL_128;
}
if ( (v9 & 4) != 0 )
{
*(_DWORD *)v34 = LODWORD(v75[0]);
*(_DWORD *)((char *)v34 + (unsigned int)v9 - 4) = *(_DWORD *)((char *)&v74 + (unsigned int)v9 + 4);
v32 = *(double **)a1;
}
else
{
if ( !(_DWORD)v9 )
goto LABEL_96;
*(_BYTE *)v34 = LOBYTE(v75[0]);
if ( (v9 & 2) != 0 )
{
*(_WORD *)((char *)v34 + (unsigned int)v9 - 2) = *(_WORD *)((char *)&v74 + (unsigned int)v9 + 6);
v32 = *(double **)a1;
goto LABEL_96;
}
LABEL_128:
v32 = *(double **)a1;
}
LABEL_96:
v9 = v74;
}
}
*(_QWORD *)(a1 + 8) = v9;
*((_BYTE *)v32 + v9) = 0;
v34 = (double *)v73;
goto LABEL_53;
}
}
if ( v13 != (_QWORD *)v18 )
{
v13[3] = v18;
v13[4] = *(v13 - 1);
v13[5] = *v13;
LABEL_16:
*(v13 - 2) = v13;
v16 = v13;
goto LABEL_12;
}
LABEL_17:
v19 = *(v13 - 1);
if ( v19 )
{
if ( v19 == 1 )
{
*v17 = *v18;
v37 = *(v13 - 1);
v38 = v13[3];
v13[4] = v37;
*(_BYTE *)(v38 + v37) = 0;
v16 = (_BYTE *)*(v13 - 2);
goto LABEL_12;
}
if ( (unsigned int)v19 >= 8 )
{
*(_QWORD *)v17 = *(_QWORD *)v18;
*(_QWORD *)&v17[(unsigned int)v19 - 8] = *(_QWORD *)&v18[(unsigned int)v19 - 8];
v39 = (unsigned long long)(v17 + 8) & 0xFFFFFFFFFFFFFFF8LL;
v40 = &v17[-v39];
v41 = (_BYTE *)(v18 - v40);
v42 = (v19 + (_DWORD)v40) & 0xFFFFFFF8;
if ( v42 >= 8 )
{
v43 = v42 & 0xFFFFFFF8;
v44 = 0;
do
{
v45 = v44;
v44 += 8;
*(_QWORD *)(v39 + v45) = *(_QWORD *)&v41[v45];
}
while ( v44 < v43 );
}
LABEL_68:
v46 = *(v13 - 1);
v47 = v13[3];
v13[4] = v46;
*(_BYTE *)(v47 + v46) = 0;
v16 = (_BYTE *)*(v13 - 2);
goto LABEL_12;
}
if ( (v19 & 4) != 0 )
{
*(_DWORD *)v17 = *(_DWORD *)v18;
*(_DWORD *)&v17[(unsigned int)v19 - 4] = *(_DWORD *)&v18[(unsigned int)v19 - 4];
v17 = (_BYTE *)v13[3];
v19 = *(v13 - 1);
}
else if ( (_DWORD)v19 )
{
*v17 = *v18;
if ( (v19 & 2) == 0 )
goto LABEL_68;
*(_WORD *)&v17[(unsigned int)v19 - 2] = *(_WORD *)&v18[(unsigned int)v19 - 2];
v17 = (_BYTE *)v13[3];
v19 = *(v13 - 1);
}
}
v13[4] = v19;
v17[v19] = 0;
v16 = (_BYTE *)*(v13 - 2);
goto LABEL_12;
}
v53 = v9 + 1;
v54 = v75;
v55 = (_DWORD *)v4;
if ( (unsigned int)(v9 + 1) >= 8 )
{
LODWORD(v57) = 0;
do
{
v58 = (unsigned int)v57;
v57 = (unsigned int)(v57 + 8);
*(double *)((char *)v75 + v58) = *(double *)(v4 + v58);
}
while ( (unsigned int)v57 < (v53 & 0xFFFFFFF8) );
v54 = (double *)((char *)v75 + v57);
v56 = 0LL;
v55 = (_DWORD *)(v4 + v57);
if ( (v53 & 4) == 0 )
{
LABEL_85:
if ( (v53 & 2) == 0 )
goto LABEL_86;
goto LABEL_101;
}
}
else
{
v56 = 0LL;
if ( (v53 & 4) == 0 )
goto LABEL_85;
}
*(_DWORD *)v54 = *v55;
v56 = 4LL;
if ( (v53 & 2) == 0 )
{
LABEL_86:
if ( (v53 & 1) == 0 )
{
LABEL_87:
v5 = v75;
goto LABEL_7;
}
LABEL_100:
*((_BYTE *)v54 + v56) = *((_BYTE *)v55 + v56);
v5 = v75;
goto LABEL_7;
}
LABEL_101:
*(_WORD *)((char *)v54 + v56) = *(_WORD *)((char *)v55 + v56);
v56 += 2LL;
if ( (v53 & 1) == 0 )
goto LABEL_87;
goto LABEL_100;
}
if ( v5 == (double *)v4 )
{
v48 = v9 + 1;
v49 = v75;
v50 = (_DWORD *)v4;
if ( (unsigned int)(v9 + 1) >= 8 )
{
LODWORD(v59) = 0;
do
{
v60 = (unsigned int)v59;
v59 = (unsigned int)(v59 + 8);
*(double *)((char *)v75 + v60) = *(double *)(v4 + v60);
}
while ( (unsigned int)v59 < (v48 & 0xFFFFFFF8) );
v49 = (double *)((char *)v75 + v59);
v51 = 0LL;
v50 = (_DWORD *)(v4 + v59);
if ( (v48 & 4) == 0 )
{
LABEL_71:
if ( (v48 & 2) == 0 )
goto LABEL_72;
goto LABEL_106;
}
}
else
{
v51 = 0LL;
if ( (v48 & 4) == 0 )
goto LABEL_71;
}
*(_DWORD *)v49 = *v50;
v51 = 4LL;
if ( (v48 & 2) == 0 )
{
LABEL_72:
if ( (v48 & 1) == 0 )
goto LABEL_73;
goto LABEL_103;
}
LABEL_106:
*(_WORD *)((char *)v49 + v51) = *(_WORD *)((char *)v50 + v51);
v51 += 2LL;
if ( (v48 & 1) == 0 )
{
LABEL_73:
v20 = v8 <= *(double *)(v4 - 24);
v74 = v9;
v28 = (double *)v4;
*(_QWORD *)(v4 - 16) = v4;
*(_QWORD *)(v4 - 8) = 0LL;
*(_BYTE *)v4 = 0;
v76 = v8;
if ( v20 )
goto LABEL_74;
goto LABEL_25;
}
LABEL_103:
*((_BYTE *)v49 + v51) = *((_BYTE *)v50 + v51);
goto LABEL_73;
}
v20 = v8 <= *(double *)(v4 - 24);
v21 = *(double *)v4;
v73 = *(void **)(v4 - 16);
v74 = v9;
v75[0] = v21;
*(_QWORD *)(v4 - 16) = v4;
*(_QWORD *)(v4 - 8) = 0LL;
*(_BYTE *)v4 = 0;
v76 = v8;
if ( v20 )
goto LABEL_55;
LABEL_25:
for ( i = (long long *)(v4 - 40); ; v7 = (long long *)i[3] )
{
v25 = (long long *)*(i - 2);
v26 = *(i - 1);
v6 = i - 2;
if ( v7 == i + 5 )
{
if ( i != v25 )
{
v27 = *i;
i[3] = (long long)v25;
i[4] = v26;
i[5] = v27;
LABEL_34:
*(i - 2) = (long long)i;
v7 = i;
goto LABEL_29;
}
}
else if ( i != v25 )
{
v23 = *i;
v24 = i[5];
i[3] = (long long)v25;
i[4] = v26;
i[5] = v23;
if ( v7 )
{
*(i - 2) = (long long)v7;
*i = v24;
goto LABEL_29;
}
goto LABEL_34;
}
if ( v6 == i + 3 )
{
v7 = (long long *)*(i - 2);
}
else
{
if ( v26 )
{
if ( v26 == 1 )
{
*(_BYTE *)v7 = *(_BYTE *)v25;
v26 = *(i - 1);
v7 = (long long *)i[3];
}
else
{
v72 = i - 2;
memcpy(v7, v25, v26);
v26 = *(i - 1);
v7 = (long long *)i[3];
v6 = v72;
}
}
i[4] = v26;
*((_BYTE *)v7 + v26) = 0;
v7 = (long long *)*(i - 2);
}
LABEL_29:
*(i - 1) = 0LL;
i -= 5;
*(_BYTE *)v7 = 0;
i[12] = i[7];
if ( v76 <= *((double *)i + 2) )
break;
}
v28 = (double *)*v6;
v7 = v6 + 2;
v5 = (double *)v73;
v9 = v74;
if ( (long long *)*v6 == v6 + 2 )
{
LABEL_55:
if ( v5 != v75 )
{
*v6 = (long long)v5;
*(__m128 *)(v6 + 1) = _mm_loadh_ps(v75);
goto LABEL_57;
}
v28 = (double *)v7;
LABEL_74:
if ( v9 )
{
if ( v9 == 1 )
{
*(_BYTE *)v28 = LOBYTE(v75[0]);
v9 = v74;
}
else
{
if ( (unsigned int)v9 >= 8 )
{
*v28 = v75[0];
*(_QWORD *)((char *)v28 + (unsigned int)v9 - 8) = *(long long *)((char *)&v75[-1] + (unsigned int)v9);
v61 = (unsigned long long)(v28 + 1) & 0xFFFFFFFFFFFFFFF8LL;
v62 = (char *)v28 - v61;
v63 = (char *)((char *)v75 - v62);
if ( (((_DWORD)v9 + (_DWORD)v62) & 0xFFFFFFF8) >= 8 )
{
v64 = (v9 + (_DWORD)v62) & 0xFFFFFFF8;
v65 = 0;
do
{
v66 = v65;
v65 += 8;
*(_QWORD *)(v61 + v66) = *(_QWORD *)&v63[v66];
}
while ( v65 < v64 );
}
}
else if ( (v9 & 4) != 0 )
{
*(_DWORD *)v28 = LODWORD(v75[0]);
*(_DWORD *)((char *)v28 + (unsigned int)v9 - 4) = *(_DWORD *)((char *)&v74 + (unsigned int)v9 + 4);
}
else if ( (_DWORD)v9 )
{
*(_BYTE *)v28 = LOBYTE(v75[0]);
if ( (v9 & 2) != 0 )
*(_WORD *)((char *)v28 + (unsigned int)v9 - 2) = *(_WORD *)((char *)&v74 + (unsigned int)v9 + 6);
}
v9 = v74;
}
}
v52 = (double *)*v6;
v6[1] = v9;
*((_BYTE *)v52 + v9) = 0;
v28 = (double *)v73;
goto LABEL_44;
}
if ( v73 == v75 )
goto LABEL_74;
v29 = *((double *)v6 + 2);
*v6 = (long long)v73;
*(__m128 *)(v6 + 1) = _mm_loadh_ps(v75);
if ( v28 )
{
v73 = v28;
v75[0] = v29;
goto LABEL_44;
}
LABEL_57:
v73 = v75;
v28 = v75;
LABEL_44:
v74 = 0LL;
*(_BYTE *)v28 = 0;
v30 = (double *)v73;
*((double *)v6 + 4) = v76;
if ( v30 != v75 )
operator delete(v30, *(_QWORD *)&v75[0] + 1LL);
v12 = v4 + 24;
LABEL_47:
v4 += 40LL;
}
while ( a2 != v12 );
return v77 - __readfsqword(0x28u);
} | __insertion_sort<__normal_iterator<Item*,std::vector<Item,std::allocator<Item>>>,__ops::_Iter_comp_iter<func0(std::vector<Item,std::allocator<Item>>const&,int)::{lambda(Item_const&,Item_const&)#1}>>:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x48
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
CMP RDI,RSI
JZ 0x00102093
LEA RAX,[RDI + 0x28]
MOV R14,RDI
MOV RBP,RSI
CMP RSI,RAX
JZ 0x00102093
LEA R15,[RSP + 0x20]
LEA R13,[RDI + 0x38]
MOV R12,R15
NOP word ptr CS:[RAX + RAX*0x1]
LAB_00101db0:
MOV qword ptr [RSP + 0x10],R15
MOV RDX,qword ptr [R13 + -0x10]
LEA RCX,[R13 + -0x10]
MOV RDI,R13
MOVSD XMM0,qword ptr [R13 + 0x10]
COMISD XMM0,qword ptr [R14 + 0x20]
MOV RAX,qword ptr [R13 + -0x8]
JBE 0x00101ef8
CMP RDX,R13
JZ 0x00102330
MOV RSI,qword ptr [R13]
MOV qword ptr [RSP + 0x10],RDX
MOV qword ptr [RSP + 0x20],RSI
LAB_00101ded:
SUB RCX,R14
MOV qword ptr [R13 + -0x10],R13
LEA RBX,[R13 + 0x18]
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [R13 + -0x8],0x0
MOV byte ptr [R13],0x0
MOVSD qword ptr [RSP + 0x30],XMM0
TEST RCX,RCX
JLE 0x00102180
LEA RAX,[R13 + -0x28]
MOV RDI,RAX
SUB RDI,RCX
JMP 0x00101e79
LAB_00101e28:
CMP RAX,RDX
JZ 0x00101eb0
MOV qword ptr [RAX + 0x18],RDX
MOV RDX,qword ptr [RAX + -0x8]
MOV RSI,qword ptr [RAX + 0x28]
MOV qword ptr [RAX + 0x20],RDX
MOV RDX,qword ptr [RAX]
MOV qword ptr [RAX + 0x28],RDX
TEST RCX,RCX
JZ 0x00101ea2
MOV qword ptr [RAX + -0x10],RCX
MOV RDX,RCX
MOV qword ptr [RAX],RSI
LAB_00101e57:
MOV qword ptr [RAX + -0x8],0x0
SUB RAX,0x28
MOV byte ptr [RDX],0x0
MOVSD XMM0,qword ptr [RAX + 0x38]
MOVSD qword ptr [RAX + 0x60],XMM0
CMP RAX,RDI
JZ 0x001020c0
LAB_00101e79:
MOV RCX,qword ptr [RAX + 0x18]
LEA RSI,[RAX + 0x28]
MOV RDX,qword ptr [RAX + -0x10]
CMP RCX,RSI
JNZ 0x00101e28
CMP RAX,RDX
JZ 0x00101eb0
MOV qword ptr [RAX + 0x18],RDX
MOV RDX,qword ptr [RAX + -0x8]
MOV qword ptr [RAX + 0x20],RDX
MOV RDX,qword ptr [RAX]
MOV qword ptr [RAX + 0x28],RDX
LAB_00101ea2:
MOV qword ptr [RAX + -0x10],RAX
MOV RDX,RAX
JMP 0x00101e57
LAB_00101eb0:
MOV RSI,qword ptr [RAX + -0x8]
TEST RSI,RSI
JZ 0x00101ee0
CMP RSI,0x1
JZ 0x001021d0
CMP ESI,0x8
JNC 0x00102208
TEST SIL,0x4
JNZ 0x001025aa
TEST ESI,ESI
JNZ 0x001023d0
NOP
LAB_00101ee0:
MOV qword ptr [RAX + 0x20],RSI
MOV byte ptr [RCX + RSI*0x1],0x0
MOV RDX,qword ptr [RAX + -0x10]
JMP 0x00101e57
LAB_00101ef8:
CMP RDX,R13
JZ 0x00102268
COMISD XMM0,qword ptr [R13 + -0x18]
MOV RSI,qword ptr [R13]
MOV qword ptr [RSP + 0x10],RDX
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x20],RSI
MOV qword ptr [R13 + -0x10],R13
MOV qword ptr [R13 + -0x8],0x0
MOV byte ptr [R13],0x0
MOVSD qword ptr [RSP + 0x30],XMM0
JBE 0x00102150
LAB_00101f37:
LEA RBX,[R13 + -0x28]
JMP 0x00101f8e
LAB_00101f40:
CMP RBX,RSI
JZ 0x00101fc0
MOV RAX,qword ptr [RBX]
MOV R8,qword ptr [RBX + 0x28]
MOV qword ptr [RBX + 0x18],RSI
MOV qword ptr [RBX + 0x20],RDX
MOV qword ptr [RBX + 0x28],RAX
TEST RDI,RDI
JZ 0x00101fb7
MOV qword ptr [RBX + -0x10],RDI
MOV qword ptr [RBX],R8
LAB_00101f64:
MOV qword ptr [RBX + -0x8],0x0
SUB RBX,0x28
MOV byte ptr [RDI],0x0
MOVSD XMM0,qword ptr [RBX + 0x38]
MOVSD qword ptr [RBX + 0x60],XMM0
MOVSD XMM0,qword ptr [RSP + 0x30]
COMISD XMM0,qword ptr [RBX + 0x10]
JBE 0x00102008
MOV RDI,qword ptr [RBX + 0x18]
LAB_00101f8e:
LEA RAX,[RBX + 0x28]
MOV RSI,qword ptr [RBX + -0x10]
MOV RDX,qword ptr [RBX + -0x8]
LEA RCX,[RBX + -0x10]
CMP RDI,RAX
JNZ 0x00101f40
CMP RBX,RSI
JZ 0x00101fc0
MOV RAX,qword ptr [RBX]
MOV qword ptr [RBX + 0x18],RSI
MOV qword ptr [RBX + 0x20],RDX
MOV qword ptr [RBX + 0x28],RAX
LAB_00101fb7:
MOV qword ptr [RBX + -0x10],RBX
MOV RDI,RBX
JMP 0x00101f64
LAB_00101fc0:
LEA RAX,[RBX + 0x18]
CMP RCX,RAX
JZ 0x001024e0
TEST RDX,RDX
JZ 0x00101ff3
CMP RDX,0x1
JZ 0x001021f0
MOV qword ptr [RSP + 0x8],RCX
CALL 0x001011b0
MOV RDX,qword ptr [RBX + -0x8]
MOV RDI,qword ptr [RBX + 0x18]
MOV RCX,qword ptr [RSP + 0x8]
LAB_00101ff3:
MOV qword ptr [RBX + 0x20],RDX
MOV byte ptr [RDI + RDX*0x1],0x0
MOV RDI,qword ptr [RBX + -0x10]
JMP 0x00101f64
LAB_00102008:
MOV RSI,qword ptr [RCX]
LEA RDI,[RCX + 0x10]
MOV RDX,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x18]
CMP RSI,RDI
JZ 0x00102150
CMP RDX,R15
JZ 0x001022d0
MOVQ XMM0,RAX
MOV RDI,qword ptr [RCX + 0x10]
MOV qword ptr [RCX],RDX
MOVHPS XMM0,qword ptr [RSP + 0x20]
MOVUPS xmmword ptr [RCX + 0x8],XMM0
TEST RSI,RSI
JZ 0x0010216a
MOV qword ptr [RSP + 0x10],RSI
MOV qword ptr [RSP + 0x20],RDI
LAB_00102053:
MOV qword ptr [RSP + 0x18],0x0
MOV byte ptr [RSI],0x0
MOVSD XMM0,qword ptr [RSP + 0x30]
MOV RDI,qword ptr [RSP + 0x10]
MOVSD qword ptr [RCX + 0x20],XMM0
CMP RDI,R15
JZ 0x00102082
MOV RAX,qword ptr [RSP + 0x20]
LEA RSI,[RAX + 0x1]
CALL 0x001011d0
LAB_00102082:
LEA RBX,[R13 + 0x18]
LAB_00102086:
ADD R13,0x28
CMP RBP,RBX
JNZ 0x00101db0
LAB_00102093:
MOV RAX,qword ptr [RSP + 0x38]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x001025f8
ADD RSP,0x48
POP RBX
POP RBP
POP R12
POP R13
POP R14
POP R15
RET
LAB_001020c0:
MOV RCX,qword ptr [R14]
LEA RDI,[R14 + 0x10]
MOV RDX,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x18]
MOV RSI,RCX
CMP RCX,RDI
JZ 0x001021a0
LAB_001020dd:
CMP RDX,R15
JZ 0x00102370
MOVQ XMM0,RAX
MOV RDI,qword ptr [R14 + 0x10]
MOV qword ptr [R14],RDX
MOVHPS XMM0,qword ptr [RSP + 0x20]
MOVUPS xmmword ptr [R14 + 0x8],XMM0
TEST RCX,RCX
JZ 0x001021bb
MOV qword ptr [RSP + 0x10],RCX
MOV qword ptr [RSP + 0x20],RDI
LAB_0010210f:
MOV qword ptr [RSP + 0x18],0x0
MOV byte ptr [RSI],0x0
MOVSD XMM0,qword ptr [RSP + 0x30]
MOV RDI,qword ptr [RSP + 0x10]
MOVSD qword ptr [R14 + 0x20],XMM0
CMP RDI,R15
JZ 0x00102086
MOV RAX,qword ptr [RSP + 0x20]
LEA RSI,[RAX + 0x1]
CALL 0x001011d0
JMP 0x00102086
LAB_00102150:
CMP RDX,R15
JZ 0x001025c7
MOVQ XMM0,RAX
MOV qword ptr [RCX],RDX
MOVHPS XMM0,qword ptr [RSP + 0x20]
MOVUPS xmmword ptr [RCX + 0x8],XMM0
LAB_0010216a:
MOV qword ptr [RSP + 0x10],R15
MOV RSI,R12
MOV R15,R12
JMP 0x00102053
LAB_00102180:
MOV RCX,qword ptr [R14]
LEA RDI,[R14 + 0x10]
MOV RSI,RCX
CMP RCX,RDI
JNZ 0x001020dd
MOV RDI,RCX
NOP word ptr CS:[RAX + RAX*0x1]
LAB_001021a0:
CMP RDX,R15
JZ 0x0010236a
MOVQ XMM0,RAX
MOV qword ptr [R14],RDX
MOVHPS XMM0,qword ptr [RSP + 0x20]
MOVUPS xmmword ptr [R14 + 0x8],XMM0
LAB_001021bb:
MOV qword ptr [RSP + 0x10],R15
MOV RSI,R12
MOV R15,R12
JMP 0x0010210f
LAB_001021d0:
MOVZX EDX,byte ptr [RDX]
MOV byte ptr [RCX],DL
MOV RSI,qword ptr [RAX + -0x8]
MOV RCX,qword ptr [RAX + 0x18]
MOV qword ptr [RAX + 0x20],RSI
MOV byte ptr [RCX + RSI*0x1],0x0
MOV RDX,qword ptr [RAX + -0x10]
JMP 0x00101e57
LAB_001021f0:
MOVZX EAX,byte ptr [RSI]
MOV byte ptr [RDI],AL
MOV RDX,qword ptr [RBX + -0x8]
MOV RDI,qword ptr [RBX + 0x18]
JMP 0x00101ff3
LAB_00102208:
MOV R8,qword ptr [RDX]
MOV qword ptr [RCX],R8
MOV R8D,ESI
MOV R9,qword ptr [RDX + R8*0x1 + -0x8]
MOV qword ptr [RCX + R8*0x1 + -0x8],R9
LEA R8,[RCX + 0x8]
AND R8,-0x8
SUB RCX,R8
SUB RDX,RCX
ADD ECX,ESI
AND ECX,0xfffffff8
CMP ECX,0x8
JC 0x0010224a
AND ECX,0xfffffff8
XOR ESI,ESI
LAB_00102238:
MOV R9D,ESI
ADD ESI,0x8
MOV R10,qword ptr [RDX + R9*0x1]
MOV qword ptr [R8 + R9*0x1],R10
CMP ESI,ECX
JC 0x00102238
LAB_0010224a:
MOV RSI,qword ptr [RAX + -0x8]
MOV RCX,qword ptr [RAX + 0x18]
MOV qword ptr [RAX + 0x20],RSI
MOV byte ptr [RCX + RSI*0x1],0x0
MOV RDX,qword ptr [RAX + -0x10]
JMP 0x00101e57
LAB_00102268:
LEA RSI,[RAX + 0x1]
MOV R9,R15
MOV RDX,R13
CMP ESI,0x8
JNC 0x001024a9
XOR R8D,R8D
TEST SIL,0x4
JNZ 0x00102460
LAB_00102288:
TEST SIL,0x2
JNZ 0x00102447
LAB_00102292:
AND ESI,0x1
JNZ 0x00102423
LAB_0010229b:
COMISD XMM0,qword ptr [R13 + -0x18]
MOV qword ptr [RSP + 0x18],RAX
MOV RSI,R13
MOV qword ptr [R13 + -0x10],R13
MOV qword ptr [R13 + -0x8],0x0
MOV byte ptr [R13],0x0
MOVSD qword ptr [RSP + 0x30],XMM0
JA 0x00101f37
NOP word ptr CS:[RAX + RAX*0x1]
LAB_001022d0:
TEST RAX,RAX
JZ 0x00102311
CMP RAX,0x1
JZ 0x001024e8
MOV EDX,EAX
CMP EAX,0x8
JNC 0x0010250d
TEST AL,0x4
JNZ 0x001025e5
TEST EDX,EDX
JZ 0x0010230c
MOVZX EAX,byte ptr [R15]
MOV byte ptr [RSI],AL
TEST DL,0x2
JZ 0x0010230c
MOVZX EAX,word ptr [R15 + RDX*0x1 + -0x2]
MOV word ptr [RSI + RDX*0x1 + -0x2],AX
LAB_0010230c:
MOV RAX,qword ptr [RSP + 0x18]
LAB_00102311:
MOV RDX,qword ptr [RCX]
MOV qword ptr [RCX + 0x8],RAX
MOV byte ptr [RDX + RAX*0x1],0x0
MOV RSI,qword ptr [RSP + 0x10]
JMP 0x00102053
LAB_00102330:
LEA RSI,[RAX + 0x1]
MOV R8,R15
MOV RDX,R13
CMP ESI,0x8
JNC 0x00102478
XOR EDI,EDI
TEST SIL,0x4
JNZ 0x00102431
LAB_0010234f:
TEST SIL,0x2
JNZ 0x0010240a
LAB_00102359:
AND ESI,0x1
JNZ 0x001023fa
LAB_00102362:
MOV RDX,R15
JMP 0x00101ded
LAB_0010236a:
MOV RSI,RDI
NOP dword ptr [RAX]
LAB_00102370:
TEST RAX,RAX
JZ 0x001023b8
CMP RAX,0x1
JZ 0x001024f9
MOV EDX,EAX
CMP EAX,0x8
JNC 0x0010255c
TEST AL,0x4
JNZ 0x001025cf
TEST EDX,EDX
JZ 0x001023b3
MOVZX EAX,byte ptr [R15]
MOV byte ptr [RSI],AL
TEST DL,0x2
JZ 0x001025a2
MOVZX EAX,word ptr [R15 + RDX*0x1 + -0x2]
MOV word ptr [RSI + RDX*0x1 + -0x2],AX
MOV RCX,qword ptr [R14]
LAB_001023b3:
MOV RAX,qword ptr [RSP + 0x18]
LAB_001023b8:
MOV qword ptr [R14 + 0x8],RAX
MOV byte ptr [RCX + RAX*0x1],0x0
MOV RSI,qword ptr [RSP + 0x10]
JMP 0x0010210f
LAB_001023d0:
MOVZX R8D,byte ptr [RDX]
MOV byte ptr [RCX],R8B
TEST SIL,0x2
JZ 0x0010224a
MOV ESI,ESI
MOVZX EDX,word ptr [RDX + RSI*0x1 + -0x2]
MOV word ptr [RCX + RSI*0x1 + -0x2],DX
MOV RCX,qword ptr [RAX + 0x18]
MOV RSI,qword ptr [RAX + -0x8]
JMP 0x00101ee0
LAB_001023fa:
MOVZX EDX,byte ptr [RDX + RDI*0x1]
MOV byte ptr [R8 + RDI*0x1],DL
MOV RDX,R15
JMP 0x00101ded
LAB_0010240a:
MOVZX R9D,word ptr [RDX + RDI*0x1]
MOV word ptr [R8 + RDI*0x1],R9W
ADD RDI,0x2
AND ESI,0x1
JZ 0x00102362
JMP 0x001023fa
LAB_00102423:
MOVZX EDX,byte ptr [RDX + R8*0x1]
MOV byte ptr [R9 + R8*0x1],DL
JMP 0x0010229b
LAB_00102431:
MOV EDI,dword ptr [RDX]
MOV dword ptr [R8],EDI
MOV EDI,0x4
TEST SIL,0x2
JZ 0x00102359
JMP 0x0010240a
LAB_00102447:
MOVZX R10D,word ptr [RDX + R8*0x1]
MOV word ptr [R9 + R8*0x1],R10W
ADD R8,0x2
AND ESI,0x1
JZ 0x0010229b
JMP 0x00102423
LAB_00102460:
MOV R8D,dword ptr [RDX]
MOV dword ptr [R9],R8D
MOV R8D,0x4
TEST SIL,0x2
JZ 0x00102292
JMP 0x00102447
LAB_00102478:
MOV R9D,ESI
XOR EDX,EDX
AND R9D,0xfffffff8
LAB_00102481:
MOV EDI,EDX
ADD EDX,0x8
MOV R8,qword ptr [R13 + RDI*0x1]
MOV qword ptr [R15 + RDI*0x1],R8
CMP EDX,R9D
JC 0x00102481
LEA R8,[R15 + RDX*0x1]
XOR EDI,EDI
ADD RDX,R13
TEST SIL,0x4
JZ 0x0010234f
JMP 0x00102431
LAB_001024a9:
MOV R10D,ESI
XOR EDX,EDX
AND R10D,0xfffffff8
LAB_001024b2:
MOV R8D,EDX
ADD EDX,0x8
MOV R9,qword ptr [R13 + R8*0x1]
MOV qword ptr [R15 + R8*0x1],R9
CMP EDX,R10D
JC 0x001024b2
LEA R9,[R15 + RDX*0x1]
XOR R8D,R8D
ADD RDX,R13
TEST SIL,0x4
JZ 0x00102288
JMP 0x00102460
LAB_001024e0:
MOV RDI,RSI
JMP 0x00101f64
LAB_001024e8:
MOVZX EAX,byte ptr [RSP + 0x20]
MOV byte ptr [RSI],AL
MOV RAX,qword ptr [RSP + 0x18]
JMP 0x00102311
LAB_001024f9:
MOVZX EAX,byte ptr [RSP + 0x20]
MOV byte ptr [RSI],AL
MOV RAX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [R14]
JMP 0x001023b8
LAB_0010250d:
MOV RDX,qword ptr [R15]
MOV R9,R15
MOV qword ptr [RSI],RDX
MOV EDX,EAX
MOV RDI,qword ptr [R15 + RDX*0x1 + -0x8]
MOV qword ptr [RSI + RDX*0x1 + -0x8],RDI
LEA RDI,[RSI + 0x8]
AND RDI,-0x8
SUB RSI,RDI
MOV RDX,RSI
SUB R9,RSI
ADD EDX,EAX
AND EDX,0xfffffff8
CMP EDX,0x8
JC 0x0010230c
AND EDX,0xfffffff8
XOR EAX,EAX
LAB_00102546:
MOV ESI,EAX
ADD EAX,0x8
MOV R8,qword ptr [R9 + RSI*0x1]
MOV qword ptr [RDI + RSI*0x1],R8
CMP EAX,EDX
JC 0x00102546
JMP 0x0010230c
LAB_0010255c:
MOV RDX,qword ptr [R15]
LEA RDI,[RSI + 0x8]
MOV R8,R15
AND RDI,-0x8
MOV qword ptr [RSI],RDX
MOV EDX,EAX
MOV RCX,qword ptr [R15 + RDX*0x1 + -0x8]
MOV qword ptr [RSI + RDX*0x1 + -0x8],RCX
SUB RSI,RDI
MOV RDX,RSI
SUB R8,RSI
ADD EDX,EAX
AND EDX,0xfffffff8
CMP EDX,0x8
JC 0x001025a2
AND EDX,0xfffffff8
XOR EAX,EAX
LAB_00102591:
MOV ECX,EAX
ADD EAX,0x8
MOV RSI,qword ptr [R8 + RCX*0x1]
MOV qword ptr [RDI + RCX*0x1],RSI
CMP EAX,EDX
JC 0x00102591
LAB_001025a2:
MOV RCX,qword ptr [R14]
JMP 0x001023b3
LAB_001025aa:
MOV R8D,dword ptr [RDX]
MOV ESI,ESI
MOV dword ptr [RCX],R8D
MOV EDX,dword ptr [RDX + RSI*0x1 + -0x4]
MOV dword ptr [RCX + RSI*0x1 + -0x4],EDX
MOV RCX,qword ptr [RAX + 0x18]
MOV RSI,qword ptr [RAX + -0x8]
JMP 0x00101ee0
LAB_001025c7:
MOV RSI,RDI
JMP 0x001022d0
LAB_001025cf:
MOV EAX,dword ptr [R15]
MOV dword ptr [RSI],EAX
MOV EAX,dword ptr [R15 + RDX*0x1 + -0x4]
MOV dword ptr [RSI + RDX*0x1 + -0x4],EAX
MOV RCX,qword ptr [R14]
JMP 0x001023b3
LAB_001025e5:
MOV EAX,dword ptr [R15]
MOV dword ptr [RSI],EAX
MOV EAX,dword ptr [R15 + RDX*0x1 + -0x4]
MOV dword ptr [RSI + RDX*0x1 + -0x4],EAX
JMP 0x0010230c
LAB_001025f8:
CALL 0x001011e0 | /* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* void std::__insertion_sort<__normal_iterator<Item*, std::vector<Item, std::allocator<Item> > >,
__ops::_Iter_comp_iter<func0(std::vector<Item, std::allocator<Item> > const&, int)::{lambda(Item
const&, Item const&)#1}> >(__normal_iterator<Item*, std::vector<Item, std::allocator<Item> > >,
__normal_iterator<Item*, std::vector<Item, std::allocator<Item> > >,
__ops::_Iter_comp_iter<func0(std::vector<Item, std::allocator<Item> > const&, int)::{lambda(Item
const&, Item const&)#1}>) [clone .isra.0] */
void std::
__insertion_sort<__normal_iterator<Item*,std::vector<Item,std::allocator<Item>>>,__ops::_Iter_comp_iter<func0(std::vector<Item,std::allocator<Item>>const&,int)::_lambda(Item_const&,Item_const&)_1_>>
(__normal_iterator param_1,__normal_iterator param_2,_Iter_comp_iter param_3)
{
double dVar1;
uint uVar2;
long *plVar3;
long *plVar4;
long *plVar5;
ulong uVar6;
uint uVar7;
size_t __n;
ulong uVar8;
long *plVar9;
ulong uVar10;
long *plVar11;
int4 in_register_00000034;
long *plVar12;
long lVar13;
int4 in_register_0000003c;
long *plVar14;
long *plVar15;
long in_FS_OFFSET;
long *local_68;
int8 local_60;
long local_58 [2];
double local_48;
long local_40;
plVar14 = (long *)CONCAT44(in_register_0000003c,param_1);
plVar12 = (long *)CONCAT44(in_register_00000034,param_2);
local_40 = *(long *)(in_FS_OFFSET + 0x28);
if ((plVar14 == plVar12) || (plVar12 == plVar14 + 5)) {
LAB_00102093:
if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return;
}
plVar15 = plVar14 + 7;
LAB_00101db0:
local_68 = (long *)plVar15[-2];
plVar5 = plVar15 + -2;
dVar1 = (double)plVar15[2];
local_60 = plVar15[-1];
if (dVar1 < (double)plVar14[4] || dVar1 == (double)plVar14[4]) {
plVar3 = plVar15;
plVar9 = plVar15;
local_48 = dVar1;
if (local_68 != plVar15) {
local_58[0] = *plVar15;
plVar15[-2] = (long)plVar15;
plVar15[-1] = 0;
*(int *)plVar15 = 0;
if ((double)plVar15[-3] <= dVar1 && dVar1 != (double)plVar15[-3]) goto LAB_00101f8e;
goto LAB_00102150;
}
uVar6 = local_60 + 1;
if ((uint)uVar6 < 8) {
plVar11 = plVar15;
plVar4 = local_58;
if ((uVar6 & 4) != 0) goto LAB_00102460;
LAB_00102288:
lVar13 = 0;
}
else {
uVar10 = 0;
do {
uVar7 = (int)uVar10 + 8;
uVar8 = (ulong)uVar7;
*(int8 *)((long)local_58 + uVar10) = *(int8 *)((long)plVar15 + uVar10);
uVar10 = uVar8;
} while (uVar7 < ((uint)uVar6 & 0xfffffff8));
plVar4 = (long *)((long)local_58 + uVar8);
plVar11 = (long *)(uVar8 + (long)plVar15);
if ((uVar6 & 4) == 0) goto LAB_00102288;
LAB_00102460:
*(int4 *)plVar4 = *(int4 *)plVar11;
lVar13 = 4;
}
if ((uVar6 & 2) != 0) {
*(int2 *)((long)plVar4 + lVar13) = *(int2 *)((long)plVar11 + lVar13);
lVar13 = lVar13 + 2;
}
if ((uVar6 & 1) != 0) {
*(int *)((long)plVar4 + lVar13) = *(int *)((long)plVar11 + lVar13);
}
plVar15[-2] = (long)plVar15;
plVar15[-1] = 0;
*(int *)plVar15 = 0;
local_68 = local_58;
if ((double)plVar15[-3] <= dVar1 && dVar1 != (double)plVar15[-3]) {
LAB_00101f8e:
do {
plVar11 = plVar9 + -5;
plVar4 = (long *)plVar9[-7];
__n = plVar9[-6];
plVar5 = plVar9 + -7;
if (plVar3 == plVar9) {
if (plVar11 == plVar4) {
LAB_00101fc0:
if (plVar5 != plVar9 + -2) {
if (__n != 0) {
if (__n == 1) {
*(int *)plVar3 = *(int *)plVar4;
__n = plVar9[-6];
plVar3 = (long *)plVar9[-2];
}
else {
memcpy(plVar3,plVar4,__n);
__n = plVar9[-6];
plVar3 = (long *)plVar9[-2];
}
}
plVar9[-1] = __n;
*(int *)((long)plVar3 + __n) = 0;
plVar4 = (long *)plVar9[-7];
}
}
else {
plVar9[-2] = (long)plVar4;
plVar9[-1] = __n;
*plVar9 = *plVar11;
LAB_00101fb7:
plVar9[-7] = (long)plVar11;
plVar4 = plVar11;
}
}
else {
if (plVar11 == plVar4) goto LAB_00101fc0;
lVar13 = *plVar9;
plVar9[-2] = (long)plVar4;
plVar9[-1] = __n;
*plVar9 = *plVar11;
if (plVar3 == (long *)0x0) goto LAB_00101fb7;
plVar9[-7] = (long)plVar3;
*plVar11 = lVar13;
plVar4 = plVar3;
}
plVar9[-6] = 0;
*(int *)plVar4 = 0;
plVar9[2] = plVar9[-3];
if (local_48 < (double)plVar9[-8] || local_48 == (double)plVar9[-8]) goto LAB_00102008;
plVar3 = (long *)plVar9[-7];
plVar9 = plVar11;
} while( true );
}
goto LAB_001022d0;
}
if (local_68 == plVar15) {
uVar6 = local_60 + 1;
if ((uint)uVar6 < 8) {
plVar9 = plVar15;
plVar3 = local_58;
if ((uVar6 & 4) != 0) goto LAB_00102431;
LAB_0010234f:
lVar13 = 0;
}
else {
uVar10 = 0;
do {
uVar7 = (int)uVar10 + 8;
uVar8 = (ulong)uVar7;
*(int8 *)((long)local_58 + uVar10) = *(int8 *)((long)plVar15 + uVar10);
uVar10 = uVar8;
} while (uVar7 < ((uint)uVar6 & 0xfffffff8));
plVar3 = (long *)((long)local_58 + uVar8);
plVar9 = (long *)(uVar8 + (long)plVar15);
if ((uVar6 & 4) == 0) goto LAB_0010234f;
LAB_00102431:
*(int4 *)plVar3 = *(int4 *)plVar9;
lVar13 = 4;
}
if ((uVar6 & 2) != 0) {
*(int2 *)((long)plVar3 + lVar13) = *(int2 *)((long)plVar9 + lVar13);
lVar13 = lVar13 + 2;
}
local_68 = local_58;
if ((uVar6 & 1) != 0) {
*(int *)((long)plVar3 + lVar13) = *(int *)((long)plVar9 + lVar13);
}
}
else {
local_58[0] = *plVar15;
}
plVar15[-2] = (long)plVar15;
plVar15[-1] = 0;
*(int *)plVar15 = 0;
local_48 = dVar1;
if ((long)plVar5 - (long)plVar14 < 1) {
plVar5 = (long *)*plVar14;
plVar3 = plVar5;
if (plVar5 != plVar14 + 2) goto LAB_001020dd;
LAB_001021a0:
if (local_68 == local_58) {
LAB_00102370:
if (local_60 != 0) {
if (local_60 == 1) {
*(int *)plVar3 = (int)local_58[0];
plVar5 = (long *)*plVar14;
}
else {
uVar7 = (uint)local_60;
uVar6 = local_60 & 0xffffffff;
if (uVar7 < 8) {
if ((local_60 & 4) == 0) {
if (uVar7 != 0) {
*(int *)plVar3 = (int)local_58[0];
if ((local_60 & 2) == 0) goto LAB_001025a2;
*(int2 *)((long)plVar3 + (uVar6 - 2)) =
*(int2 *)((long)local_58 + (uVar6 - 2));
plVar5 = (long *)*plVar14;
}
}
else {
*(int4 *)plVar3 = (int4)local_58[0];
*(int4 *)((long)plVar3 + (uVar6 - 4)) =
*(int4 *)((long)local_58 + (uVar6 - 4));
plVar5 = (long *)*plVar14;
}
}
else {
*plVar3 = local_58[0];
*(int8 *)((long)plVar3 + ((local_60 & 0xffffffff) - 8)) =
*(int8 *)((long)local_58 + ((local_60 & 0xffffffff) - 8));
lVar13 = (long)plVar3 - ((ulong)(plVar3 + 1) & 0xfffffffffffffff8);
uVar7 = (int)lVar13 + uVar7 & 0xfffffff8;
if (7 < uVar7) {
uVar2 = 0;
do {
uVar6 = (ulong)uVar2;
uVar2 = uVar2 + 8;
*(int8 *)(((ulong)(plVar3 + 1) & 0xfffffffffffffff8) + uVar6) =
*(int8 *)((long)local_58 + (uVar6 - lVar13));
} while (uVar2 < uVar7);
}
LAB_001025a2:
plVar5 = (long *)*plVar14;
}
}
}
plVar14[1] = local_60;
*(int *)((long)plVar5 + local_60) = 0;
}
else {
*plVar14 = (long)local_68;
plVar14[1] = local_60;
plVar14[2] = local_58[0];
local_68 = local_58;
}
}
else {
plVar3 = plVar15 + -5;
do {
plVar4 = (long *)plVar3[3];
plVar9 = (long *)plVar3[-2];
if (plVar4 == plVar3 + 5) {
if (plVar3 == plVar9) {
LAB_00101eb0:
uVar6 = plVar3[-1];
if (uVar6 == 0) {
LAB_00101ee0:
plVar3[4] = uVar6;
*(int *)((long)plVar4 + uVar6) = 0;
plVar4 = (long *)plVar3[-2];
}
else if (uVar6 == 1) {
*(int *)plVar4 = *(int *)plVar9;
plVar3[4] = plVar3[-1];
*(int *)(plVar3[3] + plVar3[-1]) = 0;
plVar4 = (long *)plVar3[-2];
}
else {
uVar7 = (uint)uVar6;
if (uVar7 < 8) {
if ((uVar6 & 4) == 0) {
if (uVar7 != 0) {
*(int *)plVar4 = *(int *)plVar9;
if ((uVar6 & 2) == 0) goto LAB_0010224a;
*(int2 *)((long)plVar4 + ((uVar6 & 0xffffffff) - 2)) =
*(int2 *)((long)plVar9 + ((uVar6 & 0xffffffff) - 2));
plVar4 = (long *)plVar3[3];
uVar6 = plVar3[-1];
}
}
else {
*(int4 *)plVar4 = *(int4 *)plVar9;
*(int4 *)((long)plVar4 + ((uVar6 & 0xffffffff) - 4)) =
*(int4 *)((long)plVar9 + ((uVar6 & 0xffffffff) - 4));
plVar4 = (long *)plVar3[3];
uVar6 = plVar3[-1];
}
goto LAB_00101ee0;
}
*plVar4 = *plVar9;
*(int8 *)((long)plVar4 + ((uVar6 & 0xffffffff) - 8)) =
*(int8 *)((long)plVar9 + ((uVar6 & 0xffffffff) - 8));
lVar13 = (long)plVar4 - ((ulong)(plVar4 + 1) & 0xfffffffffffffff8);
uVar7 = (int)lVar13 + uVar7 & 0xfffffff8;
if (7 < uVar7) {
uVar2 = 0;
do {
uVar6 = (ulong)uVar2;
uVar2 = uVar2 + 8;
*(int8 *)(((ulong)(plVar4 + 1) & 0xfffffffffffffff8) + uVar6) =
*(int8 *)((long)plVar9 + (uVar6 - lVar13));
} while (uVar2 < uVar7);
}
LAB_0010224a:
plVar3[4] = plVar3[-1];
*(int *)(plVar3[3] + plVar3[-1]) = 0;
plVar4 = (long *)plVar3[-2];
}
}
else {
plVar3[3] = (long)plVar9;
plVar3[4] = plVar3[-1];
plVar3[5] = *plVar3;
LAB_00101ea2:
plVar3[-2] = (long)plVar3;
plVar4 = plVar3;
}
}
else {
if (plVar3 == plVar9) goto LAB_00101eb0;
plVar3[3] = (long)plVar9;
lVar13 = plVar3[5];
plVar3[4] = plVar3[-1];
plVar3[5] = *plVar3;
if (plVar4 == (long *)0x0) goto LAB_00101ea2;
plVar3[-2] = (long)plVar4;
*plVar3 = lVar13;
}
plVar3[-1] = 0;
plVar9 = plVar3 + -5;
*(int *)plVar4 = 0;
plVar3[7] = plVar3[2];
plVar3 = plVar9;
} while (plVar9 != (long *)((long)(plVar15 + -5) - ((long)plVar5 - (long)plVar14)));
plVar5 = (long *)*plVar14;
plVar3 = plVar14 + 2;
if (plVar5 == plVar14 + 2) goto LAB_001021a0;
LAB_001020dd:
plVar3 = plVar5;
if (local_68 == local_58) goto LAB_00102370;
lVar13 = plVar14[2];
*plVar14 = (long)local_68;
plVar14[1] = local_60;
plVar14[2] = local_58[0];
local_68 = local_58;
if (plVar5 != (long *)0x0) {
local_58[0] = lVar13;
local_68 = plVar5;
}
}
local_60 = 0;
*(int *)local_68 = 0;
plVar14[4] = (long)local_48;
if (local_68 != local_58) {
operator_delete(local_68,local_58[0] + 1);
}
goto LAB_00102086;
LAB_00102008:
plVar4 = (long *)*plVar5;
plVar3 = plVar9 + -5;
if (plVar4 == plVar3) {
LAB_00102150:
if (local_68 != local_58) {
*plVar5 = (long)local_68;
plVar5[1] = local_60;
plVar5[2] = local_58[0];
local_68 = local_58;
goto LAB_00102053;
}
}
else {
plVar3 = plVar4;
if (local_68 != local_58) {
lVar13 = plVar9[-5];
*plVar5 = (long)local_68;
plVar9[-6] = local_60;
plVar9[-5] = local_58[0];
local_68 = local_58;
if (plVar4 != (long *)0x0) {
local_58[0] = lVar13;
local_68 = plVar4;
}
goto LAB_00102053;
}
}
LAB_001022d0:
if (local_60 != 0) {
if (local_60 == 1) {
*(int *)plVar3 = (int)local_58[0];
}
else {
uVar7 = (uint)local_60;
uVar6 = local_60 & 0xffffffff;
if (uVar7 < 8) {
if ((local_60 & 4) == 0) {
if ((uVar7 != 0) && (*(int *)plVar3 = (int)local_58[0], (local_60 & 2) != 0))
{
*(int2 *)((long)plVar3 + (uVar6 - 2)) =
*(int2 *)((long)local_58 + (uVar6 - 2));
}
}
else {
*(int4 *)plVar3 = (int4)local_58[0];
*(int4 *)((long)plVar3 + (uVar6 - 4)) =
*(int4 *)((long)local_58 + (uVar6 - 4));
}
}
else {
*plVar3 = local_58[0];
*(int8 *)((long)plVar3 + ((local_60 & 0xffffffff) - 8)) =
*(int8 *)((long)local_58 + ((local_60 & 0xffffffff) - 8));
lVar13 = (long)plVar3 - ((ulong)(plVar3 + 1) & 0xfffffffffffffff8);
uVar7 = (int)lVar13 + uVar7 & 0xfffffff8;
if (7 < uVar7) {
uVar2 = 0;
do {
uVar6 = (ulong)uVar2;
uVar2 = uVar2 + 8;
*(int8 *)(((ulong)(plVar3 + 1) & 0xfffffffffffffff8) + uVar6) =
*(int8 *)((long)local_58 + (uVar6 - lVar13));
} while (uVar2 < uVar7);
}
}
}
}
plVar5[1] = local_60;
*(int *)(*plVar5 + local_60) = 0;
LAB_00102053:
local_60 = 0;
*(int *)local_68 = 0;
plVar5[4] = (long)local_48;
if (local_68 != local_58) {
operator_delete(local_68,local_58[0] + 1);
}
LAB_00102086:
plVar5 = plVar15 + 3;
plVar15 = plVar15 + 5;
if (plVar12 == plVar5) goto LAB_00102093;
goto LAB_00101db0;
} |
2,340 | func0 |
#include <vector>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& a, int n, int k) {
std::vector<int> b(a.begin(), a.begin() + k);
std::vector<int> result(a.begin() + k, a.end());
result.insert(result.end(), b.begin(), b.end());
return result;
}
| int main() {
assert((func0({12, 10, 5, 6, 52, 36}, 6, 2) == std::vector<int>{5, 6, 52, 36, 12, 10}));
assert((func0({1, 2, 3, 4}, 4, 1) == std::vector<int>{2, 3, 4, 1}));
assert((func0({0, 1, 2, 3, 4, 5, 6, 7}, 8, 3) == std::vector<int>{3, 4, 5, 6, 7, 0, 1, 2}));
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> > const&, int, int):
endbr64
push %rbp
mov %rsp,%rbp
push %r12
push %rbx
sub $0x50,%rsp
mov %rdi,-0x48(%rbp)
mov %rsi,-0x50(%rbp)
mov %edx,-0x54(%rbp)
mov %ecx,-0x58(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
lea -0x40(%rbp),%rax
mov %rax,%rdi
callq 1c04 <_ZNSaIiEC1Ev>
mov -0x58(%rbp),%eax
movslq %eax,%rbx
mov -0x50(%rbp),%rax
mov %rax,%rdi
callq 1b46 <_ZNKSt6vectorIiSaIiEE5beginEv>
mov %rax,-0x38(%rbp)
lea -0x38(%rbp),%rax
mov %rbx,%rsi
mov %rax,%rdi
callq 1b9e <_ZNK9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEplEl>
mov %rax,%rbx
mov -0x50(%rbp),%rax
mov %rax,%rdi
callq 1b46 <_ZNKSt6vectorIiSaIiEE5beginEv>
mov %rax,%rsi
lea -0x40(%rbp),%rdx
lea -0x30(%rbp),%rax
mov %rdx,%rcx
mov %rbx,%rdx
mov %rax,%rdi
callq 1c44 <_ZNSt6vectorIiSaIiEEC1IN9__gnu_cxx17__normal_iteratorIPKiS1_EEvEET_S8_RKS0_>
lea -0x40(%rbp),%rax
mov %rax,%rdi
callq 1c24 <_ZNSaIiED1Ev>
lea -0x40(%rbp),%rax
mov %rax,%rdi
callq 1c04 <_ZNSaIiEC1Ev>
mov -0x50(%rbp),%rax
mov %rax,%rdi
callq 1d2a <_ZNKSt6vectorIiSaIiEE3endEv>
mov %rax,%r12
mov -0x58(%rbp),%eax
movslq %eax,%rbx
mov -0x50(%rbp),%rax
mov %rax,%rdi
callq 1b46 <_ZNKSt6vectorIiSaIiEE5beginEv>
mov %rax,-0x38(%rbp)
lea -0x38(%rbp),%rax
mov %rbx,%rsi
mov %rax,%rdi
callq 1b9e <_ZNK9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEplEl>
mov %rax,%rsi
lea -0x40(%rbp),%rdx
mov -0x48(%rbp),%rax
mov %rdx,%rcx
mov %r12,%rdx
mov %rax,%rdi
callq 1c44 <_ZNSt6vectorIiSaIiEEC1IN9__gnu_cxx17__normal_iteratorIPKiS1_EEvEET_S8_RKS0_>
lea -0x40(%rbp),%rax
mov %rax,%rdi
callq 1c24 <_ZNSaIiED1Ev>
lea -0x30(%rbp),%rax
mov %rax,%rdi
callq 1d82 <_ZNSt6vectorIiSaIiEE3endEv>
mov %rax,%r12
lea -0x30(%rbp),%rax
mov %rax,%rdi
callq 1dd2 <_ZNSt6vectorIiSaIiEE5beginEv>
mov %rax,%rbx
mov -0x48(%rbp),%rax
mov %rax,%rdi
callq 1d82 <_ZNSt6vectorIiSaIiEE3endEv>
mov %rax,-0x40(%rbp)
lea -0x40(%rbp),%rdx
lea -0x38(%rbp),%rax
mov %rdx,%rsi
mov %rax,%rdi
callq 1e1e <_ZN9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEC1IPiEERKNS0_IT_NS_11__enable_ifIXsrSt10__are_sameIS9_S8_E7__valueES5_E6__typeEEE>
mov -0x38(%rbp),%rsi
mov -0x48(%rbp),%rax
mov %r12,%rcx
mov %rbx,%rdx
mov %rax,%rdi
callq 1e4c <_ZNSt6vectorIiSaIiEE6insertIN9__gnu_cxx17__normal_iteratorIPiS1_EEvEES6_NS4_IPKiS1_EET_SA_>
lea -0x30(%rbp),%rax
mov %rax,%rdi
callq 1ce2 <_ZNSt6vectorIiSaIiEED1Ev>
mov -0x18(%rbp),%rax
xor %fs:0x28,%rax
je 1477 <_Z5func0RKSt6vectorIiSaIiEEii+0x1ce>
jmp 1472 <_Z5func0RKSt6vectorIiSaIiEEii+0x1c9>
endbr64
mov %rax,%rbx
lea -0x40(%rbp),%rax
mov %rax,%rdi
callq 1c24 <_ZNSaIiED1Ev>
mov %rbx,%rax
mov %rax,%rdi
callq 11b0 <_Unwind_Resume@plt>
endbr64
mov %rax,%rbx
lea -0x40(%rbp),%rax
mov %rax,%rdi
callq 1c24 <_ZNSaIiED1Ev>
jmp 145b <_Z5func0RKSt6vectorIiSaIiEEii+0x1b2>
endbr64
mov %rax,%rbx
mov -0x48(%rbp),%rax
mov %rax,%rdi
callq 1ce2 <_ZNSt6vectorIiSaIiEED1Ev>
lea -0x30(%rbp),%rax
mov %rax,%rdi
callq 1ce2 <_ZNSt6vectorIiSaIiEED1Ev>
mov %rbx,%rax
mov %rax,%rdi
callq 11b0 <_Unwind_Resume@plt>
callq 1170 <__stack_chk_fail@plt>
mov -0x48(%rbp),%rax
add $0x50,%rsp
pop %rbx
pop %r12
pop %rbp
retq
| _Z5func0RKSt6vectorIiSaIiEEii:
endbr64
push rbp
mov rbp, rsp
push r12
push rbx
sub rsp, 60h
mov [rbp+var_58], rdi
mov [rbp+var_60], rsi
mov [rbp+var_64], edx
mov [rbp+var_68], ecx
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_50]
mov [rbp+var_40], rax
nop
nop
mov eax, [rbp+var_68]
movsxd rbx, eax
mov rax, [rbp+var_60]
mov rdi, rax
call _ZNKSt6vectorIiSaIiEE5beginEv; std::vector<int>::begin(void)
mov [rbp+var_48], rax
lea rax, [rbp+var_48]
mov rsi, rbx
mov rdi, rax
call _ZNK9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEplEl; __gnu_cxx::__normal_iterator<int const*,std::vector<int>>::operator+(long)
mov rbx, rax
mov rax, [rbp+var_60]
mov rdi, rax
call _ZNKSt6vectorIiSaIiEE5beginEv; std::vector<int>::begin(void)
mov rsi, rax
lea rdx, [rbp+var_50]
lea rax, [rbp+var_30]
mov rcx, rdx
mov rdx, rbx
mov rdi, rax
call _ZNSt6vectorIiSaIiEEC2IN9__gnu_cxx17__normal_iteratorIPKiS1_EEvEET_S8_RKS0_; std::vector<int>::vector<__gnu_cxx::__normal_iterator<int const*,std::vector<int>>,void>(__gnu_cxx::__normal_iterator<int const*,std::vector<int>>,__gnu_cxx::__normal_iterator<int const*,std::vector<int>>,std::allocator<int> const&)
lea rax, [rbp+var_50]
mov rdi, rax
call _ZNSt15__new_allocatorIiED2Ev; std::__new_allocator<int>::~__new_allocator()
nop
lea rax, [rbp+var_50]
mov [rbp+var_38], rax
nop
nop
mov rax, [rbp+var_60]
mov rdi, rax
call _ZNKSt6vectorIiSaIiEE3endEv; std::vector<int>::end(void)
mov r12, rax
mov eax, [rbp+var_68]
movsxd rbx, eax
mov rax, [rbp+var_60]
mov rdi, rax
call _ZNKSt6vectorIiSaIiEE5beginEv; std::vector<int>::begin(void)
mov [rbp+var_48], rax
lea rax, [rbp+var_48]
mov rsi, rbx
mov rdi, rax
call _ZNK9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEplEl; __gnu_cxx::__normal_iterator<int const*,std::vector<int>>::operator+(long)
mov rsi, rax
lea rdx, [rbp+var_50]
mov rax, [rbp+var_58]
mov rcx, rdx
mov rdx, r12
mov rdi, rax
call _ZNSt6vectorIiSaIiEEC2IN9__gnu_cxx17__normal_iteratorIPKiS1_EEvEET_S8_RKS0_; std::vector<int>::vector<__gnu_cxx::__normal_iterator<int const*,std::vector<int>>,void>(__gnu_cxx::__normal_iterator<int const*,std::vector<int>>,__gnu_cxx::__normal_iterator<int const*,std::vector<int>>,std::allocator<int> const&)
lea rax, [rbp+var_50]
mov rdi, rax
call _ZNSt15__new_allocatorIiED2Ev; std::__new_allocator<int>::~__new_allocator()
nop
lea rax, [rbp+var_30]
mov rdi, rax
call _ZNSt6vectorIiSaIiEE3endEv; std::vector<int>::end(void)
mov r12, rax
lea rax, [rbp+var_30]
mov rdi, rax
call _ZNSt6vectorIiSaIiEE5beginEv; std::vector<int>::begin(void)
mov rbx, rax
mov rax, [rbp+var_58]
mov rdi, rax
call _ZNSt6vectorIiSaIiEE3endEv; std::vector<int>::end(void)
mov [rbp+var_50], rax
lea rdx, [rbp+var_50]
lea rax, [rbp+var_48]
mov rsi, rdx
mov rdi, rax
call _ZN9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEC2IPivEERKNS0_IT_S5_EE; __gnu_cxx::__normal_iterator<int const*,std::vector<int>>::__normal_iterator<int *,void>(__gnu_cxx::__normal_iterator<int *,std::vector<int>> const&)
mov rsi, [rbp+var_48]
mov rax, [rbp+var_58]
mov rcx, r12
mov rdx, rbx
mov rdi, rax
call _ZNSt6vectorIiSaIiEE6insertIN9__gnu_cxx17__normal_iteratorIPiS1_EEvEES6_NS4_IPKiS1_EET_SA_; std::vector<int>::insert<__gnu_cxx::__normal_iterator<int *,std::vector<int>>,void>(__gnu_cxx::__normal_iterator<int const*,std::vector<int>>,__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__normal_iterator<int *,std::vector<int>>)
nop
lea rax, [rbp+var_30]
mov rdi, rax
call _ZNSt6vectorIiSaIiEED2Ev; std::vector<int>::~vector()
nop
mov rax, [rbp+var_18]
sub rax, fs:28h
jz loc_14C6
jmp loc_14C1
endbr64
mov rbx, rax
lea rax, [rbp+var_50]
mov rdi, rax
call _ZNSt15__new_allocatorIiED2Ev; std::__new_allocator<int>::~__new_allocator()
nop
mov rax, rbx
mov rdx, [rbp+var_18]
sub rdx, fs:28h
jz short loc_1465
call ___stack_chk_fail
loc_1465:
mov rdi, rax; struct _Unwind_Exception *
call __Unwind_Resume
endbr64
mov rbx, rax
lea rax, [rbp+var_50]
mov rdi, rax
call _ZNSt15__new_allocatorIiED2Ev; std::__new_allocator<int>::~__new_allocator()
nop
jmp short loc_1496
endbr64
mov rbx, rax
mov rax, [rbp+var_58]
mov rdi, rax
call _ZNSt6vectorIiSaIiEED2Ev; std::vector<int>::~vector()
loc_1496:
lea rax, [rbp+var_30]
mov rdi, rax
call _ZNSt6vectorIiSaIiEED2Ev; std::vector<int>::~vector()
mov rax, rbx
mov rdx, [rbp+var_18]
sub rdx, fs:28h
jz short loc_14B9
call ___stack_chk_fail
loc_14B9:
mov rdi, rax; struct _Unwind_Exception *
call __Unwind_Resume
loc_14C1:
call ___stack_chk_fail
loc_14C6:
mov rax, [rbp+var_58]
add rsp, 60h
pop rbx
pop r12
pop rbp
retn | long long func0(long long a1, long long a2, long long a3, int a4)
{
long long v4; // rbx
long long v5; // rbx
long long v6; // rax
long long v7; // r12
long long v8; // rax
long long v9; // r12
long long v10; // rbx
long long v13; // [rsp+20h] [rbp-50h] BYREF
_QWORD v14[3]; // [rsp+28h] [rbp-48h] BYREF
_BYTE v15[24]; // [rsp+40h] [rbp-30h] BYREF
unsigned long long v16; // [rsp+58h] [rbp-18h]
v16 = __readfsqword(0x28u);
v14[1] = &v13;
v4 = a4;
v14[0] = std::vector<int>::begin(a2);
v5 = __gnu_cxx::__normal_iterator<int const*,std::vector<int>>::operator+(v14, v4);
v6 = std::vector<int>::begin(a2);
std::vector<int>::vector<__gnu_cxx::__normal_iterator<int const*,std::vector<int>>,void>(v15, v6, v5, &v13);
std::__new_allocator<int>::~__new_allocator(&v13);
v14[2] = &v13;
v7 = std::vector<int>::end(a2);
v14[0] = std::vector<int>::begin(a2);
v8 = __gnu_cxx::__normal_iterator<int const*,std::vector<int>>::operator+(v14, a4);
std::vector<int>::vector<__gnu_cxx::__normal_iterator<int const*,std::vector<int>>,void>(a1, v8, v7, &v13);
std::__new_allocator<int>::~__new_allocator(&v13);
v9 = std::vector<int>::end(v15);
v10 = std::vector<int>::begin(v15);
v13 = std::vector<int>::end(a1);
__gnu_cxx::__normal_iterator<int const*,std::vector<int>>::__normal_iterator<int *,void>(v14, &v13);
std::vector<int>::insert<__gnu_cxx::__normal_iterator<int *,std::vector<int>>,void>(a1, v14[0], v10, v9);
std::vector<int>::~vector(v15);
return a1;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R12
PUSH RBX
SUB RSP,0x60
MOV qword ptr [RBP + -0x58],RDI
MOV qword ptr [RBP + -0x60],RSI
MOV dword ptr [RBP + -0x64],EDX
MOV dword ptr [RBP + -0x68],ECX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x50]
MOV qword ptr [RBP + -0x40],RAX
NOP
NOP
MOV EAX,dword ptr [RBP + -0x68]
MOVSXD RBX,EAX
MOV RAX,qword ptr [RBP + -0x60]
MOV RDI,RAX
CALL 0x00101be6
MOV qword ptr [RBP + -0x48],RAX
LEA RAX,[RBP + -0x48]
MOV RSI,RBX
MOV RDI,RAX
CALL 0x00101c32
MOV RBX,RAX
MOV RAX,qword ptr [RBP + -0x60]
MOV RDI,RAX
CALL 0x00101be6
MOV RSI,RAX
LEA RDX,[RBP + -0x50]
LEA RAX,[RBP + -0x30]
MOV RCX,RDX
MOV RDX,RBX
MOV RDI,RAX
LAB_00101347:
CALL 0x00101c98
LEA RAX,[RBP + -0x50]
MOV RDI,RAX
CALL 0x0010213a
NOP
LEA RAX,[RBP + -0x50]
MOV qword ptr [RBP + -0x38],RAX
NOP
NOP
MOV RAX,qword ptr [RBP + -0x60]
MOV RDI,RAX
CALL 0x00101d98
MOV R12,RAX
MOV EAX,dword ptr [RBP + -0x68]
MOVSXD RBX,EAX
MOV RAX,qword ptr [RBP + -0x60]
MOV RDI,RAX
CALL 0x00101be6
MOV qword ptr [RBP + -0x48],RAX
LEA RAX,[RBP + -0x48]
MOV RSI,RBX
MOV RDI,RAX
CALL 0x00101c32
MOV RSI,RAX
LEA RDX,[RBP + -0x50]
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,RDX
MOV RDX,R12
MOV RDI,RAX
LAB_001013ab:
CALL 0x00101c98
LEA RAX,[RBP + -0x50]
MOV RDI,RAX
CALL 0x0010213a
NOP
LEA RAX,[RBP + -0x30]
MOV RDI,RAX
CALL 0x00101de8
MOV R12,RAX
LEA RAX,[RBP + -0x30]
MOV RDI,RAX
CALL 0x00101e38
MOV RBX,RAX
MOV RAX,qword ptr [RBP + -0x58]
MOV RDI,RAX
CALL 0x00101de8
MOV qword ptr [RBP + -0x50],RAX
LEA RDX,[RBP + -0x50]
LEA RAX,[RBP + -0x48]
MOV RSI,RDX
MOV RDI,RAX
CALL 0x00101e84
MOV RSI,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,R12
MOV RDX,RBX
MOV RDI,RAX
LAB_0010140f:
CALL 0x00101eb2
NOP
LEA RAX,[RBP + -0x30]
MOV RDI,RAX
CALL 0x00101d3e
NOP
MOV RAX,qword ptr [RBP + -0x18]
SUB RAX,qword ptr FS:[0x28]
JZ 0x001014c6
JMP 0x001014c1
LAB_001014c1:
CALL 0x00101190
LAB_001014c6:
MOV RAX,qword ptr [RBP + -0x58]
ADD RSP,0x60
POP RBX
POP R12
POP RBP
RET | /* func0(std::vector<int, std::allocator<int> > const&, int, int) */
vector * func0(vector *param_1,int param_2,int param_3)
{
__normal_iterator _Var1;
__normal_iterator _Var2;
int in_ECX;
int4 in_register_00000034;
vector<int,std::allocator<int>> *this;
long in_FS_OFFSET;
int8 local_58;
int8 local_50;
int8 *local_48;
int8 *local_40;
vector<int,std::allocator<int>> local_38 [24];
long local_20;
this = (vector<int,std::allocator<int>> *)CONCAT44(in_register_00000034,param_2);
local_20 = *(long *)(in_FS_OFFSET + 0x28);
local_48 = &local_58;
local_50 = std::vector<int,std::allocator<int>>::begin(this);
_Var1 = __normal_iterator<int_const*,std::vector<int,std::allocator<int>>>::operator+
((__normal_iterator<int_const*,std::vector<int,std::allocator<int>>> *)&local_50
,(long)in_ECX);
_Var2 = std::vector<int,std::allocator<int>>::begin(this);
/* try { // try from 00101347 to 0010134b has its CatchHandler @ 0010143a */
std::vector<int,std::allocator<int>>::
vector<__normal_iterator<int_const*,std::vector<int,std::allocator<int>>>,void>
(local_38,_Var2,_Var1,(allocator *)&local_58);
std::__new_allocator<int>::~__new_allocator((__new_allocator<int> *)&local_58);
local_40 = &local_58;
_Var1 = std::vector<int,std::allocator<int>>::end(this);
local_50 = std::vector<int,std::allocator<int>>::begin(this);
_Var2 = __normal_iterator<int_const*,std::vector<int,std::allocator<int>>>::operator+
((__normal_iterator<int_const*,std::vector<int,std::allocator<int>>> *)&local_50
,(long)in_ECX);
/* try { // try from 001013ab to 001013af has its CatchHandler @ 0010146d */
std::vector<int,std::allocator<int>>::
vector<__normal_iterator<int_const*,std::vector<int,std::allocator<int>>>,void>
((vector<int,std::allocator<int>> *)param_1,_Var2,_Var1,(allocator *)&local_58);
std::__new_allocator<int>::~__new_allocator((__new_allocator<int> *)&local_58);
_Var1 = std::vector<int,std::allocator<int>>::end(local_38);
_Var2 = std::vector<int,std::allocator<int>>::begin(local_38);
local_58 = std::vector<int,std::allocator<int>>::end((vector<int,std::allocator<int>> *)param_1);
__normal_iterator<int_const*,std::vector<int,std::allocator<int>>>::__normal_iterator<int*,void>
((__normal_iterator<int_const*,std::vector<int,std::allocator<int>>> *)&local_50,
(__normal_iterator *)&local_58);
/* try { // try from 0010140f to 00101413 has its CatchHandler @ 00101483 */
std::vector<int,std::allocator<int>>::
insert<__normal_iterator<int*,std::vector<int,std::allocator<int>>>,void>
((vector<int,std::allocator<int>> *)param_1,(__normal_iterator)local_50,_Var2,_Var1);
std::vector<int,std::allocator<int>>::~vector(local_38);
if (local_20 != *(long *)(in_FS_OFFSET + 0x28)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return param_1;
} |
2,341 | func0 |
#include <vector>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& a, int n, int k) {
std::vector<int> b(a.begin(), a.begin() + k);
std::vector<int> result(a.begin() + k, a.end());
result.insert(result.end(), b.begin(), b.end());
return result;
}
| int main() {
assert((func0({12, 10, 5, 6, 52, 36}, 6, 2) == std::vector<int>{5, 6, 52, 36, 12, 10}));
assert((func0({1, 2, 3, 4}, 4, 1) == std::vector<int>{2, 3, 4, 1}));
assert((func0({0, 1, 2, 3, 4, 5, 6, 7}, 8, 3) == std::vector<int>{3, 4, 5, 6, 7, 0, 1, 2}));
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> > const&, int, int):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x18,%rsp
mov (%rsi),%r14
movslq %ecx,%rcx
movabs $0x1fffffffffffffff,%rax
cmp %rax,%rcx
ja 12f8 <_Z5func0RKSt6vectorIiSaIiEEii+0xaf>
mov %rdi,%rbx
mov %rsi,%r13
lea 0x0(,%rcx,4),%rbp
mov $0x0,%r12d
test %rcx,%rcx
je 1298 <_Z5func0RKSt6vectorIiSaIiEEii+0x4f>
mov %rbp,%rdi
callq 1120 <_Znwm@plt>
mov %rax,%r12
lea (%r12,%rbp,1),%rax
mov %rax,0x8(%rsp)
test %rbp,%rbp
je 12b4 <_Z5func0RKSt6vectorIiSaIiEEii+0x6b>
mov %rbp,%rdx
mov %r14,%rsi
mov %r12,%rdi
callq 1140 <memmove@plt>
mov 0x8(%r13),%r15
add 0x0(%r13),%rbp
movq $0x0,(%rbx)
movq $0x0,0x8(%rbx)
movq $0x0,0x10(%rbx)
mov %r15,%r13
sub %rbp,%r13
mov %r13,%rax
sar $0x2,%rax
test %r13,%r13
js 1304 <_Z5func0RKSt6vectorIiSaIiEEii+0xbb>
test %rax,%rax
je 1370 <_Z5func0RKSt6vectorIiSaIiEEii+0x127>
mov %r13,%rdi
callq 1120 <_Znwm@plt>
jmp 1339 <_Z5func0RKSt6vectorIiSaIiEEii+0xf0>
lea 0xd09(%rip),%rdi
callq 10e0 <_ZSt20__throw_length_errorPKc@plt>
lea 0xcfd(%rip),%rdi
callq 10e0 <_ZSt20__throw_length_errorPKc@plt>
endbr64
mov %rax,%rbp
mov (%rbx),%rdi
test %rdi,%rdi
je 1324 <_Z5func0RKSt6vectorIiSaIiEEii+0xdb>
callq 1110 <_ZdlPv@plt>
test %r12,%r12
je 1331 <_Z5func0RKSt6vectorIiSaIiEEii+0xe8>
mov %r12,%rdi
callq 1110 <_ZdlPv@plt>
mov %rbp,%rdi
callq 1150 <_Unwind_Resume@plt>
mov %rax,%rdi
mov %rdi,(%rbx)
lea (%rdi,%r13,1),%r14
mov %r14,0x10(%rbx)
cmp %r15,%rbp
je 1357 <_Z5func0RKSt6vectorIiSaIiEEii+0x10e>
mov %r13,%rdx
mov %rbp,%rsi
callq 1140 <memmove@plt>
mov %r14,0x8(%rbx)
mov 0x8(%rsp),%rcx
mov %r12,%rdx
mov %r14,%rsi
mov %rbx,%rdi
callq 1918 <_ZNSt6vectorIiSaIiEE15_M_range_insertIN9__gnu_cxx17__normal_iteratorIPiS1_EEEEvS6_T_S7_St20forward_iterator_tag>
jmp 1377 <_Z5func0RKSt6vectorIiSaIiEEii+0x12e>
mov $0x0,%edi
jmp 133c <_Z5func0RKSt6vectorIiSaIiEEii+0xf3>
test %r12,%r12
je 1384 <_Z5func0RKSt6vectorIiSaIiEEii+0x13b>
mov %r12,%rdi
callq 1110 <_ZdlPv@plt>
mov %rbx,%rax
add $0x18,%rsp
pop %rbx
pop %rbp
pop %r12
pop %r13
pop %r14
pop %r15
retq
endbr64
mov %rax,%rbp
mov (%rbx),%rdi
test %rdi,%rdi
je 1324 <_Z5func0RKSt6vectorIiSaIiEEii+0xdb>
callq 1110 <_ZdlPv@plt>
jmpq 1324 <_Z5func0RKSt6vectorIiSaIiEEii+0xdb>
| _Z5func0RKSt6vectorIiSaIiEEii:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 38h
mov rax, fs:28h
mov [rsp+68h+var_40], rax
xor eax, eax
mov r12, [rsi]
movsxd rbx, ecx
shl rbx, 2
mov [rsp+68h+var_58], 0
mov [rsp+68h+var_50], 0
mov [rsp+68h+var_48], 0
mov rax, 7FFFFFFFFFFFFFFCh
cmp rax, rbx
jb short loc_12B8
mov rbp, rdi
mov r15, rsi
test rbx, rbx
jz loc_148D
mov rdi, rbx; unsigned __int64
call __Znwm; operator new(ulong)
jmp short loc_1303
loc_12B8:
mov rax, [rsp+68h+var_40]
sub rax, fs:28h
jnz short loc_12FE
lea rdi, aCannotCreateSt; "cannot create std::vector larger than m"...
call __ZSt20__throw_length_errorPKc; std::__throw_length_error(char const*)
endbr64
mov rbx, rax
lea rdi, [rsp+68h+var_58]
call _ZNSt12_Vector_baseIiSaIiEED2Ev; std::_Vector_base<int>::~_Vector_base()
mov rax, [rsp+68h+var_40]
sub rax, fs:28h
jz loc_1383
call ___stack_chk_fail
loc_12FE:
call ___stack_chk_fail
loc_1303:
mov r13, rax
mov [rsp+68h+var_58], rax
lea r14, [rax+rbx]
mov [rsp+68h+var_48], r14
cmp rbx, 4
jle short loc_1379
mov rdx, rbx; n
mov rsi, r12; src
mov rdi, rax; dest
call _memmove
loc_1328:
mov [rsp+68h+var_50], r14
mov r12, [r15+8]
mov rax, rbx
add rax, [r15]
mov [rsp+68h+src], rax
mov qword ptr [rbp+0], 0
mov qword ptr [rbp+8], 0
mov qword ptr [rbp+10h], 0
sub r12, rax
mov rax, 7FFFFFFFFFFFFFFCh
cmp rax, r12
jb short loc_138B
test r12, r12
jz loc_1472
mov rdi, r12; unsigned __int64
call __Znwm; operator new(ulong)
jmp short loc_13DE
loc_1379:
mov eax, [r12]
mov [r13+0], eax
jmp short loc_1328
loc_1383:
mov rdi, rbx; struct _Unwind_Exception *
call __Unwind_Resume
loc_138B:
mov rax, [rsp+68h+var_40]
sub rax, fs:28h
jnz short loc_13D9
lea rdi, aCannotCreateSt; "cannot create std::vector larger than m"...
call __ZSt20__throw_length_errorPKc; std::__throw_length_error(char const*)
endbr64
mov rbx, rax
mov rdi, rbp
call _ZNSt12_Vector_baseIiSaIiEED2Ev; std::_Vector_base<int>::~_Vector_base()
loc_13B6:
lea rdi, [rsp+68h+var_58]
call _ZNSt6vectorIiSaIiEED2Ev; std::vector<int>::~vector()
mov rax, [rsp+68h+var_40]
sub rax, fs:28h
jz loc_146A
call ___stack_chk_fail
loc_13D9:
call ___stack_chk_fail
loc_13DE:
mov rdi, rax; dest
mov [rbp+0], rax
lea r15, [rax+r12]
mov [rbp+10h], r15
cmp r12, 4
jle short loc_1417
mov rdx, r12; n
mov rsi, [rsp+68h+src]; src
call _memmove
loc_1400:
mov [rbp+8], r15
mov rcx, r14
mov rdx, r13
mov rsi, r15
mov rdi, rbp
call _ZNSt6vectorIiSaIiEE15_M_range_insertIN9__gnu_cxx17__normal_iteratorIPiS1_EEEEvS6_T_S7_St20forward_iterator_tag; std::vector<int>::_M_range_insert<__gnu_cxx::__normal_iterator<int *,std::vector<int>>>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__normal_iterator<int *,std::vector<int>>,std::forward_iterator_tag)
jmp short loc_1424
loc_1417:
jnz short loc_1400
mov rax, [rsp+68h+src]
mov eax, [rax]
mov [rdi], eax
jmp short loc_1400
loc_1424:
test r13, r13
jz short loc_1434
mov rsi, rbx; unsigned __int64
mov rdi, r13; void *
call __ZdlPvm; operator delete(void *,ulong)
loc_1434:
mov rax, [rsp+68h+var_40]
sub rax, fs:28h
jnz short loc_14B0
mov rax, rbp
add rsp, 38h
pop rbx
pop rbp
pop r12
pop r13
pop r14
pop r15
retn
endbr64
mov rbx, rax
mov rdi, rbp
call _ZNSt6vectorIiSaIiEED2Ev; std::vector<int>::~vector()
jmp loc_13B6
loc_146A:
mov rdi, rbx; struct _Unwind_Exception *
call __Unwind_Resume
loc_1472:
mov qword ptr [rbp+0], 0
mov qword ptr [rbp+10h], 0
mov r15d, 0
jmp loc_1400
loc_148D:
mov [rsp+68h+var_58], 0
mov [rsp+68h+var_48], 0
mov r14d, 0
mov r13d, 0
jmp loc_1328
loc_14B0:
call ___stack_chk_fail | _QWORD * func0(_QWORD *a1, long long a2, long long a3, int a4)
{
_DWORD *v4; // r12
signed long long v5; // rbx
_DWORD *v6; // rax
void *v7; // r13
_DWORD *v8; // r14
long long v9; // r12
signed long long v10; // r12
_DWORD *v11; // rax
char *v12; // r15
_DWORD *src; // [rsp+8h] [rbp-60h]
v4 = *(_DWORD **)a2;
v5 = 4LL * a4;
if ( (unsigned long long)v5 > 0x7FFFFFFFFFFFFFFCLL )
std::__throw_length_error("cannot create std::vector larger than max_size()");
if ( v5 )
{
v6 = (_DWORD *)operator new(4LL * a4);
v7 = v6;
v8 = &v6[(unsigned long long)v5 / 4];
if ( v5 <= 4 )
*v6 = *v4;
else
memmove(v6, v4, v5);
}
else
{
v8 = 0LL;
v7 = 0LL;
}
v9 = *(_QWORD *)(a2 + 8);
src = (_DWORD *)(*(_QWORD *)a2 + v5);
*a1 = 0LL;
a1[1] = 0LL;
a1[2] = 0LL;
v10 = v9 - (_QWORD)src;
if ( (unsigned long long)v10 > 0x7FFFFFFFFFFFFFFCLL )
std::__throw_length_error("cannot create std::vector larger than max_size()");
if ( v10 )
{
v11 = (_DWORD *)operator new(v10);
*a1 = v11;
v12 = (char *)v11 + v10;
a1[2] = (char *)v11 + v10;
if ( v10 <= 4 )
{
if ( v10 == 4 )
*v11 = *src;
}
else
{
memmove(v11, src, v10);
}
}
else
{
*a1 = 0LL;
a1[2] = 0LL;
v12 = 0LL;
}
a1[1] = v12;
std::vector<int>::_M_range_insert<__gnu_cxx::__normal_iterator<int *,std::vector<int>>>(a1, v12, v7, v8);
if ( v7 )
operator delete(v7, v5);
return a1;
} | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x38
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x28],RAX
XOR EAX,EAX
MOV R12,qword ptr [RSI]
MOVSXD RBX,ECX
SHL RBX,0x2
MOV qword ptr [RSP + 0x10],0x0
MOV qword ptr [RSP + 0x18],0x0
MOV qword ptr [RSP + 0x20],0x0
MOV RAX,0x7ffffffffffffffc
CMP RAX,RBX
JC 0x001012b8
MOV RBP,RDI
MOV R15,RSI
TEST RBX,RBX
JZ 0x0010148d
MOV RDI,RBX
LAB_001012b1:
CALL 0x00101110
JMP 0x00101303
LAB_001012b8:
MOV RAX,qword ptr [RSP + 0x28]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x001012fe
LEA RDI,[0x102008]
CALL 0x001010e0
LAB_001012d4:
ENDBR64
MOV RBX,RAX
LEA RDI,[RSP + 0x10]
CALL 0x0010193c
MOV RAX,qword ptr [RSP + 0x28]
SUB RAX,qword ptr FS:[0x28]
JZ 0x00101383
CALL 0x00101130
LAB_001012fe:
CALL 0x00101130
LAB_00101303:
MOV R13,RAX
MOV qword ptr [RSP + 0x10],RAX
LEA R14,[RAX + RBX*0x1]
MOV qword ptr [RSP + 0x20],R14
CMP RBX,0x4
JLE 0x00101379
MOV RDX,RBX
MOV RSI,R12
MOV RDI,RAX
CALL 0x00101140
LAB_00101328:
MOV qword ptr [RSP + 0x18],R14
MOV R12,qword ptr [R15 + 0x8]
MOV RAX,RBX
ADD RAX,qword ptr [R15]
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RBP],0x0
MOV qword ptr [RBP + 0x8],0x0
MOV qword ptr [RBP + 0x10],0x0
SUB R12,RAX
MOV RAX,0x7ffffffffffffffc
CMP RAX,R12
JC 0x0010138b
TEST R12,R12
JZ 0x00101472
MOV RDI,R12
LAB_00101372:
CALL 0x00101110
JMP 0x001013de
LAB_00101379:
MOV EAX,dword ptr [R12]
MOV dword ptr [R13],EAX
JMP 0x00101328
LAB_00101383:
MOV RDI,RBX
LAB_00101386:
CALL 0x00101150
LAB_0010138b:
MOV RAX,qword ptr [RSP + 0x28]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x001013d9
LEA RDI,[0x102008]
LAB_001013a2:
CALL 0x001010e0
LAB_001013a7:
ENDBR64
MOV RBX,RAX
MOV RDI,RBP
CALL 0x0010193c
LAB_001013b6:
LEA RDI,[RSP + 0x10]
CALL 0x00101916
MOV RAX,qword ptr [RSP + 0x28]
SUB RAX,qword ptr FS:[0x28]
JZ 0x0010146a
CALL 0x00101130
LAB_001013d9:
CALL 0x00101130
LAB_001013de:
MOV RDI,RAX
MOV qword ptr [RBP],RAX
LEA R15,[RAX + R12*0x1]
MOV qword ptr [RBP + 0x10],R15
CMP R12,0x4
JLE 0x00101417
MOV RDX,R12
MOV RSI,qword ptr [RSP + 0x8]
CALL 0x00101140
LAB_00101400:
MOV qword ptr [RBP + 0x8],R15
MOV RCX,R14
MOV RDX,R13
MOV RSI,R15
MOV RDI,RBP
LAB_00101410:
CALL 0x00101a6e
JMP 0x00101424
LAB_00101417:
JNZ 0x00101400
MOV RAX,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RDI],EAX
JMP 0x00101400
LAB_00101424:
TEST R13,R13
JZ 0x00101434
MOV RSI,RBX
MOV RDI,R13
CALL 0x00101120
LAB_00101434:
MOV RAX,qword ptr [RSP + 0x28]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x001014b0
MOV RAX,RBP
ADD RSP,0x38
POP RBX
POP RBP
POP R12
POP R13
POP R14
POP R15
RET
LAB_0010146a:
MOV RDI,RBX
LAB_0010146d:
CALL 0x00101150
LAB_00101472:
MOV qword ptr [RBP],0x0
MOV qword ptr [RBP + 0x10],0x0
MOV R15D,0x0
JMP 0x00101400
LAB_0010148d:
MOV qword ptr [RSP + 0x10],0x0
MOV qword ptr [RSP + 0x20],0x0
MOV R14D,0x0
MOV R13D,0x0
JMP 0x00101328
LAB_001014b0:
CALL 0x00101130 | /* func0(std::vector<int, std::allocator<int> > const&, int, int) */
vector * func0(vector *param_1,int param_2,int param_3)
{
int4 *__dest;
int4 *puVar1;
int4 *__dest_00;
int8 uVar2;
int in_ECX;
int4 in_register_00000014;
ulong __n;
int4 in_register_00000034;
long *plVar3;
ulong __n_00;
int4 *puVar4;
long lVar5;
long in_FS_OFFSET;
int4 *local_58;
int4 *local_50;
int4 *local_48;
long local_40;
plVar3 = (long *)CONCAT44(in_register_00000034,param_2);
local_40 = *(long *)(in_FS_OFFSET + 0x28);
puVar1 = (int4 *)*plVar3;
__n = (long)in_ECX * 4;
local_58 = (int4 *)0x0;
local_50 = (int4 *)0x0;
local_48 = (int4 *)0x0;
if (0x7ffffffffffffffc < __n) {
if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail(param_1,plVar3,CONCAT44(in_register_00000014,param_3));
}
uVar2 = std::__throw_length_error("cannot create std::vector larger than max_size()");
/* catch() { ... } // from try @ 001012b1 with catch @ 001012d4 */
std::_Vector_base<int,std::allocator<int>>::~_Vector_base
((_Vector_base<int,std::allocator<int>> *)&local_58);
if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
/* WARNING: Subroutine does not return */
_Unwind_Resume(uVar2);
}
if (__n == 0) {
local_58 = (int4 *)0x0;
local_48 = (int4 *)0x0;
puVar4 = (int4 *)0x0;
__dest = (int4 *)0x0;
}
else {
/* try { // try from 001012b1 to 001012d3 has its CatchHandler @ 001012d4 */
__dest = (int4 *)operator_new(__n);
puVar4 = __dest + in_ECX;
local_58 = __dest;
local_48 = puVar4;
if ((long)__n < 5) {
*__dest = *puVar1;
}
else {
memmove(__dest,puVar1,__n);
}
}
lVar5 = plVar3[1];
puVar1 = (int4 *)(__n + *plVar3);
*(int8 *)param_1 = 0;
*(int8 *)(param_1 + 8) = 0;
*(int8 *)(param_1 + 0x10) = 0;
__n_00 = lVar5 - (long)puVar1;
local_50 = puVar4;
if (__n_00 < 0x7ffffffffffffffd) {
if (__n_00 == 0) {
*(int8 *)param_1 = 0;
*(int8 *)(param_1 + 0x10) = 0;
lVar5 = 0;
}
else {
/* try { // try from 00101372 to 00101376 has its CatchHandler @ 001013a7 */
__dest_00 = (int4 *)operator_new(__n_00);
*(int4 **)param_1 = __dest_00;
lVar5 = (long)__dest_00 + __n_00;
*(long *)(param_1 + 0x10) = lVar5;
if ((long)__n_00 < 5) {
if (__n_00 == 4) {
*__dest_00 = *puVar1;
}
}
else {
memmove(__dest_00,puVar1,__n_00);
}
}
*(long *)(param_1 + 8) = lVar5;
/* try { // try from 00101410 to 00101414 has its CatchHandler @ 00101456 */
std::vector<int,std::allocator<int>>::
_M_range_insert<__normal_iterator<int*,std::vector<int,std::allocator<int>>>>
((__normal_iterator)param_1,(__normal_iterator)lVar5,(__normal_iterator)__dest,
(forward_iterator_tag)puVar4);
if (__dest != (int4 *)0x0) {
operator_delete(__dest,__n);
}
if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {
return param_1;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
/* try { // try from 001013a2 to 001013a6 has its CatchHandler @ 001013a7 */
uVar2 = std::__throw_length_error("cannot create std::vector larger than max_size()");
/* catch() { ... } // from try @ 00101372 with catch @ 001013a7
catch() { ... } // from try @ 001013a2 with catch @ 001013a7 */
std::_Vector_base<int,std::allocator<int>>::~_Vector_base
((_Vector_base<int,std::allocator<int>> *)param_1);
std::vector<int,std::allocator<int>>::~vector((vector<int,std::allocator<int>> *)&local_58);
if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
/* WARNING: Subroutine does not return */
_Unwind_Resume(uVar2);
} |
2,342 | func0 |
#include <vector>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& a, int n, int k) {
std::vector<int> b(a.begin(), a.begin() + k);
std::vector<int> result(a.begin() + k, a.end());
result.insert(result.end(), b.begin(), b.end());
return result;
}
| int main() {
assert((func0({12, 10, 5, 6, 52, 36}, 6, 2) == std::vector<int>{5, 6, 52, 36, 12, 10}));
assert((func0({1, 2, 3, 4}, 4, 1) == std::vector<int>{2, 3, 4, 1}));
assert((func0({0, 1, 2, 3, 4, 5, 6, 7}, 8, 3) == std::vector<int>{3, 4, 5, 6, 7, 0, 1, 2}));
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> > const&, int, int):
endbr64
movabs $0x1fffffffffffffff,%rax
push %r15
movslq %ecx,%rcx
push %r14
push %r13
push %r12
push %rbp
push %rbx
mov %rsi,%rbx
sub $0x18,%rsp
mov (%rsi),%rsi
cmp %rax,%rcx
ja 17a0 <_Z5func0RKSt6vectorIiSaIiEEii+0x120>
lea 0x0(,%rcx,4),%r13
mov %rdi,%r12
xor %ebp,%ebp
lea (%rsi,%r13,1),%r14
test %rcx,%rcx
je 16df <_Z5func0RKSt6vectorIiSaIiEEii+0x5f>
mov %r13,%rdi
mov %rsi,0x8(%rsp)
callq 1120 <_Znwm@plt>
mov (%rbx),%r14
mov 0x8(%rsp),%rsi
mov %rax,%rbp
add %r13,%r14
lea 0x0(%rbp,%r13,1),%r15
test %r13,%r13
je 16f4 <_Z5func0RKSt6vectorIiSaIiEEii+0x74>
mov %r13,%rdx
mov %rbp,%rdi
callq 1100 <memcpy@plt>
mov 0x8(%rbx),%rbx
movq $0x0,(%r12)
movq $0x0,0x8(%r12)
movq $0x0,0x10(%r12)
mov %rbx,%r13
sub %r14,%r13
mov %r13,%rax
sar $0x2,%rax
test %r13,%r13
js 1794 <_Z5func0RKSt6vectorIiSaIiEEii+0x114>
test %rax,%rax
je 1790 <_Z5func0RKSt6vectorIiSaIiEEii+0x110>
mov %r13,%rdi
callq 1120 <_Znwm@plt>
mov %rax,%rdi
lea (%rdi,%r13,1),%r8
mov %rdi,(%r12)
mov %r8,0x10(%r12)
cmp %r14,%rbx
je 175b <_Z5func0RKSt6vectorIiSaIiEEii+0xdb>
mov %r13,%rdx
mov %r14,%rsi
mov %r8,0x8(%rsp)
callq 1100 <memcpy@plt>
mov 0x8(%rsp),%r8
mov %r8,0x8(%r12)
mov %r15,%rcx
mov %rbp,%rdx
mov %r8,%rsi
mov %r12,%rdi
callq 18e0 <_ZNSt6vectorIiSaIiEE15_M_range_insertIN9__gnu_cxx17__normal_iteratorIPiS1_EEEEvS6_T_S7_St20forward_iterator_tag>
test %rbp,%rbp
je 177e <_Z5func0RKSt6vectorIiSaIiEEii+0xfe>
mov %rbp,%rdi
callq 1110 <_ZdlPv@plt>
add $0x18,%rsp
mov %r12,%rax
pop %rbx
pop %rbp
pop %r12
pop %r13
pop %r14
pop %r15
retq
xor %edi,%edi
jmp 1734 <_Z5func0RKSt6vectorIiSaIiEEii+0xb4>
lea 0x86d(%rip),%rdi
callq 10e0 <_ZSt20__throw_length_errorPKc@plt>
lea 0x861(%rip),%rdi
callq 10e0 <_ZSt20__throw_length_errorPKc@plt>
endbr64
mov %rax,%rbx
jmpq 1160 <_Z5func0RKSt6vectorIiSaIiEEii.cold>
endbr64
mov %rax,%rbx
jmpq 1160 <_Z5func0RKSt6vectorIiSaIiEEii.cold>
nopw %cs:0x0(%rax,%rax,1)
xchg %ax,%ax
| _Z5func0RKSt6vectorIiSaIiEEii:
endbr64
push r15
movsxd rcx, ecx
pxor xmm0, xmm0
push r14
push r13
lea r13, ds:0[rcx*4]
push r12
push rbp
push rbx
sub rsp, 48h
mov r14, [rsi]
mov rax, fs:28h
mov [rsp+78h+var_40], rax
xor eax, eax
mov [rsp+78h+var_70], rcx
mov rax, 7FFFFFFFFFFFFFFCh
mov [rsp+78h+var_48], 0
movaps [rsp+78h+var_58], xmm0
cmp rax, r13
jb loc_19F0
cmp [rsp+78h+var_70], 0
mov rbx, rdi
mov rbp, rsi
jz loc_1930
mov rdi, r13; unsigned __int64
call __Znwm; operator new(ulong)
lea r15, [rax+r13]
mov qword ptr [rsp+78h+var_58], rax
mov r12, rax
mov [rsp+78h+var_48], r15
cmp r13, 4
jz loc_1960
mov rsi, r14; src
mov rdx, r13; n
mov rdi, rax; dest
call _memmove
mov r14, [rbp+0]
loc_1701:
mov rbp, [rbp+8]
lea rax, [r14+r13]
pxor xmm0, xmm0
mov qword ptr [rsp+78h+var_58+8], r15
mov [rsp+78h+src], rax
sub rbp, rax
mov qword ptr [rbx+10h], 0
mov rax, rbp
movups xmmword ptr [rbx], xmm0
sar rax, 2
mov [rsp+78h+var_78], rax
mov rax, 7FFFFFFFFFFFFFFCh
cmp rax, rbp
jb loc_19D4
cmp [rsp+78h+var_78], 0
jz loc_17D8
mov rdi, rbp; unsigned __int64
call __Znwm; operator new(ulong)
lea rcx, [rax+rbp]
mov [rbx], rax
mov r14, rax
mov [rbx+10h], rcx
cmp rbp, 4
jz loc_1950
mov rsi, [rsp+78h+src]; src
mov rdx, rbp; n
mov rdi, rax; dest
mov [rsp+78h+var_60], rcx
call _memmove
mov rcx, [rsp+78h+var_60]
mov [rbx+8], rcx
cmp r15, r12
jz loc_1882
mov rax, 1FFFFFFFFFFFFFFFh
mov rdx, [rsp+78h+var_78]
sub rax, rdx
mov rdx, [rsp+78h+var_70]
cmp rax, rdx
jnb loc_1A0C
mov rax, [rsp+78h+var_40]
sub rax, fs:28h
jnz loc_19CF
lea rdi, aVectorMRangeIn; "vector::_M_range_insert"
call __ZSt20__throw_length_errorPKc; std::__throw_length_error(char const*)
loc_17D8:
mov qword ptr [rbx], 0
xor ecx, ecx
xor r14d, r14d
mov qword ptr [rbx+10h], 0
loc_17EC:
mov [rbx+8], rcx
cmp r15, r12
jz loc_1882
cmp rbp, r13
jnb loc_18B8
loc_1802:
mov rax, [rsp+78h+var_70]
mov rdx, [rsp+78h+var_78]
add rax, rdx
loc_180E:
shl rax, 2
mov rdi, rax; unsigned __int64
mov [rsp+78h+var_78], rax
call __Znwm; operator new(ulong)
mov r15, rax
mov rax, [rsp+78h+var_78]
add rax, r15
mov [rsp+78h+var_70], rax
cmp rbp, 4
jle loc_18D1
mov rdx, rbp; n
mov rsi, r14; src
mov rdi, r15; dest
add rbp, r15
call _memcpy
cmp r13, 4
jle loc_19C0
loc_1852:
mov rdi, rbp; dest
mov rdx, r13; n
mov rsi, r12; src
add rbp, r13
call _memcpy
loc_1863:
mov rsi, [rbx+10h]
mov rdi, r14; void *
sub rsi, r14; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
mov rax, [rsp+78h+var_70]
mov [rbx], r15
mov [rbx+8], rbp
mov [rbx+10h], rax
loc_1882:
test r12, r12
jnz loc_1918
loc_188B:
mov rax, [rsp+78h+var_40]
sub rax, fs:28h
jnz loc_19CF
add rsp, 48h
mov rax, rbx
pop rbx
pop rbp
pop r12
pop r13
pop r14
pop r15
retn
loc_18B8:
mov [rsp+78h+var_70], 0
mov rax, [rsp+78h+var_78]
xor r15d, r15d
add rax, rax
jnz loc_19A0
loc_18D1:
cmp rbp, 4
jz loc_1970
add rbp, r15
cmp r13, 4
jle loc_1984
mov rdi, rbp; dest
mov rdx, r13; n
mov rsi, r12; src
add rbp, r13
call _memcpy
test r14, r14
jnz loc_1863
loc_1902:
mov rax, [rsp+78h+var_70]
mov [rbx], r15
mov [rbx+8], rbp
mov [rbx+10h], rax
nop word ptr [rax+rax+00h]
loc_1918:
mov rsi, r13; unsigned __int64
mov rdi, r12; void *
call __ZdlPvm; operator delete(void *,ulong)
jmp loc_188B
loc_1930:
mov qword ptr [rsp+78h+var_58], 0
xor r15d, r15d
xor r12d, r12d
mov [rsp+78h+var_48], 0
jmp loc_1701
loc_1950:
mov rax, [rsp+78h+src]
mov eax, [rax]
mov [r14], eax
jmp loc_17EC
loc_1960:
mov eax, [r14]
mov r14, [rbp+0]
mov [r12], eax
jmp loc_1701
loc_1970:
mov eax, [r14]
lea rbp, [r15+4]
mov [r15], eax
cmp r13, 4
jg loc_1852
loc_1984:
mov eax, [r12]
mov [rbp+0], eax
add rbp, r13
test r14, r14
jnz loc_1863
jmp loc_1902
loc_19A0:
mov eax, 2
loc_19A5:
mov rdx, 1FFFFFFFFFFFFFFFh
cmp rax, rdx
cmova rax, rdx
jmp loc_180E
loc_19C0:
mov eax, [r12]
mov [rbp+0], eax
add rbp, r13
jmp loc_1863
loc_19CF:
call ___stack_chk_fail
loc_19D4:
mov rax, [rsp+78h+var_40]
sub rax, fs:28h
jnz short loc_19CF
lea rdi, aCannotCreateSt; "cannot create std::vector larger than m"...
call __ZSt20__throw_length_errorPKc; std::__throw_length_error(char const*)
loc_19F0:
mov rax, [rsp+78h+var_40]
sub rax, fs:28h
jnz short loc_19CF
lea rdi, aCannotCreateSt; "cannot create std::vector larger than m"...
call __ZSt20__throw_length_errorPKc; std::__throw_length_error(char const*)
loc_1A0C:
cmp rbp, r13
jb loc_1802
mov rax, [rsp+78h+var_78]
add rax, rax
jmp short loc_19A5
endbr64
mov rbp, rax
jmp _Z5func0RKSt6vectorIiSaIiEEii_cold; func0(std::vector<int> const&,int,int) [clone]
endbr64
mov rbx, rax
jmp loc_118A
endbr64
mov rbp, rax
jmp loc_11AC | long long func0(long long a1, long long a2, long long a3, int a4)
{
signed long long v4; // r13
int *v5; // r14
_DWORD *v7; // rax
_DWORD *v8; // r15
_DWORD *v9; // r12
signed long long v10; // rbp
int *v11; // rax
char *v12; // rcx
int *v13; // r14
unsigned long long v14; // rax
int *v15; // r15
size_t v16; // rdx
_DWORD *v17; // rbp
void *v18; // rdi
_DWORD *v19; // rbp
void *v21; // rdi
int v22; // eax
long long v23; // [rsp+0h] [rbp-78h]
long long v24; // [rsp+0h] [rbp-78h]
unsigned long long v25; // [rsp+8h] [rbp-70h]
int *v26; // [rsp+8h] [rbp-70h]
int *src; // [rsp+10h] [rbp-68h]
char *v28; // [rsp+18h] [rbp-60h]
v4 = 4LL * a4;
v5 = *(int **)a2;
v25 = a4;
if ( (unsigned long long)v4 > 0x7FFFFFFFFFFFFFFCLL )
std::__throw_length_error("cannot create std::vector larger than max_size()");
if ( a4 )
{
v7 = (_DWORD *)operator new(4LL * a4);
v8 = &v7[(unsigned long long)v4 / 4];
v9 = v7;
if ( v4 == 4 )
{
v22 = *v5;
v5 = *(int **)a2;
*v9 = v22;
}
else
{
memmove(v7, v5, v4);
v5 = *(int **)a2;
}
}
else
{
v8 = 0LL;
v9 = 0LL;
}
src = &v5[(unsigned long long)v4 / 4];
v10 = *(_QWORD *)(a2 + 8) - (_QWORD)&v5[(unsigned long long)v4 / 4];
*(_QWORD *)(a1 + 16) = 0LL;
*(_OWORD *)a1 = 0LL;
v23 = v10 >> 2;
if ( (unsigned long long)v10 > 0x7FFFFFFFFFFFFFFCLL )
std::__throw_length_error("cannot create std::vector larger than max_size()");
if ( !v23 )
{
*(_QWORD *)a1 = 0LL;
v12 = 0LL;
v13 = 0LL;
*(_QWORD *)(a1 + 16) = 0LL;
goto LABEL_12;
}
v11 = (int *)operator new(v10);
v12 = (char *)v11 + v10;
*(_QWORD *)a1 = v11;
v13 = v11;
*(_QWORD *)(a1 + 16) = (char *)v11 + v10;
if ( v10 == 4 )
{
*v11 = *src;
LABEL_12:
*(_QWORD *)(a1 + 8) = v12;
if ( v8 == v9 )
goto LABEL_19;
if ( v10 >= (unsigned long long)v4 )
{
v26 = 0LL;
v15 = 0LL;
if ( !(2 * v23) )
goto LABEL_22;
v14 = 2LL;
goto LABEL_34;
}
LABEL_14:
v14 = v23 + v25;
goto LABEL_15;
}
v28 = (char *)v11 + v10;
memmove(v11, src, v10);
*(_QWORD *)(a1 + 8) = v28;
if ( v8 == v9 )
goto LABEL_19;
if ( 0x1FFFFFFFFFFFFFFFLL - v23 < v25 )
std::__throw_length_error("vector::_M_range_insert");
if ( v10 < (unsigned long long)v4 )
goto LABEL_14;
v14 = 2 * v23;
LABEL_34:
if ( v14 > 0x1FFFFFFFFFFFFFFFLL )
v14 = 0x1FFFFFFFFFFFFFFFLL;
LABEL_15:
v24 = v14;
v15 = (int *)operator new(4 * v14);
v26 = &v15[v24];
if ( v10 > 4 )
{
v16 = v10;
v17 = (int *)((char *)v15 + v10);
memcpy(v15, v13, v16);
if ( v4 <= 4 )
{
*v17 = *v9;
v19 = &v17[(unsigned long long)v4 / 4];
goto LABEL_18;
}
goto LABEL_17;
}
LABEL_22:
if ( v10 != 4 )
{
v17 = (int *)((char *)v15 + v10);
if ( v4 > 4 )
{
v21 = v17;
v19 = &v17[(unsigned long long)v4 / 4];
memcpy(v21, v9, v4);
if ( v13 )
goto LABEL_18;
LABEL_25:
*(_QWORD *)a1 = v15;
*(_QWORD *)(a1 + 8) = v19;
*(_QWORD *)(a1 + 16) = v26;
goto LABEL_26;
}
LABEL_31:
*v17 = *v9;
v19 = &v17[(unsigned long long)v4 / 4];
if ( v13 )
goto LABEL_18;
goto LABEL_25;
}
v17 = v15 + 1;
*v15 = *v13;
if ( v4 <= 4 )
goto LABEL_31;
LABEL_17:
v18 = v17;
v19 = &v17[(unsigned long long)v4 / 4];
memcpy(v18, v9, v4);
LABEL_18:
operator delete(v13, *(_QWORD *)(a1 + 16) - (_QWORD)v13);
*(_QWORD *)a1 = v15;
*(_QWORD *)(a1 + 8) = v19;
*(_QWORD *)(a1 + 16) = v26;
LABEL_19:
if ( v9 )
LABEL_26:
operator delete(v9, v4);
return a1;
} | func0:
ENDBR64
PUSH R15
MOVSXD RCX,ECX
PXOR XMM0,XMM0
PUSH R14
PUSH R13
LEA R13,[RCX*0x4]
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x48
MOV R14,qword ptr [RSI]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,0x7ffffffffffffffc
MOV qword ptr [RSP + 0x30],0x0
MOVAPS xmmword ptr [RSP + 0x20],XMM0
CMP RAX,R13
JC 0x001019f0
CMP qword ptr [RSP + 0x8],0x0
MOV RBX,RDI
MOV RBP,RSI
JZ 0x00101930
MOV RDI,R13
LAB_001016cf:
CALL 0x00101110
LEA R15,[RAX + R13*0x1]
MOV qword ptr [RSP + 0x20],RAX
MOV R12,RAX
MOV qword ptr [RSP + 0x30],R15
CMP R13,0x4
JZ 0x00101960
MOV RSI,R14
MOV RDX,R13
MOV RDI,RAX
CALL 0x00101140
MOV R14,qword ptr [RBP]
LAB_00101701:
MOV RBP,qword ptr [RBP + 0x8]
LEA RAX,[R14 + R13*0x1]
PXOR XMM0,XMM0
MOV qword ptr [RSP + 0x28],R15
MOV qword ptr [RSP + 0x10],RAX
SUB RBP,RAX
MOV qword ptr [RBX + 0x10],0x0
MOV RAX,RBP
MOVUPS xmmword ptr [RBX],XMM0
SAR RAX,0x2
MOV qword ptr [RSP],RAX
MOV RAX,0x7ffffffffffffffc
CMP RAX,RBP
JC 0x001019d4
CMP qword ptr [RSP],0x0
JZ 0x001017d8
MOV RDI,RBP
LAB_00101751:
CALL 0x00101110
LEA RCX,[RAX + RBP*0x1]
MOV qword ptr [RBX],RAX
MOV R14,RAX
MOV qword ptr [RBX + 0x10],RCX
CMP RBP,0x4
JZ 0x00101950
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,RBP
MOV RDI,RAX
MOV qword ptr [RSP + 0x18],RCX
CALL 0x00101140
MOV RCX,qword ptr [RSP + 0x18]
MOV qword ptr [RBX + 0x8],RCX
CMP R15,R12
JZ 0x00101882
MOV RAX,0x1fffffffffffffff
MOV RDX,qword ptr [RSP]
SUB RAX,RDX
MOV RDX,qword ptr [RSP + 0x8]
CMP RAX,RDX
JNC 0x00101a0c
MOV RAX,qword ptr [RSP + 0x38]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x001019cf
LEA RDI,[0x102144]
LAB_001017cf:
CALL 0x001010e0
NOP dword ptr [RAX]
LAB_001017d8:
MOV qword ptr [RBX],0x0
XOR ECX,ECX
XOR R14D,R14D
MOV qword ptr [RBX + 0x10],0x0
LAB_001017ec:
MOV qword ptr [RBX + 0x8],RCX
CMP R15,R12
JZ 0x00101882
CMP RBP,R13
JNC 0x001018b8
LAB_00101802:
MOV RAX,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP]
ADD RAX,RDX
LAB_0010180e:
SHL RAX,0x2
MOV RDI,RAX
MOV qword ptr [RSP],RAX
CALL 0x00101110
MOV R15,RAX
MOV RAX,qword ptr [RSP]
ADD RAX,R15
MOV qword ptr [RSP + 0x8],RAX
CMP RBP,0x4
JLE 0x001018d1
MOV RDX,RBP
MOV RSI,R14
MOV RDI,R15
ADD RBP,R15
CALL 0x00101100
CMP R13,0x4
JLE 0x001019c0
LAB_00101852:
MOV RDI,RBP
MOV RDX,R13
MOV RSI,R12
ADD RBP,R13
CALL 0x00101100
LAB_00101863:
MOV RSI,qword ptr [RBX + 0x10]
MOV RDI,R14
SUB RSI,R14
CALL 0x00101120
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RBX],R15
MOV qword ptr [RBX + 0x8],RBP
MOV qword ptr [RBX + 0x10],RAX
LAB_00101882:
TEST R12,R12
JNZ 0x00101918
LAB_0010188b:
MOV RAX,qword ptr [RSP + 0x38]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x001019cf
ADD RSP,0x48
MOV RAX,RBX
POP RBX
POP RBP
POP R12
POP R13
POP R14
POP R15
RET
LAB_001018b8:
MOV qword ptr [RSP + 0x8],0x0
MOV RAX,qword ptr [RSP]
XOR R15D,R15D
ADD RAX,RAX
JNZ 0x001019a0
LAB_001018d1:
CMP RBP,0x4
JZ 0x00101970
ADD RBP,R15
CMP R13,0x4
JLE 0x00101984
MOV RDI,RBP
MOV RDX,R13
MOV RSI,R12
ADD RBP,R13
CALL 0x00101100
TEST R14,R14
JNZ 0x00101863
LAB_00101902:
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RBX],R15
MOV qword ptr [RBX + 0x8],RBP
MOV qword ptr [RBX + 0x10],RAX
NOP word ptr [RAX + RAX*0x1]
LAB_00101918:
MOV RSI,R13
MOV RDI,R12
CALL 0x00101120
JMP 0x0010188b
LAB_00101930:
MOV qword ptr [RSP + 0x20],0x0
XOR R15D,R15D
XOR R12D,R12D
MOV qword ptr [RSP + 0x30],0x0
JMP 0x00101701
LAB_00101950:
MOV RAX,qword ptr [RSP + 0x10]
MOV EAX,dword ptr [RAX]
MOV dword ptr [R14],EAX
JMP 0x001017ec
LAB_00101960:
MOV EAX,dword ptr [R14]
MOV R14,qword ptr [RBP]
MOV dword ptr [R12],EAX
JMP 0x00101701
LAB_00101970:
MOV EAX,dword ptr [R14]
LEA RBP,[R15 + 0x4]
MOV dword ptr [R15],EAX
CMP R13,0x4
JG 0x00101852
LAB_00101984:
MOV EAX,dword ptr [R12]
MOV dword ptr [RBP],EAX
ADD RBP,R13
TEST R14,R14
JNZ 0x00101863
JMP 0x00101902
LAB_001019a0:
MOV EAX,0x2
LAB_001019a5:
MOV RDX,0x1fffffffffffffff
CMP RAX,RDX
CMOVA RAX,RDX
JMP 0x0010180e
LAB_001019c0:
MOV EAX,dword ptr [R12]
MOV dword ptr [RBP],EAX
ADD RBP,R13
JMP 0x00101863
LAB_001019cf:
CALL 0x00101130
LAB_001019d4:
MOV RAX,qword ptr [RSP + 0x38]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x001019cf
LEA RDI,[0x102008]
LAB_001019eb:
CALL 0x001010e0
LAB_001019f0:
MOV RAX,qword ptr [RSP + 0x38]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x001019cf
LEA RDI,[0x102008]
LAB_00101a07:
CALL 0x001010e0
LAB_00101a0c:
CMP RBP,R13
JC 0x00101802
MOV RAX,qword ptr [RSP]
ADD RAX,RAX
JMP 0x001019a5 | /* func0(std::vector<int, std::allocator<int> > const&, int, int) */
vector * func0(vector *param_1,int param_2,int param_3)
{
ulong __n;
int4 uVar1;
long lVar2;
int4 *__src;
ulong uVar3;
int4 *puVar4;
int in_ECX;
ulong uVar5;
long lVar6;
vector *unaff_RBX;
ulong unaff_RBP;
int4 *puVar7;
int4 *puVar8;
int4 in_register_00000034;
int8 *puVar9;
int4 *unaff_R12;
long in_FS_OFFSET;
ulong local_78;
int4 *local_70;
puVar9 = (int8 *)CONCAT44(in_register_00000034,param_2);
uVar5 = (ulong)in_ECX;
__n = uVar5 * 4;
__src = (int4 *)*puVar9;
lVar2 = *(long *)(in_FS_OFFSET + 0x28);
if (__n < 0x7ffffffffffffffd) {
if (uVar5 == 0) {
puVar4 = (int4 *)0x0;
unaff_R12 = (int4 *)0x0;
}
else {
/* try { // try from 001016cf to 001016d3 has its CatchHandler @ 00101a2a */
unaff_R12 = (int4 *)operator_new(__n);
puVar4 = unaff_R12 + uVar5;
if (__n == 4) {
uVar1 = *__src;
__src = (int4 *)*puVar9;
*unaff_R12 = uVar1;
}
else {
memmove(unaff_R12,__src,__n);
__src = (int4 *)*puVar9;
}
}
puVar7 = __src + uVar5;
unaff_RBP = puVar9[1] - (long)puVar7;
*(int8 *)(param_1 + 0x10) = 0;
*(int (*) [16])param_1 = (int [16])0x0;
local_78 = (long)unaff_RBP >> 2;
unaff_RBX = param_1;
if (0x7ffffffffffffffc < unaff_RBP) {
if (lVar2 != *(long *)(in_FS_OFFSET + 0x28)) goto LAB_001019cf;
/* try { // try from 001019eb to 001019ef has its CatchHandler @ 00101a36 */
std::__throw_length_error("cannot create std::vector larger than max_size()");
goto LAB_001019f0;
}
if (local_78 != 0) {
/* try { // try from 00101751 to 00101755 has its CatchHandler @ 00101a36 */
__src = (int4 *)operator_new(unaff_RBP);
lVar6 = (long)__src + unaff_RBP;
*(int4 **)param_1 = __src;
*(long *)(param_1 + 0x10) = lVar6;
if (unaff_RBP == 4) {
*__src = *puVar7;
goto LAB_001017ec;
}
memmove(__src,puVar7,unaff_RBP);
*(long *)(param_1 + 8) = lVar6;
if (puVar4 == unaff_R12) goto LAB_00101882;
if (0x1fffffffffffffff - local_78 < uVar5) {
if (lVar2 != *(long *)(in_FS_OFFSET + 0x28)) goto LAB_001019cf;
/* try { // try from 001017cf to 0010181d has its CatchHandler @ 00101a1e */
std::__throw_length_error("vector::_M_range_insert");
goto LAB_001017d8;
}
goto LAB_00101a0c;
}
LAB_001017d8:
*(int8 *)param_1 = 0;
lVar6 = 0;
__src = (int4 *)0x0;
*(int8 *)(param_1 + 0x10) = 0;
LAB_001017ec:
*(long *)(param_1 + 8) = lVar6;
if (puVar4 != unaff_R12) {
if (unaff_RBP < __n) goto LAB_00101802;
local_70 = (int4 *)0x0;
puVar4 = (int4 *)0x0;
if ((local_78 & 0x7fffffffffffffff) != 0) {
uVar3 = 2;
goto LAB_001019a5;
}
goto LAB_001018d1;
}
LAB_00101882:
if (unaff_R12 != (int4 *)0x0) goto LAB_00101918;
}
else {
LAB_001019f0:
if (lVar2 != *(long *)(in_FS_OFFSET + 0x28)) goto LAB_001019cf;
/* try { // try from 00101a07 to 00101a0b has its CatchHandler @ 00101a2a */
std::__throw_length_error("cannot create std::vector larger than max_size()");
LAB_00101a0c:
if (unaff_RBP < __n) {
LAB_00101802:
uVar3 = uVar5 + local_78;
param_1 = unaff_RBX;
}
else {
uVar3 = local_78 * 2;
LAB_001019a5:
param_1 = unaff_RBX;
if (0x1fffffffffffffff < uVar3) {
uVar3 = 0x1fffffffffffffff;
}
}
puVar4 = (int4 *)operator_new(uVar3 * 4);
local_70 = puVar4 + uVar3;
if (4 < (long)unaff_RBP) {
puVar7 = (int4 *)(unaff_RBP + (long)puVar4);
memcpy(puVar4,__src,unaff_RBP);
if ((long)__n < 5) {
*puVar7 = *unaff_R12;
puVar8 = puVar7 + uVar5;
}
else {
LAB_00101852:
puVar8 = puVar7 + uVar5;
memcpy(puVar7,unaff_R12,__n);
}
LAB_00101863:
operator_delete(__src,*(long *)(param_1 + 0x10) - (long)__src);
*(int4 **)param_1 = puVar4;
*(int4 **)(param_1 + 8) = puVar8;
*(int4 **)(param_1 + 0x10) = local_70;
goto LAB_00101882;
}
LAB_001018d1:
if (unaff_RBP == 4) {
puVar7 = puVar4 + 1;
*puVar4 = *__src;
if (4 < (long)__n) goto LAB_00101852;
LAB_00101984:
*puVar7 = *unaff_R12;
}
else {
puVar7 = (int4 *)(unaff_RBP + (long)puVar4);
if ((long)__n < 5) goto LAB_00101984;
memcpy(puVar7,unaff_R12,__n);
}
puVar8 = puVar7 + uVar5;
if (__src != (int4 *)0x0) goto LAB_00101863;
*(int4 **)param_1 = puVar4;
*(int4 **)(param_1 + 8) = puVar8;
*(int4 **)(param_1 + 0x10) = local_70;
LAB_00101918:
operator_delete(unaff_R12,__n);
}
if (lVar2 == *(long *)(in_FS_OFFSET + 0x28)) {
return param_1;
}
LAB_001019cf:
/* WARNING: Subroutine does not return */
__stack_chk_fail();
} |
2,343 | func0 |
#include <vector>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& a, int n, int k) {
std::vector<int> b(a.begin(), a.begin() + k);
std::vector<int> result(a.begin() + k, a.end());
result.insert(result.end(), b.begin(), b.end());
return result;
}
| int main() {
assert((func0({12, 10, 5, 6, 52, 36}, 6, 2) == std::vector<int>{5, 6, 52, 36, 12, 10}));
assert((func0({1, 2, 3, 4}, 4, 1) == std::vector<int>{2, 3, 4, 1}));
assert((func0({0, 1, 2, 3, 4, 5, 6, 7}, 8, 3) == std::vector<int>{3, 4, 5, 6, 7, 0, 1, 2}));
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> > const&, int, int):
endbr64
movabs $0x1fffffffffffffff,%rax
push %r15
movslq %ecx,%rcx
push %r14
push %r13
push %r12
push %rbp
push %rbx
mov %rsi,%rbx
sub $0x18,%rsp
mov (%rsi),%rsi
cmp %rax,%rcx
ja 1720 <_Z5func0RKSt6vectorIiSaIiEEii+0x120>
lea 0x0(,%rcx,4),%r13
mov %rdi,%r12
xor %ebp,%ebp
lea (%rsi,%r13,1),%r14
test %rcx,%rcx
je 165f <_Z5func0RKSt6vectorIiSaIiEEii+0x5f>
mov %r13,%rdi
mov %rsi,0x8(%rsp)
callq 1120 <_Znwm@plt>
mov (%rbx),%r14
mov 0x8(%rsp),%rsi
mov %rax,%rbp
add %r13,%r14
lea 0x0(%rbp,%r13,1),%r15
test %r13,%r13
je 1674 <_Z5func0RKSt6vectorIiSaIiEEii+0x74>
mov %r13,%rdx
mov %rbp,%rdi
callq 1100 <memcpy@plt>
mov 0x8(%rbx),%rbx
pxor %xmm0,%xmm0
movq $0x0,0x10(%r12)
movups %xmm0,(%r12)
mov %rbx,%r13
sub %r14,%r13
mov %r13,%rax
sar $0x2,%rax
test %r13,%r13
js 1714 <_Z5func0RKSt6vectorIiSaIiEEii+0x114>
test %rax,%rax
je 1710 <_Z5func0RKSt6vectorIiSaIiEEii+0x110>
mov %r13,%rdi
callq 1120 <_Znwm@plt>
mov %rax,%rdi
lea (%rdi,%r13,1),%r8
mov %rdi,(%r12)
mov %r8,0x10(%r12)
cmp %r14,%rbx
je 16d3 <_Z5func0RKSt6vectorIiSaIiEEii+0xd3>
mov %r13,%rdx
mov %r14,%rsi
mov %r8,0x8(%rsp)
callq 1100 <memcpy@plt>
mov 0x8(%rsp),%r8
mov %r8,0x8(%r12)
mov %r15,%rcx
mov %rbp,%rdx
mov %r8,%rsi
mov %r12,%rdi
callq 1850 <_ZNSt6vectorIiSaIiEE15_M_range_insertIN9__gnu_cxx17__normal_iteratorIPiS1_EEEEvS6_T_S7_St20forward_iterator_tag>
test %rbp,%rbp
je 16f6 <_Z5func0RKSt6vectorIiSaIiEEii+0xf6>
mov %rbp,%rdi
callq 1110 <_ZdlPv@plt>
add $0x18,%rsp
mov %r12,%rax
pop %rbx
pop %rbp
pop %r12
pop %r13
pop %r14
pop %r15
retq
nopl 0x0(%rax,%rax,1)
xor %edi,%edi
jmp 16ac <_Z5func0RKSt6vectorIiSaIiEEii+0xac>
lea 0x8ed(%rip),%rdi
callq 10e0 <_ZSt20__throw_length_errorPKc@plt>
lea 0x8e1(%rip),%rdi
callq 10e0 <_ZSt20__throw_length_errorPKc@plt>
endbr64
mov %rax,%rbx
jmpq 1160 <_Z5func0RKSt6vectorIiSaIiEEii.cold>
endbr64
mov %rax,%rbx
jmpq 1160 <_Z5func0RKSt6vectorIiSaIiEEii.cold>
nopw %cs:0x0(%rax,%rax,1)
xchg %ax,%ax
| _Z5func0RKSt6vectorIiSaIiEEii:
endbr64
push r15
movsxd rcx, ecx
pxor xmm0, xmm0
push r14
push r13
push r12
lea r12, ds:0[rcx*4]
push rbp
push rbx
sub rsp, 48h
mov r14, [rsi]
mov rax, fs:28h
mov [rsp+78h+var_40], rax
xor eax, eax
mov [rsp+78h+var_70], rcx
mov rax, 7FFFFFFFFFFFFFFCh
mov [rsp+78h+var_48], 0
movaps [rsp+78h+var_58], xmm0
cmp rax, r12
jb loc_19DB
cmp [rsp+78h+var_70], 0
mov rbx, rdi
mov rbp, rsi
jz loc_1920
mov rdi, r12; unsigned __int64
call __Znwm; operator new(ulong)
lea r15, [rax+r12]
mov qword ptr [rsp+78h+var_58], rax
mov r13, rax
mov [rsp+78h+var_48], r15
cmp r12, 4
jz loc_1950
mov rsi, r14; src
mov rdx, r12; n
mov rdi, rax; dest
call _memmove
mov r14, [rbp+0]
loc_16F1:
mov rbp, [rbp+8]
lea rax, [r14+r12]
pxor xmm0, xmm0
mov qword ptr [rsp+78h+var_58+8], r15
mov [rsp+78h+src], rax
sub rbp, rax
mov qword ptr [rbx+10h], 0
mov rax, rbp
movups xmmword ptr [rbx], xmm0
sar rax, 2
mov [rsp+78h+var_78], rax
mov rax, 7FFFFFFFFFFFFFFCh
cmp rax, rbp
jb loc_19BF
cmp [rsp+78h+var_78], 0
jz loc_17C8
mov rdi, rbp; unsigned __int64
call __Znwm; operator new(ulong)
lea rcx, [rax+rbp]
mov [rbx], rax
mov r14, rax
mov [rbx+10h], rcx
cmp rbp, 4
jz loc_1940
mov rsi, [rsp+78h+src]; src
mov rdx, rbp; n
mov rdi, rax; dest
mov [rsp+78h+var_60], rcx
call _memmove
mov rcx, [rsp+78h+var_60]
mov [rbx+8], rcx
cmp r15, r13
jz loc_1872
mov rax, 1FFFFFFFFFFFFFFFh
mov rdx, [rsp+78h+var_78]
sub rax, rdx
mov rdx, [rsp+78h+var_70]
cmp rax, rdx
jnb loc_19FC
mov rax, [rsp+78h+var_40]
sub rax, fs:28h
jnz loc_19F7
lea rdi, aVectorMRangeIn; "vector::_M_range_insert"
call __ZSt20__throw_length_errorPKc; std::__throw_length_error(char const*)
loc_17C8:
mov qword ptr [rbx], 0
xor ecx, ecx
xor r14d, r14d
mov qword ptr [rbx+10h], 0
loc_17DC:
mov [rbx+8], rcx
cmp r15, r13
jz loc_1872
cmp rbp, r12
jnb loc_18A8
loc_17F2:
mov rax, [rsp+78h+var_70]
mov rdx, [rsp+78h+var_78]
add rax, rdx
loc_17FE:
shl rax, 2
mov rdi, rax; unsigned __int64
mov [rsp+78h+var_78], rax
call __Znwm; operator new(ulong)
mov r15, rax
mov rax, [rsp+78h+var_78]
add rax, r15
mov [rsp+78h+var_70], rax
cmp rbp, 4
jle loc_18C1
mov rdx, rbp; n
mov rsi, r14; src
mov rdi, r15; dest
add rbp, r15
call _memcpy
cmp r12, 4
jle loc_19B0
loc_1842:
mov rdi, rbp; dest
mov rdx, r12; n
mov rsi, r13; src
add rbp, r12
call _memcpy
loc_1853:
mov rsi, [rbx+10h]
mov rdi, r14; void *
sub rsi, r14; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
mov rax, [rsp+78h+var_70]
mov [rbx], r15
mov [rbx+8], rbp
mov [rbx+10h], rax
loc_1872:
test r13, r13
jnz loc_1908
loc_187B:
mov rax, [rsp+78h+var_40]
sub rax, fs:28h
jnz loc_19F7
add rsp, 48h
mov rax, rbx
pop rbx
pop rbp
pop r12
pop r13
pop r14
pop r15
retn
loc_18A8:
mov [rsp+78h+var_70], 0
mov rax, [rsp+78h+var_78]
xor r15d, r15d
add rax, rax
jnz loc_1990
loc_18C1:
cmp rbp, 4
jz loc_1960
add rbp, r15
cmp r12, 4
jle loc_1974
mov rdi, rbp; dest
mov rdx, r12; n
mov rsi, r13; src
add rbp, r12
call _memcpy
test r14, r14
jnz loc_1853
loc_18F2:
mov rax, [rsp+78h+var_70]
mov [rbx], r15
mov [rbx+8], rbp
mov [rbx+10h], rax
nop word ptr [rax+rax+00h]
loc_1908:
mov rsi, r12; unsigned __int64
mov rdi, r13; void *
call __ZdlPvm; operator delete(void *,ulong)
jmp loc_187B
loc_1920:
mov qword ptr [rsp+78h+var_58], 0
xor r15d, r15d
xor r13d, r13d
mov [rsp+78h+var_48], 0
jmp loc_16F1
loc_1940:
mov rax, [rsp+78h+src]
mov eax, [rax]
mov [r14], eax
jmp loc_17DC
loc_1950:
mov eax, [r14]
mov r14, [rbp+0]
mov [r13+0], eax
jmp loc_16F1
loc_1960:
mov eax, [r14]
lea rbp, [r15+4]
mov [r15], eax
cmp r12, 4
jg loc_1842
loc_1974:
mov eax, [r13+0]
mov [rbp+0], eax
add rbp, r12
test r14, r14
jnz loc_1853
jmp loc_18F2
loc_1990:
mov eax, 2
loc_1995:
mov rdx, 1FFFFFFFFFFFFFFFh
cmp rax, rdx
cmova rax, rdx
jmp loc_17FE
loc_19B0:
mov eax, [r13+0]
mov [rbp+0], eax
add rbp, r12
jmp loc_1853
loc_19BF:
mov rax, [rsp+78h+var_40]
sub rax, fs:28h
jnz short loc_19F7
lea rdi, aCannotCreateSt; "cannot create std::vector larger than m"...
call __ZSt20__throw_length_errorPKc; std::__throw_length_error(char const*)
loc_19DB:
mov rax, [rsp+78h+var_40]
sub rax, fs:28h
jnz short loc_19F7
lea rdi, aCannotCreateSt; "cannot create std::vector larger than m"...
call __ZSt20__throw_length_errorPKc; std::__throw_length_error(char const*)
loc_19F7:
call ___stack_chk_fail
loc_19FC:
cmp rbp, r12
jb loc_17F2
mov rax, [rsp+78h+var_78]
add rax, rax
jmp short loc_1995
endbr64
mov rbp, rax
jmp _Z5func0RKSt6vectorIiSaIiEEii_cold; func0(std::vector<int> const&,int,int) [clone]
endbr64
mov rbp, rax
jmp loc_1176 | long long func0(long long a1, long long a2, long long a3, int a4)
{
signed long long v4; // r12
int *v5; // r14
_DWORD *v7; // rax
_DWORD *v8; // r15
_DWORD *v9; // r13
signed long long v10; // rbp
int *v11; // rax
char *v12; // rcx
int *v13; // r14
unsigned long long v14; // rax
int *v15; // r15
size_t v16; // rdx
_DWORD *v17; // rbp
void *v18; // rdi
_DWORD *v19; // rbp
void *v21; // rdi
int v22; // eax
long long v23; // [rsp+0h] [rbp-78h]
long long v24; // [rsp+0h] [rbp-78h]
unsigned long long v25; // [rsp+8h] [rbp-70h]
int *v26; // [rsp+8h] [rbp-70h]
int *src; // [rsp+10h] [rbp-68h]
char *v28; // [rsp+18h] [rbp-60h]
v4 = 4LL * a4;
v5 = *(int **)a2;
v25 = a4;
if ( (unsigned long long)v4 > 0x7FFFFFFFFFFFFFFCLL )
std::__throw_length_error("cannot create std::vector larger than max_size()");
if ( a4 )
{
v7 = (_DWORD *)operator new(4LL * a4);
v8 = &v7[(unsigned long long)v4 / 4];
v9 = v7;
if ( v4 == 4 )
{
v22 = *v5;
v5 = *(int **)a2;
*v9 = v22;
}
else
{
memmove(v7, v5, v4);
v5 = *(int **)a2;
}
}
else
{
v8 = 0LL;
v9 = 0LL;
}
src = &v5[(unsigned long long)v4 / 4];
v10 = *(_QWORD *)(a2 + 8) - (_QWORD)&v5[(unsigned long long)v4 / 4];
*(_QWORD *)(a1 + 16) = 0LL;
*(_OWORD *)a1 = 0LL;
v23 = v10 >> 2;
if ( (unsigned long long)v10 > 0x7FFFFFFFFFFFFFFCLL )
std::__throw_length_error("cannot create std::vector larger than max_size()");
if ( !v23 )
{
*(_QWORD *)a1 = 0LL;
v12 = 0LL;
v13 = 0LL;
*(_QWORD *)(a1 + 16) = 0LL;
goto LABEL_12;
}
v11 = (int *)operator new(v10);
v12 = (char *)v11 + v10;
*(_QWORD *)a1 = v11;
v13 = v11;
*(_QWORD *)(a1 + 16) = (char *)v11 + v10;
if ( v10 == 4 )
{
*v11 = *src;
LABEL_12:
*(_QWORD *)(a1 + 8) = v12;
if ( v8 == v9 )
goto LABEL_19;
if ( v10 >= (unsigned long long)v4 )
{
v26 = 0LL;
v15 = 0LL;
if ( !(2 * v23) )
goto LABEL_22;
v14 = 2LL;
goto LABEL_34;
}
LABEL_14:
v14 = v23 + v25;
goto LABEL_15;
}
v28 = (char *)v11 + v10;
memmove(v11, src, v10);
*(_QWORD *)(a1 + 8) = v28;
if ( v8 == v9 )
goto LABEL_19;
if ( 0x1FFFFFFFFFFFFFFFLL - v23 < v25 )
std::__throw_length_error("vector::_M_range_insert");
if ( v10 < (unsigned long long)v4 )
goto LABEL_14;
v14 = 2 * v23;
LABEL_34:
if ( v14 > 0x1FFFFFFFFFFFFFFFLL )
v14 = 0x1FFFFFFFFFFFFFFFLL;
LABEL_15:
v24 = v14;
v15 = (int *)operator new(4 * v14);
v26 = &v15[v24];
if ( v10 > 4 )
{
v16 = v10;
v17 = (int *)((char *)v15 + v10);
memcpy(v15, v13, v16);
if ( v4 <= 4 )
{
*v17 = *v9;
v19 = &v17[(unsigned long long)v4 / 4];
goto LABEL_18;
}
goto LABEL_17;
}
LABEL_22:
if ( v10 != 4 )
{
v17 = (int *)((char *)v15 + v10);
if ( v4 > 4 )
{
v21 = v17;
v19 = &v17[(unsigned long long)v4 / 4];
memcpy(v21, v9, v4);
if ( v13 )
goto LABEL_18;
LABEL_25:
*(_QWORD *)a1 = v15;
*(_QWORD *)(a1 + 8) = v19;
*(_QWORD *)(a1 + 16) = v26;
goto LABEL_26;
}
LABEL_31:
*v17 = *v9;
v19 = &v17[(unsigned long long)v4 / 4];
if ( v13 )
goto LABEL_18;
goto LABEL_25;
}
v17 = v15 + 1;
*v15 = *v13;
if ( v4 <= 4 )
goto LABEL_31;
LABEL_17:
v18 = v17;
v19 = &v17[(unsigned long long)v4 / 4];
memcpy(v18, v9, v4);
LABEL_18:
operator delete(v13, *(_QWORD *)(a1 + 16) - (_QWORD)v13);
*(_QWORD *)a1 = v15;
*(_QWORD *)(a1 + 8) = v19;
*(_QWORD *)(a1 + 16) = v26;
LABEL_19:
if ( v9 )
LABEL_26:
operator delete(v9, v4);
return a1;
} | func0:
ENDBR64
PUSH R15
MOVSXD RCX,ECX
PXOR XMM0,XMM0
PUSH R14
PUSH R13
PUSH R12
LEA R12,[RCX*0x4]
PUSH RBP
PUSH RBX
SUB RSP,0x48
MOV R14,qword ptr [RSI]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,0x7ffffffffffffffc
MOV qword ptr [RSP + 0x30],0x0
MOVAPS xmmword ptr [RSP + 0x20],XMM0
CMP RAX,R12
JC 0x001019db
CMP qword ptr [RSP + 0x8],0x0
MOV RBX,RDI
MOV RBP,RSI
JZ 0x00101920
MOV RDI,R12
LAB_001016bf:
CALL 0x00101110
LEA R15,[RAX + R12*0x1]
MOV qword ptr [RSP + 0x20],RAX
MOV R13,RAX
MOV qword ptr [RSP + 0x30],R15
CMP R12,0x4
JZ 0x00101950
MOV RSI,R14
MOV RDX,R12
MOV RDI,RAX
CALL 0x00101140
MOV R14,qword ptr [RBP]
LAB_001016f1:
MOV RBP,qword ptr [RBP + 0x8]
LEA RAX,[R14 + R12*0x1]
PXOR XMM0,XMM0
MOV qword ptr [RSP + 0x28],R15
MOV qword ptr [RSP + 0x10],RAX
SUB RBP,RAX
MOV qword ptr [RBX + 0x10],0x0
MOV RAX,RBP
MOVUPS xmmword ptr [RBX],XMM0
SAR RAX,0x2
MOV qword ptr [RSP],RAX
MOV RAX,0x7ffffffffffffffc
CMP RAX,RBP
JC 0x001019bf
CMP qword ptr [RSP],0x0
JZ 0x001017c8
MOV RDI,RBP
LAB_00101741:
CALL 0x00101110
LEA RCX,[RAX + RBP*0x1]
MOV qword ptr [RBX],RAX
MOV R14,RAX
MOV qword ptr [RBX + 0x10],RCX
CMP RBP,0x4
JZ 0x00101940
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,RBP
MOV RDI,RAX
MOV qword ptr [RSP + 0x18],RCX
CALL 0x00101140
MOV RCX,qword ptr [RSP + 0x18]
MOV qword ptr [RBX + 0x8],RCX
CMP R15,R13
JZ 0x00101872
MOV RAX,0x1fffffffffffffff
MOV RDX,qword ptr [RSP]
SUB RAX,RDX
MOV RDX,qword ptr [RSP + 0x8]
CMP RAX,RDX
JNC 0x001019fc
MOV RAX,qword ptr [RSP + 0x38]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x001019f7
LEA RDI,[0x10214c]
LAB_001017bf:
CALL 0x001010e0
NOP dword ptr [RAX]
LAB_001017c8:
MOV qword ptr [RBX],0x0
XOR ECX,ECX
XOR R14D,R14D
MOV qword ptr [RBX + 0x10],0x0
LAB_001017dc:
MOV qword ptr [RBX + 0x8],RCX
CMP R15,R13
JZ 0x00101872
CMP RBP,R12
JNC 0x001018a8
LAB_001017f2:
MOV RAX,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP]
ADD RAX,RDX
LAB_001017fe:
SHL RAX,0x2
MOV RDI,RAX
MOV qword ptr [RSP],RAX
CALL 0x00101110
MOV R15,RAX
MOV RAX,qword ptr [RSP]
ADD RAX,R15
MOV qword ptr [RSP + 0x8],RAX
CMP RBP,0x4
JLE 0x001018c1
MOV RDX,RBP
MOV RSI,R14
MOV RDI,R15
ADD RBP,R15
CALL 0x00101100
CMP R12,0x4
JLE 0x001019b0
LAB_00101842:
MOV RDI,RBP
MOV RDX,R12
MOV RSI,R13
ADD RBP,R12
CALL 0x00101100
LAB_00101853:
MOV RSI,qword ptr [RBX + 0x10]
MOV RDI,R14
SUB RSI,R14
CALL 0x00101120
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RBX],R15
MOV qword ptr [RBX + 0x8],RBP
MOV qword ptr [RBX + 0x10],RAX
LAB_00101872:
TEST R13,R13
JNZ 0x00101908
LAB_0010187b:
MOV RAX,qword ptr [RSP + 0x38]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x001019f7
ADD RSP,0x48
MOV RAX,RBX
POP RBX
POP RBP
POP R12
POP R13
POP R14
POP R15
RET
LAB_001018a8:
MOV qword ptr [RSP + 0x8],0x0
MOV RAX,qword ptr [RSP]
XOR R15D,R15D
ADD RAX,RAX
JNZ 0x00101990
LAB_001018c1:
CMP RBP,0x4
JZ 0x00101960
ADD RBP,R15
CMP R12,0x4
JLE 0x00101974
MOV RDI,RBP
MOV RDX,R12
MOV RSI,R13
ADD RBP,R12
CALL 0x00101100
TEST R14,R14
JNZ 0x00101853
LAB_001018f2:
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RBX],R15
MOV qword ptr [RBX + 0x8],RBP
MOV qword ptr [RBX + 0x10],RAX
NOP word ptr [RAX + RAX*0x1]
LAB_00101908:
MOV RSI,R12
MOV RDI,R13
CALL 0x00101120
JMP 0x0010187b
LAB_00101920:
MOV qword ptr [RSP + 0x20],0x0
XOR R15D,R15D
XOR R13D,R13D
MOV qword ptr [RSP + 0x30],0x0
JMP 0x001016f1
LAB_00101940:
MOV RAX,qword ptr [RSP + 0x10]
MOV EAX,dword ptr [RAX]
MOV dword ptr [R14],EAX
JMP 0x001017dc
LAB_00101950:
MOV EAX,dword ptr [R14]
MOV R14,qword ptr [RBP]
MOV dword ptr [R13],EAX
JMP 0x001016f1
LAB_00101960:
MOV EAX,dword ptr [R14]
LEA RBP,[R15 + 0x4]
MOV dword ptr [R15],EAX
CMP R12,0x4
JG 0x00101842
LAB_00101974:
MOV EAX,dword ptr [R13]
MOV dword ptr [RBP],EAX
ADD RBP,R12
TEST R14,R14
JNZ 0x00101853
JMP 0x001018f2
LAB_00101990:
MOV EAX,0x2
LAB_00101995:
MOV RDX,0x1fffffffffffffff
CMP RAX,RDX
CMOVA RAX,RDX
JMP 0x001017fe
LAB_001019b0:
MOV EAX,dword ptr [R13]
MOV dword ptr [RBP],EAX
ADD RBP,R12
JMP 0x00101853
LAB_001019bf:
MOV RAX,qword ptr [RSP + 0x38]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x001019f7
LEA RDI,[0x102008]
LAB_001019d6:
CALL 0x001010e0
LAB_001019db:
MOV RAX,qword ptr [RSP + 0x38]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x001019f7
LEA RDI,[0x102008]
LAB_001019f2:
CALL 0x001010e0
LAB_001019f7:
CALL 0x00101130
LAB_001019fc:
CMP RBP,R12
JC 0x001017f2
MOV RAX,qword ptr [RSP]
ADD RAX,RAX
JMP 0x00101995 | /* func0(std::vector<int, std::allocator<int> > const&, int, int) */
vector * func0(vector *param_1,int param_2,int param_3)
{
ulong __n;
int4 uVar1;
long lVar2;
int4 *__dest;
ulong uVar3;
int4 *__dest_00;
int4 *puVar4;
int in_ECX;
ulong uVar5;
long lVar6;
ulong __n_00;
int4 *puVar7;
int4 *puVar8;
int4 in_register_00000034;
int8 *puVar9;
long in_FS_OFFSET;
int4 *local_70;
puVar9 = (int8 *)CONCAT44(in_register_00000034,param_2);
uVar5 = (ulong)in_ECX;
__n = uVar5 * 4;
puVar4 = (int4 *)*puVar9;
lVar2 = *(long *)(in_FS_OFFSET + 0x28);
if (__n < 0x7ffffffffffffffd) {
if (uVar5 == 0) {
puVar7 = (int4 *)0x0;
__dest = (int4 *)0x0;
}
else {
__dest = (int4 *)operator_new(__n);
puVar7 = __dest + uVar5;
if (__n == 4) {
uVar1 = *puVar4;
puVar4 = (int4 *)*puVar9;
*__dest = uVar1;
}
else {
memmove(__dest,puVar4,__n);
puVar4 = (int4 *)*puVar9;
}
}
puVar4 = puVar4 + uVar5;
__n_00 = puVar9[1] - (long)puVar4;
*(int8 *)(param_1 + 0x10) = 0;
*(int (*) [16])param_1 = (int [16])0x0;
uVar3 = (long)__n_00 >> 2;
if (__n_00 < 0x7ffffffffffffffd) {
if (uVar3 == 0) {
LAB_001017c8:
*(int8 *)param_1 = 0;
lVar6 = 0;
__dest_00 = (int4 *)0x0;
*(int8 *)(param_1 + 0x10) = 0;
LAB_001017dc:
*(long *)(param_1 + 8) = lVar6;
if (puVar7 == __dest) goto LAB_00101872;
if (__n_00 < __n) {
LAB_001017f2:
uVar3 = uVar5 + uVar3;
LAB_001017fe:
puVar4 = (int4 *)operator_new(uVar3 * 4);
local_70 = puVar4 + uVar3;
if ((long)__n_00 < 5) goto LAB_001018c1;
puVar7 = (int4 *)(__n_00 + (long)puVar4);
memcpy(puVar4,__dest_00,__n_00);
if ((long)__n < 5) {
*puVar7 = *__dest;
puVar8 = puVar7 + uVar5;
}
else {
LAB_00101842:
puVar8 = puVar7 + uVar5;
memcpy(puVar7,__dest,__n);
}
LAB_00101853:
operator_delete(__dest_00,*(long *)(param_1 + 0x10) - (long)__dest_00);
*(int4 **)param_1 = puVar4;
*(int4 **)(param_1 + 8) = puVar8;
*(int4 **)(param_1 + 0x10) = local_70;
goto LAB_00101872;
}
local_70 = (int4 *)0x0;
puVar4 = (int4 *)0x0;
if ((uVar3 & 0x7fffffffffffffff) != 0) {
uVar3 = 2;
LAB_00101995:
if (0x1fffffffffffffff < uVar3) {
uVar3 = 0x1fffffffffffffff;
}
goto LAB_001017fe;
}
LAB_001018c1:
if (__n_00 == 4) {
puVar7 = puVar4 + 1;
*puVar4 = *__dest_00;
if (4 < (long)__n) goto LAB_00101842;
LAB_00101974:
*puVar7 = *__dest;
}
else {
puVar7 = (int4 *)(__n_00 + (long)puVar4);
if ((long)__n < 5) goto LAB_00101974;
memcpy(puVar7,__dest,__n);
}
puVar8 = puVar7 + uVar5;
if (__dest_00 != (int4 *)0x0) goto LAB_00101853;
*(int4 **)param_1 = puVar4;
*(int4 **)(param_1 + 8) = puVar8;
*(int4 **)(param_1 + 0x10) = local_70;
LAB_00101908:
operator_delete(__dest,__n);
}
else {
/* try { // try from 00101741 to 00101745 has its CatchHandler @ 00101a0e */
__dest_00 = (int4 *)operator_new(__n_00);
lVar6 = (long)__dest_00 + __n_00;
*(int4 **)param_1 = __dest_00;
*(long *)(param_1 + 0x10) = lVar6;
if (__n_00 == 4) {
*__dest_00 = *puVar4;
goto LAB_001017dc;
}
memmove(__dest_00,puVar4,__n_00);
*(long *)(param_1 + 8) = lVar6;
if (puVar7 != __dest) {
if (0x1fffffffffffffff - uVar3 < uVar5) {
if (lVar2 != *(long *)(in_FS_OFFSET + 0x28)) goto LAB_001019f7;
/* try { // try from 001017bf to 0010180d has its CatchHandler @ 00101a1a */
std::__throw_length_error("vector::_M_range_insert");
goto LAB_001017c8;
}
if (__n <= __n_00) {
uVar3 = uVar3 * 2;
goto LAB_00101995;
}
goto LAB_001017f2;
}
LAB_00101872:
if (__dest != (int4 *)0x0) goto LAB_00101908;
}
if (lVar2 == *(long *)(in_FS_OFFSET + 0x28)) {
return param_1;
}
goto LAB_001019f7;
}
if (lVar2 != *(long *)(in_FS_OFFSET + 0x28)) goto LAB_001019f7;
/* try { // try from 001019d6 to 001019da has its CatchHandler @ 00101a0e */
std::__throw_length_error("cannot create std::vector larger than max_size()");
}
if (lVar2 == *(long *)(in_FS_OFFSET + 0x28)) {
std::__throw_length_error("cannot create std::vector larger than max_size()");
}
LAB_001019f7:
/* WARNING: Subroutine does not return */
__stack_chk_fail();
} |
2,344 | func0 |
#include <vector>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& listx) {
return listx;
}
| int main() {
assert(func0({5, 10, 7, 4, 15, 3}) == std::vector<int>({5, 10, 7, 4, 15, 3}));
assert(func0({2, 4, 5, 6, 2, 3, 4, 4, 7}) == std::vector<int>({2, 4, 5, 6, 2, 3, 4, 4, 7}));
assert(func0({58, 44, 56}) == std::vector<int>({58, 44, 56}));
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x10,%rsp
mov %rdi,-0x8(%rbp)
mov %rsi,-0x10(%rbp)
mov -0x10(%rbp),%rdx
mov -0x8(%rbp),%rax
mov %rdx,%rsi
mov %rax,%rdi
callq 192e <_ZNSt6vectorIiSaIiEEC1ERKS1_>
mov -0x8(%rbp),%rax
leaveq
retq
| _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rdx, [rbp+var_10]
mov rax, [rbp+var_8]
mov rsi, rdx
mov rdi, rax
call _ZNSt6vectorIiSaIiEEC2ERKS1_; std::vector<int>::vector(std::vector<int> const&)
mov rax, [rbp+var_8]
leave
retn | long long func0(long long a1, long long a2)
{
std::vector<int>::vector(a1, a2);
return a1;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RDX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV RSI,RDX
MOV RDI,RAX
CALL 0x00101996
MOV RAX,qword ptr [RBP + -0x8]
LEAVE
RET | /* func0(std::vector<int, std::allocator<int> > const&) */
vector * func0(vector *param_1)
{
vector *in_RSI;
std::vector<int,std::allocator<int>>::vector((vector<int,std::allocator<int>> *)param_1,in_RSI);
return param_1;
} |
2,345 | func0 |
#include <vector>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& listx) {
return listx;
}
| int main() {
assert(func0({5, 10, 7, 4, 15, 3}) == std::vector<int>({5, 10, 7, 4, 15, 3}));
assert(func0({2, 4, 5, 6, 2, 3, 4, 4, 7}) == std::vector<int>({2, 4, 5, 6, 2, 3, 4, 4, 7}));
assert(func0({58, 44, 56}) == std::vector<int>({58, 44, 56}));
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %r13
push %r12
push %rbp
push %rbx
sub $0x8,%rsp
mov %rdi,%rbx
mov %rsi,%r13
mov 0x8(%rsi),%r12
sub (%rsi),%r12
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi)
movq $0x0,0x10(%rdi)
mov %r12,%rax
sar $0x2,%rax
je 1304 <_Z5func0RKSt6vectorIiSaIiEE+0x9b>
movabs $0x1fffffffffffffff,%rdx
cmp %rdx,%rax
ja 12ff <_Z5func0RKSt6vectorIiSaIiEE+0x96>
mov %r12,%rdi
callq 1140 <_Znwm@plt>
mov %rax,%rbp
mov %rbp,(%rbx)
mov %rbp,0x8(%rbx)
add %rbp,%r12
mov %r12,0x10(%rbx)
mov 0x8(%r13),%rax
mov 0x0(%r13),%rsi
mov %rax,%r12
sub %rsi,%r12
cmp %rsi,%rax
je 12ea <_Z5func0RKSt6vectorIiSaIiEE+0x81>
mov %r12,%rdx
mov %rbp,%rdi
callq 1160 <memmove@plt>
add %r12,%rbp
mov %rbp,0x8(%rbx)
mov %rbx,%rax
add $0x8,%rsp
pop %rbx
pop %rbp
pop %r12
pop %r13
retq
callq 10e0 <_ZSt17__throw_bad_allocv@plt>
mov $0x0,%ebp
jmp 12be <_Z5func0RKSt6vectorIiSaIiEE+0x55>
| _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push r13
push r12
push rbp
push rbx
sub rsp, 8
mov rbx, rdi
mov r13, rsi
mov r12, [rsi+8]
sub r12, [rsi]
mov qword ptr [rdi], 0
mov qword ptr [rdi+8], 0
mov qword ptr [rdi+10h], 0
jz short loc_12FB
mov rax, 7FFFFFFFFFFFFFFCh
cmp rax, r12
jb short loc_12F6
mov rdi, r12; unsigned __int64
call __Znwm; operator new(ulong)
mov rbp, rax
loc_12B7:
mov [rbx], rbp
mov [rbx+8], rbp
add r12, rbp
mov [rbx+10h], r12
mov rsi, [r13+0]; src
mov r12, [r13+8]
sub r12, rsi
cmp r12, 4
jle short loc_1302
mov rdx, r12; n
mov rdi, rbp; dest
call _memmove
loc_12E1:
add rbp, r12
mov [rbx+8], rbp
mov rax, rbx
add rsp, 8
pop rbx
pop rbp
pop r12
pop r13
retn
loc_12F6:
call __ZSt28__throw_bad_array_new_lengthv; std::__throw_bad_array_new_length(void)
loc_12FB:
mov ebp, 0
jmp short loc_12B7
loc_1302:
jnz short loc_12E1
mov eax, [rsi]
mov [rbp+0], eax
jmp short loc_12E1 | _QWORD * func0(_QWORD *a1, _QWORD *a2)
{
unsigned long long v3; // r12
_DWORD *v4; // rbp
_DWORD *v5; // rsi
long long v6; // r12
v3 = a2[1] - *a2;
*a1 = 0LL;
a1[1] = 0LL;
a1[2] = 0LL;
if ( v3 )
{
if ( v3 <= 0x7FFFFFFFFFFFFFFCLL )
{
v4 = (_DWORD *)operator new(v3);
goto LABEL_4;
}
std::__throw_bad_array_new_length();
}
v4 = 0LL;
LABEL_4:
*a1 = v4;
a1[1] = v4;
a1[2] = (char *)v4 + v3;
v5 = (_DWORD *)*a2;
v6 = a2[1] - *a2;
if ( v6 <= 4 )
{
if ( v6 == 4 )
*v4 = *v5;
}
else
{
memmove(v4, v5, a2[1] - *a2);
}
a1[1] = (char *)v4 + v6;
return a1;
} | func0:
ENDBR64
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV RBX,RDI
MOV R13,RSI
MOV R12,qword ptr [RSI + 0x8]
SUB R12,qword ptr [RSI]
MOV qword ptr [RDI],0x0
MOV qword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
JZ 0x001012fb
MOV RAX,0x7ffffffffffffffc
CMP RAX,R12
JC 0x001012f6
MOV RDI,R12
CALL 0x00101130
MOV RBP,RAX
LAB_001012b7:
MOV qword ptr [RBX],RBP
MOV qword ptr [RBX + 0x8],RBP
ADD R12,RBP
MOV qword ptr [RBX + 0x10],R12
MOV RSI,qword ptr [R13]
MOV R12,qword ptr [R13 + 0x8]
SUB R12,RSI
CMP R12,0x4
JLE 0x00101302
MOV RDX,R12
MOV RDI,RBP
CALL 0x00101160
LAB_001012e1:
ADD RBP,R12
MOV qword ptr [RBX + 0x8],RBP
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP RBP
POP R12
POP R13
RET
LAB_001012f6:
CALL 0x00101110
LAB_001012fb:
MOV EBP,0x0
JMP 0x001012b7
LAB_00101302:
JNZ 0x001012e1
MOV EAX,dword ptr [RSI]
MOV dword ptr [RBP],EAX
JMP 0x001012e1 | /* func0(std::vector<int, std::allocator<int> > const&) */
vector * func0(vector *param_1)
{
int4 *__src;
int4 *__dest;
long *in_RSI;
ulong uVar1;
size_t __n;
uVar1 = in_RSI[1] - *in_RSI;
*(int8 *)param_1 = 0;
*(int8 *)(param_1 + 8) = 0;
*(int8 *)(param_1 + 0x10) = 0;
if (uVar1 != 0) {
if (uVar1 < 0x7ffffffffffffffd) {
__dest = (int4 *)operator_new(uVar1);
goto LAB_001012b7;
}
std::__throw_bad_array_new_length();
}
__dest = (int4 *)0x0;
LAB_001012b7:
*(int4 **)param_1 = __dest;
*(int4 **)(param_1 + 8) = __dest;
*(ulong *)(param_1 + 0x10) = uVar1 + (long)__dest;
__src = (int4 *)*in_RSI;
__n = in_RSI[1] - (long)__src;
if ((long)__n < 5) {
if (__n == 4) {
*__dest = *__src;
}
}
else {
memmove(__dest,__src,__n);
}
*(size_t *)(param_1 + 8) = (long)__dest + __n;
return param_1;
} |
2,346 | func0 |
#include <vector>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& listx) {
return listx;
}
| int main() {
assert(func0({5, 10, 7, 4, 15, 3}) == std::vector<int>({5, 10, 7, 4, 15, 3}));
assert(func0({2, 4, 5, 6, 2, 3, 4, 4, 7}) == std::vector<int>({2, 4, 5, 6, 2, 3, 4, 4, 7}));
assert(func0({58, 44, 56}) == std::vector<int>({58, 44, 56}));
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %r12
mov %rdi,%r12
push %rbp
mov %rsi,%rbp
push %rbx
mov 0x8(%rsi),%rbx
sub (%rsi),%rbx
movq $0x0,(%rdi)
mov %rbx,%rax
movq $0x0,0x8(%rdi)
sar $0x2,%rax
movq $0x0,0x10(%rdi)
je 1708 <_Z5func0RKSt6vectorIiSaIiEE+0x98>
movabs $0x1fffffffffffffff,%rdx
cmp %rdx,%rax
ja 170c <_Z5func0RKSt6vectorIiSaIiEE+0x9c>
mov %rbx,%rdi
callq 1140 <_Znwm@plt>
mov %rax,%rcx
add %rcx,%rbx
mov %rcx,(%r12)
mov %rbx,0x10(%r12)
mov %rcx,0x8(%r12)
mov 0x8(%rbp),%rax
mov 0x0(%rbp),%rsi
mov %rax,%rbx
sub %rsi,%rbx
cmp %rsi,%rax
je 16f1 <_Z5func0RKSt6vectorIiSaIiEE+0x81>
mov %rcx,%rdi
mov %rbx,%rdx
callq 1160 <memmove@plt>
mov %rax,%rcx
add %rbx,%rcx
mov %r12,%rax
pop %rbx
pop %rbp
mov %rcx,0x8(%r12)
pop %r12
retq
nopl 0x0(%rax)
xor %ecx,%ecx
jmp 16bf <_Z5func0RKSt6vectorIiSaIiEE+0x4f>
callq 10e0 <_ZSt17__throw_bad_allocv@plt>
nopw %cs:0x0(%rax,%rax,1)
nopl 0x0(%rax,%rax,1)
| _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push r12
pxor xmm0, xmm0
mov r12, rsi
push rbp
push rbx
mov rbp, [rsi+8]
mov rbx, rdi
sub rbp, [rsi]
mov qword ptr [rdi+10h], 0
movups xmmword ptr [rdi], xmm0
jz short loc_16B8
mov rax, 7FFFFFFFFFFFFFFCh
cmp rax, rbp
jb short loc_16D0
mov rdi, rbp; unsigned __int64
call __Znwm; operator new(ulong)
mov rcx, rax
loc_1670:
movq xmm0, rcx
add rbp, rcx
punpcklqdq xmm0, xmm0
mov [rbx+10h], rbp
movups xmmword ptr [rbx], xmm0
mov rsi, [r12]; src
mov rax, [r12+8]
sub rax, rsi
cmp rax, 4
jle short loc_16C0
mov rdi, rcx; dest
mov rdx, rax; n
mov rbp, rax
call _memmove
mov rcx, rax
loc_16A6:
add rcx, rbp
mov rax, rbx
mov [rbx+8], rcx
pop rbx
pop rbp
pop r12
retn
loc_16B8:
xor ecx, ecx
jmp short loc_1670
loc_16C0:
mov rbp, rax
jnz short loc_16A6
mov eax, [rsi]
mov ebp, 4
mov [rcx], eax
jmp short loc_16A6
loc_16D0:
call __ZSt28__throw_bad_array_new_lengthv; std::__throw_bad_array_new_length(void)
nop word ptr [rax+rax+00000000h]
nop | long long func0(long long a1, _QWORD *a2)
{
unsigned long long v3; // rbp
_DWORD *v4; // rcx
_DWORD *v5; // rsi
long long v6; // rax
size_t v7; // rbp
long long result; // rax
v3 = a2[1] - *a2;
*(_QWORD *)(a1 + 16) = 0LL;
*(_OWORD *)a1 = 0LL;
if ( v3 )
{
if ( v3 > 0x7FFFFFFFFFFFFFFCLL )
{
std::__throw_bad_array_new_length();
return std::vector<int>::vector();
}
v4 = (_DWORD *)operator new(v3);
}
else
{
v4 = 0LL;
}
*(_QWORD *)(a1 + 16) = (char *)v4 + v3;
*(__m128i *)a1 = _mm_unpacklo_epi64((__m128i)(unsigned long long)v4, (__m128i)(unsigned long long)v4);
v5 = (_DWORD *)*a2;
v6 = a2[1] - *a2;
if ( v6 <= 4 )
{
v7 = a2[1] - *a2;
if ( v6 == 4 )
{
v7 = 4LL;
*v4 = *v5;
}
}
else
{
v7 = a2[1] - *a2;
v4 = memmove(v4, v5, v7);
}
result = a1;
*(_QWORD *)(a1 + 8) = (char *)v4 + v7;
return result;
} | func0:
ENDBR64
PUSH R12
PXOR XMM0,XMM0
MOV R12,RSI
PUSH RBP
PUSH RBX
MOV RBP,qword ptr [RSI + 0x8]
MOV RBX,RDI
SUB RBP,qword ptr [RSI]
MOV qword ptr [RDI + 0x10],0x0
MOVUPS xmmword ptr [RDI],XMM0
JZ 0x001016b8
MOV RAX,0x7ffffffffffffffc
CMP RAX,RBP
JC 0x001016d0
MOV RDI,RBP
CALL 0x00101130
MOV RCX,RAX
LAB_00101670:
MOVQ XMM0,RCX
ADD RBP,RCX
PUNPCKLQDQ XMM0,XMM0
MOV qword ptr [RBX + 0x10],RBP
MOVUPS xmmword ptr [RBX],XMM0
MOV RSI,qword ptr [R12]
MOV RAX,qword ptr [R12 + 0x8]
SUB RAX,RSI
CMP RAX,0x4
JLE 0x001016c0
MOV RDI,RCX
MOV RDX,RAX
MOV RBP,RAX
CALL 0x00101160
MOV RCX,RAX
LAB_001016a6:
ADD RCX,RBP
MOV RAX,RBX
MOV qword ptr [RBX + 0x8],RCX
POP RBX
POP RBP
POP R12
RET
LAB_001016b8:
XOR ECX,ECX
JMP 0x00101670
LAB_001016c0:
MOV RBP,RAX
JNZ 0x001016a6
MOV EAX,dword ptr [RSI]
MOV EBP,0x4
MOV dword ptr [RCX],EAX
JMP 0x001016a6
LAB_001016d0:
CALL 0x00101110
NOP word ptr CS:[RAX + RAX*0x1]
NOP | /* func0(std::vector<int, std::allocator<int> > const&) */
vector * func0(vector *param_1)
{
int4 *__src;
uint *__src_00;
int4 *__dest;
size_t __n;
vector *pvVar1;
vector *__n_00;
vector *pvVar2;
vector *extraout_RAX;
ulong uVar3;
long *in_RSI;
uVar3 = in_RSI[1] - *in_RSI;
*(int8 *)(param_1 + 0x10) = 0;
*(int (*) [16])param_1 = (int [16])0x0;
if (uVar3 == 0) {
__dest = (int4 *)0x0;
}
else {
if (0x7ffffffffffffffc < uVar3) {
std::__throw_bad_array_new_length();
uVar3 = in_RSI[1] - *in_RSI;
*(int8 *)(param_1 + 0x10) = 0;
*(int (*) [16])param_1 = (int [16])0x0;
if (uVar3 == 0) {
pvVar1 = (vector *)0x0;
}
else {
if (0x7ffffffffffffffc < uVar3) {
std::__throw_bad_array_new_length();
pvVar1 = *(vector **)param_1;
if (pvVar1 != (vector *)0x0) {
operator_delete(pvVar1,*(long *)(param_1 + 0x10) - (long)pvVar1);
return extraout_RAX;
}
return pvVar1;
}
pvVar1 = (vector *)operator_new(uVar3);
}
*(vector **)(param_1 + 0x10) = pvVar1 + uVar3;
*(vector **)param_1 = pvVar1;
*(vector **)(param_1 + 8) = pvVar1;
__src_00 = (uint *)*in_RSI;
__n_00 = (vector *)(in_RSI[1] - (long)__src_00);
if ((long)__n_00 < 5) {
pvVar2 = __n_00;
if (__n_00 == (vector *)0x4) {
pvVar2 = (vector *)(ulong)*__src_00;
__n_00 = (vector *)0x4;
*(uint *)pvVar1 = *__src_00;
}
}
else {
pvVar1 = (vector *)memmove(pvVar1,__src_00,(size_t)__n_00);
pvVar2 = pvVar1;
}
*(vector **)(param_1 + 8) = pvVar1 + (long)__n_00;
return pvVar2;
}
__dest = (int4 *)operator_new(uVar3);
}
*(ulong *)(param_1 + 0x10) = uVar3 + (long)__dest;
*(int4 **)param_1 = __dest;
*(int4 **)(param_1 + 8) = __dest;
__src = (int4 *)*in_RSI;
__n = in_RSI[1] - (long)__src;
if ((long)__n < 5) {
if (__n == 4) {
__n = 4;
*__dest = *__src;
}
}
else {
__dest = (int4 *)memmove(__dest,__src,__n);
}
*(size_t *)(param_1 + 8) = (long)__dest + __n;
return param_1;
} |
2,347 | func0 |
#include <vector>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& listx) {
return listx;
}
| int main() {
assert(func0({5, 10, 7, 4, 15, 3}) == std::vector<int>({5, 10, 7, 4, 15, 3}));
assert(func0({2, 4, 5, 6, 2, 3, 4, 4, 7}) == std::vector<int>({2, 4, 5, 6, 2, 3, 4, 4, 7}));
assert(func0({58, 44, 56}) == std::vector<int>({58, 44, 56}));
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %r12
pxor %xmm0,%xmm0
mov %rdi,%r12
push %rbp
mov %rsi,%rbp
push %rbx
mov 0x8(%rsi),%rbx
sub (%rsi),%rbx
movq $0x0,0x10(%rdi)
mov %rbx,%rax
movups %xmm0,(%rdi)
sar $0x2,%rax
je 16a0 <_Z5func0RKSt6vectorIiSaIiEE+0x90>
movabs $0x1fffffffffffffff,%rdx
cmp %rdx,%rax
ja 16a4 <_Z5func0RKSt6vectorIiSaIiEE+0x94>
mov %rbx,%rdi
callq 1140 <_Znwm@plt>
mov %rax,%rcx
movq %rcx,%xmm0
add %rcx,%rbx
punpcklqdq %xmm0,%xmm0
mov %rbx,0x10(%r12)
movups %xmm0,(%r12)
mov 0x8(%rbp),%rax
mov 0x0(%rbp),%rsi
mov %rax,%rbx
sub %rsi,%rbx
cmp %rsi,%rax
je 168e <_Z5func0RKSt6vectorIiSaIiEE+0x7e>
mov %rcx,%rdi
mov %rbx,%rdx
callq 1160 <memmove@plt>
mov %rax,%rcx
add %rbx,%rcx
mov %r12,%rax
pop %rbx
pop %rbp
mov %rcx,0x8(%r12)
pop %r12
retq
xchg %ax,%ax
xor %ecx,%ecx
jmp 1657 <_Z5func0RKSt6vectorIiSaIiEE+0x47>
callq 10e0 <_ZSt17__throw_bad_allocv@plt>
nopl 0x0(%rax)
| _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push r12
pxor xmm0, xmm0
mov r12, rsi
push rbp
push rbx
mov rbp, [rsi+8]
mov rbx, rdi
sub rbp, [rsi]
mov qword ptr [rdi+10h], 0
movups xmmword ptr [rdi], xmm0
jz short loc_16B8
mov rax, 7FFFFFFFFFFFFFFCh
cmp rax, rbp
jb short loc_16D0
mov rdi, rbp; unsigned __int64
call __Znwm; operator new(ulong)
mov rcx, rax
loc_1670:
movq xmm0, rcx
add rbp, rcx
punpcklqdq xmm0, xmm0
mov [rbx+10h], rbp
movups xmmword ptr [rbx], xmm0
mov rsi, [r12]; src
mov rax, [r12+8]
sub rax, rsi
cmp rax, 4
jle short loc_16C0
mov rdi, rcx; dest
mov rdx, rax; n
mov rbp, rax
call _memmove
mov rcx, rax
loc_16A6:
add rcx, rbp
mov rax, rbx
mov [rbx+8], rcx
pop rbx
pop rbp
pop r12
retn
loc_16B8:
xor ecx, ecx
jmp short loc_1670
loc_16C0:
mov rbp, rax
jnz short loc_16A6
mov eax, [rsi]
mov ebp, 4
mov [rcx], eax
jmp short loc_16A6
loc_16D0:
call __ZSt28__throw_bad_array_new_lengthv; std::__throw_bad_array_new_length(void)
nop word ptr [rax+rax+00000000h]
nop | long long func0(long long a1, _QWORD *a2)
{
unsigned long long v3; // rbp
_DWORD *v4; // rcx
_DWORD *v5; // rsi
long long v6; // rax
size_t v7; // rbp
long long result; // rax
v3 = a2[1] - *a2;
*(_QWORD *)(a1 + 16) = 0LL;
*(_OWORD *)a1 = 0LL;
if ( v3 )
{
if ( v3 > 0x7FFFFFFFFFFFFFFCLL )
{
std::__throw_bad_array_new_length();
return std::vector<int>::vector();
}
v4 = (_DWORD *)operator new(v3);
}
else
{
v4 = 0LL;
}
*(_QWORD *)(a1 + 16) = (char *)v4 + v3;
*(__m128i *)a1 = _mm_unpacklo_epi64((__m128i)(unsigned long long)v4, (__m128i)(unsigned long long)v4);
v5 = (_DWORD *)*a2;
v6 = a2[1] - *a2;
if ( v6 <= 4 )
{
v7 = a2[1] - *a2;
if ( v6 == 4 )
{
v7 = 4LL;
*v4 = *v5;
}
}
else
{
v7 = a2[1] - *a2;
v4 = memmove(v4, v5, v7);
}
result = a1;
*(_QWORD *)(a1 + 8) = (char *)v4 + v7;
return result;
} | func0:
ENDBR64
PUSH R12
PXOR XMM0,XMM0
MOV R12,RSI
PUSH RBP
PUSH RBX
MOV RBP,qword ptr [RSI + 0x8]
MOV RBX,RDI
SUB RBP,qword ptr [RSI]
MOV qword ptr [RDI + 0x10],0x0
MOVUPS xmmword ptr [RDI],XMM0
JZ 0x001016b8
MOV RAX,0x7ffffffffffffffc
CMP RAX,RBP
JC 0x001016d0
MOV RDI,RBP
CALL 0x00101130
MOV RCX,RAX
LAB_00101670:
MOVQ XMM0,RCX
ADD RBP,RCX
PUNPCKLQDQ XMM0,XMM0
MOV qword ptr [RBX + 0x10],RBP
MOVUPS xmmword ptr [RBX],XMM0
MOV RSI,qword ptr [R12]
MOV RAX,qword ptr [R12 + 0x8]
SUB RAX,RSI
CMP RAX,0x4
JLE 0x001016c0
MOV RDI,RCX
MOV RDX,RAX
MOV RBP,RAX
CALL 0x00101160
MOV RCX,RAX
LAB_001016a6:
ADD RCX,RBP
MOV RAX,RBX
MOV qword ptr [RBX + 0x8],RCX
POP RBX
POP RBP
POP R12
RET
LAB_001016b8:
XOR ECX,ECX
JMP 0x00101670
LAB_001016c0:
MOV RBP,RAX
JNZ 0x001016a6
MOV EAX,dword ptr [RSI]
MOV EBP,0x4
MOV dword ptr [RCX],EAX
JMP 0x001016a6
LAB_001016d0:
CALL 0x00101110
NOP word ptr CS:[RAX + RAX*0x1]
NOP | /* func0(std::vector<int, std::allocator<int> > const&) */
vector * func0(vector *param_1)
{
int4 *__src;
uint *__src_00;
int4 *__dest;
size_t __n;
vector *pvVar1;
vector *__n_00;
vector *pvVar2;
vector *extraout_RAX;
ulong uVar3;
long *in_RSI;
uVar3 = in_RSI[1] - *in_RSI;
*(int8 *)(param_1 + 0x10) = 0;
*(int (*) [16])param_1 = (int [16])0x0;
if (uVar3 == 0) {
__dest = (int4 *)0x0;
}
else {
if (0x7ffffffffffffffc < uVar3) {
std::__throw_bad_array_new_length();
uVar3 = in_RSI[1] - *in_RSI;
*(int8 *)(param_1 + 0x10) = 0;
*(int (*) [16])param_1 = (int [16])0x0;
if (uVar3 == 0) {
pvVar1 = (vector *)0x0;
}
else {
if (0x7ffffffffffffffc < uVar3) {
std::__throw_bad_array_new_length();
pvVar1 = *(vector **)param_1;
if (pvVar1 != (vector *)0x0) {
operator_delete(pvVar1,*(long *)(param_1 + 0x10) - (long)pvVar1);
return extraout_RAX;
}
return pvVar1;
}
pvVar1 = (vector *)operator_new(uVar3);
}
*(vector **)(param_1 + 0x10) = pvVar1 + uVar3;
*(vector **)param_1 = pvVar1;
*(vector **)(param_1 + 8) = pvVar1;
__src_00 = (uint *)*in_RSI;
__n_00 = (vector *)(in_RSI[1] - (long)__src_00);
if ((long)__n_00 < 5) {
pvVar2 = __n_00;
if (__n_00 == (vector *)0x4) {
pvVar2 = (vector *)(ulong)*__src_00;
__n_00 = (vector *)0x4;
*(uint *)pvVar1 = *__src_00;
}
}
else {
pvVar1 = (vector *)memmove(pvVar1,__src_00,(size_t)__n_00);
pvVar2 = pvVar1;
}
*(vector **)(param_1 + 8) = pvVar1 + (long)__n_00;
return pvVar2;
}
__dest = (int4 *)operator_new(uVar3);
}
*(ulong *)(param_1 + 0x10) = uVar3 + (long)__dest;
*(int4 **)param_1 = __dest;
*(int4 **)(param_1 + 8) = __dest;
__src = (int4 *)*in_RSI;
__n = in_RSI[1] - (long)__src;
if ((long)__n < 5) {
if (__n == 4) {
__n = 4;
*__dest = *__src;
}
}
else {
__dest = (int4 *)memmove(__dest,__src,__n);
}
*(size_t *)(param_1 + 8) = (long)__dest + __n;
return param_1;
} |
2,348 | func0 |
#include <iostream>
#include <vector>
#include <algorithm>
#include <assert.h>
| int func0(const std::vector<int>& nums) {
int diff = *max_element(nums.begin(), nums.end()) - *min_element(nums.begin(), nums.end());
return diff;
}
| int main() {
assert(func0({1,2,3,4}) == 3);
assert(func0({4,5,12}) == 8);
assert(func0({9,2,3}) == 7);
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %r12
push %rbx
sub $0x30,%rsp
mov %rdi,-0x38(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x38(%rbp),%rax
mov %rax,%rdi
callq 16f0 <_ZNKSt6vectorIiSaIiEE3endEv>
mov %rax,%rbx
mov -0x38(%rbp),%rax
mov %rax,%rdi
callq 1698 <_ZNKSt6vectorIiSaIiEE5beginEv>
mov %rbx,%rsi
mov %rax,%rdi
callq 1748 <_ZSt11max_elementIN9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEEET_S8_S8_>
mov %rax,-0x28(%rbp)
lea -0x28(%rbp),%rax
mov %rax,%rdi
callq 1776 <_ZNK9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEdeEv>
mov (%rax),%ebx
mov -0x38(%rbp),%rax
mov %rax,%rdi
callq 16f0 <_ZNKSt6vectorIiSaIiEE3endEv>
mov %rax,%r12
mov -0x38(%rbp),%rax
mov %rax,%rdi
callq 1698 <_ZNKSt6vectorIiSaIiEE5beginEv>
mov %r12,%rsi
mov %rax,%rdi
callq 178b <_ZSt11min_elementIN9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEEET_S8_S8_>
mov %rax,-0x20(%rbp)
lea -0x20(%rbp),%rax
mov %rax,%rdi
callq 1776 <_ZNK9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEdeEv>
mov (%rax),%eax
sub %eax,%ebx
mov %ebx,%eax
mov %eax,-0x2c(%rbp)
mov -0x2c(%rbp),%eax
mov -0x18(%rbp),%rdx
xor %fs:0x28,%rdx
je 1319 <_Z5func0RKSt6vectorIiSaIiEE+0xb0>
callq 1140 <__stack_chk_fail@plt>
add $0x30,%rsp
pop %rbx
pop %r12
pop %rbp
retq
| _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push rbp
mov rbp, rsp
push r12
push rbx
sub rsp, 30h
mov [rbp+var_38], rdi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_38]
mov rdi, rax
call _ZNKSt6vectorIiSaIiEE3endEv; std::vector<int>::end(void)
mov rbx, rax
mov rax, [rbp+var_38]
mov rdi, rax
call _ZNKSt6vectorIiSaIiEE5beginEv; std::vector<int>::begin(void)
mov rsi, rbx
mov rdi, rax
call _ZSt11max_elementIN9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEEET_S8_S8_; std::max_element<__gnu_cxx::__normal_iterator<int const*,std::vector<int>>>(__gnu_cxx::__normal_iterator<int const*,std::vector<int>>,__gnu_cxx::__normal_iterator<int const*,std::vector<int>>)
mov [rbp+var_28], rax
lea rax, [rbp+var_28]
mov rdi, rax
call _ZNK9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEdeEv; __gnu_cxx::__normal_iterator<int const*,std::vector<int>>::operator*(void)
mov ebx, [rax]
mov rax, [rbp+var_38]
mov rdi, rax
call _ZNKSt6vectorIiSaIiEE3endEv; std::vector<int>::end(void)
mov r12, rax
mov rax, [rbp+var_38]
mov rdi, rax
call _ZNKSt6vectorIiSaIiEE5beginEv; std::vector<int>::begin(void)
mov rsi, r12
mov rdi, rax
call _ZSt11min_elementIN9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEEET_S8_S8_; std::min_element<__gnu_cxx::__normal_iterator<int const*,std::vector<int>>>(__gnu_cxx::__normal_iterator<int const*,std::vector<int>>,__gnu_cxx::__normal_iterator<int const*,std::vector<int>>)
mov [rbp+var_20], rax
lea rax, [rbp+var_20]
mov rdi, rax
call _ZNK9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEdeEv; __gnu_cxx::__normal_iterator<int const*,std::vector<int>>::operator*(void)
mov eax, [rax]
mov edx, ebx
sub edx, eax
mov [rbp+var_2C], edx
mov eax, [rbp+var_2C]
mov rdx, [rbp+var_18]
sub rdx, fs:28h
jz short loc_12F9
call ___stack_chk_fail
loc_12F9:
add rsp, 30h
pop rbx
pop r12
pop rbp
retn | long long func0(long long a1)
{
long long v1; // rbx
long long v2; // rax
long long v3; // r12
long long v4; // rax
long long v6; // [rsp+18h] [rbp-28h] BYREF
_QWORD v7[4]; // [rsp+20h] [rbp-20h] BYREF
v7[1] = __readfsqword(0x28u);
v1 = std::vector<int>::end(a1);
v2 = std::vector<int>::begin(a1);
v6 = std::max_element<__gnu_cxx::__normal_iterator<int const*,std::vector<int>>>(v2, v1);
LODWORD(v1) = *(_DWORD *)__gnu_cxx::__normal_iterator<int const*,std::vector<int>>::operator*(&v6);
v3 = std::vector<int>::end(a1);
v4 = std::vector<int>::begin(a1);
v7[0] = std::min_element<__gnu_cxx::__normal_iterator<int const*,std::vector<int>>>(v4, v3);
return (unsigned int)(v1 - *(_DWORD *)__gnu_cxx::__normal_iterator<int const*,std::vector<int>>::operator*(v7));
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R12
PUSH RBX
SUB RSP,0x30
MOV qword ptr [RBP + -0x38],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RDI,RAX
CALL 0x0010168e
MOV RBX,RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RDI,RAX
CALL 0x00101642
MOV RSI,RBX
MOV RDI,RAX
CALL 0x001016de
MOV qword ptr [RBP + -0x28],RAX
LEA RAX,[RBP + -0x28]
MOV RDI,RAX
CALL 0x0010170c
MOV EBX,dword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x38]
MOV RDI,RAX
CALL 0x0010168e
MOV R12,RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RDI,RAX
CALL 0x00101642
MOV RSI,R12
MOV RDI,RAX
CALL 0x00101721
MOV qword ptr [RBP + -0x20],RAX
LEA RAX,[RBP + -0x20]
MOV RDI,RAX
CALL 0x0010170c
MOV EAX,dword ptr [RAX]
MOV EDX,EBX
SUB EDX,EAX
MOV dword ptr [RBP + -0x2c],EDX
MOV EAX,dword ptr [RBP + -0x2c]
MOV RDX,qword ptr [RBP + -0x18]
SUB RDX,qword ptr FS:[0x28]
JZ 0x001012f9
CALL 0x00101130
LAB_001012f9:
ADD RSP,0x30
POP RBX
POP R12
POP RBP
RET | /* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
int iVar1;
__normal_iterator _Var2;
__normal_iterator _Var3;
int4 extraout_var;
int *piVar4;
int4 extraout_var_00;
long in_FS_OFFSET;
int8 local_30;
int8 local_28;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
_Var2 = std::vector<int,std::allocator<int>>::end((vector<int,std::allocator<int>> *)param_1);
_Var3 = std::vector<int,std::allocator<int>>::begin((vector<int,std::allocator<int>> *)param_1);
_Var2 = std::max_element<__normal_iterator<int_const*,std::vector<int,std::allocator<int>>>>
(_Var3,_Var2);
local_30 = CONCAT44(extraout_var,_Var2);
piVar4 = (int *)__normal_iterator<int_const*,std::vector<int,std::allocator<int>>>::operator*
((__normal_iterator<int_const*,std::vector<int,std::allocator<int>>> *)
&local_30);
iVar1 = *piVar4;
_Var2 = std::vector<int,std::allocator<int>>::end((vector<int,std::allocator<int>> *)param_1);
_Var3 = std::vector<int,std::allocator<int>>::begin((vector<int,std::allocator<int>> *)param_1);
_Var2 = std::min_element<__normal_iterator<int_const*,std::vector<int,std::allocator<int>>>>
(_Var3,_Var2);
local_28 = CONCAT44(extraout_var_00,_Var2);
piVar4 = (int *)__normal_iterator<int_const*,std::vector<int,std::allocator<int>>>::operator*
((__normal_iterator<int_const*,std::vector<int,std::allocator<int>>> *)
&local_28);
if (local_20 != *(long *)(in_FS_OFFSET + 0x28)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return iVar1 - *piVar4;
} |
2,349 | func0 |
#include <iostream>
#include <vector>
#include <algorithm>
#include <assert.h>
| int func0(const std::vector<int>& nums) {
int diff = *max_element(nums.begin(), nums.end()) - *min_element(nums.begin(), nums.end());
return diff;
}
| int main() {
assert(func0({1,2,3,4}) == 3);
assert(func0({4,5,12}) == 8);
assert(func0({9,2,3}) == 7);
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
mov 0x8(%rdi),%r8
mov (%rdi),%rcx
cmp %r8,%rcx
je 128f <_Z5func0RKSt6vectorIiSaIiEE+0x46>
lea 0x4(%rcx),%rdx
cmp %rdx,%r8
je 1297 <_Z5func0RKSt6vectorIiSaIiEE+0x4e>
mov %rdx,%rax
mov %rcx,%rsi
mov (%rax),%edi
cmp %edi,(%rsi)
cmovl %rax,%rsi
add $0x4,%rax
cmp %rax,%r8
jne 1268 <_Z5func0RKSt6vectorIiSaIiEE+0x1f>
mov (%rsi),%eax
mov (%rcx),%esi
cmp %esi,(%rdx)
cmovl %rdx,%rcx
add $0x4,%rdx
cmp %rdx,%r8
jne 127b <_Z5func0RKSt6vectorIiSaIiEE+0x32>
sub (%rcx),%eax
retq
mov (%r8),%eax
mov %r8,%rcx
jmp 128c <_Z5func0RKSt6vectorIiSaIiEE+0x43>
mov (%rcx),%eax
jmp 128c <_Z5func0RKSt6vectorIiSaIiEE+0x43>
| _Z5func0RKSt6vectorIiSaIiEE:
endbr64
mov r8, [rdi+8]
mov rcx, [rdi]
cmp rcx, r8
jz short loc_1258
lea rdx, [rcx+4]
cmp r8, rdx
jz short loc_1254
mov rax, rdx
mov rsi, rcx
loc_1228:
mov edi, [rax]
cmp [rsi], edi
cmovl rsi, rax
add rax, 4
cmp rax, r8
jnz short loc_1228
mov eax, [rsi]
cmp r8, rdx
jz short loc_1251
loc_1240:
mov esi, [rcx]
cmp [rdx], esi
cmovl rcx, rdx
add rdx, 4
cmp rdx, r8
jnz short loc_1240
loc_1251:
sub eax, [rcx]
retn
loc_1254:
mov eax, [rcx]
jmp short loc_1251
loc_1258:
mov eax, [r8]
mov rcx, r8
jmp short loc_1251 | long long func0(int **a1)
{
int *v1; // r8
int *v2; // rcx
int *v3; // rdx
int *v4; // rax
int *v5; // rsi
int i; // eax
v1 = a1[1];
v2 = *a1;
if ( *a1 == v1 )
{
i = *v1;
v2 = a1[1];
}
else
{
v3 = v2 + 1;
if ( v1 == v2 + 1 )
{
i = *v2;
}
else
{
v4 = v2 + 1;
v5 = *a1;
do
{
if ( *v5 < *v4 )
v5 = v4;
++v4;
}
while ( v4 != v1 );
for ( i = *v5; v3 != v1; ++v3 )
{
if ( *v3 < *v2 )
v2 = v3;
}
}
}
return (unsigned int)(i - *v2);
} | func0:
ENDBR64
MOV R8,qword ptr [RDI + 0x8]
MOV RCX,qword ptr [RDI]
CMP RCX,R8
JZ 0x00101258
LEA RDX,[RCX + 0x4]
CMP R8,RDX
JZ 0x00101254
MOV RAX,RDX
MOV RSI,RCX
LAB_00101228:
MOV EDI,dword ptr [RAX]
CMP dword ptr [RSI],EDI
CMOVL RSI,RAX
ADD RAX,0x4
CMP RAX,R8
JNZ 0x00101228
MOV EAX,dword ptr [RSI]
CMP R8,RDX
JZ 0x00101251
LAB_00101240:
MOV ESI,dword ptr [RCX]
CMP dword ptr [RDX],ESI
CMOVL RCX,RDX
ADD RDX,0x4
CMP RDX,R8
JNZ 0x00101240
LAB_00101251:
SUB EAX,dword ptr [RCX]
RET
LAB_00101254:
MOV EAX,dword ptr [RCX]
JMP 0x00101251
LAB_00101258:
MOV EAX,dword ptr [R8]
MOV RCX,R8
JMP 0x00101251 | /* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
int *piVar1;
int iVar2;
int *piVar3;
int *piVar4;
int *piVar5;
int *piVar6;
piVar1 = *(int **)(param_1 + 8);
piVar4 = *(int **)param_1;
if (piVar4 == piVar1) {
iVar2 = *piVar1;
piVar4 = piVar1;
}
else {
piVar5 = piVar4 + 1;
piVar3 = piVar5;
piVar6 = piVar4;
if (piVar1 == piVar5) {
iVar2 = *piVar4;
}
else {
do {
if (*piVar6 < *piVar3) {
piVar6 = piVar3;
}
piVar3 = piVar3 + 1;
} while (piVar3 != piVar1);
iVar2 = *piVar6;
for (; piVar1 != piVar5; piVar5 = piVar5 + 1) {
if (*piVar5 < *piVar4) {
piVar4 = piVar5;
}
}
}
}
return iVar2 - *piVar4;
} |
2,350 | func0 |
#include <iostream>
#include <vector>
#include <algorithm>
#include <assert.h>
| int func0(const std::vector<int>& nums) {
int diff = *max_element(nums.begin(), nums.end()) - *min_element(nums.begin(), nums.end());
return diff;
}
| int main() {
assert(func0({1,2,3,4}) == 3);
assert(func0({4,5,12}) == 8);
assert(func0({9,2,3}) == 7);
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
mov (%rdi),%rdx
mov 0x8(%rdi),%r8
xor %eax,%eax
mov (%rdx),%esi
cmp %rdx,%r8
je 1472 <_Z5func0RKSt6vectorIiSaIiEE+0x52>
add $0x4,%rdx
cmp %rdx,%r8
je 1472 <_Z5func0RKSt6vectorIiSaIiEE+0x52>
mov %rdx,%rcx
mov %esi,%eax
nopw 0x0(%rax,%rax,1)
mov (%rcx),%edi
cmp %edi,%eax
cmovl %edi,%eax
add $0x4,%rcx
cmp %rcx,%r8
jne 1448 <_Z5func0RKSt6vectorIiSaIiEE+0x28>
nopl 0x0(%rax,%rax,1)
mov (%rdx),%ecx
cmp %ecx,%esi
cmovg %ecx,%esi
add $0x4,%rdx
cmp %rdx,%r8
jne 1460 <_Z5func0RKSt6vectorIiSaIiEE+0x40>
sub %esi,%eax
retq
nopw %cs:0x0(%rax,%rax,1)
nopl (%rax)
| _Z5func0RKSt6vectorIiSaIiEE:
endbr64
mov r8, [rdi+8]
mov rdi, [rdi]
xor eax, eax
cmp rdi, r8
jz locret_1412
lea r9, [rdi+4]
cmp r8, r9
jz locret_1412
mov r10, r8
mov edx, [rdi]
mov rcx, r9
mov rsi, r9
sub r10, r9
and r10d, 4
mov eax, edx
jz short loc_13C0
mov eax, [r9]
lea rsi, [rdi+8]
cmp edx, eax
cmovge eax, edx
cmp rsi, r8
jz short loc_13D8
nop word ptr [rax+rax+00h]
loc_13C0:
mov edi, [rsi]
cmp eax, edi
cmovl eax, edi
mov edi, [rsi+4]
cmp eax, edi
cmovl eax, edi
add rsi, 8
cmp rsi, r8
jnz short loc_13C0
loc_13D8:
mov rsi, r8
sub rsi, r9
and esi, 4
jz short loc_13F8
mov ecx, [r9]
cmp edx, ecx
cmovg edx, ecx
lea rcx, [r9+4]
cmp rcx, r8
jz short loc_1410
nop dword ptr [rax+00h]
loc_13F8:
mov esi, [rcx]
cmp edx, esi
cmovg edx, esi
mov esi, [rcx+4]
cmp edx, esi
cmovg edx, esi
add rcx, 8
cmp rcx, r8
jnz short loc_13F8
loc_1410:
sub eax, edx
locret_1412:
retn | long long func0(int **a1)
{
int *v1; // r8
int *v2; // rdi
long long result; // rax
int *v4; // r9
int v5; // edx
int *v6; // rcx
int *v7; // rsi
int v8; // eax
v1 = a1[1];
v2 = *a1;
result = 0LL;
if ( v2 != v1 )
{
v4 = v2 + 1;
if ( v1 != v2 + 1 )
{
v5 = *v2;
v6 = v2 + 1;
v7 = v2 + 1;
v8 = *v2;
if ( (((_BYTE)v1 - (_BYTE)v4) & 4) == 0 )
goto LABEL_24;
v8 = *v4;
v7 = v2 + 2;
if ( v5 >= *v4 )
v8 = *v2;
if ( v7 != v1 )
{
LABEL_24:
do
{
if ( v8 < *v7 )
v8 = *v7;
if ( v8 < v7[1] )
v8 = v7[1];
v7 += 2;
}
while ( v7 != v1 );
}
if ( (((_BYTE)v1 - (_BYTE)v4) & 4) == 0 )
goto LABEL_25;
if ( v5 > *v4 )
v5 = *v4;
v6 = v2 + 2;
if ( v2 + 2 != v1 )
{
LABEL_25:
do
{
if ( v5 > *v6 )
v5 = *v6;
if ( v5 > v6[1] )
v5 = v6[1];
v6 += 2;
}
while ( v6 != v1 );
}
return (unsigned int)(v8 - v5);
}
}
return result;
} | func0:
ENDBR64
MOV R8,qword ptr [RDI + 0x8]
MOV RDI,qword ptr [RDI]
XOR EAX,EAX
CMP RDI,R8
JZ 0x00101412
LEA R9,[RDI + 0x4]
CMP R8,R9
JZ 0x00101412
MOV R10,R8
MOV EDX,dword ptr [RDI]
MOV RCX,R9
MOV RSI,R9
SUB R10,R9
AND R10D,0x4
MOV EAX,EDX
JZ 0x001013c0
MOV EAX,dword ptr [R9]
LEA RSI,[RDI + 0x8]
CMP EDX,EAX
CMOVGE EAX,EDX
CMP RSI,R8
JZ 0x001013d8
NOP word ptr [RAX + RAX*0x1]
LAB_001013c0:
MOV EDI,dword ptr [RSI]
CMP EAX,EDI
CMOVL EAX,EDI
MOV EDI,dword ptr [RSI + 0x4]
CMP EAX,EDI
CMOVL EAX,EDI
ADD RSI,0x8
CMP RSI,R8
JNZ 0x001013c0
LAB_001013d8:
MOV RSI,R8
SUB RSI,R9
AND ESI,0x4
JZ 0x001013f8
MOV ECX,dword ptr [R9]
CMP EDX,ECX
CMOVG EDX,ECX
LEA RCX,[R9 + 0x4]
CMP RCX,R8
JZ 0x00101410
NOP dword ptr [RAX]
LAB_001013f8:
MOV ESI,dword ptr [RCX]
CMP EDX,ESI
CMOVG EDX,ESI
MOV ESI,dword ptr [RCX + 0x4]
CMP EDX,ESI
CMOVG EDX,ESI
ADD RCX,0x8
CMP RCX,R8
JNZ 0x001013f8
LAB_00101410:
SUB EAX,EDX
LAB_00101412:
RET | /* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
int iVar1;
int *piVar2;
int *piVar3;
int iVar4;
int *piVar5;
int iVar6;
int *piVar7;
piVar2 = *(int **)(param_1 + 8);
piVar3 = *(int **)param_1;
iVar4 = 0;
if ((piVar3 != piVar2) && (piVar5 = piVar3 + 1, piVar2 != piVar5)) {
iVar6 = *piVar3;
piVar7 = piVar5;
iVar4 = iVar6;
if (((int)piVar2 - (int)piVar5 & 4U) == 0) goto LAB_001013c0;
iVar4 = *piVar5;
piVar7 = piVar3;
if (*piVar5 <= iVar6) {
iVar4 = iVar6;
}
while (piVar7 = piVar7 + 2, piVar7 != piVar2) {
LAB_001013c0:
if (iVar4 < *piVar7) {
iVar4 = *piVar7;
}
if (iVar4 < piVar7[1]) {
iVar4 = piVar7[1];
}
}
if (((int)piVar2 - (int)piVar5 & 4U) == 0) goto LAB_001013f8;
iVar1 = *piVar5;
piVar5 = piVar3;
if (iVar1 < iVar6) {
iVar6 = iVar1;
}
while (piVar5 = piVar5 + 2, piVar5 != piVar2) {
LAB_001013f8:
if (*piVar5 < iVar6) {
iVar6 = *piVar5;
}
if (piVar5[1] < iVar6) {
iVar6 = piVar5[1];
}
}
iVar4 = iVar4 - iVar6;
}
return iVar4;
} |
2,351 | func0 |
#include <iostream>
#include <vector>
#include <algorithm>
#include <assert.h>
| int func0(const std::vector<int>& nums) {
int diff = *max_element(nums.begin(), nums.end()) - *min_element(nums.begin(), nums.end());
return diff;
}
| int main() {
assert(func0({1,2,3,4}) == 3);
assert(func0({4,5,12}) == 8);
assert(func0({9,2,3}) == 7);
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
mov 0x8(%rdi),%r11
mov (%rdi),%r8
xor %eax,%eax
mov (%r8),%edi
cmp %r8,%r11
je 15e8 <_Z5func0RKSt6vectorIiSaIiEE+0x1d8>
lea 0x4(%r8),%r9
cmp %r9,%r11
je 15f0 <_Z5func0RKSt6vectorIiSaIiEE+0x1e0>
lea -0x8(%r11),%rcx
push %rbx
mov %r8,%rdx
sub %r8,%rcx
mov %rcx,%r10
shr $0x2,%r10
add $0x1,%r10
cmp $0x8,%rcx
jbe 15f1 <_Z5func0RKSt6vectorIiSaIiEE+0x1e1>
mov %r10,%rsi
movd %edi,%xmm5
mov %r8,%rax
shr $0x2,%rsi
pshufd $0x0,%xmm5,%xmm0
shl $0x4,%rsi
movdqa %xmm0,%xmm3
add %r8,%rsi
nopl 0x0(%rax)
movdqu 0x4(%rax),%xmm1
add $0x10,%rax
movdqa %xmm1,%xmm2
pcmpgtd %xmm3,%xmm2
pand %xmm2,%xmm1
pandn %xmm3,%xmm2
movdqa %xmm2,%xmm3
por %xmm1,%xmm3
cmp %rsi,%rax
jne 1478 <_Z5func0RKSt6vectorIiSaIiEE+0x68>
movdqa %xmm3,%xmm1
mov %r10,%rbx
psrldq $0x8,%xmm1
and $0xfffffffffffffffc,%rbx
movdqa %xmm1,%xmm2
lea (%r9,%rbx,4),%rsi
pcmpgtd %xmm3,%xmm2
pand %xmm2,%xmm1
pandn %xmm3,%xmm2
por %xmm2,%xmm1
movdqa %xmm1,%xmm3
psrldq $0x4,%xmm3
movdqa %xmm3,%xmm2
pcmpgtd %xmm1,%xmm2
pand %xmm2,%xmm3
pandn %xmm1,%xmm2
por %xmm3,%xmm2
movd %xmm2,%eax
cmp %rbx,%r10
je 1528 <_Z5func0RKSt6vectorIiSaIiEE+0x118>
mov (%rsi),%ebx
cmp %ebx,%eax
cmovl %ebx,%eax
lea 0x4(%rsi),%rbx
cmp %rbx,%r11
je 1515 <_Z5func0RKSt6vectorIiSaIiEE+0x105>
mov 0x4(%rsi),%ebx
cmp %ebx,%eax
cmovl %ebx,%eax
lea 0x8(%rsi),%rbx
cmp %rbx,%r11
je 1515 <_Z5func0RKSt6vectorIiSaIiEE+0x105>
mov 0x8(%rsi),%esi
cmp %esi,%eax
cmovl %esi,%eax
cmp $0x8,%rcx
jbe 15b1 <_Z5func0RKSt6vectorIiSaIiEE+0x1a1>
movd %edi,%xmm6
pshufd $0x0,%xmm6,%xmm0
mov %r10,%rcx
shr $0x2,%rcx
shl $0x4,%rcx
add %r8,%rcx
nopw %cs:0x0(%rax,%rax,1)
movdqu 0x4(%rdx),%xmm1
movdqu 0x4(%rdx),%xmm4
add $0x10,%rdx
pcmpgtd %xmm0,%xmm1
pand %xmm1,%xmm0
pandn %xmm4,%xmm1
por %xmm1,%xmm0
cmp %rdx,%rcx
jne 1540 <_Z5func0RKSt6vectorIiSaIiEE+0x130>
movdqa %xmm0,%xmm2
mov %r10,%rdx
psrldq $0x8,%xmm2
and $0xfffffffffffffffc,%rdx
movdqa %xmm2,%xmm1
lea (%r9,%rdx,4),%r9
pcmpgtd %xmm0,%xmm1
pand %xmm1,%xmm0
pandn %xmm2,%xmm1
por %xmm1,%xmm0
movdqa %xmm0,%xmm2
psrldq $0x4,%xmm2
movdqa %xmm2,%xmm1
pcmpgtd %xmm0,%xmm1
pand %xmm1,%xmm0
pandn %xmm2,%xmm1
por %xmm1,%xmm0
movd %xmm0,%edi
cmp %r10,%rdx
je 15dd <_Z5func0RKSt6vectorIiSaIiEE+0x1cd>
mov (%r9),%edx
cmp %edx,%edi
cmovg %edx,%edi
lea 0x4(%r9),%rdx
cmp %rdx,%r11
je 15dd <_Z5func0RKSt6vectorIiSaIiEE+0x1cd>
mov 0x4(%r9),%edx
cmp %edx,%edi
cmovg %edx,%edi
lea 0x8(%r9),%rdx
cmp %rdx,%r11
je 15dd <_Z5func0RKSt6vectorIiSaIiEE+0x1cd>
mov 0x8(%r9),%edx
cmp %edx,%edi
cmovg %edx,%edi
sub %edi,%eax
pop %rbx
retq
nopl 0x0(%rax)
retq
nopl 0x0(%rax)
retq
mov %edi,%eax
mov %r9,%rsi
jmpq 14ec <_Z5func0RKSt6vectorIiSaIiEE+0xdc>
nopl 0x0(%rax,%rax,1)
| _Z5func0RKSt6vectorIiSaIiEE:
endbr64
mov r10, [rdi+8]
mov rcx, [rdi]
xor eax, eax
cmp rcx, r10
jz locret_1548
lea r8, [rcx+4]
cmp r10, r8
jz locret_1548
lea r11, [r10-8]
push rbx
mov rdx, rcx
mov edi, [rcx]
sub r11, rcx
mov r9, r11
shr r9, 2
add r9, 1
cmp r11, 8
jbe loc_1549
mov rsi, r9
movd xmm5, edi
mov rax, rcx
shr rsi, 2
pshufd xmm0, xmm5, 0
shl rsi, 4
movdqa xmm3, xmm0
add rsi, rcx
nop dword ptr [rax+rax+00h]
loc_13D8:
movdqu xmm1, xmmword ptr [rax+4]
add rax, 10h
movdqa xmm2, xmm1
pcmpgtd xmm2, xmm3
pand xmm1, xmm2
pandn xmm2, xmm3
movdqa xmm3, xmm2
por xmm3, xmm1
cmp rax, rsi
jnz short loc_13D8
movdqa xmm2, xmm3
mov rsi, r9
psrldq xmm2, 8
and rsi, 0FFFFFFFFFFFFFFFCh
movdqa xmm1, xmm2
lea rsi, [r8+rsi*4]
pcmpgtd xmm1, xmm3
pand xmm2, xmm1
pandn xmm1, xmm3
por xmm1, xmm2
movdqa xmm3, xmm1
psrldq xmm3, 4
movdqa xmm2, xmm3
pcmpgtd xmm2, xmm1
pand xmm3, xmm2
pandn xmm2, xmm1
por xmm2, xmm3
movd eax, xmm2
test r9b, 3
jz short loc_1489
loc_144D:
mov ebx, [rsi]
cmp eax, ebx
cmovl eax, ebx
lea rbx, [rsi+4]
cmp r10, rbx
jz short loc_1476
mov ebx, [rsi+4]
cmp eax, ebx
cmovl eax, ebx
lea rbx, [rsi+8]
cmp r10, rbx
jz short loc_1476
mov esi, [rsi+8]
cmp eax, esi
cmovl eax, esi
loc_1476:
cmp r11, 8
jbe loc_1512
movd xmm6, edi
pshufd xmm0, xmm6, 0
loc_1489:
mov rsi, r9
shr rsi, 2
shl rsi, 4
add rcx, rsi
nop word ptr [rax+rax+00000000h]
loc_14A0:
movdqu xmm1, xmmword ptr [rdx+4]
movdqu xmm4, xmmword ptr [rdx+4]
add rdx, 10h
pcmpgtd xmm1, xmm0
pand xmm0, xmm1
pandn xmm1, xmm4
por xmm0, xmm1
cmp rdx, rcx
jnz short loc_14A0
movdqa xmm2, xmm0
mov rdx, r9
psrldq xmm2, 8
and rdx, 0FFFFFFFFFFFFFFFCh
and r9d, 3
movdqa xmm1, xmm2
lea r8, [r8+rdx*4]
pcmpgtd xmm1, xmm0
pand xmm0, xmm1
pandn xmm1, xmm2
por xmm0, xmm1
movdqa xmm2, xmm0
psrldq xmm2, 4
movdqa xmm1, xmm2
pcmpgtd xmm1, xmm0
pand xmm0, xmm1
pandn xmm1, xmm2
por xmm1, xmm0
movd edi, xmm1
jz short loc_153E
loc_1512:
mov edx, [r8]
cmp edi, edx
cmovg edi, edx
lea rdx, [r8+4]
cmp r10, rdx
jz short loc_153E
mov edx, [r8+4]
cmp edi, edx
cmovg edi, edx
lea rdx, [r8+8]
cmp r10, rdx
jz short loc_153E
mov edx, [r8+8]
cmp edi, edx
cmovg edi, edx
loc_153E:
sub eax, edi
pop rbx
retn
locret_1548:
retn
loc_1549:
mov eax, edi
mov rsi, r8
jmp loc_144D | long long func0(signed int **a1)
{
signed int *v1; // r10
signed int *v2; // rcx
long long result; // rax
signed int *v4; // r8
signed int *v5; // rdx
signed int v6; // edi
unsigned long long v7; // r11
unsigned long long v8; // r9
signed int *v9; // rax
__m128i v10; // xmm0
__m128i v11; // xmm3
__m128i v12; // xmm1
__m128i v13; // xmm2
__m128i v14; // xmm2
signed int *v15; // rsi
__m128i v16; // xmm1
__m128i v17; // xmm1
__m128i v18; // xmm3
__m128i v19; // xmm2
int v20; // eax
int v21; // esi
signed int *v22; // rcx
__m128i v23; // xmm1
__m128i v24; // xmm4
__m128i v25; // xmm1
__m128i v26; // xmm2
__m128i v27; // xmm1
__m128i v28; // xmm0
__m128i v29; // xmm2
__m128i v30; // xmm1
v1 = a1[1];
v2 = *a1;
result = 0LL;
if ( *a1 != v1 )
{
v4 = v2 + 1;
if ( v1 != v2 + 1 )
{
v5 = *a1;
v6 = *v2;
v7 = (char *)(v1 - 2) - (char *)v2;
v8 = (v7 >> 2) + 1;
if ( v7 <= 8 )
{
v20 = *v2;
v15 = v2 + 1;
}
else
{
v9 = v2;
v10 = _mm_shuffle_epi32(_mm_cvtsi32_si128(v6), 0);
v11 = v10;
do
{
v12 = _mm_loadu_si128((const __m128i *)(v9 + 1));
v9 += 4;
v13 = _mm_cmpgt_epi32(v12, v11);
v11 = _mm_or_si128(_mm_andnot_si128(v13, v11), _mm_and_si128(v12, v13));
}
while ( v9 != &v2[4 * (v8 >> 2)] );
v14 = _mm_srli_si128(v11, 8);
v15 = &v4[v8 & 0xFFFFFFFFFFFFFFFCLL];
v16 = _mm_cmpgt_epi32(v14, v11);
v17 = _mm_or_si128(_mm_andnot_si128(v16, v11), _mm_and_si128(v14, v16));
v18 = _mm_srli_si128(v17, 4);
v19 = _mm_cmpgt_epi32(v18, v17);
v20 = _mm_cvtsi128_si32(_mm_or_si128(_mm_andnot_si128(v19, v17), _mm_and_si128(v18, v19)));
if ( (v8 & 3) == 0 )
goto LABEL_17;
}
if ( v20 < *v15 )
v20 = *v15;
if ( v1 != v15 + 1 )
{
if ( v20 < v15[1] )
v20 = v15[1];
if ( v1 != v15 + 2 )
{
v21 = v15[2];
if ( v20 < v21 )
v20 = v21;
}
}
if ( v7 <= 8 )
goto LABEL_20;
v10 = _mm_shuffle_epi32(_mm_cvtsi32_si128(v6), 0);
LABEL_17:
v22 = &v2[4 * (v8 >> 2)];
do
{
v23 = _mm_loadu_si128((const __m128i *)(v5 + 1));
v24 = v23;
v5 += 4;
v25 = _mm_cmpgt_epi32(v23, v10);
v10 = _mm_or_si128(_mm_and_si128(v10, v25), _mm_andnot_si128(v25, v24));
}
while ( v5 != v22 );
v26 = _mm_srli_si128(v10, 8);
v4 += v8 & 0xFFFFFFFFFFFFFFFCLL;
v27 = _mm_cmpgt_epi32(v26, v10);
v28 = _mm_or_si128(_mm_and_si128(v10, v27), _mm_andnot_si128(v27, v26));
v29 = _mm_srli_si128(v28, 4);
v30 = _mm_cmpgt_epi32(v29, v28);
v6 = _mm_cvtsi128_si32(_mm_or_si128(_mm_andnot_si128(v30, v29), _mm_and_si128(v28, v30)));
if ( (v8 & 3) == 0 )
return (unsigned int)(v20 - v6);
LABEL_20:
if ( v6 > *v4 )
v6 = *v4;
if ( v1 != v4 + 1 )
{
if ( v6 > v4[1] )
v6 = v4[1];
if ( v1 != v4 + 2 && v6 > v4[2] )
v6 = v4[2];
}
return (unsigned int)(v20 - v6);
}
}
return result;
} | func0:
ENDBR64
MOV R10,qword ptr [RDI + 0x8]
MOV RCX,qword ptr [RDI]
XOR EAX,EAX
CMP RCX,R10
JZ 0x00101548
LEA R8,[RCX + 0x4]
CMP R10,R8
JZ 0x00101548
LEA R11,[R10 + -0x8]
PUSH RBX
MOV RDX,RCX
MOV EDI,dword ptr [RCX]
SUB R11,RCX
MOV R9,R11
SHR R9,0x2
ADD R9,0x1
CMP R11,0x8
JBE 0x00101549
MOV RSI,R9
MOVD XMM5,EDI
MOV RAX,RCX
SHR RSI,0x2
PSHUFD XMM0,XMM5,0x0
SHL RSI,0x4
MOVDQA XMM3,XMM0
ADD RSI,RCX
NOP dword ptr [RAX + RAX*0x1]
LAB_001013d8:
MOVDQU XMM1,xmmword ptr [RAX + 0x4]
ADD RAX,0x10
MOVDQA XMM2,XMM1
PCMPGTD XMM2,XMM3
PAND XMM1,XMM2
PANDN XMM2,XMM3
MOVDQA XMM3,XMM2
POR XMM3,XMM1
CMP RAX,RSI
JNZ 0x001013d8
MOVDQA XMM2,XMM3
MOV RSI,R9
PSRLDQ XMM2,0x8
AND RSI,-0x4
MOVDQA XMM1,XMM2
LEA RSI,[R8 + RSI*0x4]
PCMPGTD XMM1,XMM3
PAND XMM2,XMM1
PANDN XMM1,XMM3
POR XMM1,XMM2
MOVDQA XMM3,XMM1
PSRLDQ XMM3,0x4
MOVDQA XMM2,XMM3
PCMPGTD XMM2,XMM1
PAND XMM3,XMM2
PANDN XMM2,XMM1
POR XMM2,XMM3
MOVD EAX,XMM2
TEST R9B,0x3
JZ 0x00101489
LAB_0010144d:
MOV EBX,dword ptr [RSI]
CMP EAX,EBX
CMOVL EAX,EBX
LEA RBX,[RSI + 0x4]
CMP R10,RBX
JZ 0x00101476
MOV EBX,dword ptr [RSI + 0x4]
CMP EAX,EBX
CMOVL EAX,EBX
LEA RBX,[RSI + 0x8]
CMP R10,RBX
JZ 0x00101476
MOV ESI,dword ptr [RSI + 0x8]
CMP EAX,ESI
CMOVL EAX,ESI
LAB_00101476:
CMP R11,0x8
JBE 0x00101512
MOVD XMM6,EDI
PSHUFD XMM0,XMM6,0x0
LAB_00101489:
MOV RSI,R9
SHR RSI,0x2
SHL RSI,0x4
ADD RCX,RSI
NOP word ptr [RAX + RAX*0x1]
LAB_001014a0:
MOVDQU XMM1,xmmword ptr [RDX + 0x4]
MOVDQU XMM4,xmmword ptr [RDX + 0x4]
ADD RDX,0x10
PCMPGTD XMM1,XMM0
PAND XMM0,XMM1
PANDN XMM1,XMM4
POR XMM0,XMM1
CMP RDX,RCX
JNZ 0x001014a0
MOVDQA XMM2,XMM0
MOV RDX,R9
PSRLDQ XMM2,0x8
AND RDX,-0x4
AND R9D,0x3
MOVDQA XMM1,XMM2
LEA R8,[R8 + RDX*0x4]
PCMPGTD XMM1,XMM0
PAND XMM0,XMM1
PANDN XMM1,XMM2
POR XMM0,XMM1
MOVDQA XMM2,XMM0
PSRLDQ XMM2,0x4
MOVDQA XMM1,XMM2
PCMPGTD XMM1,XMM0
PAND XMM0,XMM1
PANDN XMM1,XMM2
POR XMM1,XMM0
MOVD EDI,XMM1
JZ 0x0010153e
LAB_00101512:
MOV EDX,dword ptr [R8]
CMP EDI,EDX
CMOVG EDI,EDX
LEA RDX,[R8 + 0x4]
CMP R10,RDX
JZ 0x0010153e
MOV EDX,dword ptr [R8 + 0x4]
CMP EDI,EDX
CMOVG EDI,EDX
LEA RDX,[R8 + 0x8]
CMP R10,RDX
JZ 0x0010153e
MOV EDX,dword ptr [R8 + 0x8]
CMP EDI,EDX
CMOVG EDI,EDX
LAB_0010153e:
SUB EAX,EDI
POP RBX
RET
LAB_00101548:
RET
LAB_00101549:
MOV EAX,EDI
MOV RSI,R8
JMP 0x0010144d | /* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
uint *puVar1;
uint *puVar2;
uint *puVar3;
uint *puVar4;
uint *puVar5;
uint *puVar6;
uint *puVar7;
uint *puVar8;
uint *puVar9;
uint uVar10;
uint *puVar11;
uint *puVar12;
uint uVar13;
uint *puVar14;
ulong uVar15;
ulong uVar16;
uint uVar17;
uint uVar18;
uint uVar19;
uint uVar20;
uint uVar21;
uint uVar22;
uint uVar23;
puVar2 = *(uint **)(param_1 + 8);
puVar12 = *(uint **)param_1;
if ((puVar12 == puVar2) || (puVar14 = puVar12 + 1, puVar2 == puVar14)) {
return 0;
}
uVar13 = *puVar12;
uVar16 = (long)puVar2 + (-8 - (long)puVar12);
uVar15 = (uVar16 >> 2) + 1;
puVar11 = puVar14;
uVar10 = uVar13;
if (uVar16 < 9) {
LAB_0010144d:
if ((int)uVar10 < (int)*puVar11) {
uVar10 = *puVar11;
}
if (puVar2 != puVar11 + 1) {
if ((int)uVar10 < (int)puVar11[1]) {
uVar10 = puVar11[1];
}
if ((puVar2 != puVar11 + 2) && ((int)uVar10 < (int)puVar11[2])) {
uVar10 = puVar11[2];
}
}
if (8 < uVar16) goto LAB_00101489;
}
else {
puVar11 = puVar12;
uVar22 = uVar13;
uVar18 = uVar13;
uVar23 = uVar13;
do {
puVar1 = puVar11 + 1;
puVar3 = puVar11 + 2;
puVar4 = puVar11 + 3;
puVar5 = puVar11 + 4;
puVar11 = puVar11 + 4;
uVar17 = -(uint)((int)uVar10 < (int)*puVar1);
uVar19 = -(uint)((int)uVar22 < (int)*puVar3);
uVar20 = -(uint)((int)uVar18 < (int)*puVar4);
uVar21 = -(uint)((int)uVar23 < (int)*puVar5);
uVar10 = ~uVar17 & uVar10 | *puVar1 & uVar17;
uVar22 = ~uVar19 & uVar22 | *puVar3 & uVar19;
uVar18 = ~uVar20 & uVar18 | *puVar4 & uVar20;
uVar23 = ~uVar21 & uVar23 | *puVar5 & uVar21;
} while (puVar11 != puVar12 + (uVar15 & 0xfffffffffffffffc));
uVar10 = ~-(uint)((int)uVar10 < (int)uVar18) & uVar10 |
uVar18 & -(uint)((int)uVar10 < (int)uVar18);
uVar22 = ~-(uint)((int)uVar22 < (int)uVar23) & uVar22 |
uVar23 & -(uint)((int)uVar22 < (int)uVar23);
uVar18 = -(uint)((int)uVar10 < (int)uVar22);
uVar10 = ~uVar18 & uVar10 | uVar22 & uVar18;
puVar11 = puVar14 + (uVar15 & 0xfffffffffffffffc);
if ((uVar15 & 3) != 0) goto LAB_0010144d;
LAB_00101489:
puVar11 = puVar12 + (uVar15 & 0xfffffffffffffffc);
uVar22 = uVar13;
uVar18 = uVar13;
uVar23 = uVar13;
do {
puVar1 = puVar12 + 1;
puVar7 = puVar12 + 2;
puVar8 = puVar12 + 3;
puVar9 = puVar12 + 4;
puVar3 = puVar12 + 1;
puVar4 = puVar12 + 2;
puVar5 = puVar12 + 3;
puVar6 = puVar12 + 4;
puVar12 = puVar12 + 4;
uVar13 = uVar13 & -(uint)((int)uVar13 < (int)*puVar1) |
~-(uint)((int)uVar13 < (int)*puVar1) & *puVar3;
uVar22 = uVar22 & -(uint)((int)uVar22 < (int)*puVar7) |
~-(uint)((int)uVar22 < (int)*puVar7) & *puVar4;
uVar18 = uVar18 & -(uint)((int)uVar18 < (int)*puVar8) |
~-(uint)((int)uVar18 < (int)*puVar8) & *puVar5;
uVar23 = uVar23 & -(uint)((int)uVar23 < (int)*puVar9) |
~-(uint)((int)uVar23 < (int)*puVar9) & *puVar6;
} while (puVar12 != puVar11);
puVar14 = puVar14 + (uVar15 & 0xfffffffffffffffc);
uVar13 = uVar13 & -(uint)((int)uVar13 < (int)uVar18) |
~-(uint)((int)uVar13 < (int)uVar18) & uVar18;
uVar22 = uVar22 & -(uint)((int)uVar22 < (int)uVar23) |
~-(uint)((int)uVar22 < (int)uVar23) & uVar23;
uVar18 = -(uint)((int)uVar13 < (int)uVar22);
uVar13 = ~uVar18 & uVar22 | uVar13 & uVar18;
if ((uVar15 & 3) == 0) goto LAB_0010153e;
}
if ((int)*puVar14 < (int)uVar13) {
uVar13 = *puVar14;
}
if (puVar2 != puVar14 + 1) {
if ((int)puVar14[1] < (int)uVar13) {
uVar13 = puVar14[1];
}
if ((puVar2 != puVar14 + 2) && ((int)puVar14[2] < (int)uVar13)) {
uVar13 = puVar14[2];
}
}
LAB_0010153e:
return uVar10 - uVar13;
} |
2,352 | func0 | #include <vector>
#include <assert.h>
| std::vector<int> func0(int a, int b) {
std::vector<int> lists;
for (int i = a; i <= b; i++) {
int j = 1;
while (j * j <= i) {
if (j * j == i) {
lists.push_back(i);
}
j++;
}
}
return lists;
}
| int main() {
assert(func0(1, 30) == std::vector<int>({1, 4, 9, 16, 25}));
assert(func0(50, 100) == std::vector<int>({64, 81, 100}));
assert(func0(100, 200) == std::vector<int>({100, 121, 144, 169, 196}));
return 0;
}
| O0 | cpp | func0(int, int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x28,%rsp
mov %rdi,-0x28(%rbp)
mov %esi,-0x2c(%rbp)
mov %edx,-0x30(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x28(%rbp),%rax
mov %rax,%rdi
callq 1758 <_ZNSt6vectorIiSaIiEEC1Ev>
mov -0x2c(%rbp),%eax
mov %eax,-0x20(%rbp)
mov -0x20(%rbp),%eax
cmp %eax,-0x30(%rbp)
jl 12f0 <_Z5func0ii+0xa7>
movl $0x1,-0x1c(%rbp)
mov -0x1c(%rbp),%eax
imul %eax,%eax
mov %eax,%edx
mov -0x20(%rbp),%eax
cmp %eax,%edx
jg 12c7 <_Z5func0ii+0x7e>
mov -0x1c(%rbp),%eax
imul %eax,%eax
mov %eax,%edx
mov -0x20(%rbp),%eax
cmp %eax,%edx
jne 12c1 <_Z5func0ii+0x78>
lea -0x20(%rbp),%rdx
mov -0x28(%rbp),%rax
mov %rdx,%rsi
mov %rax,%rdi
callq 185e <_ZNSt6vectorIiSaIiEE9push_backERKi>
addl $0x1,-0x1c(%rbp)
jmp 1290 <_Z5func0ii+0x47>
mov -0x20(%rbp),%eax
add $0x1,%eax
mov %eax,-0x20(%rbp)
jmp 1281 <_Z5func0ii+0x38>
endbr64
mov %rax,%rbx
mov -0x28(%rbp),%rax
mov %rax,%rdi
callq 1816 <_ZNSt6vectorIiSaIiEED1Ev>
mov %rbx,%rax
mov %rax,%rdi
callq 1150 <_Unwind_Resume@plt>
mov -0x18(%rbp),%rax
xor %fs:0x28,%rax
je 1305 <_Z5func0ii+0xbc>
callq 1130 <__stack_chk_fail@plt>
mov -0x28(%rbp),%rax
add $0x28,%rsp
pop %rbx
pop %rbp
retq
| _Z5func0ii:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 28h
mov [rbp+var_28], rdi
mov [rbp+var_2C], esi
mov [rbp+var_30], edx
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_28]
mov rdi, rax
call _ZNSt6vectorIiSaIiEEC2Ev; std::vector<int>::vector(void)
mov eax, [rbp+var_2C]
mov [rbp+var_20], eax
jmp short loc_12EA
loc_12A3:
mov [rbp+var_1C], 1
jmp short loc_12D2
loc_12AC:
mov eax, [rbp+var_1C]
imul eax, eax
mov edx, eax
mov eax, [rbp+var_20]
cmp edx, eax
jnz short loc_12CE
lea rdx, [rbp+var_20]
mov rax, [rbp+var_28]
mov rsi, rdx
mov rdi, rax
call _ZNSt6vectorIiSaIiEE9push_backERKi; std::vector<int>::push_back(int const&)
loc_12CE:
add [rbp+var_1C], 1
loc_12D2:
mov eax, [rbp+var_1C]
imul eax, eax
mov edx, eax
mov eax, [rbp+var_20]
cmp edx, eax
jle short loc_12AC
mov eax, [rbp+var_20]
add eax, 1
mov [rbp+var_20], eax
loc_12EA:
mov eax, [rbp+var_20]
cmp [rbp+var_30], eax
jge short loc_12A3
jmp short loc_1326
endbr64
mov rbx, rax
mov rax, [rbp+var_28]
mov rdi, rax
call _ZNSt6vectorIiSaIiEED2Ev; std::vector<int>::~vector()
mov rax, rbx
mov rdx, [rbp+var_18]
sub rdx, fs:28h
jz short loc_131E
call ___stack_chk_fail
loc_131E:
mov rdi, rax; struct _Unwind_Exception *
call __Unwind_Resume
loc_1326:
mov rax, [rbp+var_18]
sub rax, fs:28h
jz short loc_133A
call ___stack_chk_fail
loc_133A:
mov rax, [rbp+var_28]
mov rbx, [rbp+var_8]
leave
retn | long long func0(long long a1, int a2, int a3)
{
int i; // [rsp+10h] [rbp-20h] BYREF
int j; // [rsp+14h] [rbp-1Ch]
unsigned long long v7; // [rsp+18h] [rbp-18h]
v7 = __readfsqword(0x28u);
std::vector<int>::vector(a1);
for ( i = a2; a3 >= i; ++i )
{
for ( j = 1; j * j <= i; ++j )
{
if ( j * j == i )
std::vector<int>::push_back(a1, &i);
}
}
return a1;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x28
MOV qword ptr [RBP + -0x28],RDI
MOV dword ptr [RBP + -0x2c],ESI
MOV dword ptr [RBP + -0x30],EDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RDI,RAX
CALL 0x001017d2
MOV EAX,dword ptr [RBP + -0x2c]
MOV dword ptr [RBP + -0x20],EAX
JMP 0x001012ea
LAB_001012a3:
MOV dword ptr [RBP + -0x1c],0x1
JMP 0x001012d2
LAB_001012ac:
MOV EAX,dword ptr [RBP + -0x1c]
IMUL EAX,EAX
MOV EDX,EAX
MOV EAX,dword ptr [RBP + -0x20]
CMP EDX,EAX
JNZ 0x001012ce
LEA RDX,[RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x28]
MOV RSI,RDX
MOV RDI,RAX
LAB_001012c9:
CALL 0x001018d0
LAB_001012ce:
ADD dword ptr [RBP + -0x1c],0x1
LAB_001012d2:
MOV EAX,dword ptr [RBP + -0x1c]
IMUL EAX,EAX
MOV EDX,EAX
MOV EAX,dword ptr [RBP + -0x20]
CMP EDX,EAX
JLE 0x001012ac
MOV EAX,dword ptr [RBP + -0x20]
ADD EAX,0x1
MOV dword ptr [RBP + -0x20],EAX
LAB_001012ea:
MOV EAX,dword ptr [RBP + -0x20]
CMP dword ptr [RBP + -0x30],EAX
JGE 0x001012a3
JMP 0x00101326
LAB_00101326:
MOV RAX,qword ptr [RBP + -0x18]
SUB RAX,qword ptr FS:[0x28]
JZ 0x0010133a
CALL 0x00101150
LAB_0010133a:
MOV RAX,qword ptr [RBP + -0x28]
MOV RBX,qword ptr [RBP + -0x8]
LEAVE
RET | /* func0(int, int) */
vector<int,std::allocator<int>> * func0(int param_1,int param_2)
{
int in_EDX;
int4 in_register_0000003c;
vector<int,std::allocator<int>> *this;
long in_FS_OFFSET;
int local_28;
int local_24;
long local_20;
this = (vector<int,std::allocator<int>> *)CONCAT44(in_register_0000003c,param_1);
local_20 = *(long *)(in_FS_OFFSET + 0x28);
std::vector<int,std::allocator<int>>::vector(this);
for (local_28 = param_2; local_28 <= in_EDX; local_28 = local_28 + 1) {
for (local_24 = 1; local_24 * local_24 <= local_28; local_24 = local_24 + 1) {
if (local_24 * local_24 == local_28) {
/* try { // try from 001012c9 to 001012cd has its CatchHandler @ 001012f4 */
std::vector<int,std::allocator<int>>::push_back(this,&local_28);
}
}
}
if (local_20 != *(long *)(in_FS_OFFSET + 0x28)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return this;
} |
2,353 | func0 | #include <vector>
#include <assert.h>
| std::vector<int> func0(int a, int b) {
std::vector<int> lists;
for (int i = a; i <= b; i++) {
int j = 1;
while (j * j <= i) {
if (j * j == i) {
lists.push_back(i);
}
j++;
}
}
return lists;
}
| int main() {
assert(func0(1, 30) == std::vector<int>({1, 4, 9, 16, 25}));
assert(func0(50, 100) == std::vector<int>({64, 81, 100}));
assert(func0(100, 200) == std::vector<int>({100, 121, 144, 169, 196}));
return 0;
}
| O1 | cpp | func0(int, int):
endbr64
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x10,%rsp
mov %rdi,%rbp
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi)
movq $0x0,0x10(%rdi)
mov %esi,0x4(%rsp)
cmp %edx,%esi
jg 1308 <_Z5func0ii+0xbf>
mov %edx,%r12d
mov $0x1,%r13d
lea 0x4(%rsp),%r14
jmp 12d9 <_Z5func0ii+0x90>
mov %r14,%rdx
mov %rbp,%rdi
callq 16a6 <_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_>
add $0x1,%ebx
mov %ebx,%edx
imul %ebx,%edx
mov 0x4(%rsp),%eax
cmp %eax,%edx
jg 12cd <_Z5func0ii+0x84>
cmp %eax,%edx
jne 12a6 <_Z5func0ii+0x5d>
mov 0x8(%rbp),%rsi
cmp 0x10(%rbp),%rsi
je 129b <_Z5func0ii+0x52>
mov %eax,(%rsi)
addq $0x4,0x8(%rbp)
jmp 12a6 <_Z5func0ii+0x5d>
add $0x1,%eax
mov %eax,0x4(%rsp)
cmp %r12d,%eax
jg 1308 <_Z5func0ii+0xbf>
mov 0x4(%rsp),%eax
test %eax,%eax
jle 12cd <_Z5func0ii+0x84>
mov $0x1,%ebx
mov %r13d,%edx
jmp 12b6 <_Z5func0ii+0x6d>
endbr64
mov %rax,%rbx
mov 0x0(%rbp),%rdi
test %rdi,%rdi
je 1300 <_Z5func0ii+0xb7>
callq 1110 <_ZdlPv@plt>
mov %rbx,%rdi
callq 1150 <_Unwind_Resume@plt>
mov 0x8(%rsp),%rax
xor %fs:0x28,%rax
jne 1328 <_Z5func0ii+0xdf>
mov %rbp,%rax
add $0x10,%rsp
pop %rbx
pop %rbp
pop %r12
pop %r13
pop %r14
retq
callq 1130 <__stack_chk_fail@plt>
| _Z5func0ii:
endbr64
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 10h
mov r12, rdi
mov ebp, esi
mov r13d, edx
mov rax, fs:28h
mov [rsp+38h+var_30], rax
xor eax, eax
mov qword ptr [rdi], 0
mov qword ptr [rdi+8], 0
mov qword ptr [rdi+10h], 0
mov [rsp+38h+var_34], esi
mov r14d, 1
cmp esi, edx
jle short loc_12F9
loc_1296:
mov rax, [rsp+38h+var_30]
sub rax, fs:28h
jnz loc_1333
mov rax, r12
add rsp, 10h
pop rbx
pop rbp
pop r12
pop r13
pop r14
retn
loc_12BA:
lea rdx, [rsp+38h+var_34]
mov rdi, r12
call _ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_; std::vector<int>::_M_realloc_insert<int const&>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,int const&)
loc_12C7:
add ebx, 1
mov eax, ebx
imul eax, ebx
cmp eax, ebp
jg short loc_12ED
loc_12D3:
cmp eax, ebp
jnz short loc_12C7
mov rsi, [r12+8]
cmp rsi, [r12+10h]
jz short loc_12BA
mov [rsi], ebp
add qword ptr [r12+8], 4
jmp short loc_12C7
loc_12ED:
add ebp, 1
mov [rsp+38h+var_34], ebp
cmp ebp, r13d
jg short loc_1296
loc_12F9:
mov ebx, 1
mov eax, r14d
test ebp, ebp
jg short loc_12D3
jmp short loc_12ED
endbr64
mov rbx, rax
mov rdi, r12
call _ZNSt6vectorIiSaIiEED2Ev; std::vector<int>::~vector()
mov rax, [rsp+arg_0]
sub rax, fs:28h
jz short loc_132B
call ___stack_chk_fail
loc_132B:
mov rdi, rbx; struct _Unwind_Exception *
call __Unwind_Resume
loc_1333:
call ___stack_chk_fail | _QWORD * func0(_QWORD *a1, int a2, int a3)
{
int v3; // ebp
int v6; // ebx
int v7; // eax
int *v8; // rsi
int i; // [rsp+4h] [rbp-34h] BYREF
unsigned long long v10; // [rsp+8h] [rbp-30h]
v3 = a2;
v10 = __readfsqword(0x28u);
*a1 = 0LL;
a1[1] = 0LL;
a1[2] = 0LL;
for ( i = a2; v3 <= a3; i = v3 )
{
v6 = 1;
v7 = 1;
if ( v3 > 0 )
{
do
{
if ( v7 == v3 )
{
v8 = (int *)a1[1];
if ( v8 == (int *)a1[2] )
{
std::vector<int>::_M_realloc_insert<int const&>(a1, v8, &i);
}
else
{
*v8 = v3;
a1[1] += 4LL;
}
}
++v6;
v7 = v6 * v6;
}
while ( v6 * v6 <= v3 );
}
++v3;
}
return a1;
} | func0:
ENDBR64
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x10
MOV R12,RDI
MOV EBP,ESI
MOV R13D,EDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
MOV qword ptr [RDI],0x0
MOV qword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
MOV dword ptr [RSP + 0x4],ESI
MOV R14D,0x1
CMP ESI,EDX
JLE 0x001012f9
LAB_00101296:
MOV RAX,qword ptr [RSP + 0x8]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x00101333
MOV RAX,R12
ADD RSP,0x10
POP RBX
POP RBP
POP R12
POP R13
POP R14
RET
LAB_001012ba:
LEA RDX,[RSP + 0x4]
MOV RDI,R12
LAB_001012c2:
CALL 0x00101700
LAB_001012c7:
ADD EBX,0x1
MOV EAX,EBX
IMUL EAX,EBX
CMP EAX,EBP
JG 0x001012ed
LAB_001012d3:
CMP EAX,EBP
JNZ 0x001012c7
MOV RSI,qword ptr [R12 + 0x8]
CMP RSI,qword ptr [R12 + 0x10]
JZ 0x001012ba
MOV dword ptr [RSI],EBP
ADD qword ptr [R12 + 0x8],0x4
JMP 0x001012c7
LAB_001012ed:
ADD EBP,0x1
MOV dword ptr [RSP + 0x4],EBP
CMP EBP,R13D
JG 0x00101296
LAB_001012f9:
MOV EBX,0x1
MOV EAX,R14D
TEST EBP,EBP
JG 0x001012d3
JMP 0x001012ed
LAB_00101333:
CALL 0x00101130 | /* func0(int, int) */
vector<int,std::allocator<int>> * func0(int param_1,int param_2)
{
int *piVar1;
int iVar2;
int iVar3;
int in_EDX;
int iVar4;
int4 in_register_0000003c;
vector<int,std::allocator<int>> *this;
long in_FS_OFFSET;
int local_34;
long local_30;
this = (vector<int,std::allocator<int>> *)CONCAT44(in_register_0000003c,param_1);
local_30 = *(long *)(in_FS_OFFSET + 0x28);
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
*(int8 *)(this + 0x10) = 0;
local_34 = param_2;
if (param_2 <= in_EDX) {
do {
iVar2 = local_34;
iVar4 = 1;
iVar3 = 1;
if (0 < local_34) {
do {
if (iVar3 == iVar2) {
piVar1 = *(int **)(this + 8);
if (piVar1 == *(int **)(this + 0x10)) {
/* try { // try from 001012c2 to 001012c6 has its CatchHandler @ 00101307 */
std::vector<int,std::allocator<int>>::_M_realloc_insert<int_const&>
(this,(__normal_iterator)piVar1,&local_34);
}
else {
*piVar1 = iVar2;
*(long *)(this + 8) = *(long *)(this + 8) + 4;
}
}
iVar4 = iVar4 + 1;
iVar3 = iVar4 * iVar4;
} while (iVar3 <= iVar2);
}
local_34 = iVar2 + 1;
} while (local_34 <= in_EDX);
}
if (local_30 != *(long *)(in_FS_OFFSET + 0x28)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return this;
} |
2,354 | func0 | #include <vector>
#include <assert.h>
| std::vector<int> func0(int a, int b) {
std::vector<int> lists;
for (int i = a; i <= b; i++) {
int j = 1;
while (j * j <= i) {
if (j * j == i) {
lists.push_back(i);
}
j++;
}
}
return lists;
}
| int main() {
assert(func0(1, 30) == std::vector<int>({1, 4, 9, 16, 25}));
assert(func0(50, 100) == std::vector<int>({64, 81, 100}));
assert(func0(100, 200) == std::vector<int>({100, 121, 144, 169, 196}));
return 0;
}
| O2 | cpp | func0(int, int):
endbr64
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x18,%rsp
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi)
movq $0x0,0x10(%rdi)
mov %esi,0x4(%rsp)
cmp %edx,%esi
jg 156b <_Z5func0ii+0xab>
mov %edx,%ebp
lea 0x4(%rsp),%r13
nopw 0x0(%rax,%rax,1)
test %esi,%esi
jle 1560 <_Z5func0ii+0xa0>
mov $0x1,%ebx
mov $0x1,%eax
jmp 1530 <_Z5func0ii+0x70>
add $0x1,%ebx
mov 0x4(%rsp),%esi
mov %ebx,%eax
imul %ebx,%eax
cmp %esi,%eax
jg 1560 <_Z5func0ii+0xa0>
cmp %eax,%esi
jne 1520 <_Z5func0ii+0x60>
mov 0x8(%r12),%r8
cmp 0x10(%r12),%r8
je 1590 <_Z5func0ii+0xd0>
add $0x1,%ebx
mov %esi,(%r8)
mov 0x4(%rsp),%esi
add $0x4,%r8
mov %ebx,%eax
mov %r8,0x8(%r12)
imul %ebx,%eax
cmp %esi,%eax
jle 1530 <_Z5func0ii+0x70>
nopl 0x0(%rax)
add $0x1,%esi
mov %esi,0x4(%rsp)
cmp %ebp,%esi
jle 1510 <_Z5func0ii+0x50>
mov 0x8(%rsp),%rax
xor %fs:0x28,%rax
jne 15a0 <_Z5func0ii+0xe0>
add $0x18,%rsp
mov %r12,%rax
pop %rbx
pop %rbp
pop %r12
pop %r13
retq
nopl 0x0(%rax)
mov %r13,%rdx
mov %r8,%rsi
mov %r12,%rdi
callq 16d0 <_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_>
jmp 1520 <_Z5func0ii+0x60>
callq 1130 <__stack_chk_fail@plt>
endbr64
mov %rax,%rbp
jmpq 1160 <_Z5func0ii.cold>
nopw %cs:0x0(%rax,%rax,1)
nopl 0x0(%rax,%rax,1)
| _Z5func0ii:
endbr64
push r13
pxor xmm0, xmm0
mov r13d, edx
push r12
mov r12, rdi
push rbp
mov ebp, esi
push rbx
sub rsp, 18h
mov rax, fs:28h
mov [rsp+38h+var_30], rax
xor eax, eax
mov qword ptr [rdi+10h], 0
mov [rsp+38h+var_34], esi
movups xmmword ptr [rdi], xmm0
cmp esi, edx
jg short loc_1594
nop dword ptr [rax]
loc_1540:
mov ebx, 1
mov eax, 1
test ebp, ebp
jg short loc_155C
jmp short loc_1588
loc_1550:
add ebx, 1
mov eax, ebx
imul eax, ebx
cmp eax, ebp
jg short loc_1588
loc_155C:
cmp eax, ebp
jnz short loc_1550
mov rsi, [r12+8]
cmp rsi, [r12+10h]
jz short loc_15B8
add ebx, 1
mov [rsi], ebp
add rsi, 4
mov eax, ebx
mov [r12+8], rsi
imul eax, ebx
cmp eax, ebp
jle short loc_155C
nop dword ptr [rax+rax+00h]
loc_1588:
add ebp, 1
mov [rsp+38h+var_34], ebp
cmp ebp, r13d
jle short loc_1540
loc_1594:
mov rax, [rsp+38h+var_30]
sub rax, fs:28h
jnz short loc_15C7
add rsp, 18h
mov rax, r12
pop rbx
pop rbp
pop r12
pop r13
retn
loc_15B8:
lea rdx, [rsp+38h+var_34]
mov rdi, r12
call _ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_; std::vector<int>::_M_realloc_insert<int const&>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,int const&)
jmp short loc_1550
loc_15C7:
call ___stack_chk_fail
endbr64
mov rbx, rax
jmp _Z5func0ii_cold; func0(int,int) [clone] | long long func0(long long a1, int a2, int a3)
{
int v4; // ebp
int v5; // ebx
int v6; // eax
int *v7; // rsi
int v9; // [rsp+0h] [rbp-34h] BYREF
unsigned long long v10; // [rsp+4h] [rbp-30h]
v4 = a2;
v10 = __readfsqword(0x28u);
*(_QWORD *)(a1 + 16) = 0LL;
v9 = a2;
*(_OWORD *)a1 = 0LL;
if ( a2 <= a3 )
{
while ( 1 )
{
v5 = 1;
v6 = 1;
if ( v4 > 0 )
break;
LABEL_8:
v9 = ++v4;
if ( v4 > a3 )
return a1;
}
while ( 1 )
{
while ( v6 != v4 )
{
LABEL_4:
++v5;
v6 = v5 * v5;
if ( v5 * v5 > v4 )
goto LABEL_8;
}
v7 = *(int **)(a1 + 8);
if ( v7 == *(int **)(a1 + 16) )
{
std::vector<int>::_M_realloc_insert<int const&>(a1, v7, &v9);
goto LABEL_4;
}
++v5;
*v7 = v4;
*(_QWORD *)(a1 + 8) = v7 + 1;
v6 = v5 * v5;
if ( v5 * v5 > v4 )
goto LABEL_8;
}
}
return a1;
} | func0:
ENDBR64
PUSH R13
PXOR XMM0,XMM0
MOV R13D,EDX
PUSH R12
MOV R12,RDI
PUSH RBP
MOV EBP,ESI
PUSH RBX
SUB RSP,0x18
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
MOV qword ptr [RDI + 0x10],0x0
MOV dword ptr [RSP + 0x4],ESI
MOVUPS xmmword ptr [RDI],XMM0
CMP ESI,EDX
JG 0x00101594
NOP dword ptr [RAX]
LAB_00101540:
MOV EBX,0x1
MOV EAX,0x1
TEST EBP,EBP
JG 0x0010155c
JMP 0x00101588
LAB_00101550:
ADD EBX,0x1
MOV EAX,EBX
IMUL EAX,EBX
CMP EAX,EBP
JG 0x00101588
LAB_0010155c:
CMP EAX,EBP
JNZ 0x00101550
MOV RSI,qword ptr [R12 + 0x8]
CMP RSI,qword ptr [R12 + 0x10]
JZ 0x001015b8
ADD EBX,0x1
MOV dword ptr [RSI],EBP
ADD RSI,0x4
MOV EAX,EBX
MOV qword ptr [R12 + 0x8],RSI
IMUL EAX,EBX
CMP EAX,EBP
JLE 0x0010155c
NOP dword ptr [RAX + RAX*0x1]
LAB_00101588:
ADD EBP,0x1
MOV dword ptr [RSP + 0x4],EBP
CMP EBP,R13D
JLE 0x00101540
LAB_00101594:
MOV RAX,qword ptr [RSP + 0x8]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x001015c7
ADD RSP,0x18
MOV RAX,R12
POP RBX
POP RBP
POP R12
POP R13
RET
LAB_001015b8:
LEA RDX,[RSP + 0x4]
MOV RDI,R12
LAB_001015c0:
CALL 0x001016f0
JMP 0x00101550
LAB_001015c7:
CALL 0x00101130 | /* func0(int, int) */
vector<int,std::allocator<int>> * func0(int param_1,int param_2)
{
int *piVar1;
int iVar2;
int iVar3;
int in_EDX;
int iVar4;
int4 in_register_0000003c;
vector<int,std::allocator<int>> *this;
long in_FS_OFFSET;
int local_34;
long local_30;
this = (vector<int,std::allocator<int>> *)CONCAT44(in_register_0000003c,param_1);
local_30 = *(long *)(in_FS_OFFSET + 0x28);
*(int8 *)(this + 0x10) = 0;
*(int (*) [16])this = (int [16])0x0;
local_34 = param_2;
if (param_2 <= in_EDX) {
do {
iVar2 = local_34;
iVar4 = 1;
iVar3 = 1;
if (0 < local_34) {
do {
while (iVar3 != iVar2) {
LAB_00101550:
iVar4 = iVar4 + 1;
iVar3 = iVar4 * iVar4;
if (iVar2 < iVar3) goto LAB_00101588;
}
piVar1 = *(int **)(this + 8);
if (piVar1 == *(int **)(this + 0x10)) {
/* try { // try from 001015c0 to 001015c4 has its CatchHandler @ 001015cc */
std::vector<int,std::allocator<int>>::_M_realloc_insert<int_const&>
(this,(__normal_iterator)piVar1,&local_34);
goto LAB_00101550;
}
iVar4 = iVar4 + 1;
*piVar1 = iVar2;
*(int **)(this + 8) = piVar1 + 1;
iVar3 = iVar4 * iVar4;
} while (iVar3 <= iVar2);
}
LAB_00101588:
local_34 = iVar2 + 1;
} while (local_34 <= in_EDX);
}
if (local_30 != *(long *)(in_FS_OFFSET + 0x28)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return this;
} |
2,355 | func0 | #include <vector>
#include <assert.h>
| std::vector<int> func0(int a, int b) {
std::vector<int> lists;
for (int i = a; i <= b; i++) {
int j = 1;
while (j * j <= i) {
if (j * j == i) {
lists.push_back(i);
}
j++;
}
}
return lists;
}
| int main() {
assert(func0(1, 30) == std::vector<int>({1, 4, 9, 16, 25}));
assert(func0(50, 100) == std::vector<int>({64, 81, 100}));
assert(func0(100, 200) == std::vector<int>({100, 121, 144, 169, 196}));
return 0;
}
| O3 | cpp | func0(int, int):
endbr64
push %r13
pxor %xmm0,%xmm0
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x18,%rsp
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
movq $0x0,0x10(%rdi)
mov %esi,0x4(%rsp)
movups %xmm0,(%rdi)
cmp %edx,%esi
jg 153b <_Z5func0ii+0x9b>
mov %edx,%ebp
lea 0x4(%rsp),%r13
test %esi,%esi
jle 1530 <_Z5func0ii+0x90>
mov $0x1,%ebx
mov $0x1,%eax
jmp 14fc <_Z5func0ii+0x5c>
add $0x1,%ebx
mov %ebx,%eax
imul %ebx,%eax
cmp %esi,%eax
jg 1530 <_Z5func0ii+0x90>
cmp %eax,%esi
jne 14f0 <_Z5func0ii+0x50>
mov 0x8(%r12),%r8
cmp 0x10(%r12),%r8
je 1560 <_Z5func0ii+0xc0>
add $0x1,%ebx
mov %esi,(%r8)
mov 0x4(%rsp),%esi
add $0x4,%r8
mov %ebx,%eax
mov %r8,0x8(%r12)
imul %ebx,%eax
cmp %esi,%eax
jle 14fc <_Z5func0ii+0x5c>
nopl 0x0(%rax,%rax,1)
add $0x1,%esi
mov %esi,0x4(%rsp)
cmp %ebp,%esi
jle 14e0 <_Z5func0ii+0x40>
mov 0x8(%rsp),%rax
xor %fs:0x28,%rax
jne 1577 <_Z5func0ii+0xd7>
add $0x18,%rsp
mov %r12,%rax
pop %rbx
pop %rbp
pop %r12
pop %r13
retq
nopl 0x0(%rax)
mov %r13,%rdx
mov %r8,%rsi
mov %r12,%rdi
callq 1690 <_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_>
mov 0x4(%rsp),%esi
jmpq 14f0 <_Z5func0ii+0x50>
callq 1130 <__stack_chk_fail@plt>
endbr64
mov %rax,%rbp
jmpq 1160 <_Z5func0ii.cold>
nopl 0x0(%rax,%rax,1)
| _Z5func0ii:
endbr64
push r13
pxor xmm0, xmm0
mov r13d, edx
push r12
mov r12, rdi
push rbp
mov ebp, esi
push rbx
sub rsp, 18h
mov rax, fs:28h
mov [rsp+38h+var_30], rax
xor eax, eax
mov qword ptr [rdi+10h], 0
mov [rsp+38h+var_34], esi
movups xmmword ptr [rdi], xmm0
cmp esi, edx
jg short loc_1594
nop dword ptr [rax]
loc_1540:
mov ebx, 1
mov eax, 1
test ebp, ebp
jg short loc_155C
jmp short loc_1588
loc_1550:
add ebx, 1
mov eax, ebx
imul eax, ebx
cmp eax, ebp
jg short loc_1588
loc_155C:
cmp eax, ebp
jnz short loc_1550
mov rsi, [r12+8]
cmp rsi, [r12+10h]
jz short loc_15B8
add ebx, 1
mov [rsi], ebp
add rsi, 4
mov eax, ebx
mov [r12+8], rsi
imul eax, ebx
cmp eax, ebp
jle short loc_155C
nop dword ptr [rax+rax+00h]
loc_1588:
add ebp, 1
mov [rsp+38h+var_34], ebp
cmp ebp, r13d
jle short loc_1540
loc_1594:
mov rax, [rsp+38h+var_30]
sub rax, fs:28h
jnz short loc_15C7
add rsp, 18h
mov rax, r12
pop rbx
pop rbp
pop r12
pop r13
retn
loc_15B8:
lea rdx, [rsp+38h+var_34]
mov rdi, r12
call _ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_; std::vector<int>::_M_realloc_insert<int const&>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,int const&)
jmp short loc_1550
loc_15C7:
call ___stack_chk_fail
endbr64
mov rbx, rax
jmp _Z5func0ii_cold; func0(int,int) [clone] | long long func0(long long a1, int a2, int a3)
{
int v4; // ebp
int v5; // ebx
int v6; // eax
int *v7; // rsi
int v9; // [rsp+0h] [rbp-34h] BYREF
unsigned long long v10; // [rsp+4h] [rbp-30h]
v4 = a2;
v10 = __readfsqword(0x28u);
*(_QWORD *)(a1 + 16) = 0LL;
v9 = a2;
*(_OWORD *)a1 = 0LL;
if ( a2 <= a3 )
{
while ( 1 )
{
v5 = 1;
v6 = 1;
if ( v4 > 0 )
break;
LABEL_8:
v9 = ++v4;
if ( v4 > a3 )
return a1;
}
while ( 1 )
{
while ( v6 != v4 )
{
LABEL_4:
++v5;
v6 = v5 * v5;
if ( v5 * v5 > v4 )
goto LABEL_8;
}
v7 = *(int **)(a1 + 8);
if ( v7 == *(int **)(a1 + 16) )
{
std::vector<int>::_M_realloc_insert<int const&>(a1, v7, &v9);
goto LABEL_4;
}
++v5;
*v7 = v4;
*(_QWORD *)(a1 + 8) = v7 + 1;
v6 = v5 * v5;
if ( v5 * v5 > v4 )
goto LABEL_8;
}
}
return a1;
} | func0:
ENDBR64
PUSH R13
PXOR XMM0,XMM0
MOV R13D,EDX
PUSH R12
MOV R12,RDI
PUSH RBP
MOV EBP,ESI
PUSH RBX
SUB RSP,0x18
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
MOV qword ptr [RDI + 0x10],0x0
MOV dword ptr [RSP + 0x4],ESI
MOVUPS xmmword ptr [RDI],XMM0
CMP ESI,EDX
JG 0x00101594
NOP dword ptr [RAX]
LAB_00101540:
MOV EBX,0x1
MOV EAX,0x1
TEST EBP,EBP
JG 0x0010155c
JMP 0x00101588
LAB_00101550:
ADD EBX,0x1
MOV EAX,EBX
IMUL EAX,EBX
CMP EAX,EBP
JG 0x00101588
LAB_0010155c:
CMP EAX,EBP
JNZ 0x00101550
MOV RSI,qword ptr [R12 + 0x8]
CMP RSI,qword ptr [R12 + 0x10]
JZ 0x001015b8
ADD EBX,0x1
MOV dword ptr [RSI],EBP
ADD RSI,0x4
MOV EAX,EBX
MOV qword ptr [R12 + 0x8],RSI
IMUL EAX,EBX
CMP EAX,EBP
JLE 0x0010155c
NOP dword ptr [RAX + RAX*0x1]
LAB_00101588:
ADD EBP,0x1
MOV dword ptr [RSP + 0x4],EBP
CMP EBP,R13D
JLE 0x00101540
LAB_00101594:
MOV RAX,qword ptr [RSP + 0x8]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x001015c7
ADD RSP,0x18
MOV RAX,R12
POP RBX
POP RBP
POP R12
POP R13
RET
LAB_001015b8:
LEA RDX,[RSP + 0x4]
MOV RDI,R12
LAB_001015c0:
CALL 0x001016f0
JMP 0x00101550
LAB_001015c7:
CALL 0x00101130 | /* func0(int, int) */
vector<int,std::allocator<int>> * func0(int param_1,int param_2)
{
int *piVar1;
int iVar2;
int iVar3;
int in_EDX;
int iVar4;
int4 in_register_0000003c;
vector<int,std::allocator<int>> *this;
long in_FS_OFFSET;
int local_34;
long local_30;
this = (vector<int,std::allocator<int>> *)CONCAT44(in_register_0000003c,param_1);
local_30 = *(long *)(in_FS_OFFSET + 0x28);
*(int8 *)(this + 0x10) = 0;
*(int (*) [16])this = (int [16])0x0;
local_34 = param_2;
if (param_2 <= in_EDX) {
do {
iVar2 = local_34;
iVar4 = 1;
iVar3 = 1;
if (0 < local_34) {
do {
while (iVar3 != iVar2) {
LAB_00101550:
iVar4 = iVar4 + 1;
iVar3 = iVar4 * iVar4;
if (iVar2 < iVar3) goto LAB_00101588;
}
piVar1 = *(int **)(this + 8);
if (piVar1 == *(int **)(this + 0x10)) {
/* try { // try from 001015c0 to 001015c4 has its CatchHandler @ 001015cc */
std::vector<int,std::allocator<int>>::_M_realloc_insert<int_const&>
(this,(__normal_iterator)piVar1,&local_34);
goto LAB_00101550;
}
iVar4 = iVar4 + 1;
*piVar1 = iVar2;
*(int **)(this + 8) = piVar1 + 1;
iVar3 = iVar4 * iVar4;
} while (iVar3 <= iVar2);
}
LAB_00101588:
local_34 = iVar2 + 1;
} while (local_34 <= in_EDX);
}
if (local_30 != *(long *)(in_FS_OFFSET + 0x28)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return this;
} |
2,356 | func0 |
#include <complex>
#include <cmath>
#include <cassert>
| std::pair<std::pair<double, double>, std::complex<double>> func0(double x, double y) {
std::complex<double> cn(x, y);
double magnitude = std::abs(cn);
double angle = std::arg(cn);
std::complex<double> cn1 = std::polar(2.0, M_PI);
return {{magnitude, angle}, cn1};
}
| int main() {
assert(func0(3, 4) == std::make_pair(std::make_pair(5.0, 0.9272952180016122), std::complex<double>(-2, 2.4492935982947064e-16)));
assert(func0(4, 7) == std::make_pair(std::make_pair(8.06225774829855, 1.0516502125483738), std::complex<double>(-2, 2.4492935982947064e-16)));
assert(func0(15, 17) == std::make_pair(std::make_pair(22.67156809750927, 0.8478169733934057), std::complex<double>(-2, 2.4492935982947064e-16)));
return 0;
}
| O0 | cpp | func0(double, double):
endbr64
push %rbp
mov %rsp,%rbp
add $0xffffffffffffff80,%rsp
mov %rdi,-0x68(%rbp)
movsd %xmm0,-0x70(%rbp)
movsd %xmm1,-0x78(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x8(%rbp)
xor %eax,%eax
movsd -0x78(%rbp),%xmm0
mov -0x70(%rbp),%rdx
lea -0x40(%rbp),%rax
movapd %xmm0,%xmm1
movq %rdx,%xmm0
mov %rax,%rdi
callq 165c <_ZNSt7complexIdEC1Edd>
lea -0x40(%rbp),%rax
mov %rax,%rdi
callq 16e9 <_ZSt3absIdET_RKSt7complexIS0_E>
movq %xmm0,%rax
mov %rax,-0x58(%rbp)
lea -0x40(%rbp),%rax
mov %rax,%rdi
callq 1720 <_ZSt3argIdET_RKSt7complexIS0_E>
movq %xmm0,%rax
mov %rax,-0x50(%rbp)
movsd 0xf76(%rip),%xmm0
movsd %xmm0,-0x20(%rbp)
movsd 0xf71(%rip),%xmm0
movsd %xmm0,-0x48(%rbp)
lea -0x20(%rbp),%rdx
lea -0x48(%rbp),%rax
mov %rdx,%rsi
mov %rax,%rdi
callq 1757 <_ZSt5polarIdESt7complexIT_ERKS1_S4_>
movq %xmm0,%rax
movapd %xmm1,%xmm0
mov %rax,-0x30(%rbp)
movsd %xmm0,-0x28(%rbp)
lea -0x50(%rbp),%rdx
lea -0x58(%rbp),%rcx
lea -0x20(%rbp),%rax
mov %rcx,%rsi
mov %rax,%rdi
callq 180a <_ZNSt4pairIddEC1IRdS2_Lb1EEEOT_OT0_>
lea -0x30(%rbp),%rdx
lea -0x20(%rbp),%rcx
mov -0x68(%rbp),%rax
mov %rcx,%rsi
mov %rax,%rdi
callq 1856 <_ZNSt4pairIS_IddESt7complexIdEEC1IRS2_Lb1EEERKS0_OT_>
mov -0x8(%rbp),%rax
xor %fs:0x28,%rax
je 12fb <_Z5func0dd+0xf2>
callq 10e0 <__stack_chk_fail@plt>
mov -0x68(%rbp),%rax
leaveq
retq
| _Z5func0dd:
endbr64
push rbp
mov rbp, rsp
add rsp, 0FFFFFFFFFFFFFF80h
mov [rbp+var_68], rdi
movsd [rbp+var_70], xmm0
movsd [rbp+var_78], xmm1
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
movsd xmm0, [rbp+var_78]
mov rdx, [rbp+var_70]
lea rax, [rbp+var_40]
movapd xmm1, xmm0
movq xmm0, rdx
mov rdi, rax
call _ZNSt7complexIdEC2Edd; std::complex<double>::complex(double,double)
lea rax, [rbp+var_40]
mov rdi, rax
call _ZSt3absIdET_RKSt7complexIS0_E; std::abs<double>(std::complex<double> const&)
movq rax, xmm0
mov [rbp+var_58], rax
lea rax, [rbp+var_40]
mov rdi, rax
call _ZSt3argIdET_RKSt7complexIS0_E; std::arg<double>(std::complex<double> const&)
movq rax, xmm0
mov [rbp+var_50], rax
movsd xmm0, cs:qword_21D8
movsd [rbp+var_20], xmm0
movsd xmm0, cs:qword_21E0
movsd [rbp+var_48], xmm0
lea rdx, [rbp+var_20]
lea rax, [rbp+var_48]
mov rsi, rdx
mov rdi, rax
call _ZSt5polarIdESt7complexIT_ERKS1_S4_; std::polar<double>(double const&,double const&)
movq rax, xmm0
movapd xmm0, xmm1
mov [rbp+var_30], rax
movsd [rbp+var_28], xmm0
lea rdx, [rbp+var_50]
lea rcx, [rbp+var_58]
lea rax, [rbp+var_20]
mov rsi, rcx
mov rdi, rax
call _ZNSt4pairIddEC2IRdS2_Lb1EEEOT_OT0_; std::pair<double,double>::pair<double &,double &,true>(double &,double &)
lea rdx, [rbp+var_30]
lea rcx, [rbp+var_20]
mov rax, [rbp+var_68]
mov rsi, rcx
mov rdi, rax
call _ZNSt4pairIS_IddESt7complexIdEEC2IS0_S2_Lb1EEERKS0_RKS2_; std::pair<std::pair<double,double>,std::complex<double>>::pair<std::pair<double,double>,std::complex<double>,true>(std::pair<double,double> const&,std::complex<double> const&)
mov rax, [rbp+var_8]
sub rax, fs:28h
jz short loc_12DB
call ___stack_chk_fail
loc_12DB:
mov rax, [rbp+var_68]
leave
retn | long long func0(double a1, double a2, long long a3)
{
double v4; // [rsp+28h] [rbp-58h] BYREF
double v5; // [rsp+30h] [rbp-50h] BYREF
long long v6; // [rsp+38h] [rbp-48h] BYREF
_BYTE v7[16]; // [rsp+40h] [rbp-40h] BYREF
_QWORD v8[2]; // [rsp+50h] [rbp-30h] BYREF
_QWORD v9[4]; // [rsp+60h] [rbp-20h] BYREF
v9[3] = __readfsqword(0x28u);
std::complex<double>::complex(v7, a1, a2);
v4 = std::abs<double>(v7);
v5 = std::arg<double>(v7);
v9[0] = 0x400921FB54442D18LL;
v6 = 0x4000000000000000LL;
v8[0] = std::polar<double>(&v6, v9);
*(double *)&v8[1] = a2;
std::pair<double,double>::pair<double &,double &,true>(v9, &v4, &v5);
std::pair<std::pair<double,double>,std::complex<double>>::pair<std::pair<double,double>,std::complex<double>,true>(
a3,
v9,
v8);
return a3;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
ADD RSP,-0x80
MOV qword ptr [RBP + -0x68],RDI
MOVSD qword ptr [RBP + -0x70],XMM0
MOVSD qword ptr [RBP + -0x78],XMM1
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
MOVSD XMM0,qword ptr [RBP + -0x78]
MOV RDX,qword ptr [RBP + -0x70]
LEA RAX,[RBP + -0x40]
MOVAPD XMM1,XMM0
MOVQ XMM0,RDX
MOV RDI,RAX
CALL 0x00101630
LEA RAX,[RBP + -0x40]
MOV RDI,RAX
CALL 0x001016bd
MOVQ RAX,XMM0
MOV qword ptr [RBP + -0x58],RAX
LEA RAX,[RBP + -0x40]
MOV RDI,RAX
CALL 0x001016e0
MOVQ RAX,XMM0
MOV qword ptr [RBP + -0x50],RAX
MOVSD XMM0,qword ptr [0x001021d8]
MOVSD qword ptr [RBP + -0x20],XMM0
MOVSD XMM0,qword ptr [0x001021e0]
MOVSD qword ptr [RBP + -0x48],XMM0
LEA RDX,[RBP + -0x20]
LEA RAX,[RBP + -0x48]
MOV RSI,RDX
MOV RDI,RAX
CALL 0x00101703
MOVQ RAX,XMM0
MOVAPD XMM0,XMM1
MOV qword ptr [RBP + -0x30],RAX
MOVSD qword ptr [RBP + -0x28],XMM0
LEA RDX,[RBP + -0x50]
LEA RCX,[RBP + -0x58]
LEA RAX,[RBP + -0x20]
MOV RSI,RCX
MOV RDI,RAX
CALL 0x001017ee
LEA RDX,[RBP + -0x30]
LEA RCX,[RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x68]
MOV RSI,RCX
MOV RDI,RAX
CALL 0x0010183a
MOV RAX,qword ptr [RBP + -0x8]
SUB RAX,qword ptr FS:[0x28]
JZ 0x001012db
CALL 0x001010a0
LAB_001012db:
MOV RAX,qword ptr [RBP + -0x68]
LEAVE
RET | /* func0(double, double) */
pair<std::pair<double,double>,std::complex<double>> * func0(double param_1,double param_2)
{
pair<std::pair<double,double>,std::complex<double>> *in_RDI;
long in_FS_OFFSET;
double local_60;
double local_58;
int8 local_50;
complex<double> local_48 [16];
int8 local_38;
double local_30;
int8 local_28 [3];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
std::complex<double>::complex(local_48,param_1,param_2);
local_60 = std::abs<double>((complex *)local_48);
local_58 = std::arg<double>((complex *)local_48);
local_28[0] = DAT_001021d8;
local_50 = DAT_001021e0;
local_38 = std::polar<double>(&local_50,local_28);
local_30 = param_2;
std::pair<double,double>::pair<double&,double&,true>
((pair<double,double> *)local_28,&local_60,&local_58);
std::pair<std::pair<double,double>,std::complex<double>>::
pair<std::pair<double,double>,std::complex<double>,true>
(in_RDI,(pair *)local_28,(complex *)&local_38);
if (local_10 != *(long *)(in_FS_OFFSET + 0x28)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return in_RDI;
} |
2,357 | func0 |
#include <complex>
#include <cmath>
#include <cassert>
| std::pair<std::pair<double, double>, std::complex<double>> func0(double x, double y) {
std::complex<double> cn(x, y);
double magnitude = std::abs(cn);
double angle = std::arg(cn);
std::complex<double> cn1 = std::polar(2.0, M_PI);
return {{magnitude, angle}, cn1};
}
| int main() {
assert(func0(3, 4) == std::make_pair(std::make_pair(5.0, 0.9272952180016122), std::complex<double>(-2, 2.4492935982947064e-16)));
assert(func0(4, 7) == std::make_pair(std::make_pair(8.06225774829855, 1.0516502125483738), std::complex<double>(-2, 2.4492935982947064e-16)));
assert(func0(15, 17) == std::make_pair(std::make_pair(22.67156809750927, 0.8478169733934057), std::complex<double>(-2, 2.4492935982947064e-16)));
return 0;
}
| O1 | cpp | func0(double, double):
endbr64
push %rbp
push %rbx
sub $0x18,%rsp
mov %rdi,%rbx
movsd %xmm0,(%rsp)
movsd %xmm1,0x8(%rsp)
callq 10b0 <cabs@plt>
movq %xmm0,%rbp
movsd (%rsp),%xmm1
movsd 0x8(%rsp),%xmm0
callq 10a0 <atan2@plt>
mov %rbp,(%rbx)
movsd %xmm0,0x8(%rbx)
movsd 0xe1d(%rip),%xmm0
movsd %xmm0,0x10(%rbx)
movsd 0xe18(%rip),%xmm0
movsd %xmm0,0x18(%rbx)
mov %rbx,%rax
add $0x18,%rsp
pop %rbx
pop %rbp
retq
| _Z5func0dd:
endbr64
push rbp
push rbx
sub rsp, 18h
mov rbx, rdi
movsd [rsp+28h+x], xmm0
movsd [rsp+28h+y], xmm1
call _cabs
movq rbp, xmm0
movsd xmm1, [rsp+28h+x]; x
movsd xmm0, [rsp+28h+y]; y
call _atan2
mov [rbx], rbp
movsd qword ptr [rbx+8], xmm0
movsd xmm0, cs:qword_2008
movsd qword ptr [rbx+10h], xmm0
movsd xmm0, cs:qword_2010
movsd qword ptr [rbx+18h], xmm0
mov rax, rbx
add rsp, 18h
pop rbx
pop rbp
retn | long long func0(double a1, double a2, long long a3)
{
double v3; // rbp
double v4; // xmm0_8
v3 = cabs();
v4 = atan2(a2, a1);
*(double *)a3 = v3;
*(double *)(a3 + 8) = v4;
*(_QWORD *)(a3 + 16) = 0xC000000000000000LL;
*(_QWORD *)(a3 + 24) = 0x3CB1A62633145C07LL;
return a3;
} | func0:
ENDBR64
PUSH RBP
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
MOVSD qword ptr [RSP],XMM0
MOVSD qword ptr [RSP + 0x8],XMM1
CALL 0x001010b0
MOVQ RBP,XMM0
MOVSD XMM1,qword ptr [RSP]
MOVSD XMM0,qword ptr [RSP + 0x8]
CALL 0x001010a0
MOV qword ptr [RBX],RBP
MOVSD qword ptr [RBX + 0x8],XMM0
MOVSD XMM0,qword ptr [0x00102008]
MOVSD qword ptr [RBX + 0x10],XMM0
MOVSD XMM0,qword ptr [0x00102010]
MOVSD qword ptr [RBX + 0x18],XMM0
MOV RAX,RBX
ADD RSP,0x18
POP RBX
POP RBP
RET | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(double, double) */
void func0(double param_1,double param_2)
{
double *in_RDI;
double dVar1;
double dVar2;
dVar1 = cabs(param_1);
dVar2 = atan2(param_2,param_1);
*in_RDI = dVar1;
in_RDI[1] = dVar2;
in_RDI[2] = DAT_00102008;
in_RDI[3] = _DAT_00102010;
return;
} |
2,358 | func0 |
#include <complex>
#include <cmath>
#include <cassert>
| std::pair<std::pair<double, double>, std::complex<double>> func0(double x, double y) {
std::complex<double> cn(x, y);
double magnitude = std::abs(cn);
double angle = std::arg(cn);
std::complex<double> cn1 = std::polar(2.0, M_PI);
return {{magnitude, angle}, cn1};
}
| int main() {
assert(func0(3, 4) == std::make_pair(std::make_pair(5.0, 0.9272952180016122), std::complex<double>(-2, 2.4492935982947064e-16)));
assert(func0(4, 7) == std::make_pair(std::make_pair(8.06225774829855, 1.0516502125483738), std::complex<double>(-2, 2.4492935982947064e-16)));
assert(func0(15, 17) == std::make_pair(std::make_pair(22.67156809750927, 0.8478169733934057), std::complex<double>(-2, 2.4492935982947064e-16)));
return 0;
}
| O2 | cpp | func0(double, double):
endbr64
push %r12
mov %rdi,%r12
sub $0x20,%rsp
movsd %xmm1,0x10(%rsp)
movsd %xmm0,0x18(%rsp)
callq 10b0 <cabs@plt>
movsd 0x18(%rsp),%xmm3
movsd 0x10(%rsp),%xmm2
movsd %xmm0,0x8(%rsp)
movapd %xmm3,%xmm1
movapd %xmm2,%xmm0
callq 10a0 <atan2@plt>
movsd 0x8(%rsp),%xmm4
mov %r12,%rax
movsd %xmm0,0x8(%r12)
movsd 0xbf3(%rip),%xmm0
movsd %xmm4,(%r12)
movsd %xmm0,0x10(%r12)
movsd 0xbe6(%rip),%xmm0
movsd %xmm0,0x18(%r12)
add $0x20,%rsp
pop %r12
retq
nopl 0x0(%rax,%rax,1)
| _Z5func0dd:
endbr64
push rbx
mov rbx, rdi
sub rsp, 20h
movsd [rsp+28h+y], xmm1
movsd [rsp+28h+x], xmm0
call _cabs
movsd xmm4, [rsp+28h+x]
movsd xmm3, [rsp+28h+y]
movsd [rsp+28h+var_20], xmm0
movapd xmm1, xmm4; x
movapd xmm0, xmm3; y
call _atan2
movsd xmm2, [rsp+28h+var_20]
mov rax, rbx
movapd xmm1, xmm0
movapd xmm0, xmm2
unpcklpd xmm0, xmm1
movups xmmword ptr [rbx], xmm0
movsd xmm0, cs:qword_2008
movsd qword ptr [rbx+10h], xmm0
movsd xmm0, cs:qword_2010
movsd qword ptr [rbx+18h], xmm0
add rsp, 20h
pop rbx
retn | long long func0(double a1, double a2, long long a3)
{
__m128d v3; // xmm0
long long result; // rax
double v5; // [rsp+8h] [rbp-20h]
v5 = cabs();
v3 = (__m128d)*(unsigned long long *)&a2;
v3.m128d_f64[0] = atan2(a2, a1);
result = a3;
*(__m128d *)a3 = _mm_unpacklo_pd((__m128d)*(unsigned long long *)&v5, v3);
*(_QWORD *)(a3 + 16) = 0xC000000000000000LL;
*(_QWORD *)(a3 + 24) = 0x3CB1A62633145C07LL;
return result;
} | func0:
ENDBR64
PUSH RBX
MOV RBX,RDI
SUB RSP,0x20
MOVSD qword ptr [RSP + 0x10],XMM1
MOVSD qword ptr [RSP + 0x18],XMM0
CALL 0x001010b0
MOVSD XMM4,qword ptr [RSP + 0x18]
MOVSD XMM3,qword ptr [RSP + 0x10]
MOVSD qword ptr [RSP + 0x8],XMM0
MOVAPD XMM1,XMM4
MOVAPD XMM0,XMM3
CALL 0x001010a0
MOVSD XMM2,qword ptr [RSP + 0x8]
MOV RAX,RBX
MOVAPD XMM1,XMM0
MOVAPD XMM0,XMM2
UNPCKLPD XMM0,XMM1
MOVUPS xmmword ptr [RBX],XMM0
MOVSD XMM0,qword ptr [0x00102008]
MOVSD qword ptr [RBX + 0x10],XMM0
MOVSD XMM0,qword ptr [0x00102010]
MOVSD qword ptr [RBX + 0x18],XMM0
ADD RSP,0x20
POP RBX
RET | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(double, double) */
void func0(double param_1,double param_2)
{
double *in_RDI;
double dVar1;
double dVar2;
dVar1 = cabs(param_1);
dVar2 = atan2(param_2,param_1);
*in_RDI = dVar1;
in_RDI[1] = dVar2;
in_RDI[2] = DAT_00102008;
in_RDI[3] = _DAT_00102010;
return;
} |
2,359 | func0 |
#include <complex>
#include <cmath>
#include <cassert>
| std::pair<std::pair<double, double>, std::complex<double>> func0(double x, double y) {
std::complex<double> cn(x, y);
double magnitude = std::abs(cn);
double angle = std::arg(cn);
std::complex<double> cn1 = std::polar(2.0, M_PI);
return {{magnitude, angle}, cn1};
}
| int main() {
assert(func0(3, 4) == std::make_pair(std::make_pair(5.0, 0.9272952180016122), std::complex<double>(-2, 2.4492935982947064e-16)));
assert(func0(4, 7) == std::make_pair(std::make_pair(8.06225774829855, 1.0516502125483738), std::complex<double>(-2, 2.4492935982947064e-16)));
assert(func0(15, 17) == std::make_pair(std::make_pair(22.67156809750927, 0.8478169733934057), std::complex<double>(-2, 2.4492935982947064e-16)));
return 0;
}
| O3 | cpp | func0(double, double):
endbr64
push %r12
mov %rdi,%r12
sub $0x20,%rsp
movsd %xmm1,0x10(%rsp)
movsd %xmm0,0x18(%rsp)
callq 10b0 <cabs@plt>
movsd 0x18(%rsp),%xmm4
movsd 0x10(%rsp),%xmm3
movsd %xmm0,0x8(%rsp)
movapd %xmm4,%xmm1
movapd %xmm3,%xmm0
callq 10a0 <atan2@plt>
movsd 0x8(%rsp),%xmm2
mov %r12,%rax
unpcklpd %xmm0,%xmm2
movsd 0xbf6(%rip),%xmm0
movups %xmm2,(%r12)
movsd %xmm0,0x10(%r12)
movsd 0xbea(%rip),%xmm0
movsd %xmm0,0x18(%r12)
add $0x20,%rsp
pop %r12
retq
nopw %cs:0x0(%rax,%rax,1)
xchg %ax,%ax
| _Z5func0dd:
endbr64
push rbx
mov rbx, rdi
sub rsp, 20h
movsd [rsp+28h+y], xmm1
movsd [rsp+28h+x], xmm0
call _cabs
movsd xmm4, [rsp+28h+x]
movsd xmm3, [rsp+28h+y]
movsd [rsp+28h+var_20], xmm0
movapd xmm1, xmm4; x
movapd xmm0, xmm3; y
call _atan2
movsd xmm2, [rsp+28h+var_20]
mov rax, rbx
movapd xmm1, xmm0
movapd xmm0, xmm2
unpcklpd xmm0, xmm1
movups xmmword ptr [rbx], xmm0
movsd xmm0, cs:qword_2008
movsd qword ptr [rbx+10h], xmm0
movsd xmm0, cs:qword_2010
movsd qword ptr [rbx+18h], xmm0
add rsp, 20h
pop rbx
retn | long long func0(double a1, double a2, long long a3)
{
__m128d v3; // xmm0
long long result; // rax
double v5; // [rsp+8h] [rbp-20h]
v5 = cabs();
v3 = (__m128d)*(unsigned long long *)&a2;
v3.m128d_f64[0] = atan2(a2, a1);
result = a3;
*(__m128d *)a3 = _mm_unpacklo_pd((__m128d)*(unsigned long long *)&v5, v3);
*(_QWORD *)(a3 + 16) = 0xC000000000000000LL;
*(_QWORD *)(a3 + 24) = 0x3CB1A62633145C07LL;
return result;
} | func0:
ENDBR64
PUSH RBX
MOV RBX,RDI
SUB RSP,0x20
MOVSD qword ptr [RSP + 0x10],XMM1
MOVSD qword ptr [RSP + 0x18],XMM0
CALL 0x001010b0
MOVSD XMM4,qword ptr [RSP + 0x18]
MOVSD XMM3,qword ptr [RSP + 0x10]
MOVSD qword ptr [RSP + 0x8],XMM0
MOVAPD XMM1,XMM4
MOVAPD XMM0,XMM3
CALL 0x001010a0
MOVSD XMM2,qword ptr [RSP + 0x8]
MOV RAX,RBX
MOVAPD XMM1,XMM0
MOVAPD XMM0,XMM2
UNPCKLPD XMM0,XMM1
MOVUPS xmmword ptr [RBX],XMM0
MOVSD XMM0,qword ptr [0x00102008]
MOVSD qword ptr [RBX + 0x10],XMM0
MOVSD XMM0,qword ptr [0x00102010]
MOVSD qword ptr [RBX + 0x18],XMM0
ADD RSP,0x20
POP RBX
RET | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(double, double) */
void func0(double param_1,double param_2)
{
double *in_RDI;
double dVar1;
double dVar2;
dVar1 = cabs(param_1);
dVar2 = atan2(param_2,param_1);
*in_RDI = dVar1;
in_RDI[1] = dVar2;
in_RDI[2] = DAT_00102008;
in_RDI[3] = _DAT_00102010;
return;
} |
2,360 | func0 |
#include <vector>
#include <cassert>
| std::vector<int> func0(std::vector<int> newList) {
int size = newList.size();
int temp = newList[0];
newList[0] = newList[size - 1];
newList[size - 1] = temp;
return newList;
}
| int main() {
assert((func0({12, 35, 9, 56, 24}) == std::vector<int>{24, 35, 9, 56, 12}));
assert((func0({1, 2, 3}) == std::vector<int>{3, 2, 1}));
assert((func0({4, 5, 6}) == std::vector<int>{6, 5, 4}));
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> >):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x28,%rsp
mov %rdi,-0x28(%rbp)
mov %rsi,-0x30(%rbp)
mov -0x30(%rbp),%rax
mov %rax,%rdi
callq 1970 <_ZNKSt6vectorIiSaIiEE4sizeEv>
mov %eax,-0x18(%rbp)
mov -0x30(%rbp),%rax
mov $0x0,%esi
mov %rax,%rdi
callq 1998 <_ZNSt6vectorIiSaIiEEixEm>
mov (%rax),%eax
mov %eax,-0x14(%rbp)
mov -0x18(%rbp),%eax
sub $0x1,%eax
movslq %eax,%rdx
mov -0x30(%rbp),%rax
mov %rdx,%rsi
mov %rax,%rdi
callq 1998 <_ZNSt6vectorIiSaIiEEixEm>
mov (%rax),%ebx
mov -0x30(%rbp),%rax
mov $0x0,%esi
mov %rax,%rdi
callq 1998 <_ZNSt6vectorIiSaIiEEixEm>
mov %ebx,(%rax)
mov -0x14(%rbp),%ebx
mov -0x18(%rbp),%eax
sub $0x1,%eax
movslq %eax,%rdx
mov -0x30(%rbp),%rax
mov %rdx,%rsi
mov %rax,%rdi
callq 1998 <_ZNSt6vectorIiSaIiEEixEm>
mov %ebx,(%rax)
mov -0x30(%rbp),%rdx
mov -0x28(%rbp),%rax
mov %rdx,%rsi
mov %rax,%rdi
callq 1946 <_ZNSt6vectorIiSaIiEEC1EOS1_>
mov -0x28(%rbp),%rax
add $0x28,%rsp
pop %rbx
pop %rbp
retq
| _Z5func0St6vectorIiSaIiEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 28h
mov [rbp+var_28], rdi
mov [rbp+var_30], rsi
mov rax, [rbp+var_30]
mov rdi, rax
call _ZNKSt6vectorIiSaIiEE4sizeEv; std::vector<int>::size(void)
mov [rbp+var_18], eax
mov rax, [rbp+var_30]
mov esi, 0
mov rdi, rax
call _ZNSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong)
mov eax, [rax]
mov [rbp+var_14], eax
mov eax, [rbp+var_18]
sub eax, 1
movsxd rdx, eax
mov rax, [rbp+var_30]
mov rsi, rdx
mov rdi, rax
call _ZNSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong)
mov ebx, [rax]
mov rax, [rbp+var_30]
mov esi, 0
mov rdi, rax
call _ZNSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong)
mov [rax], ebx
mov ebx, [rbp+var_14]
mov eax, [rbp+var_18]
sub eax, 1
movsxd rdx, eax
mov rax, [rbp+var_30]
mov rsi, rdx
mov rdi, rax
call _ZNSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong)
mov [rax], ebx
mov rdx, [rbp+var_30]
mov rax, [rbp+var_28]
mov rsi, rdx
mov rdi, rax
call _ZNSt6vectorIiSaIiEEC2EOS1_; std::vector<int>::vector(std::vector<int>&&)
mov rax, [rbp+var_28]
mov rbx, [rbp+var_8]
leave
retn | long long func0(long long a1, long long a2)
{
int v2; // ebx
int v4; // [rsp+18h] [rbp-18h]
int v5; // [rsp+1Ch] [rbp-14h]
v4 = std::vector<int>::size(a2);
v5 = *(_DWORD *)std::vector<int>::operator[](a2, 0LL);
v2 = *(_DWORD *)std::vector<int>::operator[](a2, v4 - 1);
*(_DWORD *)std::vector<int>::operator[](a2, 0LL) = v2;
*(_DWORD *)std::vector<int>::operator[](a2, v4 - 1) = v5;
std::vector<int>::vector(a1, a2);
return a1;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x28
MOV qword ptr [RBP + -0x28],RDI
MOV qword ptr [RBP + -0x30],RSI
MOV RAX,qword ptr [RBP + -0x30]
MOV RDI,RAX
CALL 0x001019de
MOV dword ptr [RBP + -0x18],EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV ESI,0x0
MOV RDI,RAX
CALL 0x00101a06
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x14],EAX
MOV EAX,dword ptr [RBP + -0x18]
SUB EAX,0x1
MOVSXD RDX,EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV RSI,RDX
MOV RDI,RAX
CALL 0x00101a06
MOV EBX,dword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x30]
MOV ESI,0x0
MOV RDI,RAX
CALL 0x00101a06
MOV dword ptr [RAX],EBX
MOV EBX,dword ptr [RBP + -0x14]
MOV EAX,dword ptr [RBP + -0x18]
SUB EAX,0x1
MOVSXD RDX,EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV RSI,RDX
MOV RDI,RAX
CALL 0x00101a06
MOV dword ptr [RAX],EBX
MOV RDX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x28]
MOV RSI,RDX
MOV RDI,RAX
CALL 0x001019b4
MOV RAX,qword ptr [RBP + -0x28]
MOV RBX,qword ptr [RBP + -0x8]
LEAVE
RET | /* func0(std::vector<int, std::allocator<int> >) */
vector<int,std::allocator<int>> * func0(vector param_1)
{
int4 uVar1;
int4 uVar2;
int iVar3;
int4 *puVar4;
vector<int,std::allocator<int>> *in_RSI;
int4 in_register_0000003c;
iVar3 = std::vector<int,std::allocator<int>>::size(in_RSI);
puVar4 = (int4 *)std::vector<int,std::allocator<int>>::operator[](in_RSI,0);
uVar1 = *puVar4;
puVar4 = (int4 *)std::vector<int,std::allocator<int>>::operator[](in_RSI,(long)(iVar3 + -1))
;
uVar2 = *puVar4;
puVar4 = (int4 *)std::vector<int,std::allocator<int>>::operator[](in_RSI,0);
*puVar4 = uVar2;
puVar4 = (int4 *)std::vector<int,std::allocator<int>>::operator[](in_RSI,(long)(iVar3 + -1))
;
*puVar4 = uVar1;
std::vector<int,std::allocator<int>>::vector
((vector<int,std::allocator<int>> *)CONCAT44(in_register_0000003c,param_1),
(vector *)in_RSI);
return (vector<int,std::allocator<int>> *)CONCAT44(in_register_0000003c,param_1);
} |
2,361 | func0 |
#include <vector>
#include <cassert>
| std::vector<int> func0(std::vector<int> newList) {
int size = newList.size();
int temp = newList[0];
newList[0] = newList[size - 1];
newList[size - 1] = temp;
return newList;
}
| int main() {
assert((func0({12, 35, 9, 56, 24}) == std::vector<int>{24, 35, 9, 56, 12}));
assert((func0({1, 2, 3}) == std::vector<int>{3, 2, 1}));
assert((func0({4, 5, 6}) == std::vector<int>{6, 5, 4}));
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> >):
endbr64
mov %rdi,%rax
mov (%rsi),%rcx
mov (%rcx),%edi
mov 0x8(%rsi),%rdx
sub %rcx,%rdx
sar $0x2,%rdx
sub $0x1,%edx
movslq %edx,%rdx
lea (%rcx,%rdx,4),%rdx
mov (%rdx),%r8d
mov %r8d,(%rcx)
mov %edi,(%rdx)
mov %rcx,(%rax)
mov 0x8(%rsi),%rdx
mov %rdx,0x8(%rax)
mov 0x10(%rsi),%rdx
mov %rdx,0x10(%rax)
movq $0x0,0x10(%rsi)
movq $0x0,0x8(%rsi)
movq $0x0,(%rsi)
retq
| _Z5func0St6vectorIiSaIiEE:
endbr64
mov rax, rdi
mov rcx, [rsi]
mov edi, [rcx]
mov rdx, [rsi+8]
sub rdx, rcx
sar rdx, 2
sub edx, 1
movsxd rdx, edx
mov r8d, [rcx+rdx*4]
mov [rcx], r8d
mov rcx, [rsi]
mov [rcx+rdx*4], edi
mov rdx, [rsi]
mov [rax], rdx
mov rdx, [rsi+8]
mov [rax+8], rdx
mov rdx, [rsi+10h]
mov [rax+10h], rdx
mov qword ptr [rsi+10h], 0
mov qword ptr [rsi+8], 0
mov qword ptr [rsi], 0
retn | int ** func0(int **a1, int **a2)
{
int **result; // rax
int v3; // edi
int v4; // edx
result = a1;
v3 = **a2;
v4 = a2[1] - *a2 - 1;
**a2 = (*a2)[v4];
(*a2)[v4] = v3;
*result = *a2;
result[1] = a2[1];
result[2] = a2[2];
a2[2] = 0LL;
a2[1] = 0LL;
*a2 = 0LL;
return result;
} | func0:
ENDBR64
MOV RAX,RDI
MOV RCX,qword ptr [RSI]
MOV EDI,dword ptr [RCX]
MOV RDX,qword ptr [RSI + 0x8]
SUB RDX,RCX
SAR RDX,0x2
SUB EDX,0x1
MOVSXD RDX,EDX
MOV R8D,dword ptr [RCX + RDX*0x4]
MOV dword ptr [RCX],R8D
MOV RCX,qword ptr [RSI]
MOV dword ptr [RCX + RDX*0x4],EDI
MOV RDX,qword ptr [RSI]
MOV qword ptr [RAX],RDX
MOV RDX,qword ptr [RSI + 0x8]
MOV qword ptr [RAX + 0x8],RDX
MOV RDX,qword ptr [RSI + 0x10]
MOV qword ptr [RAX + 0x10],RDX
MOV qword ptr [RSI + 0x10],0x0
MOV qword ptr [RSI + 0x8],0x0
MOV qword ptr [RSI],0x0
RET | /* func0(std::vector<int, std::allocator<int> >) */
void func0(vector param_1)
{
int4 uVar1;
int4 *puVar2;
long lVar3;
long *in_RSI;
int4 in_register_0000003c;
long *plVar4;
plVar4 = (long *)CONCAT44(in_register_0000003c,param_1);
puVar2 = (int4 *)*in_RSI;
uVar1 = *puVar2;
lVar3 = (long)((int)(in_RSI[1] - (long)puVar2 >> 2) + -1);
*puVar2 = puVar2[lVar3];
*(int4 *)(*in_RSI + lVar3 * 4) = uVar1;
*plVar4 = *in_RSI;
plVar4[1] = in_RSI[1];
plVar4[2] = in_RSI[2];
in_RSI[2] = 0;
in_RSI[1] = 0;
*in_RSI = 0;
return;
} |
2,362 | func0 |
#include <vector>
#include <cassert>
| std::vector<int> func0(std::vector<int> newList) {
int size = newList.size();
int temp = newList[0];
newList[0] = newList[size - 1];
newList[size - 1] = temp;
return newList;
}
| int main() {
assert((func0({12, 35, 9, 56, 24}) == std::vector<int>{24, 35, 9, 56, 12}));
assert((func0({1, 2, 3}) == std::vector<int>{3, 2, 1}));
assert((func0({4, 5, 6}) == std::vector<int>{6, 5, 4}));
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> >):
endbr64
mov %rdi,%rax
mov 0x8(%rsi),%rdi
mov (%rsi),%rcx
mov %rdi,%rdx
mov (%rcx),%r8d
sub %rcx,%rdx
sar $0x2,%rdx
sub $0x1,%edx
movslq %edx,%rdx
lea (%rcx,%rdx,4),%rdx
mov (%rdx),%r9d
mov %r9d,(%rcx)
mov %r8d,(%rdx)
mov 0x10(%rsi),%rdx
mov %rcx,(%rax)
mov %rdi,0x8(%rax)
mov %rdx,0x10(%rax)
movq $0x0,0x10(%rsi)
movq $0x0,0x8(%rsi)
movq $0x0,(%rsi)
retq
nopw %cs:0x0(%rax,%rax,1)
| _Z5func0St6vectorIiSaIiEE:
endbr64
movdqu xmm0, xmmword ptr [rsi]
mov rax, rdi
movhlps xmm1, xmm0
movq rcx, xmm0
movq rdx, xmm1
mov edi, [rcx]
sub rdx, rcx
sar rdx, 2
sub edx, 1
movsxd rdx, edx
lea rdx, [rcx+rdx*4]
mov r8d, [rdx]
mov [rcx], r8d
mov [rdx], edi
mov rdx, [rsi+10h]
movups xmmword ptr [rax], xmm0
pxor xmm0, xmm0
mov [rax+10h], rdx
mov qword ptr [rsi+10h], 0
movups xmmword ptr [rsi], xmm0
retn | __m128 * func0(__m128 *a1, const __m128i *a2, double a3, __m128 a4)
{
__m128 v4; // xmm0
__m128 *result; // rax
int v6; // edi
_DWORD *v7; // rdx
long long v8; // rdx
v4 = (__m128)_mm_loadu_si128(a2);
result = a1;
v6 = *(_DWORD *)v4.m128_u64[0];
v7 = (_DWORD *)(v4.m128_u64[0] + 4LL * (int)(((long long)(_mm_movehl_ps(a4, v4).m128_u64[0] - v4.m128_u64[0]) >> 2) - 1));
*(_DWORD *)v4.m128_u64[0] = *v7;
*v7 = v6;
v8 = a2[1].m128i_i64[0];
*result = v4;
result[1].m128_u64[0] = v8;
a2[1].m128i_i64[0] = 0LL;
*a2 = 0LL;
return result;
} | func0:
ENDBR64
MOVDQU XMM0,xmmword ptr [RSI]
MOV RAX,RDI
MOVHLPS XMM1,XMM0
MOVQ RCX,XMM0
MOVQ RDX,XMM1
MOV EDI,dword ptr [RCX]
SUB RDX,RCX
SAR RDX,0x2
SUB EDX,0x1
MOVSXD RDX,EDX
LEA RDX,[RCX + RDX*0x4]
MOV R8D,dword ptr [RDX]
MOV dword ptr [RCX],R8D
MOV dword ptr [RDX],EDI
MOV RDX,qword ptr [RSI + 0x10]
MOVUPS xmmword ptr [RAX],XMM0
PXOR XMM0,XMM0
MOV qword ptr [RAX + 0x10],RDX
MOV qword ptr [RSI + 0x10],0x0
MOVUPS xmmword ptr [RSI],XMM0
RET | /* func0(std::vector<int, std::allocator<int> >) */
void func0(int8 *param_1,int (*param_2) [16])
{
int4 uVar1;
int8 uVar2;
int4 *puVar3;
long lVar4;
puVar3 = *(int4 **)*param_2;
lVar4 = *(long *)(*param_2 + 8);
uVar1 = *puVar3;
*puVar3 = puVar3[(int)(lVar4 - (long)puVar3 >> 2) + -1];
puVar3[(int)(lVar4 - (long)puVar3 >> 2) + -1] = uVar1;
uVar2 = *(int8 *)param_2[1];
*param_1 = puVar3;
param_1[1] = lVar4;
param_1[2] = uVar2;
*(int8 *)param_2[1] = 0;
*param_2 = (int [16])0x0;
return;
} |
2,363 | func0 |
#include <vector>
#include <cassert>
| std::vector<int> func0(std::vector<int> newList) {
int size = newList.size();
int temp = newList[0];
newList[0] = newList[size - 1];
newList[size - 1] = temp;
return newList;
}
| int main() {
assert((func0({12, 35, 9, 56, 24}) == std::vector<int>{24, 35, 9, 56, 12}));
assert((func0({1, 2, 3}) == std::vector<int>{3, 2, 1}));
assert((func0({4, 5, 6}) == std::vector<int>{6, 5, 4}));
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> >):
endbr64
mov (%rsi),%rcx
mov 0x8(%rsi),%rdx
mov %rdi,%rax
pxor %xmm0,%xmm0
movdqu (%rsi),%xmm1
sub %rcx,%rdx
mov (%rcx),%edi
sar $0x2,%rdx
sub $0x1,%edx
movslq %edx,%rdx
lea (%rcx,%rdx,4),%rdx
mov (%rdx),%r8d
mov %r8d,(%rcx)
mov %edi,(%rdx)
mov 0x10(%rsi),%rdx
movups %xmm1,(%rax)
mov %rdx,0x10(%rax)
movq $0x0,0x10(%rsi)
movups %xmm0,(%rsi)
retq
nopl 0x0(%rax,%rax,1)
| _Z5func0St6vectorIiSaIiEE:
endbr64
movdqu xmm0, xmmword ptr [rsi]
mov rax, rdi
movhlps xmm1, xmm0
movq rcx, xmm0
movq rdx, xmm1
mov edi, [rcx]
sub rdx, rcx
sar rdx, 2
sub edx, 1
movsxd rdx, edx
lea rdx, [rcx+rdx*4]
mov r8d, [rdx]
mov [rcx], r8d
mov [rdx], edi
mov rdx, [rsi+10h]
movups xmmword ptr [rax], xmm0
pxor xmm0, xmm0
mov [rax+10h], rdx
mov qword ptr [rsi+10h], 0
movups xmmword ptr [rsi], xmm0
retn | __m128 * func0(__m128 *a1, const __m128i *a2, double a3, __m128 a4)
{
__m128 v4; // xmm0
__m128 *result; // rax
int v6; // edi
_DWORD *v7; // rdx
long long v8; // rdx
v4 = (__m128)_mm_loadu_si128(a2);
result = a1;
v6 = *(_DWORD *)v4.m128_u64[0];
v7 = (_DWORD *)(v4.m128_u64[0] + 4LL * (int)(((long long)(_mm_movehl_ps(a4, v4).m128_u64[0] - v4.m128_u64[0]) >> 2) - 1));
*(_DWORD *)v4.m128_u64[0] = *v7;
*v7 = v6;
v8 = a2[1].m128i_i64[0];
*result = v4;
result[1].m128_u64[0] = v8;
a2[1].m128i_i64[0] = 0LL;
*a2 = 0LL;
return result;
} | func0:
ENDBR64
MOVDQU XMM0,xmmword ptr [RSI]
MOV RAX,RDI
MOVHLPS XMM1,XMM0
MOVQ RCX,XMM0
MOVQ RDX,XMM1
MOV EDI,dword ptr [RCX]
SUB RDX,RCX
SAR RDX,0x2
SUB EDX,0x1
MOVSXD RDX,EDX
LEA RDX,[RCX + RDX*0x4]
MOV R8D,dword ptr [RDX]
MOV dword ptr [RCX],R8D
MOV dword ptr [RDX],EDI
MOV RDX,qword ptr [RSI + 0x10]
MOVUPS xmmword ptr [RAX],XMM0
PXOR XMM0,XMM0
MOV qword ptr [RAX + 0x10],RDX
MOV qword ptr [RSI + 0x10],0x0
MOVUPS xmmword ptr [RSI],XMM0
RET | /* func0(std::vector<int, std::allocator<int> >) */
void func0(int8 *param_1,int (*param_2) [16])
{
int4 uVar1;
int8 uVar2;
int4 *puVar3;
long lVar4;
puVar3 = *(int4 **)*param_2;
lVar4 = *(long *)(*param_2 + 8);
uVar1 = *puVar3;
*puVar3 = puVar3[(int)(lVar4 - (long)puVar3 >> 2) + -1];
puVar3[(int)(lVar4 - (long)puVar3 >> 2) + -1] = uVar1;
uVar2 = *(int8 *)param_2[1];
*param_1 = puVar3;
param_1[1] = lVar4;
param_1[2] = uVar2;
*(int8 *)param_2[1] = 0;
*param_2 = (int [16])0x0;
return;
} |
2,364 | func0 |
#include <vector>
#include <cassert>
| int func0(int n) {
int k = n - 1;
n = n * 2;
std::vector<int> C(k + 1, 0);
C[0] = 1; // nC0 is 1
for (int i = 1; i <= n; i++) {
for (int j = std::min(i, k); j > 0; j--) {
C[j] = C[j] + C[j - 1];
}
}
return C[k];
}
| int main() {
assert(func0(3) == 15);
assert(func0(4) == 56);
assert(func0(1) == 1);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x48,%rsp
mov %edi,-0x44(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x44(%rbp),%eax
sub $0x1,%eax
mov %eax,-0x3c(%rbp)
shll -0x44(%rbp)
lea -0x3d(%rbp),%rax
mov %rax,%rdi
callq 1438 <_ZNSaIiEC1Ev>
movl $0x0,-0x38(%rbp)
mov -0x3c(%rbp),%eax
add $0x1,%eax
movslq %eax,%rsi
lea -0x3d(%rbp),%rcx
lea -0x38(%rbp),%rdx
lea -0x30(%rbp),%rax
mov %rax,%rdi
callq 1478 <_ZNSt6vectorIiSaIiEEC1EmRKiRKS0_>
lea -0x3d(%rbp),%rax
mov %rax,%rdi
callq 1458 <_ZNSaIiED1Ev>
lea -0x30(%rbp),%rax
mov $0x0,%esi
mov %rax,%rdi
callq 1548 <_ZNSt6vectorIiSaIiEEixEm>
movl $0x1,(%rax)
movl $0x1,-0x38(%rbp)
mov -0x38(%rbp),%eax
cmp %eax,-0x44(%rbp)
jl 1312 <_Z5func0i+0x109>
lea -0x3c(%rbp),%rdx
lea -0x38(%rbp),%rax
mov %rdx,%rsi
mov %rax,%rdi
callq 140b <_ZSt3minIiERKT_S2_S2_>
mov (%rax),%eax
mov %eax,-0x34(%rbp)
cmpl $0x0,-0x34(%rbp)
jle 1304 <_Z5func0i+0xfb>
mov -0x34(%rbp),%eax
movslq %eax,%rdx
lea -0x30(%rbp),%rax
mov %rdx,%rsi
mov %rax,%rdi
callq 1548 <_ZNSt6vectorIiSaIiEEixEm>
mov (%rax),%ebx
mov -0x34(%rbp),%eax
sub $0x1,%eax
movslq %eax,%rdx
lea -0x30(%rbp),%rax
mov %rdx,%rsi
mov %rax,%rdi
callq 1548 <_ZNSt6vectorIiSaIiEEixEm>
mov (%rax),%eax
add %eax,%ebx
mov -0x34(%rbp),%eax
movslq %eax,%rdx
lea -0x30(%rbp),%rax
mov %rdx,%rsi
mov %rax,%rdi
callq 1548 <_ZNSt6vectorIiSaIiEEixEm>
mov %ebx,(%rax)
subl $0x1,-0x34(%rbp)
jmp 12ae <_Z5func0i+0xa5>
mov -0x38(%rbp),%eax
add $0x1,%eax
mov %eax,-0x38(%rbp)
jmpq 128e <_Z5func0i+0x85>
mov -0x3c(%rbp),%eax
movslq %eax,%rdx
lea -0x30(%rbp),%rax
mov %rdx,%rsi
mov %rax,%rdi
callq 1548 <_ZNSt6vectorIiSaIiEEixEm>
mov (%rax),%ebx
lea -0x30(%rbp),%rax
mov %rax,%rdi
callq 1500 <_ZNSt6vectorIiSaIiEED1Ev>
mov %ebx,%eax
mov -0x18(%rbp),%rcx
xor %fs:0x28,%rcx
je 136b <_Z5func0i+0x162>
jmp 1366 <_Z5func0i+0x15d>
endbr64
mov %rax,%rbx
lea -0x3d(%rbp),%rax
mov %rax,%rdi
callq 1458 <_ZNSaIiED1Ev>
mov %rbx,%rax
mov %rax,%rdi
callq 1110 <_Unwind_Resume@plt>
callq 1100 <__stack_chk_fail@plt>
add $0x48,%rsp
pop %rbx
pop %rbp
retq
| _Z5func0i:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 58h
mov [rbp+var_54], edi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov eax, [rbp+var_54]
sub eax, 1
mov [rbp+var_44], eax
shl [rbp+var_54], 1
lea rax, [rbp+var_45]
mov [rbp+var_38], rax
nop
nop
mov [rbp+var_40], 0
mov eax, [rbp+var_44]
add eax, 1
movsxd rsi, eax
lea rcx, [rbp+var_45]
lea rdx, [rbp+var_40]
lea rax, [rbp+var_30]
mov rdi, rax
call _ZNSt6vectorIiSaIiEEC2EmRKiRKS0_; std::vector<int>::vector(ulong,int const&,std::allocator<int> const&)
lea rax, [rbp+var_45]
mov rdi, rax
call _ZNSt15__new_allocatorIiED2Ev; std::__new_allocator<int>::~__new_allocator()
nop
lea rax, [rbp+var_30]
mov esi, 0
mov rdi, rax
call _ZNSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong)
mov dword ptr [rax], 1
mov [rbp+var_40], 1
jmp short loc_1326
loc_12AF:
lea rdx, [rbp+var_44]
lea rax, [rbp+var_40]
mov rsi, rdx
mov rdi, rax
call _ZSt3minIiERKT_S2_S2_; std::min<int>(int const&,int const&)
mov eax, [rax]
mov [rbp+var_3C], eax
jmp short loc_1317
loc_12C9:
mov eax, [rbp+var_3C]
movsxd rdx, eax
lea rax, [rbp+var_30]
mov rsi, rdx
mov rdi, rax
call _ZNSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong)
mov ebx, [rax]
mov eax, [rbp+var_3C]
sub eax, 1
movsxd rdx, eax
lea rax, [rbp+var_30]
mov rsi, rdx
mov rdi, rax
call _ZNSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong)
mov eax, [rax]
add ebx, eax
mov eax, [rbp+var_3C]
movsxd rdx, eax
lea rax, [rbp+var_30]
mov rsi, rdx
mov rdi, rax
call _ZNSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong)
mov [rax], ebx
sub [rbp+var_3C], 1
loc_1317:
cmp [rbp+var_3C], 0
jg short loc_12C9
mov eax, [rbp+var_40]
add eax, 1
mov [rbp+var_40], eax
loc_1326:
mov eax, [rbp+var_40]
cmp [rbp+var_54], eax
jge short loc_12AF
mov eax, [rbp+var_44]
movsxd rdx, eax
lea rax, [rbp+var_30]
mov rsi, rdx
mov rdi, rax
call _ZNSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong)
mov ebx, [rax]
lea rax, [rbp+var_30]
mov rdi, rax
call _ZNSt6vectorIiSaIiEED2Ev; std::vector<int>::~vector()
mov eax, ebx
mov rdx, [rbp+var_18]
sub rdx, fs:28h
jz short loc_139C
jmp short loc_1397
endbr64
mov rbx, rax
lea rax, [rbp+var_45]
mov rdi, rax
call _ZNSt15__new_allocatorIiED2Ev; std::__new_allocator<int>::~__new_allocator()
nop
mov rax, rbx
mov rdx, [rbp+var_18]
sub rdx, fs:28h
jz short loc_138F
call ___stack_chk_fail
loc_138F:
mov rdi, rax; struct _Unwind_Exception *
call __Unwind_Resume
loc_1397:
call ___stack_chk_fail
loc_139C:
mov rbx, [rbp+var_8]
leave
retn | long long func0(int a1)
{
int v1; // ebx
int v2; // ebx
unsigned int v3; // ebx
char v5; // [rsp+1Bh] [rbp-45h] BYREF
int v6; // [rsp+1Ch] [rbp-44h] BYREF
int i; // [rsp+20h] [rbp-40h] BYREF
int j; // [rsp+24h] [rbp-3Ch]
char *v9; // [rsp+28h] [rbp-38h]
_BYTE v10[24]; // [rsp+30h] [rbp-30h] BYREF
unsigned long long v11; // [rsp+48h] [rbp-18h]
v11 = __readfsqword(0x28u);
v6 = a1 - 1;
v9 = &v5;
i = 0;
std::vector<int>::vector(v10, a1, &i, &v5);
std::__new_allocator<int>::~__new_allocator(&v5);
*(_DWORD *)std::vector<int>::operator[](v10, 0LL) = 1;
for ( i = 1; 2 * a1 >= i; ++i )
{
for ( j = *(_DWORD *)std::min<int>(&i, &v6); j > 0; --j )
{
v1 = *(_DWORD *)std::vector<int>::operator[](v10, j);
v2 = *(_DWORD *)std::vector<int>::operator[](v10, j - 1) + v1;
*(_DWORD *)std::vector<int>::operator[](v10, j) = v2;
}
}
v3 = *(_DWORD *)std::vector<int>::operator[](v10, v6);
std::vector<int>::~vector(v10);
return v3;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x58
MOV dword ptr [RBP + -0x54],EDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV EAX,dword ptr [RBP + -0x54]
SUB EAX,0x1
MOV dword ptr [RBP + -0x44],EAX
SHL dword ptr [RBP + -0x54],0x1
LEA RAX,[RBP + -0x45]
MOV qword ptr [RBP + -0x38],RAX
NOP
NOP
MOV dword ptr [RBP + -0x40],0x0
MOV EAX,dword ptr [RBP + -0x44]
ADD EAX,0x1
MOVSXD RSI,EAX
LEA RCX,[RBP + -0x45]
LEA RDX,[RBP + -0x40]
LEA RAX,[RBP + -0x30]
MOV RDI,RAX
LAB_0010127d:
CALL 0x00101494
LEA RAX,[RBP + -0x45]
MOV RDI,RAX
CALL 0x00101598
NOP
LEA RAX,[RBP + -0x30]
MOV ESI,0x0
MOV RDI,RAX
CALL 0x00101574
MOV dword ptr [RAX],0x1
MOV dword ptr [RBP + -0x40],0x1
JMP 0x00101326
LAB_001012af:
LEA RDX,[RBP + -0x44]
LEA RAX,[RBP + -0x40]
MOV RSI,RDX
MOV RDI,RAX
CALL 0x00101468
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x3c],EAX
JMP 0x00101317
LAB_001012c9:
MOV EAX,dword ptr [RBP + -0x3c]
MOVSXD RDX,EAX
LEA RAX,[RBP + -0x30]
MOV RSI,RDX
MOV RDI,RAX
CALL 0x00101574
MOV EBX,dword ptr [RAX]
MOV EAX,dword ptr [RBP + -0x3c]
SUB EAX,0x1
MOVSXD RDX,EAX
LEA RAX,[RBP + -0x30]
MOV RSI,RDX
MOV RDI,RAX
CALL 0x00101574
MOV EAX,dword ptr [RAX]
ADD EBX,EAX
MOV EAX,dword ptr [RBP + -0x3c]
MOVSXD RDX,EAX
LEA RAX,[RBP + -0x30]
MOV RSI,RDX
MOV RDI,RAX
CALL 0x00101574
MOV dword ptr [RAX],EBX
SUB dword ptr [RBP + -0x3c],0x1
LAB_00101317:
CMP dword ptr [RBP + -0x3c],0x0
JG 0x001012c9
MOV EAX,dword ptr [RBP + -0x40]
ADD EAX,0x1
MOV dword ptr [RBP + -0x40],EAX
LAB_00101326:
MOV EAX,dword ptr [RBP + -0x40]
CMP dword ptr [RBP + -0x54],EAX
JGE 0x001012af
MOV EAX,dword ptr [RBP + -0x44]
MOVSXD RDX,EAX
LEA RAX,[RBP + -0x30]
MOV RSI,RDX
MOV RDI,RAX
CALL 0x00101574
MOV EBX,dword ptr [RAX]
LEA RAX,[RBP + -0x30]
MOV RDI,RAX
CALL 0x0010151a
MOV EAX,EBX
MOV RDX,qword ptr [RBP + -0x18]
SUB RDX,qword ptr FS:[0x28]
JZ 0x0010139c
JMP 0x00101397
LAB_00101397:
CALL 0x00101120
LAB_0010139c:
MOV RBX,qword ptr [RBP + -0x8]
LEAVE
RET | /* func0(int) */
int4 func0(int param_1)
{
int iVar1;
int iVar2;
int4 uVar3;
int4 *puVar4;
int *piVar5;
long in_FS_OFFSET;
allocator local_4d;
int local_4c;
int local_48;
int local_44;
allocator *local_40;
vector<int,std::allocator<int>> local_38 [24];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
local_4c = param_1 + -1;
local_40 = &local_4d;
local_48 = 0;
/* try { // try from 0010127d to 00101281 has its CatchHandler @ 00101364 */
std::vector<int,std::allocator<int>>::vector(local_38,(long)param_1,&local_48,&local_4d);
std::__new_allocator<int>::~__new_allocator((__new_allocator<int> *)&local_4d);
puVar4 = (int4 *)std::vector<int,std::allocator<int>>::operator[](local_38,0);
*puVar4 = 1;
for (local_48 = 1; local_48 <= param_1 << 1; local_48 = local_48 + 1) {
piVar5 = std::min<int>(&local_48,&local_4c);
for (local_44 = *piVar5; 0 < local_44; local_44 = local_44 + -1) {
piVar5 = (int *)std::vector<int,std::allocator<int>>::operator[](local_38,(long)local_44);
iVar1 = *piVar5;
piVar5 = (int *)std::vector<int,std::allocator<int>>::operator[]
(local_38,(long)(local_44 + -1));
iVar2 = *piVar5;
piVar5 = (int *)std::vector<int,std::allocator<int>>::operator[](local_38,(long)local_44);
*piVar5 = iVar1 + iVar2;
}
}
puVar4 = (int4 *)std::vector<int,std::allocator<int>>::operator[](local_38,(long)local_4c);
uVar3 = *puVar4;
std::vector<int,std::allocator<int>>::~vector(local_38);
if (local_20 != *(long *)(in_FS_OFFSET + 0x28)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return uVar3;
} |
2,365 | func0 |
#include <vector>
#include <cassert>
| int func0(int n) {
int k = n - 1;
n = n * 2;
std::vector<int> C(k + 1, 0);
C[0] = 1; // nC0 is 1
for (int i = 1; i <= n; i++) {
for (int j = std::min(i, k); j > 0; j--) {
C[j] = C[j] + C[j - 1];
}
}
return C[k];
}
| int main() {
assert(func0(3) == 15);
assert(func0(4) == 56);
assert(func0(1) == 1);
return 0;
}
| O1 | cpp | func0(int):
endbr64
push %r12
push %rbp
push %rbx
lea -0x1(%rdi),%ebx
lea (%rdi,%rdi,1),%ebp
movslq %edi,%rdi
movabs $0x1fffffffffffffff,%rax
cmp %rax,%rdi
ja 120d <_Z5func0i+0x64>
test %rdi,%rdi
je 1255 <_Z5func0i+0xac>
lea 0x0(,%rdi,4),%r12
mov %r12,%rdi
callq 10b0 <_Znwm@plt>
lea (%rax,%r12,1),%rcx
mov %rax,%rdx
movl $0x0,(%rdx)
add $0x4,%rdx
cmp %rcx,%rdx
jne 11e9 <_Z5func0i+0x40>
movl $0x1,(%rax)
test %ebp,%ebp
jle 1265 <_Z5func0i+0xbc>
mov $0x1,%edi
lea -0x4(%rax),%r8
jmp 1222 <_Z5func0i+0x79>
lea 0xdf4(%rip),%rdi
callq 1080 <_ZSt20__throw_length_errorPKc@plt>
lea 0x1(%rdi),%edx
cmp %edi,%ebp
je 1265 <_Z5func0i+0xbc>
mov %edx,%edi
cmp %ebx,%edi
mov %ebx,%ecx
cmovle %edi,%ecx
test %ecx,%ecx
jle 1219 <_Z5func0i+0x70>
movslq %ecx,%rsi
shl $0x2,%rsi
lea (%rax,%rsi,1),%rdx
add %r8,%rsi
lea -0x1(%rcx),%ecx
shl $0x2,%rcx
sub %rcx,%rsi
mov -0x4(%rdx),%ecx
add %ecx,(%rdx)
sub $0x4,%rdx
cmp %rdx,%rsi
jne 1245 <_Z5func0i+0x9c>
jmp 1219 <_Z5func0i+0x70>
movl $0x1,0x0
mov $0x0,%eax
movslq %ebx,%rbx
mov (%rax,%rbx,4),%ebx
mov %rax,%rdi
callq 10a0 <_ZdlPv@plt>
mov %ebx,%eax
pop %rbx
pop %rbp
pop %r12
retq
| _Z5func0i:
endbr64
push r12
push rbp
push rbx
movsxd rbp, edi
mov rax, rbp
shr rax, 3Dh
jnz short loc_1203
mov r12d, edi
lea ebx, [rdi-1]
test rbp, rbp
jz loc_125F
shl rbp, 2
mov rdi, rbp; unsigned __int64
call __Znwm; operator new(ulong)
mov rdi, rax
lea rdx, [rax+rbp]
loc_11DF:
mov dword ptr [rax], 0
add rax, 4
cmp rdx, rax
jnz short loc_11DF
mov dword ptr [rdi], 1
lea r8d, [r12+r12]
mov esi, 1
lea r9, [rdi-4]
jmp short loc_1211
loc_1203:
lea rdi, aCannotCreateSt; "cannot create std::vector larger than m"...
call __ZSt20__throw_length_errorPKc; std::__throw_length_error(char const*)
loc_120F:
mov esi, eax
loc_1211:
cmp esi, ebx
mov edx, ebx
cmovle edx, esi
test edx, edx
jle short loc_1242
movsxd rcx, edx
shl rcx, 2
lea rax, [rdi+rcx]
add rcx, r9
lea edx, [rdx-1]
shl rdx, 2
sub rcx, rdx
loc_1234:
mov edx, [rax-4]
add [rax], edx
sub rax, 4
cmp rcx, rax
jnz short loc_1234
loc_1242:
lea eax, [rsi+1]
cmp esi, r8d
jnz short loc_120F
loc_124A:
movsxd rbx, ebx
mov ebx, [rdi+rbx*4]
mov rsi, rbp; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
mov eax, ebx
pop rbx
pop rbp
pop r12
retn
loc_125F:
mov ds:dword_0, 1
mov edi, 0
jmp short loc_124A | long long func0(int a1)
{
unsigned long long v1; // rbp
int v3; // ebx
_DWORD *v4; // rax
_DWORD *v5; // rdi
_DWORD *v6; // rdx
int i; // esi
int v8; // edx
long long v9; // rcx
_DWORD *v10; // rax
long long v11; // rcx
unsigned int v12; // ebx
v1 = a1;
if ( (unsigned long long)a1 >> 61 )
std::__throw_length_error("cannot create std::vector larger than max_size()");
v3 = a1 - 1;
if ( a1 )
{
v1 = 4LL * a1;
v4 = (_DWORD *)operator new(v1);
v5 = v4;
v6 = (_DWORD *)((char *)v4 + v1);
do
*v4++ = 0;
while ( v6 != v4 );
*v5 = 1;
for ( i = 1; ; ++i )
{
v8 = v3;
if ( i <= v3 )
v8 = i;
if ( v8 > 0 )
{
v9 = v8;
v10 = &v5[v9];
v11 = (long long)&v5[v9 - 1 - (unsigned int)(v8 - 1)];
do
{
*v10 += *(v10 - 1);
--v10;
}
while ( (_DWORD *)v11 != v10 );
}
if ( i == 2 * a1 )
break;
}
}
else
{
dword_0 = 1;
v5 = 0LL;
}
v12 = v5[v3];
operator delete(v5, v1);
return v12;
} | func0:
ENDBR64
PUSH R12
PUSH RBP
PUSH RBX
MOVSXD RBP,EDI
MOV RAX,RBP
SHR RAX,0x3d
JNZ 0x00101203
MOV R12D,EDI
LEA EBX,[RDI + -0x1]
TEST RBP,RBP
JZ 0x0010125f
SHL RBP,0x2
MOV RDI,RBP
CALL 0x001010a0
MOV RDI,RAX
LEA RDX,[RAX + RBP*0x1]
LAB_001011df:
MOV dword ptr [RAX],0x0
ADD RAX,0x4
CMP RDX,RAX
JNZ 0x001011df
MOV dword ptr [RDI],0x1
LEA R8D,[R12 + R12*0x1]
MOV ESI,0x1
LEA R9,[RDI + -0x4]
JMP 0x00101211
LAB_00101203:
LEA RDI,[0x102008]
CALL 0x00101080
LAB_0010120f:
MOV ESI,EAX
LAB_00101211:
CMP ESI,EBX
MOV EDX,EBX
CMOVLE EDX,ESI
TEST EDX,EDX
JLE 0x00101242
MOVSXD RCX,EDX
SHL RCX,0x2
LEA RAX,[RDI + RCX*0x1]
ADD RCX,R9
LEA EDX,[RDX + -0x1]
SHL RDX,0x2
SUB RCX,RDX
LAB_00101234:
MOV EDX,dword ptr [RAX + -0x4]
ADD dword ptr [RAX],EDX
SUB RAX,0x4
CMP RCX,RAX
JNZ 0x00101234
LAB_00101242:
LEA EAX,[RSI + 0x1]
CMP ESI,R8D
JNZ 0x0010120f
LAB_0010124a:
MOVSXD RBX,EBX
MOV EBX,dword ptr [RDI + RBX*0x4]
MOV RSI,RBP
CALL 0x001010b0
MOV EAX,EBX
POP RBX
POP RBP
POP R12
RET
LAB_0010125f:
MOV dword ptr [0x00000000],0x1
MOV EDI,0x0
JMP 0x0010124a | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(int) */
int4 func0(int param_1)
{
int4 uVar1;
int iVar2;
char *pcVar3;
char *pcVar4;
int *piVar5;
int iVar6;
int unaff_EBX;
ulong uVar7;
ulong in_R8;
char *in_R9;
bool bVar8;
uVar7 = (ulong)param_1;
if (uVar7 >> 0x3d == 0) {
unaff_EBX = param_1 + -1;
if (uVar7 == 0) {
_DAT_00000000 = 1;
pcVar3 = (char *)0x0;
goto LAB_0010124a;
}
pcVar3 = (char *)operator_new(uVar7 * 4);
pcVar4 = pcVar3;
do {
pcVar4[0] = '\0';
pcVar4[1] = '\0';
pcVar4[2] = '\0';
pcVar4[3] = '\0';
pcVar4 = pcVar4 + 4;
} while (pcVar3 + uVar7 * 4 != pcVar4);
pcVar3[0] = '\x01';
pcVar3[1] = '\0';
pcVar3[2] = '\0';
pcVar3[3] = '\0';
in_R8 = (ulong)(uint)(param_1 * 2);
in_R9 = pcVar3 + -4;
uVar7 = uVar7 * 4;
iVar2 = 1;
}
else {
pcVar3 = "cannot create std::vector larger than max_size()";
iVar2 = std::__throw_length_error("cannot create std::vector larger than max_size()");
}
do {
iVar6 = unaff_EBX;
if (iVar2 <= unaff_EBX) {
iVar6 = iVar2;
}
if (0 < iVar6) {
piVar5 = (int *)(pcVar3 + (long)iVar6 * 4);
do {
*piVar5 = *piVar5 + piVar5[-1];
piVar5 = piVar5 + -1;
} while ((int *)(in_R9 + ((long)iVar6 - (ulong)(iVar6 - 1)) * 4) != piVar5);
}
bVar8 = iVar2 != (int)in_R8;
iVar2 = iVar2 + 1;
} while (bVar8);
LAB_0010124a:
uVar1 = *(int4 *)(pcVar3 + (long)unaff_EBX * 4);
operator_delete(pcVar3,uVar7);
return uVar1;
} |
2,366 | func0 |
#include <vector>
#include <cassert>
| int func0(int n) {
int k = n - 1;
n = n * 2;
std::vector<int> C(k + 1, 0);
C[0] = 1; // nC0 is 1
for (int i = 1; i <= n; i++) {
for (int j = std::min(i, k); j > 0; j--) {
C[j] = C[j] + C[j - 1];
}
}
return C[k];
}
| int main() {
assert(func0(3) == 15);
assert(func0(4) == 56);
assert(func0(1) == 1);
return 0;
}
| O2 | cpp | func0(int):
endbr64
movabs $0x1fffffffffffffff,%rax
push %r12
push %rbp
lea (%rdi,%rdi,1),%ebp
push %rbx
lea -0x1(%rdi),%ebx
movslq %edi,%rdi
cmp %rax,%rdi
ja 1332 <_Z5func0i+0xe2>
test %rdi,%rdi
je 1325 <_Z5func0i+0xd5>
lea 0x0(,%rdi,4),%r12
mov %r12,%rdi
callq 10b0 <_Znwm@plt>
mov %rax,%r8
lea (%rax,%r12,1),%rax
mov %r8,%rdx
nopw 0x0(%rax,%rax,1)
movl $0x0,(%rdx)
add $0x4,%rdx
cmp %rax,%rdx
jne 12a0 <_Z5func0i+0x50>
movl $0x1,(%r8)
test %ebp,%ebp
jle 1310 <_Z5func0i+0xc0>
mov $0x1,%edi
lea -0x4(%r8),%rax
nopl 0x0(%rax,%rax,1)
cmp %ebx,%edi
mov %ebx,%ecx
cmovle %edi,%ecx
test %ecx,%ecx
jle 12fe <_Z5func0i+0xae>
movslq %ecx,%rsi
sub $0x1,%ecx
shl $0x2,%rsi
shl $0x2,%rcx
lea (%r8,%rsi,1),%rdx
add %rax,%rsi
sub %rcx,%rsi
nopl 0x0(%rax,%rax,1)
mov -0x4(%rdx),%ecx
add %ecx,(%rdx)
sub $0x4,%rdx
cmp %rsi,%rdx
jne 12f0 <_Z5func0i+0xa0>
lea 0x1(%rdi),%edx
cmp %edi,%ebp
je 1310 <_Z5func0i+0xc0>
mov %edx,%edi
jmp 12c8 <_Z5func0i+0x78>
nopl 0x0(%rax)
mov -0x4(%r8,%r12,1),%r12d
mov %r8,%rdi
callq 10a0 <_ZdlPv@plt>
pop %rbx
pop %rbp
mov %r12d,%eax
pop %r12
retq
movl $0x0,0x0
ud2
lea 0xccf(%rip),%rdi
callq 1080 <_ZSt20__throw_length_errorPKc@plt>
xchg %ax,%ax
| _Z5func0i:
endbr64
push r12
push rbp
push rbx
movsxd rbx, edi
mov rax, rbx
shr rax, 3Dh
jnz loc_1344
test rbx, rbx
jz loc_1337
mov r12, rbx
lea ebp, [rbx-1]
shl rbx, 2
mov rdi, rbx; unsigned __int64
call __Znwm; operator new(ulong)
mov rdx, rbx; n
xor esi, esi; c
mov rdi, rax; s
call _memset
lea r9d, [r12+r12]
mov edi, 1
mov dword ptr [rax], 1
mov r8, rax
lea r10, [rax-4]
nop word ptr [rax+rax+00000000h]
loc_12D0:
cmp edi, ebp
mov edx, ebp
cmovle edx, edi
test edx, edx
jz short loc_130B
movsxd rsi, edx
sub edx, 1
shl rsi, 2
shl rdx, 2
lea rax, [r8+rsi]
add rsi, r10
mov ecx, [rax]
sub rsi, rdx
nop dword ptr [rax]
loc_12F8:
mov edx, ecx
mov ecx, [rax-4]
sub rax, 4
add edx, ecx
mov [rax+4], edx
cmp rsi, rax
jnz short loc_12F8
loc_130B:
lea eax, [rdi+1]
cmp edi, r9d
jz short loc_1320
mov edi, eax
jmp short loc_12D0
loc_1320:
mov ebp, [r8+rbx-4]
mov rsi, rbx; unsigned __int64
mov rdi, r8; void *
call __ZdlPvm; operator delete(void *,ulong)
pop rbx
mov eax, ebp
pop rbp
pop r12
retn
loc_1337:
mov ds:dword_0, 0
ud2
loc_1344:
lea rdi, aCannotCreateSt; "cannot create std::vector larger than m"...
call __ZSt20__throw_length_errorPKc; std::__throw_length_error(char const*) | long long func0(int a1)
{
int v1; // ebp
unsigned long long v2; // rbx
void *v3; // rax
char *v4; // rax
int v5; // r9d
int v6; // edi
char *v7; // r8
char *v8; // r10
int v9; // edx
long long v10; // rsi
char *v11; // rax
int v12; // ecx
long long v13; // rsi
int v14; // edx
unsigned int v15; // ebp
if ( (unsigned long long)a1 >> 61 )
std::__throw_length_error("cannot create std::vector larger than max_size()");
if ( !a1 )
{
dword_0 = 0;
BUG();
}
v1 = a1 - 1;
v2 = 4LL * a1;
v3 = (void *)operator new(v2);
v4 = (char *)memset(v3, 0, v2);
v5 = 2 * a1;
v6 = 1;
*(_DWORD *)v4 = 1;
v7 = v4;
v8 = v4 - 4;
while ( 1 )
{
v9 = v1;
if ( v6 <= v1 )
v9 = v6;
if ( v9 )
{
v10 = 4LL * v9;
v11 = &v7[v10];
v12 = *(_DWORD *)&v7[v10];
v13 = (long long)&v8[v10 + -4 * (unsigned int)(v9 - 1)];
do
{
v14 = v12;
v12 = *((_DWORD *)v11 - 1);
v11 -= 4;
*((_DWORD *)v11 + 1) = v12 + v14;
}
while ( (char *)v13 != v11 );
}
if ( v6 == v5 )
break;
++v6;
}
v15 = *(_DWORD *)&v7[v2 - 4];
operator delete(v7, v2);
return v15;
} | func0:
ENDBR64
PUSH R12
PUSH RBP
PUSH RBX
MOVSXD RBX,EDI
MOV RAX,RBX
SHR RAX,0x3d
JNZ 0x00101344
TEST RBX,RBX
JZ 0x00101337
MOV R12,RBX
LEA EBP,[RBX + -0x1]
SHL RBX,0x2
MOV RDI,RBX
CALL 0x001010c0
MOV RDX,RBX
XOR ESI,ESI
MOV RDI,RAX
CALL 0x001010a0
LEA R9D,[R12 + R12*0x1]
MOV EDI,0x1
MOV dword ptr [RAX],0x1
MOV R8,RAX
LEA R10,[RAX + -0x4]
NOP word ptr CS:[RAX + RAX*0x1]
LAB_001012d0:
CMP EDI,EBP
MOV EDX,EBP
CMOVLE EDX,EDI
TEST EDX,EDX
JZ 0x0010130b
MOVSXD RSI,EDX
SUB EDX,0x1
SHL RSI,0x2
SHL RDX,0x2
LEA RAX,[R8 + RSI*0x1]
ADD RSI,R10
MOV ECX,dword ptr [RAX]
SUB RSI,RDX
NOP dword ptr [RAX]
LAB_001012f8:
MOV EDX,ECX
MOV ECX,dword ptr [RAX + -0x4]
SUB RAX,0x4
ADD EDX,ECX
MOV dword ptr [RAX + 0x4],EDX
CMP RSI,RAX
JNZ 0x001012f8
LAB_0010130b:
LEA EAX,[RDI + 0x1]
CMP EDI,R9D
JZ 0x00101320
MOV EDI,EAX
JMP 0x001012d0
LAB_00101320:
MOV EBP,dword ptr [R8 + RBX*0x1 + -0x4]
MOV RSI,RBX
MOV RDI,R8
CALL 0x001010d0
POP RBX
MOV EAX,EBP
POP RBP
POP R12
RET
LAB_00101337:
MOV dword ptr [0x00000000],0x0
UD2
LAB_00101344:
LEA RDI,[0x102008]
CALL 0x00101090 | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(int) */
ulong func0(int param_1)
{
int *piVar1;
uint uVar2;
code *pcVar3;
void *__s;
int4 *puVar4;
int *piVar5;
int *piVar6;
int iVar7;
int iVar8;
ulong uVar9;
ulong __n;
int iVar10;
bool bVar11;
uVar9 = (ulong)param_1;
if (uVar9 >> 0x3d != 0) {
uVar9 = std::__throw_length_error("cannot create std::vector larger than max_size()");
return uVar9;
}
if (uVar9 == 0) {
_DAT_00000000 = 0;
/* WARNING: Does not return */
pcVar3 = (code *)invalidInstructionException();
(*pcVar3)();
}
__n = uVar9 * 4;
__s = operator_new(__n);
puVar4 = (int4 *)memset(__s,0,__n);
*puVar4 = 1;
iVar10 = 1;
do {
iVar8 = param_1 + -1;
if (iVar10 <= param_1 + -1) {
iVar8 = iVar10;
}
if (iVar8 != 0) {
piVar5 = puVar4 + iVar8;
iVar7 = puVar4[iVar8];
do {
piVar1 = piVar5 + -1;
piVar6 = piVar5 + -1;
*piVar5 = iVar7 + *piVar1;
piVar5 = piVar6;
iVar7 = *piVar1;
} while (puVar4 + (long)iVar8 + (-1 - (ulong)(iVar8 - 1)) != piVar6);
}
bVar11 = iVar10 != param_1 * 2;
iVar10 = iVar10 + 1;
} while (bVar11);
uVar2 = puVar4[uVar9 - 1];
operator_delete(puVar4,__n);
return (ulong)uVar2;
} |
2,367 | func0 |
#include <vector>
#include <cassert>
| int func0(int n) {
int k = n - 1;
n = n * 2;
std::vector<int> C(k + 1, 0);
C[0] = 1; // nC0 is 1
for (int i = 1; i <= n; i++) {
for (int j = std::min(i, k); j > 0; j--) {
C[j] = C[j] + C[j - 1];
}
}
return C[k];
}
| int main() {
assert(func0(3) == 15);
assert(func0(4) == 56);
assert(func0(1) == 1);
return 0;
}
| O3 | cpp | func0(int):
endbr64
movabs $0x1fffffffffffffff,%rax
push %r12
push %rbp
lea (%rdi,%rdi,1),%ebp
push %rbx
lea -0x1(%rdi),%ebx
movslq %edi,%rdi
cmp %rax,%rdi
ja 1406 <_Z5func0i+0x196>
test %rdi,%rdi
je 13f9 <_Z5func0i+0x189>
lea 0x0(,%rdi,4),%r12
mov %r12,%rdi
callq 10d0 <_Znwm@plt>
mov %r12,%rdx
xor %esi,%esi
mov %rax,%rdi
callq 10a0 <memset@plt>
movl $0x1,(%rax)
mov %rax,%rdi
test %ebp,%ebp
jle 13e7 <_Z5func0i+0x177>
mov $0x1,%r8d
lea -0x4(%rax),%r9
nopl (%rax)
cmp %ebx,%r8d
mov %ebx,%r10d
cmovle %r8d,%r10d
test %r10d,%r10d
jle 13aa <_Z5func0i+0x13a>
movslq %r10d,%rax
lea 0x0(,%rax,4),%rcx
lea -0x10(,%rax,4),%rsi
lea 0x4(%rcx),%rax
lea -0xc(%rcx),%rdx
cmp %rax,%rsi
setge %r11b
cmp %rcx,%rdx
setge %al
or %al,%r11b
lea -0x1(%r10),%r11d
je 13c0 <_Z5func0i+0x150>
cmp $0x2,%r11d
jbe 13c0 <_Z5func0i+0x150>
mov %r10d,%ecx
add %rdi,%rdx
add %rdi,%rsi
xor %eax,%eax
shr $0x2,%ecx
neg %rcx
shl $0x4,%rcx
movdqu (%rdx,%rax,1),%xmm2
movdqu (%rsi,%rax,1),%xmm3
pshufd $0x1b,%xmm2,%xmm0
pshufd $0x1b,%xmm3,%xmm1
paddd %xmm1,%xmm0
pshufd $0x1b,%xmm0,%xmm0
movups %xmm0,(%rdx,%rax,1)
sub $0x10,%rax
cmp %rcx,%rax
jne 1340 <_Z5func0i+0xd0>
mov %r10d,%ecx
and $0x3,%ecx
and $0x3,%r10d
je 13aa <_Z5func0i+0x13a>
lea -0x1(%rcx),%r10d
movslq %ecx,%rdx
movslq %r10d,%rax
shl $0x2,%rax
lea (%rdi,%rax,1),%rsi
mov (%rsi),%r11d
add %r11d,(%rdi,%rdx,4)
test %r10d,%r10d
je 13aa <_Z5func0i+0x13a>
lea -0x4(%rdi,%rax,1),%rdx
mov (%rdx),%r10d
add %r10d,(%rsi)
cmp $0x2,%ecx
je 13aa <_Z5func0i+0x13a>
mov -0x8(%rdi,%rax,1),%eax
add %eax,(%rdx)
lea 0x1(%r8),%eax
cmp %ebp,%r8d
je 13e7 <_Z5func0i+0x177>
mov %eax,%r8d
jmpq 12d8 <_Z5func0i+0x68>
nopl 0x0(%rax,%rax,1)
lea (%rdi,%rcx,1),%rax
shl $0x2,%r11
add %r9,%rcx
sub %r11,%rcx
xchg %ax,%ax
mov -0x4(%rax),%edx
add %edx,(%rax)
sub $0x4,%rax
cmp %rax,%rcx
jne 13d0 <_Z5func0i+0x160>
lea 0x1(%r8),%eax
cmp %ebp,%r8d
jne 13b3 <_Z5func0i+0x143>
mov -0x4(%rdi,%r12,1),%r12d
callq 10c0 <_ZdlPv@plt>
pop %rbx
pop %rbp
mov %r12d,%eax
pop %r12
retq
movl $0x0,0x0
ud2
lea 0xbfb(%rip),%rdi
callq 1090 <_ZSt20__throw_length_errorPKc@plt>
nopw %cs:0x0(%rax,%rax,1)
nopl 0x0(%rax)
| _Z5func0i:
endbr64
push r12
push rbp
push rbx
movsxd rbx, edi
mov rax, rbx
shr rax, 3Dh
jnz loc_13C9
test rbx, rbx
jz loc_13BC
mov r12, rbx
lea ebp, [rbx-1]
shl rbx, 2
mov rdi, rbx; unsigned __int64
call __Znwm; operator new(ulong)
xor esi, esi; c
mov rdx, rbx; n
mov rdi, rax; s
call _memset
lea r8d, [r12+r12]
mov esi, 1
mov dword ptr [rax], 1
mov rdi, rax; void *
nop word ptr [rax+rax+00h]
loc_12C8:
cmp esi, ebp
movsxd rdx, ebp
cmovle rdx, rsi
test edx, edx
jz loc_1387
cmp edx, 3
jle loc_13B3
mov ecx, edx
movsxd rax, edx
shr ecx, 2
shl rax, 2
neg rcx
lea r9, [rdi+rax-0Ch]
lea r10, [rdi+rax-10h]
xor eax, eax
shl rcx, 4
nop dword ptr [rax+00000000h]
loc_1308:
movdqu xmm0, xmmword ptr [r9+rax]
movdqu xmm2, xmmword ptr [r10+rax]
paddd xmm0, xmm2
movups xmmword ptr [r9+rax], xmm0
sub rax, 10h
cmp rcx, rax
jnz short loc_1308
mov ecx, edx
mov eax, edx
and ecx, 0FFFFFFFCh
and eax, 3
test dl, 3
jz short loc_1387
loc_1335:
mov r10d, edx
sub r10d, ecx
cmp r10d, 1
jz short loc_137A
add ecx, 1
shl rdx, 2
neg rcx
shl rcx, 2
lea r9, [rdx+rcx]
add rdx, rdi
add r9, rdi
movq xmm0, qword ptr [rcx+rdx-4]
movq xmm1, qword ptr [r9]
paddd xmm0, xmm1
movq qword ptr [r9], xmm0
test r10b, 1
jz short loc_1387
and r10d, 0FFFFFFFEh
sub eax, r10d
loc_137A:
cdqe
shl rax, 2
mov edx, [rdi+rax-4]
add [rdi+rax], edx
loc_1387:
lea eax, [rsi+1]
cmp r8d, esi
jz short loc_13A0
movsxd rsi, eax
jmp loc_12C8
loc_13A0:
mov ebp, [rdi+rbx-4]
mov rsi, rbx; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
pop rbx
mov eax, ebp
pop rbp
pop r12
retn
loc_13B3:
mov eax, edx
xor ecx, ecx
jmp loc_1335
loc_13BC:
mov ds:dword_0, 0
ud2
loc_13C9:
lea rdi, aCannotCreateSt; "cannot create std::vector larger than m"...
call __ZSt20__throw_length_errorPKc; std::__throw_length_error(char const*) | long long func0(int a1)
{
int v1; // ebp
unsigned long long v2; // rbx
void *v3; // rax
_DWORD *v4; // rax
int v5; // r8d
long long v6; // rsi
_DWORD *v7; // rdi
long long v8; // rdx
long long v9; // rax
long long v10; // r9
long long v11; // r10
long long v12; // rax
int v13; // ecx
int v14; // eax
int v15; // r10d
unsigned int v16; // ebp
if ( (unsigned long long)a1 >> 61 )
std::__throw_length_error("cannot create std::vector larger than max_size()");
if ( !a1 )
{
dword_0 = 0;
BUG();
}
v1 = a1 - 1;
v2 = 4LL * a1;
v3 = (void *)operator new(v2);
v4 = memset(v3, 0, v2);
v5 = 2 * a1;
v6 = 1LL;
*v4 = 1;
v7 = v4;
while ( 1 )
{
v8 = v1;
if ( (int)v6 <= v1 )
v8 = v6;
if ( (_DWORD)v8 )
{
if ( (int)v8 <= 3 )
{
v14 = v8;
v13 = 0;
}
else
{
v9 = (int)v8;
v10 = (long long)&v7[v9 - 3];
v11 = (long long)&v7[v9 - 4];
v12 = 0LL;
do
{
*(__m128i *)(v10 + v12) = _mm_add_epi32(
_mm_loadu_si128((const __m128i *)(v10 + v12)),
_mm_loadu_si128((const __m128i *)(v11 + v12)));
v12 -= 16LL;
}
while ( -16LL * ((unsigned int)v8 >> 2) != v12 );
v13 = v8 & 0x7FFFFFFC;
v14 = v8 & 3;
if ( (v8 & 3) == 0 )
goto LABEL_15;
}
v15 = v8 - v13;
if ( (_DWORD)v8 - v13 != 1 )
{
*(_QWORD *)((char *)v7 + 4 * v8 - 4LL * (unsigned int)(v13 + 1)) = _mm_add_epi32(
_mm_loadl_epi64((const __m128i *)&v7[v8 - (unsigned int)(v13 + 1) - 1]),
_mm_loadl_epi64((const __m128i *)((char *)v7 + 4 * v8 - 4LL * (unsigned int)(v13 + 1)))).m128i_u64[0];
if ( (v15 & 1) == 0 )
goto LABEL_15;
v14 -= v15 & 0xFFFFFFFE;
}
v7[v14] += v7[v14 - 1];
}
LABEL_15:
if ( v5 == (_DWORD)v6 )
break;
v6 = (int)v6 + 1;
}
v16 = v7[v2 / 4 - 1];
operator delete(v7, v2);
return v16;
} | func0:
ENDBR64
PUSH R12
PUSH RBP
PUSH RBX
MOVSXD RBX,EDI
MOV RAX,RBX
SHR RAX,0x3d
JNZ 0x001013c9
TEST RBX,RBX
JZ 0x001013bc
MOV R12,RBX
LEA EBP,[RBX + -0x1]
SHL RBX,0x2
MOV RDI,RBX
CALL 0x001010c0
XOR ESI,ESI
MOV RDX,RBX
MOV RDI,RAX
CALL 0x001010a0
LEA R8D,[R12 + R12*0x1]
MOV ESI,0x1
MOV dword ptr [RAX],0x1
MOV RDI,RAX
NOP word ptr [RAX + RAX*0x1]
LAB_001012c8:
CMP ESI,EBP
MOVSXD RDX,EBP
CMOVLE RDX,RSI
TEST EDX,EDX
JZ 0x00101387
CMP EDX,0x3
JLE 0x001013b3
MOV ECX,EDX
MOVSXD RAX,EDX
SHR ECX,0x2
SHL RAX,0x2
NEG RCX
LEA R9,[RDI + RAX*0x1 + -0xc]
LEA R10,[RDI + RAX*0x1 + -0x10]
XOR EAX,EAX
SHL RCX,0x4
NOP dword ptr [RAX]
LAB_00101308:
MOVDQU XMM0,xmmword ptr [R9 + RAX*0x1]
MOVDQU XMM2,xmmword ptr [R10 + RAX*0x1]
PADDD XMM0,XMM2
MOVUPS xmmword ptr [R9 + RAX*0x1],XMM0
SUB RAX,0x10
CMP RCX,RAX
JNZ 0x00101308
MOV ECX,EDX
MOV EAX,EDX
AND ECX,0xfffffffc
AND EAX,0x3
TEST DL,0x3
JZ 0x00101387
LAB_00101335:
MOV R10D,EDX
SUB R10D,ECX
CMP R10D,0x1
JZ 0x0010137a
ADD ECX,0x1
SHL RDX,0x2
NEG RCX
SHL RCX,0x2
LEA R9,[RDX + RCX*0x1]
ADD RDX,RDI
ADD R9,RDI
MOVQ XMM0,qword ptr [RCX + RDX*0x1 + -0x4]
MOVQ XMM1,qword ptr [R9]
PADDD XMM0,XMM1
MOVQ qword ptr [R9],XMM0
TEST R10B,0x1
JZ 0x00101387
AND R10D,0xfffffffe
SUB EAX,R10D
LAB_0010137a:
CDQE
SHL RAX,0x2
MOV EDX,dword ptr [RDI + RAX*0x1 + -0x4]
ADD dword ptr [RDI + RAX*0x1],EDX
LAB_00101387:
LEA EAX,[RSI + 0x1]
CMP R8D,ESI
JZ 0x001013a0
MOVSXD RSI,EAX
JMP 0x001012c8
LAB_001013a0:
MOV EBP,dword ptr [RDI + RBX*0x1 + -0x4]
MOV RSI,RBX
CALL 0x001010d0
POP RBX
MOV EAX,EBP
POP RBP
POP R12
RET
LAB_001013b3:
MOV EAX,EDX
XOR ECX,ECX
JMP 0x00101335
LAB_001013bc:
MOV dword ptr [0x00000000],0x0
UD2
LAB_001013c9:
LEA RDI,[0x102008]
CALL 0x00101090 | /* WARNING: Control flow encountered bad instruction data */
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(int) */
int4 func0(int param_1)
{
int *piVar1;
int *piVar2;
int *piVar3;
int8 uVar4;
int4 uVar5;
code *pcVar6;
int iVar7;
int iVar8;
int iVar9;
int iVar10;
int iVar11;
int iVar12;
long lVar13;
uint uVar14;
void *__s;
int4 *puVar15;
long lVar16;
uint uVar17;
ulong uVar18;
ulong uVar19;
ulong __n;
int iVar20;
ulong uVar21;
uint uVar22;
uVar19 = (ulong)param_1;
if (uVar19 >> 0x3d != 0) {
std::__throw_length_error("cannot create std::vector larger than max_size()");
/* WARNING: Bad instruction - Truncating control flow here */
halt_baddata();
}
if (uVar19 == 0) {
_DAT_00000000 = 0;
/* WARNING: Does not return */
pcVar6 = (code *)invalidInstructionException();
(*pcVar6)();
}
__n = uVar19 * 4;
__s = operator_new(__n);
puVar15 = (int4 *)memset(__s,0,__n);
uVar21 = 1;
*puVar15 = 1;
do {
iVar20 = (int)uVar21;
uVar18 = (long)(param_1 + -1);
if (iVar20 <= param_1 + -1) {
uVar18 = uVar21;
}
uVar22 = (uint)uVar18;
if (uVar22 != 0) {
if ((int)uVar22 < 4) {
uVar17 = 0;
uVar14 = uVar22;
}
else {
lVar13 = (long)(int)uVar22 * 4 + -0xc;
lVar16 = 0;
do {
piVar1 = (int *)((long)puVar15 + lVar16 + lVar13);
iVar7 = piVar1[1];
iVar8 = piVar1[2];
iVar9 = piVar1[3];
piVar2 = (int *)((long)puVar15 + lVar16 + (long)(int)uVar22 * 4 + -0x10);
iVar10 = piVar2[1];
iVar11 = piVar2[2];
iVar12 = piVar2[3];
piVar3 = (int *)((long)puVar15 + lVar16 + lVar13);
*piVar3 = *piVar1 + *piVar2;
piVar3[1] = iVar7 + iVar10;
piVar3[2] = iVar8 + iVar11;
piVar3[3] = iVar9 + iVar12;
lVar16 = lVar16 + -0x10;
} while ((uVar18 >> 2 & 0x3fffffff) * -0x10 != lVar16);
uVar17 = uVar22 & 0xfffffffc;
uVar14 = uVar22 & 3;
if ((uVar18 & 3) == 0) goto LAB_00101387;
}
uVar22 = uVar22 - uVar17;
if (uVar22 != 1) {
uVar4 = *(int8 *)(puVar15 + (uVar18 - (uVar17 + 1)));
*(ulong *)(puVar15 + (uVar18 - (uVar17 + 1))) =
CONCAT44((int)((ulong)*(int8 *)(puVar15 + uVar18 + (-1 - (ulong)(uVar17 + 1))) >>
0x20) + (int)((ulong)uVar4 >> 0x20),
(int)*(int8 *)(puVar15 + uVar18 + (-1 - (ulong)(uVar17 + 1))) +
(int)uVar4);
if ((uVar22 & 1) == 0) goto LAB_00101387;
uVar14 = uVar14 - (uVar22 & 0xfffffffe);
}
puVar15[(int)uVar14] = puVar15[(int)uVar14] + puVar15[(long)(int)uVar14 + -1];
}
LAB_00101387:
if (param_1 * 2 == iVar20) {
uVar5 = puVar15[uVar19 - 1];
operator_delete(puVar15,__n);
return uVar5;
}
uVar21 = (ulong)(iVar20 + 1);
} while( true );
} |
2,368 | func0 |
#include <iostream>
#include <assert.h>
#include <regex>
#include <string>
| std::string func0(const std::string& ip){
std::regex pattern("\\.[0]*");
std::string result = std::regex_replace(ip, pattern, ".");
return result;
}
| int main() {
assert(func0("216.08.094.196") == "216.8.94.196");
assert(func0("12.01.024") == "12.1.24");
assert(func0("216.08.094.0196") == "216.8.94.196");
return 0;
}
| O0 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x48,%rsp
mov %rdi,-0x48(%rbp)
mov %rsi,-0x50(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
lea -0x40(%rbp),%rax
mov $0x10,%edx
lea 0x2d3cc(%rip),%rsi
mov %rax,%rdi
callq 712c <_ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC1EPKcNSt15regex_constants18syntax_option_typeE>
mov -0x48(%rbp),%rax
lea -0x40(%rbp),%rdx
mov -0x50(%rbp),%rsi
mov $0x0,%r8d
lea 0x2d3b2(%rip),%rcx
mov %rax,%rdi
callq 71e9 <_ZSt13regex_replaceINSt7__cxx1112regex_traitsIcEEcSt11char_traitsIcESaIcEENS0_12basic_stringIT0_T1_T2_EERKSA_RKNS0_11basic_regexIS7_T_EEPKS7_NSt15regex_constants15match_flag_typeE>
lea -0x40(%rbp),%rax
mov %rax,%rdi
callq 71b6 <_ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED1Ev>
mov -0x18(%rbp),%rax
xor %fs:0x28,%rax
je 5d28 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x9f>
jmp 5d23 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x9a>
endbr64
mov %rax,%rbx
lea -0x40(%rbp),%rax
mov %rax,%rdi
callq 71b6 <_ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED1Ev>
mov %rbx,%rax
mov %rax,%rdi
callq 5b00 <_Unwind_Resume@plt>
callq 5960 <__stack_chk_fail@plt>
mov -0x48(%rbp),%rax
add $0x48,%rsp
pop %rbx
pop %rbp
retq
| _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 48h
mov [rbp+var_48], rdi
mov [rbp+var_50], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_40]
mov edx, 10h
lea rcx, a0; "\\.[0]*"
mov rsi, rcx
mov rdi, rax
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type)
mov rax, [rbp+var_48]
lea rdx, [rbp+var_40]
mov rsi, [rbp+var_50]
mov r8d, 0
lea rcx, asc_34058; "."
mov rdi, rax
call _ZSt13regex_replaceINSt7__cxx1112regex_traitsIcEEcSt11char_traitsIcESaIcEENS0_12basic_stringIT0_T1_T2_EERKSA_RKNS0_11basic_regexIS7_T_EEPKS7_NSt15regex_constants15match_flag_typeE; std::regex_replace<std::regex_traits<char>,char,std::char_traits<char>,std::allocator<char>>(std::string const&,std::basic_regex<char,std::regex_traits<char>> const&,char const*,std::regex_constants::match_flag_type)
nop
lea rax, [rbp+var_40]
mov rdi, rax
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; std::basic_regex<char,std::regex_traits<char>>::~basic_regex()
nop
mov rax, [rbp+var_18]
sub rax, fs:28h
jz short loc_4BDF
jmp short loc_4BDA
endbr64
mov rbx, rax
lea rax, [rbp+var_40]
mov rdi, rax
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; std::basic_regex<char,std::regex_traits<char>>::~basic_regex()
mov rax, rbx
mov rdx, [rbp+var_18]
sub rdx, fs:28h
jz short loc_4BD2
call ___stack_chk_fail
loc_4BD2:
mov rdi, rax; struct _Unwind_Exception *
call __Unwind_Resume
loc_4BDA:
call ___stack_chk_fail
loc_4BDF:
mov rax, [rbp+var_48]
mov rbx, [rbp+var_8]
leave
retn | long long func0(long long a1, long long a2)
{
_BYTE v3[40]; // [rsp+10h] [rbp-40h] BYREF
unsigned long long v4; // [rsp+38h] [rbp-18h]
v4 = __readfsqword(0x28u);
std::basic_regex<char,std::regex_traits<char>>::basic_regex(v3, "\\.[0]*", 16LL);
std::regex_replace<std::regex_traits<char>,char,std::char_traits<char>,std::allocator<char>>(a1, a2, v3, ".", 0LL);
std::basic_regex<char,std::regex_traits<char>>::~basic_regex(v3);
return a1;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RBP + -0x48],RDI
MOV qword ptr [RBP + -0x50],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x40]
MOV EDX,0x10
LEA RCX,[0x134051]
MOV RSI,RCX
MOV RDI,RAX
LAB_00104b63:
CALL 0x00106152
MOV RAX,qword ptr [RBP + -0x48]
LEA RDX,[RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x50]
MOV R8D,0x0
LEA RCX,[0x134058]
MOV RDI,RAX
LAB_00104b84:
CALL 0x00106223
NOP
LEA RAX,[RBP + -0x40]
MOV RDI,RAX
CALL 0x001061f0
NOP
MOV RAX,qword ptr [RBP + -0x18]
SUB RAX,qword ptr FS:[0x28]
JZ 0x00104bdf
JMP 0x00104bda
LAB_00104bda:
CALL 0x00104860
LAB_00104bdf:
MOV RAX,qword ptr [RBP + -0x48]
MOV RBX,qword ptr [RBP + -0x8]
LEAVE
RET | /* func0(std::string const&) */
string * func0(string *param_1)
{
int8 in_RSI;
long in_FS_OFFSET;
regex local_48 [40];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
std::regex::basic_regex(local_48,"\\.[0]*",0x10);
/* try { // try from 00104b84 to 00104b88 has its CatchHandler @ 00104ba8 */
std::regex_replace<std::regex_traits<char>,char,std::char_traits<char>,std::allocator<char>>
(param_1,in_RSI,local_48,&DAT_00134058,0);
std::regex::~basic_regex(local_48);
if (local_20 != *(long *)(in_FS_OFFSET + 0x28)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return param_1;
} |
2,369 | func0 |
#include <iostream>
#include <assert.h>
#include <regex>
#include <string>
| std::string func0(const std::string& ip){
std::regex pattern("\\.[0]*");
std::string result = std::regex_replace(ip, pattern, ".");
return result;
}
| int main() {
assert(func0("216.08.094.196") == "216.8.94.196");
assert(func0("12.01.024") == "12.1.24");
assert(func0("216.08.094.0196") == "216.8.94.196");
return 0;
}
| O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r13
push %r12
push %rbp
push %rbx
sub $0x48,%rsp
mov %rdi,%rbx
mov %rsi,%rbp
mov %fs:0x28,%rax
mov %rax,0x38(%rsp)
xor %eax,%eax
lea 0x8(%rsp),%r13
mov %r13,%rdi
callq 4730 <_ZNSt6localeC1Ev@plt>
movl $0x10,0x10(%rsp)
lea 0x18(%rsp),%r12
mov %r13,%rsi
mov %r12,%rdi
callq 44d0 <_ZNSt6localeC1ERKS_@plt>
lea 0x20(%rsp),%rdi
mov 0x10(%rsp),%r8d
mov %r12,%rcx
lea 0x15e2f(%rip),%rdx
lea -0x6(%rdx),%rsi
callq 19187 <_ZNSt8__detail13__compile_nfaINSt7__cxx1112regex_traitsIcEEPKcEENSt9enable_ifIXsrNS_20__is_contiguous_iterIT0_EE5valueESt10shared_ptrIKNS_4_NFAIT_EEEE4typeES8_S8_RKNSC_11locale_typeENSt15regex_constants18syntax_option_typeE>
jmp 48b4 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x8b>
endbr64
mov %rax,%rbx
lea 0x18(%rsp),%rdi
callq 4660 <_ZNSt6localeD1Ev@plt>
lea 0x8(%rsp),%rdi
callq 4660 <_ZNSt6localeD1Ev@plt>
mov %rbx,%rdi
callq 46c0 <_Unwind_Resume@plt>
lea 0x8(%rsp),%rdi
callq 4660 <_ZNSt6localeD1Ev@plt>
lea 0x10(%rbx),%r12
mov %r12,(%rbx)
movq $0x0,0x8(%rbx)
movb $0x0,0x10(%rbx)
mov 0x0(%rbp),%rsi
mov %rsi,%rdx
add 0x8(%rbp),%rdx
lea 0x10(%rsp),%rcx
mov $0x0,%r9d
lea 0x15dbf(%rip),%r8
mov %rbx,%rdi
callq ee37 <_ZSt13regex_replaceISt20back_insert_iteratorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEN9__gnu_cxx17__normal_iteratorIPKcS6_EENS1_12regex_traitsIcEEcET_SF_T0_SG_RKNS1_11basic_regexIT2_T1_EEPKSI_NSt15regex_constants15match_flag_typeE>
mov 0x28(%rsp),%rbp
test %rbp,%rbp
je 4919 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0xf0>
cmpq $0x0,0x1c6c0(%rip)
je 4967 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x13e>
mov $0xffffffff,%eax
lock xadd %eax,0x8(%rbp)
cmp $0x1,%eax
je 4972 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x149>
lea 0x18(%rsp),%rdi
callq 4660 <_ZNSt6localeD1Ev@plt>
mov 0x38(%rsp),%rax
xor %fs:0x28,%rax
jne 49af <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x186>
mov %rbx,%rax
add $0x48,%rsp
pop %rbx
pop %rbp
pop %r12
pop %r13
retq
endbr64
mov %rax,%rbp
mov (%rbx),%rdi
cmp %rdi,%r12
je 4955 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x12c>
callq 4570 <_ZdlPv@plt>
lea 0x10(%rsp),%rdi
callq 5776 <_ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED1Ev>
mov %rbp,%rdi
callq 46c0 <_Unwind_Resume@plt>
mov 0x8(%rbp),%eax
lea -0x1(%rax),%edx
mov %edx,0x8(%rbp)
jmp 4914 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0xeb>
mov 0x0(%rbp),%rax
mov %rbp,%rdi
callq *0x10(%rax)
cmpq $0x0,0x1c644(%rip)
je 49a4 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x17b>
mov $0xffffffff,%eax
lock xadd %eax,0xc(%rbp)
cmp $0x1,%eax
jne 4919 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0xf0>
mov 0x0(%rbp),%rax
mov %rbp,%rdi
callq *0x18(%rax)
jmpq 4919 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0xf0>
mov 0xc(%rbp),%eax
lea -0x1(%rax),%edx
mov %edx,0xc(%rbp)
jmp 4990 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x167>
callq 45d0 <__stack_chk_fail@plt>
| _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r14
push r12
push rbx
sub rsp, 38h
mov rbx, rdi
mov r14, rsi
mov rax, fs:28h
mov [rbp+var_28], rax
xor eax, eax
lea r12, [rbp+var_50]
lea rdi, [rbp+var_48]; this
call __ZNSt6localeC1Ev; std::locale::locale(void)
mov [rbp+var_40], 0
mov [rbp+var_38], 0
mov ecx, 10h
lea rdx, a0+6; ""
lea rsi, [rdx-6]
mov rdi, r12
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEE10_M_compileEPKcS5_NSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::_M_compile(char const*,char const*,std::regex_constants::syntax_option_type)
jmp short loc_48A0
endbr64
mov rbx, rax
mov rdi, [rbp+var_38]
test rdi, rdi
jz short loc_487B
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_487B:
lea rdi, [rbp+var_48]; this
call __ZNSt6localeD1Ev; std::locale::~locale()
mov rax, [rbp+var_28]
sub rax, fs:28h
jz short loc_4898
call ___stack_chk_fail
loc_4898:
mov rdi, rbx; struct _Unwind_Exception *
call __Unwind_Resume
loc_48A0:
lea rax, [rbx+10h]
mov [rbx], rax
mov qword ptr [rbx+8], 0
mov byte ptr [rbx+10h], 0
mov rsi, [r14]
mov rdx, rsi
add rdx, [r14+8]
lea rcx, [rbp+var_50]
sub rsp, 8
push 0
mov r9d, 1
lea r8, aInvalidEquival+19h; "."
mov rdi, rbx
call _ZSt15__regex_replaceISt20back_insert_iteratorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEN9__gnu_cxx17__normal_iteratorIPKcS6_EENS1_12regex_traitsIcEEcET_SF_T0_SG_RKNS1_11basic_regexIT2_T1_EEPKSI_mNSt15regex_constants15match_flag_typeE; std::__regex_replace<std::back_insert_iterator<std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::regex_traits<char>,char>(std::back_insert_iterator<std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::basic_regex<char,std::regex_traits<char>> const&,char const*,ulong,std::regex_constants::match_flag_type)
add rsp, 10h
mov rax, [rbp+var_38]
mov rdi, rax
test rax, rax
jz short loc_4922
lea rcx, [rax+8]
mov rdx, [rax+8]
mov rax, 100000001h
cmp rdx, rax
jz short loc_497C
cmp cs:__libc_single_threaded@GLIBC_2_32, 0
jz loc_499F
mov eax, [rdi+8]
lea edx, [rax-1]
mov [rdi+8], edx
loc_4919:
cmp eax, 1
jz loc_49AD
loc_4922:
lea rdi, [rbp+var_48]; this
call __ZNSt6localeD1Ev; std::locale::~locale()
mov rax, [rbp+var_28]
sub rax, fs:28h
jnz short loc_49B7
mov rax, rbx
lea rsp, [rbp-18h]
pop rbx
pop r12
pop r14
pop rbp
retn
endbr64
mov r14, rax
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv; std::string::_M_dispose(void)
lea rdi, [rbp+var_50]
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; std::basic_regex<char,std::regex_traits<char>>::~basic_regex()
mov rax, [rbp+var_28]
sub rax, fs:28h
jz short loc_4974
call ___stack_chk_fail
loc_4974:
mov rdi, r14; struct _Unwind_Exception *
call __Unwind_Resume
loc_497C:
mov r12, rdi
mov dword ptr [rdi+8], 0
mov dword ptr [rdi+0Ch], 0
mov rax, [rdi]
call qword ptr [rax+10h]
mov rdi, r12
mov rax, [r12]
call qword ptr [rax+18h]
jmp short loc_4922
loc_499F:
mov eax, 0FFFFFFFFh
lock xadd [rcx], eax
jmp loc_4919
loc_49AD:
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE24_M_release_last_use_coldEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release_last_use_cold(void)
jmp loc_4922
loc_49B7:
call ___stack_chk_fail | long long func0(long long a1, long long *a2)
{
long long v4; // rsi
_DWORD *v5; // rdi
volatile signed __int32 *v6; // rcx
long long v7; // rdx
signed __int32 v8; // eax
_BYTE v10[8]; // [rsp+0h] [rbp-50h] BYREF
_BYTE v11[8]; // [rsp+8h] [rbp-48h] BYREF
long long v12; // [rsp+10h] [rbp-40h]
long long v13; // [rsp+18h] [rbp-38h]
unsigned long long v14; // [rsp+28h] [rbp-28h]
v14 = __readfsqword(0x28u);
std::locale::locale((std::locale *)v11);
v12 = 0LL;
v13 = 0LL;
std::basic_regex<char,std::regex_traits<char>>::_M_compile(v10, "\\.[0]*", "", 16LL);
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
v4 = *a2;
std::__regex_replace<std::back_insert_iterator<std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::regex_traits<char>,char>(
a1,
*a2,
*((_DWORD *)a2 + 2) + *(_DWORD *)a2,
(unsigned int)v10,
(unsigned int)".",
1,
0);
v5 = (_DWORD *)v13;
if ( v13 )
{
v6 = (volatile signed __int32 *)(v13 + 8);
v7 = *(_QWORD *)(v13 + 8);
if ( v7 == 0x100000001LL )
{
*(_DWORD *)(v13 + 8) = 0;
v5[3] = 0;
(*(void ( **)(_DWORD *, long long, long long, volatile signed __int32 *))(*(_QWORD *)v5 + 16LL))(
v5,
v4,
0x100000001LL,
v6);
(*(void ( **)(_DWORD *))(*(_QWORD *)v5 + 24LL))(v5);
}
else
{
if ( _libc_single_threaded )
{
v8 = *(_DWORD *)(v13 + 8);
v7 = (unsigned int)(v8 - 1);
*(_DWORD *)(v13 + 8) = v7;
}
else
{
v8 = _InterlockedExchangeAdd(v6, 0xFFFFFFFF);
}
if ( v8 == 1 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release_last_use_cold(v5, v4, v7, v6);
}
}
std::locale::~locale((std::locale *)v11);
return a1;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV RBX,RDI
MOV R14,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
XOR EAX,EAX
LEA R12,[RBP + -0x50]
LEA RDI,[RBP + -0x48]
CALL 0x00104710
MOV qword ptr [RBP + -0x40],0x0
MOV qword ptr [RBP + -0x38],0x0
MOV ECX,0x10
LEA RDX,[0x119661]
LEA RSI,[RDX + -0x6]
MOV RDI,R12
LAB_0010485f:
CALL 0x00117714
JMP 0x001048a0
LAB_001048a0:
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
MOV qword ptr [RBX + 0x8],0x0
MOV byte ptr [RBX + 0x10],0x0
MOV RSI,qword ptr [R14]
MOV RDX,RSI
ADD RDX,qword ptr [R14 + 0x8]
LEA RCX,[RBP + -0x50]
SUB RSP,0x8
PUSH 0x0
MOV R9D,0x1
LEA R8,[0x11963d]
MOV RDI,RBX
LAB_001048d7:
CALL 0x0010edca
ADD RSP,0x10
MOV RAX,qword ptr [RBP + -0x38]
MOV RDI,RAX
TEST RAX,RAX
JZ 0x00104922
LEA RCX,[RAX + 0x8]
MOV RDX,qword ptr [RAX + 0x8]
MOV RAX,0x100000001
CMP RDX,RAX
JZ 0x0010497c
CMP byte ptr [0x0011f460],0x0
JZ 0x0010499f
MOV EAX,dword ptr [RDI + 0x8]
LEA EDX,[RAX + -0x1]
MOV dword ptr [RDI + 0x8],EDX
LAB_00104919:
CMP EAX,0x1
JZ 0x001049ad
LAB_00104922:
LEA RDI,[RBP + -0x48]
CALL 0x00104650
MOV RAX,qword ptr [RBP + -0x28]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x001049b7
MOV RAX,RBX
LEA RSP,[RBP + -0x18]
POP RBX
POP R12
POP R14
POP RBP
RET
LAB_0010497c:
MOV R12,RDI
MOV dword ptr [RDI + 0x8],0x0
MOV dword ptr [RDI + 0xc],0x0
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x10]
MOV RDI,R12
MOV RAX,qword ptr [R12]
CALL qword ptr [RAX + 0x18]
JMP 0x00104922
LAB_0010499f:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RCX],EAX
JMP 0x00104919
LAB_001049ad:
CALL 0x0010588a
JMP 0x00104922
LAB_001049b7:
CALL 0x001045a0 | /* func0(std::string const&) */
string * func0(string *param_1)
{
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
_Sp_counted_base<(_Lock_policy)2> *p_Var2;
int iVar3;
int8 *in_RSI;
long in_FS_OFFSET;
regex local_58 [8];
int local_50 [8];
int8 local_48;
_Sp_counted_base<(_Lock_policy)2> *local_40;
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
std::locale::locale(local_50);
local_48 = 0;
local_40 = (_Sp_counted_base<(_Lock_policy)2> *)0x0;
/* try { // try from 0010485f to 00104863 has its CatchHandler @ 00104866 */
std::regex::_M_compile(local_58,"\\.[0]*","",0x10);
*(string **)param_1 = param_1 + 0x10;
*(int8 *)(param_1 + 8) = 0;
param_1[0x10] = (string)0x0;
/* try { // try from 001048d7 to 001048db has its CatchHandler @ 00104948 */
std::
__regex_replace<std::back_insert_iterator<std::string>,__normal_iterator<char_const*,std::string>,std::regex_traits<char>,char>
((back_insert_iterator)param_1,(__normal_iterator)*in_RSI,
(__normal_iterator)*in_RSI + (int)in_RSI[1],local_58,".",1,0);
p_Var2 = local_40;
if (local_40 != (_Sp_counted_base<(_Lock_policy)2> *)0x0) {
p_Var1 = local_40 + 8;
if (*(long *)(local_40 + 8) == 0x100000001) {
*(int4 *)(local_40 + 8) = 0;
*(int4 *)(local_40 + 0xc) = 0;
(**(code **)(*(long *)local_40 + 0x10))();
(**(code **)(*(long *)p_Var2 + 0x18))(p_Var2);
}
else {
if (__libc_single_threaded == '\0') {
LOCK();
iVar3 = *(int *)p_Var1;
*(int *)p_Var1 = *(int *)p_Var1 + -1;
UNLOCK();
}
else {
iVar3 = *(int *)(local_40 + 8);
*(int *)(local_40 + 8) = iVar3 + -1;
}
if (iVar3 == 1) {
std::_Sp_counted_base<(_Lock_policy)2>::_M_release_last_use_cold(local_40);
}
}
}
std::locale::~locale(local_50);
if (local_30 == *(long *)(in_FS_OFFSET + 0x28)) {
return param_1;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
} |
2,370 | func0 |
#include <iostream>
#include <assert.h>
#include <regex>
#include <string>
| std::string func0(const std::string& ip){
std::regex pattern("\\.[0]*");
std::string result = std::regex_replace(ip, pattern, ".");
return result;
}
| int main() {
assert(func0("216.08.094.196") == "216.8.94.196");
assert(func0("12.01.024") == "12.1.24");
assert(func0("216.08.094.0196") == "216.8.94.196");
return 0;
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
mov %rsi,%rbx
sub $0x40,%rsp
mov %fs:0x28,%rax
mov %rax,0x38(%rsp)
xor %eax,%eax
lea 0x8(%rsp),%rbp
lea 0x18(%rsp),%r13
mov %rbp,%rdi
callq 4770 <_ZNSt6localeC1Ev@plt>
mov %rbp,%rsi
mov %r13,%rdi
movl $0x10,0x10(%rsp)
callq 4500 <_ZNSt6localeC1ERKS_@plt>
lea 0x16ae3(%rip),%rdx
mov 0x10(%rsp),%r8d
mov %r13,%rcx
lea 0x20(%rsp),%rdi
lea -0x6(%rdx),%rsi
callq 1a620 <_ZNSt8__detail13__compile_nfaINSt7__cxx1112regex_traitsIcEEPKcEENSt9enable_ifIXsrNS_20__is_contiguous_iterIT0_EE5valueESt10shared_ptrIKNS_4_NFAIT_EEEE4typeES8_S8_RKNSC_11locale_typeENSt15regex_constants18syntax_option_typeE>
mov %rbp,%rdi
lea 0x10(%r12),%r14
lea 0x10(%rsp),%rbp
callq 46a0 <_ZNSt6localeD1Ev@plt>
mov %r14,(%r12)
xor %r9d,%r9d
mov %rbp,%rcx
movb $0x0,0x10(%r12)
mov (%rbx),%rsi
lea 0x16a99(%rip),%r8
mov %r12,%rdi
movq $0x0,0x8(%r12)
mov 0x8(%rbx),%rdx
add %rsi,%rdx
callq e770 <_ZSt13regex_replaceISt20back_insert_iteratorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEN9__gnu_cxx17__normal_iteratorIPKcS6_EENS1_12regex_traitsIcEEcET_SF_T0_SG_RKNS1_11basic_regexIT2_T1_EEPKSI_NSt15regex_constants15match_flag_typeE>
mov 0x28(%rsp),%rbp
test %rbp,%rbp
je 4c58 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0xd8>
mov 0x1d37b(%rip),%rbx
test %rbx,%rbx
je 4c80 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x100>
mov $0xffffffff,%eax
lock xadd %eax,0x8(%rbp)
cmp $0x1,%eax
je 4c8e <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x10e>
nopl 0x0(%rax)
mov %r13,%rdi
callq 46a0 <_ZNSt6localeD1Ev@plt>
mov 0x38(%rsp),%rax
xor %fs:0x28,%rax
jne 4ccb <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x14b>
add $0x40,%rsp
mov %r12,%rax
pop %rbx
pop %rbp
pop %r12
pop %r13
pop %r14
retq
mov 0x8(%rbp),%eax
lea -0x1(%rax),%edx
mov %edx,0x8(%rbp)
cmp $0x1,%eax
jne 4c58 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0xd8>
mov 0x0(%rbp),%rax
mov %rbp,%rdi
callq *0x10(%rax)
test %rbx,%rbx
je 4cc0 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x140>
mov $0xffffffff,%eax
lock xadd %eax,0xc(%rbp)
cmp $0x1,%eax
jne 4c58 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0xd8>
mov 0x0(%rbp),%rax
mov %rbp,%rdi
callq *0x18(%rax)
jmp 4c58 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0xd8>
nopl 0x0(%rax,%rax,1)
mov 0xc(%rbp),%eax
lea -0x1(%rax),%edx
mov %edx,0xc(%rbp)
jmp 4ca7 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x127>
callq 4610 <__stack_chk_fail@plt>
endbr64
mov %rax,%r13
jmpq 47e3 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE.cold>
endbr64
mov %rax,%r12
jmpq 4801 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE.cold+0x1e>
nopl 0x0(%rax,%rax,1)
| _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r14
mov r14, rsi
push r13
lea r13, [rbp+var_50]
push r12
lea r12, [rbp+var_48]
push rbx
mov rbx, rdi
mov rdi, r12; this
sub rsp, 30h
mov rax, fs:28h
mov [rbp+var_28], rax
xor eax, eax
call __ZNSt6localeC1Ev; std::locale::locale(void)
lea rdx, a0+6; ""
pxor xmm0, xmm0
mov rdi, r13
mov ecx, 10h
lea rsi, [rdx-6]
movaps [rbp+var_40], xmm0
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEE10_M_compileEPKcS5_NSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::_M_compile(char const*,char const*,std::regex_constants::syntax_option_type)
lea rax, [rbx+10h]
sub rsp, 8
mov byte ptr [rbx+10h], 0
mov rcx, r13
mov [rbx], rax
mov rsi, [r14]
mov r9d, 1
mov rdi, rbx; int
mov qword ptr [rbx+8], 0
mov rdx, [r14+8]
lea r8, aInvalidEquival+19h; "."
push 0
add rdx, rsi
call _ZSt15__regex_replaceISt20back_insert_iteratorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEN9__gnu_cxx17__normal_iteratorIPKcS6_EENS1_12regex_traitsIcEEcET_SF_T0_SG_RKNS1_11basic_regexIT2_T1_EEPKSI_mNSt15regex_constants15match_flag_typeE; std::__regex_replace<std::back_insert_iterator<std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::regex_traits<char>,char>(std::back_insert_iterator<std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::basic_regex<char,std::regex_traits<char>> const&,char const*,ulong,std::regex_constants::match_flag_type)
pop rax
mov rax, qword ptr [rbp+var_40+8]
pop rdx
mov rdi, rax
test rax, rax
jz short loc_612F
mov rdx, [rax+8]
lea rcx, [rax+8]
mov rax, 100000001h
cmp rdx, rax
jz short loc_6160
cmp cs:__libc_single_threaded@GLIBC_2_32, 0
jz short loc_6180
mov eax, [rdi+8]
lea edx, [rax-1]
mov [rdi+8], edx
loc_612A:
cmp eax, 1
jz short loc_6190
loc_612F:
mov rdi, r12; this
call __ZNSt6localeD1Ev; std::locale::~locale()
mov rax, [rbp+var_28]
sub rax, fs:28h
jnz short loc_6197
lea rsp, [rbp-20h]
mov rax, rbx
pop rbx
pop r12
pop r13
pop r14
pop rbp
retn
loc_6160:
mov rax, [rdi]
mov r13, rdi
mov qword ptr [rdi+8], 0
call qword ptr [rax+10h]
mov rax, [r13+0]
mov rdi, r13
call qword ptr [rax+18h]
jmp short loc_612F
loc_6180:
mov eax, 0FFFFFFFFh
lock xadd [rcx], eax
jmp short loc_612A
loc_6190:
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE24_M_release_last_use_coldEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release_last_use_cold(void)
jmp short loc_612F
loc_6197:
call ___stack_chk_fail
endbr64
mov r14, rax
jmp _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE_cold; func0(std::string const&) [clone]
endbr64
mov rbx, rax
jmp loc_486C | long long func0(long long a1, long long *a2)
{
long long v3; // rsi
long long v4; // rdi
long long v5; // rdx
volatile signed __int32 *v6; // rcx
signed __int32 v7; // eax
long long v9; // rax
_BYTE v10[8]; // [rsp+0h] [rbp-50h] BYREF
_BYTE v11[8]; // [rsp+8h] [rbp-48h] BYREF
__int128 v12; // [rsp+10h] [rbp-40h]
unsigned long long v13; // [rsp+28h] [rbp-28h]
v13 = __readfsqword(0x28u);
std::locale::locale((std::locale *)v11);
v12 = 0LL;
std::basic_regex<char,std::regex_traits<char>>::_M_compile(v10, "\\.[0]*", "", 16LL);
*(_BYTE *)(a1 + 16) = 0;
*(_QWORD *)a1 = a1 + 16;
v3 = *a2;
*(_QWORD *)(a1 + 8) = 0LL;
std::__regex_replace<std::back_insert_iterator<std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::regex_traits<char>,char>(a1);
v4 = *((_QWORD *)&v12 + 1);
if ( *((_QWORD *)&v12 + 1) )
{
v5 = *(_QWORD *)(*((_QWORD *)&v12 + 1) + 8LL);
v6 = (volatile signed __int32 *)(*((_QWORD *)&v12 + 1) + 8LL);
if ( v5 == 0x100000001LL )
{
v9 = **((_QWORD **)&v12 + 1);
*(_QWORD *)(*((_QWORD *)&v12 + 1) + 8LL) = 0LL;
(*(void ( **)(long long, long long, long long, volatile signed __int32 *))(v9 + 16))(
v4,
v3,
0x100000001LL,
v6);
(*(void ( **)(long long))(*(_QWORD *)v4 + 24LL))(v4);
}
else
{
if ( _libc_single_threaded )
{
v7 = *(_DWORD *)(*((_QWORD *)&v12 + 1) + 8LL);
v5 = (unsigned int)(v7 - 1);
*(_DWORD *)(*((_QWORD *)&v12 + 1) + 8LL) = v5;
}
else
{
v7 = _InterlockedExchangeAdd(v6, 0xFFFFFFFF);
}
if ( v7 == 1 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release_last_use_cold(v4, v3, v5, v6);
}
}
std::locale::~locale((std::locale *)v11);
return a1;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R14
MOV R14,RSI
PUSH R13
LEA R13,[RBP + -0x50]
PUSH R12
LEA R12,[RBP + -0x48]
PUSH RBX
MOV RBX,RDI
MOV RDI,R12
SUB RSP,0x30
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
XOR EAX,EAX
CALL 0x001046f0
LEA RDX,[0x11a661]
PXOR XMM0,XMM0
MOV RDI,R13
MOV ECX,0x10
LEA RSI,[RDX + -0x6]
MOVAPS xmmword ptr [RBP + -0x40],XMM0
LAB_001060b3:
CALL 0x001194d0
LEA RAX,[RBX + 0x10]
SUB RSP,0x8
MOV byte ptr [RBX + 0x10],0x0
MOV RCX,R13
MOV qword ptr [RBX],RAX
MOV RSI,qword ptr [R14]
MOV R9D,0x1
MOV RDI,RBX
MOV qword ptr [RBX + 0x8],0x0
MOV RDX,qword ptr [R14 + 0x8]
LEA R8,[0x11a63d]
PUSH 0x0
ADD RDX,RSI
LAB_001060ee:
CALL 0x00112140
POP RAX
MOV RAX,qword ptr [RBP + -0x38]
POP RDX
MOV RDI,RAX
TEST RAX,RAX
JZ 0x0010612f
MOV RDX,qword ptr [RAX + 0x8]
LEA RCX,[RAX + 0x8]
MOV RAX,0x100000001
CMP RDX,RAX
JZ 0x00106160
CMP byte ptr [0x00120460],0x0
JZ 0x00106180
MOV EAX,dword ptr [RDI + 0x8]
LEA EDX,[RAX + -0x1]
MOV dword ptr [RDI + 0x8],EDX
LAB_0010612a:
CMP EAX,0x1
JZ 0x00106190
LAB_0010612f:
MOV RDI,R12
CALL 0x00104640
MOV RAX,qword ptr [RBP + -0x28]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x00106197
LEA RSP,[RBP + -0x20]
MOV RAX,RBX
POP RBX
POP R12
POP R13
POP R14
POP RBP
RET
LAB_00106160:
MOV RAX,qword ptr [RDI]
MOV R13,RDI
MOV qword ptr [RDI + 0x8],0x0
CALL qword ptr [RAX + 0x10]
MOV RAX,qword ptr [R13]
MOV RDI,R13
CALL qword ptr [RAX + 0x18]
JMP 0x0010612f
LAB_00106180:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RCX],EAX
JMP 0x0010612a
LAB_00106190:
CALL 0x001073c0
JMP 0x0010612f
LAB_00106197:
CALL 0x001045a0 | /* func0(std::string const&) */
string * func0(string *param_1)
{
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
int8 uVar2;
int iVar3;
int8 *in_RSI;
long in_FS_OFFSET;
regex local_58 [8];
int local_50 [8];
int local_48 [24];
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
std::locale::locale(local_50);
local_48._0_16_ = (int [16])0x0;
/* try { // try from 001060b3 to 001060b7 has its CatchHandler @ 001061a8 */
std::regex::_M_compile(local_58,"\\.[0]*","",0x10);
param_1[0x10] = (string)0x0;
*(string **)param_1 = param_1 + 0x10;
uVar2 = *in_RSI;
*(int8 *)(param_1 + 8) = 0;
/* try { // try from 001060ee to 001060f2 has its CatchHandler @ 0010619c */
std::
__regex_replace<std::back_insert_iterator<std::string>,__normal_iterator<char_const*,std::string>,std::regex_traits<char>,char>
((back_insert_iterator)param_1,(__normal_iterator)uVar2,
(int)in_RSI[1] + (__normal_iterator)uVar2,local_58,".",1,0);
uVar2 = local_48._8_8_;
if ((_Sp_counted_base<(_Lock_policy)2> *)local_48._8_8_ !=
(_Sp_counted_base<(_Lock_policy)2> *)0x0) {
p_Var1 = (_Sp_counted_base<(_Lock_policy)2> *)(local_48._8_8_ + 8);
if (*(long *)(local_48._8_8_ + 8) == 0x100000001) {
*(int8 *)(local_48._8_8_ + 8) = 0;
(**(code **)(*(long *)local_48._8_8_ + 0x10))();
(**(code **)(*(long *)uVar2 + 0x18))(uVar2);
}
else {
if (__libc_single_threaded == '\0') {
LOCK();
iVar3 = *(int *)p_Var1;
*(int *)p_Var1 = *(int *)p_Var1 + -1;
UNLOCK();
}
else {
iVar3 = *(int *)(local_48._8_8_ + 8);
*(int *)(local_48._8_8_ + 8) = iVar3 + -1;
}
if (iVar3 == 1) {
std::_Sp_counted_base<(_Lock_policy)2>::_M_release_last_use_cold
((_Sp_counted_base<(_Lock_policy)2> *)local_48._8_8_);
}
}
}
std::locale::~locale(local_50);
if (local_30 == *(long *)(in_FS_OFFSET + 0x28)) {
return param_1;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
} |
2,371 | func0 |
#include <iostream>
#include <assert.h>
#include <regex>
#include <string>
| std::string func0(const std::string& ip){
std::regex pattern("\\.[0]*");
std::string result = std::regex_replace(ip, pattern, ".");
return result;
}
| int main() {
assert(func0("216.08.094.196") == "216.8.94.196");
assert(func0("12.01.024") == "12.1.24");
assert(func0("216.08.094.0196") == "216.8.94.196");
return 0;
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
mov %rsi,%rbx
sub $0x40,%rsp
mov %fs:0x28,%rax
mov %rax,0x38(%rsp)
xor %eax,%eax
lea 0x8(%rsp),%rbp
lea 0x18(%rsp),%r13
mov %rbp,%rdi
callq 47b0 <_ZNSt6localeC1Ev@plt>
mov %rbp,%rsi
mov %r13,%rdi
movl $0x10,0x10(%rsp)
callq 4530 <_ZNSt6localeC1ERKS_@plt>
lea 0x171cb(%rip),%rdx
mov 0x10(%rsp),%r8d
mov %r13,%rcx
lea 0x20(%rsp),%rdi
lea -0x6(%rdx),%rsi
callq 1ac90 <_ZNSt8__detail13__compile_nfaINSt7__cxx1112regex_traitsIcEEPKcEENSt9enable_ifIXsrNS_20__is_contiguous_iterIT0_EE5valueESt10shared_ptrIKNS_4_NFAIT_EEEE4typeES8_S8_RKNSC_11locale_typeENSt15regex_constants18syntax_option_typeE>
mov %rbp,%rdi
lea 0x10(%r12),%r14
lea 0x10(%rsp),%rbp
callq 46e0 <_ZNSt6localeD1Ev@plt>
mov %r14,(%r12)
xor %r9d,%r9d
mov %rbp,%rcx
movb $0x0,0x10(%r12)
mov (%rbx),%rsi
lea 0x17181(%rip),%r8
mov %r12,%rdi
movq $0x0,0x8(%r12)
mov 0x8(%rbx),%rdx
add %rsi,%rdx
callq 10d00 <_ZSt13regex_replaceISt20back_insert_iteratorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEN9__gnu_cxx17__normal_iteratorIPKcS6_EENS1_12regex_traitsIcEEcET_SF_T0_SG_RKNS1_11basic_regexIT2_T1_EEPKSI_NSt15regex_constants15match_flag_typeE>
mov 0x28(%rsp),%rbp
test %rbp,%rbp
je 55a8 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0xd8>
mov 0x1da3b(%rip),%rbx
test %rbx,%rbx
je 55d0 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x100>
mov $0xffffffff,%eax
lock xadd %eax,0x8(%rbp)
cmp $0x1,%eax
je 55de <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x10e>
nopl 0x0(%rax)
mov %r13,%rdi
callq 46e0 <_ZNSt6localeD1Ev@plt>
mov 0x38(%rsp),%rax
xor %fs:0x28,%rax
jne 561b <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x14b>
add $0x40,%rsp
mov %r12,%rax
pop %rbx
pop %rbp
pop %r12
pop %r13
pop %r14
retq
mov 0x8(%rbp),%eax
lea -0x1(%rax),%edx
mov %edx,0x8(%rbp)
cmp $0x1,%eax
jne 55a8 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0xd8>
mov 0x0(%rbp),%rax
mov %rbp,%rdi
callq *0x10(%rax)
test %rbx,%rbx
je 5610 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x140>
mov $0xffffffff,%eax
lock xadd %eax,0xc(%rbp)
cmp $0x1,%eax
jne 55a8 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0xd8>
mov 0x0(%rbp),%rax
mov %rbp,%rdi
callq *0x18(%rax)
jmp 55a8 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0xd8>
nopl 0x0(%rax,%rax,1)
mov 0xc(%rbp),%eax
lea -0x1(%rax),%edx
mov %edx,0xc(%rbp)
jmp 55f7 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x127>
callq 4640 <__stack_chk_fail@plt>
endbr64
mov %rax,%r13
jmpq 4836 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE.cold>
endbr64
mov %rax,%r12
jmpq 4854 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE.cold+0x1e>
nopl 0x0(%rax,%rax,1)
| _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r15
push r14
lea r15, [rbp+var_E0]
push r13
push r12
mov r12, rsi
push rbx
mov rbx, rdi
sub rsp, 108h
mov rax, fs:28h
mov [rbp+var_38], rax
xor eax, eax
lea rax, [rbp+var_D8]
mov [rbp+var_128], r15
mov rdi, rax; this
mov [rbp+var_130], rax
call __ZNSt6localeC1Ev; std::locale::locale(void)
lea rdx, a0+6; ""
pxor xmm0, xmm0
mov rdi, r15
mov ecx, 10h
lea rsi, [rdx-6]
movaps [rbp+var_D0], xmm0
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEE10_M_compileEPKcS5_NSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::_M_compile(char const*,char const*,std::regex_constants::syntax_option_type)
lea rax, [rbx+10h]
mov byte ptr [rbx+10h], 0
sub rsp, 8
xor r9d, r9d
mov [rbx], rax
mov rcx, [rbp+var_128]
xor r8d, r8d
mov [rbp+var_108], rax
mov rax, [r12]
mov qword ptr [rbx+8], 0
mov r13, [r12+8]
movq xmm0, rax
mov r15, rax
mov [rbp+var_B0], rcx
mov [rbp+var_A8], 0
lea r12, [rax+r13]
lea rax, [rbp+var_A0]
movq xmm1, r12
mov [rbp+var_120], rax
mov rdx, rax
punpcklqdq xmm0, xmm1
movaps [rbp+var_C0], xmm0
movq rdi, xmm0
pxor xmm0, xmm0
mov rsi, qword ptr [rbp+var_C0+8]
movaps [rbp+var_A0], xmm0
movaps [rbp+var_90], xmm0
push 0
call _ZNSt8__detail17__regex_algo_implIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS5_9sub_matchISB_EEEcNS5_12regex_traitsIcEEEEbT_SH_RNS5_13match_resultsISH_T0_EERKNS5_11basic_regexIT1_T2_EENSt15regex_constants15match_flag_typeENS_20_RegexExecutorPolicyEb; std::__detail::__regex_algo_impl<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>> &,std::basic_regex<char,std::regex_traits<char>> const&,std::regex_constants::match_flag_type,std::__detail::_RegexExecutorPolicy,bool)
pop r8
pop r9
test al, al
jz loc_65C7
loc_6207:
lea rax, [rbp+var_C0]
pxor xmm0, xmm0
lea rsi, [rbp+var_80]
mov qword ptr [rbp+var_70], 0
mov rdi, rax
mov dword ptr [rbp+var_70+8], 0
mov [rbp+var_110], rsi
mov [rbp+var_118], rax
movaps [rbp+var_80], xmm0
movaps [rbp+var_60], xmm0
movaps [rbp+var_50], xmm0
call _ZNKSt7__cxx1114regex_iteratorIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEEcNS_12regex_traitsIcEEEeqERKSD_; std::regex_iterator<__gnu_cxx::__normal_iterator<char const*,std::string>,char,std::regex_traits<char>>::operator==(std::regex_iterator<__gnu_cxx::__normal_iterator<char const*,std::string>,char,std::regex_traits<char>> const&)
test al, al
jz loc_62FC
test r13, r13
jle short loc_626D
nop dword ptr [rax+00h]
loc_6258:
movsx esi, byte ptr [r15]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
add r15, 1
cmp r12, r15
jnz short loc_6258
loc_626D:
lea rdi, [rbp+var_60]
call _ZNSt6vectorINSt7__cxx119sub_matchIN9__gnu_cxx17__normal_iteratorIPKcNS0_12basic_stringIcSt11char_traitsIcESaIcEEEEEEESaISC_EED2Ev; std::vector<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~vector()
mov rdi, [rbp+var_120]
call _ZNSt6vectorINSt7__cxx119sub_matchIN9__gnu_cxx17__normal_iteratorIPKcNS0_12basic_stringIcSt11char_traitsIcESaIcEEEEEEESaISC_EED2Ev; std::vector<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~vector()
mov rax, qword ptr [rbp+var_D0+8]
mov rdi, rax
test rax, rax
jz short loc_62CB
mov rcx, [rax+8]
lea rdx, [rax+8]
mov rax, 100000001h
cmp rcx, rax
jz loc_6635
cmp cs:__libc_single_threaded@GLIBC_2_32, 0
jz loc_6654
mov eax, [rdi+8]
lea edx, [rax-1]
mov [rdi+8], edx
loc_62C2:
cmp eax, 1
jz loc_6662
loc_62CB:
mov rdi, [rbp+var_130]; this
call __ZNSt6localeD1Ev; std::locale::~locale()
mov rax, [rbp+var_38]
sub rax, fs:28h
jnz loc_6680
lea rsp, [rbp-28h]
mov rax, rbx
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_62FC:
xor r13d, r13d
xor r14d, r14d
lea r15, [rbp+var_F0]
test al, al
jnz loc_64FE
nop dword ptr [rax+00000000h]
loc_6318:
mov rdx, qword ptr [rbp+var_A0]
mov rax, qword ptr [rbp+var_A0+8]
sub rax, rdx
lea rcx, [rdx+rax-30h]
cmp rax, 49h ; 'I'
lea rdx, [rdx+rax-48h]
mov rax, rcx
cmovb rax, rdx
mov r12, [rax]
mov rax, [rax+8]
mov [rbp+var_100], rax
sub rax, r12
test rax, rax
jg short loc_6384
jmp short loc_63CF
loc_6360:
mov rsi, [rbp+var_F8]
add r12, 1
mov [rax+rsi], r14b
mov rax, [rbx]
mov [rbx+8], r13
mov byte ptr [rax+rsi+1], 0
cmp [rbp+var_100], r12
jz short loc_63CF
loc_6384:
mov rax, [rbx+8]
movzx r14d, byte ptr [r12]
mov [rbp+var_F8], rax
lea r13, [rax+1]
mov rax, [rbx]
cmp [rbp+var_108], rax
jz loc_6530
mov rdx, [rbx+10h]
loc_63AC:
cmp rdx, r13
jnb short loc_6360
mov rsi, [rbp+var_F8]
xor ecx, ecx
xor edx, edx
mov rdi, rbx
mov r8d, 1
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_mutateEmmPKcm; std::string::_M_mutate(ulong,ulong,char const*,ulong)
mov rax, [rbx]
jmp short loc_6360
loc_63CF:
mov rdi, r15; this
call __ZNSt6localeC1Ev; std::locale::locale(void)
lea rax, [rbp+var_E8]
mov rsi, r15; std::locale *
mov rdi, rax; this
mov r14, rax
call __ZNSt6localeC1ERKS_; std::locale::locale(std::locale const&)
lea rdi, _ZNSt5ctypeIcE2idE@GLIBCXX_3_4; this
call __ZNKSt6locale2id5_M_idEv; std::locale::id::_M_id(void)
mov rdx, rax
mov rax, [rbp+var_E8]
mov rax, [rax+8]
cmp qword ptr [rax+rdx*8], 0
jz loc_666C
mov rdi, r14; this
call __ZNSt6localeD1Ev; std::locale::~locale()
mov esi, 2Eh ; '.'
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov rdi, r15; this
call __ZNSt6localeD1Ev; std::locale::~locale()
mov rdx, qword ptr [rbp+var_A0+8]
mov rax, qword ptr [rbp+var_A0]
mov rcx, rdx
sub rcx, rax
cmp rcx, 48h ; 'H'
jbe loc_6540
lea rsi, [rax+rcx-18h]
cmp rdx, rax
mov r14, [rsi]
mov r13, [rsi+8]
lea rsi, [rdx+rcx-48h]
cmovnz rsi, rax
loc_6464:
cmp byte ptr [rsi+10h], 0
jz short loc_64E3
cmp rdx, rax
jz loc_65BD
loc_6473:
mov r12, [rax+8]
mov rdi, r12
cmp r12, [rax]
jz loc_6572
loc_6483:
mov r8d, [rbp+var_A8]
sub rsp, 8
mov rcx, [rbp+var_B0]
xor r9d, r9d
mov rdx, [rbp+var_120]
mov rsi, qword ptr [rbp+var_C0+8]
or r8b, 80h
mov [rbp+var_A8], r8d
push 0
call _ZNSt8__detail17__regex_algo_implIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS5_9sub_matchISB_EEEcNS5_12regex_traitsIcEEEEbT_SH_RNS5_13match_resultsISH_T0_EERKNS5_11basic_regexIT1_T2_EENSt15regex_constants15match_flag_typeENS_20_RegexExecutorPolicyEb; std::__detail::__regex_algo_impl<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>> &,std::basic_regex<char,std::regex_traits<char>> const&,std::regex_constants::match_flag_type,std::__detail::_RegexExecutorPolicy,bool)
pop rdx
pop rcx
test al, al
jz loc_6562
loc_64C2:
mov rax, qword ptr [rbp+var_A0+8]
cmp [rax-28h], r12
mov [rax-30h], r12
setnz byte ptr [rax-20h]
mov rax, qword ptr [rbp+var_C0]
mov qword ptr [rbp+var_90+8], rax
loc_64E3:
mov rsi, [rbp+var_110]
mov rdi, [rbp+var_118]
call _ZNKSt7__cxx1114regex_iteratorIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEEcNS_12regex_traitsIcEEEeqERKSD_; std::regex_iterator<__gnu_cxx::__normal_iterator<char const*,std::string>,char,std::regex_traits<char>>::operator==(std::regex_iterator<__gnu_cxx::__normal_iterator<char const*,std::string>,char,std::regex_traits<char>> const&)
test al, al
jz loc_6318
loc_64FE:
mov rax, r13
sub rax, r14
test rax, rax
jle loc_626D
nop dword ptr [rax]
loc_6510:
movsx esi, byte ptr [r14]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
add r14, 1
cmp r14, r13
jnz short loc_6510
jmp loc_626D
loc_6530:
mov edx, 0Fh
jmp loc_63AC
loc_6540:
lea rsi, [rax+rcx-48h]
mov r14, [rsi]
mov r13, [rsi+8]
cmp rdx, rax
jz loc_6464
cmp rcx, 48h ; 'H'
cmovnz rsi, rax
jmp loc_6464
loc_6562:
mov [rbp+var_B0], 0
jmp loc_64E3
loc_6572:
cmp r12, qword ptr [rbp+var_C0+8]
jz short loc_6562
sub rsp, 8
mov r8d, [rbp+var_A8]
mov rcx, [rbp+var_B0]
xor r9d, r9d
mov rdx, [rbp+var_120]
mov rsi, qword ptr [rbp+var_C0+8]
push 0
or r8d, 60h
call _ZNSt8__detail17__regex_algo_implIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS5_9sub_matchISB_EEEcNS5_12regex_traitsIcEEEEbT_SH_RNS5_13match_resultsISH_T0_EERKNS5_11basic_regexIT1_T2_EENSt15regex_constants15match_flag_typeENS_20_RegexExecutorPolicyEb; std::__detail::__regex_algo_impl<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>> &,std::basic_regex<char,std::regex_traits<char>> const&,std::regex_constants::match_flag_type,std::__detail::_RegexExecutorPolicy,bool)
pop rsi
pop rdi
lea rdi, [r12+1]
test al, al
jz loc_6483
jmp loc_64C2
loc_65BD:
lea rax, [rax+rcx-48h]
jmp loc_6473
loc_65C7:
pxor xmm0, xmm0
lea r14, [rbp+var_60]
mov rdi, [rbp+var_120]
mov qword ptr [rbp+var_C0], 0
movaps [rbp+var_70], xmm0
mov rsi, r14
pxor xmm0, xmm0
mov qword ptr [rbp+var_C0+8], 0
mov [rbp+var_B0], 0
mov [rbp+var_A8], 0
movaps [rbp+var_80], xmm0
movaps [rbp+var_60], xmm0
movaps [rbp+var_50], xmm0
call _ZNSt6vectorINSt7__cxx119sub_matchIN9__gnu_cxx17__normal_iteratorIPKcNS0_12basic_stringIcSt11char_traitsIcESaIcEEEEEEESaISC_EEaSERKSE__isra_0; std::vector<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>::operator=(std::vector<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>> const&) [clone]
mov rax, qword ptr [rbp+var_50+8]
mov rdi, r14
mov qword ptr [rbp+var_90+8], rax
call _ZNSt6vectorINSt7__cxx119sub_matchIN9__gnu_cxx17__normal_iteratorIPKcNS0_12basic_stringIcSt11char_traitsIcESaIcEEEEEEESaISC_EED2Ev; std::vector<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~vector()
jmp loc_6207
loc_6635:
mov rax, [rdi]
mov r14, rdi
mov qword ptr [rdi+8], 0
call qword ptr [rax+10h]
mov rax, [r14]
mov rdi, r14
call qword ptr [rax+18h]
jmp loc_62CB
loc_6654:
mov eax, 0FFFFFFFFh
lock xadd [rdx], eax
jmp loc_62C2
loc_6662:
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE24_M_release_last_use_coldEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release_last_use_cold(void)
jmp loc_62CB
loc_666C:
mov rax, [rbp+var_38]
sub rax, fs:28h
jnz short loc_6685
call __ZSt16__throw_bad_castv; std::__throw_bad_cast(void)
loc_6680:
call ___stack_chk_fail
loc_6685:
call ___stack_chk_fail
endbr64
mov rbx, rax
jmp _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE_cold; func0(std::string const&) [clone]
endbr64
mov r15, rax
jmp loc_48B6
endbr64
mov r14, rax
jmp loc_48AB
endbr64
mov r12, rax
jmp loc_48A0
endbr64
mov r15, rax
jmp loc_48BF
endbr64
mov r15, rax
jmp loc_4900 | _QWORD * func0(_QWORD *a1, char **a2)
{
char *v3; // rax
long long v4; // r13
char *v5; // r15
char *v6; // r12
char v7; // al
long long v8; // rdx
long long v9; // rcx
long long v10; // r8
long long v11; // r9
unsigned long long v12; // rsi
long long v13; // rdi
volatile signed __int32 *v14; // rdx
signed __int32 v15; // eax
long long v17; // rax
char *v18; // r12
long long v19; // rax
char v20; // r14
unsigned long long v21; // r13
long long v22; // rax
unsigned long long v23; // rdx
long long v24; // rax
long long v25; // r8
long long v26; // r9
__int128 v27; // rax
long long v28; // rcx
char *v29; // r14
char *v30; // r13
long long v31; // rsi
long long v32; // r12
int v33; // edi
int v34; // r8d
long long v35; // rax
bool v36; // zf
long long v37; // rax
long long v38; // [rsp-10h] [rbp-140h]
long long v39; // [rsp-10h] [rbp-140h]
long long v40; // [rsp-8h] [rbp-138h]
std::locale *v41; // [rsp+0h] [rbp-130h]
_QWORD *v42; // [rsp+28h] [rbp-108h]
char *v43; // [rsp+30h] [rbp-100h]
long long v44; // [rsp+38h] [rbp-F8h]
char v45[8]; // [rsp+40h] [rbp-F0h] BYREF
long long v46; // [rsp+48h] [rbp-E8h] BYREF
char v47[8]; // [rsp+50h] [rbp-E0h] BYREF
char v48[8]; // [rsp+58h] [rbp-D8h] BYREF
__int128 v49; // [rsp+60h] [rbp-D0h]
__m128i v50; // [rsp+70h] [rbp-C0h] BYREF
char *v51; // [rsp+80h] [rbp-B0h]
int v52; // [rsp+88h] [rbp-A8h]
__int128 v53; // [rsp+90h] [rbp-A0h] BYREF
__int128 v54; // [rsp+A0h] [rbp-90h]
__int128 v55; // [rsp+B0h] [rbp-80h] BYREF
__int128 v56; // [rsp+C0h] [rbp-70h]
__int128 v57; // [rsp+D0h] [rbp-60h] BYREF
__int128 v58; // [rsp+E0h] [rbp-50h]
unsigned long long v59; // [rsp+F8h] [rbp-38h]
v59 = __readfsqword(0x28u);
v41 = (std::locale *)v48;
std::locale::locale((std::locale *)v48);
v49 = 0LL;
std::basic_regex<char,std::regex_traits<char>>::_M_compile(v47, "\\.[0]*", "", 16LL);
*((_BYTE *)a1 + 16) = 0;
*a1 = a1 + 2;
v42 = a1 + 2;
v3 = *a2;
a1[1] = 0LL;
v4 = (long long)a2[1];
v5 = v3;
v51 = v47;
v52 = 0;
v6 = &v3[v4];
v50 = _mm_unpacklo_epi64((__m128i)(unsigned long long)v3, (__m128i)(unsigned long long)&v3[v4]);
v53 = 0LL;
v54 = 0LL;
v7 = std::__detail::__regex_algo_impl<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>>(
v50.m128i_i32[0],
v50.m128i_i32[2],
(unsigned int)&v53,
(unsigned int)v47,
0,
0,
0);
v10 = v38;
v11 = v40;
if ( !v7 )
{
v50 = 0uLL;
v56 = 0LL;
v51 = 0LL;
v52 = 0;
v55 = 0LL;
v57 = 0LL;
v58 = 0LL;
std::vector<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>::operator=(
&v53,
&v57,
v8,
v9,
v38,
v40,
v48);
*((_QWORD *)&v54 + 1) = *((_QWORD *)&v58 + 1);
std::vector<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~vector(&v57);
}
v12 = (unsigned long long)&v55;
*(_QWORD *)&v56 = 0LL;
DWORD2(v56) = 0;
v55 = 0LL;
v57 = 0LL;
v58 = 0LL;
if ( (unsigned __int8)std::regex_iterator<__gnu_cxx::__normal_iterator<char const*,std::string>,char,std::regex_traits<char>>::operator==(
&v50,
&v55,
v8,
v9,
v10,
v11) )
{
if ( v4 > 0 )
{
do
{
v12 = (unsigned int)*v5;
std::string::push_back(a1, v12);
++v5;
}
while ( v6 != v5 );
}
goto LABEL_6;
}
do
{
v17 = *((_QWORD *)&v53 + 1) - 48LL;
if ( *((_QWORD *)&v53 + 1) - (_QWORD)v53 < 0x49uLL )
v17 = *((_QWORD *)&v53 + 1) - 72LL;
v18 = *(char **)v17;
v43 = *(char **)(v17 + 8);
if ( (long long)&v43[-*(_QWORD *)v17] > 0 )
{
do
{
v20 = *v18;
v44 = a1[1];
v21 = v44 + 1;
v22 = *a1;
if ( v42 == (_QWORD *)*a1 )
v23 = 15LL;
else
v23 = a1[2];
if ( v23 < v21 )
{
std::string::_M_mutate(a1, v44, 0LL, 0LL, 1LL);
v22 = *a1;
}
++v18;
*(_BYTE *)(v22 + v44) = v20;
v19 = *a1;
a1[1] = v21;
*(_BYTE *)(v19 + v44 + 1) = 0;
}
while ( v43 != v18 );
}
std::locale::locale((std::locale *)v45);
std::locale::locale((std::locale *)&v46, (const std::locale *)v45);
v24 = std::locale::id::_M_id((std::locale::id *)&std::ctype<char>::id);
if ( !*(_QWORD *)(*(_QWORD *)(v46 + 8) + 8 * v24) )
std::__throw_bad_cast();
std::locale::~locale((std::locale *)&v46);
std::string::push_back(a1, 46LL);
std::locale::~locale((std::locale *)v45);
v27 = v53;
v28 = *((_QWORD *)&v53 + 1) - v53;
if ( *((_QWORD *)&v53 + 1) - (_QWORD)v53 <= 0x48uLL )
{
v31 = *((_QWORD *)&v53 + 1) - 72LL;
v29 = *(char **)(*((_QWORD *)&v53 + 1) - 72LL);
v30 = *(char **)(*((_QWORD *)&v53 + 1) - 72LL + 8);
if ( *((_QWORD *)&v53 + 1) != (_QWORD)v53 && v28 != 72 )
v31 = v53;
}
else
{
v29 = *(char **)(*((_QWORD *)&v53 + 1) - 24LL);
v30 = *(char **)(*((_QWORD *)&v53 + 1) - 24LL + 8);
v31 = *((_QWORD *)&v53 + 1) + v28 - 72;
if ( *((_QWORD *)&v53 + 1) != (_QWORD)v53 )
v31 = v53;
}
if ( *(_BYTE *)(v31 + 16) )
{
if ( *((_QWORD *)&v53 + 1) == (_QWORD)v53 )
*(_QWORD *)&v27 = *((_QWORD *)&v53 + 1) - 72LL;
v32 = *(_QWORD *)(v27 + 8);
v33 = v32;
if ( v32 == *(_QWORD *)v27 )
{
if ( v32 == v50.m128i_i64[1] )
{
LABEL_41:
v51 = 0LL;
goto LABEL_32;
}
v33 = v32 + 1;
if ( (unsigned __int8)std::__detail::__regex_algo_impl<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>>(
v32,
v50.m128i_i32[2],
(unsigned int)&v53,
(_DWORD)v51,
v52 | 0x60u,
0,
0) )
{
LABEL_31:
v35 = *((_QWORD *)&v53 + 1);
v36 = *(_QWORD *)(*((_QWORD *)&v53 + 1) - 40LL) == v32;
*(_QWORD *)(*((_QWORD *)&v53 + 1) - 48LL) = v32;
*(_BYTE *)(v35 - 32) = !v36;
*((_QWORD *)&v54 + 1) = v50.m128i_i64[0];
goto LABEL_32;
}
}
v34 = v52;
LOBYTE(v34) = v52 | 0x80;
v52 = v34;
LOBYTE(v27) = std::__detail::__regex_algo_impl<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>>(
v33,
v50.m128i_i32[2],
(unsigned int)&v53,
(_DWORD)v51,
v34,
0,
0);
*((_QWORD *)&v27 + 1) = v39;
v28 = v40;
if ( (_BYTE)v27 )
goto LABEL_31;
goto LABEL_41;
}
LABEL_32:
v12 = (unsigned long long)&v55;
}
while ( !(unsigned __int8)std::regex_iterator<__gnu_cxx::__normal_iterator<char const*,std::string>,char,std::regex_traits<char>>::operator==(
&v50,
&v55,
*((_QWORD *)&v27 + 1),
v28,
v25,
v26) );
if ( v30 - v29 > 0 )
{
do
{
v12 = (unsigned int)*v29;
std::string::push_back(a1, v12);
++v29;
}
while ( v29 != v30 );
}
LABEL_6:
std::vector<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~vector(&v57);
std::vector<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~vector(&v53);
v13 = *((_QWORD *)&v49 + 1);
if ( *((_QWORD *)&v49 + 1) )
{
v14 = (volatile signed __int32 *)(*((_QWORD *)&v49 + 1) + 8LL);
if ( *(_QWORD *)(*((_QWORD *)&v49 + 1) + 8LL) == 0x100000001LL )
{
v37 = **((_QWORD **)&v49 + 1);
*(_QWORD *)(*((_QWORD *)&v49 + 1) + 8LL) = 0LL;
(*(void ( **)(long long, unsigned long long, volatile signed __int32 *))(v37 + 16))(v13, v12, v14);
(*(void ( **)(long long))(*(_QWORD *)v13 + 24LL))(v13);
}
else
{
if ( _libc_single_threaded )
{
v15 = *(_DWORD *)(*((_QWORD *)&v49 + 1) + 8LL);
*(_DWORD *)(*((_QWORD *)&v49 + 1) + 8LL) = v15 - 1;
}
else
{
v15 = _InterlockedExchangeAdd(v14, 0xFFFFFFFF);
}
if ( v15 == 1 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release_last_use_cold(v13);
}
}
std::locale::~locale(v41);
return a1;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
LEA R15,[RBP + -0xe0]
PUSH R13
PUSH R12
MOV R12,RSI
PUSH RBX
MOV RBX,RDI
SUB RSP,0x108
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x38],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0xd8]
MOV qword ptr [RBP + -0x128],R15
MOV RDI,RAX
MOV qword ptr [RBP + -0x130],RAX
CALL 0x00104730
LEA RDX,[0x11b6a6]
PXOR XMM0,XMM0
MOV RDI,R15
MOV ECX,0x10
LEA RSI,[RDX + -0x6]
MOVAPS xmmword ptr [RBP + -0xd0],XMM0
LAB_0010615f:
CALL 0x00119bf0
LEA RAX,[RBX + 0x10]
MOV byte ptr [RBX + 0x10],0x0
SUB RSP,0x8
XOR R9D,R9D
MOV qword ptr [RBX],RAX
MOV RCX,qword ptr [RBP + -0x128]
XOR R8D,R8D
MOV qword ptr [RBP + -0x108],RAX
MOV RAX,qword ptr [R12]
MOV qword ptr [RBX + 0x8],0x0
MOV R13,qword ptr [R12 + 0x8]
MOVQ XMM0,RAX
MOV R15,RAX
MOV qword ptr [RBP + -0xb0],RCX
MOV dword ptr [RBP + -0xa8],0x0
LEA R12,[RAX + R13*0x1]
LEA RAX,[RBP + -0xa0]
MOVQ XMM1,R12
MOV qword ptr [RBP + -0x120],RAX
MOV RDX,RAX
PUNPCKLQDQ XMM0,XMM1
MOVAPS xmmword ptr [RBP + -0xc0],XMM0
MOVQ RDI,XMM0
PXOR XMM0,XMM0
MOV RSI,qword ptr [RBP + -0xb8]
MOVAPS xmmword ptr [RBP + -0xa0],XMM0
MOVAPS xmmword ptr [RBP + -0x90],XMM0
PUSH 0x0
LAB_001061f6:
CALL 0x00113120
POP R8
POP R9
TEST AL,AL
JZ 0x001065c7
LAB_00106207:
LEA RAX,[RBP + -0xc0]
PXOR XMM0,XMM0
LEA RSI,[RBP + -0x80]
MOV qword ptr [RBP + -0x70],0x0
MOV RDI,RAX
MOV dword ptr [RBP + -0x68],0x0
MOV qword ptr [RBP + -0x110],RSI
MOV qword ptr [RBP + -0x118],RAX
MOVAPS xmmword ptr [RBP + -0x80],XMM0
MOVAPS xmmword ptr [RBP + -0x60],XMM0
MOVAPS xmmword ptr [RBP + -0x50],XMM0
CALL 0x00107c90
TEST AL,AL
JZ 0x001062fc
TEST R13,R13
JLE 0x0010626d
NOP dword ptr [RAX]
LAB_00106258:
MOVSX ESI,byte ptr [R15]
MOV RDI,RBX
LAB_0010625f:
CALL 0x00104580
ADD R15,0x1
CMP R12,R15
JNZ 0x00106258
LAB_0010626d:
LEA RDI,[RBP + -0x60]
CALL 0x00107c60
MOV RDI,qword ptr [RBP + -0x120]
CALL 0x00107c60
MOV RAX,qword ptr [RBP + -0xc8]
MOV RDI,RAX
TEST RAX,RAX
JZ 0x001062cb
MOV RCX,qword ptr [RAX + 0x8]
LEA RDX,[RAX + 0x8]
MOV RAX,0x100000001
CMP RCX,RAX
JZ 0x00106635
CMP byte ptr [0x00121460],0x0
JZ 0x00106654
MOV EAX,dword ptr [RDI + 0x8]
LEA EDX,[RAX + -0x1]
MOV dword ptr [RDI + 0x8],EDX
LAB_001062c2:
CMP EAX,0x1
JZ 0x00106662
LAB_001062cb:
MOV RDI,qword ptr [RBP + -0x130]
CALL 0x00104680
MOV RAX,qword ptr [RBP + -0x38]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x00106680
LEA RSP,[RBP + -0x28]
MOV RAX,RBX
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001062fc:
XOR R13D,R13D
XOR R14D,R14D
LEA R15,[RBP + -0xf0]
TEST AL,AL
JNZ 0x001064fe
NOP dword ptr [RAX]
LAB_00106318:
MOV RDX,qword ptr [RBP + -0xa0]
MOV RAX,qword ptr [RBP + -0x98]
SUB RAX,RDX
LEA RCX,[RDX + RAX*0x1 + -0x30]
CMP RAX,0x49
LEA RDX,[RDX + RAX*0x1 + -0x48]
MOV RAX,RCX
CMOVC RAX,RDX
MOV R12,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x100],RAX
SUB RAX,R12
TEST RAX,RAX
JG 0x00106384
JMP 0x001063cf
LAB_00106360:
MOV RSI,qword ptr [RBP + -0xf8]
ADD R12,0x1
MOV byte ptr [RAX + RSI*0x1],R14B
MOV RAX,qword ptr [RBX]
MOV qword ptr [RBX + 0x8],R13
MOV byte ptr [RAX + RSI*0x1 + 0x1],0x0
CMP qword ptr [RBP + -0x100],R12
JZ 0x001063cf
LAB_00106384:
MOV RAX,qword ptr [RBX + 0x8]
MOVZX R14D,byte ptr [R12]
MOV qword ptr [RBP + -0xf8],RAX
LEA R13,[RAX + 0x1]
MOV RAX,qword ptr [RBX]
CMP qword ptr [RBP + -0x108],RAX
JZ 0x00106530
MOV RDX,qword ptr [RBX + 0x10]
LAB_001063ac:
CMP RDX,R13
JNC 0x00106360
MOV RSI,qword ptr [RBP + -0xf8]
XOR ECX,ECX
XOR EDX,EDX
MOV RDI,RBX
MOV R8D,0x1
CALL 0x001046f0
MOV RAX,qword ptr [RBX]
JMP 0x00106360
LAB_001063cf:
MOV RDI,R15
CALL 0x00104730
LEA RAX,[RBP + -0xe8]
MOV RSI,R15
MOV RDI,RAX
MOV R14,RAX
CALL 0x001044f0
LEA RDI,[0x121480]
CALL 0x001044a0
MOV RDX,RAX
MOV RAX,qword ptr [RBP + -0xe8]
MOV RAX,qword ptr [RAX + 0x8]
CMP qword ptr [RAX + RDX*0x8],0x0
JZ 0x0010666c
MOV RDI,R14
CALL 0x00104680
MOV ESI,0x2e
MOV RDI,RBX
LAB_00106421:
CALL 0x00104580
MOV RDI,R15
CALL 0x00104680
MOV RDX,qword ptr [RBP + -0x98]
MOV RAX,qword ptr [RBP + -0xa0]
MOV RCX,RDX
SUB RCX,RAX
CMP RCX,0x48
JBE 0x00106540
LEA RSI,[RAX + RCX*0x1 + -0x18]
CMP RDX,RAX
MOV R14,qword ptr [RSI]
MOV R13,qword ptr [RSI + 0x8]
LEA RSI,[RDX + RCX*0x1 + -0x48]
CMOVNZ RSI,RAX
LAB_00106464:
CMP byte ptr [RSI + 0x10],0x0
JZ 0x001064e3
CMP RDX,RAX
JZ 0x001065bd
LAB_00106473:
MOV R12,qword ptr [RAX + 0x8]
MOV RDI,R12
CMP R12,qword ptr [RAX]
JZ 0x00106572
LAB_00106483:
MOV R8D,dword ptr [RBP + -0xa8]
SUB RSP,0x8
MOV RCX,qword ptr [RBP + -0xb0]
XOR R9D,R9D
MOV RDX,qword ptr [RBP + -0x120]
MOV RSI,qword ptr [RBP + -0xb8]
OR R8B,0x80
MOV dword ptr [RBP + -0xa8],R8D
PUSH 0x0
LAB_001064b3:
CALL 0x00113120
POP RDX
POP RCX
TEST AL,AL
JZ 0x00106562
LAB_001064c2:
MOV RAX,qword ptr [RBP + -0x98]
CMP qword ptr [RAX + -0x28],R12
MOV qword ptr [RAX + -0x30],R12
SETNZ byte ptr [RAX + -0x20]
MOV RAX,qword ptr [RBP + -0xc0]
MOV qword ptr [RBP + -0x88],RAX
LAB_001064e3:
MOV RSI,qword ptr [RBP + -0x110]
MOV RDI,qword ptr [RBP + -0x118]
CALL 0x00107c90
TEST AL,AL
JZ 0x00106318
LAB_001064fe:
MOV RAX,R13
SUB RAX,R14
TEST RAX,RAX
JLE 0x0010626d
NOP dword ptr [RAX]
LAB_00106510:
MOVSX ESI,byte ptr [R14]
MOV RDI,RBX
CALL 0x00104580
ADD R14,0x1
CMP R14,R13
JNZ 0x00106510
JMP 0x0010626d
LAB_00106530:
MOV EDX,0xf
JMP 0x001063ac
LAB_00106540:
LEA RSI,[RAX + RCX*0x1 + -0x48]
MOV R14,qword ptr [RSI]
MOV R13,qword ptr [RSI + 0x8]
CMP RDX,RAX
JZ 0x00106464
CMP RCX,0x48
CMOVNZ RSI,RAX
JMP 0x00106464
LAB_00106562:
MOV qword ptr [RBP + -0xb0],0x0
JMP 0x001064e3
LAB_00106572:
CMP R12,qword ptr [RBP + -0xb8]
JZ 0x00106562
SUB RSP,0x8
MOV R8D,dword ptr [RBP + -0xa8]
MOV RCX,qword ptr [RBP + -0xb0]
XOR R9D,R9D
MOV RDX,qword ptr [RBP + -0x120]
MOV RSI,qword ptr [RBP + -0xb8]
PUSH 0x0
OR R8D,0x60
CALL 0x00113120
POP RSI
POP RDI
LEA RDI,[R12 + 0x1]
TEST AL,AL
JZ 0x00106483
JMP 0x001064c2
LAB_001065bd:
LEA RAX,[RAX + RCX*0x1 + -0x48]
JMP 0x00106473
LAB_001065c7:
PXOR XMM0,XMM0
LEA R14,[RBP + -0x60]
MOV RDI,qword ptr [RBP + -0x120]
MOV qword ptr [RBP + -0xc0],0x0
MOVAPS xmmword ptr [RBP + -0x70],XMM0
MOV RSI,R14
PXOR XMM0,XMM0
MOV qword ptr [RBP + -0xb8],0x0
MOV qword ptr [RBP + -0xb0],0x0
MOV dword ptr [RBP + -0xa8],0x0
MOVAPS xmmword ptr [RBP + -0x80],XMM0
MOVAPS xmmword ptr [RBP + -0x60],XMM0
MOVAPS xmmword ptr [RBP + -0x50],XMM0
LAB_00106618:
CALL 0x00105090
MOV RAX,qword ptr [RBP + -0x48]
MOV RDI,R14
MOV qword ptr [RBP + -0x88],RAX
CALL 0x00107c60
JMP 0x00106207
LAB_00106635:
MOV RAX,qword ptr [RDI]
MOV R14,RDI
MOV qword ptr [RDI + 0x8],0x0
CALL qword ptr [RAX + 0x10]
MOV RAX,qword ptr [R14]
MOV RDI,R14
CALL qword ptr [RAX + 0x18]
JMP 0x001062cb
LAB_00106654:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDX],EAX
JMP 0x001062c2
LAB_00106662:
CALL 0x001078d0
JMP 0x001062cb
LAB_0010666c:
MOV RAX,qword ptr [RBP + -0x38]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x00106685
LAB_0010667b:
CALL 0x00104630
LAB_00106680:
CALL 0x001045e0
LAB_00106685:
CALL 0x001045e0 | /* func0(std::string const&) */
string * func0(string *param_1)
{
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
string sVar2;
string *psVar3;
long lVar4;
int8 uVar5;
bool bVar6;
char cVar7;
int iVar8;
int8 *puVar9;
string *psVar10;
long lVar11;
long *plVar12;
ulong uVar13;
ulong uVar14;
long *in_RSI;
char cVar15;
long lVar16;
string *psVar17;
long lVar18;
long in_FS_OFFSET;
locale local_f8 [2];
long local_f0;
regex local_e8 [8];
int local_e0 [8];
int local_d8 [16];
long local_c8;
long lStack_c0;
regex *local_b8;
uint local_b0;
int local_a8 [16];
int local_98 [16];
regex_iterator local_88 [16];
int local_78 [16];
vector<std::sub_match<__normal_iterator<char_const*,std::string>>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::string>>>>
local_68 [16];
int local_58 [16];
long local_40;
local_78._12_4_ = SUB84(local_78._0_8_,4);
local_40 = *(long *)(in_FS_OFFSET + 0x28);
std::locale::locale(local_e0);
local_d8 = (int [16])0x0;
/* try { // try from 0010615f to 00106163 has its CatchHandler @ 0010668a */
std::regex::_M_compile(local_e8,"\\.[0]*","",0x10);
param_1[0x10] = (string)0x0;
*(string **)param_1 = param_1 + 0x10;
lVar18 = *in_RSI;
*(int8 *)(param_1 + 8) = 0;
lVar16 = in_RSI[1];
local_b0 = 0;
lVar11 = lVar18 + lVar16;
local_a8 = (int [16])0x0;
local_98 = (int [16])0x0;
local_c8 = lVar18;
lStack_c0 = lVar11;
local_b8 = local_e8;
/* try { // try from 001061f6 to 001061fa has its CatchHandler @ 001066ba */
bVar6 = std::__detail::
__regex_algo_impl<__normal_iterator<char_const*,std::string>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::string>>>,char,std::regex_traits<char>>
((__normal_iterator)lVar18,(__normal_iterator)lVar11,(match_results *)local_a8,
local_e8,0,0,false);
if (!bVar6) {
local_c8 = 0;
local_78 = (int [16])0x0;
lStack_c0 = 0;
local_b8 = (regex *)0x0;
local_b0 = 0;
local_88[0] = (regex_iterator)0x0;
local_88[1] = (regex_iterator)0x0;
local_88[2] = (regex_iterator)0x0;
local_88[3] = (regex_iterator)0x0;
local_88[4] = (regex_iterator)0x0;
local_88[5] = (regex_iterator)0x0;
local_88[6] = (regex_iterator)0x0;
local_88[7] = (regex_iterator)0x0;
local_88[8] = (regex_iterator)0x0;
local_88[9] = (regex_iterator)0x0;
local_88[10] = (regex_iterator)0x0;
local_88[0xb] = (regex_iterator)0x0;
local_88[0xc] = (regex_iterator)0x0;
local_88[0xd] = (regex_iterator)0x0;
local_88[0xe] = (regex_iterator)0x0;
local_88[0xf] = (regex_iterator)0x0;
local_68[0] = (vector<std::sub_match<__normal_iterator<char_const*,std::string>>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::string>>>>
)0x0;
local_68[1] = (vector<std::sub_match<__normal_iterator<char_const*,std::string>>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::string>>>>
)0x0;
local_68[2] = (vector<std::sub_match<__normal_iterator<char_const*,std::string>>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::string>>>>
)0x0;
local_68[3] = (vector<std::sub_match<__normal_iterator<char_const*,std::string>>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::string>>>>
)0x0;
local_68[4] = (vector<std::sub_match<__normal_iterator<char_const*,std::string>>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::string>>>>
)0x0;
local_68[5] = (vector<std::sub_match<__normal_iterator<char_const*,std::string>>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::string>>>>
)0x0;
local_68[6] = (vector<std::sub_match<__normal_iterator<char_const*,std::string>>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::string>>>>
)0x0;
local_68[7] = (vector<std::sub_match<__normal_iterator<char_const*,std::string>>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::string>>>>
)0x0;
local_68[8] = (vector<std::sub_match<__normal_iterator<char_const*,std::string>>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::string>>>>
)0x0;
local_68[9] = (vector<std::sub_match<__normal_iterator<char_const*,std::string>>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::string>>>>
)0x0;
local_68[10] = (vector<std::sub_match<__normal_iterator<char_const*,std::string>>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::string>>>>
)0x0;
local_68[0xb] =
(vector<std::sub_match<__normal_iterator<char_const*,std::string>>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::string>>>>
)0x0;
local_68[0xc] =
(vector<std::sub_match<__normal_iterator<char_const*,std::string>>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::string>>>>
)0x0;
local_68[0xd] =
(vector<std::sub_match<__normal_iterator<char_const*,std::string>>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::string>>>>
)0x0;
local_68[0xe] =
(vector<std::sub_match<__normal_iterator<char_const*,std::string>>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::string>>>>
)0x0;
local_68[0xf] =
(vector<std::sub_match<__normal_iterator<char_const*,std::string>>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::string>>>>
)0x0;
local_58 = (int [16])0x0;
/* try { // try from 00106618 to 0010661c has its CatchHandler @ 001066c6 */
std::
vector<std::sub_match<__normal_iterator<char_const*,std::string>>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::string>>>>
::operator=((vector<std::sub_match<__normal_iterator<char_const*,std::string>>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::string>>>>
*)local_a8,(vector *)local_68);
local_98._8_8_ = local_58._8_8_;
std::
vector<std::sub_match<__normal_iterator<char_const*,std::string>>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::string>>>>
::~vector(local_68);
}
local_78._0_12_ = ZEXT812(0);
local_88[0] = (regex_iterator)0x0;
local_88[1] = (regex_iterator)0x0;
local_88[2] = (regex_iterator)0x0;
local_88[3] = (regex_iterator)0x0;
local_88[4] = (regex_iterator)0x0;
local_88[5] = (regex_iterator)0x0;
local_88[6] = (regex_iterator)0x0;
local_88[7] = (regex_iterator)0x0;
local_88[8] = (regex_iterator)0x0;
local_88[9] = (regex_iterator)0x0;
local_88[10] = (regex_iterator)0x0;
local_88[0xb] = (regex_iterator)0x0;
local_88[0xc] = (regex_iterator)0x0;
local_88[0xd] = (regex_iterator)0x0;
local_88[0xe] = (regex_iterator)0x0;
local_88[0xf] = (regex_iterator)0x0;
local_68[0] = (vector<std::sub_match<__normal_iterator<char_const*,std::string>>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::string>>>>
)0x0;
local_68[1] = (vector<std::sub_match<__normal_iterator<char_const*,std::string>>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::string>>>>
)0x0;
local_68[2] = (vector<std::sub_match<__normal_iterator<char_const*,std::string>>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::string>>>>
)0x0;
local_68[3] = (vector<std::sub_match<__normal_iterator<char_const*,std::string>>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::string>>>>
)0x0;
local_68[4] = (vector<std::sub_match<__normal_iterator<char_const*,std::string>>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::string>>>>
)0x0;
local_68[5] = (vector<std::sub_match<__normal_iterator<char_const*,std::string>>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::string>>>>
)0x0;
local_68[6] = (vector<std::sub_match<__normal_iterator<char_const*,std::string>>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::string>>>>
)0x0;
local_68[7] = (vector<std::sub_match<__normal_iterator<char_const*,std::string>>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::string>>>>
)0x0;
local_68[8] = (vector<std::sub_match<__normal_iterator<char_const*,std::string>>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::string>>>>
)0x0;
local_68[9] = (vector<std::sub_match<__normal_iterator<char_const*,std::string>>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::string>>>>
)0x0;
local_68[10] = (vector<std::sub_match<__normal_iterator<char_const*,std::string>>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::string>>>>
)0x0;
local_68[0xb] =
(vector<std::sub_match<__normal_iterator<char_const*,std::string>>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::string>>>>
)0x0;
local_68[0xc] =
(vector<std::sub_match<__normal_iterator<char_const*,std::string>>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::string>>>>
)0x0;
local_68[0xd] =
(vector<std::sub_match<__normal_iterator<char_const*,std::string>>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::string>>>>
)0x0;
local_68[0xe] =
(vector<std::sub_match<__normal_iterator<char_const*,std::string>>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::string>>>>
)0x0;
local_68[0xf] =
(vector<std::sub_match<__normal_iterator<char_const*,std::string>>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::string>>>>
)0x0;
local_58 = (int [16])0x0;
cVar7 = std::
regex_iterator<__normal_iterator<char_const*,std::string>,char,std::regex_traits<char>>::
operator==((regex_iterator<__normal_iterator<char_const*,std::string>,char,std::regex_traits<char>>
*)&local_c8,local_88);
cVar15 = (char)param_1;
if (cVar7 == '\0') {
do {
lVar11 = local_a8._0_8_ + -0x30;
if ((ulong)(local_a8._8_8_ - local_a8._0_8_) < 0x49) {
lVar11 = local_a8._0_8_ + -0x48;
}
puVar9 = (int8 *)(lVar11 + (local_a8._8_8_ - local_a8._0_8_));
psVar17 = (string *)*puVar9;
psVar3 = (string *)puVar9[1];
if (psVar3 != psVar17 && -1 < (long)psVar3 - (long)psVar17) {
do {
uVar13 = *(ulong *)(param_1 + 8);
sVar2 = *psVar17;
psVar10 = *(string **)param_1;
if (param_1 + 0x10 == psVar10) {
uVar14 = 0xf;
}
else {
uVar14 = *(ulong *)(param_1 + 0x10);
}
if (uVar14 < uVar13 + 1) {
std::string::_M_mutate((ulong)param_1,uVar13,(char *)0x0,0);
psVar10 = *(string **)param_1;
}
psVar17 = psVar17 + 1;
psVar10[uVar13] = sVar2;
*(ulong *)(param_1 + 8) = uVar13 + 1;
*(int *)(*(long *)param_1 + 1 + uVar13) = 0;
} while (psVar3 != psVar17);
}
std::locale::locale(local_f8);
std::locale::locale(&local_f0,local_f8);
lVar11 = std::locale::id::_M_id();
if (*(long *)(*(long *)(local_f0 + 8) + lVar11 * 8) == 0) {
if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {
/* WARNING: Subroutine does not return */
/* try { // try from 0010667b to 0010667f has its CatchHandler @ 001066ae */
std::__throw_bad_cast();
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
std::locale::~locale(&local_f0);
/* try { // try from 00106421 to 00106425 has its CatchHandler @ 001066a2 */
std::string::push_back(cVar15);
std::locale::~locale(local_f8);
uVar13 = local_a8._8_8_ - local_a8._0_8_;
if (uVar13 < 0x49) {
plVar12 = (long *)(local_a8._0_8_ + (uVar13 - 0x48));
lVar11 = *plVar12;
lVar18 = plVar12[1];
if ((local_a8._8_8_ != local_a8._0_8_) && (uVar13 != 0x48)) {
plVar12 = (long *)local_a8._0_8_;
}
}
else {
plVar12 = (long *)(local_a8._0_8_ + (uVar13 - 0x18));
lVar11 = *plVar12;
lVar18 = plVar12[1];
plVar12 = (long *)(local_a8._8_8_ + (uVar13 - 0x48));
if (local_a8._8_8_ != local_a8._0_8_) {
plVar12 = (long *)local_a8._0_8_;
}
}
if (*(char *)(plVar12 + 2) != '\0') {
plVar12 = (long *)local_a8._0_8_;
if (local_a8._8_8_ == local_a8._0_8_) {
plVar12 = (long *)(local_a8._0_8_ + (uVar13 - 0x48));
}
lVar4 = plVar12[1];
lVar16 = lVar4;
if (lVar4 == *plVar12) {
if (lVar4 == lStack_c0) goto LAB_00106562;
bVar6 = std::__detail::
__regex_algo_impl<__normal_iterator<char_const*,std::string>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::string>>>,char,std::regex_traits<char>>
((__normal_iterator)lVar4,(__normal_iterator)lStack_c0,
(match_results *)local_a8,local_b8,local_b0 | 0x60,0,false);
lVar16 = lVar4 + 1;
if (!bVar6) goto LAB_00106483;
}
else {
LAB_00106483:
local_b0 = local_b0 | 0x80;
/* try { // try from 001064b3 to 001065a8 has its CatchHandler @ 00106696 */
bVar6 = std::__detail::
__regex_algo_impl<__normal_iterator<char_const*,std::string>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::string>>>,char,std::regex_traits<char>>
((__normal_iterator)lVar16,(__normal_iterator)lStack_c0,
(match_results *)local_a8,local_b8,local_b0,0,false);
if (!bVar6) {
LAB_00106562:
local_b8 = (regex *)0x0;
goto LAB_001064e3;
}
}
*(long *)(local_a8._8_8_ + -0x30) = lVar4;
*(bool *)(local_a8._8_8_ + -0x20) = *(long *)(local_a8._8_8_ + -0x28) != lVar4;
local_98._8_8_ = local_c8;
}
LAB_001064e3:
cVar7 = std::
regex_iterator<__normal_iterator<char_const*,std::string>,char,std::regex_traits<char>>
::operator==((regex_iterator<__normal_iterator<char_const*,std::string>,char,std::regex_traits<char>>
*)&local_c8,local_88);
} while (cVar7 == '\0');
if (lVar18 != lVar11 && -1 < lVar18 - lVar11) {
do {
std::string::push_back(cVar15);
lVar11 = lVar11 + 1;
} while (lVar11 != lVar18);
}
}
else if (0 < lVar16) {
do {
/* try { // try from 0010625f to 001063c9 has its CatchHandler @ 00106696 */
std::string::push_back(cVar15);
lVar18 = lVar18 + 1;
} while (lVar11 != lVar18);
}
std::
vector<std::sub_match<__normal_iterator<char_const*,std::string>>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::string>>>>
::~vector(local_68);
std::
vector<std::sub_match<__normal_iterator<char_const*,std::string>>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::string>>>>
::~vector((vector<std::sub_match<__normal_iterator<char_const*,std::string>>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::string>>>>
*)local_a8);
uVar5 = local_d8._8_8_;
if ((_Sp_counted_base<(_Lock_policy)2> *)local_d8._8_8_ !=
(_Sp_counted_base<(_Lock_policy)2> *)0x0) {
p_Var1 = (_Sp_counted_base<(_Lock_policy)2> *)(local_d8._8_8_ + 8);
if (*(long *)(local_d8._8_8_ + 8) == 0x100000001) {
*(int8 *)(local_d8._8_8_ + 8) = 0;
(**(code **)(*(long *)local_d8._8_8_ + 0x10))();
(**(code **)(*(long *)uVar5 + 0x18))(uVar5);
}
else {
if (__libc_single_threaded == '\0') {
LOCK();
iVar8 = *(int *)p_Var1;
*(int *)p_Var1 = *(int *)p_Var1 + -1;
UNLOCK();
}
else {
iVar8 = *(int *)(local_d8._8_8_ + 8);
*(int *)(local_d8._8_8_ + 8) = iVar8 + -1;
}
if (iVar8 == 1) {
std::_Sp_counted_base<(_Lock_policy)2>::_M_release_last_use_cold
((_Sp_counted_base<(_Lock_policy)2> *)local_d8._8_8_);
}
}
}
std::locale::~locale(local_e0);
if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {
return param_1;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
} |
2,372 | func0 |
#include <iostream>
#include <vector>
#include <cassert>
| int func0(const std::vector<int>& list1) {
int first_even = -1;
int first_odd = -1;
for(int el : list1) {
if(el % 2 == 0) {
first_even = el;
break;
}
}
for(int el : list1) {
if(el % 2 != 0) {
first_odd = el;
break;
}
}
return first_even - first_odd;
}
| int main() {
assert(func0({1,3,5,7,4,1,6,8}) == 3);
assert(func0({1,2,3,4,5,6,7,8,9,10}) == 1);
assert(func0({1,5,7,9,10}) == 9);
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x50,%rsp
mov %rdi,-0x48(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x8(%rbp)
xor %eax,%eax
movl $0xffffffff,-0x38(%rbp)
movl $0xffffffff,-0x34(%rbp)
mov -0x48(%rbp),%rax
mov %rax,-0x18(%rbp)
mov -0x18(%rbp),%rax
mov %rax,%rdi
callq 1708 <_ZNKSt6vectorIiSaIiEE5beginEv>
mov %rax,-0x28(%rbp)
mov -0x18(%rbp),%rax
mov %rax,%rdi
callq 1760 <_ZNKSt6vectorIiSaIiEE3endEv>
mov %rax,-0x20(%rbp)
lea -0x20(%rbp),%rdx
lea -0x28(%rbp),%rax
mov %rdx,%rsi
mov %rax,%rdi
callq 17b8 <_ZN9__gnu_cxxneIPKiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESB_>
test %al,%al
je 1306 <_Z5func0RKSt6vectorIiSaIiEE+0x9d>
lea -0x28(%rbp),%rax
mov %rax,%rdi
callq 181c <_ZNK9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEdeEv>
mov (%rax),%eax
mov %eax,-0x30(%rbp)
mov -0x30(%rbp),%eax
and $0x1,%eax
test %eax,%eax
jne 12f8 <_Z5func0RKSt6vectorIiSaIiEE+0x8f>
mov -0x30(%rbp),%eax
mov %eax,-0x38(%rbp)
jmp 1306 <_Z5func0RKSt6vectorIiSaIiEE+0x9d>
lea -0x28(%rbp),%rax
mov %rax,%rdi
callq 17f8 <_ZN9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEppEv>
jmp 12be <_Z5func0RKSt6vectorIiSaIiEE+0x55>
mov -0x48(%rbp),%rax
mov %rax,-0x10(%rbp)
mov -0x10(%rbp),%rax
mov %rax,%rdi
callq 1708 <_ZNKSt6vectorIiSaIiEE5beginEv>
mov %rax,-0x28(%rbp)
mov -0x10(%rbp),%rax
mov %rax,%rdi
callq 1760 <_ZNKSt6vectorIiSaIiEE3endEv>
mov %rax,-0x20(%rbp)
lea -0x20(%rbp),%rdx
lea -0x28(%rbp),%rax
mov %rdx,%rsi
mov %rax,%rdi
callq 17b8 <_ZN9__gnu_cxxneIPKiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESB_>
test %al,%al
je 1376 <_Z5func0RKSt6vectorIiSaIiEE+0x10d>
lea -0x28(%rbp),%rax
mov %rax,%rdi
callq 181c <_ZNK9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEdeEv>
mov (%rax),%eax
mov %eax,-0x2c(%rbp)
mov -0x2c(%rbp),%eax
and $0x1,%eax
test %eax,%eax
je 1368 <_Z5func0RKSt6vectorIiSaIiEE+0xff>
mov -0x2c(%rbp),%eax
mov %eax,-0x34(%rbp)
jmp 1376 <_Z5func0RKSt6vectorIiSaIiEE+0x10d>
lea -0x28(%rbp),%rax
mov %rax,%rdi
callq 17f8 <_ZN9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEppEv>
jmp 132e <_Z5func0RKSt6vectorIiSaIiEE+0xc5>
mov -0x38(%rbp),%eax
sub -0x34(%rbp),%eax
mov -0x8(%rbp),%rcx
xor %fs:0x28,%rcx
je 1390 <_Z5func0RKSt6vectorIiSaIiEE+0x127>
callq 1140 <__stack_chk_fail@plt>
leaveq
retq
| _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_48], rdi
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
mov [rbp+var_38], 0FFFFFFFFh
mov [rbp+var_34], 0FFFFFFFFh
mov rax, [rbp+var_48]
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
mov rdi, rax
call _ZNKSt6vectorIiSaIiEE5beginEv; std::vector<int>::begin(void)
mov [rbp+var_28], rax
mov rax, [rbp+var_18]
mov rdi, rax
call _ZNKSt6vectorIiSaIiEE3endEv; std::vector<int>::end(void)
mov [rbp+var_20], rax
jmp short loc_12CF
loc_12A0:
lea rax, [rbp+var_28]
mov rdi, rax
call _ZNK9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEdeEv; __gnu_cxx::__normal_iterator<int const*,std::vector<int>>::operator*(void)
mov eax, [rax]
mov [rbp+var_30], eax
mov eax, [rbp+var_30]
and eax, 1
test eax, eax
jnz short loc_12C3
mov eax, [rbp+var_30]
mov [rbp+var_38], eax
jmp short loc_12E6
loc_12C3:
lea rax, [rbp+var_28]
mov rdi, rax
call _ZN9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEppEv; __gnu_cxx::__normal_iterator<int const*,std::vector<int>>::operator++(void)
loc_12CF:
lea rdx, [rbp+var_20]
lea rax, [rbp+var_28]
mov rsi, rdx
mov rdi, rax
call _ZN9__gnu_cxxneIPKiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESB_; __gnu_cxx::operator!=<int const*,std::vector<int>>(__gnu_cxx::__normal_iterator<int const*,std::vector<int>> const&,__gnu_cxx::__normal_iterator<int const*,std::vector<int>> const&)
test al, al
jnz short loc_12A0
loc_12E6:
mov rax, [rbp+var_48]
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov rdi, rax
call _ZNKSt6vectorIiSaIiEE5beginEv; std::vector<int>::begin(void)
mov [rbp+var_28], rax
mov rax, [rbp+var_10]
mov rdi, rax
call _ZNKSt6vectorIiSaIiEE3endEv; std::vector<int>::end(void)
mov [rbp+var_20], rax
jmp short loc_133F
loc_1310:
lea rax, [rbp+var_28]
mov rdi, rax
call _ZNK9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEdeEv; __gnu_cxx::__normal_iterator<int const*,std::vector<int>>::operator*(void)
mov eax, [rax]
mov [rbp+var_2C], eax
mov eax, [rbp+var_2C]
and eax, 1
test eax, eax
jz short loc_1333
mov eax, [rbp+var_2C]
mov [rbp+var_34], eax
jmp short loc_1356
loc_1333:
lea rax, [rbp+var_28]
mov rdi, rax
call _ZN9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEppEv; __gnu_cxx::__normal_iterator<int const*,std::vector<int>>::operator++(void)
loc_133F:
lea rdx, [rbp+var_20]
lea rax, [rbp+var_28]
mov rsi, rdx
mov rdi, rax
call _ZN9__gnu_cxxneIPKiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESB_; __gnu_cxx::operator!=<int const*,std::vector<int>>(__gnu_cxx::__normal_iterator<int const*,std::vector<int>> const&,__gnu_cxx::__normal_iterator<int const*,std::vector<int>> const&)
test al, al
jnz short loc_1310
loc_1356:
mov eax, [rbp+var_38]
sub eax, [rbp+var_34]
mov rdx, [rbp+var_8]
sub rdx, fs:28h
jz short locret_1370
call ___stack_chk_fail
locret_1370:
leave
retn | long long func0(long long a1)
{
int v2; // [rsp+18h] [rbp-38h]
int v3; // [rsp+1Ch] [rbp-34h]
int v4; // [rsp+20h] [rbp-30h]
int v5; // [rsp+24h] [rbp-2Ch]
long long v6; // [rsp+28h] [rbp-28h] BYREF
_QWORD v7[2]; // [rsp+30h] [rbp-20h] BYREF
long long v8; // [rsp+40h] [rbp-10h]
unsigned long long v9; // [rsp+48h] [rbp-8h]
v9 = __readfsqword(0x28u);
v2 = -1;
v3 = -1;
v7[1] = a1;
v6 = std::vector<int>::begin(a1);
v7[0] = std::vector<int>::end(a1);
while ( (unsigned __int8)__gnu_cxx::operator!=<int const*,std::vector<int>>(&v6, v7) )
{
v4 = *(_DWORD *)__gnu_cxx::__normal_iterator<int const*,std::vector<int>>::operator*(&v6);
if ( (v4 & 1) == 0 )
{
v2 = v4;
break;
}
__gnu_cxx::__normal_iterator<int const*,std::vector<int>>::operator++(&v6);
}
v8 = a1;
v6 = std::vector<int>::begin(a1);
v7[0] = std::vector<int>::end(v8);
while ( (unsigned __int8)__gnu_cxx::operator!=<int const*,std::vector<int>>(&v6, v7) )
{
v5 = *(_DWORD *)__gnu_cxx::__normal_iterator<int const*,std::vector<int>>::operator*(&v6);
if ( (v5 & 1) != 0 )
{
v3 = v5;
return (unsigned int)(v2 - v3);
}
__gnu_cxx::__normal_iterator<int const*,std::vector<int>>::operator++(&v6);
}
return (unsigned int)(v2 - v3);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x48],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
MOV dword ptr [RBP + -0x38],0xffffffff
MOV dword ptr [RBP + -0x34],0xffffffff
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,RAX
CALL 0x001016c8
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,RAX
CALL 0x00101714
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001012cf
LAB_001012a0:
LEA RAX,[RBP + -0x28]
MOV RDI,RAX
CALL 0x001017c8
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x30],EAX
MOV EAX,dword ptr [RBP + -0x30]
AND EAX,0x1
TEST EAX,EAX
JNZ 0x001012c3
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x38],EAX
JMP 0x001012e6
LAB_001012c3:
LEA RAX,[RBP + -0x28]
MOV RDI,RAX
CALL 0x001017a4
LAB_001012cf:
LEA RDX,[RBP + -0x20]
LEA RAX,[RBP + -0x28]
MOV RSI,RDX
MOV RDI,RAX
CALL 0x00101764
TEST AL,AL
JNZ 0x001012a0
LAB_001012e6:
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,RAX
CALL 0x001016c8
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,RAX
CALL 0x00101714
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0010133f
LAB_00101310:
LEA RAX,[RBP + -0x28]
MOV RDI,RAX
CALL 0x001017c8
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x2c],EAX
MOV EAX,dword ptr [RBP + -0x2c]
AND EAX,0x1
TEST EAX,EAX
JZ 0x00101333
MOV EAX,dword ptr [RBP + -0x2c]
MOV dword ptr [RBP + -0x34],EAX
JMP 0x00101356
LAB_00101333:
LEA RAX,[RBP + -0x28]
MOV RDI,RAX
CALL 0x001017a4
LAB_0010133f:
LEA RDX,[RBP + -0x20]
LEA RAX,[RBP + -0x28]
MOV RSI,RDX
MOV RDI,RAX
CALL 0x00101764
TEST AL,AL
JNZ 0x00101310
LAB_00101356:
MOV EAX,dword ptr [RBP + -0x38]
SUB EAX,dword ptr [RBP + -0x34]
MOV RDX,qword ptr [RBP + -0x8]
SUB RDX,qword ptr FS:[0x28]
JZ 0x00101370
CALL 0x00101130
LAB_00101370:
LEAVE
RET | /* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
uint uVar1;
bool bVar2;
uint *puVar3;
long in_FS_OFFSET;
uint local_40;
uint local_3c;
int8 local_30;
int8 local_28;
vector<int,std::allocator<int>> *local_20;
vector<int,std::allocator<int>> *local_18;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_40 = 0xffffffff;
local_3c = 0xffffffff;
local_20 = (vector<int,std::allocator<int>> *)param_1;
local_30 = std::vector<int,std::allocator<int>>::begin((vector<int,std::allocator<int>> *)param_1)
;
local_28 = std::vector<int,std::allocator<int>>::end(local_20);
while (bVar2 = operator!=((__normal_iterator *)&local_30,(__normal_iterator *)&local_28),
uVar1 = local_40, bVar2) {
puVar3 = (uint *)__normal_iterator<int_const*,std::vector<int,std::allocator<int>>>::operator*
((__normal_iterator<int_const*,std::vector<int,std::allocator<int>>>
*)&local_30);
uVar1 = *puVar3;
if ((*puVar3 & 1) == 0) break;
__normal_iterator<int_const*,std::vector<int,std::allocator<int>>>::operator++
((__normal_iterator<int_const*,std::vector<int,std::allocator<int>>> *)&local_30);
}
local_40 = uVar1;
local_18 = (vector<int,std::allocator<int>> *)param_1;
local_30 = std::vector<int,std::allocator<int>>::begin((vector<int,std::allocator<int>> *)param_1)
;
local_28 = std::vector<int,std::allocator<int>>::end(local_18);
while (bVar2 = operator!=((__normal_iterator *)&local_30,(__normal_iterator *)&local_28),
uVar1 = local_3c, bVar2) {
puVar3 = (uint *)__normal_iterator<int_const*,std::vector<int,std::allocator<int>>>::operator*
((__normal_iterator<int_const*,std::vector<int,std::allocator<int>>>
*)&local_30);
uVar1 = *puVar3;
if ((*puVar3 & 1) != 0) break;
__normal_iterator<int_const*,std::vector<int,std::allocator<int>>>::operator++
((__normal_iterator<int_const*,std::vector<int,std::allocator<int>>> *)&local_30);
}
local_3c = uVar1;
if (local_10 == *(long *)(in_FS_OFFSET + 0x28)) {
return local_40 - local_3c;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
} |
2,373 | func0 |
#include <iostream>
#include <vector>
#include <cassert>
| int func0(const std::vector<int>& list1) {
int first_even = -1;
int first_odd = -1;
for(int el : list1) {
if(el % 2 == 0) {
first_even = el;
break;
}
}
for(int el : list1) {
if(el % 2 != 0) {
first_odd = el;
break;
}
}
return first_even - first_odd;
}
| int main() {
assert(func0({1,3,5,7,4,1,6,8}) == 3);
assert(func0({1,2,3,4,5,6,7,8,9,10}) == 1);
assert(func0({1,5,7,9,10}) == 9);
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
mov (%rdi),%rdx
mov 0x8(%rdi),%rsi
cmp %rsi,%rdx
je 1288 <_Z5func0RKSt6vectorIiSaIiEE+0x3f>
mov %rdx,%rcx
mov (%rdx),%eax
test $0x1,%al
je 1270 <_Z5func0RKSt6vectorIiSaIiEE+0x27>
add $0x4,%rdx
cmp %rdx,%rsi
jne 125c <_Z5func0RKSt6vectorIiSaIiEE+0x13>
mov $0xffffffff,%eax
mov (%rcx),%edx
test $0x1,%dl
jne 1285 <_Z5func0RKSt6vectorIiSaIiEE+0x3c>
add $0x4,%rcx
cmp %rcx,%rsi
jne 1270 <_Z5func0RKSt6vectorIiSaIiEE+0x27>
mov $0xffffffff,%edx
sub %edx,%eax
retq
mov $0xffffffff,%eax
mov $0xffffffff,%edx
jmp 1285 <_Z5func0RKSt6vectorIiSaIiEE+0x3c>
| _Z5func0RKSt6vectorIiSaIiEE:
endbr64
mov rdx, [rdi]
mov rsi, [rdi+8]
cmp rsi, rdx
jz short loc_1248
mov rcx, rdx
loc_121C:
mov eax, [rdx]
test al, 1
jz short loc_1230
add rdx, 4
cmp rsi, rdx
jnz short loc_121C
mov eax, 0FFFFFFFFh
loc_1230:
mov edx, [rcx]
test dl, 1
jnz short loc_1245
add rcx, 4
cmp rsi, rcx
jnz short loc_1230
mov edx, 0FFFFFFFFh
loc_1245:
sub eax, edx
retn
loc_1248:
mov eax, 0FFFFFFFFh
mov edx, 0FFFFFFFFh
jmp short loc_1245 | long long func0(int **a1)
{
int *v1; // rdx
int *v2; // rsi
int *v3; // rcx
int v4; // eax
int v5; // edx
v1 = *a1;
v2 = a1[1];
if ( v2 == *a1 )
{
v4 = -1;
v5 = -1;
}
else
{
v3 = *a1;
do
{
v4 = *v1;
if ( (*v1 & 1) == 0 )
goto LABEL_6;
++v1;
}
while ( v2 != v1 );
v4 = -1;
LABEL_6:
while ( 1 )
{
v5 = *v3;
if ( (*v3 & 1) != 0 )
break;
if ( v2 == ++v3 )
{
v5 = -1;
return (unsigned int)(v4 - v5);
}
}
}
return (unsigned int)(v4 - v5);
} | func0:
ENDBR64
MOV RDX,qword ptr [RDI]
MOV RSI,qword ptr [RDI + 0x8]
CMP RSI,RDX
JZ 0x00101248
MOV RCX,RDX
LAB_0010121c:
MOV EAX,dword ptr [RDX]
TEST AL,0x1
JZ 0x00101230
ADD RDX,0x4
CMP RSI,RDX
JNZ 0x0010121c
MOV EAX,0xffffffff
LAB_00101230:
MOV EDX,dword ptr [RCX]
TEST DL,0x1
JNZ 0x00101245
ADD RCX,0x4
CMP RSI,RCX
JNZ 0x00101230
MOV EDX,0xffffffff
LAB_00101245:
SUB EAX,EDX
RET
LAB_00101248:
MOV EAX,0xffffffff
MOV EDX,0xffffffff
JMP 0x00101245 | /* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
uint *puVar1;
uint uVar2;
uint *puVar3;
uint uVar4;
uint *puVar5;
puVar3 = *(uint **)param_1;
puVar1 = *(uint **)(param_1 + 8);
puVar5 = puVar3;
if (puVar1 == puVar3) {
uVar2 = 0xffffffff;
uVar4 = 0xffffffff;
}
else {
do {
uVar2 = *puVar5;
if ((uVar2 & 1) == 0) goto LAB_00101230;
puVar5 = puVar5 + 1;
} while (puVar1 != puVar5);
uVar2 = 0xffffffff;
LAB_00101230:
do {
uVar4 = *puVar3;
if ((uVar4 & 1) != 0) goto LAB_00101245;
puVar3 = puVar3 + 1;
} while (puVar1 != puVar3);
uVar4 = 0xffffffff;
}
LAB_00101245:
return uVar2 - uVar4;
} |
2,374 | func0 |
#include <iostream>
#include <vector>
#include <cassert>
| int func0(const std::vector<int>& list1) {
int first_even = -1;
int first_odd = -1;
for(int el : list1) {
if(el % 2 == 0) {
first_even = el;
break;
}
}
for(int el : list1) {
if(el % 2 != 0) {
first_odd = el;
break;
}
}
return first_even - first_odd;
}
| int main() {
assert(func0({1,3,5,7,4,1,6,8}) == 3);
assert(func0({1,2,3,4,5,6,7,8,9,10}) == 1);
assert(func0({1,5,7,9,10}) == 9);
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
mov (%rdi),%rdx
mov 0x8(%rdi),%rsi
cmp %rsi,%rdx
je 15d4 <_Z5func0RKSt6vectorIiSaIiEE+0x54>
mov %rdx,%rcx
jmp 15a1 <_Z5func0RKSt6vectorIiSaIiEE+0x21>
nopl (%rax)
add $0x4,%rcx
cmp %rcx,%rsi
je 15c8 <_Z5func0RKSt6vectorIiSaIiEE+0x48>
mov (%rcx),%eax
test $0x1,%al
jne 1598 <_Z5func0RKSt6vectorIiSaIiEE+0x18>
jmp 15b9 <_Z5func0RKSt6vectorIiSaIiEE+0x39>
nopl 0x0(%rax)
add $0x4,%rdx
cmp %rdx,%rsi
je 15d0 <_Z5func0RKSt6vectorIiSaIiEE+0x50>
mov (%rdx),%ecx
test $0x1,%cl
je 15b0 <_Z5func0RKSt6vectorIiSaIiEE+0x30>
sub %ecx,%eax
retq
nopl 0x0(%rax,%rax,1)
mov $0xffffffff,%eax
jmp 15b9 <_Z5func0RKSt6vectorIiSaIiEE+0x39>
add $0x1,%eax
retq
xor %eax,%eax
retq
nopw 0x0(%rax,%rax,1)
| _Z5func0RKSt6vectorIiSaIiEE:
endbr64
mov rdx, [rdi]
mov rsi, [rdi+8]
cmp rsi, rdx
jz short loc_13E4
mov rcx, rdx
jmp short loc_13B1
loc_13A8:
add rcx, 4
cmp rsi, rcx
jz short loc_13D8
loc_13B1:
mov eax, [rcx]
test al, 1
jnz short loc_13A8
jmp short loc_13C9
loc_13C0:
add rdx, 4
cmp rsi, rdx
jz short loc_13E0
loc_13C9:
mov ecx, [rdx]
test cl, 1
jz short loc_13C0
sub eax, ecx
retn
loc_13D8:
mov eax, 0FFFFFFFFh
jmp short loc_13C9
loc_13E0:
add eax, 1
retn
loc_13E4:
xor eax, eax
retn | long long func0(int **a1)
{
int *v1; // rdx
int *v2; // rsi
int *v3; // rcx
int v4; // eax
v1 = *a1;
v2 = a1[1];
if ( v2 == *a1 )
return 0LL;
v3 = *a1;
while ( 1 )
{
v4 = *v3;
if ( (*v3 & 1) == 0 )
break;
if ( v2 == ++v3 )
{
v4 = -1;
goto LABEL_7;
}
}
do
{
LABEL_7:
if ( (*v1 & 1) != 0 )
return (unsigned int)(v4 - *v1);
++v1;
}
while ( v2 != v1 );
return (unsigned int)(v4 + 1);
} | func0:
ENDBR64
MOV RDX,qword ptr [RDI]
MOV RSI,qword ptr [RDI + 0x8]
CMP RSI,RDX
JZ 0x001013e4
MOV RCX,RDX
JMP 0x001013b1
LAB_001013a8:
ADD RCX,0x4
CMP RSI,RCX
JZ 0x001013d8
LAB_001013b1:
MOV EAX,dword ptr [RCX]
TEST AL,0x1
JNZ 0x001013a8
JMP 0x001013c9
LAB_001013c0:
ADD RDX,0x4
CMP RSI,RDX
JZ 0x001013e0
LAB_001013c9:
MOV ECX,dword ptr [RDX]
TEST CL,0x1
JZ 0x001013c0
SUB EAX,ECX
RET
LAB_001013d8:
MOV EAX,0xffffffff
JMP 0x001013c9
LAB_001013e0:
ADD EAX,0x1
RET
LAB_001013e4:
XOR EAX,EAX
RET | /* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
uint *puVar1;
uint uVar2;
uint *puVar3;
uint *puVar4;
puVar4 = *(uint **)param_1;
puVar1 = *(uint **)(param_1 + 8);
puVar3 = puVar4;
if (puVar1 == puVar4) {
return 0;
}
do {
uVar2 = *puVar3;
if ((uVar2 & 1) == 0) goto LAB_001013c9;
puVar3 = puVar3 + 1;
} while (puVar1 != puVar3);
uVar2 = 0xffffffff;
LAB_001013c9:
do {
if ((*puVar4 & 1) != 0) {
return uVar2 - *puVar4;
}
puVar4 = puVar4 + 1;
} while (puVar1 != puVar4);
return uVar2 + 1;
} |
2,375 | func0 |
#include <iostream>
#include <vector>
#include <cassert>
| int func0(const std::vector<int>& list1) {
int first_even = -1;
int first_odd = -1;
for(int el : list1) {
if(el % 2 == 0) {
first_even = el;
break;
}
}
for(int el : list1) {
if(el % 2 != 0) {
first_odd = el;
break;
}
}
return first_even - first_odd;
}
| int main() {
assert(func0({1,3,5,7,4,1,6,8}) == 3);
assert(func0({1,2,3,4,5,6,7,8,9,10}) == 1);
assert(func0({1,5,7,9,10}) == 9);
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
mov (%rdi),%rdx
mov 0x8(%rdi),%rsi
cmp %rsi,%rdx
je 1574 <_Z5func0RKSt6vectorIiSaIiEE+0x54>
mov %rdx,%rcx
jmp 1541 <_Z5func0RKSt6vectorIiSaIiEE+0x21>
nopl (%rax)
add $0x4,%rcx
cmp %rcx,%rsi
je 1568 <_Z5func0RKSt6vectorIiSaIiEE+0x48>
mov (%rcx),%eax
test $0x1,%al
jne 1538 <_Z5func0RKSt6vectorIiSaIiEE+0x18>
jmp 1559 <_Z5func0RKSt6vectorIiSaIiEE+0x39>
nopl 0x0(%rax)
add $0x4,%rdx
cmp %rdx,%rsi
je 1570 <_Z5func0RKSt6vectorIiSaIiEE+0x50>
mov (%rdx),%ecx
test $0x1,%cl
je 1550 <_Z5func0RKSt6vectorIiSaIiEE+0x30>
sub %ecx,%eax
retq
nopl 0x0(%rax,%rax,1)
mov $0xffffffff,%eax
jmp 1559 <_Z5func0RKSt6vectorIiSaIiEE+0x39>
add $0x1,%eax
retq
xor %eax,%eax
retq
nopw 0x0(%rax,%rax,1)
| _Z5func0RKSt6vectorIiSaIiEE:
endbr64
mov rdx, [rdi]
mov rsi, [rdi+8]
cmp rsi, rdx
jz short loc_14F4
mov rcx, rdx
jmp short loc_14C1
loc_14B8:
add rcx, 4
cmp rsi, rcx
jz short loc_14E8
loc_14C1:
mov eax, [rcx]
test al, 1
jnz short loc_14B8
jmp short loc_14D9
loc_14D0:
add rdx, 4
cmp rsi, rdx
jz short loc_14F0
loc_14D9:
mov ecx, [rdx]
test cl, 1
jz short loc_14D0
sub eax, ecx
retn
loc_14E8:
mov eax, 0FFFFFFFFh
jmp short loc_14D9
loc_14F0:
add eax, 1
retn
loc_14F4:
xor eax, eax
retn | long long func0(int **a1)
{
int *v1; // rdx
int *v2; // rsi
int *v3; // rcx
int v4; // eax
v1 = *a1;
v2 = a1[1];
if ( v2 == *a1 )
return 0LL;
v3 = *a1;
while ( 1 )
{
v4 = *v3;
if ( (*v3 & 1) == 0 )
break;
if ( v2 == ++v3 )
{
v4 = -1;
goto LABEL_7;
}
}
do
{
LABEL_7:
if ( (*v1 & 1) != 0 )
return (unsigned int)(v4 - *v1);
++v1;
}
while ( v2 != v1 );
return (unsigned int)(v4 + 1);
} | func0:
ENDBR64
MOV RDX,qword ptr [RDI]
MOV RSI,qword ptr [RDI + 0x8]
CMP RSI,RDX
JZ 0x001014f4
MOV RCX,RDX
JMP 0x001014c1
LAB_001014b8:
ADD RCX,0x4
CMP RSI,RCX
JZ 0x001014e8
LAB_001014c1:
MOV EAX,dword ptr [RCX]
TEST AL,0x1
JNZ 0x001014b8
JMP 0x001014d9
LAB_001014d0:
ADD RDX,0x4
CMP RSI,RDX
JZ 0x001014f0
LAB_001014d9:
MOV ECX,dword ptr [RDX]
TEST CL,0x1
JZ 0x001014d0
SUB EAX,ECX
RET
LAB_001014e8:
MOV EAX,0xffffffff
JMP 0x001014d9
LAB_001014f0:
ADD EAX,0x1
RET
LAB_001014f4:
XOR EAX,EAX
RET | /* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
uint *puVar1;
uint uVar2;
uint *puVar3;
uint *puVar4;
puVar4 = *(uint **)param_1;
puVar1 = *(uint **)(param_1 + 8);
puVar3 = puVar4;
if (puVar1 == puVar4) {
return 0;
}
do {
uVar2 = *puVar3;
if ((uVar2 & 1) == 0) goto LAB_001014d9;
puVar3 = puVar3 + 1;
} while (puVar1 != puVar3);
uVar2 = 0xffffffff;
LAB_001014d9:
do {
if ((*puVar4 & 1) != 0) {
return uVar2 - *puVar4;
}
puVar4 = puVar4 + 1;
} while (puVar1 != puVar4);
return uVar2 + 1;
} |
2,376 | func0 |
#include <string>
#include <assert.h>
| int func0(std::string str1, std::string str2) {
int count = 0;
for (int i = 0; i < str1.length(); i++) {
if (str1[i] != str2[i])
count++;
}
if (count % 2 == 0)
return count / 2;
else
return -1; // Using -1 to indicate "Not Possible"
}
| int main() {
assert(func0("1101", "1110") == 1);
assert(func0("111", "000") == -1);
assert(func0("111", "110") == -1);
return 0;
}
| O0 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x28,%rsp
mov %rdi,-0x28(%rbp)
mov %rsi,-0x30(%rbp)
movl $0x0,-0x18(%rbp)
movl $0x0,-0x14(%rbp)
mov -0x14(%rbp),%eax
movslq %eax,%rbx
mov -0x28(%rbp),%rax
mov %rax,%rdi
callq 1290 <_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv@plt>
cmp %rax,%rbx
setb %al
test %al,%al
je 146b <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_+0x82>
mov -0x14(%rbp),%eax
movslq %eax,%rdx
mov -0x28(%rbp),%rax
mov %rdx,%rsi
mov %rax,%rdi
callq 12f0 <_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm@plt>
movzbl (%rax),%ebx
mov -0x14(%rbp),%eax
movslq %eax,%rdx
mov -0x30(%rbp),%rax
mov %rdx,%rsi
mov %rax,%rdi
callq 12f0 <_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm@plt>
movzbl (%rax),%eax
cmp %al,%bl
setne %al
test %al,%al
je 1465 <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_+0x7c>
addl $0x1,-0x18(%rbp)
addl $0x1,-0x14(%rbp)
jmp 140c <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_+0x23>
mov -0x18(%rbp),%eax
and $0x1,%eax
test %eax,%eax
jne 1483 <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_+0x9a>
mov -0x18(%rbp),%eax
mov %eax,%edx
shr $0x1f,%edx
add %edx,%eax
sar %eax
jmp 1488 <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_+0x9f>
mov $0xffffffff,%eax
add $0x28,%rsp
pop %rbx
pop %rbp
retq
| _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 28h
mov [rbp+var_28], rdi
mov [rbp+var_30], rsi
mov [rbp+var_18], 0
mov [rbp+var_14], 0
jmp short loc_13AF
loc_136E:
mov eax, [rbp+var_14]
movsxd rdx, eax
mov rax, [rbp+var_28]
mov rsi, rdx
mov rdi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
movzx ebx, byte ptr [rax]
mov eax, [rbp+var_14]
movsxd rdx, eax
mov rax, [rbp+var_30]
mov rsi, rdx
mov rdi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
movzx eax, byte ptr [rax]
cmp bl, al
setnz al
test al, al
jz short loc_13AB
add [rbp+var_18], 1
loc_13AB:
add [rbp+var_14], 1
loc_13AF:
mov eax, [rbp+var_14]
movsxd rbx, eax
mov rax, [rbp+var_28]
mov rdi, rax
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv; std::string::length(void)
cmp rbx, rax
setb al
test al, al
jnz short loc_136E
mov eax, [rbp+var_18]
and eax, 1
test eax, eax
jnz short loc_13E3
mov eax, [rbp+var_18]
mov edx, eax
shr edx, 1Fh
add eax, edx
sar eax, 1
jmp short loc_13E8
loc_13E3:
mov eax, 0FFFFFFFFh
loc_13E8:
mov rbx, [rbp+var_8]
leave
retn | long long func0(long long a1, long long a2)
{
char v2; // bl
int v4; // [rsp+18h] [rbp-18h]
int i; // [rsp+1Ch] [rbp-14h]
v4 = 0;
for ( i = 0; i < (unsigned long long)std::string::length(a1); ++i )
{
v2 = *(_BYTE *)std::string::operator[](a1, i);
if ( v2 != *(_BYTE *)std::string::operator[](a2, i) )
++v4;
}
if ( (v4 & 1) != 0 )
return 0xFFFFFFFFLL;
else
return (unsigned int)(v4 / 2);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x28
MOV qword ptr [RBP + -0x28],RDI
MOV qword ptr [RBP + -0x30],RSI
MOV dword ptr [RBP + -0x18],0x0
MOV dword ptr [RBP + -0x14],0x0
JMP 0x001013af
LAB_0010136e:
MOV EAX,dword ptr [RBP + -0x14]
MOVSXD RDX,EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RSI,RDX
MOV RDI,RAX
CALL 0x00101250
MOVZX EBX,byte ptr [RAX]
MOV EAX,dword ptr [RBP + -0x14]
MOVSXD RDX,EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV RSI,RDX
MOV RDI,RAX
CALL 0x00101250
MOVZX EAX,byte ptr [RAX]
CMP BL,AL
SETNZ AL
TEST AL,AL
JZ 0x001013ab
ADD dword ptr [RBP + -0x18],0x1
LAB_001013ab:
ADD dword ptr [RBP + -0x14],0x1
LAB_001013af:
MOV EAX,dword ptr [RBP + -0x14]
MOVSXD RBX,EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RDI,RAX
CALL 0x00101210
CMP RBX,RAX
SETC AL
TEST AL,AL
JNZ 0x0010136e
MOV EAX,dword ptr [RBP + -0x18]
AND EAX,0x1
TEST EAX,EAX
JNZ 0x001013e3
MOV EAX,dword ptr [RBP + -0x18]
MOV EDX,EAX
SHR EDX,0x1f
ADD EAX,EDX
SAR EAX,0x1
JMP 0x001013e8
LAB_001013e3:
MOV EAX,0xffffffff
LAB_001013e8:
MOV RBX,qword ptr [RBP + -0x8]
LEAVE
RET | /* func0(std::string, std::string) */
int func0(ulong param_1,ulong param_2)
{
char cVar1;
int iVar2;
char *pcVar3;
ulong uVar4;
int4 local_20;
int4 local_1c;
local_20 = 0;
local_1c = 0;
while( true ) {
uVar4 = std::string::length();
if (uVar4 <= (ulong)(long)local_1c) break;
pcVar3 = (char *)std::string::operator[](param_1);
cVar1 = *pcVar3;
pcVar3 = (char *)std::string::operator[](param_2);
if (cVar1 != *pcVar3) {
local_20 = local_20 + 1;
}
local_1c = local_1c + 1;
}
if ((local_20 & 1) == 0) {
iVar2 = (int)local_20 / 2;
}
else {
iVar2 = -1;
}
return iVar2;
} |
2,377 | func0 |
#include <string>
#include <assert.h>
| int func0(std::string str1, std::string str2) {
int count = 0;
for (int i = 0; i < str1.length(); i++) {
if (str1[i] != str2[i])
count++;
}
if (count % 2 == 0)
return count / 2;
else
return -1; // Using -1 to indicate "Not Possible"
}
| int main() {
assert(func0("1101", "1110") == 1);
assert(func0("111", "000") == -1);
assert(func0("111", "110") == -1);
return 0;
}
| O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
mov 0x8(%rdi),%r8
test %r8,%r8
je 124d <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_+0x44>
mov (%rdi),%rdi
mov (%rsi),%rsi
mov $0x0,%eax
mov $0x0,%edx
movzbl (%rsi,%rax,1),%ecx
cmp %cl,(%rdi,%rax,1)
setne %cl
movzbl %cl,%ecx
add %ecx,%edx
add $0x1,%rax
cmp %r8,%rax
jne 1226 <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_+0x1d>
test $0x1,%dl
jne 1254 <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_+0x4b>
mov %edx,%eax
shr $0x1f,%eax
add %edx,%eax
sar %eax
retq
mov $0x0,%edx
jmp 1243 <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_+0x3a>
mov $0xffffffff,%eax
retq
| _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_:
endbr64
mov rcx, [rdi+8]
test rcx, rcx
jz short loc_1270
mov rdi, [rdi]
mov rsi, [rsi]
mov eax, 0
mov edx, 0
jmp short loc_1251
loc_1248:
add rax, 1
cmp rax, rcx
jz short loc_1261
loc_1251:
movzx r8d, byte ptr [rsi+rax]
cmp [rdi+rax], r8b
jz short loc_1248
add edx, 1
jmp short loc_1248
loc_1261:
test dl, 1
jnz short loc_1277
loc_1266:
mov eax, edx
shr eax, 1Fh
add eax, edx
sar eax, 1
retn
loc_1270:
mov edx, 0
jmp short loc_1266
loc_1277:
mov eax, 0FFFFFFFFh
retn | long long func0(long long *a1, long long *a2)
{
long long v2; // rcx
long long v3; // rdi
long long v4; // rsi
long long v5; // rax
int v6; // edx
v2 = a1[1];
if ( !v2 )
{
v6 = 0;
return (unsigned int)(v6 / 2);
}
v3 = *a1;
v4 = *a2;
v5 = 0LL;
v6 = 0;
do
{
if ( *(_BYTE *)(v3 + v5) != *(_BYTE *)(v4 + v5) )
++v6;
++v5;
}
while ( v5 != v2 );
if ( (v6 & 1) == 0 )
return (unsigned int)(v6 / 2);
return 0xFFFFFFFFLL;
} | func0:
ENDBR64
MOV RCX,qword ptr [RDI + 0x8]
TEST RCX,RCX
JZ 0x00101270
MOV RDI,qword ptr [RDI]
MOV RSI,qword ptr [RSI]
MOV EAX,0x0
MOV EDX,0x0
JMP 0x00101251
LAB_00101248:
ADD RAX,0x1
CMP RAX,RCX
JZ 0x00101261
LAB_00101251:
MOVZX R8D,byte ptr [RSI + RAX*0x1]
CMP byte ptr [RDI + RAX*0x1],R8B
JZ 0x00101248
ADD EDX,0x1
JMP 0x00101248
LAB_00101261:
TEST DL,0x1
JNZ 0x00101277
LAB_00101266:
MOV EAX,EDX
SHR EAX,0x1f
ADD EAX,EDX
SAR EAX,0x1
RET
LAB_00101270:
MOV EDX,0x0
JMP 0x00101266
LAB_00101277:
MOV EAX,0xffffffff
RET | /* func0(std::string, std::string) */
int func0(long *param_1,long *param_2)
{
long lVar1;
uint uVar2;
if (param_1[1] == 0) {
uVar2 = 0;
}
else {
lVar1 = 0;
uVar2 = 0;
do {
if (*(char *)(*param_1 + lVar1) != *(char *)(*param_2 + lVar1)) {
uVar2 = uVar2 + 1;
}
lVar1 = lVar1 + 1;
} while (lVar1 != param_1[1]);
if ((uVar2 & 1) != 0) {
return -1;
}
}
return (int)uVar2 / 2;
} |
2,378 | func0 |
#include <string>
#include <assert.h>
| int func0(std::string str1, std::string str2) {
int count = 0;
for (int i = 0; i < str1.length(); i++) {
if (str1[i] != str2[i])
count++;
}
if (count % 2 == 0)
return count / 2;
else
return -1; // Using -1 to indicate "Not Possible"
}
| int main() {
assert(func0("1101", "1110") == 1);
assert(func0("111", "000") == -1);
assert(func0("111", "110") == -1);
return 0;
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
mov 0x8(%rdi),%r8
test %r8,%r8
je 1520 <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_+0x50>
mov (%rdi),%rdi
mov (%rsi),%rsi
xor %eax,%eax
xor %edx,%edx
nopw 0x0(%rax,%rax,1)
movzbl (%rsi,%rax,1),%ecx
cmp %cl,(%rdi,%rax,1)
setne %cl
add $0x1,%rax
movzbl %cl,%ecx
add %ecx,%edx
cmp %r8,%rax
jne 14f0 <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_+0x20>
mov %edx,%eax
sar %eax
and $0x1,%edx
mov $0xffffffff,%edx
cmovne %edx,%eax
retq
nopl 0x0(%rax,%rax,1)
xor %eax,%eax
retq
nopw %cs:0x0(%rax,%rax,1)
nopl (%rax)
| _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_:
endbr64
mov rcx, [rdi+8]
test rcx, rcx
jz short loc_1460
mov rdi, [rdi]
mov rsi, [rsi]
xor eax, eax
xor edx, edx
nop word ptr [rax+rax+00000000h]
loc_1430:
movzx r8d, byte ptr [rsi+rax]
cmp [rdi+rax], r8b
jz short loc_143E
add edx, 1
loc_143E:
add rax, 1
cmp rcx, rax
jnz short loc_1430
test dl, 1
jnz short loc_1463
mov eax, edx
shr eax, 1Fh
add eax, edx
sar eax, 1
retn
loc_1460:
xor eax, eax
retn
loc_1463:
mov eax, 0FFFFFFFFh
retn | long long func0(long long *a1, long long *a2)
{
long long v2; // rcx
long long v3; // rdi
long long v4; // rsi
long long v5; // rax
int v6; // edx
v2 = a1[1];
if ( !v2 )
return 0LL;
v3 = *a1;
v4 = *a2;
v5 = 0LL;
v6 = 0;
do
{
if ( *(_BYTE *)(v3 + v5) != *(_BYTE *)(v4 + v5) )
++v6;
++v5;
}
while ( v2 != v5 );
if ( (v6 & 1) != 0 )
return 0xFFFFFFFFLL;
else
return (unsigned int)(v6 / 2);
} | func0:
ENDBR64
MOV RCX,qword ptr [RDI + 0x8]
TEST RCX,RCX
JZ 0x00101460
MOV RDI,qword ptr [RDI]
MOV RSI,qword ptr [RSI]
XOR EAX,EAX
XOR EDX,EDX
NOP word ptr [RAX + RAX*0x1]
LAB_00101430:
MOVZX R8D,byte ptr [RSI + RAX*0x1]
CMP byte ptr [RDI + RAX*0x1],R8B
JZ 0x0010143e
ADD EDX,0x1
LAB_0010143e:
ADD RAX,0x1
CMP RCX,RAX
JNZ 0x00101430
TEST DL,0x1
JNZ 0x00101463
MOV EAX,EDX
SHR EAX,0x1f
ADD EAX,EDX
SAR EAX,0x1
RET
LAB_00101460:
XOR EAX,EAX
RET
LAB_00101463:
MOV EAX,0xffffffff
RET | /* func0(std::string, std::string) */
int func0(long *param_1,long *param_2)
{
long lVar1;
uint uVar2;
if (param_1[1] == 0) {
return 0;
}
lVar1 = 0;
uVar2 = 0;
do {
if (*(char *)(*param_1 + lVar1) != *(char *)(*param_2 + lVar1)) {
uVar2 = uVar2 + 1;
}
lVar1 = lVar1 + 1;
} while (param_1[1] != lVar1);
if ((uVar2 & 1) == 0) {
return (int)uVar2 / 2;
}
return -1;
} |
2,379 | func0 |
#include <string>
#include <assert.h>
| int func0(std::string str1, std::string str2) {
int count = 0;
for (int i = 0; i < str1.length(); i++) {
if (str1[i] != str2[i])
count++;
}
if (count % 2 == 0)
return count / 2;
else
return -1; // Using -1 to indicate "Not Possible"
}
| int main() {
assert(func0("1101", "1110") == 1);
assert(func0("111", "000") == -1);
assert(func0("111", "110") == -1);
return 0;
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
mov 0x8(%rdi),%r8
test %r8,%r8
je 1f50 <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_+0x2d0>
lea -0x1(%r8),%rax
mov (%rdi),%rdi
mov (%rsi),%rcx
cmp $0xe,%rax
jbe 1f53 <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_+0x2d3>
mov %r8,%rdx
pxor %xmm1,%xmm1
pxor %xmm5,%xmm5
xor %eax,%eax
movdqa 0x436(%rip),%xmm6
and $0xfffffffffffffff0,%rdx
pxor %xmm4,%xmm4
nopw 0x0(%rax,%rax,1)
movdqu (%rcx,%rax,1),%xmm7
movdqu (%rdi,%rax,1),%xmm0
movdqa %xmm5,%xmm3
add $0x10,%rax
pcmpeqb %xmm7,%xmm0
pandn %xmm6,%xmm0
pcmpgtb %xmm0,%xmm3
movdqa %xmm0,%xmm2
punpcklbw %xmm3,%xmm2
punpckhbw %xmm3,%xmm0
movdqa %xmm4,%xmm3
pcmpgtw %xmm2,%xmm3
movdqa %xmm2,%xmm7
punpcklwd %xmm3,%xmm7
punpckhwd %xmm3,%xmm2
movdqa %xmm0,%xmm3
paddd %xmm7,%xmm1
paddd %xmm2,%xmm1
movdqa %xmm4,%xmm2
pcmpgtw %xmm0,%xmm2
punpcklwd %xmm2,%xmm3
punpckhwd %xmm2,%xmm0
paddd %xmm3,%xmm1
paddd %xmm0,%xmm1
cmp %rdx,%rax
jne 1cc8 <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_+0x48>
movdqa %xmm1,%xmm0
mov %r8,%rsi
psrldq $0x8,%xmm0
and $0xfffffffffffffff0,%rsi
paddd %xmm1,%xmm0
mov %esi,%eax
movdqa %xmm0,%xmm1
psrldq $0x4,%xmm1
paddd %xmm1,%xmm0
movd %xmm0,%edx
cmp %rsi,%r8
je 1f39 <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_+0x2b9>
movzbl (%rdi,%rsi,1),%r9d
cmp %r9b,(%rcx,%rsi,1)
setne %sil
movzbl %sil,%esi
add %esi,%edx
lea 0x1(%rax),%esi
movslq %esi,%rsi
cmp %r8,%rsi
jae 1f39 <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_+0x2b9>
movzbl (%rdi,%rsi,1),%r10d
cmp %r10b,(%rcx,%rsi,1)
setne %sil
movzbl %sil,%esi
add %esi,%edx
lea 0x2(%rax),%esi
movslq %esi,%rsi
cmp %rsi,%r8
jbe 1f39 <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_+0x2b9>
movzbl (%rcx,%rsi,1),%r11d
cmp %r11b,(%rdi,%rsi,1)
setne %sil
movzbl %sil,%esi
add %esi,%edx
lea 0x3(%rax),%esi
movslq %esi,%rsi
cmp %rsi,%r8
jbe 1f39 <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_+0x2b9>
movzbl (%rcx,%rsi,1),%r11d
cmp %r11b,(%rdi,%rsi,1)
setne %sil
movzbl %sil,%esi
add %esi,%edx
lea 0x4(%rax),%esi
movslq %esi,%rsi
cmp %rsi,%r8
jbe 1f39 <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_+0x2b9>
movzbl (%rcx,%rsi,1),%r10d
cmp %r10b,(%rdi,%rsi,1)
setne %sil
movzbl %sil,%esi
add %esi,%edx
lea 0x5(%rax),%esi
movslq %esi,%rsi
cmp %rsi,%r8
jbe 1f39 <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_+0x2b9>
movzbl (%rcx,%rsi,1),%r9d
cmp %r9b,(%rdi,%rsi,1)
setne %sil
movzbl %sil,%esi
add %esi,%edx
lea 0x6(%rax),%esi
movslq %esi,%rsi
cmp %rsi,%r8
jbe 1f39 <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_+0x2b9>
movzbl (%rcx,%rsi,1),%r11d
cmp %r11b,(%rdi,%rsi,1)
setne %sil
movzbl %sil,%esi
add %esi,%edx
lea 0x7(%rax),%esi
movslq %esi,%rsi
cmp %rsi,%r8
jbe 1f39 <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_+0x2b9>
movzbl (%rcx,%rsi,1),%r10d
cmp %r10b,(%rdi,%rsi,1)
setne %sil
movzbl %sil,%esi
add %esi,%edx
lea 0x8(%rax),%esi
movslq %esi,%rsi
cmp %rsi,%r8
jbe 1f39 <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_+0x2b9>
movzbl (%rcx,%rsi,1),%r9d
cmp %r9b,(%rdi,%rsi,1)
setne %sil
movzbl %sil,%esi
add %esi,%edx
lea 0x9(%rax),%esi
movslq %esi,%rsi
cmp %rsi,%r8
jbe 1f39 <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_+0x2b9>
movzbl (%rcx,%rsi,1),%r9d
cmp %r9b,(%rdi,%rsi,1)
setne %sil
movzbl %sil,%esi
add %esi,%edx
lea 0xa(%rax),%esi
movslq %esi,%rsi
cmp %rsi,%r8
jbe 1f39 <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_+0x2b9>
movzbl (%rcx,%rsi,1),%r10d
cmp %r10b,(%rdi,%rsi,1)
setne %sil
movzbl %sil,%esi
add %esi,%edx
lea 0xb(%rax),%esi
movslq %esi,%rsi
cmp %rsi,%r8
jbe 1f39 <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_+0x2b9>
movzbl (%rcx,%rsi,1),%r11d
cmp %r11b,(%rdi,%rsi,1)
setne %sil
movzbl %sil,%esi
add %esi,%edx
lea 0xc(%rax),%esi
movslq %esi,%rsi
cmp %rsi,%r8
jbe 1f39 <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_+0x2b9>
movzbl (%rcx,%rsi,1),%r10d
cmp %r10b,(%rdi,%rsi,1)
setne %sil
movzbl %sil,%esi
add %esi,%edx
lea 0xd(%rax),%esi
movslq %esi,%rsi
cmp %rsi,%r8
jbe 1f39 <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_+0x2b9>
movzbl (%rcx,%rsi,1),%r11d
cmp %r11b,(%rdi,%rsi,1)
setne %sil
add $0xe,%eax
movzbl %sil,%esi
cltq
add %esi,%edx
cmp %rax,%r8
jbe 1f39 <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_+0x2b9>
movzbl (%rcx,%rax,1),%ecx
cmp %cl,(%rdi,%rax,1)
setne %al
movzbl %al,%eax
add %eax,%edx
mov %edx,%eax
sar %eax
and $0x1,%edx
mov $0xffffffff,%edx
cmovne %edx,%eax
retq
nopl 0x0(%rax)
xor %eax,%eax
retq
xor %eax,%eax
xor %edx,%edx
xor %esi,%esi
jmpq 1d5f <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_+0xdf>
xchg %ax,%ax
| _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_:
endbr64
mov r8, [rdi+8]
test r8, r8
jz loc_1DA8
lea rax, [r8-1]
mov rdi, [rdi]
mov rcx, [rsi]
cmp rax, 0Eh
jbe loc_1DAB
mov rdx, r8
pxor xmm1, xmm1
pxor xmm5, xmm5
xor eax, eax
and rdx, 0FFFFFFFFFFFFFFF0h
pxor xmm4, xmm4
nop word ptr [rax+rax+00h]
loc_1BB0:
movdqu xmm0, xmmword ptr [rdi+rax]
movdqu xmm7, xmmword ptr [rcx+rax]
movdqa xmm3, xmm5
add rax, 10h
pcmpeqb xmm0, xmm7
pcmpeqb xmm0, xmm5
pcmpgtb xmm3, xmm0
movdqa xmm2, xmm0
punpcklbw xmm2, xmm3
punpckhbw xmm0, xmm3
movdqa xmm3, xmm4
pcmpgtw xmm3, xmm2
movdqa xmm6, xmm2
punpcklwd xmm6, xmm3
punpckhwd xmm2, xmm3
movdqa xmm3, xmm0
psubd xmm1, xmm6
psubd xmm1, xmm2
movdqa xmm2, xmm4
pcmpgtw xmm2, xmm0
punpcklwd xmm3, xmm2
punpckhwd xmm0, xmm2
psubd xmm1, xmm3
psubd xmm1, xmm0
cmp rax, rdx
jnz short loc_1BB0
movdqa xmm0, xmm1
mov esi, edx
psrldq xmm0, 8
paddd xmm0, xmm1
movdqa xmm2, xmm0
psrldq xmm2, 4
paddd xmm0, xmm2
movd r10d, xmm0
movdqa xmm0, xmm1
psrldq xmm1, 8
paddd xmm1, xmm0
cmp r8, rdx
jz loc_1D92
loc_1C4E:
mov r9, r8
sub r9, rdx
lea rax, [r9-1]
cmp rax, 6
jbe loc_1CF6
movq xmm2, qword ptr [rcx+rdx]
movq xmm0, qword ptr [rdi+rdx]
pcmpeqb xmm0, xmm2
pxor xmm2, xmm2
pcmpeqb xmm0, xmm2
pcmpgtb xmm2, xmm0
movdqa xmm3, xmm0
punpcklbw xmm3, xmm2
punpcklbw xmm0, xmm2
pxor xmm2, xmm2
movdqa xmm4, xmm2
movdqa xmm5, xmm3
pshufd xmm0, xmm0, 4Eh ; 'N'
pcmpgtw xmm4, xmm3
pcmpgtw xmm2, xmm0
punpcklwd xmm5, xmm4
punpcklwd xmm3, xmm4
psubd xmm1, xmm5
pshufd xmm3, xmm3, 4Eh ; 'N'
psubd xmm1, xmm3
movdqa xmm3, xmm0
punpcklwd xmm0, xmm2
punpcklwd xmm3, xmm2
pshufd xmm0, xmm0, 4Eh ; 'N'
psubd xmm1, xmm3
psubd xmm1, xmm0
movd r10d, xmm1
pshufd xmm7, xmm1, 0E5h
movd eax, xmm7
add r10d, eax
mov rax, r9
and rax, 0FFFFFFFFFFFFFFF8h
add rdx, rax
add esi, eax
and r9d, 7
jz loc_1D92
loc_1CF6:
movzx eax, byte ptr [rdi+rdx]
cmp [rcx+rdx], al
jz short loc_1D03
add r10d, 1
loc_1D03:
lea eax, [rsi+1]
cdqe
cmp rax, r8
jnb loc_1D92
movzx edx, byte ptr [rcx+rax]
cmp [rdi+rax], dl
jz short loc_1D1E
add r10d, 1
loc_1D1E:
lea eax, [rsi+2]
cdqe
cmp rax, r8
jnb short loc_1D92
movzx edx, byte ptr [rdi+rax]
cmp [rcx+rax], dl
jz short loc_1D35
add r10d, 1
loc_1D35:
lea eax, [rsi+3]
cdqe
cmp rax, r8
jnb short loc_1D92
movzx edx, byte ptr [rcx+rax]
cmp [rdi+rax], dl
jz short loc_1D4C
add r10d, 1
loc_1D4C:
lea eax, [rsi+4]
cdqe
cmp rax, r8
jnb short loc_1D92
movzx edx, byte ptr [rcx+rax]
cmp [rdi+rax], dl
jz short loc_1D63
add r10d, 1
loc_1D63:
lea eax, [rsi+5]
cdqe
cmp rax, r8
jnb short loc_1D92
movzx edx, byte ptr [rcx+rax]
cmp [rdi+rax], dl
jz short loc_1D7A
add r10d, 1
loc_1D7A:
add esi, 6
movsxd rsi, esi
cmp rsi, r8
jnb short loc_1D92
movzx eax, byte ptr [rcx+rsi]
cmp [rdi+rsi], al
jz short loc_1D92
add r10d, 1
loc_1D92:
test r10b, 1
jnz short loc_1DBB
mov eax, r10d
shr eax, 1Fh
add eax, r10d
sar eax, 1
retn
loc_1DA8:
xor eax, eax
retn
loc_1DAB:
pxor xmm1, xmm1
xor esi, esi
xor r10d, r10d
xor edx, edx
jmp loc_1C4E
loc_1DBB:
mov eax, 0FFFFFFFFh
retn | long long func0(long long *a1, long long *a2)
{
unsigned long long v2; // r8
long long v3; // rdi
long long v4; // rcx
__m128i v5; // xmm1
long long v6; // rax
unsigned long long v7; // rdx
__m128i v8; // xmm0
__m128i v9; // xmm7
__m128i v10; // xmm0
__m128i v11; // xmm3
__m128i v12; // xmm2
__m128i v13; // xmm0
__m128i v14; // xmm3
__m128i v15; // xmm1
__m128i v16; // xmm2
int v17; // esi
__m128i v18; // xmm0
int v19; // r10d
__m128i v20; // xmm1
unsigned long long v21; // r9
__m128i v22; // xmm0
__m128i v23; // xmm3
__m128i v24; // xmm0
__m128i v25; // xmm2
__m128i v26; // xmm3
__m128i v27; // xmm1
unsigned long long v28; // rax
unsigned long long v29; // rax
unsigned long long v30; // rax
unsigned long long v31; // rax
unsigned long long v32; // rax
unsigned long long v33; // rsi
v2 = a1[1];
if ( !v2 )
return 0LL;
v3 = *a1;
v4 = *a2;
if ( v2 - 1 <= 0xE )
{
v20 = 0LL;
v17 = 0;
v19 = 0;
v7 = 0LL;
goto LABEL_6;
}
v5 = 0LL;
v6 = 0LL;
v7 = v2 & 0xFFFFFFFFFFFFFFF0LL;
do
{
v8 = _mm_loadu_si128((const __m128i *)(v3 + v6));
v9 = _mm_loadu_si128((const __m128i *)(v4 + v6));
v6 += 16LL;
v10 = _mm_cmpeq_epi8(_mm_cmpeq_epi8(v8, v9), (__m128i)0LL);
v11 = _mm_cmpgt_epi8((__m128i)0LL, v10);
v12 = _mm_unpacklo_epi8(v10, v11);
v13 = _mm_unpackhi_epi8(v10, v11);
v14 = _mm_cmpgt_epi16((__m128i)0LL, v12);
v15 = _mm_sub_epi32(_mm_sub_epi32(v5, _mm_unpacklo_epi16(v12, v14)), _mm_unpackhi_epi16(v12, v14));
v16 = _mm_cmpgt_epi16((__m128i)0LL, v13);
v5 = _mm_sub_epi32(_mm_sub_epi32(v15, _mm_unpacklo_epi16(v13, v16)), _mm_unpackhi_epi16(v13, v16));
}
while ( v6 != v7 );
v17 = v2 & 0xFFFFFFF0;
v18 = _mm_add_epi32(_mm_srli_si128(v5, 8), v5);
v19 = _mm_cvtsi128_si32(_mm_add_epi32(v18, _mm_srli_si128(v18, 4)));
v20 = v18;
if ( v2 != v7 )
{
LABEL_6:
v21 = v2 - v7;
if ( v2 - v7 - 1 <= 6 )
goto LABEL_8;
v22 = _mm_cmpeq_epi8(
_mm_cmpeq_epi8(_mm_loadl_epi64((const __m128i *)(v3 + v7)), _mm_loadl_epi64((const __m128i *)(v4 + v7))),
(__m128i)0LL);
v23 = _mm_unpacklo_epi8(v22, _mm_cmpgt_epi8((__m128i)0LL, v22));
v24 = _mm_shuffle_epi32(v23, 78);
v25 = _mm_cmpgt_epi16((__m128i)0LL, v24);
v26 = _mm_unpacklo_epi16(v23, _mm_cmpgt_epi16((__m128i)0LL, v23));
v27 = _mm_sub_epi32(
_mm_sub_epi32(
_mm_sub_epi32(_mm_sub_epi32(v20, v26), _mm_shuffle_epi32(v26, 78)),
_mm_unpacklo_epi16(v24, v25)),
_mm_shuffle_epi32(_mm_unpacklo_epi16(v24, v25), 78));
v19 = _mm_cvtsi128_si32(_mm_shuffle_epi32(v27, 229)) + _mm_cvtsi128_si32(v27);
v7 += v21 & 0xFFFFFFFFFFFFFFF8LL;
v17 += v21 & 0xFFFFFFF8;
if ( (v21 & 7) != 0 )
{
LABEL_8:
if ( *(_BYTE *)(v4 + v7) != *(_BYTE *)(v3 + v7) )
++v19;
v28 = v17 + 1;
if ( v28 < v2 )
{
if ( *(_BYTE *)(v3 + v28) != *(_BYTE *)(v4 + v28) )
++v19;
v29 = v17 + 2;
if ( v29 < v2 )
{
if ( *(_BYTE *)(v4 + v29) != *(_BYTE *)(v3 + v29) )
++v19;
v30 = v17 + 3;
if ( v30 < v2 )
{
if ( *(_BYTE *)(v3 + v30) != *(_BYTE *)(v4 + v30) )
++v19;
v31 = v17 + 4;
if ( v31 < v2 )
{
if ( *(_BYTE *)(v3 + v31) != *(_BYTE *)(v4 + v31) )
++v19;
v32 = v17 + 5;
if ( v32 < v2 )
{
if ( *(_BYTE *)(v3 + v32) != *(_BYTE *)(v4 + v32) )
++v19;
v33 = v17 + 6;
if ( v33 < v2 && *(_BYTE *)(v3 + v33) != *(_BYTE *)(v4 + v33) )
++v19;
}
}
}
}
}
}
}
if ( (v19 & 1) != 0 )
return 0xFFFFFFFFLL;
else
return (unsigned int)(v19 / 2);
} | func0:
ENDBR64
MOV R8,qword ptr [RDI + 0x8]
TEST R8,R8
JZ 0x00101da8
LEA RAX,[R8 + -0x1]
MOV RDI,qword ptr [RDI]
MOV RCX,qword ptr [RSI]
CMP RAX,0xe
JBE 0x00101dab
MOV RDX,R8
PXOR XMM1,XMM1
PXOR XMM5,XMM5
XOR EAX,EAX
AND RDX,-0x10
PXOR XMM4,XMM4
NOP word ptr [RAX + RAX*0x1]
LAB_00101bb0:
MOVDQU XMM0,xmmword ptr [RDI + RAX*0x1]
MOVDQU XMM7,xmmword ptr [RCX + RAX*0x1]
MOVDQA XMM3,XMM5
ADD RAX,0x10
PCMPEQB XMM0,XMM7
PCMPEQB XMM0,XMM5
PCMPGTB XMM3,XMM0
MOVDQA XMM2,XMM0
PUNPCKLBW XMM2,XMM3
PUNPCKHBW XMM0,XMM3
MOVDQA XMM3,XMM4
PCMPGTW XMM3,XMM2
MOVDQA XMM6,XMM2
PUNPCKLWD XMM6,XMM3
PUNPCKHWD XMM2,XMM3
MOVDQA XMM3,XMM0
PSUBD XMM1,XMM6
PSUBD XMM1,XMM2
MOVDQA XMM2,XMM4
PCMPGTW XMM2,XMM0
PUNPCKLWD XMM3,XMM2
PUNPCKHWD XMM0,XMM2
PSUBD XMM1,XMM3
PSUBD XMM1,XMM0
CMP RAX,RDX
JNZ 0x00101bb0
MOVDQA XMM0,XMM1
MOV ESI,EDX
PSRLDQ XMM0,0x8
PADDD XMM0,XMM1
MOVDQA XMM2,XMM0
PSRLDQ XMM2,0x4
PADDD XMM0,XMM2
MOVD R10D,XMM0
MOVDQA XMM0,XMM1
PSRLDQ XMM1,0x8
PADDD XMM1,XMM0
CMP R8,RDX
JZ 0x00101d92
LAB_00101c4e:
MOV R9,R8
SUB R9,RDX
LEA RAX,[R9 + -0x1]
CMP RAX,0x6
JBE 0x00101cf6
MOVQ XMM2,qword ptr [RCX + RDX*0x1]
MOVQ XMM0,qword ptr [RDI + RDX*0x1]
PCMPEQB XMM0,XMM2
PXOR XMM2,XMM2
PCMPEQB XMM0,XMM2
PCMPGTB XMM2,XMM0
MOVDQA XMM3,XMM0
PUNPCKLBW XMM3,XMM2
PUNPCKLBW XMM0,XMM2
PXOR XMM2,XMM2
MOVDQA XMM4,XMM2
MOVDQA XMM5,XMM3
PSHUFD XMM0,XMM0,0x4e
PCMPGTW XMM4,XMM3
PCMPGTW XMM2,XMM0
PUNPCKLWD XMM5,XMM4
PUNPCKLWD XMM3,XMM4
PSUBD XMM1,XMM5
PSHUFD XMM3,XMM3,0x4e
PSUBD XMM1,XMM3
MOVDQA XMM3,XMM0
PUNPCKLWD XMM0,XMM2
PUNPCKLWD XMM3,XMM2
PSHUFD XMM0,XMM0,0x4e
PSUBD XMM1,XMM3
PSUBD XMM1,XMM0
MOVD R10D,XMM1
PSHUFD XMM7,XMM1,0xe5
MOVD EAX,XMM7
ADD R10D,EAX
MOV RAX,R9
AND RAX,-0x8
ADD RDX,RAX
ADD ESI,EAX
AND R9D,0x7
JZ 0x00101d92
LAB_00101cf6:
MOVZX EAX,byte ptr [RDI + RDX*0x1]
CMP byte ptr [RCX + RDX*0x1],AL
JZ 0x00101d03
ADD R10D,0x1
LAB_00101d03:
LEA EAX,[RSI + 0x1]
CDQE
CMP RAX,R8
JNC 0x00101d92
MOVZX EDX,byte ptr [RCX + RAX*0x1]
CMP byte ptr [RDI + RAX*0x1],DL
JZ 0x00101d1e
ADD R10D,0x1
LAB_00101d1e:
LEA EAX,[RSI + 0x2]
CDQE
CMP RAX,R8
JNC 0x00101d92
MOVZX EDX,byte ptr [RDI + RAX*0x1]
CMP byte ptr [RCX + RAX*0x1],DL
JZ 0x00101d35
ADD R10D,0x1
LAB_00101d35:
LEA EAX,[RSI + 0x3]
CDQE
CMP RAX,R8
JNC 0x00101d92
MOVZX EDX,byte ptr [RCX + RAX*0x1]
CMP byte ptr [RDI + RAX*0x1],DL
JZ 0x00101d4c
ADD R10D,0x1
LAB_00101d4c:
LEA EAX,[RSI + 0x4]
CDQE
CMP RAX,R8
JNC 0x00101d92
MOVZX EDX,byte ptr [RCX + RAX*0x1]
CMP byte ptr [RDI + RAX*0x1],DL
JZ 0x00101d63
ADD R10D,0x1
LAB_00101d63:
LEA EAX,[RSI + 0x5]
CDQE
CMP RAX,R8
JNC 0x00101d92
MOVZX EDX,byte ptr [RCX + RAX*0x1]
CMP byte ptr [RDI + RAX*0x1],DL
JZ 0x00101d7a
ADD R10D,0x1
LAB_00101d7a:
ADD ESI,0x6
MOVSXD RSI,ESI
CMP RSI,R8
JNC 0x00101d92
MOVZX EAX,byte ptr [RCX + RSI*0x1]
CMP byte ptr [RDI + RSI*0x1],AL
JZ 0x00101d92
ADD R10D,0x1
LAB_00101d92:
TEST R10B,0x1
JNZ 0x00101dbb
MOV EAX,R10D
SHR EAX,0x1f
ADD EAX,R10D
SAR EAX,0x1
RET
LAB_00101da8:
XOR EAX,EAX
RET
LAB_00101dab:
PXOR XMM1,XMM1
XOR ESI,ESI
XOR R10D,R10D
XOR EDX,EDX
JMP 0x00101c4e
LAB_00101dbb:
MOV EAX,0xffffffff
RET | /* func0(std::string, std::string) */
int func0(long *param_1,long *param_2)
{
char *pcVar1;
char *pcVar2;
int8 uVar3;
ulong uVar4;
long lVar5;
long lVar6;
bool bVar7;
bool bVar8;
bool bVar9;
bool bVar10;
bool bVar11;
bool bVar12;
bool bVar13;
bool bVar14;
int auVar15 [14];
int auVar16 [12];
unkbyte10 Var17;
int auVar18 [12];
int auVar19 [14];
int auVar20 [12];
int auVar21 [16];
int auVar22 [16];
int auVar23 [16];
int auVar24 [12];
unkbyte9 Var25;
int6 uVar26;
int4 uVar27;
int2 uVar28;
ulong uVar29;
ulong uVar30;
uint uVar31;
short sVar32;
int4 uVar33;
int iVar34;
uint uVar35;
int auVar40 [12];
char cVar54;
short sVar55;
char cVar56;
char cVar57;
char cVar58;
byte bVar59;
int auVar44 [16];
int auVar51 [16];
int iVar61;
int iVar62;
int iVar63;
int iVar64;
int iVar65;
char cVar69;
char cVar70;
char cVar71;
char cVar72;
char cVar73;
char cVar74;
short sVar75;
short sVar76;
int auVar67 [16];
int auVar77 [16];
int auVar82 [16];
int auVar89 [16];
int auVar92 [16];
int auVar96 [16];
int auVar99 [16];
int6 uVar36;
int8 uVar37;
int auVar39 [12];
int auVar45 [16];
int auVar38 [12];
int auVar46 [16];
int auVar52 [16];
int auVar47 [16];
int auVar41 [14];
int auVar43 [16];
int auVar48 [16];
int auVar53 [16];
int auVar49 [16];
int auVar42 [16];
int auVar50 [16];
long lVar60;
int auVar66 [12];
int auVar68 [16];
int auVar78 [16];
int auVar79 [16];
int auVar93 [16];
int auVar83 [16];
int auVar80 [16];
int auVar84 [16];
int auVar90 [16];
int auVar94 [16];
int auVar85 [16];
int auVar81 [16];
int auVar86 [16];
int auVar91 [16];
int auVar95 [16];
int auVar87 [16];
int auVar88 [16];
int auVar97 [16];
int auVar98 [16];
int auVar100 [16];
int auVar101 [16];
uVar4 = param_1[1];
if (uVar4 == 0) {
return 0;
}
lVar5 = *param_1;
lVar6 = *param_2;
if (uVar4 - 1 < 0xf) {
iVar63 = 0;
iVar64 = 0;
uVar31 = 0;
uVar35 = 0;
uVar30 = 0;
}
else {
iVar61 = 0;
iVar62 = 0;
iVar63 = 0;
iVar64 = 0;
uVar29 = 0;
uVar30 = uVar4 & 0xfffffffffffffff0;
do {
pcVar1 = (char *)(lVar5 + uVar29);
pcVar2 = (char *)(lVar6 + uVar29);
uVar29 = uVar29 + 0x10;
bVar7 = *pcVar1 != *pcVar2;
bVar11 = pcVar1[8] != pcVar2[8];
bVar12 = pcVar1[9] != pcVar2[9];
bVar13 = pcVar1[10] != pcVar2[10];
bVar14 = pcVar1[0xb] != pcVar2[0xb];
cVar58 = -(pcVar1[7] != pcVar2[7]);
uVar28 = CONCAT11(-(pcVar1[7] != pcVar2[7]),cVar58);
uVar27 = CONCAT31(CONCAT21(uVar28,-(pcVar1[6] != pcVar2[6])),-(pcVar1[6] != pcVar2[6]));
uVar26 = CONCAT51(CONCAT41(uVar27,-(pcVar1[5] != pcVar2[5])),-(pcVar1[5] != pcVar2[5]));
Var25 = CONCAT72(CONCAT61(uVar26,-(pcVar1[4] != pcVar2[4])),
CONCAT11(-(pcVar1[4] != pcVar2[4]),cVar58));
lVar60 = (long)((unkuint9)Var25 >> 8);
Var17 = CONCAT91(CONCAT81(lVar60,-(pcVar1[3] != pcVar2[3])),-(pcVar1[3] != pcVar2[3]));
auVar16._2_10_ = Var17;
auVar16[1] = -(pcVar1[2] != pcVar2[2]);
auVar16[0] = -(pcVar1[2] != pcVar2[2]);
auVar15._2_12_ = auVar16;
auVar15[1] = -(pcVar1[1] != pcVar2[1]);
auVar15[0] = -(pcVar1[1] != pcVar2[1]);
auVar67._0_2_ = CONCAT11(-bVar7,-bVar7);
auVar67._2_14_ = auVar15;
uVar33 = CONCAT13(-bVar12,CONCAT12(-bVar12,CONCAT11(-bVar11,-bVar11)));
uVar36 = CONCAT15(-bVar13,CONCAT14(-bVar13,uVar33));
uVar37 = CONCAT17(-bVar14,CONCAT16(-bVar14,uVar36));
auVar38._0_10_ =
CONCAT19(-(pcVar1[0xc] != pcVar2[0xc]),CONCAT18(-(pcVar1[0xc] != pcVar2[0xc]),uVar37));
auVar38[10] = -(pcVar1[0xd] != pcVar2[0xd]);
auVar38[0xb] = -(pcVar1[0xd] != pcVar2[0xd]);
auVar41[0xc] = -(pcVar1[0xe] != pcVar2[0xe]);
auVar41._0_12_ = auVar38;
auVar41[0xd] = -(pcVar1[0xe] != pcVar2[0xe]);
auVar42[0xe] = -(pcVar1[0xf] != pcVar2[0xf]);
auVar42._0_14_ = auVar41;
auVar42[0xf] = -(pcVar1[0xf] != pcVar2[0xf]);
sVar32 = (short)Var17;
sVar55 = (short)((unkuint9)Var25 >> 8);
sVar75 = (short)uVar26;
sVar76 = (short)uVar27;
auVar101._0_12_ = auVar67._0_12_;
auVar101._12_2_ = sVar32;
auVar101._14_2_ = -(ushort)(sVar32 < 0);
auVar100._12_4_ = auVar101._12_4_;
auVar100._0_10_ = auVar67._0_10_;
auVar100._10_2_ = -(ushort)(auVar16._0_2_ < 0);
auVar99._10_6_ = auVar100._10_6_;
auVar99._0_8_ = auVar67._0_8_;
auVar99._8_2_ = auVar16._0_2_;
auVar18._4_8_ = auVar99._8_8_;
auVar18._2_2_ = -(ushort)(auVar15._0_2_ < 0);
auVar18._0_2_ = auVar15._0_2_;
iVar65 = CONCAT22(-(ushort)(sVar55 < 0),sVar55);
auVar66._0_8_ = CONCAT26(-(ushort)(sVar75 < 0),CONCAT24(sVar75,iVar65));
auVar66._8_2_ = sVar76;
auVar66._10_2_ = -(ushort)(sVar76 < 0);
auVar68._12_2_ = uVar28;
auVar68._0_12_ = auVar66;
auVar68._14_2_ = -(ushort)(lVar60 < 0);
sVar32 = (short)((unkuint10)auVar38._0_10_ >> 0x40);
auVar81._12_2_ = (short)((ulong)uVar37 >> 0x30);
auVar81._0_12_ = auVar38;
auVar81._14_2_ = -(ushort)bVar14;
auVar80._12_4_ = auVar81._12_4_;
auVar80._10_2_ = -(ushort)bVar13;
auVar80._0_10_ = auVar38._0_10_;
auVar79._10_6_ = auVar80._10_6_;
auVar79._8_2_ = (short)((uint6)uVar36 >> 0x20);
auVar79._0_8_ = uVar37;
auVar78._8_8_ = auVar79._8_8_;
auVar78._6_2_ = -(ushort)bVar12;
auVar78._0_6_ = uVar36;
auVar77._6_10_ = auVar78._6_10_;
auVar77._4_2_ = (short)((uint)uVar33 >> 0x10);
auVar77._0_4_ = uVar33;
iVar34 = CONCAT22(-(ushort)(sVar32 < 0),sVar32);
auVar39._0_8_ = CONCAT26(-(ushort)(auVar38._10_2_ < 0),CONCAT24(auVar38._10_2_,iVar34));
auVar39._8_2_ = auVar41._12_2_;
auVar39._10_2_ = -(ushort)(auVar41._12_2_ < 0);
auVar43._12_2_ = auVar42._14_2_;
auVar43._0_12_ = auVar39;
auVar43._14_2_ = -(ushort)(auVar42._14_2_ < 0);
iVar61 = (((iVar61 - CONCAT22(-(ushort)bVar7,auVar67._0_2_)) - iVar65) -
CONCAT22(-(ushort)bVar11,CONCAT11(-bVar11,-bVar11))) - iVar34;
iVar62 = (((iVar62 - auVar18._0_4_) - (int)((ulong)auVar66._0_8_ >> 0x20)) - auVar77._4_4_) -
(int)((ulong)auVar39._0_8_ >> 0x20);
iVar63 = (((iVar63 - auVar99._8_4_) - auVar66._8_4_) - auVar79._8_4_) - auVar39._8_4_;
iVar64 = (((iVar64 - auVar100._12_4_) - auVar68._12_4_) - auVar80._12_4_) - auVar43._12_4_;
} while (uVar29 != uVar30);
uVar31 = (uint)uVar4 & 0xfffffff0;
uVar35 = iVar63 + iVar61 + iVar64 + iVar62;
iVar63 = iVar63 + iVar61;
iVar64 = iVar64 + iVar62;
if (uVar4 == uVar30) goto LAB_00101d92;
}
uVar29 = uVar4 - uVar30;
if (6 < uVar29 - 1) {
uVar37 = *(int8 *)(lVar6 + uVar30);
uVar3 = *(int8 *)(lVar5 + uVar30);
bVar7 = (char)uVar3 != (char)uVar37;
bVar11 = (char)((ulong)uVar3 >> 8) != (char)((ulong)uVar37 >> 8);
bVar12 = (char)((ulong)uVar3 >> 0x10) != (char)((ulong)uVar37 >> 0x10);
bVar13 = (char)((ulong)uVar3 >> 0x18) != (char)((ulong)uVar37 >> 0x18);
bVar14 = (char)((ulong)uVar3 >> 0x20) != (char)((ulong)uVar37 >> 0x20);
bVar8 = (char)((ulong)uVar3 >> 0x28) != (char)((ulong)uVar37 >> 0x28);
bVar9 = (char)((ulong)uVar3 >> 0x30) != (char)((ulong)uVar37 >> 0x30);
bVar10 = (char)((ulong)uVar3 >> 0x38) != (char)((ulong)uVar37 >> 0x38);
auVar44[0] = -bVar7;
cVar58 = -bVar11;
cVar54 = -bVar14;
cVar56 = -bVar8;
cVar57 = -bVar9;
bVar59 = -bVar10;
auVar45._0_9_ = (unkuint9)bVar59 << 0x38;
auVar46._0_10_ = (unkuint10)bVar59 << 0x38;
auVar47._0_11_ = ZEXT111(bVar59) << 0x38;
auVar48._0_12_ = ZEXT112(bVar59) << 0x38;
auVar49._0_13_ = ZEXT113(bVar59) << 0x38;
auVar50._0_14_ = ZEXT114(bVar59) << 0x38;
cVar69 = -bVar11;
cVar70 = -bVar13;
cVar71 = -bVar14;
cVar72 = -bVar8;
cVar73 = -bVar9;
cVar74 = -bVar10;
auVar88[0xe] = bVar59;
auVar88._0_14_ = auVar50._0_14_;
auVar88[0xf] = cVar74;
auVar87._14_2_ = auVar88._14_2_;
auVar87[0xd] = cVar73;
auVar87._0_13_ = auVar49._0_13_;
auVar86._13_3_ = auVar87._13_3_;
auVar86[0xc] = cVar57;
auVar86._0_12_ = auVar48._0_12_;
auVar85._12_4_ = auVar86._12_4_;
auVar85[0xb] = cVar72;
auVar85._0_11_ = auVar47._0_11_;
auVar84._11_5_ = auVar85._11_5_;
auVar84[10] = cVar56;
auVar84._0_10_ = auVar46._0_10_;
auVar83._10_6_ = auVar84._10_6_;
auVar83[9] = cVar71;
auVar83._0_9_ = auVar45._0_9_;
Var17 = CONCAT91(CONCAT81((long)(CONCAT72(auVar83._9_7_,CONCAT11(cVar54,bVar59)) >> 8),cVar70),
-bVar13);
auVar20._2_10_ = Var17;
auVar20[1] = -bVar12;
auVar20[0] = -bVar12;
auVar19._2_12_ = auVar20;
auVar19[1] = cVar69;
auVar19[0] = cVar58;
auVar82._0_2_ = CONCAT11(-bVar7,auVar44[0]);
auVar82._2_14_ = auVar19;
auVar50[0xe] = bVar59;
auVar50[0xf] = cVar74;
auVar49._14_2_ = auVar50._14_2_;
auVar49[0xd] = cVar73;
auVar48._13_3_ = auVar49._13_3_;
auVar48[0xc] = cVar57;
auVar47._12_4_ = auVar48._12_4_;
auVar47[0xb] = cVar72;
auVar46._11_5_ = auVar47._11_5_;
auVar46[10] = cVar56;
auVar45._10_6_ = auVar46._10_6_;
auVar45[9] = cVar71;
Var25 = CONCAT72(auVar45._9_7_,CONCAT11(cVar54,bVar59));
lVar60 = (long)((unkuint9)Var25 >> 8);
auVar23._1_8_ = lVar60;
auVar23[0] = cVar70;
auVar23._9_7_ = 0;
auVar22._10_6_ = 0;
auVar22._0_10_ = SUB1610(auVar23 << 0x38,6);
auVar21._11_5_ = 0;
auVar21._0_11_ = SUB1611(auVar22 << 0x30,5);
auVar44._4_12_ = SUB1612(auVar21 << 0x28,4);
auVar44[3] = cVar69;
auVar44[2] = cVar58;
auVar44[1] = -bVar7;
iVar61 = (int)((unkuint9)Var25 >> 8);
auVar40._8_4_ = auVar44._0_4_;
auVar40._0_8_ = lVar60;
sVar75 = auVar20._0_2_;
sVar76 = (short)Var17;
sVar32 = (short)((unkuint9)Var25 >> 8);
sVar55 = auVar48._12_2_;
auVar98._0_12_ = auVar82._0_12_;
auVar98._12_2_ = sVar76;
auVar98._14_2_ = -(ushort)(sVar76 < 0);
auVar97._12_4_ = auVar98._12_4_;
auVar97._0_10_ = auVar82._0_10_;
auVar97._10_2_ = -(ushort)(sVar75 < 0);
auVar96._10_6_ = auVar97._10_6_;
auVar96._0_8_ = auVar82._0_8_;
auVar96._8_2_ = sVar75;
auVar24._4_8_ = auVar96._8_8_;
auVar24._2_2_ = -(ushort)(auVar19._0_2_ < 0);
auVar24._0_2_ = auVar19._0_2_;
auVar91._12_2_ = sVar76;
auVar91._0_12_ = auVar98._0_12_;
auVar91._14_2_ = -(ushort)(sVar76 < 0);
auVar90._12_4_ = auVar91._12_4_;
auVar90._10_2_ = -(ushort)(sVar75 < 0);
auVar90._0_10_ = auVar97._0_10_;
auVar89._10_6_ = auVar90._10_6_;
auVar89._8_2_ = sVar75;
auVar89._0_8_ = auVar96._0_8_;
auVar53._12_2_ = auVar49._14_2_;
auVar53._0_12_ = auVar40;
auVar53._14_2_ = -(ushort)(lVar60 < 0);
auVar52._12_4_ = auVar53._12_4_;
auVar52._0_10_ = auVar40._0_10_;
auVar52._10_2_ = -(ushort)(sVar55 < 0);
auVar51._10_6_ = auVar52._10_6_;
auVar51._8_2_ = sVar55;
auVar51._0_8_ = lVar60;
auVar95._12_2_ = auVar49._14_2_;
auVar95._0_12_ = auVar40;
auVar95._14_2_ = -(ushort)(lVar60 < 0);
auVar94._12_4_ = auVar95._12_4_;
auVar94._10_2_ = -(ushort)(sVar55 < 0);
auVar94._0_10_ = auVar52._0_10_;
auVar93._10_6_ = auVar94._10_6_;
auVar93._8_2_ = sVar55;
auVar93._0_8_ = lVar60;
auVar92._8_8_ = auVar93._8_8_;
auVar92._6_2_ = -(ushort)(iVar61 < 0);
auVar92._4_2_ = auVar46._10_2_;
auVar92._0_4_ = iVar61;
uVar35 = ((((iVar63 - CONCAT22(-(ushort)bVar7,auVar82._0_2_)) - auVar89._8_4_) -
CONCAT22(-(ushort)(sVar32 < 0),sVar32)) - auVar51._8_4_) +
((((iVar64 - auVar24._0_4_) - auVar90._12_4_) - auVar92._4_4_) - auVar52._12_4_);
uVar30 = uVar30 + (uVar29 & 0xfffffffffffffff8);
uVar31 = uVar31 + (int)(uVar29 & 0xfffffffffffffff8);
if ((uVar29 & 7) == 0) goto LAB_00101d92;
}
if (*(char *)(lVar6 + uVar30) != *(char *)(lVar5 + uVar30)) {
uVar35 = uVar35 + 1;
}
uVar30 = (ulong)(int)(uVar31 + 1);
if (uVar30 < uVar4) {
if (*(char *)(lVar5 + uVar30) != *(char *)(lVar6 + uVar30)) {
uVar35 = uVar35 + 1;
}
uVar30 = (ulong)(int)(uVar31 + 2);
if (uVar30 < uVar4) {
if (*(char *)(lVar6 + uVar30) != *(char *)(lVar5 + uVar30)) {
uVar35 = uVar35 + 1;
}
uVar30 = (ulong)(int)(uVar31 + 3);
if (uVar30 < uVar4) {
if (*(char *)(lVar5 + uVar30) != *(char *)(lVar6 + uVar30)) {
uVar35 = uVar35 + 1;
}
uVar30 = (ulong)(int)(uVar31 + 4);
if (uVar30 < uVar4) {
if (*(char *)(lVar5 + uVar30) != *(char *)(lVar6 + uVar30)) {
uVar35 = uVar35 + 1;
}
uVar30 = (ulong)(int)(uVar31 + 5);
if (uVar30 < uVar4) {
if (*(char *)(lVar5 + uVar30) != *(char *)(lVar6 + uVar30)) {
uVar35 = uVar35 + 1;
}
uVar30 = (ulong)(int)(uVar31 + 6);
if ((uVar30 < uVar4) && (*(char *)(lVar5 + uVar30) != *(char *)(lVar6 + uVar30))) {
uVar35 = uVar35 + 1;
}
}
}
}
}
}
LAB_00101d92:
if ((uVar35 & 1) == 0) {
return (int)uVar35 / 2;
}
return -1;
} |
2,380 | func0 |
#include <tuple>
#include <cassert>
template <typename T>
| size_t func0(const T& t) {
return sizeof(t);
}
| int main() {
assert(func0(std::make_tuple("A", 1, "B", 2, "C", 3)) == sizeof(std::make_tuple("A", 1, "B", 2, "C", 3)));
assert(func0(std::make_tuple(1, "Raju", 2, "Nikhil", 3, "Deepanshu")) == sizeof(std::make_tuple(1, "Raju", 2, "Nikhil", 3, "Deepanshu")));
assert(func0(std::make_tuple(std::make_tuple(1, "Lion"), std::make_tuple(2, "Tiger"), std::make_tuple(3, "Fox"), std::make_tuple(4, "Wolf"))) == sizeof(std::make_tuple(std::make_tuple(1, "Lion"), std::make_tuple(2, "Tiger"), std::make_tuple(3, "Fox"), std::make_tuple(4, "Wolf"))));
}
| O0 | cpp | unsigned long func0<std::tuple<char const*, int, char const*, int, char const*, int> >(std::tuple<char const*, int, char const*, int, char const*, int> const&):
endbr64
push %rbp
mov %rsp,%rbp
mov %rdi,-0x8(%rbp)
mov $0x30,%eax
pop %rbp
retq
| ||||
2,381 | func0 |
#include <tuple>
#include <cassert>
template <typename T>
| size_t func0(const T& t) {
return sizeof(t);
}
| int main() {
assert(func0(std::make_tuple("A", 1, "B", 2, "C", 3)) == sizeof(std::make_tuple("A", 1, "B", 2, "C", 3)));
assert(func0(std::make_tuple(1, "Raju", 2, "Nikhil", 3, "Deepanshu")) == sizeof(std::make_tuple(1, "Raju", 2, "Nikhil", 3, "Deepanshu")));
assert(func0(std::make_tuple(std::make_tuple(1, "Lion"), std::make_tuple(2, "Tiger"), std::make_tuple(3, "Fox"), std::make_tuple(4, "Wolf"))) == sizeof(std::make_tuple(std::make_tuple(1, "Lion"), std::make_tuple(2, "Tiger"), std::make_tuple(3, "Fox"), std::make_tuple(4, "Wolf"))));
}
| O1 | cpp |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.