index int64 0 66.5k | func_name stringlengths 2 5.36k | func_dep stringlengths 16 2.19k | func stringlengths 8 55.3k | test stringlengths 0 7.07k | opt stringclasses 4
values | language stringclasses 2
values | asm stringlengths 0 45.4k | ida_asm stringlengths 0 44.7k | ida_pseudo stringlengths 0 44.3k | ghidra_asm stringlengths 0 49.1k | ghidra_pseudo stringlengths 0 64.7k |
|---|---|---|---|---|---|---|---|---|---|---|---|
1,982 | func0 |
#include <vector>
#include <queue>
#include <cassert>
#include <functional>
| std::vector<int> func0(const std::vector<int>& nums, int n) {
std::priority_queue<int, std::vector<int>, std::greater<int>> pq(nums.begin(), nums.end());
std::vector<int> smallest_nums;
for (int i = 0; i < n; i++) {
smallest_nums.push_back(pq.top());
pq.pop();
}
return smalles... | int main() {
assert((func0( {25, 35, 22, 85, 14, 65, 75, 25, 58}, 3) == std::vector<int>{14, 22, 25}));
assert((func0( {25, 35, 22, 85, 14, 65, 75, 25, 58}, 2) == std::vector<int>{14, 22}));
assert((func0( {25, 35, 22, 85, 14, 65, 75, 22, 58}, 5) == std::vector<int>{14, 22, 22, 25, 35}));
retu... | O2 | cpp | func0(std::vector<int, std::allocator<int> > const&, int):
endbr64
push %r15
push %r14
mov %edx,%r14d
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x48,%rsp
mov 0x8(%rsi),%rcx
mov (%rsi),%rdx
xor %esi,%esi
mov %fs:0x28,%rax
mov %rax,0x38(%rsp)
xor %eax,%eax
lea 0x... | _Z5func0RKSt6vectorIiSaIiEEi:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 48h
mov r14, [rsi+8]
mov r12, [rsi]
mov rax, fs:28h
mov [rsp+78h+var_40], rax
xor eax, eax
movaps [rsp+78h+var_68], xmm0
mov rax, 7FFFFFFFFFFFFFFCh
mov ... | long long func0(long long a1, long long a2, int a3)
{
_DWORD *v3; // r12
signed long long v4; // r14
_DWORD *v6; // rax
_DWORD *v7; // rbx
long long i; // r12
long long v9; // rsi
long long v10; // rax
int v11; // r12d
long long v12; // rax
long long v13; // rcx
char *v15; // [rsp+0h] [rbp-70h]
... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x48
MOV R14,qword ptr [RSI + 0x8]
MOV R12,qword ptr [RSI]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
MOVAPS xmmword ptr [RSP + 0x10],XMM0
MOV RAX,0x7ffffffffffffffc
MOV qword ptr [RSP + 0x20],0x0
SUB... | /* func0(std::vector<int, std::allocator<int> > const&, int) */
vector * func0(vector *param_1,int param_2)
{
int iVar1;
int *__dest;
int *piVar2;
vector *pvVar3;
int in_CL;
int extraout_DL;
int in_EDX;
int4 in_register_00000034;
int8 *puVar4;
int *piVar5;
char *pcVar6;
_Iter_comp_iter in_R8D;... |
1,983 | func0 |
#include <vector>
#include <queue>
#include <cassert>
#include <functional>
| std::vector<int> func0(const std::vector<int>& nums, int n) {
std::priority_queue<int, std::vector<int>, std::greater<int>> pq(nums.begin(), nums.end());
std::vector<int> smallest_nums;
for (int i = 0; i < n; i++) {
smallest_nums.push_back(pq.top());
pq.pop();
}
return smalles... | int main() {
assert((func0( {25, 35, 22, 85, 14, 65, 75, 25, 58}, 3) == std::vector<int>{14, 22, 25}));
assert((func0( {25, 35, 22, 85, 14, 65, 75, 25, 58}, 2) == std::vector<int>{14, 22}));
assert((func0( {25, 35, 22, 85, 14, 65, 75, 22, 58}, 5) == std::vector<int>{14, 22, 22, 25, 35}));
retu... | O3 | cpp | func0(std::vector<int, std::allocator<int> > const&, int):
endbr64
push %r15
pxor %xmm0,%xmm0
push %r14
mov %edx,%r14d
push %r13
mov %rdi,%r13
push %r12
push %rbp
push %rbx
sub $0x48,%rsp
mov 0x8(%rsi),%rcx
mov (%rsi),%rdx
xor %esi,%esi
mov %fs:0x28,%rax
mov %rax,0x38(%rsp)
xor ... | _Z5func0RKSt6vectorIiSaIiEEi:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 48h
mov r14, [rsi+8]
mov r12, [rsi]
mov rax, fs:28h
mov [rsp+78h+var_40], rax
xor eax, eax
movaps [rsp+78h+var_68], xmm0
mov rax, 7FFFFFFFFFFFFFFCh
mov ... | long long func0(long long a1, long long a2, int a3)
{
_DWORD *v3; // r12
signed long long v4; // r14
_DWORD *v6; // rax
_DWORD *v7; // rbx
long long i; // r12
long long v9; // rax
long long v10; // rsi
int v11; // r12d
long long v12; // rsi
long long v13; // rcx
char *v15; // [rsp+0h] [rbp-70h]
... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x48
MOV R14,qword ptr [RSI + 0x8]
MOV R12,qword ptr [RSI]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
MOVAPS xmmword ptr [RSP + 0x10],XMM0
MOV RAX,0x7ffffffffffffffc
MOV qword ptr [RSP + 0x20],0x0
SUB... | /* func0(std::vector<int, std::allocator<int> > const&, int) */
vector * func0(vector *param_1,int param_2)
{
int iVar1;
long lVar2;
int *__dest;
int *piVar3;
int in_EDX;
int4 in_register_00000034;
int *piVar4;
_Iter_comp_iter in_R8D;
int iVar5;
long lVar6;
ulong __n;
long in_FS_OFFSET;
long... |
1,984 | func0 |
#include <cmath>
#include <cassert>
| double func0(double r, double h) {
double l = sqrt(r * r + h * h);
double SA = M_PI * r * (r + l);
return SA;
}
| int main() {
assert(func0(5,12) == 282.7433388230814);
assert(func0(10,15) == 880.5179353159282);
assert(func0(19,17) == 2655.923961165254);
return 0;
}
| O0 | cpp | func0(double, double):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x20,%rsp
movsd %xmm0,-0x18(%rbp)
movsd %xmm1,-0x20(%rbp)
movsd -0x18(%rbp),%xmm0
movapd %xmm0,%xmm1
mulsd %xmm0,%xmm1
movsd -0x20(%rbp),%xmm0
mulsd %xmm0,%xmm0
addsd %xmm1,%xmm0
callq 1070 <sqrt@plt>
movq %xmm0,%rax
mov %rax,-0x10(%rbp)
m... | _Z5func0dd:
endbr64
push rbp
mov rbp, rsp
sub rsp, 20h
movsd [rbp+var_18], xmm0
movsd [rbp+var_20], xmm1
movsd xmm0, [rbp+var_18]
movapd xmm1, xmm0
mulsd xmm1, xmm0
movsd xmm0, [rbp+var_20]
mulsd xmm0, xmm0
addsd xmm1, xmm0
movq rax, xmm1
movq xmm0, rax; x
call _sqrt
movq rax, xmm0... | double func0(double a1, double a2)
{
return (a1 + sqrt(a1 * a1 + a2 * a2)) * (a1 * 3.141592653589793);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOVSD qword ptr [RBP + -0x18],XMM0
MOVSD qword ptr [RBP + -0x20],XMM1
MOVSD XMM0,qword ptr [RBP + -0x18]
MOVAPD XMM1,XMM0
MULSD XMM1,XMM0
MOVSD XMM0,qword ptr [RBP + -0x20]
MULSD XMM0,XMM0
ADDSD XMM1,XMM0
MOVQ RAX,XMM1
MOVQ XMM0,RAX
CALL 0x00101070
MOVQ RAX,XMM0
MOV qwor... | /* func0(double, double) */
double func0(double param_1,double param_2)
{
double dVar1;
dVar1 = sqrt(param_1 * param_1 + param_2 * param_2);
return (param_1 + dVar1) * param_1 * DAT_001020b8;
} |
1,985 | func0 |
#include <cmath>
#include <cassert>
| double func0(double r, double h) {
double l = sqrt(r * r + h * h);
double SA = M_PI * r * (r + l);
return SA;
}
| int main() {
assert(func0(5,12) == 282.7433388230814);
assert(func0(10,15) == 880.5179353159282);
assert(func0(19,17) == 2655.923961165254);
return 0;
}
| O1 | cpp | func0(double, double):
endbr64
sub $0x18,%rsp
movsd %xmm0,0x8(%rsp)
mulsd %xmm0,%xmm0
mulsd %xmm1,%xmm1
addsd %xmm1,%xmm0
movapd %xmm0,%xmm3
sqrtsd %xmm3,%xmm3
movsd %xmm3,(%rsp)
pxor %xmm1,%xmm1
ucomisd %xmm0,%xmm1
ja 11ba <_Z5func0dd+0x51>
movsd 0x8(%rsp),%xmm0
movapd %xmm0,%xmm1
mulsd 0xf24(%rip),%xm... | _Z5func0dd:
endbr64
movapd xmm2, xmm0
mulsd xmm0, xmm0
mulsd xmm1, xmm1
addsd xmm0, xmm1
sqrtsd xmm0, xmm0
movapd xmm1, xmm2
mulsd xmm1, cs:qword_20A8
addsd xmm2, xmm0
mulsd xmm1, xmm2
movapd xmm0, xmm1
retn | __int128 __usercall func0@<xmm0>(__m128 a1@<xmm0>, double a2@<xmm1>)
{
__int128 v2; // xmm1
*((_QWORD *)&v2 + 1) = a1.m128_u64[1];
*(double *)&v2 = *(double *)a1.m128_u64
* 3.141592653589793
* (*(double *)a1.m128_u64 + sqrt(*(double *)a1.m128_u64 * *(double *)a1.m128_u64 + a2 * ... | func0:
ENDBR64
MOVAPD XMM2,XMM0
MULSD XMM0,XMM0
MULSD XMM1,XMM1
ADDSD XMM0,XMM1
SQRTSD XMM0,XMM0
MOVAPD XMM1,XMM2
MULSD XMM1,qword ptr [0x001020a8]
ADDSD XMM2,XMM0
MULSD XMM1,XMM2
MOVAPD XMM0,XMM1
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 * _DAT_001020a8 * (param_1 + SQRT(param_1 * param_1 + param_2 * param_2));
} |
1,986 | func0 |
#include <cmath>
#include <cassert>
| double func0(double r, double h) {
double l = sqrt(r * r + h * h);
double SA = M_PI * r * (r + l);
return SA;
}
| int main() {
assert(func0(5,12) == 282.7433388230814);
assert(func0(10,15) == 880.5179353159282);
assert(func0(19,17) == 2655.923961165254);
return 0;
}
| O2 | cpp | func0(double, double):
endbr64
mulsd %xmm1,%xmm1
movapd %xmm0,%xmm2
sub $0x18,%rsp
mulsd %xmm0,%xmm0
addsd %xmm1,%xmm0
pxor %xmm1,%xmm1
ucomisd %xmm0,%xmm1
movapd %xmm0,%xmm3
sqrtsd %xmm3,%xmm3
ja 11a3 <_Z5func0dd+0x43>
movsd 0xe76(%rip),%xmm0
add $0x18,%rsp
mulsd %xmm2,%xmm0
addsd %xmm3,%xmm2
mulsd ... | _Z5func0dd:
endbr64
mulsd xmm1, xmm1
movapd xmm2, xmm0
mulsd xmm0, xmm0
addsd xmm0, xmm1
movsd xmm1, cs:qword_2008
mulsd xmm1, xmm2
sqrtsd xmm0, xmm0
addsd xmm2, xmm0
mulsd xmm1, xmm2
movapd xmm0, xmm1
retn | __int128 __usercall func0@<xmm0>(double a1@<xmm0>, double a2@<xmm1>)
{
double v3; // xmm0_8
__int128 v4; // xmm1
v3 = a1 * a1 + a2 * a2;
v4 = 0x400921FB54442D18uLL;
*(double *)&v4 = 3.141592653589793 * a1 * (a1 + sqrt(v3));
return v4;
} | func0:
ENDBR64
MULSD XMM1,XMM1
MOVAPD XMM2,XMM0
MULSD XMM0,XMM0
ADDSD XMM0,XMM1
MOVSD XMM1,qword ptr [0x00102008]
MULSD XMM1,XMM2
SQRTSD XMM0,XMM0
ADDSD XMM2,XMM0
MULSD XMM1,XMM2
MOVAPD XMM0,XMM1
RET | /* func0(double, double) */
double func0(double param_1,double param_2)
{
return DAT_00102008 * param_1 * (param_1 + SQRT(param_1 * param_1 + param_2 * param_2));
} |
1,987 | func0 |
#include <cmath>
#include <cassert>
| double func0(double r, double h) {
double l = sqrt(r * r + h * h);
double SA = M_PI * r * (r + l);
return SA;
}
| int main() {
assert(func0(5,12) == 282.7433388230814);
assert(func0(10,15) == 880.5179353159282);
assert(func0(19,17) == 2655.923961165254);
return 0;
}
| O3 | cpp | func0(double, double):
endbr64
mulsd %xmm1,%xmm1
movapd %xmm0,%xmm2
sub $0x18,%rsp
mulsd %xmm0,%xmm0
addsd %xmm1,%xmm0
pxor %xmm1,%xmm1
ucomisd %xmm0,%xmm1
movapd %xmm0,%xmm3
sqrtsd %xmm3,%xmm3
ja 11a3 <_Z5func0dd+0x43>
movsd 0xe76(%rip),%xmm0
add $0x18,%rsp
mulsd %xmm2,%xmm0
addsd %xmm3,%xmm2
mulsd ... | _Z5func0dd:
endbr64
mulsd xmm1, xmm1
movapd xmm2, xmm0
mulsd xmm0, xmm0
addsd xmm0, xmm1
movsd xmm1, cs:qword_2008
mulsd xmm1, xmm2
sqrtsd xmm0, xmm0
addsd xmm2, xmm0
mulsd xmm1, xmm2
movapd xmm0, xmm1
retn | __int128 __usercall func0@<xmm0>(double a1@<xmm0>, double a2@<xmm1>)
{
double v3; // xmm0_8
__int128 v4; // xmm1
v3 = a1 * a1 + a2 * a2;
v4 = 0x400921FB54442D18uLL;
*(double *)&v4 = 3.141592653589793 * a1 * (a1 + sqrt(v3));
return v4;
} | func0:
ENDBR64
MULSD XMM1,XMM1
MOVAPD XMM2,XMM0
MULSD XMM0,XMM0
ADDSD XMM0,XMM1
MOVSD XMM1,qword ptr [0x00102008]
MULSD XMM1,XMM2
SQRTSD XMM0,XMM0
ADDSD XMM2,XMM0
MULSD XMM1,XMM2
MOVAPD XMM0,XMM1
RET | /* func0(double, double) */
double func0(double param_1,double param_2)
{
return DAT_00102008 * param_1 * (param_1 + SQRT(param_1 * param_1 + param_2 * param_2));
} |
1,988 | func0 |
#include <cassert>
| int func0(int x, int y) {
int gcd = 1;
if (x % y == 0) {
return y;
}
for (int k = y / 2; k > 0; k--) {
if (x % k == 0 && y % k == 0) {
gcd = k;
break;
}
}
return gcd;
}
| int main() {
assert(func0(12, 17) == 1);
assert(func0(4, 6) == 2);
assert(func0(2, 9) == 1);
return 0;
}
| O0 | cpp | func0(int, int):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
mov %esi,-0x18(%rbp)
movl $0x1,-0x8(%rbp)
mov -0x14(%rbp),%eax
cltd
idivl -0x18(%rbp)
mov %edx,%eax
test %eax,%eax
jne 1170 <_Z5func0ii+0x27>
mov -0x18(%rbp),%eax
jmp 11b0 <_Z5func0ii+0x67>
mov -0x18(%rbp),%eax
mov ... | _Z5func0ii:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_14], edi
mov [rbp+var_18], esi
mov [rbp+var_8], 1
mov eax, [rbp+var_14]
cdq
idiv [rbp+var_18]
mov eax, edx
test eax, eax
jnz short loc_1170
mov eax, [rbp+var_18]
jmp short loc_11B0
loc_1170:
mov eax, [rbp+var_18]
mov... | long long func0(int a1, signed int a2)
{
unsigned int v3; // [rsp+10h] [rbp-8h]
int i; // [rsp+14h] [rbp-4h]
v3 = 1;
if ( !(a1 % a2) )
return (unsigned int)a2;
for ( i = a2 / 2; i > 0; --i )
{
if ( !(a1 % i) && !(a2 % i) )
return (unsigned int)i;
}
return v3;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x14],EDI
MOV dword ptr [RBP + -0x18],ESI
MOV dword ptr [RBP + -0x8],0x1
MOV EAX,dword ptr [RBP + -0x14]
CDQ
IDIV dword ptr [RBP + -0x18]
MOV EAX,EDX
TEST EAX,EAX
JNZ 0x00101170
MOV EAX,dword ptr [RBP + -0x18]
JMP 0x001011b0
LAB_00101170:
MOV EAX,dword ptr [RBP ... | /* func0(int, int) */
int func0(int param_1,int param_2)
{
int iVar1;
int local_10;
int local_c;
local_10 = 1;
iVar1 = param_2;
if (param_1 % param_2 != 0) {
for (local_c = param_2 / 2;
(iVar1 = local_10, 0 < local_c &&
((param_1 % local_c != 0 || (iVar1 = local_c, param_2 % local_c... |
1,989 | func0 |
#include <cassert>
| int func0(int x, int y) {
int gcd = 1;
if (x % y == 0) {
return y;
}
for (int k = y / 2; k > 0; k--) {
if (x % k == 0 && y % k == 0) {
gcd = k;
break;
}
}
return gcd;
}
| int main() {
assert(func0(12, 17) == 1);
assert(func0(4, 6) == 2);
assert(func0(2, 9) == 1);
return 0;
}
| O1 | cpp | func0(int, int):
endbr64
mov %edi,%eax
cltd
idiv %esi
mov %esi,%ecx
test %edx,%edx
je 118b <_Z5func0ii+0x42>
shr $0x1f,%ecx
add %esi,%ecx
sar %ecx
cmp $0x1,%esi
jg 1172 <_Z5func0ii+0x29>
mov $0x1,%ecx
jmp 118b <_Z5func0ii+0x42>
sub $0x1,%ecx
test %ecx,%ecx
jle 1186 <_Z5func0i... | _Z5func0ii:
endbr64
mov eax, edi
cdq
idiv esi
mov ecx, esi
test edx, edx
jz short loc_118C
shr ecx, 1Fh
add ecx, esi
sar ecx, 1
cmp esi, 1
jg short loc_1170
mov ecx, 1
jmp short loc_118C
loc_116B:
sub ecx, 1
jz short loc_1187
loc_1170:
mov eax, edi
cdq
idiv ... | long long func0(int a1, int a2)
{
int v2; // ecx
v2 = a2;
if ( a1 % a2 )
{
v2 = a2 / 2;
if ( a2 > 1 )
{
do
{
while ( !(a1 % v2) )
{
if ( !(a2 % v2) )
return (unsigned int)v2;
--v2;
}
--v2;
}
while ( v2 );
... | func0:
ENDBR64
MOV EAX,EDI
CDQ
IDIV ESI
MOV ECX,ESI
TEST EDX,EDX
JZ 0x0010118c
SHR ECX,0x1f
ADD ECX,ESI
SAR ECX,0x1
CMP ESI,0x1
JG 0x00101170
MOV ECX,0x1
JMP 0x0010118c
LAB_0010116b:
SUB ECX,0x1
JZ 0x00101187
LAB_00101170:
MOV EAX,EDI
CDQ
IDIV ECX
TEST EDX,EDX
JNZ 0x0010116b
MOV EAX,ESI
CDQ
IDIV ECX
TEST EDX,EDX
JZ 0x0... | /* func0(int, int) */
int func0(int param_1,int param_2)
{
int iVar1;
if (param_1 % param_2 != 0) {
iVar1 = param_2 / 2;
if (param_2 < 2) {
param_2 = 1;
}
else {
do {
for (; param_1 % iVar1 == 0; iVar1 = iVar1 + -1) {
if (param_2 % iVar1 == 0) {
return ... |
1,990 | func0 |
#include <cassert>
| int func0(int x, int y) {
int gcd = 1;
if (x % y == 0) {
return y;
}
for (int k = y / 2; k > 0; k--) {
if (x % k == 0 && y % k == 0) {
gcd = k;
break;
}
}
return gcd;
}
| int main() {
assert(func0(12, 17) == 1);
assert(func0(4, 6) == 2);
assert(func0(2, 9) == 1);
return 0;
}
| O2 | cpp | func0(int, int) [clone .part.0]:
mov %esi,%r8d
shr $0x1f,%r8d
add %esi,%r8d
sar %r8d
cmp $0x1,%esi
jle 1232 <_Z5func0ii.part.0+0x32>
nopw 0x0(%rax,%rax,1)
mov %edi,%eax
cltd
idiv %r8d
test %edx,%edx
jne 122c <_Z5func0ii.part.0+0x2c>
mov %esi,%eax
cltd
idiv %r8d
test %edx,%edx
je ... | _Z5func0ii_part_0:
mov ecx, esi
shr ecx, 1Fh
add ecx, esi
sar ecx, 1
cmp esi, 1
jle short loc_1233
xchg ax, ax
loc_1210:
mov eax, edi
cdq
idiv ecx
test edx, edx
jnz short loc_122E
loc_1219:
mov eax, esi
cdq
idiv ecx
test edx, edx
jz short loc_1238
mov eax, edi... | long long func0(int a1, int a2)
{
int v2; // ecx
v2 = a2 / 2;
if ( a2 <= 1 )
{
return 1;
}
else
{
while ( a1 % v2 )
{
LABEL_5:
if ( !--v2 )
return 1;
}
while ( a2 % v2 )
{
--v2;
if ( a1 % v2 )
goto LABEL_5;
}
}
return (unsigned int)v2;
} | func0:
MOV ECX,ESI
SHR ECX,0x1f
ADD ECX,ESI
SAR ECX,0x1
CMP ESI,0x1
JLE 0x00101233
NOP
LAB_00101210:
MOV EAX,EDI
CDQ
IDIV ECX
TEST EDX,EDX
JNZ 0x0010122e
LAB_00101219:
MOV EAX,ESI
CDQ
IDIV ECX
TEST EDX,EDX
JZ 0x00101238
MOV EAX,EDI
SUB ECX,0x1
CDQ
IDIV ECX
TEST EDX,EDX
JZ 0x00101219
LAB_0010122e:
SUB ECX,0x1
JNZ 0x0010... | /* func0(int, int) [clone .part.0] */
int func0(int param_1,int param_2)
{
int iVar1;
iVar1 = param_2 / 2;
if (1 < param_2) {
do {
for (; param_1 % iVar1 == 0; iVar1 = iVar1 + -1) {
if (param_2 % iVar1 == 0) {
return iVar1;
}
}
iVar1 = iVar1 + -1;
} while (... |
1,991 | func0 |
#include <cassert>
| int func0(int x, int y) {
int gcd = 1;
if (x % y == 0) {
return y;
}
for (int k = y / 2; k > 0; k--) {
if (x % k == 0 && y % k == 0) {
gcd = k;
break;
}
}
return gcd;
}
| int main() {
assert(func0(12, 17) == 1);
assert(func0(4, 6) == 2);
assert(func0(2, 9) == 1);
return 0;
}
| O3 | cpp | func0(int, int) [clone .part.0]:
mov %esi,%r8d
shr $0x1f,%r8d
add %esi,%r8d
sar %r8d
cmp $0x1,%esi
jle 1232 <_Z5func0ii.part.0+0x32>
nopw 0x0(%rax,%rax,1)
mov %edi,%eax
cltd
idiv %r8d
test %edx,%edx
jne 122c <_Z5func0ii.part.0+0x2c>
mov %esi,%eax
cltd
idiv %r8d
test %edx,%edx
je ... | _Z5func0ii_part_0:
mov ecx, esi
shr ecx, 1Fh
add ecx, esi
sar ecx, 1
cmp esi, 1
jle short loc_1233
xchg ax, ax
loc_1210:
mov eax, edi
cdq
idiv ecx
test edx, edx
jnz short loc_122E
loc_1219:
mov eax, esi
cdq
idiv ecx
test edx, edx
jz short loc_1238
mov eax, edi... | long long func0(int a1, int a2)
{
int v2; // ecx
v2 = a2 / 2;
if ( a2 <= 1 )
{
return 1;
}
else
{
while ( a1 % v2 )
{
LABEL_5:
if ( !--v2 )
return 1;
}
while ( a2 % v2 )
{
--v2;
if ( a1 % v2 )
goto LABEL_5;
}
}
return (unsigned int)v2;
} | func0:
MOV ECX,ESI
SHR ECX,0x1f
ADD ECX,ESI
SAR ECX,0x1
CMP ESI,0x1
JLE 0x00101233
NOP
LAB_00101210:
MOV EAX,EDI
CDQ
IDIV ECX
TEST EDX,EDX
JNZ 0x0010122e
LAB_00101219:
MOV EAX,ESI
CDQ
IDIV ECX
TEST EDX,EDX
JZ 0x00101238
MOV EAX,EDI
SUB ECX,0x1
CDQ
IDIV ECX
TEST EDX,EDX
JZ 0x00101219
LAB_0010122e:
SUB ECX,0x1
JNZ 0x0010... | /* func0(int, int) [clone .part.0] */
int func0(int param_1,int param_2)
{
int iVar1;
iVar1 = param_2 / 2;
if (1 < param_2) {
do {
for (; param_1 % iVar1 == 0; iVar1 = iVar1 + -1) {
if (param_2 % iVar1 == 0) {
return iVar1;
}
}
iVar1 = iVar1 + -1;
} while (... |
1,992 | func0 |
#include <assert.h>
| int func0(int r) {
int diameter = 2 * r;
return diameter;
}
| int main() {
assert(func0(10) == 20);
assert(func0(40) == 80);
assert(func0(15) == 30);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
mov -0x14(%rbp),%eax
add %eax,%eax
mov %eax,-0x4(%rbp)
mov -0x4(%rbp),%eax
pop %rbp
retq
| _Z5func0i:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_14], edi
mov eax, [rbp+var_14]
add eax, eax
mov [rbp+var_4], eax
mov eax, [rbp+var_4]
pop rbp
retn | long long func0(int a1)
{
return (unsigned int)(2 * a1);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x14],EDI
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,EAX
MOV dword ptr [RBP + -0x4],EAX
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET | /* func0(int) */
int func0(int param_1)
{
return param_1 * 2;
} |
1,993 | func0 |
#include <assert.h>
| int func0(int r) {
int diameter = 2 * r;
return diameter;
}
| int main() {
assert(func0(10) == 20);
assert(func0(40) == 80);
assert(func0(15) == 30);
return 0;
}
| O1 | cpp | func0(int):
endbr64
lea (%rdi,%rdi,1),%eax
retq
| _Z5func0i:
endbr64
lea eax, [rdi+rdi]
retn | long long func0(int a1)
{
return (unsigned int)(2 * a1);
} | func0:
ENDBR64
LEA EAX,[RDI + RDI*0x1]
RET | /* func0(int) */
int func0(int param_1)
{
return param_1 * 2;
} |
1,994 | func0 |
#include <assert.h>
| int func0(int r) {
int diameter = 2 * r;
return diameter;
}
| int main() {
assert(func0(10) == 20);
assert(func0(40) == 80);
assert(func0(15) == 30);
return 0;
}
| O2 | cpp | func0(int):
endbr64
lea (%rdi,%rdi,1),%eax
retq
nopl 0x0(%rax,%rax,1)
| _Z5func0i:
endbr64
lea eax, [rdi+rdi]
retn | long long func0(int a1)
{
return (unsigned int)(2 * a1);
} | func0:
ENDBR64
LEA EAX,[RDI + RDI*0x1]
RET | /* func0(int) */
int func0(int param_1)
{
return param_1 * 2;
} |
1,995 | func0 |
#include <assert.h>
| int func0(int r) {
int diameter = 2 * r;
return diameter;
}
| int main() {
assert(func0(10) == 20);
assert(func0(40) == 80);
assert(func0(15) == 30);
return 0;
}
| O3 | cpp | func0(int):
endbr64
lea (%rdi,%rdi,1),%eax
retq
nopl 0x0(%rax,%rax,1)
| _Z5func0i:
endbr64
lea eax, [rdi+rdi]
retn | long long func0(int a1)
{
return (unsigned int)(2 * a1);
} | func0:
ENDBR64
LEA EAX,[RDI + RDI*0x1]
RET | /* func0(int) */
int func0(int param_1)
{
return param_1 * 2;
} |
1,996 | func0 |
#include <iostream>
#include <vector>
#include <string>
#include <assert.h>
| std::string func0(const std::vector<std::string>& list) {
std::string ans = " ";
for (const auto& i : list) {
ans += " " + i;
}
return ans;
}
| int main() {
assert(func0({"hello", "there", "have", "a", "rocky", "day"}) == " hello there have a rocky day");
assert(func0({"Hi", "there", "How", "are", "you"}) == " Hi there How are you");
assert(func0({"Part", "of", "the", "journey", "is", "end"}) == " Part of the journey is end");
return 0... | O0 | cpp | func0(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x68,%rsp
mov %rdi,-0x68(%rbp)
mov %rsi,-0x70(%rbp... | _Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 78h
mov [rbp+var_78], rdi
mov [rbp+var_80], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_60]
mov [rbp+var_48], rax
nop
n... | long long func0(long long a1, long long a2)
{
long long v3; // [rsp+18h] [rbp-68h] BYREF
long long v4; // [rsp+20h] [rbp-60h] BYREF
long long v5; // [rsp+28h] [rbp-58h]
long long v6; // [rsp+30h] [rbp-50h]
long long *v7; // [rsp+38h] [rbp-48h]
_BYTE v8[40]; // [rsp+40h] [rbp-40h] BYREF
unsigned long long... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x78
MOV qword ptr [RBP + -0x78],RDI
MOV qword ptr [RBP + -0x80],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x60]
MOV qword ptr [RBP + -0x48],RAX
NOP
NOP
LEA RDX,[RBP + -0x60]
MOV RAX,qword ptr [RBP + -0x78]
LEA RCX,[0... | /* func0(std::vector<std::string, std::allocator<std::string > > const&) */
vector * func0(vector *param_1)
{
bool bVar1;
vector<std::string,std::allocator<std::string>> *in_RSI;
long in_FS_OFFSET;
int8 local_70;
int8 local_68;
vector<std::string,std::allocator<std::string>> *local_60;
int8 local_58;
... |
1,997 | func0 |
#include <iostream>
#include <vector>
#include <string>
#include <assert.h>
| std::string func0(const std::vector<std::string>& list) {
std::string ans = " ";
for (const auto& i : list) {
ans += " " + i;
}
return ans;
}
| int main() {
assert(func0({"hello", "there", "have", "a", "rocky", "day"}) == " hello there have a rocky day");
assert(func0({"Hi", "there", "How", "are", "you"}) == " Hi there How are you");
assert(func0({"Part", "of", "the", "journey", "is", "end"}) == " Part of the journey is end");
return 0... | O1 | cpp | func0(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x38,%rsp
mov %rdi,%r1... | _Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 48h
mov r14, rdi
mov rbp, rsi
mov rax, fs:28h
mov [rsp+78h+var_40], rax
xor eax, eax
lea rax, [rdi+10h]
mov [rdi], ra... | _QWORD * func0(_QWORD *a1, long long **a2)
{
long long *v2; // rbx
unsigned long long v3; // rbp
long long v5; // [rsp+0h] [rbp-78h]
long long *v6; // [rsp+8h] [rbp-70h]
void *v7; // [rsp+10h] [rbp-68h] BYREF
unsigned long long v8; // [rsp+18h] [rbp-60h]
_QWORD v9[11]; // [rsp+20h] [rbp-58h] BYREF
v9[3... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x48
MOV R14,RDI
MOV RBP,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
LEA RAX,[RDI + 0x10]
MOV qword ptr [RDI],RAX
LEA RDX,[0x102005]
LEA RSI,[RDX + -0x1]
LAB_00101383:
CALL 0x001018e6
MOV RBX,qword ptr [RBP]
MOV ... | /* func0(std::vector<std::string, std::allocator<std::string > > const&) */
vector * func0(vector *param_1)
{
ulong *puVar1;
ulong uVar2;
ulong uVar3;
int8 uVar4;
ulong *puVar5;
long *in_RSI;
long in_FS_OFFSET;
int *local_68;
ulong local_60;
int local_58;
int7 uStack_57;
long local_40;
lo... |
1,998 | func0 |
#include <iostream>
#include <vector>
#include <string>
#include <assert.h>
| std::string func0(const std::vector<std::string>& list) {
std::string ans = " ";
for (const auto& i : list) {
ans += " " + i;
}
return ans;
}
| int main() {
assert(func0({"hello", "there", "have", "a", "rocky", "day"}) == " hello there have a rocky day");
assert(func0({"Hi", "there", "How", "are", "you"}) == " Hi there How are you");
assert(func0({"Part", "of", "the", "journey", "is", "end"}) == " Part of the journey is end");
return 0... | O2 | cpp | func0(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&):
endbr64
push %r15
push %r14
push %r13
mov %rdi,%r13
push %r12
push %rbp
push %rbx
sub $0x48,%rs... | _Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE:
endbr64
push r15
lea rdx, unk_2005
push r14
mov r14, rdi
push r13
push r12
push rbp
mov rbp, rsi
lea rsi, [rdx-1]
push rbx
sub rsp, 48h
mov rax, fs:28h
mov [rsp+78h+var_40], rax
xor eax, e... | _QWORD * func0(_QWORD *a1, long long **a2)
{
long long *v2; // rbx
unsigned long long v3; // rbp
long long v4; // rax
long long v6; // [rsp+0h] [rbp-78h]
long long *v7; // [rsp+8h] [rbp-70h]
void *v8; // [rsp+10h] [rbp-68h] BYREF
unsigned long long v9; // [rsp+18h] [rbp-60h]
_QWORD v10[11]; // [rsp+20h]... | func0:
ENDBR64
PUSH R15
LEA RDX,[0x102005]
PUSH R14
MOV R14,RDI
PUSH R13
PUSH R12
PUSH RBP
MOV RBP,RSI
LEA RSI,[RDX + -0x1]
PUSH RBX
SUB RSP,0x48
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
LEA RAX,[RDI + 0x10]
MOV qword ptr [RDI],RAX
LAB_0010177a:
CALL 0x00101690
MOV RAX,qword ptr [RBP + 0x8... | /* func0(std::vector<std::string, std::allocator<std::string > > const&) */
vector * func0(vector *param_1)
{
ulong *puVar1;
ulong uVar2;
ulong uVar3;
ulong *puVar4;
long *in_RSI;
long in_FS_OFFSET;
int *local_68;
ulong local_60;
int local_58;
int7 uStack_57;
long local_40;
local_40 = *(lon... |
1,999 | func0 |
#include <iostream>
#include <vector>
#include <string>
#include <assert.h>
| std::string func0(const std::vector<std::string>& list) {
std::string ans = " ";
for (const auto& i : list) {
ans += " " + i;
}
return ans;
}
| int main() {
assert(func0({"hello", "there", "have", "a", "rocky", "day"}) == " hello there have a rocky day");
assert(func0({"Hi", "there", "How", "are", "you"}) == " Hi there How are you");
assert(func0({"Part", "of", "the", "journey", "is", "end"}) == " Part of the journey is end");
return 0... | O3 | cpp | func0(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&):
endbr64
push %r15
push %r14
push %r13
mov %rdi,%r13
push %r12
push %rbp
push %rbx
sub $0x48,%rs... | _Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE:
endbr64
push r15
push r14
mov r14, rdi
push r13
push r12
push rbp
push rbx
sub rsp, 48h
mov rax, fs:28h
mov [rsp+78h+var_40], rax
xor eax, eax
lea rax, [rdi+10h]
mov qword ptr [rdi+8], 1
mov ... | long long func0(long long a1, long long **a2)
{
long long *v2; // rbx
unsigned long long v3; // rbp
long long v4; // rax
long long v6; // [rsp+0h] [rbp-78h]
long long *v7; // [rsp+8h] [rbp-70h]
void *v8; // [rsp+10h] [rbp-68h] BYREF
unsigned long long v9; // [rsp+18h] [rbp-60h]
_QWORD v10[11]; // [rsp+... | func0:
ENDBR64
PUSH R15
PUSH R14
MOV R14,RDI
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
LEA RAX,[RDI + 0x10]
MOV qword ptr [RDI + 0x8],0x1
MOV qword ptr [RDI],RAX
MOV EAX,0x20
MOV word ptr [RDI + 0x10],AX
MOV RAX,qword ptr [RSI + 0x8]
MOV RBX,... | /* func0(std::vector<std::string, std::allocator<std::string > > const&) */
vector * func0(vector *param_1)
{
ulong *puVar1;
ulong uVar2;
ulong uVar3;
ulong *puVar4;
long *in_RSI;
long in_FS_OFFSET;
int *local_68;
ulong local_60;
int local_58;
int7 uStack_57;
long local_40;
local_40 = *(lon... |
2,000 | func0 |
#include <iostream>
#include <cmath>
#include <cassert>
int ngcd(int x, int y) {
int gcd = 1;
for(int i = 1; i <= x && i <= y; i++) {
if(x % i == 0 && y % i == 0){
gcd = i;
}
}
return gcd;
}
| int func0(int x, int y) {
int n = ngcd(x, y);
int result = 0;
int z = (int)sqrt(n);
for(int i = 1; i <= z; i++) {
if(n % i == 0) {
result += 2;
if(i == n / i) {
result--;
}
}
}
return result;
}
| int main() {
assert(func0(2, 4) == 2);
assert(func0(2, 8) == 2);
assert(func0(12, 24) == 6);
return 0;
}
| O0 | cpp | func0(int, int):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x20,%rsp
mov %edi,-0x14(%rbp)
mov %esi,-0x18(%rbp)
mov -0x18(%rbp),%edx
mov -0x14(%rbp),%eax
mov %edx,%esi
mov %eax,%edi
callq 11a9 <_Z4ngcdii>
mov %eax,-0x8(%rbp)
movl $0x0,-0x10(%rbp)
cvtsi2sdl -0x8(%rbp),%xmm0
callq 1090 <sqrt@pl... | _Z5func0ii:
endbr64
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_14], edi
mov [rbp+var_18], esi
mov edx, [rbp+var_18]
mov eax, [rbp+var_14]
mov esi, edx; int
mov edi, eax; int
call _Z4ngcdii; ngcd(int,int)
mov [rbp+var_8], eax
mov [rbp+var_10], 0
pxor xmm1, xmm1
cvtsi... | long long func0(int a1, int a2)
{
unsigned int v3; // [rsp+10h] [rbp-10h]
int i; // [rsp+14h] [rbp-Ch]
int v5; // [rsp+18h] [rbp-8h]
int v6; // [rsp+1Ch] [rbp-4h]
v5 = ngcd(a1, a2);
v3 = 0;
v6 = (int)sqrt((double)v5);
for ( i = 1; i <= v6; ++i )
{
if ( !(v5 % i) )
{
v3 += 2;
if (... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0x14],EDI
MOV dword ptr [RBP + -0x18],ESI
MOV EDX,dword ptr [RBP + -0x18]
MOV EAX,dword ptr [RBP + -0x14]
MOV ESI,EDX
MOV EDI,EAX
CALL 0x00101169
MOV dword ptr [RBP + -0x8],EAX
MOV dword ptr [RBP + -0x10],0x0
PXOR XMM1,XMM1
CVTSI2SD XMM1,dword ptr [... | /* func0(int, int) */
int func0(int param_1,int param_2)
{
int iVar1;
int iVar2;
double dVar3;
int4 local_18;
int4 local_14;
iVar2 = ngcd(param_1,param_2);
local_18 = 0;
dVar3 = sqrt((double)iVar2);
for (local_14 = 1; local_14 <= (int)dVar3; local_14 = local_14 + 1) {
iVar1 = local_18;
if... |
2,001 | func0 |
#include <iostream>
#include <cmath>
#include <cassert>
int ngcd(int x, int y) {
int gcd = 1;
for(int i = 1; i <= x && i <= y; i++) {
if(x % i == 0 && y % i == 0){
gcd = i;
}
}
return gcd;
}
| int func0(int x, int y) {
int n = ngcd(x, y);
int result = 0;
int z = (int)sqrt(n);
for(int i = 1; i <= z; i++) {
if(n % i == 0) {
result += 2;
if(i == n / i) {
result--;
}
}
}
return result;
}
| int main() {
assert(func0(2, 4) == 2);
assert(func0(2, 8) == 2);
assert(func0(12, 24) == 6);
return 0;
}
| O1 | cpp | func0(int, int):
endbr64
push %rbx
sub $0x10,%rsp
callq 11a9 <_Z4ngcdii>
mov %eax,%ebx
pxor %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movapd %xmm0,%xmm2
sqrtsd %xmm2,%xmm2
movsd %xmm2,0x8(%rsp)
pxor %xmm1,%xmm1
ucomisd %xmm0,%xmm1
ja 123d <_Z5func0ii+0x49>
cvttsd2si 0x8(%rsp),%edi
test %edi,%edi
jle 126b <... | _Z5func0ii:
endbr64
push rbx
call _Z4ngcdii; ngcd(int,int)
mov ebx, eax
pxor xmm0, xmm0
cvtsi2sd xmm0, eax; x
pxor xmm1, xmm1
ucomisd xmm1, xmm0
ja short loc_11ED
sqrtsd xmm0, xmm0
loc_11D6:
cvttsd2si edi, xmm0
test edi, edi
jle short loc_121B
add edi, 1
mov ecx, 1
mov esi, 0
jm... | long long func0(int a1, int a2)
{
int v2; // ebx
double v3; // xmm0_8
double v4; // xmm0_8
int v5; // ecx
unsigned int v6; // esi
v2 = ngcd(a1, a2);
v3 = (double)v2;
if ( (double)v2 < 0.0 )
v4 = sqrt(v3);
else
v4 = sqrt(v3);
if ( (int)v4 <= 0 )
{
return 0;
}
else
{
v5 = 1;
... | func0:
ENDBR64
PUSH RBX
CALL 0x00101169
MOV EBX,EAX
PXOR XMM0,XMM0
CVTSI2SD XMM0,EAX
PXOR XMM1,XMM1
UCOMISD XMM1,XMM0
JA 0x001011ed
SQRTSD XMM0,XMM0
LAB_001011d6:
CVTTSD2SI EDI,XMM0
TEST EDI,EDI
JLE 0x0010121b
ADD EDI,0x1
MOV ECX,0x1
MOV ESI,0x0
JMP 0x001011fb
LAB_001011ed:
CALL 0x00101070
JMP 0x001011d6
LAB_001011f4:
... | /* func0(int, int) */
int func0(int param_1,int param_2)
{
int iVar1;
int iVar2;
int iVar3;
double dVar4;
iVar1 = ngcd(param_1,param_2);
dVar4 = (double)iVar1;
if (dVar4 < 0.0) {
dVar4 = sqrt(dVar4);
}
else {
dVar4 = SQRT(dVar4);
}
if ((int)dVar4 < 1) {
iVar3 = 0;
}
else {
... |
2,002 | func0 |
#include <iostream>
#include <cmath>
#include <cassert>
int ngcd(int x, int y) {
int gcd = 1;
for(int i = 1; i <= x && i <= y; i++) {
if(x % i == 0 && y % i == 0){
gcd = i;
}
}
return gcd;
}
| int func0(int x, int y) {
int n = ngcd(x, y);
int result = 0;
int z = (int)sqrt(n);
for(int i = 1; i <= z; i++) {
if(n % i == 0) {
result += 2;
if(i == n / i) {
result--;
}
}
}
return result;
}
| int main() {
assert(func0(2, 4) == 2);
assert(func0(2, 8) == 2);
assert(func0(12, 24) == 6);
return 0;
}
| O2 | cpp | func0(int, int):
endbr64
push %rbx
mov %esi,%r8d
sub $0x10,%rsp
cmp %esi,%edi
cmovle %edi,%r8d
test %r8d,%r8d
jle 13c0 <_Z5func0ii+0xc0>
add $0x1,%r8d
mov $0x1,%ebx
mov $0x1,%ecx
nopl 0x0(%rax)
mov %edi,%eax
cltd
idiv %ecx
test %edx,%edx
jne 1343 <_Z5func0ii+0x43>
mov %esi,%eax
c... | _Z5func0ii:
endbr64
cmp edi, esi
mov r8d, esi
push rbx
cmovle r8d, edi
test r8d, r8d
jle loc_1320
add r8d, 1
mov ebx, 1
mov ecx, 1
nop dword ptr [rax]
loc_12A8:
mov eax, edi
cdq
idiv ecx
test edx, edx
jnz short loc_12BB
mov eax, esi
cdq
idiv ecx
test edx, edx
c... | long long func0(int a1, int a2)
{
int v2; // r8d
int v3; // r8d
int v4; // ebx
int v5; // ecx
double v6; // xmm0_8
int v7; // edi
int v8; // edi
int v9; // ecx
unsigned int v10; // esi
v2 = a2;
if ( a1 <= a2 )
v2 = a1;
if ( v2 <= 0 )
{
v7 = 1;
v4 = 1;
}
else
{
v3 = v2 +... | func0:
ENDBR64
CMP EDI,ESI
MOV R8D,ESI
PUSH RBX
CMOVLE R8D,EDI
TEST R8D,R8D
JLE 0x00101320
ADD R8D,0x1
MOV EBX,0x1
MOV ECX,0x1
NOP dword ptr [RAX]
LAB_001012a8:
MOV EAX,EDI
CDQ
IDIV ECX
TEST EDX,EDX
JNZ 0x001012bb
MOV EAX,ESI
CDQ
IDIV ECX
TEST EDX,EDX
CMOVZ EBX,ECX
LAB_001012bb:
ADD ECX,0x1
CMP ECX,R8D
JNZ 0x001012a8
P... | /* func0(int, int) */
int func0(int param_1,int param_2)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
double dVar5;
iVar4 = param_2;
if (param_1 <= param_2) {
iVar4 = param_1;
}
if (iVar4 < 1) {
iVar4 = 1;
iVar2 = 1;
}
else {
iVar2 = 1;
iVar1 = 1;
do {
if ((para... |
2,003 | func0 |
#include <iostream>
#include <cmath>
#include <cassert>
int ngcd(int x, int y) {
int gcd = 1;
for(int i = 1; i <= x && i <= y; i++) {
if(x % i == 0 && y % i == 0){
gcd = i;
}
}
return gcd;
}
| int func0(int x, int y) {
int n = ngcd(x, y);
int result = 0;
int z = (int)sqrt(n);
for(int i = 1; i <= z; i++) {
if(n % i == 0) {
result += 2;
if(i == n / i) {
result--;
}
}
}
return result;
}
| int main() {
assert(func0(2, 4) == 2);
assert(func0(2, 8) == 2);
assert(func0(12, 24) == 6);
return 0;
}
| O3 | cpp | func0(int, int):
endbr64
push %rbx
mov %esi,%r8d
sub $0x10,%rsp
cmp %esi,%edi
cmovle %edi,%r8d
test %r8d,%r8d
jle 13c0 <_Z5func0ii+0xc0>
add $0x1,%r8d
mov $0x1,%ebx
mov $0x1,%ecx
nopl 0x0(%rax)
mov %edi,%eax
cltd
idiv %ecx
test %edx,%edx
jne 1343 <_Z5func0ii+0x43>
mov %esi,%eax
c... | _Z5func0ii:
endbr64
cmp edi, esi
mov r8d, esi
push rbx
cmovle r8d, edi
test r8d, r8d
jle loc_1320
add r8d, 1
mov ebx, 1
mov ecx, 1
nop dword ptr [rax]
loc_12A8:
mov eax, edi
cdq
idiv ecx
test edx, edx
jnz short loc_12BB
mov eax, esi
cdq
idiv ecx
test edx, edx
c... | long long func0(int a1, int a2)
{
int v2; // r8d
int v3; // r8d
int v4; // ebx
int v5; // ecx
double v6; // xmm0_8
int v7; // edi
int v8; // edi
int v9; // ecx
unsigned int v10; // esi
v2 = a2;
if ( a1 <= a2 )
v2 = a1;
if ( v2 <= 0 )
{
v7 = 1;
v4 = 1;
}
else
{
v3 = v2 +... | func0:
ENDBR64
CMP EDI,ESI
MOV R8D,ESI
PUSH RBX
CMOVLE R8D,EDI
TEST R8D,R8D
JLE 0x00101320
ADD R8D,0x1
MOV EBX,0x1
MOV ECX,0x1
NOP dword ptr [RAX]
LAB_001012a8:
MOV EAX,EDI
CDQ
IDIV ECX
TEST EDX,EDX
JNZ 0x001012bb
MOV EAX,ESI
CDQ
IDIV ECX
TEST EDX,EDX
CMOVZ EBX,ECX
LAB_001012bb:
ADD ECX,0x1
CMP R8D,ECX
JNZ 0x001012a8
P... | /* func0(int, int) */
int func0(int param_1,int param_2)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
double dVar5;
iVar4 = param_2;
if (param_1 <= param_2) {
iVar4 = param_1;
}
if (iVar4 < 1) {
iVar4 = 1;
iVar2 = 1;
}
else {
iVar2 = 1;
iVar1 = 1;
do {
if ((para... |
2,004 | func0 |
#include <cassert>
| int func0(int n, int m) {
int r = n % m;
return r;
}
| int main() {
assert(func0(3, 3) == 0);
assert(func0(10, 3) == 1);
assert(func0(16, 5) == 1);
return 0;
}
| O0 | cpp | func0(int, int):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
mov %esi,-0x18(%rbp)
mov -0x14(%rbp),%eax
cltd
idivl -0x18(%rbp)
mov %edx,-0x4(%rbp)
mov -0x4(%rbp),%eax
pop %rbp
retq
| _Z5func0ii:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_14], edi
mov [rbp+var_18], esi
mov eax, [rbp+var_14]
cdq
idiv [rbp+var_18]
mov [rbp+var_4], edx
mov eax, [rbp+var_4]
pop rbp
retn | long long func0(int a1, int a2)
{
return (unsigned int)(a1 % a2);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x14],EDI
MOV dword ptr [RBP + -0x18],ESI
MOV EAX,dword ptr [RBP + -0x14]
CDQ
IDIV dword ptr [RBP + -0x18]
MOV dword ptr [RBP + -0x4],EDX
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET | /* func0(int, int) */
int func0(int param_1,int param_2)
{
return param_1 % param_2;
} |
2,005 | func0 |
#include <cassert>
| int func0(int n, int m) {
int r = n % m;
return r;
}
| int main() {
assert(func0(3, 3) == 0);
assert(func0(10, 3) == 1);
assert(func0(16, 5) == 1);
return 0;
}
| O1 | cpp | func0(int, int):
endbr64
mov %edi,%eax
cltd
idiv %esi
mov %edx,%eax
retq
| _Z5func0ii:
endbr64
mov eax, edi
cdq
idiv esi
mov eax, edx
retn | long long func0(int a1, int a2)
{
return (unsigned int)(a1 % a2);
} | func0:
ENDBR64
MOV EAX,EDI
CDQ
IDIV ESI
MOV EAX,EDX
RET | /* func0(int, int) */
ulong func0(int param_1,int param_2)
{
return (long)param_1 % (long)param_2 & 0xffffffff;
} |
2,006 | func0 |
#include <cassert>
| int func0(int n, int m) {
int r = n % m;
return r;
}
| int main() {
assert(func0(3, 3) == 0);
assert(func0(10, 3) == 1);
assert(func0(16, 5) == 1);
return 0;
}
| O2 | cpp | func0(int, int):
endbr64
mov %edi,%eax
cltd
idiv %esi
mov %edx,%eax
retq
nopl 0x0(%rax)
| _Z5func0ii:
endbr64
mov eax, edi
cdq
idiv esi
mov eax, edx
retn | long long func0(int a1, int a2)
{
return (unsigned int)(a1 % a2);
} | func0:
ENDBR64
MOV EAX,EDI
CDQ
IDIV ESI
MOV EAX,EDX
RET | /* func0(int, int) */
ulong func0(int param_1,int param_2)
{
return (long)param_1 % (long)param_2 & 0xffffffff;
} |
2,007 | func0 |
#include <cassert>
| int func0(int n, int m) {
int r = n % m;
return r;
}
| int main() {
assert(func0(3, 3) == 0);
assert(func0(10, 3) == 1);
assert(func0(16, 5) == 1);
return 0;
}
| O3 | cpp | func0(int, int):
endbr64
mov %edi,%eax
cltd
idiv %esi
mov %edx,%eax
retq
nopl 0x0(%rax)
| _Z5func0ii:
endbr64
mov eax, edi
cdq
idiv esi
mov eax, edx
retn | long long func0(int a1, int a2)
{
return (unsigned int)(a1 % a2);
} | func0:
ENDBR64
MOV EAX,EDI
CDQ
IDIV ESI
MOV EAX,EDX
RET | /* func0(int, int) */
ulong func0(int param_1,int param_2)
{
return (long)param_1 % (long)param_2 & 0xffffffff;
} |
2,008 | func0 | #include <vector>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& nums) {
std::vector<int> result;
for (size_t i = 0; i < nums.size() - 1; ++i) {
result.push_back(nums[i] + nums[i + 1]);
}
return result;
}
| int main() {
assert((func0({1, 1, 3, 4, 4, 5, 6, 7}) == std::vector<int>{2, 4, 7, 8, 9, 11, 13}));
assert((func0({4, 5, 8, 9, 6, 10}) == std::vector<int>{9, 13, 17, 15, 16}));
assert((func0({1, 2, 3, 4, 5, 6, 7, 8, 9, 10}) == std::vector<int>{3, 5, 7, 9, 11, 13, 15, 17, 19}));
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x38,%rsp
mov %rdi,-0x38(%rbp)
mov %rsi,-0x40(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x38(%rbp),%rax
mov %rax,%rdi
callq 1a76 <_ZNSt6vectorIiSaIiEEC1Ev>
movq $0... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 38h
mov [rbp+var_38], rdi
mov [rbp+var_40], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_38]
mov rdi, rax
call _ZNSt6vectorIiSaIiEEC2Ev; std::vector<int>::vector(void)
mo... | long long func0(long long a1, long long a2)
{
int v2; // ebx
long long v3; // rax
int v5; // [rsp+1Ch] [rbp-24h] BYREF
unsigned long long i; // [rsp+20h] [rbp-20h]
unsigned long long v7; // [rsp+28h] [rbp-18h]
v7 = __readfsqword(0x28u);
std::vector<int>::vector(a1);
for ( i = 0LL; ; ++i )
{
v3 =... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x38
MOV qword ptr [RBP + -0x38],RDI
MOV qword ptr [RBP + -0x40],RSI
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 0x00101afa
MOV qword ptr [RBP + -0x20],0x0
JMP 0x001012ee
LAB_001012a3:
MOV R... | /* func0(std::vector<int, std::allocator<int> > const&) */
vector * func0(vector *param_1)
{
int iVar1;
int *piVar2;
long lVar3;
vector<int,std::allocator<int>> *in_RSI;
long in_FS_OFFSET;
int local_2c;
ulong local_28;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
std::vector<int,st... |
2,009 | func0 | #include <vector>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& nums) {
std::vector<int> result;
for (size_t i = 0; i < nums.size() - 1; ++i) {
result.push_back(nums[i] + nums[i + 1]);
}
return result;
}
| int main() {
assert((func0({1, 1, 3, 4, 4, 5, 6, 7}) == std::vector<int>{2, 4, 7, 8, 9, 11, 13}));
assert((func0({4, 5, 8, 9, 6, 10}) == std::vector<int>{9, 13, 17, 15, 16}));
assert((func0({1, 2, 3, 4, 5, 6, 7, 8, 9, 10}) == std::vector<int>{3, 5, 7, 9, 11, 13, 15, 17, 19}));
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %r13
push %r12
push %rbp
push %rbx
sub $0x18,%rsp
mov %rdi,%rbx
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi)
movq $0x0,0x10(%rdi)
mov (%rsi),%rdx
mov 0x8(%rsi),%rax
sub %rd... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push r13
push r12
push rbp
push rbx
sub rsp, 18h
mov rbx, rdi
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 rdx, [rsi]
mov rax, [rsi+8]
sub ... | _QWORD * func0(_QWORD *a1, long long *a2)
{
long long v2; // rdx
unsigned long long v4; // rbp
long long v5; // rcx
int v6; // eax
int *v7; // rsi
int v9; // [rsp+4h] [rbp-34h] BYREF
unsigned long long v10; // [rsp+8h] [rbp-30h]
v10 = __readfsqword(0x28u);
*a1 = 0LL;
a1[1] = 0LL;
a1[2] = 0LL;
v... | func0:
ENDBR64
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
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 RDX,qword ptr [RSI]
MOV RAX,qword ptr [RSI + 0x8]
SUB RAX,RDX
CMP RAX,0x4
JZ 0x001013... | /* func0(std::vector<int, std::allocator<int> > const&) */
vector * func0(vector *param_1)
{
long lVar1;
int *piVar2;
long lVar3;
ulong uVar4;
long *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) ... |
2,010 | func0 | #include <vector>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& nums) {
std::vector<int> result;
for (size_t i = 0; i < nums.size() - 1; ++i) {
result.push_back(nums[i] + nums[i + 1]);
}
return result;
}
| int main() {
assert((func0({1, 1, 3, 4, 4, 5, 6, 7}) == std::vector<int>{2, 4, 7, 8, 9, 11, 13}));
assert((func0({4, 5, 8, 9, 6, 10}) == std::vector<int>{9, 13, 17, 15, 16}));
assert((func0({1, 2, 3, 4, 5, 6, 7, 8, 9, 10}) == std::vector<int>{3, 5, 7, 9, 11, 13, 15, 17, 19}));
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> > const&):
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 (%rsi),%rdx
mov 0x8(%rsi),%rax
sub %rd... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push r13
pxor xmm0, xmm0
push r12
push rbp
mov rbp, rdi
push rbx
sub rsp, 18h
mov rax, fs:28h
mov [rsp+38h+var_30], rax
xor eax, eax
movups xmmword ptr [rdi], xmm0
mov rdx, [rsi]
mov rax, [rsi+8]
mov qword ptr [rdi+10h], 0
sub rax,... | long long func0(long long a1, long long *a2)
{
long long v3; // rdx
long long v4; // rax
int *v6; // rdi
int *v7; // rsi
unsigned long long v8; // rbx
long long v9; // rcx
int v10; // eax
int v12; // [rsp+0h] [rbp-34h] BYREF
unsigned long long v13; // [rsp+4h] [rbp-30h]
v13 = __readfsqword(0x28u);... | func0:
ENDBR64
PUSH R13
PXOR XMM0,XMM0
PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
SUB RSP,0x18
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
MOVUPS xmmword ptr [RDI],XMM0
MOV RDX,qword ptr [RSI]
MOV RAX,qword ptr [RSI + 0x8]
MOV qword ptr [RDI + 0x10],0x0
SUB RAX,RDX
CMP RAX,0x4
JZ 0x001016f8
MOV R1... | /* func0(std::vector<int, std::allocator<int> > const&) */
vector * func0(vector *param_1)
{
long lVar1;
long lVar2;
ulong uVar3;
long *in_RSI;
int *piVar4;
int *piVar5;
long in_FS_OFFSET;
int local_34;
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
*(int (*) [16])param_1 = (int [... |
2,011 | func0 | #include <vector>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& nums) {
std::vector<int> result;
for (size_t i = 0; i < nums.size() - 1; ++i) {
result.push_back(nums[i] + nums[i + 1]);
}
return result;
}
| int main() {
assert((func0({1, 1, 3, 4, 4, 5, 6, 7}) == std::vector<int>{2, 4, 7, 8, 9, 11, 13}));
assert((func0({4, 5, 8, 9, 6, 10}) == std::vector<int>{9, 13, 17, 15, 16}));
assert((func0({1, 2, 3, 4, 5, 6, 7, 8, 9, 10}) == std::vector<int>{3, 5, 7, 9, 11, 13, 15, 17, 19}));
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> > const&):
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)
movups %xmm0,(%rdi)
mov (%rsi),%rdx
mov 0x8(%rsi),%rax
sub %rdx,... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push r13
pxor xmm0, xmm0
push r12
push rbp
mov rbp, rdi
push rbx
sub rsp, 18h
mov rax, fs:28h
mov [rsp+38h+var_30], rax
xor eax, eax
movups xmmword ptr [rdi], xmm0
mov rdx, [rsi]
mov rax, [rsi+8]
mov qword ptr [rdi+10h], 0
sub rax,... | long long func0(long long a1, long long *a2)
{
long long v3; // rdx
long long v4; // rax
int *v6; // rdi
int *v7; // rsi
unsigned long long v8; // rbx
long long v9; // rcx
int v10; // eax
int v12; // [rsp+0h] [rbp-34h] BYREF
unsigned long long v13; // [rsp+4h] [rbp-30h]
v13 = __readfsqword(0x28u);... | func0:
ENDBR64
PUSH R13
PXOR XMM0,XMM0
PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
SUB RSP,0x18
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
MOVUPS xmmword ptr [RDI],XMM0
MOV RDX,qword ptr [RSI]
MOV RAX,qword ptr [RSI + 0x8]
MOV qword ptr [RDI + 0x10],0x0
SUB RAX,RDX
CMP RAX,0x4
JZ 0x001016f8
MOV R1... | /* func0(std::vector<int, std::allocator<int> > const&) */
vector * func0(vector *param_1)
{
long lVar1;
long lVar2;
ulong uVar3;
long *in_RSI;
int *piVar4;
int *piVar5;
long in_FS_OFFSET;
int local_34;
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
*(int (*) [16])param_1 = (int [... |
2,012 | func0 |
#include <assert.h>
| int func0(int n) {
int sum = 0;
for (int i = 1; i <= n; i++) {
sum += i * i * i;
}
return sum;
}
| int main() {
assert(func0(5) == 225);
assert(func0(2) == 9);
assert(func0(3) == 36);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
movl $0x0,-0x8(%rbp)
movl $0x1,-0x4(%rbp)
mov -0x4(%rbp),%eax
cmp -0x14(%rbp),%eax
jg 117d <_Z5func0i+0x34>
mov -0x4(%rbp),%eax
imul %eax,%eax
imul -0x4(%rbp),%eax
add %eax,-0x8(%rbp)
addl $0x1,-0x4(%rbp)
jmp 1162 <_Z5... | _Z5func0i:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_14], edi
mov [rbp+var_8], 0
mov [rbp+var_4], 1
jmp short loc_1175
loc_1164:
mov eax, [rbp+var_4]
imul eax, eax
imul eax, [rbp+var_4]
add [rbp+var_8], eax
add [rbp+var_4], 1
loc_1175:
mov eax, [rbp+var_4]
cmp eax, [rbp... | long long func0(int a1)
{
unsigned int v2; // [rsp+Ch] [rbp-8h]
int i; // [rsp+10h] [rbp-4h]
v2 = 0;
for ( i = 1; i <= a1; ++i )
v2 += i * i * i;
return v2;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x14],EDI
MOV dword ptr [RBP + -0x8],0x0
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00101175
LAB_00101164:
MOV EAX,dword ptr [RBP + -0x4]
IMUL EAX,EAX
IMUL EAX,dword ptr [RBP + -0x4]
ADD dword ptr [RBP + -0x8],EAX
ADD dword ptr [RBP + -0x4],0x1
LAB_00101175:
MOV EAX,d... | /* func0(int) */
int func0(int param_1)
{
int4 local_10;
int4 local_c;
local_10 = 0;
for (local_c = 1; local_c <= param_1; local_c = local_c + 1) {
local_10 = local_10 + local_c * local_c * local_c;
}
return local_10;
} |
2,013 | func0 |
#include <assert.h>
| int func0(int n) {
int sum = 0;
for (int i = 1; i <= n; i++) {
sum += i * i * i;
}
return sum;
}
| int main() {
assert(func0(5) == 225);
assert(func0(2) == 9);
assert(func0(3) == 36);
return 0;
}
| O1 | cpp | func0(int):
endbr64
test %edi,%edi
jle 1172 <_Z5func0i+0x29>
add $0x1,%edi
mov $0x1,%eax
mov $0x0,%ecx
mov %eax,%edx
imul %eax,%edx
imul %eax,%edx
add %edx,%ecx
add $0x1,%eax
cmp %edi,%eax
jne 115e <_Z5func0i+0x15>
mov %ecx,%eax
retq
mov $0x0,%ecx
jmp 116f <_Z5func0i+0x26>
| _Z5func0i:
endbr64
test edi, edi
jle short loc_1172
add edi, 1
mov eax, 1
mov ecx, 0
loc_115E:
mov edx, eax
imul edx, eax
imul edx, eax
add ecx, edx
add eax, 1
cmp eax, edi
jnz short loc_115E
loc_116F:
mov eax, ecx
retn
loc_1172:
mov ecx, 0
jmp short loc_116F | long long func0(int a1)
{
int v1; // edi
int v2; // eax
unsigned int v3; // ecx
if ( a1 <= 0 )
{
return 0;
}
else
{
v1 = a1 + 1;
v2 = 1;
v3 = 0;
do
{
v3 += v2 * v2 * v2;
++v2;
}
while ( v2 != v1 );
}
return v3;
} | func0:
ENDBR64
TEST EDI,EDI
JLE 0x00101172
ADD EDI,0x1
MOV EAX,0x1
MOV ECX,0x0
LAB_0010115e:
MOV EDX,EAX
IMUL EDX,EAX
IMUL EDX,EAX
ADD ECX,EDX
ADD EAX,0x1
CMP EAX,EDI
JNZ 0x0010115e
LAB_0010116f:
MOV EAX,ECX
RET
LAB_00101172:
MOV ECX,0x0
JMP 0x0010116f | /* func0(int) */
int func0(int param_1)
{
int iVar1;
int iVar2;
if (param_1 < 1) {
iVar2 = 0;
}
else {
iVar1 = 1;
iVar2 = 0;
do {
iVar2 = iVar2 + iVar1 * iVar1 * iVar1;
iVar1 = iVar1 + 1;
} while (iVar1 != param_1 + 1);
}
return iVar2;
} |
2,014 | func0 |
#include <assert.h>
| int func0(int n) {
int sum = 0;
for (int i = 1; i <= n; i++) {
sum += i * i * i;
}
return sum;
}
| int main() {
assert(func0(5) == 225);
assert(func0(2) == 9);
assert(func0(3) == 36);
return 0;
}
| O2 | cpp | func0(int):
endbr64
test %edi,%edi
jle 1170 <_Z5func0i+0x30>
add $0x1,%edi
mov $0x1,%eax
xor %r8d,%r8d
nopl 0x0(%rax,%rax,1)
mov %eax,%edx
imul %eax,%edx
imul %eax,%edx
add $0x1,%eax
add %edx,%r8d
cmp %edi,%eax
jne 1158 <_Z5func0i+0x18>
mov %r8d,%eax
retq
xchg %ax,%ax
xor %r8d... | _Z5func0i:
endbr64
test edi, edi
jle short loc_1170
add edi, 1
mov eax, 1
xor ecx, ecx
nop word ptr [rax+rax+00h]
loc_1158:
mov edx, eax
imul edx, eax
imul edx, eax
add eax, 1
add ecx, edx
cmp eax, edi
jnz short loc_1158
mov eax, ecx
retn
loc_1170:
xor ecx, ecx
m... | long long func0(int a1)
{
int v1; // edi
int v2; // eax
unsigned int v3; // ecx
int v4; // edx
if ( a1 <= 0 )
return 0LL;
v1 = a1 + 1;
v2 = 1;
v3 = 0;
do
{
v4 = v2 * v2 * v2;
++v2;
v3 += v4;
}
while ( v2 != v1 );
return v3;
} | func0:
ENDBR64
TEST EDI,EDI
JLE 0x00101170
ADD EDI,0x1
MOV EAX,0x1
XOR ECX,ECX
NOP word ptr [RAX + RAX*0x1]
LAB_00101158:
MOV EDX,EAX
IMUL EDX,EAX
IMUL EDX,EAX
ADD EAX,0x1
ADD ECX,EDX
CMP EAX,EDI
JNZ 0x00101158
MOV EAX,ECX
RET
LAB_00101170:
XOR ECX,ECX
MOV EAX,ECX
RET | /* func0(int) */
int func0(int param_1)
{
int iVar1;
int iVar2;
int iVar3;
if (0 < param_1) {
iVar1 = 1;
iVar2 = 0;
do {
iVar3 = iVar1 * iVar1 * iVar1;
iVar1 = iVar1 + 1;
iVar2 = iVar2 + iVar3;
} while (iVar1 != param_1 + 1);
return iVar2;
}
return 0;
} |
2,015 | func0 |
#include <assert.h>
| int func0(int n) {
int sum = 0;
for (int i = 1; i <= n; i++) {
sum += i * i * i;
}
return sum;
}
| int main() {
assert(func0(5) == 225);
assert(func0(2) == 9);
assert(func0(3) == 36);
return 0;
}
| O3 | cpp | func0(int):
endbr64
test %edi,%edi
jle 1170 <_Z5func0i+0x30>
add $0x1,%edi
mov $0x1,%eax
xor %r8d,%r8d
nopl 0x0(%rax,%rax,1)
mov %eax,%edx
imul %eax,%edx
imul %eax,%edx
add $0x1,%eax
add %edx,%r8d
cmp %eax,%edi
jne 1158 <_Z5func0i+0x18>
mov %r8d,%eax
retq
xchg %ax,%ax
xor %r8d... | _Z5func0i:
endbr64
test edi, edi
jle short loc_1170
add edi, 1
mov eax, 1
xor ecx, ecx
nop word ptr [rax+rax+00h]
loc_1158:
mov edx, eax
imul edx, eax
imul edx, eax
add eax, 1
add ecx, edx
cmp edi, eax
jnz short loc_1158
mov eax, ecx
retn
loc_1170:
xor ecx, ecx
m... | long long func0(int a1)
{
int v1; // edi
int v2; // eax
unsigned int v3; // ecx
int v4; // edx
if ( a1 <= 0 )
return 0LL;
v1 = a1 + 1;
v2 = 1;
v3 = 0;
do
{
v4 = v2 * v2 * v2;
++v2;
v3 += v4;
}
while ( v1 != v2 );
return v3;
} | func0:
ENDBR64
TEST EDI,EDI
JLE 0x00101170
ADD EDI,0x1
MOV EAX,0x1
XOR ECX,ECX
NOP word ptr [RAX + RAX*0x1]
LAB_00101158:
MOV EDX,EAX
IMUL EDX,EAX
IMUL EDX,EAX
ADD EAX,0x1
ADD ECX,EDX
CMP EDI,EAX
JNZ 0x00101158
MOV EAX,ECX
RET
LAB_00101170:
XOR ECX,ECX
MOV EAX,ECX
RET | /* func0(int) */
int func0(int param_1)
{
int iVar1;
int iVar2;
int iVar3;
if (0 < param_1) {
iVar1 = 1;
iVar2 = 0;
do {
iVar3 = iVar1 * iVar1 * iVar1;
iVar1 = iVar1 + 1;
iVar2 = iVar2 + iVar3;
} while (param_1 + 1 != iVar1);
return iVar2;
}
return 0;
} |
2,016 | func0 |
#include <vector>
#include <assert.h>
| std::vector<int> func0(std::vector<int>& A) {
int k = 0;
for (int i : A) {
if (i) {
A[k] = i;
k++;
}
}
for (int i = k; i < A.size(); i++) {
A[i] = 0;
}
return A;
}
| int main() {
std::vector<int> test1 = {6, 0, 8, 2, 3, 0, 4, 0, 1};
std::vector<int> result1 = {6, 8, 2, 3, 4, 1, 0, 0, 0};
assert(func0(test1) == result1);
std::vector<int> test2 = {4, 0, 2, 7, 0, 9, 0, 12, 0};
std::vector<int> result2 = {4, 2, 7, 9, 12, 0, 0, 0, 0};
assert(func0(tes... | O0 | cpp | func0(std::vector<int, std::allocator<int> >&):
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
movl $0x0,-0x3c(%rbp)
mov -0x50(%rbp),%rax
mov %rax,-0x20(%rbp)
mov -0x20(%rbp),%rax... | _Z5func0RSt6vectorIiSaIiEE:
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 [rbp+var_3C], 0
mov rax, [rbp+var_50]
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
mov r... | long long func0(long long a1, long long a2)
{
int v3; // [rsp+14h] [rbp-3Ch]
int i; // [rsp+18h] [rbp-38h]
int v5; // [rsp+1Ch] [rbp-34h]
long long v6; // [rsp+20h] [rbp-30h] BYREF
_QWORD v7[4]; // [rsp+28h] [rbp-28h] BYREF
v7[2] = __readfsqword(0x28u);
v3 = 0;
v7[1] = a2;
v6 = std::vector<int>::beg... | 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 dword ptr [RBP + -0x3c],0x0
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20... | /* func0(std::vector<int, std::allocator<int> >&) */
vector * func0(vector *param_1)
{
int iVar1;
bool bVar2;
int *piVar3;
int4 *puVar4;
ulong uVar5;
vector<int,std::allocator<int>> *in_RSI;
long in_FS_OFFSET;
int local_44;
int local_40;
int8 local_38;
int8 local_30;
vector<int,std::allocator<... |
2,017 | func0 |
#include <vector>
#include <assert.h>
| std::vector<int> func0(std::vector<int>& A) {
int k = 0;
for (int i : A) {
if (i) {
A[k] = i;
k++;
}
}
for (int i = k; i < A.size(); i++) {
A[i] = 0;
}
return A;
}
| int main() {
std::vector<int> test1 = {6, 0, 8, 2, 3, 0, 4, 0, 1};
std::vector<int> result1 = {6, 8, 2, 3, 4, 1, 0, 0, 0};
assert(func0(test1) == result1);
std::vector<int> test2 = {4, 0, 2, 7, 0, 9, 0, 12, 0};
std::vector<int> result2 = {4, 2, 7, 9, 12, 0, 0, 0, 0};
assert(func0(tes... | O1 | cpp | func0(std::vector<int, std::allocator<int> >&):
endbr64
push %r13
push %r12
push %rbp
push %rbx
sub $0x8,%rsp
mov %rdi,%r12
mov %rsi,%rbp
mov (%rsi),%rcx
mov 0x8(%rsi),%rsi
mov %rcx,%rdx
mov $0x0,%eax
cmp %rsi,%rcx
jne 1365 <_Z5func0RSt6vectorIiSaIiEE+0xfc>
cltq
mov 0x0(%rbp),%rdx
... | _Z5func0RSt6vectorIiSaIiEE:
endbr64
push r13
push r12
push rbp
push rbx
sub rsp, 8
mov r12, rdi
mov rbp, rsi
mov rdx, [rsi]
mov rsi, [rsi+8]
cmp rsi, rdx
jz loc_1387
mov eax, 0
jmp short loc_129D
loc_1294:
add rdx, 4
cmp rsi, rdx
jz short loc_12B3
loc_129D:
... | _QWORD * func0(_QWORD *a1, long long a2)
{
_DWORD *v3; // rdx
_DWORD *v4; // rsi
unsigned long long v5; // rax
_DWORD *v6; // rdx
signed long long v7; // rbx
long long v8; // rsi
_DWORD *v9; // r13
_DWORD *v10; // rsi
long long v11; // rbx
v3 = *(_DWORD **)a2;
v4 = *(_DWORD **)(a2 + 8);
if ( v4... | func0:
ENDBR64
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV R12,RDI
MOV RBP,RSI
MOV RDX,qword ptr [RSI]
MOV RSI,qword ptr [RSI + 0x8]
CMP RSI,RDX
JZ 0x00101387
MOV EAX,0x0
JMP 0x0010129d
LAB_00101294:
ADD RDX,0x4
CMP RSI,RDX
JZ 0x001012b3
LAB_0010129d:
MOV ECX,dword ptr [RDX]
TEST ECX,ECX
JZ 0x00101294
MOVSXD R8... | /* func0(std::vector<int, std::allocator<int> >&) */
vector * func0(vector *param_1)
{
int *piVar1;
int4 *__src;
int iVar2;
ulong uVar3;
int4 *__dest;
ulong uVar4;
int *piVar5;
long lVar6;
ulong uVar7;
size_t __n;
long *in_RSI;
piVar5 = (int *)*in_RSI;
piVar1 = (int *)in_RSI[1];
if (piV... |
2,018 | func0 |
#include <vector>
#include <assert.h>
| std::vector<int> func0(std::vector<int>& A) {
int k = 0;
for (int i : A) {
if (i) {
A[k] = i;
k++;
}
}
for (int i = k; i < A.size(); i++) {
A[i] = 0;
}
return A;
}
| int main() {
std::vector<int> test1 = {6, 0, 8, 2, 3, 0, 4, 0, 1};
std::vector<int> result1 = {6, 8, 2, 3, 4, 1, 0, 0, 0};
assert(func0(test1) == result1);
std::vector<int> test2 = {4, 0, 2, 7, 0, 9, 0, 12, 0};
std::vector<int> result2 = {4, 2, 7, 9, 12, 0, 0, 0, 0};
assert(func0(tes... | O2 | cpp | func0(std::vector<int, std::allocator<int> >&):
endbr64
push %r12
mov %rdi,%r12
push %rbp
push %rbx
mov (%rsi),%r9
mov %rsi,%rbx
mov 0x8(%rsi),%rdi
cmp %rdi,%r9
je 1800 <_Z5func0RSt6vectorIiSaIiEE+0xf0>
mov %r9,%rcx
xor %r10d,%r10d
xor %eax,%eax
nopw %cs:0x0(%rax,%rax,1)
mov (%rcx... | _Z5func0RSt6vectorIiSaIiEE:
endbr64
push r13
push r12
push rbp
mov rbp, rsi
push rbx
mov rbx, rdi
sub rsp, 8
mov rdi, [rsi+8]
mov r8, [rsi]
xor esi, esi
mov r12, rdi
mov rax, r8
sub r12, r8
mov rdx, r12
sar rdx, 2
mov r13, rdx
cmp rdi, r8
jz loc_17C0
... | long long func0(long long a1, char **a2)
{
char *v4; // rdi
char *v5; // r8
int v6; // esi
char *v7; // rax
unsigned long long v8; // r12
unsigned long long v9; // rdx
unsigned long long v10; // r13
long long v11; // r9
_DWORD *v12; // rcx
char *v13; // rsi
signed long long v14; // rbp
long lon... | func0:
ENDBR64
PUSH R13
PUSH R12
PUSH RBP
MOV RBP,RSI
PUSH RBX
MOV RBX,RDI
SUB RSP,0x8
MOV RDI,qword ptr [RSI + 0x8]
MOV R8,qword ptr [RSI]
XOR ESI,ESI
MOV R12,RDI
MOV RAX,R8
SUB R12,R8
MOV RDX,R12
SAR RDX,0x2
MOV R13,RDX
CMP RDI,R8
JZ 0x001017c0
NOP dword ptr [RAX]
LAB_00101710:
MOV ECX,dword ptr [RAX]
TEST ECX,ECX
JZ... | /* func0(std::vector<int, std::allocator<int> >&) */
vector * func0(vector *param_1)
{
int *piVar1;
int4 *__src;
vector *pvVar2;
int *piVar3;
int4 *__dest;
vector *extraout_RAX;
ulong uVar4;
size_t __n;
int iVar5;
int8 *in_RSI;
ulong uVar6;
int *__s;
long lVar7;
ulong uVar8;
__s = (in... |
2,019 | func0 |
#include <vector>
#include <assert.h>
| std::vector<int> func0(std::vector<int>& A) {
int k = 0;
for (int i : A) {
if (i) {
A[k] = i;
k++;
}
}
for (int i = k; i < A.size(); i++) {
A[i] = 0;
}
return A;
}
| int main() {
std::vector<int> test1 = {6, 0, 8, 2, 3, 0, 4, 0, 1};
std::vector<int> result1 = {6, 8, 2, 3, 4, 1, 0, 0, 0};
assert(func0(test1) == result1);
std::vector<int> test2 = {4, 0, 2, 7, 0, 9, 0, 12, 0};
std::vector<int> result2 = {4, 2, 7, 9, 12, 0, 0, 0, 0};
assert(func0(tes... | O3 | cpp | func0(std::vector<int, std::allocator<int> >&):
endbr64
push %r12
mov %rdi,%r12
xor %r10d,%r10d
xor %eax,%eax
push %rbp
push %rbx
mov (%rsi),%r9
mov %rsi,%rbx
mov 0x8(%rsi),%rdi
mov %r9,%rcx
cmp %rdi,%r9
je 1748 <_Z5func0RSt6vectorIiSaIiEE+0xe8>
nopw %cs:0x0(%rax,%rax,1)
mov (%rcx... | _Z5func0RSt6vectorIiSaIiEE:
endbr64
push r13
push r12
push rbp
mov rbp, rsi
push rbx
mov rbx, rdi
sub rsp, 8
mov rdi, [rsi+8]
mov r8, [rsi]
xor esi, esi
mov r12, rdi
mov rax, r8
sub r12, r8
mov rdx, r12
sar rdx, 2
mov r13, rdx
cmp rdi, r8
jz loc_17C0
... | long long func0(long long a1, char **a2)
{
char *v4; // rdi
char *v5; // r8
int v6; // esi
char *v7; // rax
unsigned long long v8; // r12
unsigned long long v9; // rdx
unsigned long long v10; // r13
long long v11; // r9
_DWORD *v12; // rcx
char *v13; // rsi
signed long long v14; // rbp
long lon... | func0:
ENDBR64
PUSH R13
PUSH R12
PUSH RBP
MOV RBP,RSI
PUSH RBX
MOV RBX,RDI
SUB RSP,0x8
MOV RDI,qword ptr [RSI + 0x8]
MOV R8,qword ptr [RSI]
XOR ESI,ESI
MOV R12,RDI
MOV RAX,R8
SUB R12,R8
MOV RDX,R12
SAR RDX,0x2
MOV R13,RDX
CMP RDI,R8
JZ 0x001017c0
NOP dword ptr [RAX]
LAB_00101710:
MOV ECX,dword ptr [RAX]
TEST ECX,ECX
JZ... | /* func0(std::vector<int, std::allocator<int> >&) */
vector * func0(vector *param_1)
{
int *piVar1;
int4 *__src;
vector *pvVar2;
int *piVar3;
int4 *__dest;
vector *extraout_RAX;
ulong uVar4;
size_t __n;
int iVar5;
int8 *in_RSI;
ulong uVar6;
int *__s;
long lVar7;
ulong uVar8;
__s = (in... |
2,020 | func0 |
#include <iostream>
#include <vector>
#include <assert.h>
using namespace std;
| int func0(int n, int k) {
vector<vector<int>> P(n + 1, vector<int>(k + 1, 0));
for (int i = 0; i <= n; i++) {
for (int j = 0; j <= min(i, k); j++) {
if (j == 0) {
P[i][j] = 1;
} else {
P[i][j] = P[i - 1][j] + (j * P[i - 1][j - 1]);
... | int main() {
assert(func0(10, 2) == 90);
assert(func0(10, 3) == 720);
assert(func0(10, 1) == 10);
return 0;
}
| O0 | cpp | func0(int, int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x68,%rsp
mov %edi,-0x64(%rbp)
mov %esi,-0x68(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
lea -0x59(%rbp),%rax
mov %rax,%rdi
callq 179c <_ZNSaISt6vectorIiSaIiEEEC1Ev>
lea -0x5a(%rbp),%rax
mov %rax,%rdi
c... | _Z5func0ii:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 78h
mov [rbp+var_74], edi
mov [rbp+var_78], esi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_69]
mov [rbp+var_58], rax
nop
nop
lea rax, [rbp+var_6A]
mov [rbp+var_60], rax
nop
nop
mov ... | long long func0(int a1, int a2)
{
long long v2; // rax
long long v3; // rax
int v4; // ebx
long long v5; // rax
_DWORD *v6; // rax
int v7; // ebx
long long v8; // rax
long long v9; // rax
_DWORD *v10; // rax
long long v11; // rax
unsigned int v12; // ebx
int v14; // [rsp+8h] [rbp-78h] BYREF
i... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x78
MOV dword ptr [RBP + -0x74],EDI
MOV dword ptr [RBP + -0x78],ESI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x69]
MOV qword ptr [RBP + -0x58],RAX
NOP
NOP
LEA RAX,[RBP + -0x6a]
MOV qword ptr [RBP + -0x60],RAX
NOP
NOP
MO... | /* func0(int, int) */
int4 func0(int param_1,int param_2)
{
int iVar1;
int4 uVar2;
int iVar3;
int *piVar4;
vector<int,std::allocator<int>> *pvVar5;
int4 *puVar6;
long in_FS_OFFSET;
int local_80;
int local_7c;
allocator local_72;
allocator local_71;
int local_70;
int local_6c;
allocator *lo... |
2,021 | func0 |
#include <iostream>
#include <vector>
#include <assert.h>
using namespace std;
| int func0(int n, int k) {
vector<vector<int>> P(n + 1, vector<int>(k + 1, 0));
for (int i = 0; i <= n; i++) {
for (int j = 0; j <= min(i, k); j++) {
if (j == 0) {
P[i][j] = 1;
} else {
P[i][j] = P[i - 1][j] + (j * P[i - 1][j - 1]);
... | int main() {
assert(func0(10, 2) == 90);
assert(func0(10, 3) == 720);
assert(func0(10, 1) == 10);
return 0;
}
| O1 | cpp | func0(int, int):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x28,%rsp
mov %edi,0x14(%rsp)
lea 0x1(%rsi),%eax
cltq
movabs $0x1fffffffffffffff,%rdx
cmp %rdx,%rax
ja 1332 <_Z5func0ii+0x89>
mov %esi,%ebx
test %rax,%rax
je 133e <_Z5func0ii+0x95>
lea 0x0(,... | _Z5func0ii:
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
lea r13d, [rsi+1]
movsxd r13, r13d
mov rax, r13
shr rax, 3Dh
jnz short loc_1323
mov ebp, edi
mov ebx, esi
test r13, ... | long long func0(int a1, int a2)
{
unsigned long long v2; // r13
_DWORD *v4; // rax
void *v5; // r15
_DWORD *v6; // rdx
unsigned long long v7; // r12
_QWORD *v8; // r14
long long v9; // r12
_QWORD *v10; // rcx
int i; // r10d
int v12; // eax
long long v13; // rdx
int v14; // esi
unsigned int v1... | 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
LEA R13D,[RSI + 0x1]
MOVSXD R13,R13D
MOV RAX,R13
SHR RAX,0x3d
JNZ 0x00101323
MOV EBP,EDI
MOV EBX,ESI
TEST R13,R13
JZ 0x001014e0
SHL R13,0x2
MOV RDI,R13
LAB_001012cf:
C... | /* func0(int, int) */
int4 func0(int param_1,int param_2)
{
int4 uVar1;
void *pvVar2;
int iVar3;
int4 *puVar4;
vector *pvVar5;
int8 uVar6;
vector *pvVar7;
vector *pvVar8;
long lVar9;
int iVar10;
int iVar11;
ulong uVar12;
ulong uVar13;
long in_FS_OFFSET;
bool bVar14;
int4 *local_58;
i... |
2,022 | func0 |
#include <iostream>
#include <vector>
#include <assert.h>
using namespace std;
| int func0(int n, int k) {
vector<vector<int>> P(n + 1, vector<int>(k + 1, 0));
for (int i = 0; i <= n; i++) {
for (int j = 0; j <= min(i, k); j++) {
if (j == 0) {
P[i][j] = 1;
} else {
P[i][j] = P[i - 1][j] + (j * P[i - 1][j - 1]);
... | int main() {
assert(func0(10, 2) == 90);
assert(func0(10, 3) == 720);
assert(func0(10, 1) == 10);
return 0;
}
| O2 | cpp | func0(int, int):
endbr64
movabs $0x1fffffffffffffff,%rdx
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
movslq %esi,%rbx
lea 0x1(%rbx),%eax
cltq
sub $0x28,%rsp
mov %edi,0xc(%rsp)
cmp %rdx,%rax
ja 168b <_Z5func0ii+0x28b>
test %rax,%rax
je 161a <_Z5func0ii+0x21a>
lea 0x0(... | _Z5func0ii:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
movsxd rbx, esi
lea r13d, [rbx+1]
movsxd r13, r13d
sub rsp, 38h
mov rax, fs:28h
mov [rsp+68h+var_40], rax
xor eax, eax
mov rax, r13
shr rax, 3Dh
jnz loc_15D0
pxor xmm0, xmm0
mov ebp, edi
... | long long func0(int a1, int a2)
{
long long v2; // rbx
unsigned long long v3; // r13
void *v4; // r15
unsigned long long v5; // r12
char *v6; // r14
long long v7; // r12
_DWORD **v8; // r9
int i; // r10d
int v10; // r8d
_DWORD *v11; // rsi
long long v12; // rdx
int j; // eax
unsigned int v14;... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOVSXD RBX,ESI
LEA R13D,[RBX + 0x1]
MOVSXD R13,R13D
SUB RSP,0x38
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x28],RAX
XOR EAX,EAX
MOV RAX,R13
SHR RAX,0x3d
JNZ 0x001015d0
PXOR XMM0,XMM0
MOV EBP,EDI
MOVUPS xmmword ptr [RSP + 0x18],XMM0
TEST R13,R1... | /* func0(int, int) */
int4 func0(int param_1,int param_2)
{
ulong uVar1;
int4 uVar2;
int4 *puVar3;
int iVar4;
void *__s;
vector *pvVar5;
vector *pvVar6;
long lVar7;
int iVar8;
vector *pvVar9;
int iVar10;
ulong uVar11;
void *pvVar12;
ulong uVar13;
long in_FS_OFFSET;
bool bVar14;
void ... |
2,023 | func0 |
#include <iostream>
#include <vector>
#include <assert.h>
using namespace std;
| int func0(int n, int k) {
vector<vector<int>> P(n + 1, vector<int>(k + 1, 0));
for (int i = 0; i <= n; i++) {
for (int j = 0; j <= min(i, k); j++) {
if (j == 0) {
P[i][j] = 1;
} else {
P[i][j] = P[i - 1][j] + (j * P[i - 1][j - 1]);
... | int main() {
assert(func0(10, 2) == 90);
assert(func0(10, 3) == 720);
assert(func0(10, 1) == 10);
return 0;
}
| O3 | cpp | func0(int, int):
endbr64
movabs $0x1fffffffffffffff,%rdx
push %r15
push %r14
push %r13
push %r12
push %rbp
movslq %esi,%rbp
push %rbx
lea 0x1(%rbp),%eax
cltq
sub $0x28,%rsp
cmp %rdx,%rax
ja 17c8 <_Z5func0ii+0x3a8>
movslq %edi,%r15
test %rax,%rax
je 16cb <_Z5func0ii+0x2ab>
lea 0x0(,%rax... | _Z5func0ii:
endbr64
push r15
push r14
push r13
push r12
push rbp
movsxd rbp, esi
push rbx
lea r13d, [rbp+1]
movsxd r13, r13d
sub rsp, 38h
mov rax, fs:28h
mov [rsp+68h+var_40], rax
xor eax, eax
mov rax, r13
shr rax, 3Dh
jnz loc_169C
pxor xmm0, xmm0
mov ebx, edi
... | long long func0(int a1, int a2)
{
long long v2; // rbp
unsigned long long v3; // r13
void *v5; // r15
unsigned long long v6; // r12
char *v7; // r14
long long v8; // r12
char *v9; // rcx
int i; // esi
int v11; // r9d
int v12; // r10d
_DWORD *v13; // r8
int v14; // eax
_DWORD *v15; // r10
lo... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
MOVSXD RBP,ESI
PUSH RBX
LEA R13D,[RBP + 0x1]
MOVSXD R13,R13D
SUB RSP,0x38
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x28],RAX
XOR EAX,EAX
MOV RAX,R13
SHR RAX,0x3d
JNZ 0x0010169c
PXOR XMM0,XMM0
MOV EBX,EDI
MOVUPS xmmword ptr [RSP + 0x18],XMM0
TEST R13,R1... | /* func0(int, int) */
int4 func0(int param_1,int param_2)
{
ulong uVar1;
int4 uVar2;
int iVar3;
int8 *puVar4;
long lVar5;
int iVar6;
int iVar7;
void *__s;
vector *pvVar8;
vector *pvVar9;
vector *pvVar10;
long lVar11;
long lVar12;
int iVar13;
int iVar14;
ulong uVar15;
void *pvVar16;
... |
2,024 | func0 |
#include <iostream>
#include <vector>
#include <string>
#include <assert.h>
#include <algorithm>
| std::vector<std::string> func0(std::vector<std::string> list1, std::vector<std::string> removewords) {
std::vector<std::string>::iterator it = list1.begin();
while (it != list1.end()) {
auto found = std::find(removewords.begin(), removewords.end(), *it);
if (found != removewords.end()) {
... | int main() {
assert(func0({"red", "green", "blue", "white", "black", "orange"}, {"white", "orange"}) == (std::vector<std::string>{"red", "green", "blue", "black"}));
assert(func0({"red", "green", "blue", "white", "black", "orange"}, {"black", "orange"}) == (std::vector<std::string>{"red", "green", "blue", "wh... | O0 | cpp | func0(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11:... | _Z5func0St6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EES7_:
endbr64
push rbp
mov rbp, rsp
push r12
push rbx
sub rsp, 40h
mov [rbp+var_38], rdi
mov [rbp+var_40], rsi
mov [rbp+var_48], rdx
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+... | long long func0(long long a1, long long a2, long long a3)
{
long long v3; // r12
long long v4; // rbx
long long v5; // rax
long long v8; // [rsp+20h] [rbp-30h] BYREF
long long v9; // [rsp+28h] [rbp-28h] BYREF
_QWORD v10[4]; // [rsp+30h] [rbp-20h] BYREF
v10[1] = __readfsqword(0x28u);
v8 = std::vector<s... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV qword ptr [RBP + -0x38],RDI
MOV qword ptr [RBP + -0x40],RSI
MOV qword ptr [RBP + -0x48],RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x40]
MOV RDI,RAX
CALL 0x001034e0
MOV qword ptr [RBP + -0x3... | /* func0(std::vector<std::string, std::allocator<std::string > >, std::vector<std::string,
std::allocator<std::string > >) */
vector<std::string,std::allocator<std::string>> * func0(vector param_1,vector param_2)
{
bool bVar1;
int8 uVar2;
int8 uVar3;
int8 uVar4;
vector<std::string,std::allocator<std::str... |
2,025 | func0 |
#include <iostream>
#include <vector>
#include <string>
#include <assert.h>
#include <algorithm>
| std::vector<std::string> func0(std::vector<std::string> list1, std::vector<std::string> removewords) {
std::vector<std::string>::iterator it = list1.begin();
while (it != list1.end()) {
auto found = std::find(removewords.begin(), removewords.end(), *it);
if (found != removewords.end()) {
... | int main() {
assert(func0({"red", "green", "blue", "white", "black", "orange"}, {"white", "orange"}) == (std::vector<std::string>{"red", "green", "blue", "black"}));
assert(func0({"red", "green", "blue", "white", "black", "orange"}, {"black", "orange"}) == (std::vector<std::string>{"red", "green", "blue", "wh... | O1 | cpp | func0(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11:... | _Z5func0St6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EES7_:
endbr64
push r14
push r13
push r12
push rbp
push rbx
mov r14, rdi
mov r12, rsi
mov r13, rdx
mov rbx, [rsi]
mov rax, [rsi+8]
cmp rbx, rax
jnz short loc_1372
mov rbx, rax
loc_132D:
mov rax... | long long * func0(long long *a1, long long *a2, _QWORD *a3)
{
long long v4; // rbx
long long v6; // rbp
v4 = *a2;
if ( *a2 == a2[1] )
{
v4 = a2[1];
}
else
{
do
{
v6 = a3[1];
if ( v6 == std::__find_if<__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>,__gnu_cxx:... | func0:
ENDBR64
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV R14,RDI
MOV R12,RSI
MOV R13,RDX
MOV RBX,qword ptr [RSI]
MOV RAX,qword ptr [RSI + 0x8]
CMP RBX,RAX
JNZ 0x00101372
MOV RBX,RAX
LAB_0010132d:
MOV RAX,qword ptr [R12]
MOV qword ptr [R14],RAX
MOV qword ptr [R14 + 0x8],RBX
MOV RAX,qword ptr [R12 + 0x10]
MOV qwor... | /* func0(std::vector<std::string, std::allocator<std::string > >, std::vector<std::string,
std::allocator<std::string > >) */
int8 * func0(vector param_1,vector param_2)
{
__normal_iterator _Var1;
int4 extraout_var;
long lVar2;
random_access_iterator_tag in_ECX;
int8 *in_RDX;
long lVar3;
int4 in_regi... |
2,026 | func0 |
#include <iostream>
#include <vector>
#include <string>
#include <assert.h>
#include <algorithm>
| std::vector<std::string> func0(std::vector<std::string> list1, std::vector<std::string> removewords) {
std::vector<std::string>::iterator it = list1.begin();
while (it != list1.end()) {
auto found = std::find(removewords.begin(), removewords.end(), *it);
if (found != removewords.end()) {
... | int main() {
assert(func0({"red", "green", "blue", "white", "black", "orange"}, {"white", "orange"}) == (std::vector<std::string>{"red", "green", "blue", "black"}));
assert(func0({"red", "green", "blue", "white", "black", "orange"}, {"black", "orange"}) == (std::vector<std::string>{"red", "green", "blue", "wh... | O2 | cpp | func0(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11:... | _Z5func0St6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EES7_:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 38h
movdqu xmm0, xmmword ptr [rsi]
mov [rsp+68h+var_40], rdi
movhlps xmm2, xmm0
movq rbp, xmm0
mov [rsp+68h+var_50], rsi
movq rax... | __m128 * func0(__m128 *a1, const __m128i *a2, long long *a3, double a4, double a5, __m128 a6)
{
__m128 v6; // xmm0
unsigned long long v7; // rbp
long long v8; // r15
long long v9; // rax
long long v10; // rbx
size_t v11; // r14
long long v12; // rbx
size_t v13; // rdx
size_t v14; // rdx
size_t v15; ... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x38
MOVDQU XMM0,xmmword ptr [RSI]
MOV qword ptr [RSP + 0x28],RDI
MOVHLPS XMM2,XMM0
MOVQ RBP,XMM0
MOV qword ptr [RSP + 0x18],RSI
MOVQ RAX,XMM2
MOV qword ptr [RSP + 0x20],RDX
MOVQ qword ptr [RSP + 0x10],XMM2
CMP RAX,RBP
JZ 0x00101e4d
NOP dword ... | /* func0(std::vector<std::string, std::allocator<std::string > >, std::vector<std::string,
std::allocator<std::string > >) */
int8 * func0(int8 *param_1,int (*param_2) [16],long *param_3)
{
size_t *psVar1;
int8 uVar2;
int iVar3;
long lVar4;
size_t sVar5;
size_t sVar6;
int8 *puVar7;
int8 *puVar8;
... |
2,027 | func0 |
#include <iostream>
#include <vector>
#include <string>
#include <assert.h>
#include <algorithm>
| std::vector<std::string> func0(std::vector<std::string> list1, std::vector<std::string> removewords) {
std::vector<std::string>::iterator it = list1.begin();
while (it != list1.end()) {
auto found = std::find(removewords.begin(), removewords.end(), *it);
if (found != removewords.end()) {
... | int main() {
assert(func0({"red", "green", "blue", "white", "black", "orange"}, {"white", "orange"}) == (std::vector<std::string>{"red", "green", "blue", "black"}));
assert(func0({"red", "green", "blue", "white", "black", "orange"}, {"black", "orange"}) == (std::vector<std::string>{"red", "green", "blue", "wh... | O3 | cpp | func0(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11:... | _Z5func0St6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EES7_:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 28h
movdqu xmm0, xmmword ptr [rsi]
mov [rsp+58h+var_40], rdi
movhlps xmm1, xmm0
movq rbp, xmm0
mov [rsp+58h+var_50], rsi
movq rax... | __m128 * func0(__m128 *a1, const __m128i *a2, long long *a3, double a4, __m128 a5)
{
__m128 v5; // xmm0
long long v6; // rbp
long long v7; // r15
long long v8; // rax
long long v9; // rbx
size_t v10; // r13
long long v11; // rbx
size_t v12; // rdx
size_t v13; // rdx
size_t v14; // rdx
const void *... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x28
MOVDQU XMM0,xmmword ptr [RSI]
MOV qword ptr [RSP + 0x18],RDI
MOVHLPS XMM1,XMM0
MOVQ RBP,XMM0
MOV qword ptr [RSP + 0x8],RSI
MOVQ RAX,XMM1
MOV qword ptr [RSP + 0x10],RDX
CMP RBP,RAX
JZ 0x00101d44
NOP dword ptr [RAX + RAX*0x1]
LAB_00101c70:
... | /* func0(std::vector<std::string, std::allocator<std::string > >, std::vector<std::string,
std::allocator<std::string > >) */
int8 *
func0(int8 *param_1,vector<std::string,std::allocator<std::string>> *param_2,long *param_3)
{
size_t *psVar1;
int8 uVar2;
int8 *puVar3;
int iVar4;
long lVar5;
int8 *puVar... |
2,028 | func0 |
#include <iostream>
#include <vector>
#include <set>
#include <algorithm>
#include <cassert>
| bool func0(const std::vector<std::string>& l1, const std::vector<std::string>& l2) {
std::set<std::string> common_elements;
std::set<std::string> set1(l1.begin(), l1.end());
std::set<std::string> set2(l2.begin(), l2.end());
std::set_intersection(set1.begin(), set1.end(), set2.begin(), set2.end... | int main() {
assert(func0({"red","green","black","orange"}, {"red","pink","green","white","black"}) == true);
assert(func0({"red","pink","green","white","black"}, {"white","orange","pink","black"}) == false);
assert(func0({"red","green","black","orange"}, {"red","pink","green","white","black"}) == true);... | O0 | cpp | func0(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::_... | _ZZ5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EES9_ENKUlRKS5_E_clESB_:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_28], rdi
mov [rbp+var_30], rsi
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
mov rax, [rbp+var_28]
mov rax, [rax]
mov rdi... | long long func0(std::vector<std::string> const&,std::vector<std::string> const&)::{lambda(std::string const&)#1}::operator()(
_QWORD *a1,
long long a2)
{
long long v3; // [rsp+18h] [rbp-18h] BYREF
_QWORD v4[2]; // [rsp+20h] [rbp-10h] BYREF
v4[1] = __readfsqword(0x28u);
v4[0] = std::set<std::st... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xf8
MOV qword ptr [RBP + -0x118],RDI
MOV qword ptr [RBP + -0x120],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x38],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0xd0]
MOV RDI,RAX
CALL 0x00103216
MOV RAX,qword ptr [RBP + -0x118]
MOV R... | /* func0(std::vector<std::string, std::allocator<std::string > > const&, std::vector<std::string,
std::allocator<std::string > > const&) */
ulong func0(vector *param_1,vector *param_2)
{
bool bVar1;
__normal_iterator _Var2;
__normal_iterator _Var3;
iterator iVar4;
insert_iterator iVar5;
_Rb_tree_const_... |
2,029 | func0 |
#include <iostream>
#include <vector>
#include <set>
#include <algorithm>
#include <cassert>
| bool func0(const std::vector<std::string>& l1, const std::vector<std::string>& l2) {
std::set<std::string> common_elements;
std::set<std::string> set1(l1.begin(), l1.end());
std::set<std::string> set2(l2.begin(), l2.end());
std::set_intersection(set1.begin(), set1.end(), set2.begin(), set2.end... | int main() {
assert(func0({"red","green","black","orange"}, {"red","pink","green","white","black"}) == true);
assert(func0({"red","pink","green","white","black"}, {"white","orange","pink","black"}) == false);
assert(func0({"red","green","black","orange"}, {"red","pink","green","white","black"}) == true);... | O1 | cpp | func0(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::_... | _Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EES9_:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 0E8h
mov rbp, rdi
mov r12, rsi
mov rax, fs:28h
mov [rsp+118h+var_40], rax
xor eax, eax
mov [rsp+118h+var_D0], 0
mov ... | long long func0(_QWORD *a1, _QWORD *a2)
{
_QWORD *v2; // r13
_QWORD *v3; // rbx
_QWORD *v4; // r13
_QWORD *v5; // rax
_QWORD *j; // rbx
_QWORD *v7; // r14
_QWORD *v8; // rbx
_QWORD *v9; // r13
_QWORD *v10; // rbx
char *v11; // rbp
char *v12; // rbp
void **v13; // rbp
void **v14; // r12
char... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0xe8
MOV RBP,RDI
MOV R12,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0xd8],RAX
XOR EAX,EAX
MOV dword ptr [RSP + 0x48],0x0
MOV qword ptr [RSP + 0x50],0x0
LEA RAX,[RSP + 0x48]
MOV qword ptr [RSP + 0x58],RAX
MOV qword ptr [RSP + 0x60],RA... | /* func0(std::vector<std::string, std::allocator<std::string > > const&, std::vector<std::string,
std::allocator<std::string > > const&) */
int8 func0(vector *param_1,vector *param_2)
{
_Alloc_node *p_Var1;
string *psVar2;
size_t __n;
int iVar3;
int4 *puVar4;
_Alloc_node *p_Var5;
string *psVar6;
lo... |
2,030 | func0 |
#include <iostream>
#include <vector>
#include <set>
#include <algorithm>
#include <cassert>
| bool func0(const std::vector<std::string>& l1, const std::vector<std::string>& l2) {
std::set<std::string> common_elements;
std::set<std::string> set1(l1.begin(), l1.end());
std::set<std::string> set2(l2.begin(), l2.end());
std::set_intersection(set1.begin(), set1.end(), set2.begin(), set2.end... | int main() {
assert(func0({"red","green","black","orange"}, {"red","pink","green","white","black"}) == true);
assert(func0({"red","pink","green","white","black"}, {"white","orange","pink","black"}) == false);
assert(func0({"red","green","black","orange"}, {"red","pink","green","white","black"}) == true);... | O2 | cpp | func0(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::_... | _Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EES9_:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 128h
mov r12, [rdi+8]
mov rbx, [rdi]
mov [rsp+158h+var_120], rdi
lea r13, [rsp+158h+var_A0]
lea rbp, [rsp+158h+var_A8]
mov... | long long func0(_QWORD *a1, _QWORD *a2)
{
_QWORD *v2; // r12
_QWORD *v3; // rbx
long long insert_hint_unique_pos; // rax
long long v5; // rdx
_QWORD *v6; // r14
_QWORD *v7; // rbx
int *v8; // rsi
long long v9; // rax
long long v10; // rdx
long long v11; // r8
long long v12; // rbx
long long v13... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x128
MOV R12,qword ptr [RDI + 0x8]
MOV RBX,qword ptr [RDI]
MOV qword ptr [RSP + 0x38],RDI
LEA R13,[RSP + 0xb8]
LEA RBP,[RSP + 0xb0]
MOV qword ptr [RSP + 0x28],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x118],RAX
XOR EAX,EAX
LEA RAX... | /* func0(std::vector<std::string, std::allocator<std::string > > const&, std::vector<std::string,
std::allocator<std::string > > const&) */
int8 func0(vector *param_1,vector *param_2)
{
string *psVar1;
ulong uVar2;
ulong uVar3;
void *__s1;
void *__s2;
int8 uVar4;
size_t __n;
long *plVar5;
long *p... |
2,031 | func0 |
#include <iostream>
#include <vector>
#include <set>
#include <algorithm>
#include <cassert>
| bool func0(const std::vector<std::string>& l1, const std::vector<std::string>& l2) {
std::set<std::string> common_elements;
std::set<std::string> set1(l1.begin(), l1.end());
std::set<std::string> set2(l2.begin(), l2.end());
std::set_intersection(set1.begin(), set1.end(), set2.begin(), set2.end... | int main() {
assert(func0({"red","green","black","orange"}, {"red","pink","green","white","black"}) == true);
assert(func0({"red","pink","green","white","black"}, {"white","orange","pink","black"}) == false);
assert(func0({"red","green","black","orange"}, {"red","pink","green","white","black"}) == true);... | O3 | cpp | func0(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::_... | _Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EES9_:
endbr64
push r15
push r14
push r13
push r12
xor r12d, r12d
push rbp
push rbx
sub rsp, 148h
mov r15, [rdi+8]
mov rbx, [rdi]
mov [rsp+178h+var_140], rdi
mov [rsp+178h+var_148], rsi
mov rax, f... | long long func0(const void ***a1, unsigned long long *a2)
{
long long v2; // r12
const void **v3; // r15
const void **v4; // rbx
int *v5; // rbp
size_t v6; // r14
size_t v7; // rcx
size_t v8; // rdx
signed long long v9; // rax
long long insert_unique_pos; // rax
int *v11; // rdx
unsigned int v12;... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
XOR R12D,R12D
PUSH RBP
PUSH RBX
SUB RSP,0x148
MOV R15,qword ptr [RDI + 0x8]
MOV RBX,qword ptr [RDI]
MOV qword ptr [RSP + 0x38],RDI
MOV qword ptr [RSP + 0x30],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x138],RAX
XOR EAX,EAX
LEA RAX,[RSP + 0xa8]
MOV dword ptr ... | /* func0(std::vector<std::string, std::allocator<std::string > > const&, std::vector<std::string,
std::allocator<std::string > > const&) */
int8 func0(vector *param_1,vector *param_2)
{
_Rb_tree_node_base *p_Var1;
string *psVar2;
void *pvVar3;
void *__s2;
int *puVar4;
_Rb_tree_node_base *__src;
size_... |
2,032 | func0 |
#include <string>
#include <assert.h>
| std::string func0(int n) {
if (n % 2 == 0) {
return "Invalid Input";
}
int sm = 0;
int count = 0;
while (n >= 1) {
count++;
sm += n;
n -= 2;
}
return std::to_string(sm / count);
}
| int main() {
assert(func0(9) == "5");
assert(func0(5) == "3");
assert(func0(11) == "6");
return 0;
}
| O0 | cpp | func0[abi:cxx11](int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x38,%rsp
mov %rdi,-0x38(%rbp)
mov %esi,-0x3c(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x3c(%rbp),%eax
and $0x1,%eax
test %eax,%eax
jne 2447 <_Z5func0B5cxx11i+0x5e>
lea -0x21(%rbp),%rax
mo... | _Z5func0B5cxx11i:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 38h
mov [rbp+var_38], rdi
mov [rbp+var_3C], esi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov eax, [rbp+var_3C]
and eax, 1
test eax, eax
jnz short loc_1408
lea rax, [rbp+var_29]
mov [rbp+v... | std::__cxx11 * func0[abi:cxx11](std::__cxx11 *a1, int a2)
{
int v3; // [rsp+4h] [rbp-3Ch]
char v4; // [rsp+17h] [rbp-29h] BYREF
int v5; // [rsp+18h] [rbp-28h]
int v6; // [rsp+1Ch] [rbp-24h]
char *v7; // [rsp+20h] [rbp-20h]
unsigned long long v8; // [rsp+28h] [rbp-18h]
v3 = a2;
v8 = __readfsqword(0x28u)... | func0[abi:cxx11]:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x38
MOV qword ptr [RBP + -0x38],RDI
MOV dword ptr [RBP + -0x3c],ESI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV EAX,dword ptr [RBP + -0x3c]
AND EAX,0x1
TEST EAX,EAX
JNZ 0x00101408
LEA RAX,[RBP + -0x29]
MOV qword ptr [RBP + ... | /* func0[abi:cxx11](int) */
string * func0_abi_cxx11_(int param_1)
{
uint in_ESI;
int4 in_register_0000003c;
long in_FS_OFFSET;
uint local_44;
allocator local_31;
int local_30;
int local_2c;
allocator *local_28;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
if ((in_ESI & 1) == 0) ... |
2,033 | func0 |
#include <string>
#include <assert.h>
| std::string func0(int n) {
if (n % 2 == 0) {
return "Invalid Input";
}
int sm = 0;
int count = 0;
while (n >= 1) {
count++;
sm += n;
n -= 2;
}
return std::to_string(sm / count);
}
| int main() {
assert(func0(9) == "5");
assert(func0(5) == "3");
assert(func0(11) == "6");
return 0;
}
| O1 | cpp | func0[abi:cxx11](int):
endbr64
push %rbx
sub $0x10,%rsp
mov %rdi,%rbx
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
test $0x1,%sil
je 1274 <_Z5func0B5cxx11i+0x8b>
mov %esi,%edx
test %esi,%esi
jle 12a2 <_Z5func0B5cxx11i+0xb9>
lea -0x1(%rsi),%ecx
sub $0x2,%edx
mov %ecx,%eax
an... | _Z5func0B5cxx11i:
endbr64
push r13
push r12
push rbp
push rbx
sub rsp, 0E8h
mov r12, rdi
mov rax, fs:28h
mov [rsp+108h+var_30], rax
xor eax, eax
test sil, 1
jz loc_12C7
mov ecx, 0
test esi, esi
jle short loc_1243
lea ecx, [rsi-1]
lea edx, [rsi-2]
mov eax, e... | long long func0[abi:cxx11](long long a1, int a2)
{
int v2; // eax
int v3; // ecx
unsigned int v4; // ecx
unsigned int v5; // edx
int v6; // eax
unsigned int v7; // r13d
unsigned int v8; // ebp
unsigned int v9; // eax
unsigned int v10; // ebx
unsigned int v11; // edx
char *v12; // r13
int v13; /... | func0[abi:cxx11]:
ENDBR64
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0xe8
MOV R12,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0xd8],RAX
XOR EAX,EAX
TEST SIL,0x1
JZ 0x001012c7
MOV ECX,0x0
TEST ESI,ESI
JLE 0x00101243
LEA ECX,[RSI + -0x1]
LEA EDX,[RSI + -0x2]
MOV EAX,ECX
AND EAX,0xfffffffe
SUB EDX,EAX
MOV EAX,0x... | /* func0[abi:cxx11](int) */
long * func0_abi_cxx11_(int param_1)
{
int iVar1;
uint uVar2;
uint uVar3;
int iVar4;
uint uVar5;
ulong uVar6;
char cVar7;
ulong uVar8;
uint in_ESI;
int4 in_register_0000003c;
long *plVar9;
uint uVar10;
char *pcVar11;
long in_FS_OFFSET;
char local_108 [216];
... |
2,034 | func0 |
#include <string>
#include <assert.h>
| std::string func0(int n) {
if (n % 2 == 0) {
return "Invalid Input";
}
int sm = 0;
int count = 0;
while (n >= 1) {
count++;
sm += n;
n -= 2;
}
return std::to_string(sm / count);
}
| int main() {
assert(func0(9) == "5");
assert(func0(5) == "3");
assert(func0(11) == "6");
return 0;
}
| O2 | cpp | func0[abi:cxx11](int):
endbr64
push %r12
mov %rdi,%r12
sub $0x10,%rsp
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
test $0x1,%sil
je 13c0 <_Z5func0B5cxx11i+0x90>
test %esi,%esi
jle 1100 <_Z5func0B5cxx11i.cold>
lea -0x1(%rsi),%edi
lea -0x2(%rsi),%ecx
mov %edi,%eax
mov %ecx,%... | _Z5func0B5cxx11i:
endbr64
push r14
push r13
mov r13, rdi
push r12
push rbp
push rbx
sub rsp, 0E0h
mov rax, fs:28h
mov [rsp+108h+var_30], rax
xor eax, eax
test sil, 1
jz loc_1690
test esi, esi
jle loc_172A
lea edi, [rsi-1]
lea edx, [rsi-2]
mov eax, edi
mov ... | long long func0[abi:cxx11](long long a1, int a2)
{
unsigned int v3; // edi
int v4; // edx
unsigned int v5; // ecx
int v6; // eax
int v7; // eax
unsigned int v8; // r14d
unsigned int v9; // ebp
unsigned int v10; // ebx
int v11; // esi
unsigned int v12; // r12d
__int8 *v13; // r14
unsigned int v1... | func0[abi:cxx11]:
ENDBR64
PUSH R14
PUSH R13
MOV R13,RDI
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0xe0
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0xd8],RAX
XOR EAX,EAX
TEST SIL,0x1
JZ 0x00101690
TEST ESI,ESI
JLE 0x0010172a
LEA EDI,[RSI + -0x1]
LEA EDX,[RSI + -0x2]
MOV EAX,EDI
MOV ECX,EDX
AND EAX,0xfffffffe
SUB ECX,EAX
X... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0[abi:cxx11](int) */
long * func0_abi_cxx11_(int param_1)
{
long lVar1;
byte bVar2;
int iVar3;
uint uVar4;
long *plVar5;
uint uVar6;
uint uVar7;
char cVar8;
ulong uVar9;
uint in_ESI;
int4 in_register_0000... |
2,035 | func0 |
#include <string>
#include <assert.h>
| std::string func0(int n) {
if (n % 2 == 0) {
return "Invalid Input";
}
int sm = 0;
int count = 0;
while (n >= 1) {
count++;
sm += n;
n -= 2;
}
return std::to_string(sm / count);
}
| int main() {
assert(func0(9) == "5");
assert(func0(5) == "3");
assert(func0(11) == "6");
return 0;
}
| O3 | cpp | func0[abi:cxx11](int):
endbr64
push %r12
mov %rdi,%r12
sub $0x10,%rsp
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
test $0x1,%sil
je 15d0 <_Z5func0B5cxx11i+0x100>
test %esi,%esi
jle 10e0 <_Z5func0B5cxx11i.cold>
lea -0x1(%rsi),%eax
mov %eax,%ecx
shr %ecx
add $0x1,%ecx
cmp ... | _Z5func0B5cxx11i:
endbr64
push r14
mov r14, rdi
push r13
push r12
push rbp
push rbx
sub rsp, 0E0h
mov rax, fs:28h
mov [rsp+108h+var_30], rax
xor eax, eax
test sil, 1
jz loc_1740
mov edx, esi
test esi, esi
jle loc_17E2
lea eax, [rsi-1]
mov ecx, eax
shr ec... | long long func0[abi:cxx11](long long a1, long long a2)
{
int v2; // edx
unsigned int v3; // ecx
__m128i si128; // xmm3
int v5; // eax
__m128i v6; // xmm0
__m128i v7; // xmm1
__m128i v8; // xmm2
__m128i v9; // xmm1
int v10; // eax
int v11; // edx
int v12; // eax
unsigned int v13; // r13d
unsig... | func0[abi:cxx11]:
ENDBR64
PUSH R14
MOV R14,RDI
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0xe0
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0xd8],RAX
XOR EAX,EAX
TEST SIL,0x1
JZ 0x00101740
MOV EDX,ESI
TEST ESI,ESI
JLE 0x001017e2
LEA EAX,[RSI + -0x1]
MOV ECX,EAX
SHR ECX,0x1
ADD ECX,0x1
CMP EAX,0x13
JBE 0x00101788
M... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0[abi:cxx11](int) */
long * func0_abi_cxx11_(int param_1)
{
uint uVar1;
long lVar2;
uint uVar3;
int iVar4;
uint uVar5;
long *plVar6;
uint uVar7;
char cVar8;
ulong uVar9;
uint in_ESI;
int4 in_register_0000... |
2,036 | func0 | #include <iostream>
#include <vector>
#include <assert.h>
| int func0(const std::vector<int>& arr, int k) {
int n = arr.size();
std::vector<std::vector<int>> dp(k + 1, std::vector<int>(n + 1, 0));
for(int i = 1; i <= k; i++) {
for(int j = 1; j <= n; j++) {
dp[i][j] = dp[i][j - 1];
if(arr[j - 1] <= i && arr[j - 1] > 0) {
... | int main() {
assert(func0({1,2,3,4}, 10) == 11);
assert(func0({4,8,7,2}, 50) == 9);
assert(func0({5,6,7,8}, 15) == 4);
std::cout << "All test cases passed.\n";
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> > const&, int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x78,%rsp
mov %rdi,-0x78(%rbp)
mov %esi,-0x7c(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x78(%rbp),%rax
mov %rax,%rdi
callq 191c <_ZNKSt6vectorIiSaIiEE4sizeEv>
... | _Z5func0RKSt6vectorIiSaIiEEi:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 88h
mov [rbp+var_88], rdi
mov [rbp+var_8C], esi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_88]
mov rdi, rax
call _ZNKSt6vectorIiSaIiEE4sizeEv; std::vector<int>::size(void)... | long long func0(long long a1, int a2)
{
long long v2; // rax
int v3; // ebx
long long v4; // rax
int *v5; // rax
_DWORD *v7; // rax
long long v8; // rax
int v9; // ebx
long long v10; // rax
_DWORD *v11; // rax
long long v12; // rax
unsigned int v13; // ebx
char v15; // [rsp+1Eh] [rbp-72h] BYREF... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x88
MOV qword ptr [RBP + -0x88],RDI
MOV dword ptr [RBP + -0x8c],ESI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x88]
MOV RDI,RAX
CALL 0x0010193a
MOV dword ptr [RBP + -0x64],EAX
LEA RAX,[RBP + -0x71]
MOV qword pt... | /* func0(std::vector<int, std::allocator<int> > const&, int) */
int4 func0(vector *param_1,int param_2)
{
int iVar1;
int4 uVar2;
bool bVar3;
int *piVar4;
vector<int,std::allocator<int>> *pvVar5;
int4 *puVar6;
long in_FS_OFFSET;
allocator local_7a;
allocator local_79;
int local_78;
int local_74;
... |
2,037 | func0 | #include <iostream>
#include <vector>
#include <assert.h>
| int func0(const std::vector<int>& arr, int k) {
int n = arr.size();
std::vector<std::vector<int>> dp(k + 1, std::vector<int>(n + 1, 0));
for(int i = 1; i <= k; i++) {
for(int j = 1; j <= n; j++) {
dp[i][j] = dp[i][j - 1];
if(arr[j - 1] <= i && arr[j - 1] > 0) {
... | int main() {
assert(func0({1,2,3,4}, 10) == 11);
assert(func0({4,8,7,2}, 50) == 9);
assert(func0({5,6,7,8}, 15) == 4);
std::cout << "All test cases passed.\n";
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> > const&, int):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x38,%rsp
mov %esi,0x28(%rsp)
mov 0x8(%rdi),%rax
sub (%rdi),%rax
sar $0x2,%rax
mov %rax,0x20(%rsp)
mov %eax,0x2c(%rsp)
lea 0x1(%rax),%ebx
movslq %ebx,%r... | _Z5func0RKSt6vectorIiSaIiEEi:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 48h
mov [rsp+78h+var_6C], esi
mov rax, fs:28h
mov [rsp+78h+var_40], rax
xor eax, eax
mov r13, [rdi+8]
sub r13, [rdi]
sar r13, 2
lea r15d, [r13+1]
movsxd r15, r15d
m... | long long func0(_QWORD *a1, int a2)
{
long long v2; // r13
unsigned long long v3; // r15
_DWORD *v5; // rax
_DWORD *v6; // rdx
unsigned long long v7; // r12
_QWORD *v8; // rbp
long long v9; // r12
_QWORD *v10; // r8
int v11; // r9d
int v12; // esi
long long v13; // rdi
long long v14; // rcx
i... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x48
MOV dword ptr [RSP + 0xc],ESI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
MOV R13,qword ptr [RDI + 0x8]
SUB R13,qword ptr [RDI]
SAR R13,0x2
LEA R15D,[R13 + 0x1]
MOVSXD R15,R15D
MOV RAX,R15
SHR RAX,0x3d
JNZ 0x001... | /* func0(std::vector<int, std::allocator<int> > const&, int) */
int4 func0(vector *param_1,int param_2)
{
int iVar1;
int4 uVar2;
void *pvVar3;
int iVar4;
int4 *puVar5;
vector *pvVar6;
int8 uVar7;
vector *pvVar8;
long lVar9;
long lVar10;
vector *pvVar11;
int iVar12;
ulong uVar13;
ulong uVar... |
2,038 | func0 | #include <iostream>
#include <vector>
#include <assert.h>
| int func0(const std::vector<int>& arr, int k) {
int n = arr.size();
std::vector<std::vector<int>> dp(k + 1, std::vector<int>(n + 1, 0));
for(int i = 1; i <= k; i++) {
for(int j = 1; j <= n; j++) {
dp[i][j] = dp[i][j - 1];
if(arr[j - 1] <= i && arr[j - 1] > 0) {
... | int main() {
assert(func0({1,2,3,4}, 10) == 11);
assert(func0({4,8,7,2}, 50) == 9);
assert(func0({5,6,7,8}, 15) == 4);
std::cout << "All test cases passed.\n";
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> > const&, int):
endbr64
movabs $0x1fffffffffffffff,%rdx
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x38,%rsp
mov 0x8(%rdi),%rax
sub (%rdi),%rax
sar $0x2,%rax
mov %rdi,0x28(%rsp)
mov %rax,0x18(%rsp)
mov %eax,0x24(%rsp)
add ... | _Z5func0RKSt6vectorIiSaIiEEi:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 48h
mov r13, [rdi+8]
sub r13, [rdi]
mov rax, fs:28h
mov [rsp+78h+var_40], rax
xor eax, eax
sar r13, 2
lea r14d, [r13+1]
mov [rsp+78h+var_74], r13d
movsxd r14, r14d
... | long long func0(long long *a1, int a2)
{
long long v2; // r13
unsigned long long v3; // r14
unsigned long long v5; // r12
_QWORD *v6; // rbx
long long v7; // r12
long long *v8; // r11
int v9; // r9d
long long v10; // r14
long long v11; // rdi
long long v12; // rcx
int v13; // r8d
int v14; // es... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x48
MOV R13,qword ptr [RDI + 0x8]
SUB R13,qword ptr [RDI]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
SAR R13,0x2
LEA R14D,[R13 + 0x1]
MOV dword ptr [RSP + 0x4],R13D
MOVSXD R14,R14D
MOV RAX,R14
SHR RAX,0x3d
JNZ 0x00... | /* func0(std::vector<int, std::allocator<int> > const&, int) */
int4 func0(vector *param_1,int param_2)
{
ulong uVar1;
int iVar2;
int4 uVar3;
long lVar4;
long lVar5;
int iVar6;
vector *pvVar7;
vector *pvVar8;
long lVar9;
void *pvVar10;
int iVar11;
vector *pvVar12;
ulong uVar13;
ulong uVar1... |
2,039 | func0 | #include <iostream>
#include <vector>
#include <assert.h>
| int func0(const std::vector<int>& arr, int k) {
int n = arr.size();
std::vector<std::vector<int>> dp(k + 1, std::vector<int>(n + 1, 0));
for(int i = 1; i <= k; i++) {
for(int j = 1; j <= n; j++) {
dp[i][j] = dp[i][j - 1];
if(arr[j - 1] <= i && arr[j - 1] > 0) {
... | int main() {
assert(func0({1,2,3,4}, 10) == 11);
assert(func0({4,8,7,2}, 50) == 9);
assert(func0({5,6,7,8}, 15) == 4);
std::cout << "All test cases passed.\n";
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> > const&, int):
endbr64
movabs $0x1fffffffffffffff,%rdx
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x28,%rsp
mov 0x8(%rdi),%rax
sub (%rdi),%rax
sar $0x2,%rax
mov %rdi,0x18(%rsp)
mov %rax,0x10(%rsp)
add $0x1,%eax
cltq
mov ... | _Z5func0RKSt6vectorIiSaIiEEi:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 48h
mov r13, [rdi+8]
sub r13, [rdi]
mov rax, fs:28h
mov [rsp+78h+var_40], rax
xor eax, eax
sar r13, 2
lea r14d, [r13+1]
movsxd r14, r14d
mov rax, r14
shr rax, 3... | long long func0(long long *a1, int a2)
{
long long v2; // r13
unsigned long long v3; // r14
unsigned long long v5; // r12
_QWORD *v6; // rbx
long long v7; // r12
long long v8; // r14
long long *v9; // r11
int i; // r9d
long long v11; // rdi
long long v12; // rcx
int v13; // r8d
int v14; // esi
... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x48
MOV R13,qword ptr [RDI + 0x8]
SUB R13,qword ptr [RDI]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
SAR R13,0x2
LEA R14D,[R13 + 0x1]
MOVSXD R14,R14D
MOV RAX,R14
SHR RAX,0x3d
JNZ 0x00101755
PXOR XMM0,XMM0
MOV R15,R... | /* func0(std::vector<int, std::allocator<int> > const&, int) */
int4 func0(vector *param_1,int param_2)
{
ulong uVar1;
int iVar2;
int4 uVar3;
long lVar4;
long lVar5;
int iVar6;
vector *pvVar7;
vector *pvVar8;
long lVar9;
void *pvVar10;
int iVar11;
vector *pvVar12;
ulong uVar13;
ulong uVar1... |
2,040 | func0 |
#include <assert.h>
| int func0(int num) {
int sum = 0;
int i = 2;
while (i * i <= num) {
while (num % i == 0) {
sum += i;
num /= i;
}
i += 1;
}
sum += num;
return sum;
}
| int main() {
assert(func0(12) == 7);
assert(func0(105) == 15);
assert(func0(2) == 2);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
movl $0x0,-0x8(%rbp)
movl $0x2,-0x4(%rbp)
mov -0x4(%rbp),%eax
imul %eax,%eax
cmp %eax,-0x14(%rbp)
jl 1192 <_Z5func0i+0x49>
mov -0x14(%rbp),%eax
cltd
idivl -0x4(%rbp)
mov %edx,%eax
test %eax,%eax
jne 118c <_Z5func0i+0x43... | _Z5func0i:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_14], edi
mov [rbp+var_8], 0
mov [rbp+var_4], 2
jmp short loc_1185
loc_1164:
mov eax, [rbp+var_4]
add [rbp+var_8], eax
mov eax, [rbp+var_14]
cdq
idiv [rbp+var_4]
mov [rbp+var_14], eax
loc_1174:
mov eax, [rbp+var_14]
cdq
i... | long long func0(int a1)
{
int v3; // [rsp+Ch] [rbp-8h]
int i; // [rsp+10h] [rbp-4h]
v3 = 0;
for ( i = 2; a1 >= i * i; ++i )
{
while ( !(a1 % i) )
{
v3 += i;
a1 /= i;
}
}
return (unsigned int)(a1 + v3);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x14],EDI
MOV dword ptr [RBP + -0x8],0x0
MOV dword ptr [RBP + -0x4],0x2
JMP 0x00101185
LAB_00101164:
MOV EAX,dword ptr [RBP + -0x4]
ADD dword ptr [RBP + -0x8],EAX
MOV EAX,dword ptr [RBP + -0x14]
CDQ
IDIV dword ptr [RBP + -0x4]
MOV dword ptr [RBP + -0x14],EAX
LAB... | /* func0(int) */
int func0(int param_1)
{
int4 local_1c;
int4 local_10;
int4 local_c;
local_10 = 0;
local_1c = param_1;
for (local_c = 2; local_c * local_c <= local_1c; local_c = local_c + 1) {
for (; local_1c % local_c == 0; local_1c = local_1c / local_c) {
local_10 = local_10 + local_c;
... |
2,041 | func0 |
#include <assert.h>
| int func0(int num) {
int sum = 0;
int i = 2;
while (i * i <= num) {
while (num % i == 0) {
sum += i;
num /= i;
}
i += 1;
}
sum += num;
return sum;
}
| int main() {
assert(func0(12) == 7);
assert(func0(105) == 15);
assert(func0(2) == 2);
return 0;
}
| O1 | cpp | func0(int):
endbr64
cmp $0x3,%edi
jle 1185 <_Z5func0i+0x3c>
mov $0x2,%ecx
mov $0x0,%esi
jmp 116a <_Z5func0i+0x21>
add $0x1,%ecx
mov %ecx,%eax
imul %ecx,%eax
cmp %edi,%eax
jg 118a <_Z5func0i+0x41>
mov %edi,%eax
cltd
idiv %ecx
test %edx,%edx
jne 115e <_Z5func0i+0x15>
add %ecx,%e... | _Z5func0i:
endbr64
mov ecx, 2
mov esi, 0
cmp edi, 3
jg short loc_117C
loc_115C:
lea eax, [rdi+rsi]
retn
loc_1160:
add esi, ecx
mov eax, edi
cdq
idiv ecx
mov edi, eax
cdq
idiv ecx
test edx, edx
jz short loc_1160
loc_1170:
add ecx, 1
mov eax, ecx
imul eax, ecx
cmp... | long long func0(int a1)
{
int v1; // ecx
int v2; // esi
v1 = 2;
v2 = 0;
if ( a1 > 3 )
{
do
{
for ( ; !(a1 % v1); a1 /= v1 )
v2 += v1;
++v1;
}
while ( v1 * v1 <= a1 );
}
return (unsigned int)(a1 + v2);
} | func0:
ENDBR64
MOV ECX,0x2
MOV ESI,0x0
CMP EDI,0x3
JG 0x0010117c
LAB_0010115c:
LEA EAX,[RDI + RSI*0x1]
RET
LAB_00101160:
ADD ESI,ECX
MOV EAX,EDI
CDQ
IDIV ECX
MOV EDI,EAX
CDQ
IDIV ECX
TEST EDX,EDX
JZ 0x00101160
LAB_00101170:
ADD ECX,0x1
MOV EAX,ECX
IMUL EAX,ECX
CMP EAX,EDI
JG 0x0010115c
LAB_0010117c:
MOV EAX,EDI
CDQ
IDI... | /* func0(int) */
int func0(int param_1)
{
long lVar1;
int iVar2;
int iVar3;
int iVar4;
iVar2 = 2;
iVar4 = 0;
if (3 < param_1) {
do {
iVar3 = param_1 % iVar2;
while (iVar3 == 0) {
iVar4 = iVar4 + iVar2;
lVar1 = (long)param_1;
param_1 = (int)(lVar1 / (long)iVar2)... |
2,042 | func0 |
#include <assert.h>
| int func0(int num) {
int sum = 0;
int i = 2;
while (i * i <= num) {
while (num % i == 0) {
sum += i;
num /= i;
}
i += 1;
}
sum += num;
return sum;
}
| int main() {
assert(func0(12) == 7);
assert(func0(105) == 15);
assert(func0(2) == 2);
return 0;
}
| O2 | cpp | func0(int):
endbr64
cmp $0x3,%edi
jle 1210 <_Z5func0i+0x40>
mov $0x2,%ecx
xor %esi,%esi
mov %edi,%eax
cltd
idiv %ecx
test %edx,%edx
jne 1200 <_Z5func0i+0x30>
nopl 0x0(%rax)
mov %edi,%eax
add %ecx,%esi
cltd
idiv %ecx
cltd
mov %eax,%edi
idiv %ecx
test %edx,%edx
je 11f0 <_Z5func0... | _Z5func0i:
endbr64
mov ecx, 2
xor esi, esi
cmp edi, 3
jle short loc_1230
loc_1200:
mov eax, edi
cdq
idiv ecx
test edx, edx
jnz short loc_1220
nop dword ptr [rax+00000000h]
loc_1210:
mov eax, edi
add esi, ecx
cdq
idiv ecx
cdq
mov edi, eax
idiv ecx
test edx, edx
jz ... | long long func0(int a1)
{
int v1; // ecx
int v2; // esi
int v3; // edx
v1 = 2;
v2 = 0;
if ( a1 <= 3 )
return (unsigned int)a1;
do
{
if ( !(a1 % v1) )
{
do
{
v2 += v1;
v3 = (a1 / v1) >> 31;
a1 /= v1;
}
while ( !(unsigned int)(__SPAIR64__(v3, a... | func0:
ENDBR64
MOV ECX,0x2
XOR ESI,ESI
CMP EDI,0x3
JLE 0x00101230
LAB_00101200:
MOV EAX,EDI
CDQ
IDIV ECX
TEST EDX,EDX
JNZ 0x00101220
NOP dword ptr [RAX]
LAB_00101210:
MOV EAX,EDI
ADD ESI,ECX
CDQ
IDIV ECX
CDQ
MOV EDI,EAX
IDIV ECX
TEST EDX,EDX
JZ 0x00101210
LAB_00101220:
ADD ECX,0x1
MOV EAX,ECX
IMUL EAX,ECX
CMP EAX,EDI
J... | /* func0(int) */
int func0(int param_1)
{
long lVar1;
int iVar2;
int iVar3;
int iVar4;
iVar2 = 2;
iVar4 = 0;
if (param_1 < 4) {
return param_1;
}
do {
iVar3 = param_1 % iVar2;
while (iVar3 == 0) {
iVar4 = iVar4 + iVar2;
lVar1 = (long)param_1;
param_1 = (int)(lVar1 / ... |
2,043 | func0 |
#include <assert.h>
| int func0(int num) {
int sum = 0;
int i = 2;
while (i * i <= num) {
while (num % i == 0) {
sum += i;
num /= i;
}
i += 1;
}
sum += num;
return sum;
}
| int main() {
assert(func0(12) == 7);
assert(func0(105) == 15);
assert(func0(2) == 2);
return 0;
}
| O3 | cpp | func0(int):
endbr64
cmp $0x3,%edi
jle 1200 <_Z5func0i+0x40>
mov $0x2,%ecx
xor %esi,%esi
mov %edi,%eax
cltd
idiv %ecx
test %edx,%edx
jne 11f0 <_Z5func0i+0x30>
nopl 0x0(%rax)
mov %edi,%eax
add %ecx,%esi
cltd
idiv %ecx
cltd
mov %eax,%edi
idiv %ecx
test %edx,%edx
je 11e0 <_Z5func0... | _Z5func0i:
endbr64
mov ecx, 2
xor esi, esi
cmp edi, 3
jle short loc_1200
loc_11D0:
mov eax, edi
cdq
idiv ecx
test edx, edx
jnz short loc_11F0
nop dword ptr [rax+00000000h]
loc_11E0:
mov eax, edi
add esi, ecx
cdq
idiv ecx
cdq
mov edi, eax
idiv ecx
test edx, edx
jz ... | long long func0(int a1)
{
int v1; // ecx
int v2; // esi
int v3; // edx
v1 = 2;
v2 = 0;
if ( a1 <= 3 )
return (unsigned int)a1;
do
{
if ( !(a1 % v1) )
{
do
{
v2 += v1;
v3 = (a1 / v1) >> 31;
a1 /= v1;
}
while ( !(unsigned int)(__SPAIR64__(v3, a... | func0:
ENDBR64
MOV ECX,0x2
XOR ESI,ESI
CMP EDI,0x3
JLE 0x00101200
LAB_001011d0:
MOV EAX,EDI
CDQ
IDIV ECX
TEST EDX,EDX
JNZ 0x001011f0
NOP dword ptr [RAX]
LAB_001011e0:
MOV EAX,EDI
ADD ESI,ECX
CDQ
IDIV ECX
CDQ
MOV EDI,EAX
IDIV ECX
TEST EDX,EDX
JZ 0x001011e0
LAB_001011f0:
ADD ECX,0x1
MOV EAX,ECX
IMUL EAX,ECX
CMP EAX,EDI
J... | /* func0(int) */
int func0(int param_1)
{
long lVar1;
int iVar2;
int iVar3;
int iVar4;
iVar2 = 2;
iVar4 = 0;
if (param_1 < 4) {
return param_1;
}
do {
iVar3 = param_1 % iVar2;
while (iVar3 == 0) {
iVar4 = iVar4 + iVar2;
lVar1 = (long)param_1;
param_1 = (int)(lVar1 / ... |
2,044 | func0 |
#include <cassert>
#include <variant>
#include <vector>
#include <map>
using namespace std;
// Define NestedTuple as a variant of int or vector of NestedTuple
struct NestedTuple;
using NestedVector = vector<NestedTuple>;
struct NestedTuple : variant<int, NestedVector> {
using variant<int, NestedVecto... | map<int, int> func0(const NestedTuple& test_tuple) {
map<int, int> res;
vector<int> flat = flatten(test_tuple);
for (int ele : flat) {
res[ele]++;
}
return res;
}
| int main() {
// Test case 1
NestedTuple test1 = NestedVector{5, 6, NestedVector{5, 6}, 7, NestedVector{8, 9}, 9};
map<int, int> expected1 = { {5, 2}, {6, 2}, {7,1}, {8,1}, {9,2} };
assert(func0(test1) == expected1);
// Test case 2
NestedTuple test2 = NestedVector{6, 7, NestedVector{6, 7}... | O0 | cpp | func0(NestedTuple const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x58,%rsp
mov %rdi,-0x58(%rbp)
mov %rsi,-0x60(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x58(%rbp),%rax
mov %rax,%rdi
callq 2bd8 <_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEC1Ev>
lea -0x30(%rbp... | _Z5func0RK11NestedTuple:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 58h
mov [rbp+var_58], rdi
mov [rbp+var_60], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_58]
mov rdi, rax
call _ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEC2Ev; std::map<int,int>:... | const NestedTuple * func0(const NestedTuple *a1, long long a2)
{
_DWORD *v2; // rax
int v4; // [rsp+14h] [rbp-4Ch] BYREF
long long v5; // [rsp+18h] [rbp-48h] BYREF
_QWORD v6[2]; // [rsp+20h] [rbp-40h] BYREF
_BYTE v7[24]; // [rsp+30h] [rbp-30h] BYREF
unsigned long long v8; // [rsp+48h] [rbp-18h]
v8 = __re... | 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
MOV RAX,qword ptr [RBP + -0x58]
MOV RDI,RAX
CALL 0x00102b18
LEA RAX,[RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x60]
MOV RSI,RDX
... | /* func0(NestedTuple const&) */
NestedTuple * func0(NestedTuple *param_1)
{
bool bVar1;
int *piVar2;
long in_FS_OFFSET;
int local_54;
int8 local_50;
int8 local_48;
vector<int,std::allocator<int>> *local_40;
NestedTuple local_38 [24];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
s... |
2,045 | func0 |
#include <cassert>
#include <variant>
#include <vector>
#include <map>
using namespace std;
// Define NestedTuple as a variant of int or vector of NestedTuple
struct NestedTuple;
using NestedVector = vector<NestedTuple>;
struct NestedTuple : variant<int, NestedVector> {
using variant<int, NestedVecto... | map<int, int> func0(const NestedTuple& test_tuple) {
map<int, int> res;
vector<int> flat = flatten(test_tuple);
for (int ele : flat) {
res[ele]++;
}
return res;
}
| int main() {
// Test case 1
NestedTuple test1 = NestedVector{5, 6, NestedVector{5, 6}, 7, NestedVector{8, 9}, 9};
map<int, int> expected1 = { {5, 2}, {6, 2}, {7,1}, {8,1}, {9,2} };
assert(func0(test1) == expected1);
// Test case 2
NestedTuple test2 = NestedVector{6, 7, NestedVector{6, 7}... | O1 | cpp | func0(NestedTuple const&):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x38,%rsp
mov %rdi,%r12
mov %fs:0x28,%rax
mov %rax,0x28(%rsp)
xor %eax,%eax
movl $0x0,0x8(%rdi)
movq $0x0,0x10(%rdi)
lea 0x8(%rdi),%r14
mov %r14,0x18(%rdi)
mov %r14,0x20(%rdi)
movq... | _Z5func0RK11NestedTuple:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 38h
mov r13, rdi
mov rax, fs:28h
mov [rsp+68h+var_40], rax
xor eax, eax
mov dword ptr [rdi+8], 0
mov qword ptr [rdi+10h], 0
lea r14, [rdi+8]
mov [rdi+18h], r14
mov [r... | long long func0(long long a1)
{
_DWORD *v2; // r14
int *v3; // r15
int *v4; // r12
long long v5; // rax
_DWORD *v6; // rbx
long long insert_hint_unique_pos; // rax
_DWORD *v8; // rdx
bool v9; // di
int v10; // ebp
_DWORD *v12; // [rsp+0h] [rbp-68h]
_DWORD *v13; // [rsp+0h] [rbp-68h]
int *v14; /... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x38
MOV R13,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x28],RAX
XOR EAX,EAX
MOV dword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
LEA R14,[RDI + 0x8]
MOV qword ptr [RDI + 0x18],R14
MOV qword ptr [RDI + 0x20],R14
MOV qword pt... | /* func0(NestedTuple const&) */
NestedTuple * func0(NestedTuple *param_1)
{
_Rb_tree_node_base *p_Var1;
int iVar2;
bool bVar3;
_Rb_tree_node_base *p_Var4;
_Rb_tree_node_base *p_Var5;
_Rb_tree_node_base *p_Var6;
int *piVar7;
long in_FS_OFFSET;
int auVar8 [16];
int *local_58;
int *local_50;
long... |
2,046 | func0 |
#include <cassert>
#include <variant>
#include <vector>
#include <map>
using namespace std;
// Define NestedTuple as a variant of int or vector of NestedTuple
struct NestedTuple;
using NestedVector = vector<NestedTuple>;
struct NestedTuple : variant<int, NestedVector> {
using variant<int, NestedVecto... | map<int, int> func0(const NestedTuple& test_tuple) {
map<int, int> res;
vector<int> flat = flatten(test_tuple);
for (int ele : flat) {
res[ele]++;
}
return res;
}
| int main() {
// Test case 1
NestedTuple test1 = NestedVector{5, 6, NestedVector{5, 6}, 7, NestedVector{8, 9}, 9};
map<int, int> expected1 = { {5, 2}, {6, 2}, {7,1}, {8,1}, {9,2} };
assert(func0(test1) == expected1);
// Test case 2
NestedTuple test2 = NestedVector{6, 7, NestedVector{6, 7}... | O2 | cpp | func0(NestedTuple const&):
endbr64
push %r15
push %r14
push %r13
lea 0x8(%rdi),%r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x38,%rsp
mov %fs:0x28,%rax
mov %rax,0x28(%rsp)
xor %eax,%eax
movl $0x0,0x8(%rdi)
movq $0x0,0x10(%rdi)
mov %r13,0x18(%rdi)
mov %r13,0x20(%rdi)
movq... | _Z5func0RK11NestedTuple:
endbr64
push r15
push r14
push r13
lea r13, [rdi+8]
push r12
mov r12, rdi
push rbp
push rbx
sub rsp, 48h
mov rax, fs:28h
mov [rsp+78h+var_40], rax
xor eax, eax
mov dword ptr [rdi+8], 0
mov qword ptr [rdi+10h], 0
mov [rdi+18h], r13
mov [r... | long long func0(long long a1)
{
_DWORD *v1; // r13
signed int *i; // rbp
long long v4; // rax
signed int v5; // ebx
_DWORD *v6; // r14
long long v7; // rdx
long long v8; // rcx
_DWORD *v9; // rax
_DWORD *v10; // rsi
long long insert_hint_unique_pos; // rax
_DWORD *v12; // rdx
_BOOL8 v13; // rdi... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
LEA R13,[RDI + 0x8]
PUSH R12
MOV R12,RDI
PUSH RBP
PUSH RBX
SUB RSP,0x48
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
MOV dword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
MOV qword ptr [RDI + 0x18],R13
MOV qword ptr [RDI + 0x20],R13
MOV qword pt... | /* func0(NestedTuple const&) */
NestedTuple * func0(NestedTuple *param_1)
{
_Rb_tree_node_base *p_Var1;
uint uVar2;
_Rb_tree_node_base *p_Var3;
_Rb_tree_node_base *p_Var4;
uint *puVar5;
bool bVar6;
_Rb_tree_node_base *p_Var7;
long in_FS_OFFSET;
int auVar8 [16];
uint *local_58;
uint *local_50;
... |
2,047 | func0 |
#include <cassert>
#include <variant>
#include <vector>
#include <map>
using namespace std;
// Define NestedTuple as a variant of int or vector of NestedTuple
struct NestedTuple;
using NestedVector = vector<NestedTuple>;
struct NestedTuple : variant<int, NestedVector> {
using variant<int, NestedVecto... | map<int, int> func0(const NestedTuple& test_tuple) {
map<int, int> res;
vector<int> flat = flatten(test_tuple);
for (int ele : flat) {
res[ele]++;
}
return res;
}
| int main() {
// Test case 1
NestedTuple test1 = NestedVector{5, 6, NestedVector{5, 6}, 7, NestedVector{8, 9}, 9};
map<int, int> expected1 = { {5, 2}, {6, 2}, {7,1}, {8,1}, {9,2} };
assert(func0(test1) == expected1);
// Test case 2
NestedTuple test2 = NestedVector{6, 7, NestedVector{6, 7}... | O3 | cpp | func0(NestedTuple const&):
endbr64
push %r15
push %r14
push %r13
lea 0x8(%rdi),%r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x38,%rsp
mov %fs:0x28,%rax
mov %rax,0x28(%rsp)
xor %eax,%eax
movl $0x0,0x8(%rdi)
movq $0x0,0x10(%rdi)
mov %r13,0x18(%rdi)
mov %r13,0x20(%rdi)
movq... | _Z5func0RK11NestedTuple:
endbr64
push r15
push r14
lea r14, [rdi+8]
push r13
push r12
mov r12, rdi
push rbp
push rbx
sub rsp, 48h
mov rax, fs:28h
mov [rsp+78h+var_40], rax
xor eax, eax
mov dword ptr [rdi+8], 0
mov qword ptr [rdi+10h], 0
mov [rdi+18h], r14
mov [r... | long long func0(long long a1, long long a2)
{
long long v2; // r14
int *i; // r13
_QWORD *v5; // rbx
int v6; // ebp
_QWORD *v7; // rcx
_QWORD *v8; // rdx
_QWORD *v9; // rax
_DWORD *v10; // rax
long long v11; // rdx
_QWORD *v12; // r8
_QWORD *v13; // rcx
long long v14; // rax
int v15; // edx
... | func0:
ENDBR64
PUSH R15
PUSH R14
LEA R14,[RDI + 0x8]
PUSH R13
PUSH R12
MOV R12,RDI
PUSH RBP
PUSH RBX
SUB RSP,0x48
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
MOV dword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
MOV qword ptr [RDI + 0x18],R14
MOV qword ptr [RDI + 0x20],R14
MOV qword pt... | /* func0(NestedTuple const&) */
NestedTuple * func0(NestedTuple *param_1)
{
_Rb_tree_node_base *p_Var1;
int iVar2;
int iVar3;
long lVar4;
_Rb_tree_node_base *p_Var5;
_Rb_tree_node_base *p_Var6;
_Rb_tree_node_base *p_Var7;
_Rb_tree_node_base *p_Var8;
_Rb_tree_node_base *p_Var9;
_Rb_tree_node_base *... |
2,048 | func0 |
#include <vector>
#include <string>
#include <cassert>
| std::vector<std::string> func0(const std::vector<int>& test_tup, const std::string& K) {
std::vector<std::string> res;
for (const auto& ele : test_tup) {
res.push_back(std::to_string(ele));
res.push_back(K);
}
return res;
}
| int main() {
assert((func0({5, 6, 7, 4, 9}, "FDF") == std::vector<std::string>{"5", "FDF", "6", "FDF", "7", "FDF", "4", "FDF", "9", "FDF"}));
assert((func0({7, 8, 9, 10}, "PF") == std::vector<std::string>{"7", "PF", "8", "PF", "9", "PF", "10", "PF"}));
assert((func0({11, 14, 12, 1, 4}, "JH") == std::vect... | O0 | cpp | func0(std::vector<int, std::allocator<int> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x78,%rsp
mov %rdi,-0x68(%rbp)
mov %rsi,-0x70(%rbp)
mov %rdx,-0x78(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(... | _Z5func0RKSt6vectorIiSaIiEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 78h
mov [rbp+var_68], rdi
mov [rbp+var_70], rsi
mov [rbp+var_78], rdx
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_68]
mov ... | long long func0(long long a1, long long a2, long long a3)
{
long long v5; // [rsp+20h] [rbp-60h] BYREF
_QWORD v6[2]; // [rsp+28h] [rbp-58h] BYREF
int *v7; // [rsp+38h] [rbp-48h]
_BYTE v8[40]; // [rsp+40h] [rbp-40h] BYREF
unsigned long long v9; // [rsp+68h] [rbp-18h]
v9 = __readfsqword(0x28u);
std::vecto... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x78
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 + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x68]
MOV RDI,RAX
CALL 0x00103728
MOV RAX,qword ptr [RBP + -0x70]
MO... | /* func0(std::vector<int, std::allocator<int> > const&, std::string const&) */
vector * func0(vector *param_1,string *param_2)
{
bool bVar1;
string *in_RDX;
long in_FS_OFFSET;
int8 local_68;
int8 local_60;
vector<int,std::allocator<int>> *local_58;
int8 local_50;
string local_48 [40];
long local_20;... |
2,049 | func0 |
#include <vector>
#include <string>
#include <cassert>
| std::vector<std::string> func0(const std::vector<int>& test_tup, const std::string& K) {
std::vector<std::string> res;
for (const auto& ele : test_tup) {
res.push_back(std::to_string(ele));
res.push_back(K);
}
return res;
}
| int main() {
assert((func0({5, 6, 7, 4, 9}, "FDF") == std::vector<std::string>{"5", "FDF", "6", "FDF", "7", "FDF", "4", "FDF", "9", "FDF"}));
assert((func0({7, 8, 9, 10}, "PF") == std::vector<std::string>{"7", "PF", "8", "PF", "9", "PF", "10", "PF"}));
assert((func0({11, 14, 12, 1, 4}, "JH") == std::vect... | O1 | cpp | func0(std::vector<int, std::allocator<int> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x30,%rsp
mov %rdi,%rbx
mov %fs:0x28,%rax
mov %rax,0x28(%rsp)
xor %eax,%eax
movq $0x0,(%... | _Z5func0RKSt6vectorIiSaIiEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 118h
mov r13, rdi
mov r15, rdx
mov rax, fs:28h
mov [rsp+148h+var_40], rax
xor eax, eax
mov qword ptr [rdi], 0
mov qw... | _QWORD * func0(_QWORD *a1, unsigned int **a2, _QWORD *a3)
{
unsigned int *v5; // r14
unsigned int v7; // ebx
char *v8; // r12
int v9; // ebp
char v10; // bp
void **v11; // rsi
_QWORD *v12; // rdx
unsigned int v13; // eax
unsigned int v14; // ecx
unsigned int v15; // ebp
unsigned int v16; // eax
... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x118
MOV R13,RDI
MOV R15,RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x108],RAX
XOR EAX,EAX
MOV qword ptr [RDI],0x0
MOV qword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
MOV R14,qword ptr [RSI]
MOV RAX,qword ptr [RSI + 0x8]
MO... | /* func0(std::vector<int, std::allocator<int> > const&, std::string const&) */
vector * func0(vector *param_1,string *param_2)
{
uint *puVar1;
long *plVar2;
uint uVar3;
uint uVar4;
string *in_RDX;
long lVar5;
ulong uVar6;
uint uVar7;
char cVar8;
ulong uVar9;
uint uVar10;
char *pcVar11;
uint ... |
2,050 | func0 |
#include <vector>
#include <string>
#include <cassert>
| std::vector<std::string> func0(const std::vector<int>& test_tup, const std::string& K) {
std::vector<std::string> res;
for (const auto& ele : test_tup) {
res.push_back(std::to_string(ele));
res.push_back(K);
}
return res;
}
| int main() {
assert((func0({5, 6, 7, 4, 9}, "FDF") == std::vector<std::string>{"5", "FDF", "6", "FDF", "7", "FDF", "4", "FDF", "9", "FDF"}));
assert((func0({7, 8, 9, 10}, "PF") == std::vector<std::string>{"7", "PF", "8", "PF", "9", "PF", "10", "PF"}));
assert((func0({11, 14, 12, 1, 4}, "JH") == std::vect... | O2 | cpp | func0(std::vector<int, std::allocator<int> > const&, 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
sub $0x58,%rsp
mov (%rsi),%rbp
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
... | _Z5func0RKSt6vectorIiSaIiEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
push r12
push rbp
mov rbp, rdi
push rbx
sub rsp, 128h
mov r12, [rsi]
mov rax, fs:28h
mov [rsp+158h+var_40], rax
xor eax, eax
mov rax, [rs... | long long func0(long long a1, int **a2, _QWORD *a3)
{
int *v4; // r12
int *v5; // rax
int v7; // eax
unsigned int v8; // ecx
unsigned int v9; // edx
bool v10; // bl
unsigned int v11; // r15d
long long v12; // rax
int v13; // esi
int v14; // r8d
int v15; // r8d
long long v16; // rsi
unsigned l... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
SUB RSP,0x128
MOV R12,qword ptr [RSI]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x118],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RSI + 0x8]
LEA RCX,[RSP + 0x20]
MOVUPS xmmword ptr [RDI],XMM0
MOV qword ptr [RDI + 0x10],0x0
MO... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(std::vector<int, std::allocator<int> > const&, std::string const&) */
vector * func0(vector *param_1,string *param_2)
{
uint *puVar1;
int8 uVar2;
uint uVar3;
long *plVar4;
uint uVar5;
long lVar6;
string *in_RDX... |
2,051 | func0 |
#include <vector>
#include <string>
#include <cassert>
| std::vector<std::string> func0(const std::vector<int>& test_tup, const std::string& K) {
std::vector<std::string> res;
for (const auto& ele : test_tup) {
res.push_back(std::to_string(ele));
res.push_back(K);
}
return res;
}
| int main() {
assert((func0({5, 6, 7, 4, 9}, "FDF") == std::vector<std::string>{"5", "FDF", "6", "FDF", "7", "FDF", "4", "FDF", "9", "FDF"}));
assert((func0({7, 8, 9, 10}, "PF") == std::vector<std::string>{"7", "PF", "8", "PF", "9", "PF", "10", "PF"}));
assert((func0({11, 14, 12, 1, 4}, "JH") == std::vect... | O3 | cpp | func0(std::vector<int, std::allocator<int> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r15
pxor %xmm0,%xmm0
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x78,%rsp
mov (%rsi),%r14
mov %fs:0x28,%rax
mov ... | _Z5func0RKSt6vectorIiSaIiEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
push r12
push rbp
mov rbp, rdi
push rbx
sub rsp, 138h
mov r13, [rsi]
mov [rsp+168h+var_150], rdx
lea rbx, [rsp+168h+var_138]
mov rax, fs:28h
... | long long func0(long long a1, unsigned int **a2, long long a3)
{
unsigned int *v4; // r13
unsigned int *v5; // rax
unsigned int v6; // ebx
unsigned int v7; // ecx
unsigned int v8; // r12d
int v9; // esi
unsigned int v10; // r15d
long long v11; // rsi
unsigned int v12; // ecx
char *v13; // rbx
uns... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
SUB RSP,0x138
MOV R13,qword ptr [RSI]
MOV qword ptr [RSP + 0x18],RDX
LEA RBX,[RSP + 0x30]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x128],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RSI + 0x8]
MOV qword ptr [RDI + 0x10],0x0
M... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(std::vector<int, std::allocator<int> > const&, std::string const&) */
vector * func0(vector *param_1,string *param_2)
{
uint uVar1;
uint *puVar2;
int *__src;
long *plVar3;
ulong *__dest;
uint uVar4;
uint uVar5;... |
2,052 | func0 |
#include <iostream>
#include <tuple>
#include <cassert>
| int func0(std::tuple<int, int, int, int, int, int> test_tup) {
int res = 0;
res += std::get<0>(test_tup);
res += std::get<1>(test_tup);
res += std::get<2>(test_tup);
res += std::get<3>(test_tup);
res += std::get<4>(test_tup);
res += std::get<5>(test_tup);
return res;
}
| int main() {
assert(func0(std::make_tuple(7, 8, 9, 1, 10, 7)) == 42);
assert(func0(std::make_tuple(1, 2, 3, 4, 5, 6)) == 21);
return 0;
}
| O0 | cpp | func0(std::tuple<int, int, int, int, int, int>):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x20,%rsp
mov %rdi,-0x18(%rbp)
movl $0x0,-0x4(%rbp)
mov -0x18(%rbp),%rax
mov %rax,%rdi
callq 13d5 <_ZSt3getILm0EJiiiiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_>
mov (%rax),%eax
add %eax,-0x4(%rb... | _Z5func0St5tupleIJiiiiiiEE:
endbr64
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_18], rdi
mov [rbp+var_4], 0
mov rax, [rbp+var_18]
mov rdi, rax
call _ZSt3getILm0EJiiiiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_; std::get<0ul,int,int,int,int,int,int>(std::tuple<int,int,int,i... | long long func0(long long a1)
{
int v2; // [rsp+1Ch] [rbp-4h]
int v3; // [rsp+1Ch] [rbp-4h]
int v4; // [rsp+1Ch] [rbp-4h]
int v5; // [rsp+1Ch] [rbp-4h]
int v6; // [rsp+1Ch] [rbp-4h]
v2 = *(_DWORD *)std::get<0ul,int,int,int,int,int,int>(a1);
v3 = *(_DWORD *)std::get<1ul,int,int,int,int,int,int>(a1) + v2;... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x4],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,RAX
CALL 0x00101341
MOV EAX,dword ptr [RAX]
ADD dword ptr [RBP + -0x4],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,RAX
CALL 0x0010135f
MOV EAX,dword ptr [RAX]
ADD dword... | /* func0(std::tuple<int, int, int, int, int, int>) */
int func0(tuple param_1)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
type *ptVar6;
type *ptVar7;
type *ptVar8;
type *ptVar9;
type *ptVar10;
type *ptVar11;
int4 in_register_0000003c;
tuple *ptVar12;
ptVar12 = (tuple *)CON... |
2,053 | func0 |
#include <iostream>
#include <tuple>
#include <cassert>
| int func0(std::tuple<int, int, int, int, int, int> test_tup) {
int res = 0;
res += std::get<0>(test_tup);
res += std::get<1>(test_tup);
res += std::get<2>(test_tup);
res += std::get<3>(test_tup);
res += std::get<4>(test_tup);
res += std::get<5>(test_tup);
return res;
}
| int main() {
assert(func0(std::make_tuple(7, 8, 9, 1, 10, 7)) == 42);
assert(func0(std::make_tuple(1, 2, 3, 4, 5, 6)) == 21);
return 0;
}
| O1 | cpp | func0(std::tuple<int, int, int, int, int, int>):
endbr64
mov 0x10(%rdi),%eax
add 0x14(%rdi),%eax
add 0xc(%rdi),%eax
add 0x8(%rdi),%eax
add 0x4(%rdi),%eax
add (%rdi),%eax
retq
| _Z5func0St5tupleIJiiiiiiEE:
endbr64
mov eax, [rdi+10h]
add eax, [rdi+14h]
add eax, [rdi+0Ch]
add eax, [rdi+8]
add eax, [rdi+4]
add eax, [rdi]
retn | long long func0(_DWORD *a1)
{
return (unsigned int)(*a1 + a1[1] + a1[2] + a1[3] + a1[5] + a1[4]);
} | func0:
ENDBR64
MOV EAX,dword ptr [RDI + 0x10]
ADD EAX,dword ptr [RDI + 0x14]
ADD EAX,dword ptr [RDI + 0xc]
ADD EAX,dword ptr [RDI + 0x8]
ADD EAX,dword ptr [RDI + 0x4]
ADD EAX,dword ptr [RDI]
RET | /* func0(std::tuple<int, int, int, int, int, int>) */
int func0(tuple param_1)
{
int4 in_register_0000003c;
return *(int *)(CONCAT44(in_register_0000003c,param_1) + 0x10) +
*(int *)(CONCAT44(in_register_0000003c,param_1) + 0x14) +
*(int *)(CONCAT44(in_register_0000003c,param_1) + 0xc) +
... |
2,054 | func0 |
#include <iostream>
#include <tuple>
#include <cassert>
| int func0(std::tuple<int, int, int, int, int, int> test_tup) {
int res = 0;
res += std::get<0>(test_tup);
res += std::get<1>(test_tup);
res += std::get<2>(test_tup);
res += std::get<3>(test_tup);
res += std::get<4>(test_tup);
res += std::get<5>(test_tup);
return res;
}
| int main() {
assert(func0(std::make_tuple(7, 8, 9, 1, 10, 7)) == 42);
assert(func0(std::make_tuple(1, 2, 3, 4, 5, 6)) == 21);
return 0;
}
| O2 | cpp | func0(std::tuple<int, int, int, int, int, int>):
endbr64
mov 0x10(%rdi),%eax
add 0x14(%rdi),%eax
add 0xc(%rdi),%eax
add 0x8(%rdi),%eax
add 0x4(%rdi),%eax
add (%rdi),%eax
retq
nopw %cs:0x0(%rax,%rax,1)
| _Z5func0St5tupleIJiiiiiiEE:
endbr64
mov eax, [rdi+10h]
add eax, [rdi+14h]
add eax, [rdi+0Ch]
add eax, [rdi+8]
add eax, [rdi+4]
add eax, [rdi]
retn | long long func0(_DWORD *a1)
{
return (unsigned int)(*a1 + a1[1] + a1[2] + a1[3] + a1[5] + a1[4]);
} | func0:
ENDBR64
MOV EAX,dword ptr [RDI + 0x10]
ADD EAX,dword ptr [RDI + 0x14]
ADD EAX,dword ptr [RDI + 0xc]
ADD EAX,dword ptr [RDI + 0x8]
ADD EAX,dword ptr [RDI + 0x4]
ADD EAX,dword ptr [RDI]
RET | /* func0(std::tuple<int, int, int, int, int, int>) */
int func0(tuple param_1)
{
int4 in_register_0000003c;
return *(int *)(CONCAT44(in_register_0000003c,param_1) + 0x10) +
*(int *)(CONCAT44(in_register_0000003c,param_1) + 0x14) +
*(int *)(CONCAT44(in_register_0000003c,param_1) + 0xc) +
... |
2,055 | func0 |
#include <iostream>
#include <tuple>
#include <cassert>
| int func0(std::tuple<int, int, int, int, int, int> test_tup) {
int res = 0;
res += std::get<0>(test_tup);
res += std::get<1>(test_tup);
res += std::get<2>(test_tup);
res += std::get<3>(test_tup);
res += std::get<4>(test_tup);
res += std::get<5>(test_tup);
return res;
}
| int main() {
assert(func0(std::make_tuple(7, 8, 9, 1, 10, 7)) == 42);
assert(func0(std::make_tuple(1, 2, 3, 4, 5, 6)) == 21);
return 0;
}
| O3 | cpp | func0(std::tuple<int, int, int, int, int, int>):
endbr64
mov 0x10(%rdi),%eax
add 0x14(%rdi),%eax
add 0xc(%rdi),%eax
add 0x8(%rdi),%eax
add 0x4(%rdi),%eax
add (%rdi),%eax
retq
nopw %cs:0x0(%rax,%rax,1)
| _Z5func0St5tupleIJiiiiiiEE:
endbr64
mov eax, [rdi+10h]
add eax, [rdi+14h]
add eax, [rdi+0Ch]
add eax, [rdi+8]
add eax, [rdi+4]
add eax, [rdi]
retn | long long func0(_DWORD *a1)
{
return (unsigned int)(*a1 + a1[1] + a1[2] + a1[3] + a1[5] + a1[4]);
} | func0:
ENDBR64
MOV EAX,dword ptr [RDI + 0x10]
ADD EAX,dword ptr [RDI + 0x14]
ADD EAX,dword ptr [RDI + 0xc]
ADD EAX,dword ptr [RDI + 0x8]
ADD EAX,dword ptr [RDI + 0x4]
ADD EAX,dword ptr [RDI]
RET | /* func0(std::tuple<int, int, int, int, int, int>) */
int func0(tuple param_1)
{
int4 in_register_0000003c;
return *(int *)(CONCAT44(in_register_0000003c,param_1) + 0x10) +
*(int *)(CONCAT44(in_register_0000003c,param_1) + 0x14) +
*(int *)(CONCAT44(in_register_0000003c,param_1) + 0xc) +
... |
2,056 | func0 |
#include <vector>
#include <assert.h>
| bool func0(std::vector<int> arr, int n, int m) {
if (n > m) {
return true;
}
std::vector<bool> DP(m, false);
for (int i = 0; i < n; ++i) {
if (DP[0]) {
return true;
}
std::vector<bool> temp(m, false);
for (int j = 0; j < m; ++j) {
... | int main() {
assert(func0({3, 1, 7, 5}, 4, 6) == true);
assert(func0({1, 7}, 2, 5) == false);
assert(func0({1, 6}, 2, 5) == false);
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> >, int, int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x98,%rsp
mov %rdi,-0x98(%rbp)
mov %esi,-0x9c(%rbp)
mov %edx,-0xa0(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x9c(%rbp),%eax
cmp -0xa0(%rbp),%eax
jle 1293 <_... | _Z5func0St6vectorIiSaIiEEii:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 0A8h
mov [rbp+var_A8], rdi
mov [rbp+var_AC], esi
mov [rbp+var_B0], edx
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov eax, [rbp+var_AC]
cmp eax, [rbp+var_B0]
jle short loc_12B3
mov ... | long long func0(long long a1, int a2, int a3)
{
unsigned int v3; // ebx
long long v4; // rdx
long long v5; // rdx
_DWORD *v6; // rax
long long v7; // rdx
_DWORD *v8; // rax
long long v9; // rdx
long long v10; // rdx
long long v11; // rdx
_DWORD *v12; // rax
long long v13; // rdx
long long v14; ... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0xa8
MOV qword ptr [RBP + -0xa8],RDI
MOV dword ptr [RBP + -0xac],ESI
MOV dword ptr [RBP + -0xb0],EDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV EAX,dword ptr [RBP + -0xac]
CMP EAX,dword ptr [RBP + -0xb0]
JLE 0x001012b3
MOV EBX,0x1
JMP... | /* func0(std::vector<int, std::allocator<int> >, int, int) */
ulong func0(vector param_1,int param_2,int param_3)
{
bool bVar1;
int *piVar2;
int7 extraout_var;
ulong uVar3;
int4 in_register_0000003c;
vector<int,std::allocator<int>> *this;
long in_FS_OFFSET;
int auVar4 [16];
bool local_a5;
int loca... |
2,057 | func0 |
#include <vector>
#include <assert.h>
| bool func0(std::vector<int> arr, int n, int m) {
if (n > m) {
return true;
}
std::vector<bool> DP(m, false);
for (int i = 0; i < n; ++i) {
if (DP[0]) {
return true;
}
std::vector<bool> temp(m, false);
for (int j = 0; j < m; ++j) {
... | int main() {
assert(func0({3, 1, 7, 5}, 4, 6) == true);
assert(func0({1, 7}, 2, 5) == false);
assert(func0({1, 6}, 2, 5) == false);
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> >, int, int):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x88,%rsp
mov %fs:0x28,%rax
mov %rax,0x78(%rsp)
xor %eax,%eax
mov $0x1,%r12d
cmp %edx,%esi
jle 1281 <_Z5func0St6vectorIiSaIiEEii+0x58>
mov 0x78(%rsp),%rax... | _Z5func0St6vectorIiSaIiEEii:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 0A8h
mov [rsp+0D8h+var_CC], edx
mov rax, fs:28h
mov [rsp+0D8h+var_40], rax
xor eax, eax
mov ebp, 1
cmp esi, edx
jle short loc_1289
loc_125E:
mov rax, [rsp+0D8h+var_40... | long long func0(_QWORD *a1, int a2, int a3)
{
unsigned int v3; // ebp
long long v6; // r14
_BYTE *v7; // r12
unsigned long long v8; // rbp
char *v9; // r13
long long i; // rsi
long long v11; // rdx
char *v12; // rax
long long v13; // rdx
_QWORD *v14; // rax
long long v15; // rbx
long long v16; ... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0xa8
MOV dword ptr [RSP + 0xc],EDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x98],RAX
XOR EAX,EAX
MOV EBP,0x1
CMP ESI,EDX
JLE 0x00101289
LAB_0010125e:
MOV RAX,qword ptr [RSP + 0x98]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x00101700
MOV EAX,EB... | /* func0(std::vector<int, std::allocator<int> >, int, int) */
byte func0(vector param_1,int param_2,int param_3)
{
long lVar1;
ulong *puVar2;
void *pvVar3;
ulong *puVar4;
byte bVar5;
int iVar6;
ulong uVar7;
long lVar8;
long lVar9;
ulong uVar10;
ulong uVar11;
ulong uVar12;
ulong uVar13;
int... |
2,058 | func0 |
#include <vector>
#include <assert.h>
| bool func0(std::vector<int> arr, int n, int m) {
if (n > m) {
return true;
}
std::vector<bool> DP(m, false);
for (int i = 0; i < n; ++i) {
if (DP[0]) {
return true;
}
std::vector<bool> temp(m, false);
for (int j = 0; j < m; ++j) {
... | int main() {
assert(func0({3, 1, 7, 5}, 4, 6) == true);
assert(func0({1, 7}, 2, 5) == false);
assert(func0({1, 6}, 2, 5) == false);
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> >, int, int):
endbr64
push %r15
push %r14
push %r13
push %r12
mov $0x1,%r12d
push %rbp
push %rbx
sub $0x98,%rsp
mov %fs:0x28,%rax
mov %rax,0x88(%rsp)
xor %eax,%eax
cmp %edx,%esi
jle 14a0 <_Z5func0St6vectorIiSaIiEEii+0x60>
mov 0x88(%rsp),%rax... | _Z5func0St6vectorIiSaIiEEii:
endbr64
push r15
push r14
push r13
push r12
mov r12d, 1
push rbp
push rbx
movsxd rbx, esi
sub rsp, 0A8h
mov [rsp+0D8h+var_D0], rdi
mov rax, fs:28h
mov [rsp+0D8h+var_40], rax
xor eax, eax
cmp ebx, edx
jle short loc_14C0
loc_148A:
mov rax... | long long func0(_QWORD *a1, int a2, int a3)
{
unsigned int v3; // r12d
long long v5; // r14
_BYTE *v7; // rbp
long long v8; // r15
_QWORD *v9; // rdi
int v10; // r9d
long long v11; // rdx
_QWORD *v12; // rsi
long long v13; // rdx
char v14; // cl
long long v15; // rbx
char *v16; // rdi
long lo... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
MOV R12D,0x1
PUSH RBP
PUSH RBX
MOVSXD RBX,ESI
SUB RSP,0xa8
MOV qword ptr [RSP + 0x8],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x98],RAX
XOR EAX,EAX
CMP EBX,EDX
JLE 0x001014c0
LAB_0010148a:
MOV RAX,qword ptr [RSP + 0x98]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x001... | /* func0(std::vector<int, std::allocator<int> >, int, int) */
byte func0(vector param_1,int param_2,int param_3)
{
long lVar1;
void *pvVar2;
void *pvVar3;
ulong *puVar4;
ulong *__s;
byte bVar5;
int iVar6;
int iVar7;
long lVar8;
long lVar9;
ulong uVar10;
ulong uVar11;
ulong uVar12;
ulong uV... |
2,059 | func0 |
#include <vector>
#include <assert.h>
| bool func0(std::vector<int> arr, int n, int m) {
if (n > m) {
return true;
}
std::vector<bool> DP(m, false);
for (int i = 0; i < n; ++i) {
if (DP[0]) {
return true;
}
std::vector<bool> temp(m, false);
for (int j = 0; j < m; ++j) {
... | int main() {
assert(func0({3, 1, 7, 5}, 4, 6) == true);
assert(func0({1, 7}, 2, 5) == false);
assert(func0({1, 6}, 2, 5) == false);
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> >, int, int):
endbr64
push %r15
push %r14
push %r13
mov $0x1,%r13d
push %r12
push %rbp
push %rbx
sub $0x98,%rsp
mov %fs:0x28,%rax
mov %rax,0x88(%rsp)
xor %eax,%eax
cmp %edx,%esi
jle 1490 <_Z5func0St6vectorIiSaIiEEii+0x60>
mov 0x88(%rsp),%rax... | _Z5func0St6vectorIiSaIiEEii:
endbr64
push r15
push r14
push r13
push r12
push rbp
mov ebp, 1
push rbx
movsxd rbx, esi
sub rsp, 0A8h
mov [rsp+0D8h+var_D8], rdi
mov rax, fs:28h
mov [rsp+0D8h+var_40], rax
xor eax, eax
cmp ebx, edx
jle short loc_14B8
loc_1488:
mov rax,... | long long func0(_QWORD *a1, int a2, int a3)
{
unsigned int v3; // ebp
long long v5; // r14
_QWORD *v7; // rbp
long long v8; // r15
long long v9; // rbx
char *v10; // r8
_QWORD *v11; // rdi
int v12; // r10d
long long v13; // rdx
_QWORD *v14; // rsi
long long v15; // rcx
char *v16; // rdi
_QWOR... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
MOV EBP,0x1
PUSH RBX
MOVSXD RBX,ESI
SUB RSP,0xa8
MOV qword ptr [RSP],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x98],RAX
XOR EAX,EAX
CMP EBX,EDX
JLE 0x001014b8
LAB_00101488:
MOV RAX,qword ptr [RSP + 0x98]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x00101891
A... | /* func0(std::vector<int, std::allocator<int> >, int, int) */
uint func0(vector param_1,int param_2,int param_3)
{
long lVar1;
void *pvVar2;
void *pvVar3;
ulong *puVar4;
ulong uVar5;
ulong *__s;
byte bVar6;
long lVar7;
int iVar8;
int iVar9;
long lVar10;
ulong uVar11;
ulong uVar12;
uint uVa... |
2,060 | func0 |
#include <vector>
#include <algorithm>
#include <assert.h>
| std::vector<int> func0(std::vector<int>& nums) {
int RADIX = 10;
int placement = 1;
int max_digit = *max_element(nums.begin(), nums.end());
while (placement < max_digit) {
std::vector<std::vector<int>> buckets(RADIX);
for (int num : nums) {
int tmp = (num / placement... | int main() {
std::vector<int> nums1 = {15, 79, 25, 68, 37};
std::vector<int> nums2 = {9, 11, 8, 7, 3, 2};
std::vector<int> nums3 = {36, 12, 24, 26, 29};
assert(func0(nums1) == std::vector<int>({15, 25, 37, 68, 79}));
assert(func0(nums2) == std::vector<int>({2, 3, 7, 8, 9, 11}));
assert(f... | O0 | cpp | func0(std::vector<int, std::allocator<int> >&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x88,%rsp
mov %rdi,-0x88(%rbp)
mov %rsi,-0x90(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
movl $0xa,-0x68(%rbp)
movl $0x1,-0x74(%rbp)
mov -0x90(%rbp),%rax
mov %rax,%rdi
callq ... | _Z5func0RSt6vectorIiSaIiEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 88h
mov [rbp+var_88], rdi
mov [rbp+var_90], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov [rbp+var_70], 0Ah
mov [rbp+var_7C], 1
mov rax, [rbp+var_90]
mov rdi, rax
call _ZNSt6vect... | long long func0(long long a1, long long a2)
{
long long v2; // rbx
long long v3; // rax
long long v4; // rax
int v5; // ebx
int v7; // [rsp+10h] [rbp-80h] BYREF
int v8; // [rsp+14h] [rbp-7Ch]
int v9; // [rsp+18h] [rbp-78h]
int i; // [rsp+1Ch] [rbp-74h]
int v11; // [rsp+20h] [rbp-70h]
int v12; // [r... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x88
MOV qword ptr [RBP + -0x88],RDI
MOV qword ptr [RBP + -0x90],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV dword ptr [RBP + -0x70],0xa
MOV dword ptr [RBP + -0x7c],0x1
MOV RAX,qword ptr [RBP + -0x90]
MOV RDI,RAX
CALL 0x00101bfa
MO... | /* func0(std::vector<int, std::allocator<int> >&) */
vector * func0(vector *param_1)
{
int4 uVar1;
bool bVar2;
__normal_iterator _Var3;
__normal_iterator _Var4;
int4 extraout_var;
int *piVar5;
vector<int,std::allocator<int>> *this;
int4 *puVar6;
vector<int,std::allocator<int>> *in_RSI;
long in_FS_... |
2,061 | func0 |
#include <vector>
#include <algorithm>
#include <assert.h>
| std::vector<int> func0(std::vector<int>& nums) {
int RADIX = 10;
int placement = 1;
int max_digit = *max_element(nums.begin(), nums.end());
while (placement < max_digit) {
std::vector<std::vector<int>> buckets(RADIX);
for (int num : nums) {
int tmp = (num / placement... | int main() {
std::vector<int> nums1 = {15, 79, 25, 68, 37};
std::vector<int> nums2 = {9, 11, 8, 7, 3, 2};
std::vector<int> nums3 = {36, 12, 24, 26, 29};
assert(func0(nums1) == std::vector<int>({15, 25, 37, 68, 79}));
assert(func0(nums2) == std::vector<int>({2, 3, 7, 8, 9, 11}));
assert(f... | O1 | cpp | func0(std::vector<int, std::allocator<int> >&):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x38,%rsp
mov %rdi,0x18(%rsp)
mov %rsi,%rbx
mov %fs:0x28,%rax
mov %rax,0x28(%rsp)
xor %eax,%eax
mov 0x8(%rsi),%rcx
mov (%rsi),%rdx
cmp %rcx,%rdx
je 12dd <_Z... | _Z5func0RSt6vectorIiSaIiEE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 38h
mov [rsp+68h+var_50], rdi
mov rbx, rsi
mov rax, fs:28h
mov [rsp+68h+var_40], rax
xor eax, eax
mov rcx, [rsi+8]
mov rdx, [rsi]
cmp rdx, rcx
jz short loc_12DD
l... | int ** func0(int **a1, int **a2)
{
int *v3; // rcx
int *v4; // rdx
int *i; // rax
int v6; // r12d
int *v7; // rbp
int v8; // ecx
void **v9; // rdi
int *v10; // rsi
long long *v11; // r8
long long v12; // rdi
long long v13; // rcx
long long v14; // rax
long long v15; // rsi
int v16; // r10d
... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x38
MOV qword ptr [RSP + 0x18],RDI
MOV RBX,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x28],RAX
XOR EAX,EAX
MOV RCX,qword ptr [RSI + 0x8]
MOV RDX,qword ptr [RSI]
CMP RDX,RCX
JZ 0x001012dd
LEA RAX,[RDX + 0x4]
CMP RCX,RAX
JZ 0x001012b... | /* func0(std::vector<int, std::allocator<int> >&) */
vector * func0(vector *param_1)
{
long lVar1;
vector<int,std::allocator<int>> *this;
int iVar2;
int *piVar3;
int *piVar4;
long lVar5;
long lVar6;
void *pvVar7;
int4 *__src;
int iVar8;
long lVar9;
long *plVar10;
long *plVar11;
int4 *__des... |
2,062 | func0 |
#include <vector>
#include <algorithm>
#include <assert.h>
| std::vector<int> func0(std::vector<int>& nums) {
int RADIX = 10;
int placement = 1;
int max_digit = *max_element(nums.begin(), nums.end());
while (placement < max_digit) {
std::vector<std::vector<int>> buckets(RADIX);
for (int num : nums) {
int tmp = (num / placement... | int main() {
std::vector<int> nums1 = {15, 79, 25, 68, 37};
std::vector<int> nums2 = {9, 11, 8, 7, 3, 2};
std::vector<int> nums3 = {36, 12, 24, 26, 29};
assert(func0(nums1) == std::vector<int>({15, 25, 37, 68, 79}));
assert(func0(nums2) == std::vector<int>({2, 3, 7, 8, 9, 11}));
assert(f... | O2 | cpp | func0(std::vector<int, std::allocator<int> >&):
endbr64
push %r15
mov %rsi,%r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x38,%rsp
mov 0x8(%rsi),%rcx
mov (%rsi),%rsi
mov %rdi,0x28(%rsp)
cmp %rcx,%rsi
je 1a03 <_Z5func0RSt6vectorIiSaIiEE+0x333>
mov (%rsi),%edx
lea 0x4... | _Z5func0RSt6vectorIiSaIiEE:
endbr64
push r15
mov r15, rsi
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 38h
mov rdx, [rsi+8]
mov rsi, [rsi]
mov [rsp+68h+var_50], rdi
mov rax, fs:28h
mov [rsp+68h+var_40], rax
xor eax, eax
cmp rsi, rdx
jz loc_193A
mov ... | long long func0(long long a1, int **a2)
{
int *v3; // rdx
int *v4; // rsi
int *v5; // rax
int v6; // eax
int v7; // ecx
int v8; // ebx
int v9; // ecx
int v10; // r13d
char *v11; // rax
char *v12; // r14
char *v13; // rbx
char *v14; // r12
int *v15; // rbp
char *v16; // rdi
int *v17; // rs... | func0:
ENDBR64
PUSH R15
MOV R15,RSI
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x38
MOV RDX,qword ptr [RSI + 0x8]
MOV RSI,qword ptr [RSI]
MOV qword ptr [RSP + 0x18],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x28],RAX
XOR EAX,EAX
CMP RSI,RDX
JZ 0x0010193a
MOV EBX,dword ptr [RSI]
LEA RAX,[RSI + 0x4]
... | /* func0(std::vector<int, std::allocator<int> >&) */
vector * func0(vector *param_1)
{
vector *pvVar1;
vector<int,std::allocator<int>> *this;
int *piVar2;
int *piVar3;
long lVar4;
long lVar5;
void *pvVar6;
int4 *__src;
uint *puVar7;
vector *pvVar8;
long lVar9;
int4 *__dest;
vector *pvVar10;
... |
2,063 | func0 |
#include <vector>
#include <algorithm>
#include <assert.h>
| std::vector<int> func0(std::vector<int>& nums) {
int RADIX = 10;
int placement = 1;
int max_digit = *max_element(nums.begin(), nums.end());
while (placement < max_digit) {
std::vector<std::vector<int>> buckets(RADIX);
for (int num : nums) {
int tmp = (num / placement... | int main() {
std::vector<int> nums1 = {15, 79, 25, 68, 37};
std::vector<int> nums2 = {9, 11, 8, 7, 3, 2};
std::vector<int> nums3 = {36, 12, 24, 26, 29};
assert(func0(nums1) == std::vector<int>({15, 25, 37, 68, 79}));
assert(func0(nums2) == std::vector<int>({2, 3, 7, 8, 9, 11}));
assert(f... | O3 | cpp | func0(std::vector<int, std::allocator<int> >&):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x48,%rsp
mov 0x8(%rsi),%rdx
mov (%rsi),%rcx
mov %rdi,0x38(%rsp)
mov %rsi,0x20(%rsp)
cmp %rdx,%rcx
je 1ba9 <_Z5func0RSt6vectorIiSaIiEE+0x549>
mov (%rcx),%eax
lea ... | _Z5func0RSt6vectorIiSaIiEE:
endbr64
push r15
push r14
mov r14, rsi
push r13
push r12
push rbp
push rbx
sub rsp, 38h
mov rdx, [rsi+8]
mov rsi, [rsi]
mov [rsp+68h+var_50], rdi
mov rax, fs:28h
mov [rsp+68h+var_40], rax
xor eax, eax
cmp rsi, rdx
jz loc_1AD9
mov ... | long long func0(long long a1, unsigned int **a2)
{
unsigned int *v3; // rdx
unsigned int *v4; // rsi
int *v5; // rdi
unsigned int *v6; // rax
unsigned long long v7; // r8
__m128i v8; // xmm2
__m128i v9; // xmm0
__m128i v10; // xmm1
__m128i v11; // xmm1
__m128i v12; // xmm0
__m128i v13; // xmm0
... | func0:
ENDBR64
PUSH R15
PUSH R14
MOV R14,RSI
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x38
MOV RDX,qword ptr [RSI + 0x8]
MOV RSI,qword ptr [RSI]
MOV qword ptr [RSP + 0x18],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x28],RAX
XOR EAX,EAX
CMP RSI,RDX
JZ 0x00101ad9
MOV EBX,dword ptr [RSI]
LEA RDI,[RSI + 0x4]
... | /* func0(std::vector<int, std::allocator<int> >&) */
vector * func0(vector *param_1)
{
vector *pvVar1;
vector<int,std::allocator<int>> *this;
uint *puVar2;
uint *puVar3;
void *pvVar4;
int4 *__src;
vector *pvVar5;
vector *pvVar6;
int8 uVar7;
uint uVar8;
uint uVar9;
int iVar10;
vector *pvVar11... |
2,064 | func0 |
#include <iostream>
#include <vector>
#include <assert.h>
| int func0(const std::vector<int>& list1) {
int max = list1[0];
for (int x : list1) {
if (x > max) {
max = x;
}
}
return max;
}
| int main() {
assert(func0({1,2,3,4,-1}) == 4);
assert(func0({0,1,2,-5,-1,6}) == 6);
assert(func0({0,0,1,0}) == 1);
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x40,%rsp
mov %rdi,-0x38(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x8(%rbp)
xor %eax,%eax
mov -0x38(%rbp),%rax
mov $0x0,%esi
mov %rax,%rdi
callq 163e <_ZNKSt6vectorIiSaIiEEixEm>
mov (%rax),%eax
mov %e... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_38], rdi
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
mov rax, [rbp+var_38]
mov esi, 0
mov rdi, rax
call _ZNKSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong)
mov eax, [rax]
m... | long long func0(long long a1)
{
unsigned int v2; // [rsp+18h] [rbp-28h]
int v3; // [rsp+1Ch] [rbp-24h]
long long v4; // [rsp+20h] [rbp-20h] BYREF
_QWORD v5[3]; // [rsp+28h] [rbp-18h] BYREF
v5[2] = __readfsqword(0x28u);
v2 = *(_DWORD *)std::vector<int>::operator[](a1, 0LL);
v5[1] = a1;
v4 = std::vector... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x38],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x38]
MOV ESI,0x0
MOV RDI,RAX
CALL 0x0010161c
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x28],EAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qwor... | /* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
bool bVar1;
int *piVar2;
long in_FS_OFFSET;
int local_30;
int8 local_28;
int8 local_20;
vector<int,std::allocator<int>> *local_18;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
piVar2 = (int *)st... |
2,065 | func0 |
#include <iostream>
#include <vector>
#include <assert.h>
| int func0(const std::vector<int>& list1) {
int max = list1[0];
for (int x : list1) {
if (x > max) {
max = x;
}
}
return max;
}
| int main() {
assert(func0({1,2,3,4,-1}) == 4);
assert(func0({0,1,2,-5,-1,6}) == 6);
assert(func0({0,0,1,0}) == 1);
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
mov (%rdi),%rax
mov (%rax),%edx
mov 0x8(%rdi),%rsi
cmp %rsi,%rax
je 126b <_Z5func0RKSt6vectorIiSaIiEE+0x22>
mov (%rax),%ecx
cmp %ecx,%edx
cmovl %ecx,%edx
add $0x4,%rax
cmp %rax,%rsi
jne 125b <_Z5func0RKSt6vectorIiSaIiEE+0x12>
... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
mov rax, [rdi]
mov edx, [rax]
mov rsi, [rdi+8]
cmp rax, rsi
jz short loc_122B
loc_121B:
mov ecx, [rax]
cmp edx, ecx
cmovl edx, ecx
add rax, 4
cmp rax, rsi
jnz short loc_121B
loc_122B:
mov eax, edx
retn | long long func0(unsigned int **a1)
{
unsigned int *v1; // rax
unsigned int v2; // edx
int *v3; // rsi
v1 = *a1;
v2 = **a1;
v3 = (int *)a1[1];
if ( *a1 != (unsigned int *)v3 )
{
do
{
if ( (int)v2 < (int)*v1 )
v2 = *v1;
++v1;
}
while ( v1 != (unsigned int *)v3 );
}
... | func0:
ENDBR64
MOV RAX,qword ptr [RDI]
MOV EDX,dword ptr [RAX]
MOV RSI,qword ptr [RDI + 0x8]
CMP RAX,RSI
JZ 0x0010122b
LAB_0010121b:
MOV ECX,dword ptr [RAX]
CMP EDX,ECX
CMOVL EDX,ECX
ADD RAX,0x4
CMP RAX,RSI
JNZ 0x0010121b
LAB_0010122b:
MOV EAX,EDX
RET | /* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
int *piVar1;
int iVar2;
piVar1 = *(int **)param_1;
iVar2 = *piVar1;
for (; piVar1 != *(int **)(param_1 + 8); piVar1 = piVar1 + 1) {
if (iVar2 < *piVar1) {
iVar2 = *piVar1;
}
}
return iVar2;
} |
2,066 | func0 |
#include <iostream>
#include <vector>
#include <assert.h>
| int func0(const std::vector<int>& list1) {
int max = list1[0];
for (int x : list1) {
if (x > max) {
max = x;
}
}
return max;
}
| int main() {
assert(func0({1,2,3,4,-1}) == 4);
assert(func0({0,1,2,-5,-1,6}) == 6);
assert(func0({0,0,1,0}) == 1);
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
mov (%rdi),%rax
mov 0x8(%rdi),%rcx
mov (%rax),%r8d
cmp %rcx,%rax
je 14c2 <_Z5func0RKSt6vectorIiSaIiEE+0x32>
add $0x4,%rax
mov %r8d,%edx
jmp 14b6 <_Z5func0RKSt6vectorIiSaIiEE+0x26>
nopl 0x0(%rax)
mov (%rax),%edx
add $0x4,%rax
... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
mov rax, [rdi]
mov rsi, [rdi+8]
mov edx, [rax]
cmp rax, rsi
jz short loc_1488
mov rcx, rsi
sub rcx, rax
and ecx, 4
jz short loc_1470
mov ecx, [rax]
cmp edx, ecx
cmovl edx, ecx
add rax, 4
cmp rax, rsi
jz short loc_1488
nop ... | long long func0(signed int **a1)
{
signed int *v1; // rax
int *v2; // rsi
signed int v3; // edx
v1 = *a1;
v2 = a1[1];
v3 = **a1;
if ( *a1 != v2 )
{
if ( (((_BYTE)v2 - (_BYTE)v1) & 4) == 0 )
goto LABEL_14;
if ( v3 < *v1 )
v3 = *v1;
if ( ++v1 != v2 )
{
LABEL_14:
do
... | func0:
ENDBR64
MOV RAX,qword ptr [RDI]
MOV RSI,qword ptr [RDI + 0x8]
MOV EDX,dword ptr [RAX]
CMP RAX,RSI
JZ 0x00101488
MOV RCX,RSI
SUB RCX,RAX
AND ECX,0x4
JZ 0x00101470
MOV ECX,dword ptr [RAX]
CMP EDX,ECX
CMOVL EDX,ECX
ADD RAX,0x4
CMP RAX,RSI
JZ 0x00101488
NOP dword ptr [RAX]
LAB_00101470:
MOV ECX,dword ptr [RAX]
CMP E... | /* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
int *piVar1;
int *piVar2;
int iVar3;
piVar2 = *(int **)param_1;
piVar1 = *(int **)(param_1 + 8);
iVar3 = *piVar2;
if (piVar2 != piVar1) {
if (((int)piVar1 - (int)piVar2 & 4U) != 0) {
if (iVar3 < *piVar2)... |
2,067 | func0 |
#include <iostream>
#include <vector>
#include <assert.h>
| int func0(const std::vector<int>& list1) {
int max = list1[0];
for (int x : list1) {
if (x > max) {
max = x;
}
}
return max;
}
| int main() {
assert(func0({1,2,3,4,-1}) == 4);
assert(func0({0,1,2,-5,-1,6}) == 6);
assert(func0({0,0,1,0}) == 1);
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
mov (%rdi),%rcx
mov 0x8(%rdi),%r8
mov (%rcx),%eax
cmp %r8,%rcx
je 178c <_Z5func0RKSt6vectorIiSaIiEE+0xec>
lea -0x4(%r8),%rdi
mov %rcx,%rdx
sub %rcx,%rdi
mov %rdi,%rsi
shr $0x2,%rsi
add $0x1,%rsi
cmp $0x8,%rdi
jbe 1763 ... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
mov rcx, [rdi]
mov r8, [rdi+8]
mov eax, [rcx]
cmp rcx, r8
jz locret_170A
lea rdi, [r8-4]
mov rdx, rcx
sub rdi, rcx
mov rsi, rdi
shr rsi, 2
add rsi, 1
cmp rdi, 8
jbe loc_16E1
movd xmm3, eax
mov rax, rsi
shr rax, 2
pshufd... | long long func0(const __m128i **a1)
{
int *v1; // rcx
unsigned int *v2; // r8
long long result; // rax
const __m128i *v4; // rdx
unsigned long long v5; // rsi
__m128i v6; // xmm0
__m128i v7; // xmm1
__m128i v8; // xmm2
__m128i v9; // xmm2
__m128i v10; // xmm1
__m128i v11; // xmm1
__m128i v12; /... | func0:
ENDBR64
MOV RCX,qword ptr [RDI]
MOV R8,qword ptr [RDI + 0x8]
MOV EAX,dword ptr [RCX]
CMP RCX,R8
JZ 0x0010170a
LEA RDI,[R8 + -0x4]
MOV RDX,RCX
SUB RDI,RCX
MOV RSI,RDI
SHR RSI,0x2
ADD RSI,0x1
CMP RDI,0x8
JBE 0x001016e1
MOVD XMM3,EAX
MOV RAX,RSI
SHR RAX,0x2
PSHUFD XMM0,XMM3,0x0
SHL RAX,0x4
ADD RAX,RCX
NOP dword ptr... | /* func0(std::vector<int, std::allocator<int> > const&) */
uint func0(vector *param_1)
{
uint *puVar1;
uint uVar2;
uint *puVar3;
uint *puVar4;
uint *puVar5;
uint *puVar6;
uint *puVar7;
ulong uVar8;
ulong uVar9;
uint uVar10;
uint uVar11;
uint uVar12;
uint uVar13;
uint uVar14;
uint uVar15;... |
2,068 | func0 |
#include <cmath>
#include <cassert>
| double func0(double num) {
double sqrt_root = pow(num, 0.5);
return sqrt_root;
}
| int main() {
assert(func0(4) == 2);
assert(func0(16) == 4);
assert(func0(400) == 20);
return 0;
}
| O0 | cpp | func0(double):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x20,%rsp
movsd %xmm0,-0x18(%rbp)
movsd 0xf06(%rip),%xmm0
mov -0x18(%rbp),%rax
movapd %xmm0,%xmm1
movq %rax,%xmm0
callq 1060 <pow@plt>
movq %xmm0,%rax
mov %rax,-0x8(%rbp)
movsd -0x8(%rbp),%xmm0
leaveq
retq
| _Z5func0d:
endbr64
push rbp
mov rbp, rsp
sub rsp, 20h
movsd [rbp+x], xmm0
movsd xmm0, cs:y
mov rax, [rbp+x]
movapd xmm1, xmm0; y
movq xmm0, rax; x
call _pow
movq rax, xmm0
mov [rbp+var_8], rax
movsd xmm0, [rbp+var_8]
leave
retn | long long func0(double a1)
{
return pow(a1, 0.5);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOVSD qword ptr [RBP + -0x18],XMM0
MOVSD XMM0,qword ptr [0x00102068]
MOV RAX,qword ptr [RBP + -0x18]
MOVAPD XMM1,XMM0
MOVQ XMM0,RAX
CALL 0x00101060
MOVQ RAX,XMM0
MOV qword ptr [RBP + -0x8],RAX
MOVSD XMM0,qword ptr [RBP + -0x8]
LEAVE
RET | /* func0(double) */
double func0(double param_1)
{
double dVar1;
dVar1 = pow(param_1,DAT_00102068);
return dVar1;
} |
2,069 | func0 |
#include <cmath>
#include <cassert>
| double func0(double num) {
double sqrt_root = pow(num, 0.5);
return sqrt_root;
}
| int main() {
assert(func0(4) == 2);
assert(func0(16) == 4);
assert(func0(400) == 20);
return 0;
}
| O1 | cpp | func0(double):
endbr64
sub $0x8,%rsp
movsd 0xf0f(%rip),%xmm1
callq 1060 <pow@plt>
add $0x8,%rsp
retq
| _Z5func0d:
endbr64
sub rsp, 8
movsd xmm1, cs:y; y
call _pow
add rsp, 8
retn | double func0(double a1)
{
return pow(a1, 0.5);
} | func0:
ENDBR64
SUB RSP,0x8
MOVSD XMM1,qword ptr [0x00102060]
CALL 0x00101060
ADD RSP,0x8
RET | /* func0(double) */
void func0(double param_1)
{
pow(param_1,DAT_00102060);
return;
} |
2,070 | func0 |
#include <cmath>
#include <cassert>
| double func0(double num) {
double sqrt_root = pow(num, 0.5);
return sqrt_root;
}
| int main() {
assert(func0(4) == 2);
assert(func0(16) == 4);
assert(func0(400) == 20);
return 0;
}
| O2 | cpp | func0(double):
endbr64
movsd 0xe9c(%rip),%xmm1
jmpq 1050 <pow@plt>
nopw %cs:0x0(%rax,%rax,1)
nopl 0x0(%rax,%rax,1)
| _Z5func0d:
endbr64
movsd xmm1, cs:y; y
jmp _pow | double func0(double a1)
{
return pow(a1, 0.5);
} | func0:
ENDBR64
MOVSD XMM1,qword ptr [0x00102008]
JMP 0x00101050 | /* func0(double) */
void func0(double param_1)
{
pow(param_1,DAT_00102008);
return;
} |
2,071 | func0 |
#include <cmath>
#include <cassert>
| double func0(double num) {
double sqrt_root = pow(num, 0.5);
return sqrt_root;
}
| int main() {
assert(func0(4) == 2);
assert(func0(16) == 4);
assert(func0(400) == 20);
return 0;
}
| O3 | cpp | func0(double):
endbr64
movsd 0xe9c(%rip),%xmm1
jmpq 1050 <pow@plt>
nopw %cs:0x0(%rax,%rax,1)
nopl 0x0(%rax,%rax,1)
| _Z5func0d:
endbr64
movsd xmm1, cs:y; y
jmp _pow | double func0(double a1)
{
return pow(a1, 0.5);
} | func0:
ENDBR64
MOVSD XMM1,qword ptr [0x00102008]
JMP 0x00101050 | /* func0(double) */
void func0(double param_1)
{
pow(param_1,DAT_00102008);
return;
} |
2,072 | func0 |
#include <cmath>
#include <cassert>
| double func0(int num) {
double volume = (pow(num, 3) / (6 * sqrt(2)));
return round(volume * 100) / 100; // Rounding to 2 decimal places
}
| int main() {
assert(func0(10) == 117.85);
assert(func0(15) == 397.75);
assert(func0(20) == 942.81);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x20,%rsp
mov %edi,-0x14(%rbp)
cvtsi2sdl -0x14(%rbp),%xmm0
movsd 0xef3(%rip),%xmm1
callq 1080 <pow@plt>
movsd 0xeee(%rip),%xmm1
divsd %xmm1,%xmm0
movsd %xmm0,-0x8(%rbp)
movsd -0x8(%rbp),%xmm1
movsd 0xee0(%rip),%xmm0
mulsd %xmm1,%xmm0
callq 1070 <round... | _Z5func0i:
endbr64
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_14], edi
pxor xmm2, xmm2
cvtsi2sd xmm2, [rbp+var_14]
movq rax, xmm2
movsd xmm0, cs:y
movapd xmm1, xmm0; y
movq xmm0, rax; x
call _pow
movq rax, xmm0
movsd xmm1, cs:qword_2080
movq xmm0, rax
divsd xmm0, xmm1
movsd ... | __int128 __usercall func0@<xmm0>(int a1@<edi>)
{
double v1; // rax
__int128 v2; // xmm1
double v4; // [rsp+18h] [rbp-8h]
v4 = pow((double)a1, 3.0) / 8.485281374238571;
v1 = round(v4 * 100.0);
v2 = *(unsigned long long *)&v1;
*(double *)&v2 = v1 / 100.0;
return v2;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0x14],EDI
PXOR XMM2,XMM2
CVTSI2SD XMM2,dword ptr [RBP + -0x14]
MOVQ RAX,XMM2
MOVSD XMM0,qword ptr [0x00102078]
MOVAPD XMM1,XMM0
MOVQ XMM0,RAX
CALL 0x00101080
MOVQ RAX,XMM0
MOVSD XMM1,qword ptr [0x00102080]
MOVQ XMM0,RAX
DIVSD XMM0,XMM1
MOVSD qword p... | /* func0(int) */
double func0(int param_1)
{
double dVar1;
dVar1 = pow((double)param_1,DAT_00102078);
dVar1 = round((dVar1 / DAT_00102080) * DAT_00102088);
return dVar1 / DAT_00102088;
} |
2,073 | func0 |
#include <cmath>
#include <cassert>
| double func0(int num) {
double volume = (pow(num, 3) / (6 * sqrt(2)));
return round(volume * 100) / 100; // Rounding to 2 decimal places
}
| int main() {
assert(func0(10) == 117.85);
assert(func0(15) == 397.75);
assert(func0(20) == 942.81);
return 0;
}
| O1 | cpp | func0(int):
endbr64
sub $0x8,%rsp
pxor %xmm0,%xmm0
cvtsi2sd %edi,%xmm0
movsd 0xef7(%rip),%xmm1
callq 1080 <pow@plt>
divsd 0xef2(%rip),%xmm0
mulsd 0xef2(%rip),%xmm0
callq 1070 <round@plt>
divsd 0xee5(%rip),%xmm0
add $0x8,%rsp
retq
| _Z5func0i:
endbr64
sub rsp, 8
pxor xmm0, xmm0
cvtsi2sd xmm0, edi; x
movsd xmm1, cs:y; y
call _pow
divsd xmm0, cs:qword_2078
mulsd xmm0, cs:qword_2080; x
call _round
divsd xmm0, cs:qword_2080
add rsp, 8
retn | double func0(int a1)
{
double v1; // xmm0_8
v1 = pow((double)a1, 3.0);
return round(v1 / 8.485281374238571 * 100.0) / 100.0;
} | func0:
ENDBR64
SUB RSP,0x8
PXOR XMM0,XMM0
CVTSI2SD XMM0,EDI
MOVSD XMM1,qword ptr [0x00102070]
CALL 0x00101080
DIVSD XMM0,qword ptr [0x00102078]
MULSD XMM0,qword ptr [0x00102080]
CALL 0x00101070
DIVSD XMM0,qword ptr [0x00102080]
ADD RSP,0x8
RET | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(int) */
double func0(int param_1)
{
double dVar1;
dVar1 = pow((double)param_1,DAT_00102070);
dVar1 = round((dVar1 / _DAT_00102078) * _DAT_00102080);
return dVar1 / _DAT_00102080;
} |
2,074 | func0 |
#include <cmath>
#include <cassert>
| double func0(int num) {
double volume = (pow(num, 3) / (6 * sqrt(2)));
return round(volume * 100) / 100; // Rounding to 2 decimal places
}
| int main() {
assert(func0(10) == 117.85);
assert(func0(15) == 397.75);
assert(func0(20) == 942.81);
return 0;
}
| O2 | cpp | func0(int):
endbr64
pxor %xmm0,%xmm0
sub $0x8,%rsp
movsd 0xe44(%rip),%xmm1
cvtsi2sd %edi,%xmm0
callq 1080 <pow@plt>
divsd 0xe3b(%rip),%xmm0
mulsd 0xe3b(%rip),%xmm0
callq 1070 <round@plt>
divsd 0xe2e(%rip),%xmm0
add $0x8,%rsp
retq
| _Z5func0i:
endbr64
pxor xmm0, xmm0
sub rsp, 8
movsd xmm1, cs:y; y
cvtsi2sd xmm0, edi; x
call _pow
divsd xmm0, cs:qword_2078
mulsd xmm0, cs:qword_2080; x
call _round
divsd xmm0, cs:qword_2080
add rsp, 8
retn | double func0(int a1)
{
double v1; // xmm0_8
v1 = pow((double)a1, 3.0);
return round(v1 / 8.485281374238571 * 100.0) / 100.0;
} | func0:
ENDBR64
PXOR XMM0,XMM0
SUB RSP,0x8
MOVSD XMM1,qword ptr [0x00102070]
CVTSI2SD XMM0,EDI
CALL 0x00101080
DIVSD XMM0,qword ptr [0x00102078]
MULSD XMM0,qword ptr [0x00102080]
CALL 0x00101070
DIVSD XMM0,qword ptr [0x00102080]
ADD RSP,0x8
RET | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(int) */
double func0(int param_1)
{
double dVar1;
dVar1 = pow((double)param_1,DAT_00102070);
dVar1 = round((dVar1 / _DAT_00102078) * _DAT_00102080);
return dVar1 / _DAT_00102080;
} |
2,075 | func0 |
#include <cmath>
#include <cassert>
| double func0(int num) {
double volume = (pow(num, 3) / (6 * sqrt(2)));
return round(volume * 100) / 100; // Rounding to 2 decimal places
}
| int main() {
assert(func0(10) == 117.85);
assert(func0(15) == 397.75);
assert(func0(20) == 942.81);
return 0;
}
| O3 | cpp | func0(int):
endbr64
pxor %xmm0,%xmm0
sub $0x8,%rsp
movsd 0xe44(%rip),%xmm1
cvtsi2sd %edi,%xmm0
callq 1080 <pow@plt>
divsd 0xe3b(%rip),%xmm0
mulsd 0xe3b(%rip),%xmm0
callq 1070 <round@plt>
divsd 0xe2e(%rip),%xmm0
add $0x8,%rsp
retq
| _Z5func0i:
endbr64
pxor xmm0, xmm0
sub rsp, 8
movsd xmm1, cs:y; y
cvtsi2sd xmm0, edi; x
call _pow
divsd xmm0, cs:qword_2080
mulsd xmm0, cs:qword_2088; x
call _round
divsd xmm0, cs:qword_2088
add rsp, 8
retn | double func0(int a1)
{
double v1; // xmm0_8
v1 = pow((double)a1, 3.0);
return round(v1 / 8.485281374238571 * 100.0) / 100.0;
} | func0:
ENDBR64
PXOR XMM0,XMM0
SUB RSP,0x8
MOVSD XMM1,qword ptr [0x00102078]
CVTSI2SD XMM0,EDI
CALL 0x00101080
DIVSD XMM0,qword ptr [0x00102080]
MULSD XMM0,qword ptr [0x00102088]
CALL 0x00101070
DIVSD XMM0,qword ptr [0x00102088]
ADD RSP,0x8
RET | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(int) */
double func0(int param_1)
{
double dVar1;
dVar1 = pow((double)param_1,DAT_00102078);
dVar1 = round((dVar1 / _DAT_00102080) * _DAT_00102088);
return dVar1 / _DAT_00102088;
} |
2,076 | func0 |
#include <iostream>
#include <vector>
#include <assert.h>
int find_lcm(int num1, int num2) {
int num, den, rem, gcd, lcm;
if (num1 > num2) {
num = num1;
den = num2;
} else {
num = num2;
den = num1;
}
rem = num % den;
while (rem != 0) {
nu... | int func0(const std::vector<int>& l) {
int num1 = l[0];
int num2 = l[1];
int lcm = find_lcm(num1, num2);
for (size_t i = 2; i < l.size(); ++i) {
lcm = find_lcm(lcm, l[i]);
}
return lcm;
}
| int main() {
assert(func0({2, 7, 3, 9, 4}) == 252);
assert(func0({1, 2, 8, 3}) == 24);
assert(func0({3, 8, 4, 10, 5}) == 120);
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x30,%rsp
mov %rdi,-0x28(%rbp)
mov -0x28(%rbp),%rax
mov $0x0,%esi
mov %rax,%rdi
callq 168c <_ZNKSt6vectorIiSaIiEEixEm>
mov (%rax),%eax
mov %eax,-0x10(%rbp)
mov -0x28(%rbp),%rax
mov $0x1,%esi
mov ... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_28], rdi
mov rax, [rbp+var_28]
mov esi, 0
mov rdi, rax
call _ZNKSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong)
mov eax, [rax]
mov [rbp+var_10], eax
mov rax, [rbp+var_28]
mov esi... | long long func0(long long a1)
{
int *v1; // rax
unsigned int lcm; // [rsp+1Ch] [rbp-14h]
int v4; // [rsp+20h] [rbp-10h]
int v5; // [rsp+24h] [rbp-Ch]
unsigned long long i; // [rsp+28h] [rbp-8h]
v4 = *(_DWORD *)std::vector<int>::operator[](a1, 0LL);
v5 = *(_DWORD *)std::vector<int>::operator[](a1, 1LL);
... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x28],RDI
MOV RAX,qword ptr [RBP + -0x28]
MOV ESI,0x0
MOV RDI,RAX
CALL 0x0010166a
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x10],EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV ESI,0x1
MOV RDI,RAX
CALL 0x0010166a
MOV EAX,dword ptr [RAX]
MOV dword ptr [... | /* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
int iVar1;
int *piVar2;
ulong uVar3;
int4 local_1c;
int8 local_10;
piVar2 = (int *)std::vector<int,std::allocator<int>>::operator[]
((vector<int,std::allocator<int>> *)param_1,0);
iVar1... |
2,077 | func0 |
#include <iostream>
#include <vector>
#include <assert.h>
int find_lcm(int num1, int num2) {
int num, den, rem, gcd, lcm;
if (num1 > num2) {
num = num1;
den = num2;
} else {
num = num2;
den = num1;
}
rem = num % den;
while (rem != 0) {
nu... | int func0(const std::vector<int>& l) {
int num1 = l[0];
int num2 = l[1];
int lcm = find_lcm(num1, num2);
for (size_t i = 2; i < l.size(); ++i) {
lcm = find_lcm(lcm, l[i]);
}
return lcm;
}
| int main() {
assert(func0({2, 7, 3, 9, 4}) == 252);
assert(func0({1, 2, 8, 3}) == 24);
assert(func0({3, 8, 4, 10, 5}) == 120);
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %r12
push %rbp
push %rbx
mov %rdi,%rbx
mov (%rdi),%r12
mov 0x4(%r12),%esi
mov (%r12),%edi
callq 1249 <_Z8find_lcmii>
mov %eax,%edi
mov 0x8(%rbx),%rbp
sub %r12,%rbp
cmp $0xb,%rbp
jbe 12cc <_Z5func0RKSt6vectorIiSaIiEE+0x4... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push r12
push rbp
push rbx
mov rbx, rdi
mov rbp, [rdi]
mov esi, [rbp+4]; int
mov edi, [rbp+0]; int
call _Z8find_lcmii; find_lcm(int,int)
mov edi, eax; int
mov rax, [rbx+8]
sub rax, rbp
mov r12, rax
sar r12, 2
cmp rax, 8
jbe sho... | long long func0(long long a1)
{
int *v2; // rbp
unsigned int lcm; // edi
unsigned long long v4; // r12
unsigned long long v5; // rbx
v2 = *(int **)a1;
lcm = find_lcm(**(_DWORD **)a1, *(_DWORD *)(*(_QWORD *)a1 + 4LL));
v4 = (long long)(*(_QWORD *)(a1 + 8) - (_QWORD)v2) >> 2;
if ( *(_QWORD *)(a1 + 8) - ... | func0:
ENDBR64
PUSH R12
PUSH RBP
PUSH RBX
MOV RBX,RDI
MOV RBP,qword ptr [RDI]
MOV ESI,dword ptr [RBP + 0x4]
MOV EDI,dword ptr [RBP]
CALL 0x00101209
MOV EDI,EAX
MOV RAX,qword ptr [RBX + 0x8]
SUB RAX,RBP
MOV R12,RAX
SAR R12,0x2
CMP RAX,0x8
JBE 0x0010128f
MOV EBX,0x2
LAB_0010127b:
MOV ESI,dword ptr [RBP + RBX*0x4]
CALL 0x... | /* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
int *piVar1;
long lVar2;
int iVar3;
ulong uVar4;
piVar1 = *(int **)param_1;
iVar3 = find_lcm(*piVar1,piVar1[1]);
lVar2 = *(long *)(param_1 + 8);
if (8 < (ulong)(lVar2 - (long)piVar1)) {
uVar4 = 2;
do {
... |
2,078 | func0 |
#include <iostream>
#include <vector>
#include <assert.h>
int find_lcm(int num1, int num2) {
int num, den, rem, gcd, lcm;
if (num1 > num2) {
num = num1;
den = num2;
} else {
num = num2;
den = num1;
}
rem = num % den;
while (rem != 0) {
nu... | int func0(const std::vector<int>& l) {
int num1 = l[0];
int num2 = l[1];
int lcm = find_lcm(num1, num2);
for (size_t i = 2; i < l.size(); ++i) {
lcm = find_lcm(lcm, l[i]);
}
return lcm;
}
| int main() {
assert(func0({2, 7, 3, 9, 4}) == 252);
assert(func0({1, 2, 8, 3}) == 24);
assert(func0({3, 8, 4, 10, 5}) == 120);
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
mov (%rdi),%r11
mov (%r11),%r8d
mov 0x4(%r11),%r9d
cmp %r9d,%r8d
jg 1552 <_Z5func0RKSt6vectorIiSaIiEE+0xc2>
mov %r9d,%eax
mov %r8d,%ecx
cltd
idiv %ecx
test %edx,%edx
je 1563 <_Z5func0RKSt6vectorIiSaIiEE+0xd3>
nopl 0x0(%rax,%ra... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
mov r10, [rdi]
mov r8d, [r10]
mov r9d, [r10+4]
cmp r8d, r9d
jle loc_1490
mov eax, r8d
mov esi, r9d
cdq
idiv esi
mov ecx, edx
test edx, edx
jnz short loc_1402
jmp loc_14A3
loc_1400:
mov ecx, edx
loc_1402:
mov eax, esi
mov esi,... | long long func0(int **a1)
{
char *v1; // r10
int v2; // r8d
int v3; // r9d
int v4; // esi
int v5; // ecx
int v6; // eax
int v7; // r8d
unsigned long long v8; // r11
unsigned long long i; // r9
int v10; // edi
int v11; // ecx
int v12; // edx
int v13; // eax
int v14; // esi
v1 = (char *)*a... | func0:
ENDBR64
MOV R10,qword ptr [RDI]
MOV R8D,dword ptr [R10]
MOV R9D,dword ptr [R10 + 0x4]
CMP R8D,R9D
JLE 0x00101490
MOV EAX,R8D
MOV ESI,R9D
CDQ
IDIV ESI
MOV ECX,EDX
TEST EDX,EDX
JNZ 0x00101402
JMP 0x001014a3
LAB_00101400:
MOV ECX,EDX
LAB_00101402:
MOV EAX,ESI
MOV ESI,ECX
CDQ
IDIV ECX
TEST EDX,EDX
JNZ 0x00101400
LAB... | /* func0(std::vector<int, std::allocator<int> > const&) */
int [16] func0(vector *param_1)
{
int iVar1;
int *piVar2;
long lVar3;
ulong uVar4;
int iVar5;
int iVar6;
int iVar7;
int iVar8;
ulong uVar9;
ulong uVar10;
int auVar11 [16];
piVar2 = *(int **)param_1;
iVar1 = *piVar2;
iVar8 = piV... |
2,079 | func0 |
#include <iostream>
#include <vector>
#include <assert.h>
int find_lcm(int num1, int num2) {
int num, den, rem, gcd, lcm;
if (num1 > num2) {
num = num1;
den = num2;
} else {
num = num2;
den = num1;
}
rem = num % den;
while (rem != 0) {
nu... | int func0(const std::vector<int>& l) {
int num1 = l[0];
int num2 = l[1];
int lcm = find_lcm(num1, num2);
for (size_t i = 2; i < l.size(); ++i) {
lcm = find_lcm(lcm, l[i]);
}
return lcm;
}
| int main() {
assert(func0({2, 7, 3, 9, 4}) == 252);
assert(func0({1, 2, 8, 3}) == 24);
assert(func0({3, 8, 4, 10, 5}) == 120);
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
mov (%rdi),%r10
mov (%r10),%esi
mov 0x4(%r10),%r9d
cmp %r9d,%esi
jg 1522 <_Z5func0RKSt6vectorIiSaIiEE+0xc2>
mov %esi,%ecx
mov %r9d,%r8d
mov %r8d,%eax
imul %esi,%r9d
cltd
idiv %ecx
test %edx,%edx
je 14a4 <_Z5func0RKSt6vector... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push rbx
mov r10, [rdi]
mov r8, rdi
mov r9d, [r10]
mov r11d, [r10+4]
cmp r9d, r11d
jle loc_1497
mov ecx, r11d
mov edi, r9d
loc_13F1:
mov eax, edi
imul r9d, r11d
cdq
idiv ecx
mov esi, edx
test edx, edx
jnz short loc_140A
jmp ... | long long func0(int **a1)
{
char *v1; // r10
int v3; // r9d
int v4; // r11d
int v5; // ecx
int v6; // edi
int v7; // r9d
int v8; // esi
int v9; // eax
unsigned long long i; // r9
int v11; // esi
int v12; // r11d
int v13; // edi
int v14; // ecx
int v15; // edx
int v16; // eax
v1 = (char... | func0:
ENDBR64
PUSH RBX
MOV R10,qword ptr [RDI]
MOV R8,RDI
MOV R9D,dword ptr [R10]
MOV R11D,dword ptr [R10 + 0x4]
CMP R9D,R11D
JLE 0x00101497
MOV ECX,R11D
MOV EDI,R9D
LAB_001013f1:
MOV EAX,EDI
IMUL R9D,R11D
CDQ
IDIV ECX
MOV ESI,EDX
TEST EDX,EDX
JNZ 0x0010140a
JMP 0x0010141d
LAB_00101408:
MOV ESI,EDX
LAB_0010140a:
MOV E... | /* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
int iVar1;
int iVar2;
int *piVar3;
long lVar4;
int iVar5;
int iVar6;
int iVar7;
ulong uVar8;
piVar3 = *(int **)param_1;
iVar1 = *piVar3;
iVar2 = piVar3[1];
iVar6 = iVar1;
iVar5 = iVar2;
if (iVar2 < i... |
2,080 | func0 |
#include <assert.h>
| bool func0(int x, int y, int z) {
if (x != y && y != z && z != x) {
return true;
} else {
return false;
}
}
| int main() {
assert(func0(6, 8, 12) == true);
assert(func0(6, 6, 12) == false);
assert(func0(6, 15, 20) == true);
return 0;
}
| O0 | cpp | func0(int, int, int):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x4(%rbp)
mov %esi,-0x8(%rbp)
mov %edx,-0xc(%rbp)
mov -0x4(%rbp),%eax
cmp -0x8(%rbp),%eax
je 1179 <_Z5func0iii+0x30>
mov -0x8(%rbp),%eax
cmp -0xc(%rbp),%eax
je 1179 <_Z5func0iii+0x30>
mov -0xc(%rbp),%eax
cmp -0x4(%rb... | _Z5func0iii:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_4], edi
mov [rbp+var_8], esi
mov [rbp+var_C], edx
mov eax, [rbp+var_4]
cmp eax, [rbp+var_8]
jz short loc_1179
mov eax, [rbp+var_8]
cmp eax, [rbp+var_C]
jz short loc_1179
mov eax, [rbp+var_C]
cmp eax, [rbp+var_4]... | _BOOL8 func0(int a1, int a2, int a3)
{
return a1 != a2 && a2 != a3 && a3 != a1;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x4],EDI
MOV dword ptr [RBP + -0x8],ESI
MOV dword ptr [RBP + -0xc],EDX
MOV EAX,dword ptr [RBP + -0x4]
CMP EAX,dword ptr [RBP + -0x8]
JZ 0x00101179
MOV EAX,dword ptr [RBP + -0x8]
CMP EAX,dword ptr [RBP + -0xc]
JZ 0x00101179
MOV EAX,dword ptr [RBP + -0xc]
CMP EAX,... | /* func0(int, int, int) */
int8 func0(int param_1,int param_2,int param_3)
{
int8 uVar1;
if (((param_1 == param_2) || (param_2 == param_3)) || (param_3 == param_1)) {
uVar1 = 0;
}
else {
uVar1 = 1;
}
return uVar1;
} |
2,081 | func0 |
#include <assert.h>
| bool func0(int x, int y, int z) {
if (x != y && y != z && z != x) {
return true;
} else {
return false;
}
}
| int main() {
assert(func0(6, 8, 12) == true);
assert(func0(6, 6, 12) == false);
assert(func0(6, 15, 20) == true);
return 0;
}
| O1 | cpp | func0(int, int, int):
endbr64
cmp %esi,%edi
setne %al
cmp %edx,%edi
setne %cl
and %ecx,%eax
cmp %edx,%esi
setne %dl
and %edx,%eax
retq
| _Z5func0iii:
endbr64
cmp edi, esi
setnz al
cmp edi, edx
setnz cl
and eax, ecx
cmp esi, edx
setnz dl
and eax, edx
retn | long long func0(int a1, int a2, int a3, int a4)
{
unsigned int v4; // eax
LOBYTE(v4) = a1 != a2;
LOBYTE(a4) = a1 != a3;
LOBYTE(a3) = a2 != a3;
return a3 & a4 & v4;
} | func0:
ENDBR64
CMP EDI,ESI
SETNZ AL
CMP EDI,EDX
SETNZ CL
AND EAX,ECX
CMP ESI,EDX
SETNZ DL
AND EAX,EDX
RET | /* func0(int, int, int) */
uint func0(int param_1,int param_2,int param_3)
{
int8 in_RAX;
int4 in_ECX;
return (uint)CONCAT71((int7)((ulong)in_RAX >> 8),param_1 != param_2) &
CONCAT31((int3)((uint)in_ECX >> 8),param_1 != param_3) &
CONCAT31((int3)((uint)param_3 >> 8),param_2 != param_3);
} |
Subsets and Splits
C++ Functions With Standard Library Dependencies
Identifies C++ functions that depend on standard library components, revealing patterns in how developers utilize STL libraries and potentially highlighting common coding practices or dependencies in the dataset.
C++ Standard Library Function Analysis
Filters C++ code examples that use standard library containers and types, providing useful insights into common programming patterns and data structures in the dataset.
Random Training Function Samples
Performs basic filtering and random sampling of assembly code data without revealing meaningful patterns or relationships.
Random Training Function Samples
Retrieves a random sample of 1000 records from the training dataset, providing basic data exploration but offering limited analytical value beyond seeing raw entries.