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
982
func0
#include <assert.h> #include <cmath>
double func0(double number) { if(number == 0){ return 0; } double g = number / 2.0; double g2 = g + 1; while(fabs(g - g2) > 1e-6){ double n = number / g; g2 = g; g = (g + n) / 2; } return g; }
int main() { assert(fabs(func0(10) - 3.162277660168379) < 1e-9); assert(fabs(func0(2) - 1.414213562373095) < 1e-9); assert(fabs(func0(9) - 3.0) < 1e-9); return 0; }
O2
cpp
func0(double) [clone .part.0]: movsd 0xe90(%rip),%xmm6 movapd %xmm0,%xmm3 movsd 0xe8c(%rip),%xmm1 movq 0xed4(%rip),%xmm5 movsd 0xe84(%rip),%xmm4 mulsd %xmm6,%xmm0 addsd %xmm0,%xmm1 movapd %xmm0,%xmm7 subsd %xmm1,%xmm7 movapd %xmm7,%xmm1 andpd %xmm5,%xmm1 comisd %xmm4,%xmm1 jbe 12b2 <_Z5func0d.part.0+0x72> n...
_Z5func0d: endbr64 movapd xmm3, xmm0 pxor xmm0, xmm0 ucomisd xmm3, xmm0 jp short loc_12E4 jz short locret_1352 loc_12E4: movsd xmm6, cs:qword_20B0 movapd xmm0, xmm3 movsd xmm2, cs:qword_20B8 movq xmm5, cs:qword_2110 movsd xmm4, cs:qword_20C0 mulsd xmm0, xmm6 addsd xmm2, xmm0 movapd xmm1, xm...
void func0(double a1) { double v2; // xmm0_8 double v3; // xmm2_8 if ( a1 != 0.0 ) { v2 = a1 * 0.5; if ( fabs(a1 * 0.5 - (a1 * 0.5 + 1.0)) > 0.000001 ) { do { v3 = v2; v2 = (a1 / v2 + v2) * 0.5; } while ( fabs(v2 - v3) > 0.000001 ); } } }
func0: ENDBR64 MOVAPD XMM3,XMM0 PXOR XMM0,XMM0 UCOMISD XMM3,XMM0 JP 0x001012e4 JZ 0x00101352 LAB_001012e4: MOVSD XMM6,qword ptr [0x001020b0] MOVAPD XMM0,XMM3 MOVSD XMM2,qword ptr [0x001020b8] MOVQ XMM5,qword ptr [0x00102110] MOVSD XMM4,qword ptr [0x001020c0] MULSD XMM0,XMM6 ADDSD XMM2,XMM0 MOVAPD XMM1,XMM0 SUBSD XMM1,X...
/* func0(double) */ void func0(double param_1) { double dVar1; double dVar2; double dVar3; if (param_1 != 0.0) { dVar1 = param_1 * DAT_001020b0; dVar3 = dVar1 - (DAT_001020b8 + dVar1); while (DAT_001020c0 < (double)((ulong)dVar3 & DAT_00102110)) { dVar2 = (param_1 / dVar1 + dVar1) * DAT_0...
983
func0
#include <assert.h> #include <cmath>
double func0(double number) { if(number == 0){ return 0; } double g = number / 2.0; double g2 = g + 1; while(fabs(g - g2) > 1e-6){ double n = number / g; g2 = g; g = (g + n) / 2; } return g; }
int main() { assert(fabs(func0(10) - 3.162277660168379) < 1e-9); assert(fabs(func0(2) - 1.414213562373095) < 1e-9); assert(fabs(func0(9) - 3.0) < 1e-9); return 0; }
O3
cpp
func0(double): endbr64 pxor %xmm7,%xmm7 movapd %xmm0,%xmm3 ucomisd %xmm7,%xmm0 jnp 1358 <_Z5func0d+0x88> movsd 0xdee(%rip),%xmm6 movapd %xmm3,%xmm0 movsd 0xdea(%rip),%xmm1 movq 0xe42(%rip),%xmm5 movsd 0xde2(%rip),%xmm4 mulsd %xmm6,%xmm0 addsd %xmm0,%xmm1 movapd %xmm0,%xmm7 subsd %xmm1,%xmm7 movapd %xmm7,%x...
_Z5func0d: endbr64 movapd xmm3, xmm0 pxor xmm0, xmm0 ucomisd xmm3, xmm0 jp short loc_12E4 jz short locret_1352 loc_12E4: movsd xmm6, cs:qword_20B8 movapd xmm0, xmm3 movsd xmm2, cs:qword_20C0 movq xmm5, cs:qword_2120 movsd xmm4, cs:qword_20C8 mulsd xmm0, xmm6 addsd xmm2, xmm0 movapd xmm1, xm...
void func0(double a1) { double v2; // xmm0_8 double v3; // xmm2_8 if ( a1 != 0.0 ) { v2 = a1 * 0.5; if ( fabs(a1 * 0.5 - (a1 * 0.5 + 1.0)) > 0.000001 ) { do { v3 = v2; v2 = (a1 / v2 + v2) * 0.5; } while ( fabs(v2 - v3) > 0.000001 ); } } }
func0: ENDBR64 MOVAPD XMM3,XMM0 PXOR XMM0,XMM0 UCOMISD XMM3,XMM0 JP 0x001012e4 JZ 0x00101352 LAB_001012e4: MOVSD XMM6,qword ptr [0x001020b8] MOVAPD XMM0,XMM3 MOVSD XMM2,qword ptr [0x001020c0] MOVQ XMM5,qword ptr [0x00102120] MOVSD XMM4,qword ptr [0x001020c8] MULSD XMM0,XMM6 ADDSD XMM2,XMM0 MOVAPD XMM1,XMM0 SUBSD XMM1,X...
/* func0(double) */ void func0(double param_1) { double dVar1; double dVar2; double dVar3; if (param_1 != 0.0) { dVar1 = param_1 * DAT_001020b8; dVar3 = dVar1 - (DAT_001020c0 + dVar1); while (DAT_001020c8 < (double)((ulong)dVar3 & DAT_00102120)) { dVar2 = (param_1 / dVar1 + dVar1) * DAT_0...
984
func0
#include <iostream> #include <vector> #include <cassert>
int func0(const std::string& str) { int n = str.length(); std::vector<std::vector<int>> L(n, std::vector<int>(n, 0)); for (int i = 0; i < n; ++i) { L[i][i] = 1; } for (int cl = 2; cl <= n; ++cl) { for (int i = 0; i < n - cl + 1; ++i) { int j = i + cl - 1; ...
int main() { assert(func0("TENS FOR TENS") == 5); assert(func0("CARDIO FOR CARDS") == 7); assert(func0("PART OF THE JOURNEY IS PART") == 9); return 0; }
O0
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x78,%rsp mov %rdi,-0x78(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax mov -0x78(%rbp),%rax mov %rax,%rdi callq 2360 <_ZNKSt7__cxx1112ba...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 88h mov [rbp+var_88], rdi mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax mov rax, [rbp+var_88] mov rdi, rax call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcES...
long long func0(long long a1) { long long v1; // rax char v2; // bl long long v4; // rax char v5; // bl long long v6; // rax int v7; // ebx long long v8; // rax long long v9; // rax long long v10; // rbx long long v11; // rax long long v12; // rax long long v13; // rax unsigned int v14; // eb...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x88 MOV qword ptr [RBP + -0x88],RDI 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 0x00102320 MOV dword ptr [RBP + -0x68],EAX LEA RAX,[RBP + -0x79] MOV qword ptr [RBP + -0x58],RAX NOP NOP LEA ...
/* func0(std::string const&) */ int4 func0(string *param_1) { char cVar1; int iVar2; int4 uVar3; bool bVar4; char *pcVar5; int *piVar6; int *piVar7; vector<int,std::allocator<int>> *pvVar8; int4 *puVar9; long in_FS_OFFSET; allocator local_82; allocator local_81; int local_80; int local_7c;...
985
func0
#include <iostream> #include <vector> #include <cassert>
int func0(const std::string& str) { int n = str.length(); std::vector<std::vector<int>> L(n, std::vector<int>(n, 0)); for (int i = 0; i < n; ++i) { L[i][i] = 1; } for (int cl = 2; cl <= n; ++cl) { for (int i = 0; i < n - cl + 1; ++i) { int j = i + cl - 1; ...
int main() { assert(func0("TENS FOR TENS") == 5); assert(func0("CARDIO FOR CARDS") == 7); assert(func0("PART OF THE JOURNEY IS PART") == 9); return 0; }
O1
cpp
func0(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 $0x28,%rsp mov 0x8(%rdi),%rax mov %rax,0x8(%rsp) movslq %eax,%rbp movabs $0x1fffffffffffffff,%rax cmp %rax,%rbp ja 1379 <_Z5f...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 48h mov rax, fs:28h mov [rsp+78h+var_40], rax xor eax, eax mov r12, [rdi+8] movsxd rbp, r12d mov rax, rbp shr rax, 3Dh jnz short loc_1...
long long func0(_QWORD *a1) { long long v1; // r12 unsigned long long v3; // r15 _DWORD *v4; // rax void *v5; // r13 _DWORD *v6; // rdx long long v7; // rbp _QWORD *v8; // rdx long long v9; // rax int v10; // esi long long v11; // r8 long long v12; // r10 long long v13; // rdi _DWORD *v14; //...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x48 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x38],RAX XOR EAX,EAX MOV R12,qword ptr [RDI + 0x8] MOVSXD RBP,R12D MOV RAX,RBP SHR RAX,0x3d JNZ 0x001013af MOV RBX,RDI TEST RBP,RBP JZ 0x001015be LEA R15,[RBP*0x4] MOV RDI,R15 LAB_00101372...
/* func0(std::string const&) */ int4 func0(string *param_1) { int *piVar1; char cVar2; char cVar3; int4 uVar4; void *pvVar5; int4 *puVar6; int4 *puVar7; vector *pvVar8; long lVar9; ulong uVar10; vector *pvVar11; long lVar12; vector *pvVar13; ulong uVar14; int *piVar15; uint uVar16; u...
986
func0
#include <iostream> #include <vector> #include <cassert>
int func0(const std::string& str) { int n = str.length(); std::vector<std::vector<int>> L(n, std::vector<int>(n, 0)); for (int i = 0; i < n; ++i) { L[i][i] = 1; } for (int cl = 2; cl <= n; ++cl) { for (int i = 0; i < n - cl + 1; ++i) { int j = i + cl - 1; ...
int main() { assert(func0("TENS FOR TENS") == 5); assert(func0("CARDIO FOR CARDS") == 7); assert(func0("PART OF THE JOURNEY IS PART") == 9); return 0; }
O2
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x28,%rsp mov 0x8(%rdi),%rax mov %rax,0x10(%rsp) movslq %eax,%rbx movabs $0x1fffffffffffffff,%rax cmp %rax,%rbx ja 1805 <_Z5...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 48h mov rbp, [rdi+8] mov rax, fs:28h mov [rsp+78h+var_40], rax xor eax, eax movsxd rbx, ebp mov rax, rbx shr rax, 3Dh jnz loc_175B lea...
long long func0(_QWORD *a1) { long long v1; // rbp long long *v2; // r15 long long v3; // rbx long long *v4; // rcx long long v5; // rax long long v6; // rdx long long v7; // rsi long long v8; // r12 int v9; // r10d long long v10; // r9 long long v11; // r8 long long v12; // rbp _BYTE *v13; /...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x48 MOV RBP,qword ptr [RDI + 0x8] MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x38],RAX XOR EAX,EAX MOVSXD RBX,EBP MOV RAX,RBX SHR RAX,0x3d JNZ 0x0010175b LEA RAX,[RBX + RBX*0x2] PXOR XMM0,XMM0 SHL RAX,0x3 MOVUPS xmmword ptr [RSP + 0x28]...
/* func0(std::string const&) */ int4 func0(string *param_1) { int4 uVar1; char *pcVar2; void *pvVar3; vector *pvVar4; vector *pvVar5; char *pcVar6; vector *pvVar7; vector *pvVar8; int iVar9; long lVar10; ulong uVar11; int iVar12; long lVar13; int iVar14; ulong uVar15; long in_FS_OFFSET...
987
func0
#include <iostream> #include <vector> #include <cassert>
int func0(const std::string& str) { int n = str.length(); std::vector<std::vector<int>> L(n, std::vector<int>(n, 0)); for (int i = 0; i < n; ++i) { L[i][i] = 1; } for (int cl = 2; cl <= n; ++cl) { for (int i = 0; i < n - cl + 1; ++i) { int j = i + cl - 1; ...
int main() { assert(func0("TENS FOR TENS") == 5); assert(func0("CARDIO FOR CARDS") == 7); assert(func0("PART OF THE JOURNEY IS PART") == 9); return 0; }
O3
cpp
func0(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 $0x28,%rsp mov 0x8(%rdi),%rax mov %rdi,0x10(%rsp) mov %rax,0x8(%rsp) movslq %eax,%r13 movabs $0x1fffffffffffffff,%rax cmp %rax...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 48h mov rbx, [rdi+8] mov rax, fs:28h mov [rsp+78h+var_40], rax xor eax, eax movsxd rbp, ebx mov rax, rbp shr rax, 3Dh jnz loc_17EE lea...
long long func0(_QWORD *a1) { long long v1; // rbx void *v3; // r13 long long *v4; // r15 long long v5; // rbp int v6; // edi long long *v7; // rcx long long v8; // rax long long v9; // rdx long long v10; // rsi unsigned int v11; // ebx long long v12; // r11 long long v13; // r13 long long v1...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x48 MOV RBX,qword ptr [RDI + 0x8] MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x38],RAX XOR EAX,EAX MOVSXD RBP,EBX MOV RAX,RBP SHR RAX,0x3d JNZ 0x001017ee LEA RAX,[RBP + RBP*0x2] PXOR XMM0,XMM0 SHL RAX,0x3 MOVUPS xmmword ptr [RSP + 0x28]...
/* func0(std::string const&) */ int4 func0(string *param_1) { ulong __n; int iVar1; int4 uVar2; char *pcVar3; void *pvVar4; vector *pvVar5; vector *pvVar6; char *pcVar7; vector *pvVar8; vector *pvVar9; long lVar10; int iVar11; uint uVar12; int iVar13; ulong uVar14; long lVar15; int i...
988
func0
#include <assert.h> #include <cmath>
double func0(int n) { if (n < 2) { return 1; } else { return 1.0 / n + func0(n - 1); } }
int main() { assert(std::abs(func0(7) - 2.5928571428571425) < 1e-9); assert(std::abs(func0(4) - 2.083333333333333) < 1e-9); assert(std::abs(func0(19) - 3.547739657143682) < 1e-9); return 0; }
O0
cpp
func0(int): endbr64 push %rbp mov %rsp,%rbp sub $0x10,%rsp mov %edi,-0x4(%rbp) cmpl $0x1,-0x4(%rbp) jg 1168 <_Z5func0i+0x1f> movsd 0xfaa(%rip),%xmm0 jmp 1190 <_Z5func0i+0x47> cvtsi2sdl -0x4(%rbp),%xmm1 movsd 0xf9b(%rip),%xmm0 divsd %xmm1,%xmm0 movsd %xmm0,-0x10(%rbp) mov -0x4(%rbp),%eax sub ...
_Z5func0i: endbr64 push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_4], edi cmp [rbp+var_4], 1 jg short loc_1168 movsd xmm0, cs:qword_20F0 jmp short locret_1194 loc_1168: pxor xmm1, xmm1 cvtsi2sd xmm1, [rbp+var_4] movsd xmm0, cs:qword_20F0 divsd xmm0, xmm1 movsd [rbp+var_10], xmm0 ...
double func0(int a1) { double result; // xmm0_8 result = 1.0; if ( a1 > 1 ) { func0(a1 - 1); return 1.0 / (double)a1 + 1.0 / (double)a1; } return result; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV dword ptr [RBP + -0x4],EDI CMP dword ptr [RBP + -0x4],0x1 JG 0x00101168 MOVSD XMM0,qword ptr [0x001020f0] JMP 0x00101194 LAB_00101168: PXOR XMM1,XMM1 CVTSI2SD XMM1,dword ptr [RBP + -0x4] MOVSD XMM0,qword ptr [0x001020f0] DIVSD XMM0,XMM1 MOVSD qword ptr [RBP + -0x10],...
/* func0(int) */ double func0(int param_1) { double dVar1; double dVar2; dVar1 = DAT_001020f0; if (1 < param_1) { dVar1 = DAT_001020f0 / (double)param_1; dVar2 = (double)func0(param_1 + -1); dVar1 = dVar2 + dVar1; } return dVar1; }
989
func0
#include <assert.h> #include <cmath>
double func0(int n) { if (n < 2) { return 1; } else { return 1.0 / n + func0(n - 1); } }
int main() { assert(std::abs(func0(7) - 2.5928571428571425) < 1e-9); assert(std::abs(func0(4) - 2.083333333333333) < 1e-9); assert(std::abs(func0(19) - 3.547739657143682) < 1e-9); return 0; }
O1
cpp
func0(int): endbr64 movsd 0xf93(%rip),%xmm0 cmp $0x1,%edi jle 1183 <_Z5func0i+0x3a> push %rbx mov %edi,%ebx lea -0x1(%rdi),%edi callq 1149 <_Z5func0i> movapd %xmm0,%xmm2 pxor %xmm1,%xmm1 cvtsi2sd %ebx,%xmm1 movsd 0xf6f(%rip),%xmm0 divsd %xmm1,%xmm0 addsd %xmm2,%xmm0 pop %rbx retq retq
_Z5func0i: endbr64 movsd xmm0, cs:qword_20C0 cmp edi, 1 jle short locret_118B sub rsp, 18h pxor xmm0, xmm0 cvtsi2sd xmm0, edi movsd xmm1, cs:qword_20C0 divsd xmm1, xmm0 movsd [rsp+18h+var_10], xmm1 sub edi, 1; int call _Z5func0i; func0(int) addsd xmm0, [rsp+18h+var_10] add rsp, 18h r...
double func0(int a1) { double result; // xmm0_8 result = 1.0; if ( a1 > 1 ) { func0(a1 - 1); return (double)a1 + 1.0 / (double)a1; } return result; }
func0: ENDBR64 MOVSD XMM0,qword ptr [0x001020c0] CMP EDI,0x1 JLE 0x0010118b SUB RSP,0x18 PXOR XMM0,XMM0 CVTSI2SD XMM0,EDI MOVSD XMM1,qword ptr [0x001020c0] DIVSD XMM1,XMM0 MOVSD qword ptr [RSP + 0x8],XMM1 SUB EDI,0x1 CALL 0x00101149 ADDSD XMM0,qword ptr [RSP + 0x8] ADD RSP,0x18 RET LAB_0010118b: RET
/* func0(int) */ double func0(int param_1) { double dVar1; double dVar2; if (1 < param_1) { dVar2 = DAT_001020c0 / (double)param_1; dVar1 = (double)func0(param_1 + -1); return dVar1 + dVar2; } return DAT_001020c0; }
990
func0
#include <assert.h> #include <cmath>
double func0(int n) { if (n < 2) { return 1; } else { return 1.0 / n + func0(n - 1); } }
int main() { assert(std::abs(func0(7) - 2.5928571428571425) < 1e-9); assert(std::abs(func0(4) - 2.083333333333333) < 1e-9); assert(std::abs(func0(19) - 3.547739657143682) < 1e-9); return 0; }
O2
cpp
func0(int): endbr64 cmp $0x1,%edi jle 1260 <_Z5func0i+0x10> jmp 1270 <_Z5func0i.part.0> nopl 0x0(%rax,%rax,1) movsd 0xe80(%rip),%xmm0 retq nopl 0x0(%rax)
_Z5func0i: endbr64 movsd xmm0, cs:qword_20C0 cmp edi, 1 jle locret_1348 pxor xmm1, xmm1 movapd xmm3, xmm0 lea eax, [rdi-1] cvtsi2sd xmm1, edi divsd xmm3, xmm1 movapd xmm1, xmm0 cmp edi, 2 jz loc_133C pxor xmm2, xmm2 cvtsi2sd xmm2, eax lea eax, [rdi-2] divsd xmm1, xmm2 movapd xmm2...
__int128 __usercall func0@<xmm0>(int a1@<edi>) { __int128 result; // xmm0 __int128 v2; // xmm3 double v3; // xmm1_8 double v4; // xmm1_8 double v5; // xmm2_8 double v6; // xmm2_8 double v7; // xmm4_8 double v8; // xmm5_8 double v9; // xmm0_8 double v10; // [rsp+20h] [rbp-10h] result = 0x3FF000000...
func0: ENDBR64 MOVSD XMM0,qword ptr [0x001020c0] CMP EDI,0x1 JLE 0x00101348 PXOR XMM1,XMM1 MOVAPD XMM3,XMM0 LEA EAX,[RDI + -0x1] CVTSI2SD XMM1,EDI DIVSD XMM3,XMM1 MOVAPD XMM1,XMM0 CMP EDI,0x2 JZ 0x0010133c PXOR XMM2,XMM2 CVTSI2SD XMM2,EAX LEA EAX,[RDI + -0x2] DIVSD XMM1,XMM2 MOVAPD XMM2,XMM0 CMP EDI,0x3 JZ 0x00101338 P...
/* func0(int) */ double func0(int param_1) { double dVar1; double dVar2; double dVar3; double dVar4; double dVar5; double dVar6; if (param_1 < 2) { return DAT_001020c0; } dVar5 = DAT_001020c0 / (double)param_1; dVar3 = DAT_001020c0; if (param_1 != 2) { dVar3 = DAT_001020c0 / (double)(...
991
func0
#include <assert.h> #include <cmath>
double func0(int n) { if (n < 2) { return 1; } else { return 1.0 / n + func0(n - 1); } }
int main() { assert(std::abs(func0(7) - 2.5928571428571425) < 1e-9); assert(std::abs(func0(4) - 2.083333333333333) < 1e-9); assert(std::abs(func0(19) - 3.547739657143682) < 1e-9); return 0; }
O3
cpp
func0(int): endbr64 movsd 0xe9c(%rip),%xmm1 cmp $0x1,%edi jle 1290 <_Z5func0i+0x50> push %rbx mov %edi,%ebx lea -0x1(%rdi),%edi sub $0x10,%rsp movsd %xmm1,0x8(%rsp) callq 1240 <_Z5func0i> movsd 0x8(%rsp),%xmm1 add $0x10,%rsp movapd %xmm0,%xmm2 pxor %xmm0,%xmm0 cvtsi2sd %ebx,%xmm0 pop %rbx d...
_Z5func0i: endbr64 movsd xmm0, cs:qword_20C8 cmp edi, 1 jle locret_1348 pxor xmm1, xmm1 movapd xmm3, xmm0 lea eax, [rdi-1] cvtsi2sd xmm1, edi divsd xmm3, xmm1 movapd xmm1, xmm0 cmp edi, 2 jz loc_133C pxor xmm2, xmm2 cvtsi2sd xmm2, eax lea eax, [rdi-2] divsd xmm1, xmm2 movapd xmm2...
__int128 __usercall func0@<xmm0>(int a1@<edi>) { __int128 result; // xmm0 __int128 v2; // xmm3 double v3; // xmm1_8 double v4; // xmm1_8 double v5; // xmm2_8 double v6; // xmm2_8 double v7; // xmm4_8 double v8; // xmm5_8 double v9; // xmm0_8 double v10; // [rsp+20h] [rbp-10h] result = 0x3FF000000...
func0: ENDBR64 MOVSD XMM0,qword ptr [0x001020c8] CMP EDI,0x1 JLE 0x00101348 PXOR XMM1,XMM1 MOVAPD XMM3,XMM0 LEA EAX,[RDI + -0x1] CVTSI2SD XMM1,EDI DIVSD XMM3,XMM1 MOVAPD XMM1,XMM0 CMP EDI,0x2 JZ 0x0010133c PXOR XMM2,XMM2 CVTSI2SD XMM2,EAX LEA EAX,[RDI + -0x2] DIVSD XMM1,XMM2 MOVAPD XMM2,XMM0 CMP EDI,0x3 JZ 0x00101338 P...
/* func0(int) */ double func0(int param_1) { double dVar1; double dVar2; double dVar3; double dVar4; double dVar5; double dVar6; if (param_1 < 2) { return DAT_001020c8; } dVar5 = DAT_001020c8 / (double)param_1; dVar3 = DAT_001020c8; if (param_1 != 2) { dVar3 = DAT_001020c8 / (double)(...
992
func0
#include <vector> #include <algorithm> #include <cassert>
std::vector<int> func0(const std::vector<int>& array_nums1, const std::vector<int>& array_nums2) { std::vector<int> result; for (auto num : array_nums2) { if (std::find(array_nums1.begin(), array_nums1.end(), num) != array_nums1.end()) { result.push_back(num); } } retu...
int main() { assert((func0({1, 2, 3, 5, 7, 8, 9, 10}, {1, 2, 4, 8, 9}) == std::vector<int>{1, 2, 8, 9})); assert((func0({1, 2, 3, 5, 7, 8, 9, 10}, {3, 5, 7, 9}) == std::vector<int>{3, 5, 7, 9})); assert((func0({1, 2, 3, 5, 7, 8, 9, 10}, {10, 20, 30, 40}) == std::vector<int>{10})); return 0; }
O0
cpp
func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x68,%rsp mov %rdi,-0x58(%rbp) mov %rsi,-0x60(%rbp) mov %rdx,-0x68(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax mov -0x58(%rbp)...
_Z5func0RKSt6vectorIiSaIiEES3_: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 68h mov [rbp+var_58], rdi mov [rbp+var_60], rsi mov [rbp+var_68], rdx mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax mov rax, [rbp+var_58] mov rdi, rax call _ZNSt6vectorIiSaIiEEC2Ev; std:...
long long func0(long long a1, long long a2, long long a3) { long long v3; // rbx long long v4; // rax int v7; // [rsp+2Ch] [rbp-44h] BYREF long long v8; // [rsp+30h] [rbp-40h] BYREF long long v9; // [rsp+38h] [rbp-38h] BYREF long long v10; // [rsp+40h] [rbp-30h] BYREF _QWORD v11[4]; // [rsp+48h] [rbp-28h...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x68 MOV qword ptr [RBP + -0x58],RDI MOV qword ptr [RBP + -0x60],RSI MOV qword ptr [RBP + -0x68],RDX 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 0x00101d64 MOV RAX,qword ptr [RBP + -0x68] MO...
/* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&) */ vector * func0(vector *param_1,vector *param_2) { bool bVar1; int *piVar2; int8 uVar3; int8 uVar4; vector<int,std::allocator<int>> *in_RDX; long in_FS_OFFSET; int local_4c; int8 local_48; int...
993
func0
#include <vector> #include <algorithm> #include <cassert>
std::vector<int> func0(const std::vector<int>& array_nums1, const std::vector<int>& array_nums2) { std::vector<int> result; for (auto num : array_nums2) { if (std::find(array_nums1.begin(), array_nums1.end(), num) != array_nums1.end()) { result.push_back(num); } } retu...
int main() { assert((func0({1, 2, 3, 5, 7, 8, 9, 10}, {1, 2, 4, 8, 9}) == std::vector<int>{1, 2, 8, 9})); assert((func0({1, 2, 3, 5, 7, 8, 9, 10}, {3, 5, 7, 9}) == std::vector<int>{3, 5, 7, 9})); assert((func0({1, 2, 3, 5, 7, 8, 9, 10}, {10, 20, 30, 40}) == std::vector<int>{10})); return 0; }
O1
cpp
func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&): endbr64 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x10,%rsp mov %rdi,%rbp mov %fs:0x28,%rax mov %rax,0x8(%rsp) xor %eax,%eax movq $0x0,(%rdi) movq $0x0,0x8(%rdi) movq $0x0,0x1...
_Z5func0RKSt6vectorIiSaIiEES3_: endbr64 push r13 push r12 push rbp push rbx sub rsp, 18h mov rbp, rdi mov r12, rsi mov rax, fs:28h mov [rsp+38h+var_30], rax xor eax, eax mov qword ptr [rdi], 0 mov qword ptr [rdi+8], 0 mov qword ptr [rdi+10h], 0 mov rbx, [rdx] mov ...
_QWORD * func0(_QWORD *a1, char **a2, int **a3) { int *v4; // rbx int *v5; // r13 char *v7; // rax _DWORD *v8; // rsi int v9; // edx char *v10; // rsi long long v11; // rcx char *v12; // rcx signed long long v13; // rax int v14; // [rsp+4h] [rbp-34h] BYREF unsigned long long v15; // [rsp+8h] [rbp-...
func0: ENDBR64 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x18 MOV RBP,RDI MOV R12,RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x8],RAX XOR EAX,EAX MOV qword ptr [RDI],0x0 MOV qword ptr [RDI + 0x8],0x0 MOV qword ptr [RDI + 0x10],0x0 MOV RBX,qword ptr [RDX] MOV R13,qword ptr [RDX + 0x8] CMP R13,RBX JNZ 0x00101...
/* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&) */ vector * func0(vector *param_1,vector *param_2) { int *piVar1; int *piVar2; int *piVar3; long lVar4; int *piVar5; int8 *in_RDX; int *piVar6; long in_FS_OFFSET; int local_34; long local_30; ...
994
func0
#include <vector> #include <algorithm> #include <cassert>
std::vector<int> func0(const std::vector<int>& array_nums1, const std::vector<int>& array_nums2) { std::vector<int> result; for (auto num : array_nums2) { if (std::find(array_nums1.begin(), array_nums1.end(), num) != array_nums1.end()) { result.push_back(num); } } retu...
int main() { assert((func0({1, 2, 3, 5, 7, 8, 9, 10}, {1, 2, 4, 8, 9}) == std::vector<int>{1, 2, 8, 9})); assert((func0({1, 2, 3, 5, 7, 8, 9, 10}, {3, 5, 7, 9}) == std::vector<int>{3, 5, 7, 9})); assert((func0({1, 2, 3, 5, 7, 8, 9, 10}, {10, 20, 30, 40}) == std::vector<int>{10})); return 0; }
O2
cpp
func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&): endbr64 push %r14 push %r13 push %r12 mov %rdi,%r12 push %rbp push %rbx sub $0x10,%rsp mov %fs:0x28,%rax mov %rax,0x8(%rsp) xor %eax,%eax movq $0x0,(%rdi) movq $0x0,0x8(%rdi) movq $0x0,0x1...
_Z5func0RKSt6vectorIiSaIiEES3_: endbr64 push r13 pxor xmm0, xmm0 push r12 mov r12, rdi push rbp push rbx sub rsp, 18h mov rax, fs:28h mov [rsp+38h+var_30], rax xor eax, eax mov qword ptr [rdi+10h], 0 movups xmmword ptr [rdi], xmm0 mov r13, [rdx+8] mov rbx, [rdx] cmp r...
long long func0(long long a1, long long a2, int **a3) { int *v4; // r13 int *i; // rbx _DWORD *v7; // rsi _DWORD *v8; // rax int v9; // edx long long v10; // rcx long long v11; // rdi long long v12; // rcx long long v13; // rdi _DWORD *v14; // rsi int v16; // [rsp+0h] [rbp-34h] BYREF unsigned l...
func0: ENDBR64 PUSH R13 PXOR XMM0,XMM0 PUSH R12 MOV R12,RDI PUSH RBP PUSH RBX SUB RSP,0x18 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x8],RAX XOR EAX,EAX MOV qword ptr [RDI + 0x10],0x0 MOVUPS xmmword ptr [RDI],XMM0 MOV R13,qword ptr [RDX + 0x8] MOV RBX,qword ptr [RDX] CMP R13,RBX JZ 0x001017e5 MOV RBP,RSI NOP dw...
/* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&) */ vector * func0(vector *param_1,vector *param_2) { int *piVar1; int *piVar2; int *piVar3; long lVar4; int *piVar5; int8 *in_RDX; int *piVar6; long in_FS_OFFSET; int local_34; long local_30; ...
995
func0
#include <vector> #include <algorithm> #include <cassert>
std::vector<int> func0(const std::vector<int>& array_nums1, const std::vector<int>& array_nums2) { std::vector<int> result; for (auto num : array_nums2) { if (std::find(array_nums1.begin(), array_nums1.end(), num) != array_nums1.end()) { result.push_back(num); } } retu...
int main() { assert((func0({1, 2, 3, 5, 7, 8, 9, 10}, {1, 2, 4, 8, 9}) == std::vector<int>{1, 2, 8, 9})); assert((func0({1, 2, 3, 5, 7, 8, 9, 10}, {3, 5, 7, 9}) == std::vector<int>{3, 5, 7, 9})); assert((func0({1, 2, 3, 5, 7, 8, 9, 10}, {10, 20, 30, 40}) == std::vector<int>{10})); return 0; }
O3
cpp
func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&): endbr64 push %r14 pxor %xmm0,%xmm0 push %r13 push %r12 mov %rdi,%r12 push %rbp push %rbx sub $0x10,%rsp mov %fs:0x28,%rax mov %rax,0x8(%rsp) xor %eax,%eax movq $0x0,0x10(%rdi) movups %xmm0,(...
_Z5func0RKSt6vectorIiSaIiEES3_: endbr64 push r13 pxor xmm0, xmm0 push r12 mov r12, rdi push rbp push rbx sub rsp, 18h mov rax, fs:28h mov [rsp+38h+var_30], rax xor eax, eax mov qword ptr [rdi+10h], 0 movups xmmword ptr [rdi], xmm0 mov r13, [rdx+8] mov rbx, [rdx] cmp r...
long long func0(long long a1, long long a2, int **a3) { int *v4; // r13 int *i; // rbx _DWORD *v7; // rsi _DWORD *v8; // rax int v9; // edx long long v10; // rcx long long v11; // rdi long long v12; // rcx long long v13; // rdi _DWORD *v14; // rsi int v16; // [rsp+0h] [rbp-34h] BYREF unsigned l...
func0: ENDBR64 PUSH R13 PXOR XMM0,XMM0 PUSH R12 MOV R12,RDI PUSH RBP PUSH RBX SUB RSP,0x18 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x8],RAX XOR EAX,EAX MOV qword ptr [RDI + 0x10],0x0 MOVUPS xmmword ptr [RDI],XMM0 MOV R13,qword ptr [RDX + 0x8] MOV RBX,qword ptr [RDX] CMP R13,RBX JZ 0x001017e5 MOV RBP,RSI NOP dw...
/* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&) */ vector * func0(vector *param_1,vector *param_2) { int *piVar1; int *piVar2; int *piVar3; long lVar4; int *piVar5; int8 *in_RDX; int *piVar6; long in_FS_OFFSET; int local_34; long local_30; ...
996
func0
#include <vector> #include <assert.h>
int func0(const std::vector<int>& tup, int x) { int count = 0; for(int ele : tup) { if(ele == x) { count++; } } return count; }
int main() { std::vector<int> tup = {10, 8, 5, 2, 10, 15, 10, 8, 5, 8, 8, 2}; assert(func0(tup, 4) == 0); assert(func0(tup, 10) == 3); assert(func0(tup, 8) == 4); return 0; }
O0
cpp
func0(std::vector<int, std::allocator<int> > const&, int): endbr64 push %rbp mov %rsp,%rbp sub $0x40,%rsp mov %rdi,-0x38(%rbp) mov %esi,-0x3c(%rbp) mov %fs:0x28,%rax mov %rax,-0x8(%rbp) xor %eax,%eax movl $0x0,-0x28(%rbp) mov -0x38(%rbp),%rax mov %rax,-0x10(%rbp) mov -0x10(%rbp),%rax m...
_Z5func0RKSt6vectorIiSaIiEEi: endbr64 push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_38], rdi mov [rbp+var_3C], esi mov rax, fs:28h mov [rbp+var_8], rax xor eax, eax mov [rbp+var_28], 0 mov rax, [rbp+var_38] mov [rbp+var_10], rax mov rax, [rbp+var_10] mov rdi, rax cal...
long long func0(long long a1, int a2) { unsigned int v3; // [rsp+18h] [rbp-28h] long long v4; // [rsp+20h] [rbp-20h] BYREF _QWORD v5[3]; // [rsp+28h] [rbp-18h] BYREF v5[2] = __readfsqword(0x28u); v3 = 0; v5[1] = a1; v4 = std::vector<int>::begin(a1); v5[0] = std::vector<int>::end(a1); while ( (unsign...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x38],RDI MOV dword ptr [RBP + -0x3c],ESI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX XOR EAX,EAX MOV dword ptr [RBP + -0x28],0x0 MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,...
/* func0(std::vector<int, std::allocator<int> > const&, int) */ int func0(vector *param_1,int param_2) { 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); l...
997
func0
#include <vector> #include <assert.h>
int func0(const std::vector<int>& tup, int x) { int count = 0; for(int ele : tup) { if(ele == x) { count++; } } return count; }
int main() { std::vector<int> tup = {10, 8, 5, 2, 10, 15, 10, 8, 5, 8, 8, 2}; assert(func0(tup, 4) == 0); assert(func0(tup, 10) == 3); assert(func0(tup, 8) == 4); return 0; }
O1
cpp
func0(std::vector<int, std::allocator<int> > const&, int): endbr64 mov (%rdi),%rax mov 0x8(%rdi),%rdi cmp %rdi,%rax je 11d4 <_Z5func0RKSt6vectorIiSaIiEEi+0x2b> mov $0x0,%edx cmp %esi,(%rax) sete %cl movzbl %cl,%ecx add %ecx,%edx add $0x4,%rax cmp %rax,%rdi jne 11be <_Z5func0RKSt6vectorI...
_Z5func0RKSt6vectorIiSaIiEEi: endbr64 mov rax, [rdi] mov rdi, [rdi+8] cmp rdi, rax jz short loc_11D4 mov edx, 0 loc_11BE: cmp [rax], esi setz cl movzx ecx, cl add edx, ecx add rax, 4 cmp rax, rdi jnz short loc_11BE loc_11D1: mov eax, edx retn loc_11D4: mov edx, 0 jm...
long long func0(long long a1, int a2) { _DWORD *v2; // rax _DWORD *v3; // rdi unsigned int v4; // edx v2 = *(_DWORD **)a1; v3 = *(_DWORD **)(a1 + 8); if ( v3 == v2 ) { return 0; } else { v4 = 0; do v4 += *v2++ == a2; while ( v2 != v3 ); } return v4; }
func0: ENDBR64 MOV RAX,qword ptr [RDI] MOV RDI,qword ptr [RDI + 0x8] CMP RDI,RAX JZ 0x001011d4 MOV EDX,0x0 LAB_001011be: CMP dword ptr [RAX],ESI SETZ CL MOVZX ECX,CL ADD EDX,ECX ADD RAX,0x4 CMP RAX,RDI JNZ 0x001011be LAB_001011d1: MOV EAX,EDX RET LAB_001011d4: MOV EDX,0x0 JMP 0x001011d1
/* func0(std::vector<int, std::allocator<int> > const&, int) */ int func0(vector *param_1,int param_2) { int *piVar1; int iVar2; piVar1 = *(int **)param_1; if (*(int **)(param_1 + 8) == piVar1) { iVar2 = 0; } else { iVar2 = 0; do { iVar2 = iVar2 + (uint)(*piVar1 == param_2); piV...
998
func0
#include <vector> #include <assert.h>
int func0(const std::vector<int>& tup, int x) { int count = 0; for(int ele : tup) { if(ele == x) { count++; } } return count; }
int main() { std::vector<int> tup = {10, 8, 5, 2, 10, 15, 10, 8, 5, 8, 8, 2}; assert(func0(tup, 4) == 0); assert(func0(tup, 10) == 3); assert(func0(tup, 8) == 4); return 0; }
O2
cpp
func0(std::vector<int, std::allocator<int> > const&, int): endbr64 mov (%rdi),%rax mov 0x8(%rdi),%rcx xor %r8d,%r8d cmp %rcx,%rax je 135b <_Z5func0RKSt6vectorIiSaIiEEi+0x2b> nopl 0x0(%rax,%rax,1) xor %edx,%edx cmp %esi,(%rax) sete %dl add $0x4,%rax add %edx,%r8d cmp %rax,%rcx jne 1...
_Z5func0RKSt6vectorIiSaIiEEi: endbr64 mov rax, [rdi] mov rdi, [rdi+8] xor edx, edx cmp rdi, rax jz short loc_13AA nop word ptr [rax+rax+00h] loc_1398: xor ecx, ecx cmp esi, [rax] setz cl add rax, 4 add edx, ecx cmp rdi, rax jnz short loc_1398 loc_13AA: mov eax, ed...
long long func0(long long a1, int a2) { _DWORD *v2; // rax _DWORD *v3; // rdi unsigned int i; // edx int v5; // ecx v2 = *(_DWORD **)a1; v3 = *(_DWORD **)(a1 + 8); for ( i = 0; v3 != v2; i += v5 ) v5 = a2 == *v2++; return i; }
func0: ENDBR64 MOV RAX,qword ptr [RDI] MOV RDI,qword ptr [RDI + 0x8] XOR EDX,EDX CMP RDI,RAX JZ 0x001013aa NOP word ptr [RAX + RAX*0x1] LAB_00101398: XOR ECX,ECX CMP ESI,dword ptr [RAX] SETZ CL ADD RAX,0x4 ADD EDX,ECX CMP RDI,RAX JNZ 0x00101398 LAB_001013aa: MOV EAX,EDX RET
/* func0(std::vector<int, std::allocator<int> > const&, int) */ int func0(vector *param_1,int param_2) { int *piVar1; int iVar2; iVar2 = 0; for (piVar1 = *(int **)param_1; *(int **)(param_1 + 8) != piVar1; piVar1 = piVar1 + 1) { iVar2 = iVar2 + (uint)(param_2 == *piVar1); } return iVar2; }
999
func0
#include <vector> #include <assert.h>
int func0(const std::vector<int>& tup, int x) { int count = 0; for(int ele : tup) { if(ele == x) { count++; } } return count; }
int main() { std::vector<int> tup = {10, 8, 5, 2, 10, 15, 10, 8, 5, 8, 8, 2}; assert(func0(tup, 4) == 0); assert(func0(tup, 10) == 3); assert(func0(tup, 8) == 4); return 0; }
O3
cpp
func0(std::vector<int, std::allocator<int> > const&, int): endbr64 mov (%rdi),%rdx mov 0x8(%rdi),%rdi cmp %rdi,%rdx je 1470 <_Z5func0RKSt6vectorIiSaIiEEi+0xe0> lea -0x4(%rdi),%rcx mov %rdx,%rax movabs $0x3ffffffffffffffc,%r9 sub %rdx,%rcx shr $0x2,%rcx lea 0x1(%rcx),%r8 test %r9,%rcx je ...
_Z5func0RKSt6vectorIiSaIiEEi: endbr64 mov rdx, [rdi] mov r8, [rdi+8] cmp r8, rdx jz loc_12F8 lea rcx, [r8-4] mov rax, rdx sub rcx, rdx mov rdi, rcx shr rdi, 2 add rdi, 1 cmp rcx, 8 jbe loc_12FB mov rcx, rdi movd xmm3, esi pxor xmm0, xmm0 shr rcx, 2 pshufd ...
long long func0(long long a1, unsigned int a2) { const __m128i *v2; // rdx unsigned long long *v3; // r8 const __m128i *v4; // rax unsigned long long v5; // rdi __m128i v6; // xmm0 __m128i v7; // xmm2 __m128i v8; // xmm1 __m128i v9; // xmm0 long long result; // rax v2 = *(const __m128i **)a1; v3...
func0: ENDBR64 MOV RDX,qword ptr [RDI] MOV R8,qword ptr [RDI + 0x8] CMP R8,RDX JZ 0x001012f8 LEA RCX,[R8 + -0x4] MOV RAX,RDX SUB RCX,RDX MOV RDI,RCX SHR RDI,0x2 ADD RDI,0x1 CMP RCX,0x8 JBE 0x001012fb MOV RCX,RDI MOVD XMM3,ESI PXOR XMM0,XMM0 SHR RCX,0x2 PSHUFD XMM2,XMM3,0x0 SHL RCX,0x4 ADD RCX,RDX NOP LAB_00101270: MOVD...
/* func0(std::vector<int, std::allocator<int> > const&, int) */ int func0(vector *param_1,int param_2) { int *piVar1; int iVar2; int *piVar3; int *piVar4; int *piVar5; int *piVar6; ulong uVar7; int *piVar8; ulong uVar9; int iVar10; int iVar11; int iVar12; int iVar13; piVar8 = *(int **)p...
1,000
func0
#include <cassert> #include <vector> #include <string>
std::vector<std::string> func0(const std::vector<std::string>& list, const std::string& element) { std::vector<std::string> result; for (const auto& elt : list) { result.push_back(element); result.push_back(elt); } return result; }
int main() { std::vector<std::string> test1 = func0({"Red", "Green", "Black"}, "c"); std::vector<std::string> expected1 = {"c", "Red", "c", "Green", "c", "Black"}; assert(test1 == expected1); std::vector<std::string> test2 = func0({"python", "java"}, "program"); std::vector<std::string> expec...
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::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 push %rbp mov ...
_Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERKS5_: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 58h mov [rbp+var_48], rdi mov [rbp+var_50], rsi mov [rbp+var_58], rdx mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax mov rax, [rbp+var_48] ...
long long func0(long long a1, long long a2, long long a3) { long long v5; // [rsp+28h] [rbp-38h] BYREF _QWORD v6[2]; // [rsp+30h] [rbp-30h] BYREF long long v7; // [rsp+40h] [rbp-20h] unsigned long long v8; // [rsp+48h] [rbp-18h] v8 = __readfsqword(0x28u); std::vector<std::string>::vector(a1); v6[1] = a2...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x58 MOV qword ptr [RBP + -0x48],RDI MOV qword ptr [RBP + -0x50],RSI MOV qword ptr [RBP + -0x58],RDX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX MOV RAX,qword ptr [RBP + -0x48] MOV RDI,RAX CALL 0x00102eae MOV RAX,qword ptr [RBP + -0x50] MO...
/* func0(std::vector<std::string, std::allocator<std::string > > const&, std::string const&) */ vector * func0(vector *param_1,string *param_2) { bool bVar1; string *in_RDX; long in_FS_OFFSET; int8 local_40; int8 local_38; vector<std::string,std::allocator<std::string>> *local_30; string *local_28; lo...
1,001
func0
#include <cassert> #include <vector> #include <string>
std::vector<std::string> func0(const std::vector<std::string>& list, const std::string& element) { std::vector<std::string> result; for (const auto& elt : list) { result.push_back(element); result.push_back(elt); } return result; }
int main() { std::vector<std::string> test1 = func0({"Red", "Green", "Black"}, "c"); std::vector<std::string> expected1 = {"c", "Red", "c", "Green", "c", "Black"}; assert(test1 == expected1); std::vector<std::string> test2 = func0({"python", "java"}, "program"); std::vector<std::string> expec...
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::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 push %r14 push ...
_Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERKS5_: endbr64 push r14 push r13 push r12 push rbp push rbx mov rbx, rdi mov r13, rdx mov qword ptr [rdi], 0 mov qword ptr [rdi+8], 0 mov qword ptr [rdi+10h], 0 mov rbp, [rsi] mov r14, [rsi+8] cmp ...
_QWORD * func0(_QWORD *a1, _QWORD *a2, _QWORD *a3) { _QWORD *v5; // rbp _QWORD *v6; // r14 _QWORD *v8; // rdi _QWORD *v9; // rdi *a1 = 0LL; a1[1] = 0LL; a1[2] = 0LL; v5 = (_QWORD *)*a2; v6 = (_QWORD *)a2[1]; if ( v6 != (_QWORD *)*a2 ) { do { v9 = (_QWORD *)a1[1]; if ( v9 == (_...
func0: ENDBR64 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX MOV RBX,RDI MOV R13,RDX MOV qword ptr [RDI],0x0 MOV qword ptr [RDI + 0x8],0x0 MOV qword ptr [RDI + 0x10],0x0 MOV RBP,qword ptr [RSI] MOV R14,qword ptr [RSI + 0x8] CMP R14,RBP JNZ 0x00101391 LAB_0010133e: MOV RAX,RBX POP RBX POP RBP POP R12 POP R13 POP R14 RET ...
/* func0(std::vector<std::string, std::allocator<std::string > > const&, std::string const&) */ vector * func0(vector *param_1,string *param_2) { string *psVar1; long *plVar2; string *in_RDX; string *psVar3; *(int8 *)param_1 = 0; *(int8 *)(param_1 + 8) = 0; *(int8 *)(param_1 + 0x10) = 0; psVar1 = *...
1,002
func0
#include <cassert> #include <vector> #include <string>
std::vector<std::string> func0(const std::vector<std::string>& list, const std::string& element) { std::vector<std::string> result; for (const auto& elt : list) { result.push_back(element); result.push_back(elt); } return result; }
int main() { std::vector<std::string> test1 = func0({"Red", "Green", "Black"}, "c"); std::vector<std::string> expected1 = {"c", "Red", "c", "Green", "c", "Black"}; assert(test1 == expected1); std::vector<std::string> test2 = func0({"python", "java"}, "program"); std::vector<std::string> expec...
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::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 push %r13 push ...
_Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERKS5_: endbr64 push r13 pxor xmm0, xmm0 push r12 push rbp push rbx mov rbx, rdi sub rsp, 8 mov qword ptr [rdi+10h], 0 movups xmmword ptr [rdi], xmm0 mov rbp, [rsi] mov r13, [rsi+8] cmp r13, rbp jz ...
long long func0(long long a1, _QWORD *a2, _QWORD *a3) { _QWORD *v4; // rbp _QWORD *v5; // r13 _QWORD *v7; // rax _QWORD *v8; // rdi long long v9; // rdx _QWORD *v10; // rdi long long v11; // rdx *(_QWORD *)(a1 + 16) = 0LL; *(_OWORD *)a1 = 0LL; v4 = (_QWORD *)*a2; v5 = (_QWORD *)a2[1]; if ( v5 ...
func0: MOV RDI,RBX CALL 0x00101ab0 MOV RDI,RBP LAB_0010122b: CALL 0x00101200
/* func0(std::vector<std::string, std::allocator<std::string > > const&, std::string const&) [clone .cold] */ void func0(vector *param_1,string *param_2) { vector<std::string,std::allocator<std::string>> *unaff_RBX; std::vector<std::string,std::allocator<std::string>>::~vector(unaff_RBX); ...
1,003
func0
#include <cassert> #include <vector> #include <string>
std::vector<std::string> func0(const std::vector<std::string>& list, const std::string& element) { std::vector<std::string> result; for (const auto& elt : list) { result.push_back(element); result.push_back(elt); } return result; }
int main() { std::vector<std::string> test1 = func0({"Red", "Green", "Black"}, "c"); std::vector<std::string> expected1 = {"c", "Red", "c", "Green", "c", "Black"}; assert(test1 == expected1); std::vector<std::string> test2 = func0({"python", "java"}, "program"); std::vector<std::string> expec...
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::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 push %r15 pxor ...
_Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERKS5_: endbr64 push r15 pxor xmm0, xmm0 push r14 push r13 push r12 push rbp mov rbp, rdi push rbx sub rsp, 28h mov rax, fs:28h mov [rsp+58h+var_40], rax xor eax, eax mov qword ptr [rdi+10h], 0 mo...
long long func0(long long a1, long long *a2, long long a3) { long long v4; // r12 long long *v6; // rsi long long *v7; // rbx size_t v8; // r13 void *v9; // rdi _BYTE *v10; // r15 size_t v11; // r13 _BYTE *v12; // rdi _BYTE *v13; // r15 long long v14; // rbx long long v16; // rax long long v17;...
func0: MOV RDI,RBP CALL 0x00101be0 MOV RAX,qword ptr [RSP + 0x18] SUB RAX,qword ptr FS:[0x28] JNZ 0x00101240 MOV RDI,RBX LAB_0010123b: CALL 0x00101200 LAB_00101240: CALL 0x001011c0
/* func0(std::vector<std::string, std::allocator<std::string > > const&, std::string const&) [clone .cold] */ void func0(vector *param_1,string *param_2,int param_3,int param_4,int param_5, int param_6,int param_7,int param_8,long param_9) { vector<std::string,std::allocator<std::string>> *unaff_RBP; ...
1,004
func0
#include <assert.h> #include <cmath> #include <complex>
std::pair<double, double> func0(const std::complex<double>& numbers) { return std::make_pair(std::abs(numbers), std::arg(numbers)); }
int main() { assert(func0(std::complex<double>(1, 0)) == std::make_pair(1.0, 0.0)); assert(func0(std::complex<double>(4, 0)) == std::make_pair(4.0, 0.0)); assert(func0(std::complex<double>(5, 0)) == std::make_pair(5.0, 0.0)); return 0; }
O0
cpp
func0(std::complex<double> const&): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x38,%rsp mov %rdi,-0x38(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax mov -0x38(%rbp),%rax mov %rax,%rdi callq 15da <_ZSt3argIdET_RKSt7complexIS0_E> movq %xmm0,%rax mov %rax,-0x20(%rbp) mov...
_Z5func0RKSt7complexIdE: endbr64 push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_28], rdi mov rax, fs:28h mov [rbp+var_8], rax xor eax, eax mov rax, [rbp+var_28] mov rdi, rax call _ZSt3argIdET_RKSt7complexIS0_E; std::arg<double>(std::complex<double> const&) movq rax, xmm0 mov ...
unsigned long long func0(long long a1) { double v2; // [rsp+28h] [rbp-18h] BYREF double v3; // [rsp+30h] [rbp-10h] BYREF unsigned long long v4; // [rsp+38h] [rbp-8h] v4 = __readfsqword(0x28u); v3 = std::arg<double>(a1); v2 = std::abs<double>(a1); std::make_pair<double,double>(&v2, &v3); return v4 - __...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x28],RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX XOR EAX,EAX MOV RAX,qword ptr [RBP + -0x28] MOV RDI,RAX CALL 0x00101588 MOVQ RAX,XMM0 MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x28] MOV RDI,RAX CALL 0x00101565 MO...
/* func0(std::complex<double> const&) */ int [16] func0(complex *param_1) { long in_FS_OFFSET; int8 extraout_XMM0_Qa; int8 in_XMM1_Qa; int auVar1 [16]; double local_20; double local_18; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_18 = std::arg<double>(param_1); local_20 = s...
1,005
func0
#include <assert.h> #include <cmath> #include <complex>
std::pair<double, double> func0(const std::complex<double>& numbers) { return std::make_pair(std::abs(numbers), std::arg(numbers)); }
int main() { assert(func0(std::complex<double>(1, 0)) == std::make_pair(1.0, 0.0)); assert(func0(std::complex<double>(4, 0)) == std::make_pair(4.0, 0.0)); assert(func0(std::complex<double>(5, 0)) == std::make_pair(5.0, 0.0)); return 0; }
O1
cpp
func0(std::complex<double> const&): endbr64 push %rbx sub $0x10,%rsp mov %rdi,%rbx movsd 0x8(%rdi),%xmm0 movsd (%rdi),%xmm1 callq 10a0 <atan2@plt> movsd %xmm0,0x8(%rsp) movsd (%rbx),%xmm0 movsd 0x8(%rbx),%xmm1 callq 10b0 <cabs@plt> movsd 0x8(%rsp),%xmm1 add $0x10,%rsp pop %rbx retq
_Z5func0RKSt7complexIdE: endbr64 push rbp push rbx sub rsp, 18h mov rbx, [rdi+8] mov rbp, [rdi] movq xmm1, rbp; x movq xmm0, rbx; y call _atan2 movsd [rsp+28h+var_20], xmm0 movq xmm0, rbp movq xmm1, rbx call _cabs movsd xmm1, [rsp+28h+var_20] add rsp, 18h pop rbx pop ...
long long func0(double *a1) { double v1; // rbx double v2; // rbp v1 = a1[1]; v2 = *a1; atan2(v1, *a1); return cabs(v2, v1); }
func0: ENDBR64 PUSH RBP PUSH RBX SUB RSP,0x18 MOV RBX,qword ptr [RDI + 0x8] MOV RBP,qword ptr [RDI] MOVQ XMM1,RBP MOVQ XMM0,RBX CALL 0x001010a0 MOVSD qword ptr [RSP + 0x8],XMM0 MOVQ XMM0,RBP MOVQ XMM1,RBX CALL 0x001010b0 MOVSD XMM1,qword ptr [RSP + 0x8] ADD RSP,0x18 POP RBX POP RBP RET
/* func0(std::complex<double> const&) */ void func0(complex *param_1) { double __x; __x = *(double *)param_1; atan2(*(double *)(param_1 + 8),__x); cabs(__x); return; }
1,006
func0
#include <assert.h> #include <cmath> #include <complex>
std::pair<double, double> func0(const std::complex<double>& numbers) { return std::make_pair(std::abs(numbers), std::arg(numbers)); }
int main() { assert(func0(std::complex<double>(1, 0)) == std::make_pair(1.0, 0.0)); assert(func0(std::complex<double>(4, 0)) == std::make_pair(4.0, 0.0)); assert(func0(std::complex<double>(5, 0)) == std::make_pair(5.0, 0.0)); return 0; }
O2
cpp
func0(std::complex<double> const&): endbr64 push %rbx mov %rdi,%rbx sub $0x10,%rsp movsd (%rdi),%xmm1 movsd 0x8(%rdi),%xmm0 callq 10a0 <atan2@plt> movsd 0x8(%rbx),%xmm1 movsd %xmm0,0x8(%rsp) movsd (%rbx),%xmm0 callq 10b0 <cabs@plt> movsd 0x8(%rsp),%xmm2 add $0x10,%rsp pop %rbx movapd %xmm2,%xmm1 r...
_Z5func0RKSt7complexIdE: endbr64 push rbx sub rsp, 10h movsd xmm2, qword ptr [rdi+8] movsd xmm1, qword ptr [rdi]; x movapd xmm0, xmm2; y movsd [rsp+18h+var_10], xmm1 movsd [rsp+18h+var_18], xmm2 call _atan2 movsd xmm1, [rsp+18h+var_10] movsd xmm2, [rsp+18h+var_18] movq rbx, xmm0 movapd xmm0, ...
long long func0(double *a1) { double v2; // [rsp+0h] [rbp-18h] double v3; // [rsp+8h] [rbp-10h] v3 = *a1; v2 = a1[1]; atan2(v2, *a1); return cabs(v3, v2); }
func0: ENDBR64 PUSH RBX SUB RSP,0x10 MOVSD XMM2,qword ptr [RDI + 0x8] MOVSD XMM1,qword ptr [RDI] MOVAPD XMM0,XMM2 MOVSD qword ptr [RSP + 0x8],XMM1 MOVSD qword ptr [RSP],XMM2 CALL 0x001010a0 MOVSD XMM1,qword ptr [RSP + 0x8] MOVSD XMM2,qword ptr [RSP] MOVQ RBX,XMM0 MOVAPD XMM0,XMM1 MOVAPD XMM1,XMM2 CALL 0x001010b0 ADD RS...
/* func0(std::complex<double> const&) */ void func0(complex *param_1) { double __x; __x = *(double *)param_1; atan2(*(double *)(param_1 + 8),__x); cabs(__x); return; }
1,007
func0
#include <assert.h> #include <cmath> #include <complex>
std::pair<double, double> func0(const std::complex<double>& numbers) { return std::make_pair(std::abs(numbers), std::arg(numbers)); }
int main() { assert(func0(std::complex<double>(1, 0)) == std::make_pair(1.0, 0.0)); assert(func0(std::complex<double>(4, 0)) == std::make_pair(4.0, 0.0)); assert(func0(std::complex<double>(5, 0)) == std::make_pair(5.0, 0.0)); return 0; }
O3
cpp
func0(std::complex<double> const&): endbr64 push %rbx mov %rdi,%rbx sub $0x10,%rsp movsd (%rdi),%xmm1 movsd 0x8(%rdi),%xmm0 callq 10a0 <atan2@plt> movsd 0x8(%rbx),%xmm1 movsd %xmm0,0x8(%rsp) movsd (%rbx),%xmm0 callq 10b0 <cabs@plt> movsd 0x8(%rsp),%xmm2 add $0x10,%rsp pop %rbx movapd %xmm2,%xmm1 r...
_Z5func0RKSt7complexIdE: endbr64 push rbx sub rsp, 10h movsd xmm2, qword ptr [rdi+8] movsd xmm1, qword ptr [rdi]; x movapd xmm0, xmm2; y movsd [rsp+18h+var_10], xmm1 movsd [rsp+18h+var_18], xmm2 call _atan2 movsd xmm1, [rsp+18h+var_10] movsd xmm2, [rsp+18h+var_18] movq rbx, xmm0 movapd xmm0, ...
long long func0(double *a1) { double v2; // [rsp+0h] [rbp-18h] double v3; // [rsp+8h] [rbp-10h] v3 = *a1; v2 = a1[1]; atan2(v2, *a1); return cabs(v3, v2); }
func0: ENDBR64 PUSH RBX SUB RSP,0x10 MOVSD XMM2,qword ptr [RDI + 0x8] MOVSD XMM1,qword ptr [RDI] MOVAPD XMM0,XMM2 MOVSD qword ptr [RSP + 0x8],XMM1 MOVSD qword ptr [RSP],XMM2 CALL 0x001010a0 MOVSD XMM1,qword ptr [RSP + 0x8] MOVSD XMM2,qword ptr [RSP] MOVQ RBX,XMM0 MOVAPD XMM0,XMM1 MOVAPD XMM1,XMM2 CALL 0x001010b0 ADD RS...
/* func0(std::complex<double> const&) */ void func0(complex *param_1) { double __x; __x = *(double *)param_1; atan2(*(double *)(param_1 + 8),__x); cabs(__x); return; }
1,008
func0
#include <vector> #include <cassert> #include <typeinfo> #include <any>
int func0(const std::vector<std::any>& list1) { int ctr = 0; for (const auto& i : list1) { if (i.type() == typeid(int)) { ctr++; } } return ctr; }
int main() { assert(func0({1, 2, "abc", 1.2}) == 2); assert(func0({1, 2, 3}) == 3); assert(func0({1, 1.2, 4, 5.1}) == 2); return 0; }
O0
cpp
func0(std::vector<std::any, std::allocator<std::any> > 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 movl $0x0,-0x2c(%rbp) mov -0x38(%rbp),%rax mov %rax,-0x18(%rbp) mov -0x18(%rbp),%rax mov %rax,%rdi cal...
_Z5func0RKSt6vectorISt3anySaIS0_EE: 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 [rbp+var_2C], 0 mov rax, [rbp+var_38] mov [rbp+var_18], rax mov rax, [rbp+var_18] mov rdi, rax call _ZNKSt6vectorIS...
long long func0(long long a1) { long long v1; // rax unsigned int v3; // [rsp+14h] [rbp-2Ch] long long v4; // [rsp+18h] [rbp-28h] BYREF _QWORD v5[2]; // [rsp+20h] [rbp-20h] BYREF std::any *v6; // [rsp+30h] [rbp-10h] unsigned long long v7; // [rsp+38h] [rbp-8h] v7 = __readfsqword(0x28u); v3 = 0; v5[1...
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 dword ptr [RBP + -0x2c],0x0 MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RDI,RAX CALL 0x00101c14 MOV qword pt...
/* func0(std::vector<std::any, std::allocator<std::any> > const&) */ int func0(vector *param_1) { char cVar1; bool bVar2; type_info *this; long in_FS_OFFSET; int local_34; int8 local_30; int8 local_28; vector<std::any,std::allocator<std::any>> *local_20; any *local_18; long local_10; local_10...
1,009
func0
#include <vector> #include <cassert> #include <typeinfo> #include <any>
int func0(const std::vector<std::any>& list1) { int ctr = 0; for (const auto& i : list1) { if (i.type() == typeid(int)) { ctr++; } } return ctr; }
int main() { assert(func0({1, 2, "abc", 1.2}) == 2); assert(func0({1, 2, 3}) == 3); assert(func0({1, 1.2, 4, 5.1}) == 2); return 0; }
O1
cpp
func0(std::vector<std::any, std::allocator<std::any> > const&): endbr64 push %r13 push %r12 push %rbp push %rbx sub $0x18,%rsp mov %fs:0x28,%rax mov %rax,0x8(%rsp) xor %eax,%eax mov (%rdi),%rbx mov 0x8(%rdi),%rbp cmp %rbp,%rbx je 12a2 <_Z5func0RKSt6vectorISt3anySaIS0_EE+0x39> mov $0x...
_Z5func0RKSt6vectorISt3anySaIS0_EE: endbr64 push r13 push r12 push rbp push rbx sub rsp, 18h mov rax, fs:28h mov [rsp+38h+var_30], rax xor eax, eax mov rbx, [rdi] mov rbp, [rdi+8] cmp rbp, rbx jz short loc_12F7 mov r12d, 0 lea r13, _ZTIv@CXXABI_1_3 jmp short loc_...
long long func0(long long a1) { void ( **v1)(long long, _QWORD, _QWORD *); // rbx void ( **v2)(long long, _QWORD, _QWORD *); // rbp unsigned int v3; // r12d void *v4; // rax int *v5; // rdi _QWORD v7[7]; // [rsp+0h] [rbp-38h] BYREF v7[1] = __readfsqword(0x28u); v1 = *(void ( ***)(long long, _QWORD, _Q...
func0: ENDBR64 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x18 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x8],RAX XOR EAX,EAX MOV RBX,qword ptr [RDI] MOV RBP,qword ptr [RDI + 0x8] CMP RBP,RBX JZ 0x001012f7 MOV R12D,0x0 LEA R13,[0x103d20] JMP 0x001012af LAB_001012a2: ADD R12D,0x1 LAB_001012a6: ADD RBX,0x10 CMP R...
/* func0(std::vector<std::any, std::allocator<std::any> > const&) */ int func0(vector *param_1) { int8 *puVar1; char *__s1; int iVar2; int1 *puVar3; int8 *puVar4; int iVar5; long in_FS_OFFSET; int1 *local_38; long local_30; local_30 = *(long *)(in_FS_OFFSET + 0x28); puVar4 = *(int8 **)param_1...
1,010
func0
#include <vector> #include <cassert> #include <typeinfo> #include <any>
int func0(const std::vector<std::any>& list1) { int ctr = 0; for (const auto& i : list1) { if (i.type() == typeid(int)) { ctr++; } } return ctr; }
int main() { assert(func0({1, 2, "abc", 1.2}) == 2); assert(func0({1, 2, 3}) == 3); assert(func0({1, 1.2, 4, 5.1}) == 2); return 0; }
O2
cpp
func0(std::vector<std::any, std::allocator<std::any> > const&): endbr64 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x10,%rsp mov (%rdi),%rbx mov 0x8(%rdi),%r13 mov %fs:0x28,%rax mov %rax,0x8(%rsp) xor %eax,%eax cmp %r13,%rbx je 1638 <_Z5func0RKSt6vectorISt3anySaIS0_EE+0xa8...
_Z5func0RKSt6vectorISt3anySaIS0_EE: endbr64 push r14 push r13 push r12 push rbp push rbx sub rsp, 10h mov rbx, [rdi] mov r12, [rdi+8] mov rax, fs:28h mov [rsp+38h+var_30], rax xor eax, eax cmp r12, rbx jz loc_1658 mov rbp, cs:qword_3CE8 xor r13d, r13d lea r14,...
long long func0(long long a1) { void ( **v1)(long long, _QWORD, _QWORD *); // rbx void ( **v2)(long long, _QWORD, _QWORD *); // r12 unsigned int v3; // r13d void *v4; // rax int *v5; // rdi _QWORD v7[7]; // [rsp+0h] [rbp-38h] BYREF v1 = *(void ( ***)(long long, _QWORD, _QWORD *))a1; v2 = *(void ( ***)...
func0: ENDBR64 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x10 MOV RBX,qword ptr [RDI] MOV R12,qword ptr [RDI + 0x8] MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x8],RAX XOR EAX,EAX CMP R12,RBX JZ 0x00101658 MOV RBP,qword ptr [0x00103ce8] XOR R13D,R13D LEA R14,[0x103d20] NOP dword ptr [RAX] LAB_001015e8:...
/* func0(std::vector<std::any, std::allocator<std::any> > const&) */ int func0(vector *param_1) { int8 *puVar1; char *__s1; int8 uVar2; int iVar3; int1 *puVar4; int8 *puVar5; int iVar6; long in_FS_OFFSET; int1 *local_38; long local_30; uVar2 = int::typeinfo._8_8_; puVar5 = *(int8 **)param_1...
1,011
func0
#include <vector> #include <cassert> #include <typeinfo> #include <any>
int func0(const std::vector<std::any>& list1) { int ctr = 0; for (const auto& i : list1) { if (i.type() == typeid(int)) { ctr++; } } return ctr; }
int main() { assert(func0({1, 2, "abc", 1.2}) == 2); assert(func0({1, 2, 3}) == 3); assert(func0({1, 1.2, 4, 5.1}) == 2); return 0; }
O3
cpp
func0(std::vector<std::any, std::allocator<std::any> > const&): endbr64 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x10,%rsp mov (%rdi),%rbx mov 0x8(%rdi),%r13 mov %fs:0x28,%rax mov %rax,0x8(%rsp) xor %eax,%eax cmp %r13,%rbx je 1678 <_Z5func0RKSt6vectorISt3anySaIS0_EE+0xa8...
_Z5func0RKSt6vectorISt3anySaIS0_EE: endbr64 push r14 push r13 push r12 push rbp push rbx sub rsp, 10h mov rbx, [rdi] mov r12, [rdi+8] mov rax, fs:28h mov [rsp+38h+var_30], rax xor eax, eax cmp r12, rbx jz loc_1698 mov rbp, cs:qword_3CE8 xor r13d, r13d lea r14,...
long long func0(long long a1) { void ( **v1)(long long, _QWORD, _QWORD *); // rbx void ( **v2)(long long, _QWORD, _QWORD *); // r12 unsigned int v3; // r13d void *v4; // rax int *v5; // rdi _QWORD v7[7]; // [rsp+0h] [rbp-38h] BYREF v1 = *(void ( ***)(long long, _QWORD, _QWORD *))a1; v2 = *(void ( ***)...
func0: ENDBR64 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x10 MOV RBX,qword ptr [RDI] MOV R12,qword ptr [RDI + 0x8] MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x8],RAX XOR EAX,EAX CMP R12,RBX JZ 0x00101698 MOV RBP,qword ptr [0x00103ce8] XOR R13D,R13D LEA R14,[0x103d20] NOP dword ptr [RAX] LAB_00101628:...
/* func0(std::vector<std::any, std::allocator<std::any> > const&) */ int func0(vector *param_1) { int8 *puVar1; char *__s1; int8 uVar2; int iVar3; int1 *puVar4; int8 *puVar5; int iVar6; long in_FS_OFFSET; int1 *local_38; long local_30; uVar2 = int::typeinfo._8_8_; puVar5 = *(int8 **)param_1...
1,012
func0
#include <iostream> #include <regex> #include <vector> #include <string> #include <cassert> using namespace std;
vector<string> func0(const string &text) { vector<string> result; regex pattern("[ae]\\w+"); auto iter = sregex_iterator(text.begin(), text.end(), pattern); auto end = sregex_iterator(); for (; iter != end; ++iter) { result.push_back(iter->str()); } return result; }
int main() { { vector<string> expected = {"ame"}; vector<string> result = func0("python programe"); assert(result == expected); } { vector<string> expected = {"ame", "anguage"}; vector<string> result = func0("python programe language"); assert(result ...
O0
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0xe8,%rsp mov %rdi,-0xe8(%rbp) mov %rsi,-0xf0(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax mov -0xe8(%rbp),%rax mov %rax,%rdi callq ...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 0E8h mov [rbp+var_E8], rdi mov [rbp+var_F0], rsi mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax mov rax, [rbp+var_E8] mov rdi, rax call _ZNSt6vectorINSt7__cxx1...
long long func0(long long a1, long long a2) { long long v2; // rbx long long v3; // rax long long v4; // rax _BYTE v6[32]; // [rsp+10h] [rbp-E0h] BYREF _BYTE v7[64]; // [rsp+30h] [rbp-C0h] BYREF _OWORD v8[4]; // [rsp+70h] [rbp-80h] BYREF _BYTE v9[40]; // [rsp+B0h] [rbp-40h] BYREF unsigned long long v10...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0xe8 MOV qword ptr [RBP + -0xe8],RDI MOV qword ptr [RBP + -0xf0],RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX MOV RAX,qword ptr [RBP + -0xe8] MOV RDI,RAX CALL 0x00106248 LEA RAX,[RBP + -0xe0] MOV EDX,0x10 LEA RCX,[0x134051] MOV RSI,RCX ...
/* func0(std::string const&) */ string * func0(string *param_1) { char cVar1; __normal_iterator _Var2; __normal_iterator _Var3; long in_FS_OFFSET; regex local_e8 [32]; regex_iterator<__normal_iterator<char_const*,std::string>,char,std::regex_traits<char>> local_c8 [64]; regex_iterator<__normal_iterato...
1,013
func0
#include <iostream> #include <regex> #include <vector> #include <string> #include <cassert> using namespace std;
vector<string> func0(const string &text) { vector<string> result; regex pattern("[ae]\\w+"); auto iter = sregex_iterator(text.begin(), text.end(), pattern); auto end = sregex_iterator(); for (; iter != end; ++iter) { result.push_back(iter->str()); } return result; }
int main() { { vector<string> expected = {"ame"}; vector<string> result = func0("python programe"); assert(result == expected); } { vector<string> expected = {"ame", "anguage"}; vector<string> result = func0("python programe language"); assert(result ...
O1
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 push %r13 push %r12 push %rbp push %rbx sub $0x258,%rsp mov %rdi,%rbx mov %rsi,%rbp mov %fs:0x28,%rax mov %rax,0x248(%rsp) xor %eax,%eax movq $0x0,(%rdi) movq $0x0,0x8(%rdi) movq $0x0,0...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push rbp mov rbp, rsp push r14 push r13 push r12 push rbx sub rsp, 250h mov rbx, rdi mov r14, rsi mov rax, fs:28h mov [rbp+var_28], rax xor eax, eax mov qword ptr [rdi], 0 mov qword ptr [rdi+8], 0 ...
_QWORD * func0(_QWORD *a1, long long *a2) { char *v4; // rsi long long v5; // rdx long long v6; // rax long long v7; // r12 volatile signed __int32 *v8; // rcx long long v9; // rdx signed __int32 v10; // eax _DWORD *v11; // r12 volatile signed __int32 *v12; // rcx long long v13; // rdx signed __in...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x250 MOV RBX,RDI MOV R14,RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x28],RAX XOR EAX,EAX MOV qword ptr [RDI],0x0 MOV qword ptr [RDI + 0x8],0x0 MOV qword ptr [RDI + 0x10],0x0 LEA R12,[RBP + -0x258] MOV RDI,R12 CALL 0x001046f0 MO...
/* func0(std::string const&) */ string * func0(string *param_1) { _Sp_counted_base<(_Lock_policy)2> *p_Var1; long *plVar2; int *__src; _Sp_counted_base<(_Lock_policy)2> *p_Var3; bool bVar4; char cVar5; int iVar6; uint uVar7; int8 *puVar8; ulong uVar9; uint uVar10; long lVar11; long *in_RSI; ...
1,014
func0
#include <iostream> #include <regex> #include <vector> #include <string> #include <cassert> using namespace std;
vector<string> func0(const string &text) { vector<string> result; regex pattern("[ae]\\w+"); auto iter = sregex_iterator(text.begin(), text.end(), pattern); auto end = sregex_iterator(); for (; iter != end; ++iter) { result.push_back(iter->str()); } return result; }
int main() { { vector<string> expected = {"ame"}; vector<string> result = func0("python programe"); assert(result == expected); } { vector<string> expected = {"ame", "anguage"}; vector<string> result = func0("python programe language"); assert(result ...
O2
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 push %r15 push %r14 push %r13 push %r12 mov %rdi,%r12 push %rbp push %rbx mov %rsi,%rbx sub $0x278,%rsp mov %fs:0x28,%rax mov %rax,0x268(%rsp) xor %eax,%eax movq $0x0,(%rdi) lea 0x90...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push rbp pxor xmm0, xmm0 mov rbp, rsp push r15 push r14 lea r14, [rbp+var_268] lea r15, [rbp+var_1D0] push r13 mov r13, rsi push r12 push rbx mov rbx, rdi sub rsp, 278h mov rax, fs:28h mov [rbp+v...
long long func0(long long a1, unsigned long long *a2) { char *v4; // rsi __m128i v5; // xmm0 volatile signed __int32 *v6; // r12 long long v7; // rdx volatile signed __int32 *v8; // rcx signed __int32 v9; // eax long long v10; // r12 long long v11; // rdx volatile signed __int32 *v12; // rcx signed...
func0: ENDBR64 PUSH RBP PXOR XMM0,XMM0 MOV RBP,RSP PUSH R15 PUSH R14 LEA R14,[RBP + -0x268] LEA R15,[RBP + -0x1d0] PUSH R13 MOV R13,RSI PUSH R12 PUSH RBX MOV RBX,RDI SUB RSP,0x278 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x38],RAX XOR EAX,EAX MOV qword ptr [RDI + 0x10],0x0 MOVUPS xmmword ptr [RDI],XMM0 MOV RDI...
/* WARNING: Restarted to delay deadcode elimination for space: stack */ /* func0(std::string const&) */ string * func0(string *param_1) { _Sp_counted_base<(_Lock_policy)2> *p_Var1; long lVar2; int *__src; int8 uVar3; int auVar4 [16]; bool bVar5; int iVar6; long *plVar7; uint uVar8; uint uVar9; l...
1,015
func0
#include <iostream> #include <regex> #include <vector> #include <string> #include <cassert> using namespace std;
vector<string> func0(const string &text) { vector<string> result; regex pattern("[ae]\\w+"); auto iter = sregex_iterator(text.begin(), text.end(), pattern); auto end = sregex_iterator(); for (; iter != end; ++iter) { result.push_back(iter->str()); } return result; }
int main() { { vector<string> expected = {"ame"}; vector<string> result = func0("python programe"); assert(result == expected); } { vector<string> expected = {"ame", "anguage"}; vector<string> result = func0("python programe language"); assert(result ...
O3
cpp
func0(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 mov %rsi,%rbp push %rbx sub $0x278,%rsp mov %fs:0x28,%rax mov %rax,0x268(%rsp) xor %eax,%eax lea 0x90...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push rbp pxor xmm0, xmm0 mov rbp, rsp push r15 push r14 lea r14, [rbp+var_268] lea r15, [rbp+var_1D0] push r13 mov r13, rsi push r12 push rbx mov rbx, rdi sub rsp, 278h mov rax, fs:28h mov [rbp+v...
long long func0(long long a1, unsigned long long *a2) { __m128i v3; // xmm0 long long v4; // rdi void *v5; // rdi unsigned long long v6; // r12 void **v7; // rax void **v8; // r14 unsigned long long v9; // rax unsigned long long v10; // rdx char v11; // al long long v12; // rcx char *v13; // r8 ...
func0: ENDBR64 PUSH RBP PXOR XMM0,XMM0 MOV RBP,RSP PUSH R15 PUSH R14 LEA R14,[RBP + -0x268] LEA R15,[RBP + -0x1d0] PUSH R13 MOV R13,RSI PUSH R12 PUSH RBX MOV RBX,RDI SUB RSP,0x278 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x38],RAX XOR EAX,EAX MOV qword ptr [RDI + 0x10],0x0 MOVUPS xmmword ptr [RDI],XMM0 MOV RDI...
/* WARNING: Restarted to delay deadcode elimination for space: stack */ /* func0(std::string const&) */ string * func0(string *param_1) { int *__src; int8 this; int auVar1 [16]; bool bVar2; long *plVar3; uint uVar4; long lVar5; uint uVar6; long *in_RSI; long lVar7; ulong uVar8; int8 *puVar9; ...
1,016
func0
#include <iostream> #include <vector> #include <assert.h> #include <string> #include <functional>
std::vector<std::vector<std::string>> func0(std::vector<std::string> l, int n) { int size = l.size(); std::vector<std::vector<std::string>> result; // Helper function to generate combinations std::function<void(int, std::vector<std::string>&, int)> generate = [&](int index, std::vect...
int main() { std::vector<std::vector<std::string>> expected; expected = {{"Red"}, {"Green"}, {"Blue"}}; assert(func0({"Red", "Green", "Blue"}, 1) == expected); expected = {{"Red", "Red"}, {"Red", "Green"}, {"Red", "Blue"}, {"Green", "Green"}, {"Green", "Blue"}, {"Blue", "Blue"}}; assert(func0...
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> > > >, int)::{lambda(int, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allo...
_ZZ5func0St6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEiENKUliRS7_iE_clEiS8_i: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_18], rdi mov [rbp+var_1C], esi mov [rbp+var_28], rdx mov [rbp+var_20], ecx mov rax, [rbp+var_18] mov rax, [rax] mov eax, [rax] cmp...
long long func0(std::vector<std::string>,int)::{lambda(int,std::vector<std::string>&,int)#1}::operator()( long long a1, int a2, long long a3, int a4) { long long result; // rax long long v5; // rax if ( a4 == **(_DWORD **)a1 ) return std::vector<std::vector<std::string>>::pus...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x98 MOV qword ptr [RBP + -0x88],RDI MOV qword ptr [RBP + -0x90],RSI MOV dword ptr [RBP + -0x94],EDX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX MOV RAX,qword ptr [RBP + -0x90] MOV RDI,RAX CALL 0x00103dbe MOV dword ptr [RBP + -0x74],EAX MO...
/* func0(std::vector<std::string, std::allocator<std::string > >, int) */ vector<std::vector<std::string,std::allocator<std::string>>,std::allocator<std::vector<std::string,std::allocator<std::string>>>> * func0(vector<std::vector<std::string,std::allocator<std::string>>,std::allocator<std::vector<std::string,std::all...
1,017
func0
#include <iostream> #include <vector> #include <assert.h> #include <string> #include <functional>
std::vector<std::vector<std::string>> func0(std::vector<std::string> l, int n) { int size = l.size(); std::vector<std::vector<std::string>> result; // Helper function to generate combinations std::function<void(int, std::vector<std::string>&, int)> generate = [&](int index, std::vect...
int main() { std::vector<std::vector<std::string>> expected; expected = {{"Red"}, {"Green"}, {"Blue"}}; assert(func0({"Red", "Green", "Blue"}, 1) == expected); expected = {{"Red", "Red"}, {"Red", "Green"}, {"Red", "Blue"}, {"Green", "Green"}, {"Green", "Blue"}, {"Blue", "Blue"}}; assert(func0...
O1
cpp
std::_Function_base::_Base_manager<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> > > >, int)::{lambda(int, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>...
_ZNSt17_Function_handlerIFviRSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EEiEZ5func0S8_iEUliS9_iE_E10_M_managerERSt9_Any_dataRKSD_St18_Manager_operation: endbr64 push rbp push rbx sub rsp, 8 mov rbx, rdi test edx, edx jz short loc_13DD cmp edx, 1 jz short loc_13F3 ...
long long std::_Function_handler<void ()(int,std::vector<std::string> &,int),func0(std::vector<std::string>,int)::{lambda(int,std::vector<std::string> &,int)#1}>::_M_manager( __m128i **a1, const __m128i **a2, int a3) { __m128i *v3; // rdi const __m128i *v5; // rbp __m128i *v6; // rax i...
func0: ENDBR64 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x70 MOV R12,RDI MOV RBX,RSI MOV dword ptr [RSP + 0xc],EDX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x68],RAX XOR EAX,EAX MOV RAX,qword ptr [RSI + 0x8] SUB RAX,qword ptr [RSI] SAR RAX,0x5 MOV dword ptr [RSP + 0x14],EAX MOV qword ptr [RDI],0x0 MOV qword ptr [RDI ...
/* func0(std::vector<std::string, std::allocator<std::string > >, int) */ int8 * func0(vector param_1,int param_2) { int8 *puVar1; long *plVar2; int8 *puVar3; int4 in_register_00000034; long *plVar4; int4 in_register_0000003c; int8 *puVar5; long in_FS_OFFSET; int local_7c [8]; int4 local_74; int...
1,018
func0
#include <iostream> #include <vector> #include <assert.h> #include <string> #include <functional>
std::vector<std::vector<std::string>> func0(std::vector<std::string> l, int n) { int size = l.size(); std::vector<std::vector<std::string>> result; // Helper function to generate combinations std::function<void(int, std::vector<std::string>&, int)> generate = [&](int index, std::vect...
int main() { std::vector<std::vector<std::string>> expected; expected = {{"Red"}, {"Green"}, {"Blue"}}; assert(func0({"Red", "Green", "Blue"}, 1) == expected); expected = {{"Red", "Red"}, {"Red", "Green"}, {"Red", "Blue"}, {"Green", "Green"}, {"Green", "Blue"}, {"Blue", "Blue"}}; assert(func0...
O2
cpp
std::_Function_base::_Base_manager<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> > > >, int)::{lambda(int, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>...
_ZNSt17_Function_handlerIFviRSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EEiEZ5func0S8_iEUliS9_iE_E10_M_managerERSt9_Any_dataRKSD_St18_Manager_operation: endbr64 push rbp push rbx mov rbx, rdi sub rsp, 8 test edx, edx jz short loc_3120 cmp edx, 1 jz short loc_3108 ...
long long std::_Function_handler<void ()(int,std::vector<std::string> &,int),func0(std::vector<std::string>,int)::{lambda(int,std::vector<std::string> &,int)#1}>::_M_manager( __m128i **a1, const __m128i **a2, int a3) { __m128i *v3; // rdi const __m128i *v5; // rbp __m128i *v6; // rax i...
func0: ENDBR64 PUSH R13 PXOR XMM0,XMM0 PUSH R12 MOV R12,RDI PUSH RBP PUSH RBX MOV RBX,RSI SUB RSP,0x78 MOV dword ptr [RSP + 0xc],EDX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x68],RAX MOV RAX,qword ptr [RSI + 0x8] MOV qword ptr [RSP + 0x50],0x0 MOV qword ptr [RSP + 0x58],0x0 SUB RAX,qword ptr [RSI] MOV qword pt...
/* func0(std::vector<std::string, std::allocator<std::string > >, int) */ int (*) [16] func0(vector param_1,int param_2) { long lVar1; long lVar2; int8 uVar3; long *plVar4; int8 *puVar5; int4 in_register_00000034; long *plVar6; int4 in_register_0000003c; int (*pauVar7) [16]; long in_FS_OFFSET; i...
1,019
func0
#include <iostream> #include <vector> #include <assert.h> #include <string> #include <functional>
std::vector<std::vector<std::string>> func0(std::vector<std::string> l, int n) { int size = l.size(); std::vector<std::vector<std::string>> result; // Helper function to generate combinations std::function<void(int, std::vector<std::string>&, int)> generate = [&](int index, std::vect...
int main() { std::vector<std::vector<std::string>> expected; expected = {{"Red"}, {"Green"}, {"Blue"}}; assert(func0({"Red", "Green", "Blue"}, 1) == expected); expected = {{"Red", "Red"}, {"Red", "Green"}, {"Red", "Blue"}, {"Green", "Green"}, {"Green", "Blue"}, {"Blue", "Blue"}}; assert(func0...
O3
cpp
std::_Function_base::_Base_manager<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> > > >, int)::{lambda(int, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>...
_ZNSt17_Function_handlerIFviRSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EEiEZ5func0S8_iEUliS9_iE_E10_M_managerERSt9_Any_dataRKSD_St18_Manager_operation: endbr64 push rbp push rbx mov rbx, rdi sub rsp, 8 test edx, edx jz short loc_3290 cmp edx, 1 jz short loc_3278 ...
long long std::_Function_handler<void ()(int,std::vector<std::string> &,int),func0(std::vector<std::string>,int)::{lambda(int,std::vector<std::string> &,int)#1}>::_M_manager( __m128i **a1, const __m128i **a2, int a3) { __m128i *v3; // rdi const __m128i *v5; // rbp __m128i *v6; // rax i...
func0: ENDBR64 PUSH R13 PXOR XMM0,XMM0 PUSH R12 MOV R12,RDI PUSH RBP PUSH RBX MOV RBX,RSI SUB RSP,0x78 MOV dword ptr [RSP + 0xc],EDX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x68],RAX MOV RAX,qword ptr [RSI + 0x8] MOV qword ptr [RSP + 0x50],0x0 MOV qword ptr [RSP + 0x58],0x0 SUB RAX,qword ptr [RSI] MOV qword pt...
/* func0(std::vector<std::string, std::allocator<std::string > >, int) */ int (*) [16] func0(vector param_1,int param_2) { long lVar1; long lVar2; int8 *puVar3; int8 uVar4; long *plVar5; int8 *puVar6; int4 in_register_00000034; long *plVar7; int4 in_register_0000003c; int (*pauVar8) [16]; long i...
1,020
func0
#include <assert.h>
int func0(int n) { int ctr = 0; for (int num = 2; num < n; num++) { bool isPrime = true; for (int i = 2; i * i <= num; i++) { if (num % i == 0) { isPrime = false; break; } } if (isPrime) { ctr++; ...
int main() { assert(func0(5) == 2); assert(func0(10) == 4); assert(func0(100) == 25); return 0; }
O0
cpp
func0(int): endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x14(%rbp) movl $0x0,-0xc(%rbp) movl $0x2,-0x8(%rbp) mov -0x8(%rbp),%eax cmp -0x14(%rbp),%eax jge 11a9 <_Z5func0i+0x60> movb $0x1,-0xd(%rbp) movl $0x2,-0x4(%rbp) mov -0x4(%rbp),%eax imul %eax,%eax cmp %eax,-0x8(%rbp) jl 1199 <_Z5...
_Z5func0i: endbr64 push rbp mov rbp, rsp mov [rbp+var_14], edi mov [rbp+var_C], 0 mov [rbp+var_8], 2 jmp short loc_11A1 loc_1164: mov [rbp+var_D], 1 mov [rbp+var_4], 2 jmp short loc_1188 loc_1171: mov eax, [rbp+var_8] cdq idiv [rbp+var_4] mov eax, edx test eax, eax jnz ...
long long func0(int a1) { char v2; // [rsp+7h] [rbp-Dh] unsigned int v3; // [rsp+8h] [rbp-Ch] int i; // [rsp+Ch] [rbp-8h] int j; // [rsp+10h] [rbp-4h] v3 = 0; for ( i = 2; i < a1; ++i ) { v2 = 1; for ( j = 2; i >= j * j; ++j ) { if ( !(i % j) ) { v2 = 0; break; ...
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x14],EDI MOV dword ptr [RBP + -0xc],0x0 MOV dword ptr [RBP + -0x8],0x2 JMP 0x001011a1 LAB_00101164: MOV byte ptr [RBP + -0xd],0x1 MOV dword ptr [RBP + -0x4],0x2 JMP 0x00101188 LAB_00101171: MOV EAX,dword ptr [RBP + -0x8] CDQ IDIV dword ptr [RBP + -0x4] MOV EAX,...
/* func0(int) */ int func0(int param_1) { bool bVar1; int4 local_14; int4 local_10; int4 local_c; local_14 = 0; local_10 = 2; do { if (param_1 <= local_10) { return local_14; } bVar1 = true; for (local_c = 2; local_c * local_c <= local_10; local_c = local_c + 1) { if (loca...
1,021
func0
#include <assert.h>
int func0(int n) { int ctr = 0; for (int num = 2; num < n; num++) { bool isPrime = true; for (int i = 2; i * i <= num; i++) { if (num % i == 0) { isPrime = false; break; } } if (isPrime) { ctr++; ...
int main() { assert(func0(5) == 2); assert(func0(10) == 4); assert(func0(100) == 25); return 0; }
O1
cpp
func0(int): endbr64 cmp $0x2,%edi jle 115f <_Z5func0i+0x16> mov $0x2,%esi mov $0x0,%r8d jmp 1174 <_Z5func0i+0x2b> mov $0x0,%r8d mov %r8d,%eax retq add $0x1,%r8d add $0x1,%esi cmp %esi,%edi je 1165 <_Z5func0i+0x1c> cmp $0x3,%esi jle 1169 <_Z5func0i+0x20> test $0x1,%sil je 11...
_Z5func0i: endbr64 mov esi, 2 mov r8d, 0 cmp edi, 2 jg short loc_116C loc_115D: mov eax, r8d retn loc_1161: add r8d, 1 loc_1165: add esi, 1 cmp edi, esi jz short loc_115D loc_116C: cmp esi, 3 jle short loc_1161 test sil, 1 jz short loc_1165 mov ecx, 2 loc_117C: ...
long long func0(int a1) { int v1; // esi unsigned int v2; // r8d int v4; // ecx v1 = 2; v2 = 0; if ( a1 > 2 ) { do { if ( v1 > 3 ) { if ( (v1 & 1) == 0 ) goto LABEL_4; v4 = 2; while ( 1 ) { ++v4; if ( v4 * v4 > v1 ) ...
func0: ENDBR64 MOV ESI,0x2 MOV R8D,0x0 CMP EDI,0x2 JG 0x0010116c LAB_0010115d: MOV EAX,R8D RET LAB_00101161: ADD R8D,0x1 LAB_00101165: ADD ESI,0x1 CMP EDI,ESI JZ 0x0010115d LAB_0010116c: CMP ESI,0x3 JLE 0x00101161 TEST SIL,0x1 JZ 0x00101165 MOV ECX,0x2 LAB_0010117c: ADD ECX,0x1 MOV EAX,ECX IMUL EAX,ECX CMP EAX,ESI JG 0...
/* func0(int) */ int func0(int param_1) { int iVar1; uint uVar2; int iVar3; uVar2 = 2; iVar3 = 0; if (2 < param_1) { do { if ((int)uVar2 < 4) { LAB_00101161: iVar3 = iVar3 + 1; } else if ((uVar2 & 1) != 0) { iVar1 = 2; do { iVar1 = iVar1 + 1; ...
1,022
func0
#include <assert.h>
int func0(int n) { int ctr = 0; for (int num = 2; num < n; num++) { bool isPrime = true; for (int i = 2; i * i <= num; i++) { if (num % i == 0) { isPrime = false; break; } } if (isPrime) { ctr++; ...
int main() { assert(func0(5) == 2); assert(func0(10) == 4); assert(func0(100) == 25); return 0; }
O2
cpp
func0(int): endbr64 cmp $0x2,%edi jle 1274 <_Z5func0i+0x54> mov $0x2,%esi xor %r8d,%r8d nopl 0x0(%rax) cmp $0x3,%esi jle 1265 <_Z5func0i+0x45> test $0x1,%sil je 1269 <_Z5func0i+0x49> mov $0x2,%ecx jmp 1259 <_Z5func0i+0x39> nopw 0x0(%rax,%rax,1) mov %esi,%eax cltd idiv %ecx test ...
_Z5func0i: endbr64 mov esi, 2 xor r8d, r8d cmp edi, 2 jle short loc_1240 nop dword ptr [rax+00000000h] loc_1208: cmp esi, 3 jle short loc_1235 test sil, 1 jz short loc_1239 mov ecx, 2 jmp short loc_1229 loc_1220: mov eax, esi cdq idiv ecx test edx, edx jz short...
long long func0(int a1) { int v1; // esi unsigned int v2; // r8d int v3; // ecx v1 = 2; v2 = 0; if ( a1 > 2 ) { while ( 1 ) { if ( v1 <= 3 ) goto LABEL_7; if ( (v1 & 1) != 0 ) break; LABEL_8: if ( a1 == ++v1 ) return v2; } v3 = 2; while ( 1 )...
func0: ENDBR64 MOV ESI,0x2 XOR R8D,R8D CMP EDI,0x2 JLE 0x00101240 NOP dword ptr [RAX] LAB_00101208: CMP ESI,0x3 JLE 0x00101235 TEST SIL,0x1 JZ 0x00101239 MOV ECX,0x2 JMP 0x00101229 LAB_00101220: MOV EAX,ESI CDQ IDIV ECX TEST EDX,EDX JZ 0x00101239 LAB_00101229: ADD ECX,0x1 MOV EAX,ECX IMUL EAX,ECX CMP EAX,ESI JLE 0x0010...
/* func0(int) */ int func0(int param_1) { int iVar1; uint uVar2; int iVar3; uVar2 = 2; iVar3 = 0; if (2 < param_1) { do { if ((int)uVar2 < 4) { LAB_00101235: iVar3 = iVar3 + 1; } else if ((uVar2 & 1) != 0) { iVar1 = 2; do { iVar1 = iVar1 + 1; ...
1,023
func0
#include <assert.h>
int func0(int n) { int ctr = 0; for (int num = 2; num < n; num++) { bool isPrime = true; for (int i = 2; i * i <= num; i++) { if (num % i == 0) { isPrime = false; break; } } if (isPrime) { ctr++; ...
int main() { assert(func0(5) == 2); assert(func0(10) == 4); assert(func0(100) == 25); return 0; }
O3
cpp
func0(int): endbr64 cmp $0x2,%edi jle 1284 <_Z5func0i+0x64> cmp $0x3,%edi setg %sil setg %r8b movzbl %sil,%esi movzbl %r8b,%r8d add $0x3,%esi add $0x1,%r8d cmp %esi,%edi jle 1280 <_Z5func0i+0x60> nopw 0x0(%rax,%rax,1) test $0x1,%sil je 1279 <_Z5func0i+0x59> mov $0x2,%ecx jmp 1269 ...
_Z5func0i: endbr64 xor r8d, r8d cmp edi, 2 jle short loc_1230 cmp edi, 3 setnz sil setnz r8b movzx esi, sil movzx r8d, r8b add esi, 3 add r8d, 1 cmp edi, esi jle short loc_1230 loc_11FA: test sil, 1 jz short loc_1229 mov ecx, 2 jmp short loc_1219 loc_1210: mov ...
long long func0(int a1) { unsigned int v1; // r8d _BOOL4 v2; // r8d int v3; // esi int v4; // ecx v1 = 0; if ( a1 > 2 ) { v2 = a1 != 3; v3 = v2 + 3; v1 = v2 + 1; if ( a1 > v3 ) { do { if ( (v3 & 1) != 0 ) { v4 = 2; while ( 1 ) ...
func0: ENDBR64 XOR R8D,R8D CMP EDI,0x2 JLE 0x00101230 CMP EDI,0x3 SETNZ SIL SETNZ R8B MOVZX ESI,SIL MOVZX R8D,R8B ADD ESI,0x3 ADD R8D,0x1 CMP EDI,ESI JLE 0x00101230 LAB_001011fa: TEST SIL,0x1 JZ 0x00101229 MOV ECX,0x2 JMP 0x00101219 LAB_00101210: MOV EAX,ESI CDQ IDIV ECX TEST EDX,EDX JZ 0x00101229 LAB_00101219: ADD ECX...
/* func0(int) */ int func0(int param_1) { int iVar1; uint uVar2; int iVar3; iVar3 = 0; if (2 < param_1) { uVar2 = (param_1 != 3) + 3; iVar3 = (param_1 != 3) + 1; if ((int)uVar2 < param_1) { do { if ((uVar2 & 1) != 0) { iVar1 = 2; do { iVar1 = iVar...
1,024
func0
#include <assert.h> #include <utility>
std::pair<int, int> func0(int a, int b) { int temp = a; a = b; b = temp; return std::make_pair(a, b); }
int main() { assert(func0(10, 20) == std::make_pair(20, 10)); assert(func0(15, 17) == std::make_pair(17, 15)); assert(func0(100, 200) == std::make_pair(200, 100)); 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 -0x14(%rbp),%eax mov %eax,-0x4(%rbp) mov -0x18(%rbp),%eax mov %eax,-0x14(%rbp) mov -0x4(%rbp),%eax mov %eax,-0x18(%rbp) lea -0x18(%rbp),%rdx lea -0x14(%rbp),%rax mov %rd...
_Z5func0ii: endbr64 push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_14], edi mov [rbp+var_18], esi mov eax, [rbp+var_14] mov [rbp+var_4], eax mov eax, [rbp+var_18] mov [rbp+var_14], eax mov eax, [rbp+var_4] mov [rbp+var_18], eax lea rdx, [rbp+var_18] lea rax, [rbp+var_...
long long func0(int a1, int a2) { int v3; // [rsp+8h] [rbp-18h] BYREF _DWORD v4[5]; // [rsp+Ch] [rbp-14h] BYREF v4[4] = a1; v4[0] = a2; v3 = a1; return std::make_pair<int &,int &>(v4, &v3); }
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0x14],EDI MOV dword ptr [RBP + -0x18],ESI MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x4],EAX MOV EAX,dword ptr [RBP + -0x18] MOV dword ptr [RBP + -0x14],EAX MOV EAX,dword ptr [RBP + -0x4] MOV dword ptr [RBP + -0x18],EAX LEA RDX,[RBP + -0...
/* func0(int, int) */ void func0(int param_1,int param_2) { int local_20; int local_1c [4]; int local_c; local_20 = param_1; local_1c[0] = param_2; local_c = param_1; std::make_pair<int&,int&>(local_1c,&local_20); return; }
1,025
func0
#include <assert.h> #include <utility>
std::pair<int, int> func0(int a, int b) { int temp = a; a = b; b = temp; return std::make_pair(a, b); }
int main() { assert(func0(10, 20) == std::make_pair(20, 10)); assert(func0(15, 17) == std::make_pair(17, 15)); assert(func0(100, 200) == std::make_pair(200, 100)); return 0; }
O1
cpp
func0(int, int): endbr64 shl $0x20,%rdi mov %esi,%eax or %rdi,%rax retq
_Z5func0ii: endbr64 shl rdi, 20h mov eax, esi or rax, rdi retn
long long func0(long long a1, unsigned int a2) { return (a1 << 32) | a2; }
func0: ENDBR64 SHL RDI,0x20 MOV EAX,ESI OR RAX,RDI RET
/* func0(int, int) */ int8 func0(int param_1,int param_2) { return CONCAT44(param_1,param_2); }
1,026
func0
#include <assert.h> #include <utility>
std::pair<int, int> func0(int a, int b) { int temp = a; a = b; b = temp; return std::make_pair(a, b); }
int main() { assert(func0(10, 20) == std::make_pair(20, 10)); assert(func0(15, 17) == std::make_pair(17, 15)); assert(func0(100, 200) == std::make_pair(200, 100)); return 0; }
O2
cpp
func0(int, int): endbr64 shl $0x20,%rdi mov %esi,%eax or %rdi,%rax retq xchg %ax,%ax
_Z5func0ii: endbr64 shl rdi, 20h mov eax, esi or rax, rdi retn
long long func0(long long a1, unsigned int a2) { return (a1 << 32) | a2; }
func0: ENDBR64 SHL RDI,0x20 MOV EAX,ESI OR RAX,RDI RET
/* func0(int, int) */ int8 func0(int param_1,int param_2) { return CONCAT44(param_1,param_2); }
1,027
func0
#include <assert.h> #include <utility>
std::pair<int, int> func0(int a, int b) { int temp = a; a = b; b = temp; return std::make_pair(a, b); }
int main() { assert(func0(10, 20) == std::make_pair(20, 10)); assert(func0(15, 17) == std::make_pair(17, 15)); assert(func0(100, 200) == std::make_pair(200, 100)); return 0; }
O3
cpp
func0(int, int): endbr64 shl $0x20,%rdi mov %esi,%eax or %rdi,%rax retq xchg %ax,%ax
_Z5func0ii: endbr64 shl rdi, 20h mov eax, esi or rax, rdi retn
long long func0(long long a1, unsigned int a2) { return (a1 << 32) | a2; }
func0: ENDBR64 SHL RDI,0x20 MOV EAX,ESI OR RAX,RDI RET
/* func0(int, int) */ int8 func0(int param_1,int param_2) { return CONCAT44(param_1,param_2); }
1,028
func0
#include <vector> #include <cassert>
int func0(const std::vector<int>& array_nums) { int count = 0; for (int num : array_nums) { if (num % 2 != 0) { count++; } } return count; }
int main() { assert(func0({1, 2, 3, 5, 7, 8, 10}) == 4); assert(func0({10, 15, 14, 13, -18, 12, -20}) == 2); assert(func0({1, 2, 4, 8, 9}) == 2); 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 movl $0x0,-0x28(%rbp) mov -0x38(%rbp),%rax mov %rax,-0x10(%rbp) mov -0x10(%rbp),%rax mov %rax,%rdi callq 15c8 <...
_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 [rbp+var_28], 0 mov rax, [rbp+var_38] mov [rbp+var_10], rax mov rax, [rbp+var_10] mov rdi, rax call _ZNKSt6vectorIiSaIiEE5...
long long func0(long long a1) { unsigned int v2; // [rsp+18h] [rbp-28h] long long v3; // [rsp+20h] [rbp-20h] BYREF _QWORD v4[3]; // [rsp+28h] [rbp-18h] BYREF v4[2] = __readfsqword(0x28u); v2 = 0; v4[1] = a1; v3 = std::vector<int>::begin(a1); v4[0] = std::vector<int>::end(a1); while ( (unsigned __int...
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 dword ptr [RBP + -0x28],0x0 MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,RAX CALL 0x0010162e MOV qword pt...
/* func0(std::vector<int, std::allocator<int> > const&) */ int func0(vector *param_1) { bool bVar1; uint *puVar2; 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); local_30 = 0; l...
1,029
func0
#include <vector> #include <cassert>
int func0(const std::vector<int>& array_nums) { int count = 0; for (int num : array_nums) { if (num % 2 != 0) { count++; } } return count; }
int main() { assert(func0({1, 2, 3, 5, 7, 8, 10}) == 4); assert(func0({10, 15, 14, 13, -18, 12, -20}) == 2); assert(func0({1, 2, 4, 8, 9}) == 2); return 0; }
O1
cpp
func0(std::vector<int, std::allocator<int> > const&): endbr64 mov (%rdi),%rax mov 0x8(%rdi),%rsi cmp %rsi,%rax je 1235 <_Z5func0RKSt6vectorIiSaIiEE+0x2c> mov $0x0,%ecx mov (%rax),%edx and $0x1,%edx cmp $0x1,%edx sbb $0xffffffff,%ecx add $0x4,%rax cmp %rax,%rsi jne 121e <_Z5func0RKSt...
_Z5func0RKSt6vectorIiSaIiEE: endbr64 mov rax, [rdi] mov rsi, [rdi+8] cmp rsi, rax jz short loc_1235 mov ecx, 0 loc_121E: mov edx, [rax] and edx, 1 cmp edx, 1 sbb ecx, 0FFFFFFFFh add rax, 4 cmp rax, rsi jnz short loc_121E loc_1232: mov eax, ecx retn loc_1235: mov ...
long long func0(long long a1) { _DWORD *v1; // rax _DWORD *v2; // rsi unsigned int v3; // ecx v1 = *(_DWORD **)a1; v2 = *(_DWORD **)(a1 + 8); if ( v2 == *(_DWORD **)a1 ) { return 0; } else { v3 = 0; do v3 -= ((*v1++ & 1) == 0) - 1; while ( v1 != v2 ); } return v3; }
func0: ENDBR64 MOV RAX,qword ptr [RDI] MOV RSI,qword ptr [RDI + 0x8] CMP RSI,RAX JZ 0x00101235 MOV ECX,0x0 LAB_0010121e: MOV EDX,dword ptr [RAX] AND EDX,0x1 CMP EDX,0x1 SBB ECX,-0x1 ADD RAX,0x4 CMP RAX,RSI JNZ 0x0010121e LAB_00101232: MOV EAX,ECX RET LAB_00101235: MOV ECX,0x0 JMP 0x00101232
/* func0(std::vector<int, std::allocator<int> > const&) */ int func0(vector *param_1) { uint *puVar1; int iVar2; puVar1 = *(uint **)param_1; if (*(uint **)(param_1 + 8) == puVar1) { iVar2 = 0; } else { iVar2 = 0; do { iVar2 = (iVar2 + 1) - (uint)((*puVar1 & 1) == 0); puVar1 = pu...
1,030
func0
#include <vector> #include <cassert>
int func0(const std::vector<int>& array_nums) { int count = 0; for (int num : array_nums) { if (num % 2 != 0) { count++; } } return count; }
int main() { assert(func0({1, 2, 3, 5, 7, 8, 10}) == 4); assert(func0({10, 15, 14, 13, -18, 12, -20}) == 2); assert(func0({1, 2, 4, 8, 9}) == 2); return 0; }
O2
cpp
func0(std::vector<int, std::allocator<int> > const&): endbr64 mov (%rdi),%rax mov 0x8(%rdi),%rcx xor %r8d,%r8d cmp %rcx,%rax je 147d <_Z5func0RKSt6vectorIiSaIiEE+0x2d> nopl 0x0(%rax,%rax,1) mov (%rax),%edx and $0x1,%edx cmp $0x1,%edx sbb $0xffffffff,%r8d add $0x4,%rax cmp %rax,%rcx j...
_Z5func0RKSt6vectorIiSaIiEE: endbr64 mov rax, [rdi] mov rsi, [rdi+8] xor ecx, ecx cmp rsi, rax jz short loc_142C nop word ptr [rax+rax+00h] loc_1418: mov edx, [rax] and edx, 1 cmp edx, 1 sbb ecx, 0FFFFFFFFh add rax, 4 cmp rsi, rax jnz short loc_1418 loc_142C: mov ...
long long func0(long long a1) { _DWORD *v1; // rax _DWORD *v2; // rsi unsigned int v3; // ecx v1 = *(_DWORD **)a1; v2 = *(_DWORD **)(a1 + 8); v3 = 0; if ( v2 != *(_DWORD **)a1 ) { do v3 -= ((*v1++ & 1) == 0) - 1; while ( v2 != v1 ); } return v3; }
func0: ENDBR64 MOV RAX,qword ptr [RDI] MOV RSI,qword ptr [RDI + 0x8] XOR ECX,ECX CMP RSI,RAX JZ 0x0010142c NOP word ptr [RAX + RAX*0x1] LAB_00101418: MOV EDX,dword ptr [RAX] AND EDX,0x1 CMP EDX,0x1 SBB ECX,-0x1 ADD RAX,0x4 CMP RSI,RAX JNZ 0x00101418 LAB_0010142c: MOV EAX,ECX RET
/* func0(std::vector<int, std::allocator<int> > const&) */ int func0(vector *param_1) { uint *puVar1; int iVar2; iVar2 = 0; for (puVar1 = *(uint **)param_1; *(uint **)(param_1 + 8) != puVar1; puVar1 = puVar1 + 1) { iVar2 = (iVar2 + 1) - (uint)((*puVar1 & 1) == 0); } return iVar2; }
1,031
func0
#include <vector> #include <cassert>
int func0(const std::vector<int>& array_nums) { int count = 0; for (int num : array_nums) { if (num % 2 != 0) { count++; } } return count; }
int main() { assert(func0({1, 2, 3, 5, 7, 8, 10}) == 4); assert(func0({10, 15, 14, 13, -18, 12, -20}) == 2); assert(func0({1, 2, 4, 8, 9}) == 2); return 0; }
O3
cpp
func0(std::vector<int, std::allocator<int> > const&): endbr64 mov (%rdi),%rdx mov 0x8(%rdi),%rsi cmp %rsi,%rdx je 1790 <_Z5func0RKSt6vectorIiSaIiEE+0x100> lea -0x4(%rsi),%rcx mov %rdx,%rax movabs $0x3ffffffffffffffc,%r8 sub %rdx,%rcx shr $0x2,%rcx lea 0x1(%rcx),%rdi test %r8,%rcx je 17...
_Z5func0RKSt6vectorIiSaIiEE: endbr64 mov rdx, [rdi] mov rdi, [rdi+8] cmp rdi, rdx jz loc_16F0 lea rcx, [rdi-4] mov rax, rdx sub rcx, rdx mov rsi, rcx shr rsi, 2 add rsi, 1 cmp rcx, 8 jbe loc_16F9 mov rcx, rsi pxor xmm1, xmm1 movdqa xmm3, cs:xmmword_20F0 shr r...
long long func0(const __m128i **a1) { const __m128i *v1; // rdx const __m128i *v2; // rdi const __m128i *v3; // rax unsigned long long v4; // rsi __m128i v5; // xmm1 __m128i si128; // xmm3 __m128i v7; // xmm0 __m128i v8; // xmm1 long long result; // rax v1 = *a1; v2 = a1[1]; if ( v2 == v1 ) ...
func0: ENDBR64 MOV RDX,qword ptr [RDI] MOV RDI,qword ptr [RDI + 0x8] CMP RDI,RDX JZ 0x001016f0 LEA RCX,[RDI + -0x4] MOV RAX,RDX SUB RCX,RDX MOV RSI,RCX SHR RSI,0x2 ADD RSI,0x1 CMP RCX,0x8 JBE 0x001016f9 MOV RCX,RSI PXOR XMM1,XMM1 MOVDQA XMM3,xmmword ptr [0x001020f0] SHR RCX,0x2 MOVDQA XMM2,XMM1 SHL RCX,0x4 ADD RCX,RDX ...
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* func0(std::vector<int, std::allocator<int> > const&) */ int func0(vector *param_1) { uint *puVar1; uint uVar2; uint *puVar3; uint *puVar4; uint *puVar5; uint *puVar6; ulong uVar7; uint *puVar8; ulong uVar9; int...
1,032
func0
#include <vector> #include <array> #include <algorithm> #include <cassert> using namespace std;
vector<array<int, 2>> func0(const vector<array<int, 2>> &test_tup1, const vector<array<int, 2>> &test_tup2) { vector<array<int, 2>> res; for (size_t i = 0; i < test_tup1.size(); i++) { array<int, 2> temp; for (size_t j = 0; j < test_tup1[i].size(); j++) { temp[j] = max(test_tup1...
int main() { vector<array<int, 2>> a1 = { {1, 3}, {4, 5}, {2, 9}, {1, 10} }; vector<array<int, 2>> b1 = { {6, 7}, {3, 9}, {1, 1}, {7, 3} }; vector<array<int, 2>> ans1 = { {6, 7}, {4, 9}, {2, 9}, {7, 10} }; assert(func0(a1, b1) == ans1); vector<array<int, 2>> a2 = { {2, 4}, {5, 6}, {3, 10}...
O0
cpp
func0(std::vector<std::array<int, 2ul>, std::allocator<std::array<int, 2ul> > > const&, std::vector<std::array<int, 2ul>, std::allocator<std::array<int, 2ul> > > const&): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x48,%rsp mov %rdi,-0x38(%rbp) mov %rsi,-0x40(%rbp) mov %rdx,-0x48(%rbp) mov %fs...
_Z5func0RKSt6vectorISt5arrayIiLm2EESaIS1_EES5_: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 58h mov [rbp+var_48], rdi mov [rbp+var_50], rsi mov [rbp+var_58], rdx mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax mov rax, [rbp+var_48] mov rdi, rax call _ZNSt6vectorIS...
long long func0(long long a1, long long a2, long long a3) { long long v3; // rax long long v4; // rbx long long v5; // rax long long v6; // rax unsigned long long i; // [rsp+28h] [rbp-38h] unsigned long long j; // [rsp+30h] [rbp-30h] _BYTE v11[8]; // [rsp+40h] [rbp-20h] BYREF unsigned long long v12; //...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x58 MOV qword ptr [RBP + -0x48],RDI MOV qword ptr [RBP + -0x50],RSI MOV qword ptr [RBP + -0x58],RDX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX MOV RAX,qword ptr [RBP + -0x48] MOV RDI,RAX CALL 0x00101d76 MOV qword ptr [RBP + -0x38],0x0 JM...
/* func0(std::vector<std::array<int, 2ul>, std::allocator<std::array<int, 2ul> > > const&, std::vector<std::array<int, 2ul>, std::allocator<std::array<int, 2ul> > > const&) */ vector * func0(vector *param_1,vector *param_2) { int iVar1; array<int,2ul> *paVar2; int *piVar3; int *piVar4; ulong uVar5; vec...
1,033
func0
#include <vector> #include <array> #include <algorithm> #include <cassert> using namespace std;
vector<array<int, 2>> func0(const vector<array<int, 2>> &test_tup1, const vector<array<int, 2>> &test_tup2) { vector<array<int, 2>> res; for (size_t i = 0; i < test_tup1.size(); i++) { array<int, 2> temp; for (size_t j = 0; j < test_tup1[i].size(); j++) { temp[j] = max(test_tup1...
int main() { vector<array<int, 2>> a1 = { {1, 3}, {4, 5}, {2, 9}, {1, 10} }; vector<array<int, 2>> b1 = { {6, 7}, {3, 9}, {1, 1}, {7, 3} }; vector<array<int, 2>> ans1 = { {6, 7}, {4, 9}, {2, 9}, {7, 10} }; assert(func0(a1, b1) == ans1); vector<array<int, 2>> a2 = { {2, 4}, {5, 6}, {3, 10}...
O1
cpp
func0(std::vector<std::array<int, 2ul>, std::allocator<std::array<int, 2ul> > > const&, std::vector<std::array<int, 2ul>, std::allocator<std::array<int, 2ul> > > const&): endbr64 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x10,%rsp mov %rdi,%rbx mov %fs:0x28,%rax mov %rax,0x8(%rsp) xor...
_Z5func0RKSt6vectorISt5arrayIiLm2EESaIS1_EES5_: endbr64 push r14 push r13 push r12 push rbp push rbx sub rsp, 10h mov rbx, rdi mov r12, rsi mov r13, rdx 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...
_QWORD * func0(_QWORD *a1, long long *a2, _QWORD *a3) { long long v5; // rax unsigned long long v6; // rbp int *v8; // rcx int *v9; // rax int v10; // edx int v11; // eax _QWORD *v12; // rsi _QWORD v13[7]; // [rsp+0h] [rbp-38h] BYREF v13[1] = __readfsqword(0x28u); *a1 = 0LL; a1[1] = 0LL; a1[2] ...
func0: ENDBR64 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x10 MOV RBX,RDI MOV R12,RSI MOV R13,RDX 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 RAX,qword ptr [RSI] MOV EBP,0x0 MOV R14,RSP CMP RAX,...
/* func0(std::vector<std::array<int, 2ul>, std::allocator<std::array<int, 2ul> > > const&, std::vector<std::array<int, 2ul>, std::allocator<std::array<int, 2ul> > > const&) */ vector * func0(vector *param_1,vector *param_2) { int iVar1; int8 *puVar2; long lVar3; int *piVar4; int *piVar5; long *in_RDX; ...
1,034
func0
#include <vector> #include <array> #include <algorithm> #include <cassert> using namespace std;
vector<array<int, 2>> func0(const vector<array<int, 2>> &test_tup1, const vector<array<int, 2>> &test_tup2) { vector<array<int, 2>> res; for (size_t i = 0; i < test_tup1.size(); i++) { array<int, 2> temp; for (size_t j = 0; j < test_tup1[i].size(); j++) { temp[j] = max(test_tup1...
int main() { vector<array<int, 2>> a1 = { {1, 3}, {4, 5}, {2, 9}, {1, 10} }; vector<array<int, 2>> b1 = { {6, 7}, {3, 9}, {1, 1}, {7, 3} }; vector<array<int, 2>> ans1 = { {6, 7}, {4, 9}, {2, 9}, {7, 10} }; assert(func0(a1, b1) == ans1); vector<array<int, 2>> a2 = { {2, 4}, {5, 6}, {3, 10}...
O2
cpp
func0(std::vector<std::array<int, 2ul>, std::allocator<std::array<int, 2ul> > > const&, std::vector<std::array<int, 2ul>, std::allocator<std::array<int, 2ul> > > const&): endbr64 push %r14 push %r13 push %r12 mov %rdi,%r12 push %rbp push %rbx sub $0x10,%rsp mov %fs:0x28,%rax mov %rax,0x8(%rsp) xor...
_Z5func0RKSt6vectorISt5arrayIiLm2EESaIS1_EES5_: endbr64 push r14 pxor xmm0, xmm0 push r13 push r12 mov r12, rsi push rbp mov rbp, rdi push rbx sub rsp, 10h mov rax, fs:28h mov [rsp+38h+var_30], rax xor eax, eax movups xmmword ptr [rdi], xmm0 mov rcx, [rsi] mov qword pt...
long long func0(long long a1, long long *a2, _QWORD *a3) { long long v5; // rcx long long v7; // rdi long long v8; // rsi long long v9; // rbx long long v10; // rsi int *v11; // r8 int *v12; // rax int v13; // r9d int v14; // edx int v15; // eax _QWORD v17[7]; // [rsp+0h] [rbp-38h] BYREF v17[1...
func0: ENDBR64 PUSH R14 PXOR XMM0,XMM0 PUSH R13 PUSH R12 MOV R12,RSI PUSH RBP MOV RBP,RDI PUSH RBX SUB RSP,0x10 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x8],RAX XOR EAX,EAX MOVUPS xmmword ptr [RDI],XMM0 MOV RCX,qword ptr [RSI] MOV qword ptr [RDI + 0x10],0x0 CMP RCX,qword ptr [RSI + 0x8] JZ 0x00101848 MOV R13,R...
/* func0(std::vector<std::array<int, 2ul>, std::allocator<std::array<int, 2ul> > > const&, std::vector<std::array<int, 2ul>, std::allocator<std::array<int, 2ul> > > const&) */ vector * func0(vector *param_1,vector *param_2) { int iVar1; int *piVar2; long lVar3; long *in_RDX; ulong uVar4; int8 *puVar5; ...
1,035
func0
#include <vector> #include <array> #include <algorithm> #include <cassert> using namespace std;
vector<array<int, 2>> func0(const vector<array<int, 2>> &test_tup1, const vector<array<int, 2>> &test_tup2) { vector<array<int, 2>> res; for (size_t i = 0; i < test_tup1.size(); i++) { array<int, 2> temp; for (size_t j = 0; j < test_tup1[i].size(); j++) { temp[j] = max(test_tup1...
int main() { vector<array<int, 2>> a1 = { {1, 3}, {4, 5}, {2, 9}, {1, 10} }; vector<array<int, 2>> b1 = { {6, 7}, {3, 9}, {1, 1}, {7, 3} }; vector<array<int, 2>> ans1 = { {6, 7}, {4, 9}, {2, 9}, {7, 10} }; assert(func0(a1, b1) == ans1); vector<array<int, 2>> a2 = { {2, 4}, {5, 6}, {3, 10}...
O3
cpp
func0(std::vector<std::array<int, 2ul>, std::allocator<std::array<int, 2ul> > > const&, std::vector<std::array<int, 2ul>, std::allocator<std::array<int, 2ul> > > const&): endbr64 push %r14 pxor %xmm0,%xmm0 push %r13 push %r12 mov %rdi,%r12 push %rbp push %rbx sub $0x10,%rsp mov %fs:0x28,%rax mov ...
_Z5func0RKSt6vectorISt5arrayIiLm2EESaIS1_EES5_: endbr64 push r14 pxor xmm0, xmm0 push r13 push r12 mov r12, rsi push rbp mov rbp, rdi push rbx sub rsp, 10h mov rax, fs:28h mov [rsp+38h+var_30], rax xor eax, eax movups xmmword ptr [rdi], xmm0 mov rcx, [rsi] mov qword pt...
long long func0(long long a1, long long *a2, _QWORD *a3) { long long v5; // rcx long long v7; // rdi long long v8; // rsi long long v9; // rbx long long v10; // rsi int *v11; // r8 int *v12; // rax int v13; // edx int v14; // eax _QWORD v16[7]; // [rsp+0h] [rbp-38h] BYREF v16[1] = __readfsqword(...
func0: ENDBR64 PUSH R14 PXOR XMM0,XMM0 PUSH R13 PUSH R12 MOV R12,RSI PUSH RBP MOV RBP,RDI PUSH RBX SUB RSP,0x10 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x8],RAX XOR EAX,EAX MOVUPS xmmword ptr [RDI],XMM0 MOV RCX,qword ptr [RSI] MOV qword ptr [RDI + 0x10],0x0 CMP RCX,qword ptr [RSI + 0x8] JZ 0x00101848 MOV R13,R...
/* func0(std::vector<std::array<int, 2ul>, std::allocator<std::array<int, 2ul> > > const&, std::vector<std::array<int, 2ul>, std::allocator<std::array<int, 2ul> > > const&) */ vector * func0(vector *param_1,vector *param_2) { int iVar1; int *piVar2; long lVar3; long *in_RDX; ulong uVar4; int8 *puVar5; ...
1,036
func0
#include <cassert>
int func0(int n) { if (n == 0 || n == 1) { return 1; } return 2 * func0(n - 1) + func0(n - 2); }
int main() { assert(func0(3) == 7); assert(func0(4) == 17); assert(func0(5) == 41); return 0; }
O0
cpp
func0(int): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x18,%rsp mov %edi,-0x14(%rbp) cmpl $0x0,-0x14(%rbp) je 1165 <_Z5func0i+0x1c> cmpl $0x1,-0x14(%rbp) jne 116c <_Z5func0i+0x23> mov $0x1,%eax jmp 118b <_Z5func0i+0x42> mov -0x14(%rbp),%eax sub $0x1,%eax mov %eax,%edi callq ...
_Z5func0i: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 18h mov [rbp+var_14], edi cmp [rbp+var_14], 0 jz short loc_1165 cmp [rbp+var_14], 1 jnz short loc_116C loc_1165: mov eax, 1 jmp short loc_118B loc_116C: mov eax, [rbp+var_14] sub eax, 1 mov edi, eax; int ca...
long long func0(unsigned int a1) { int v2; // ebx if ( a1 <= 1 ) return 1LL; v2 = 2 * func0(a1 - 1); return v2 + (unsigned int)func0(a1 - 2); }
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x18 MOV dword ptr [RBP + -0x14],EDI CMP dword ptr [RBP + -0x14],0x0 JZ 0x00101165 CMP dword ptr [RBP + -0x14],0x1 JNZ 0x0010116c LAB_00101165: MOV EAX,0x1 JMP 0x0010118b LAB_0010116c: MOV EAX,dword ptr [RBP + -0x14] SUB EAX,0x1 MOV EDI,EAX CALL 0x00101149 LEA EBX,[R...
/* func0(int) */ int func0(int param_1) { int iVar1; int iVar2; if ((param_1 == 0) || (param_1 == 1)) { iVar2 = 1; } else { iVar1 = func0(param_1 + -1); iVar2 = func0(param_1 + -2); iVar2 = iVar2 + iVar1 * 2; } return iVar2; }
1,037
func0
#include <cassert>
int func0(int n) { if (n == 0 || n == 1) { return 1; } return 2 * func0(n - 1) + func0(n - 2); }
int main() { assert(func0(3) == 7); assert(func0(4) == 17); assert(func0(5) == 41); return 0; }
O1
cpp
func0(int): endbr64 mov $0x1,%eax cmp $0x1,%edi jbe 117b <_Z5func0i+0x32> push %rbp push %rbx sub $0x8,%rsp mov %edi,%ebx lea -0x1(%rdi),%edi callq 1149 <_Z5func0i> mov %eax,%ebp lea -0x2(%rbx),%edi callq 1149 <_Z5func0i> lea (%rax,%rbp,2),%eax add $0x8,%rsp pop %rbx pop %rbp r...
_Z5func0i: endbr64 mov eax, 1 cmp edi, 1 jbe short locret_117B push rbp push rbx sub rsp, 8 mov ebx, edi lea edi, [rdi-1]; int call _Z5func0i; func0(int) mov ebp, eax lea edi, [rbx-2]; int call _Z5func0i; func0(int) lea eax, [rax+rbp*2] add rsp, 8 pop rbx pop ...
long long func0(unsigned int a1) { long long result; // rax int v2; // ebp result = 1LL; if ( a1 > 1 ) { v2 = func0(a1 - 1); return (unsigned int)func0(a1 - 2) + 2 * v2; } return result; }
func0: ENDBR64 MOV EAX,0x1 CMP EDI,0x1 JBE 0x0010117b PUSH RBP PUSH RBX SUB RSP,0x8 MOV EBX,EDI LEA EDI,[RDI + -0x1] CALL 0x00101149 MOV EBP,EAX LEA EDI,[RBX + -0x2] CALL 0x00101149 LEA EAX,[RAX + RBP*0x2] ADD RSP,0x8 POP RBX POP RBP RET LAB_0010117b: RET
/* func0(int) */ int func0(int param_1) { int iVar1; int iVar2; if (1 < (uint)param_1) { iVar1 = func0(param_1 + -1); iVar2 = func0(param_1 + -2); return iVar2 + iVar1 * 2; } return 1; }
1,038
func0
#include <cassert>
int func0(int n) { if (n == 0 || n == 1) { return 1; } return 2 * func0(n - 1) + func0(n - 2); }
int main() { assert(func0(3) == 7); assert(func0(4) == 17); assert(func0(5) == 41); return 0; }
O2
cpp
func0(int): endbr64 cmp $0x1,%edi jbe 1248 <_Z5func0i+0x38> push %rbp xor %ebp,%ebp push %rbx mov %edi,%ebx sub $0x8,%rsp lea -0x1(%rbx),%edi sub $0x2,%ebx callq 1210 <_Z5func0i> lea 0x0(%rbp,%rax,2),%ebp cmp $0x1,%ebx ja 1223 <_Z5func0i+0x13> add $0x8,%rsp lea 0x1(%rbp),%eax p...
_Z5func0i: endbr64 push r15 push r14 mov r14d, 1 push r13 push r12 push rbp push rbx sub rsp, 58h cmp edi, 1 jbe loc_1576 lea r15d, [rdi-1] xor ebp, ebp loc_1217: cmp r15d, 1 jz loc_156F loc_1221: lea r12d, [r15-1] xor r14d, r14d mov [rsp+88h+var_6C], ebp m...
long long func0(unsigned int a1) { unsigned int v1; // r14d unsigned int v2; // r15d int v3; // ebp unsigned int v4; // r13d int v5; // ebp unsigned int v6; // ebx unsigned int v7; // ecx unsigned int v8; // r12d unsigned int v9; // ebx int v10; // ebp unsigned int v11; // edi unsigned int v12;...
func0: ENDBR64 PUSH R15 PUSH R14 MOV R14D,0x1 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x58 CMP EDI,0x1 JBE 0x00101576 LEA R15D,[RDI + -0x1] XOR EBP,EBP LAB_00101217: CMP R15D,0x1 JZ 0x0010156f LAB_00101221: LEA R12D,[R15 + -0x1] XOR R14D,R14D MOV dword ptr [RSP + 0x1c],EBP MOV R13D,R12D MOV EBP,R14D MOV EBX,R12D LA...
/* func0(int) */ int func0(int param_1) { int iVar1; int iVar2; uint uVar3; uint uVar4; int iVar5; int iVar6; uint uVar7; int iVar8; uint uVar9; int iVar10; uint uVar11; int iVar12; uint uVar13; int iVar14; int iVar15; int iVar16; int iVar17; uint uVar18; int iVar19; uint uVar2...
1,039
func0
#include <cassert>
int func0(int n) { if (n == 0 || n == 1) { return 1; } return 2 * func0(n - 1) + func0(n - 2); }
int main() { assert(func0(3) == 7); assert(func0(4) == 17); assert(func0(5) == 41); return 0; }
O3
cpp
func0(int): endbr64 cmp $0x1,%edi jbe 1248 <_Z5func0i+0x38> push %rbp xor %ebp,%ebp push %rbx mov %edi,%ebx sub $0x8,%rsp lea -0x1(%rbx),%edi sub $0x2,%ebx callq 1210 <_Z5func0i> lea 0x0(%rbp,%rax,2),%ebp cmp $0x1,%ebx ja 1223 <_Z5func0i+0x13> add $0x8,%rsp lea 0x1(%rbp),%eax p...
_Z5func0i: endbr64 push r15 push r14 mov r14d, 1 push r13 push r12 push rbp push rbx sub rsp, 58h cmp edi, 1 jbe loc_1576 lea r15d, [rdi-1] xor ebp, ebp loc_1217: cmp r15d, 1 jz loc_156F loc_1221: lea r12d, [r15-1] xor r14d, r14d mov [rsp+88h+var_6C], ebp m...
long long func0(unsigned int a1) { unsigned int v1; // r14d unsigned int v2; // r15d int v3; // ebp unsigned int v4; // r13d int v5; // ebp unsigned int v6; // ebx unsigned int v7; // ecx unsigned int v8; // r12d unsigned int v9; // ebx int v10; // ebp unsigned int v11; // edi unsigned int v12;...
func0: ENDBR64 PUSH R15 PUSH R14 MOV R14D,0x1 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x58 CMP EDI,0x1 JBE 0x00101576 LEA R15D,[RDI + -0x1] XOR EBP,EBP LAB_00101217: CMP R15D,0x1 JZ 0x0010156f LAB_00101221: LEA R12D,[R15 + -0x1] XOR R14D,R14D MOV dword ptr [RSP + 0x1c],EBP MOV R13D,R12D MOV EBP,R14D MOV EBX,R12D LA...
/* func0(int) */ int func0(int param_1) { int iVar1; int iVar2; uint uVar3; uint uVar4; int iVar5; int iVar6; uint uVar7; int iVar8; uint uVar9; int iVar10; uint uVar11; int iVar12; uint uVar13; int iVar14; int iVar15; int iVar16; int iVar17; uint uVar18; int iVar19; uint uVar2...
1,040
func0
#include <tuple> #include <vector> #include <cassert>
std::tuple<int, int, int, int> func0(const std::tuple<int, int, int, int>& test_tup1, const std::tuple<int, int, int, int>& test_tup2) { std::tuple<int, int, int, int> res( std::get<0>(test_tup1) / std::get<0>(test_tup2), std::get<1>(test_tup1) / std::get<1>(test_tup2), std::get<2>(test_...
int main() { assert(func0(std::make_tuple(10, 4, 6, 9), std::make_tuple(5, 2, 3, 3)) == std::make_tuple(2, 2, 2, 3)); assert(func0(std::make_tuple(12, 6, 8, 16), std::make_tuple(6, 3, 4, 4)) == std::make_tuple(2, 2, 2, 4)); assert(func0(std::make_tuple(20, 14, 36, 18), std::make_tuple(5, 7, 6, 9)) == std...
O0
cpp
func0(std::tuple<int, int, int, int> const&, std::tuple<int, int, int, int> const&): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x48,%rsp mov %rdi,-0x38(%rbp) mov %rsi,-0x40(%rbp) mov %rdx,-0x48(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax mov -0x40(%rbp),%rax mov %ra...
_Z5func0RKSt5tupleIJiiiiEES2_: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 48h 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+var_40] mov rdi, rax call _ZSt3getILm3EJiiiiEERKNSt13tupl...
long long func0(long long a1, long long a2, long long a3) { int v3; // ebx _DWORD *v4; // rax long long v5; // rdx int v6; // ebx long long v7; // rdx long long v8; // rsi long long v9; // rdx int v10; // ebx long long v11; // rdx _DWORD *v12; // rax long long v13; // rdx int v14; // ebx long...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x48 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 0x00101604 MOV EBX,dword ptr [RAX] MOV RAX,qw...
/* func0(std::tuple<int, int, int, int> const&, std::tuple<int, int, int, int> const&) */ tuple * func0(tuple *param_1,tuple *param_2) { int iVar1; type *ptVar2; type *ptVar3; type *ptVar4; type *ptVar5; tuple *in_RDX; long in_FS_OFFSET; int local_30; int local_2c; int local_28; int local_24; ...
1,041
func0
#include <tuple> #include <vector> #include <cassert>
std::tuple<int, int, int, int> func0(const std::tuple<int, int, int, int>& test_tup1, const std::tuple<int, int, int, int>& test_tup2) { std::tuple<int, int, int, int> res( std::get<0>(test_tup1) / std::get<0>(test_tup2), std::get<1>(test_tup1) / std::get<1>(test_tup2), std::get<2>(test_...
int main() { assert(func0(std::make_tuple(10, 4, 6, 9), std::make_tuple(5, 2, 3, 3)) == std::make_tuple(2, 2, 2, 3)); assert(func0(std::make_tuple(12, 6, 8, 16), std::make_tuple(6, 3, 4, 4)) == std::make_tuple(2, 2, 2, 4)); assert(func0(std::make_tuple(20, 14, 36, 18), std::make_tuple(5, 7, 6, 9)) == std...
O1
cpp
func0(std::tuple<int, int, int, int> const&, std::tuple<int, int, int, int> const&): endbr64 mov %rdx,%rcx mov 0x4(%rsi),%eax cltd idivl 0x4(%rcx) mov %eax,%r10d mov 0x8(%rsi),%eax cltd idivl 0x8(%rcx) mov %eax,%r9d mov 0xc(%rsi),%eax cltd idivl 0xc(%rcx) mov %eax,%r8d mov (%rsi),%eax cltd id...
_Z5func0RKSt5tupleIJiiiiEES2_: endbr64 mov rcx, rdx mov eax, [rsi+4] cdq idiv dword ptr [rcx+4] mov r10d, eax mov eax, [rsi+8] cdq idiv dword ptr [rcx+8] mov r9d, eax mov eax, [rsi+0Ch] cdq idiv dword ptr [rcx+0Ch] mov r8d, eax mov eax, [rsi] cdq idiv dword ptr [rcx] mov ...
int * func0(int *a1, _DWORD *a2, _DWORD *a3) { int v3; // r10d int v4; // r9d int v5; // r8d v3 = a2[1] / a3[1]; v4 = a2[2] / a3[2]; v5 = a2[3] / a3[3]; *a1 = *a2 / *a3; a1[1] = v3; a1[2] = v4; a1[3] = v5; return a1; }
func0: ENDBR64 MOV RCX,RDX MOV EAX,dword ptr [RSI + 0x4] CDQ IDIV dword ptr [RCX + 0x4] MOV R10D,EAX MOV EAX,dword ptr [RSI + 0x8] CDQ IDIV dword ptr [RCX + 0x8] MOV R9D,EAX MOV EAX,dword ptr [RSI + 0xc] CDQ IDIV dword ptr [RCX + 0xc] MOV R8D,EAX MOV EAX,dword ptr [RSI] CDQ IDIV dword ptr [RCX] MOV dword ptr [RDI],EAX ...
/* func0(std::tuple<int, int, int, int> const&, std::tuple<int, int, int, int> const&) */ int [16] func0(tuple *param_1,tuple *param_2) { int iVar1; int iVar2; int iVar3; int iVar4; int iVar5; int iVar6; int *in_RDX; int auVar7 [16]; iVar1 = *(int *)(param_2 + 4); iVar2 = in_RDX[1]; iVar3 = ...
1,042
func0
#include <tuple> #include <vector> #include <cassert>
std::tuple<int, int, int, int> func0(const std::tuple<int, int, int, int>& test_tup1, const std::tuple<int, int, int, int>& test_tup2) { std::tuple<int, int, int, int> res( std::get<0>(test_tup1) / std::get<0>(test_tup2), std::get<1>(test_tup1) / std::get<1>(test_tup2), std::get<2>(test_...
int main() { assert(func0(std::make_tuple(10, 4, 6, 9), std::make_tuple(5, 2, 3, 3)) == std::make_tuple(2, 2, 2, 3)); assert(func0(std::make_tuple(12, 6, 8, 16), std::make_tuple(6, 3, 4, 4)) == std::make_tuple(2, 2, 2, 4)); assert(func0(std::make_tuple(20, 14, 36, 18), std::make_tuple(5, 7, 6, 9)) == std...
O2
cpp
func0(std::tuple<int, int, int, int> const&, std::tuple<int, int, int, int> const&): endbr64 mov 0x4(%rsi),%eax mov %rdx,%rcx mov %rdi,%r8 cltd idivl 0x4(%rcx) mov %eax,%r10d mov 0x8(%rsi),%eax cltd idivl 0x8(%rcx) mov %eax,%r9d mov 0xc(%rsi),%eax cltd idivl 0xc(%rcx) mov %eax,%edi mov (%r...
_Z5func0RKSt5tupleIJiiiiEES2_: endbr64 mov eax, [rsi] mov rcx, rdx mov r9, rdi cdq idiv dword ptr [rcx] mov edi, eax mov eax, [rsi+4] movd xmm0, edi cdq idiv dword ptr [rcx+4] mov r10d, eax mov eax, [rsi+8] movd xmm3, r10d cdq punpckldq xmm0, xmm3 idiv dword ptr [rcx+8] mov ...
__m128i * func0(__m128i *a1, _DWORD *a2, _DWORD *a3) { __m128i *result; // rax result = a1; *a1 = _mm_unpacklo_epi64( _mm_unpacklo_epi32(_mm_cvtsi32_si128(*a2 / *a3), _mm_cvtsi32_si128(a2[1] / a3[1])), _mm_unpacklo_epi32(_mm_cvtsi32_si128(a2[2] / a3[2]), _mm_cvtsi32_si128(a2[3] / a3[3]))); ...
func0: ENDBR64 MOV EAX,dword ptr [RSI] MOV RCX,RDX MOV R9,RDI CDQ IDIV dword ptr [RCX] MOV EDI,EAX MOV EAX,dword ptr [RSI + 0x4] MOVD XMM0,EDI CDQ IDIV dword ptr [RCX + 0x4] MOV R10D,EAX MOV EAX,dword ptr [RSI + 0x8] MOVD XMM3,R10D CDQ PUNPCKLDQ XMM0,XMM3 IDIV dword ptr [RCX + 0x8] MOV R8D,EAX MOV EAX,dword ptr [RSI + ...
/* func0(std::tuple<int, int, int, int> const&, std::tuple<int, int, int, int> const&) */ int [16] func0(tuple *param_1,tuple *param_2) { int iVar1; int iVar2; int iVar3; int iVar4; int *in_RDX; int auVar5 [16]; iVar1 = *(int *)(param_2 + 8); iVar2 = in_RDX[2]; iVar3 = *(int *)(param_2 + 0xc); ...
1,043
func0
#include <tuple> #include <vector> #include <cassert>
std::tuple<int, int, int, int> func0(const std::tuple<int, int, int, int>& test_tup1, const std::tuple<int, int, int, int>& test_tup2) { std::tuple<int, int, int, int> res( std::get<0>(test_tup1) / std::get<0>(test_tup2), std::get<1>(test_tup1) / std::get<1>(test_tup2), std::get<2>(test_...
int main() { assert(func0(std::make_tuple(10, 4, 6, 9), std::make_tuple(5, 2, 3, 3)) == std::make_tuple(2, 2, 2, 3)); assert(func0(std::make_tuple(12, 6, 8, 16), std::make_tuple(6, 3, 4, 4)) == std::make_tuple(2, 2, 2, 4)); assert(func0(std::make_tuple(20, 14, 36, 18), std::make_tuple(5, 7, 6, 9)) == std...
O3
cpp
func0(std::tuple<int, int, int, int> const&, std::tuple<int, int, int, int> const&): endbr64 mov 0x4(%rsi),%eax mov %rdx,%rcx mov %rdi,%r8 cltd idivl 0x4(%rcx) mov %eax,%r10d mov 0x8(%rsi),%eax cltd idivl 0x8(%rcx) mov %eax,%r9d mov 0xc(%rsi),%eax cltd idivl 0xc(%rcx) mov %eax,%edi mov (%r...
_Z5func0RKSt5tupleIJiiiiEES2_: endbr64 mov eax, [rsi] mov rcx, rdx mov r9, rdi cdq idiv dword ptr [rcx] mov edi, eax mov eax, [rsi+4] movd xmm0, edi cdq idiv dword ptr [rcx+4] mov r10d, eax mov eax, [rsi+8] movd xmm3, r10d cdq punpckldq xmm0, xmm3 idiv dword ptr [rcx+8] mov ...
__m128i * func0(__m128i *a1, _DWORD *a2, _DWORD *a3) { __m128i *result; // rax result = a1; *a1 = _mm_unpacklo_epi64( _mm_unpacklo_epi32(_mm_cvtsi32_si128(*a2 / *a3), _mm_cvtsi32_si128(a2[1] / a3[1])), _mm_unpacklo_epi32(_mm_cvtsi32_si128(a2[2] / a3[2]), _mm_cvtsi32_si128(a2[3] / a3[3]))); ...
func0: ENDBR64 MOV EAX,dword ptr [RSI] MOV RCX,RDX MOV R9,RDI CDQ IDIV dword ptr [RCX] MOV EDI,EAX MOV EAX,dword ptr [RSI + 0x4] MOVD XMM0,EDI CDQ IDIV dword ptr [RCX + 0x4] MOV R10D,EAX MOV EAX,dword ptr [RSI + 0x8] MOVD XMM3,R10D CDQ PUNPCKLDQ XMM0,XMM3 IDIV dword ptr [RCX + 0x8] MOV R8D,EAX MOV EAX,dword ptr [RSI + ...
/* func0(std::tuple<int, int, int, int> const&, std::tuple<int, int, int, int> const&) */ int [16] func0(tuple *param_1,tuple *param_2) { int iVar1; int iVar2; int iVar3; int iVar4; int *in_RDX; int auVar5 [16]; iVar1 = *(int *)(param_2 + 8); iVar2 = in_RDX[2]; iVar3 = *(int *)(param_2 + 0xc); ...
1,044
func0
#include <vector> #include <utility> #include <assert.h> template <typename T>
std::pair<std::vector<T>, std::vector<T>> func0(const std::vector<T>& list1, int L) { std::vector<T> first_part(list1.begin(), list1.begin() + L); std::vector<T> second_part(list1.begin() + L, list1.end()); return {first_part, second_part}; }
int main() { assert(func0(std::vector<int>{1, 1, 2, 3, 4, 4, 5, 1}, 3) == std::make_pair(std::vector<int>{1, 1, 2}, std::vector<int>{3, 4, 4, 5, 1})); assert(func0(std::vector<char>{'a', 'b', 'c', 'd'}, 2) == std::make_pair(std::vector<char>{'a', 'b'}, std::vector<char>{'c', 'd'})); assert(func0(std::vec...
O0
cpp
std::pair<std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> > > func0<int>(std::vector<int, std::allocator<int> > const&, int): endbr64 push %rbp mov %rsp,%rbp push %r12 push %rbx sub $0x70,%rsp mov %rdi,-0x68(%rbp) mov %rsi,-0x70(%rbp) mov %edx,-0x74(%rbp) mov %fs:0x2...
_Z5func0IiESt4pairISt6vectorIT_SaIS2_EES4_ERKS4_i: endbr64 push rbp mov rbp, rsp push r12 push rbx add rsp, 0FFFFFFFFFFFFFF80h mov [rbp+var_78], rdi mov [rbp+var_80], rsi mov [rbp+var_84], edx mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax lea rax, [rbp+var_68] mov [...
long long func0<int>(long long a1, long long a2, int a3) { long long v3; // rbx long long v4; // rbx long long v5; // rax long long v6; // r12 long long v7; // rax char v10; // [rsp+27h] [rbp-69h] BYREF _QWORD v11[3]; // [rsp+28h] [rbp-68h] BYREF _BYTE v12[32]; // [rsp+40h] [rbp-50h] BYREF _QWORD v13...
func0<int>: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R12 PUSH RBX ADD RSP,-0x80 MOV qword ptr [RBP + -0x78],RDI MOV qword ptr [RBP + -0x80],RSI MOV dword ptr [RBP + -0x84],EDX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX LEA RAX,[RBP + -0x68] MOV qword ptr [RBP + -0x60],RAX NOP NOP MOV EAX,dword ptr...
/* std::pair<std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> > > func0<int>(std::vector<int, std::allocator<int> > const&, int) */ pair func0<int>(vector *param_1,int param_2) { __normal_iterator _Var1; __normal_iterator _Var2; int in_EDX; int4 in_register_00000034; vector<in...
1,045
func0
#include <vector> #include <utility> #include <assert.h> template <typename T>
std::pair<std::vector<T>, std::vector<T>> func0(const std::vector<T>& list1, int L) { std::vector<T> first_part(list1.begin(), list1.begin() + L); std::vector<T> second_part(list1.begin() + L, list1.end()); return {first_part, second_part}; }
int main() { assert(func0(std::vector<int>{1, 1, 2, 3, 4, 4, 5, 1}, 3) == std::make_pair(std::vector<int>{1, 1, 2}, std::vector<int>{3, 4, 4, 5, 1})); assert(func0(std::vector<char>{'a', 'b', 'c', 'd'}, 2) == std::make_pair(std::vector<char>{'a', 'b'}, std::vector<char>{'c', 'd'})); assert(func0(std::vec...
O1
cpp
std::pair<std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> > > func0<int>(std::vector<int, std::allocator<int> > const&, int): endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x28,%rsp mov (%rsi),%r14 movslq %edx,%rbp movabs $0x1fffffffffffffff,%rax...
_Z5func0IiESt4pairISt6vectorIT_SaIS2_EES4_ERKS4_i: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 68h mov rax, fs:28h mov [rsp+98h+var_40], rax xor eax, eax mov r15, [rsi] movsxd rdx, edx lea r12, ds:0[rdx*4] mov [rsp+98h+var_78], 0 mov [rsp+98h...
_QWORD * func0<int>(_QWORD *a1, long long a2, int a3) { _DWORD *v3; // r15 signed long long v4; // r12 _DWORD *v5; // rax _DWORD *v6; // r13 signed long long v7; // rbp long long v8; // r15 _DWORD *v9; // rax _DWORD *v10; // r14 _DWORD *v11; // rax _DWORD *v12; // rax char *v13; // r15 long long...
func0<int>: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x68 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x58],RAX XOR EAX,EAX MOV R15,qword ptr [RSI] MOVSXD RDX,EDX LEA R12,[RDX*0x4] MOV qword ptr [RSP + 0x20],0x0 MOV qword ptr [RSP + 0x28],0x0 MOV qword ptr [RSP + 0x30],0x0 MOV qword pt...
/* std::pair<std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> > > func0<int>(std::vector<int, std::allocator<int> > const&, int) */ int8 * func0<int>(int8 *param_1,long *param_2,int param_3) { ulong __n; int4 *__dest; int4 *puVar1; int4 *puVar2; int8 uVar3; long lVar4; ulo...
1,046
func0
#include <vector> #include <utility> #include <assert.h> template <typename T>
std::pair<std::vector<T>, std::vector<T>> func0(const std::vector<T>& list1, int L) { std::vector<T> first_part(list1.begin(), list1.begin() + L); std::vector<T> second_part(list1.begin() + L, list1.end()); return {first_part, second_part}; }
int main() { assert(func0(std::vector<int>{1, 1, 2, 3, 4, 4, 5, 1}, 3) == std::make_pair(std::vector<int>{1, 1, 2}, std::vector<int>{3, 4, 4, 5, 1})); assert(func0(std::vector<char>{'a', 'b', 'c', 'd'}, 2) == std::make_pair(std::vector<char>{'a', 'b'}, std::vector<char>{'c', 'd'})); assert(func0(std::vec...
O2
cpp
std::pair<std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> > > func0<int>(std::vector<int, std::allocator<int> > const&, int): endbr64 movabs $0x1fffffffffffffff,%rax push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx movslq %edx,%rbx sub $0x28,%rsp mov (%rsi),%r15...
_Z5func0IiESt4pairISt6vectorIT_SaIS2_EES4_ERKS4_i: endbr64 push r15 pxor xmm0, xmm0 push r14 push r13 push r12 movsxd r12, edx push rbp lea r13, ds:0[r12*4] push rbx sub rsp, 68h mov r15, [rsi] mov rax, fs:28h mov [rsp+98h+var_40], rax xor eax, eax movaps [rsp+98h+var_78],...
long long func0<int>(long long a1, long long a2, int a3) { long long v3; // r12 size_t v4; // r13 int *v5; // r15 _DWORD *v6; // rax _DWORD *v7; // r14 signed long long v8; // rbp int *v9; // rax int *v10; // r15 _DWORD *v11; // rax _DWORD *v12; // r12 int *v13; // rax char *v14; // r12 int v...
func0<int>: ENDBR64 PUSH R15 PXOR XMM0,XMM0 PUSH R14 PUSH R13 PUSH R12 MOVSXD R12,EDX PUSH RBP LEA R13,[R12*0x4] PUSH RBX SUB RSP,0x68 MOV R15,qword ptr [RSI] MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x58],RAX XOR EAX,EAX MOVAPS xmmword ptr [RSP + 0x20],XMM0 MOV RAX,0x7ffffffffffffffc MOV qword ptr [RSP + 0x30]...
/* std::pair<std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> > > func0<int>(std::vector<int, std::allocator<int> > const&, int) */ vector<int,std::allocator<int>> * func0<int>(vector<int,std::allocator<int>> *param_1,int8 *param_2,int param_3) { ulong __n; int4 uVar1; int4 *__des...
1,047
func0
#include <vector> #include <utility> #include <assert.h> template <typename T>
std::pair<std::vector<T>, std::vector<T>> func0(const std::vector<T>& list1, int L) { std::vector<T> first_part(list1.begin(), list1.begin() + L); std::vector<T> second_part(list1.begin() + L, list1.end()); return {first_part, second_part}; }
int main() { assert(func0(std::vector<int>{1, 1, 2, 3, 4, 4, 5, 1}, 3) == std::make_pair(std::vector<int>{1, 1, 2}, std::vector<int>{3, 4, 4, 5, 1})); assert(func0(std::vector<char>{'a', 'b', 'c', 'd'}, 2) == std::make_pair(std::vector<char>{'a', 'b'}, std::vector<char>{'c', 'd'})); assert(func0(std::vec...
O3
cpp
std::pair<std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> > > func0<int>(std::vector<int, std::allocator<int> > const&, int): endbr64 movabs $0x1fffffffffffffff,%rax push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx movslq %edx,%rbx sub $0x28,%rsp mov (%rsi),%r15...
_Z5func0IcESt4pairISt6vectorIT_SaIS2_EES4_ERKS4_i: endbr64 push r15 pxor xmm0, xmm0 push r14 push r13 push r12 push rbp movsxd rbp, edx push rbx sub rsp, 58h mov r13, [rsi] mov rax, fs:28h mov [rsp+88h+var_40], rax xor eax, eax movaps [rsp+88h+var_78], xmm0 mov [rsp+88h+va...
long long func0<char>(long long a1, long long a2, int a3) { size_t v3; // rbp char *v4; // r13 _BYTE *v5; // rax _BYTE *v6; // r14 char *v7; // r13 signed long long v8; // r12 char *v9; // rax char *v10; // r15 _BYTE *v11; // rax _BYTE *v12; // r13 char *v13; // rax char *v14; // r13 char v16...
func0<char>: ENDBR64 PUSH R15 PXOR XMM0,XMM0 PUSH R14 PUSH R13 PUSH R12 PUSH RBP MOVSXD RBP,EDX PUSH RBX SUB RSP,0x58 MOV R13,qword ptr [RSI] MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x48],RAX XOR EAX,EAX MOVAPS xmmword ptr [RSP + 0x10],XMM0 MOV qword ptr [RSP + 0x20],0x0 TEST RBP,RBP JS 0x00102007 MOV RBX,RDI ...
/* std::pair<std::vector<char, std::allocator<char> >, std::vector<char, std::allocator<char> > > func0<char>(std::vector<char, std::allocator<char> > const&, int) */ pair func0<char>(vector *param_1,int param_2) { int uVar1; int *__dest; int *__dest_00; int *puVar2; int in_EDX; vector *unaff_RBX; ul...
1,048
func0
#include <iostream> #include <map> #include <assert.h>
std::map<char, int> func0(std::map<char, int> d1, std::map<char, int> d2) { std::map<char, int> d = d1; d.insert(d2.begin(), d2.end()); return d; }
int main() { std::map<char, int> d1 = {{'a', 100}, {'b', 200}}; std::map<char, int> d2 = {{'x', 300}, {'y', 200}}; std::map<char, int> res1 = {{'x', 300}, {'y', 200}, {'a', 100}, {'b', 200}}; assert(func0(d1, d2) == res1); std::map<char, int> d3 = {{'a', 900}, {'b', 900}, {'d', 900}}; st...
O0
cpp
func0(std::map<char, int, std::less<char>, std::allocator<std::pair<char const, int> > >, std::map<char, int, std::less<char>, std::allocator<std::pair<char const, int> > >): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x38,%rsp mov %rdi,-0x28(%rbp) mov %rsi,-0x30(%rbp) mov %rdx,-0x38(%rbp) mov ...
_Z5func0St3mapIciSt4lessIcESaISt4pairIKciEEES6_: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 28h mov [rbp+var_18], rdi mov [rbp+var_20], rsi mov [rbp+var_28], rdx mov rdx, [rbp+var_20] mov rax, [rbp+var_18] mov rsi, rdx mov rdi, rax call _ZNSt3mapIciSt4lessIcESaISt4pairI...
long long func0(long long a1, long long a2, long long a3) { long long v3; // rbx long long v4; // rax std::map<char,int>::map(a1, a2); v3 = std::map<char,int>::end(a3); v4 = std::map<char,int>::begin(a3); std::map<char,int>::insert<std::_Rb_tree_iterator<std::pair<char const,int>>>(a1, v4, v3); return a...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x28 MOV qword ptr [RBP + -0x18],RDI MOV qword ptr [RBP + -0x20],RSI MOV qword ptr [RBP + -0x28],RDX MOV RDX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x18] MOV RSI,RDX MOV RDI,RAX LAB_00101310: CALL 0x00101fae MOV RAX,qword ptr [RBP + -0x28] MOV RDI,RAX CALL...
/* func0(std::map<char, int, std::less<char>, std::allocator<std::pair<char const, int> > >, std::map<char, int, std::less<char>, std::allocator<std::pair<char const, int> > >) */ map<char,int,std::less<char>,std::allocator<std::pair<char_const,int>>> * func0(map param_1,map param_2) { _Rb_tree_iterator _Var1; ...
1,049
func0
#include <iostream> #include <map> #include <assert.h>
std::map<char, int> func0(std::map<char, int> d1, std::map<char, int> d2) { std::map<char, int> d = d1; d.insert(d2.begin(), d2.end()); return d; }
int main() { std::map<char, int> d1 = {{'a', 100}, {'b', 200}}; std::map<char, int> d2 = {{'x', 300}, {'y', 200}}; std::map<char, int> res1 = {{'x', 300}, {'y', 200}, {'a', 100}, {'b', 200}}; assert(func0(d1, d2) == res1); std::map<char, int> d3 = {{'a', 900}, {'b', 900}, {'d', 900}}; st...
O1
cpp
func0(std::map<char, int, std::less<char>, std::allocator<std::pair<char const, int> > >, std::map<char, int, std::less<char>, std::allocator<std::pair<char const, int> > >): endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x28,%rsp mov %rdi,%rbx mov %rsi,%r12 mov %rdx,%...
_Z5func0St3mapIciSt4lessIcESaISt4pairIKciEEES6_: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 18h mov r12, rdi mov rbp, rsi mov rbx, rdx mov rax, fs:28h mov [rsp+48h+var_40], rax xor eax, eax mov dword ptr [rdi+8], 0 mov qword ptr [rdi+10h]...
long long func0(long long a1, long long a2, long long a3) { long long v5; // r14 long long v6; // rsi long long v7; // rax long long v8; // rdx long long v9; // rcx long long v10; // rdx long long v11; // rcx long long v12; // r15 long long i; // rbx long long insert_hint_unique_pos; // rax long ...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x18 MOV R12,RDI MOV RBP,RSI MOV RBX,RDX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x8],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 +...
/* func0(std::map<char, int, std::less<char>, std::allocator<std::pair<char const, int> > >, std::map<char, int, std::less<char>, std::allocator<std::pair<char const, int> > >) */ _Rb_tree<char,std::pair<char_const,int>,std::_Select1st<std::pair<char_const,int>>,std::less<char>,std::allocator<std::pair<char_const,i...
1,050
func0
#include <iostream> #include <map> #include <assert.h>
std::map<char, int> func0(std::map<char, int> d1, std::map<char, int> d2) { std::map<char, int> d = d1; d.insert(d2.begin(), d2.end()); return d; }
int main() { std::map<char, int> d1 = {{'a', 100}, {'b', 200}}; std::map<char, int> d2 = {{'x', 300}, {'y', 200}}; std::map<char, int> res1 = {{'x', 300}, {'y', 200}, {'a', 100}, {'b', 200}}; assert(func0(d1, d2) == res1); std::map<char, int> d3 = {{'a', 900}, {'b', 900}, {'d', 900}}; st...
O2
cpp
func0(std::map<char, int, std::less<char>, std::allocator<std::pair<char const, int> > >, std::map<char, int, std::less<char>, std::allocator<std::pair<char const, int> > >): endbr64 push %r14 push %r13 mov %rsi,%r13 push %r12 mov %rdi,%r12 push %rbp mov %rdx,%rbp push %rbx lea 0x8(%rdi),%rbx sub ...
_Z5func0St3mapIciSt4lessIcESaISt4pairIKciEEES6_: endbr64 push r15 push r14 push r13 lea r13, [rdi+8] push r12 mov r12, rdi push rbp push rbx mov rbx, rdx sub rsp, 18h mov dword ptr [rdi+8], 0 mov qword ptr [rdi+10h], 0 mov [rdi+18h], r13 mov [rdi+20h], r13 mov qword...
long long func0(long long a1, long long a2, long long a3) { long long v3; // r13 long long v6; // rdi long long v7; // rax long long v8; // rdx long long v9; // rcx long long v10; // rdx long long v11; // rcx long long v12; // rdx long long v13; // r15 long long i; // rbx long long v15; // rax ...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 LEA R13,[RDI + 0x8] PUSH R12 MOV R12,RDI PUSH RBP PUSH RBX MOV RBX,RDX SUB RSP,0x18 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 ptr [RDI + 0x28],0x0 MOV RDI,qword ptr [RSI + 0x10] TEST RDI,...
/* func0(std::map<char, int, std::less<char>, std::allocator<std::pair<char const, int> > >, std::map<char, int, std::less<char>, std::allocator<std::pair<char const, int> > >) */ _Rb_tree<char,std::pair<char_const,int>,std::_Select1st<std::pair<char_const,int>>,std::less<char>,std::allocator<std::pair<char_const,i...
1,051
func0
#include <iostream> #include <map> #include <assert.h>
std::map<char, int> func0(std::map<char, int> d1, std::map<char, int> d2) { std::map<char, int> d = d1; d.insert(d2.begin(), d2.end()); return d; }
int main() { std::map<char, int> d1 = {{'a', 100}, {'b', 200}}; std::map<char, int> d2 = {{'x', 300}, {'y', 200}}; std::map<char, int> res1 = {{'x', 300}, {'y', 200}, {'a', 100}, {'b', 200}}; assert(func0(d1, d2) == res1); std::map<char, int> d3 = {{'a', 900}, {'b', 900}, {'d', 900}}; st...
O3
cpp
func0(std::map<char, int, std::less<char>, std::allocator<std::pair<char const, int> > >, std::map<char, int, std::less<char>, std::allocator<std::pair<char const, int> > >): endbr64 push %r15 push %r14 lea 0x8(%rdi),%r14 push %r13 mov %rsi,%r13 push %r12 mov %rdi,%r12 push %rbp mov %rdx,%rbp push...
_Z5func0St3mapIciSt4lessIcESaISt4pairIKciEEES6_: endbr64 push r15 xor r15d, r15d push r14 push r13 lea r13, [rdi+8] push r12 mov r12, rdi push rbp push rbx mov rbx, rdx sub rsp, 18h mov dword ptr [rdi+8], 0 mov qword ptr [rdi+10h], 0 mov [rdi+18h], r13 mov [rdi+20h]...
long long func0(long long a1, long long a2, long long a3) { long long v3; // r15 long long v4; // r13 long long v7; // rdi long long v8; // rax long long v9; // rdx long long v10; // rcx long long v11; // rdx long long v12; // rcx long long v13; // rbp long long v14; // r14 char v15; // cl long...
func0: ENDBR64 PUSH R15 XOR R15D,R15D PUSH R14 PUSH R13 LEA R13,[RDI + 0x8] PUSH R12 MOV R12,RDI PUSH RBP PUSH RBX MOV RBX,RDX SUB RSP,0x18 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 ptr [RDI + 0x28],0x0 MOV RDI,qword ptr [RSI + 0...
/* func0(std::map<char, int, std::less<char>, std::allocator<std::pair<char const, int> > >, std::map<char, int, std::less<char>, std::allocator<std::pair<char const, int> > >) */ long func0(map param_1,map param_2) { _Rb_tree_node_base *p_Var1; _Rb_tree_node_base _Var2; _Rb_tree_node *p_Var3; _Rb_tree_nod...
1,052
func0
#include <iostream> #include <assert.h>
double func0(int h_age) { if (h_age < 0) { exit(1); } else if (h_age <= 2) { return h_age * 10.5; } else { return 21 + (h_age - 2) * 4; } }
int main() { assert(func0(12) == 61); assert(func0(15) == 73); assert(func0(24) == 109); return 0; }
O0
cpp
func0(int): endbr64 push %rbp mov %rsp,%rbp sub $0x10,%rsp mov %edi,-0x4(%rbp) cmpl $0x0,-0x4(%rbp) jns 11c8 <_Z5func0i+0x1f> mov $0x1,%edi callq 10a0 <exit@plt> cmpl $0x2,-0x4(%rbp) jg 11e1 <_Z5func0i+0x38> cvtsi2sdl -0x4(%rbp),%xmm1 movsd 0xeb5(%rip),%xmm0 mulsd %xmm1,%xmm0 jmp 11f1 <_Z...
_Z5func0i: endbr64 push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_4], edi cmp [rbp+var_4], 0 jns short loc_1188 mov edi, 1; status call _exit loc_1188: cmp [rbp+var_4], 2 jg short loc_11A5 pxor xmm1, xmm1 cvtsi2sd xmm1, [rbp+var_4] movsd xmm0, cs:qword_2070 mulsd xmm0, xmm...
double func0(int a1) { if ( a1 < 0 ) exit(1); if ( a1 > 2 ) return (double)(4 * (a1 - 2) + 21); else return 10.5 * (double)a1; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV dword ptr [RBP + -0x4],EDI CMP dword ptr [RBP + -0x4],0x0 JNS 0x00101188 MOV EDI,0x1 CALL 0x00101070 LAB_00101188: CMP dword ptr [RBP + -0x4],0x2 JG 0x001011a5 PXOR XMM1,XMM1 CVTSI2SD XMM1,dword ptr [RBP + -0x4] MOVSD XMM0,qword ptr [0x00102070] MULSD XMM0,XMM1 JMP 0...
/* func0(int) */ double func0(int param_1) { double dVar1; if (param_1 < 0) { /* WARNING: Subroutine does not return */ exit(1); } if (param_1 < 3) { dVar1 = DAT_00102070 * (double)param_1; } else { dVar1 = (double)((param_1 + -2) * 4 + 0x15); } return dVar1; }
1,053
func0
#include <iostream> #include <assert.h>
double func0(int h_age) { if (h_age < 0) { exit(1); } else if (h_age <= 2) { return h_age * 10.5; } else { return 21 + (h_age - 2) * 4; } }
int main() { assert(func0(12) == 61); assert(func0(15) == 73); assert(func0(24) == 109); return 0; }
O1
cpp
func0(int): endbr64 test %edi,%edi js 11a7 <_Z5func0i+0x1e> cmp $0x2,%edi jg 11b5 <_Z5func0i+0x2c> pxor %xmm0,%xmm0 cvtsi2sd %edi,%xmm0 mulsd 0xe62(%rip),%xmm0 retq sub $0x8,%rsp mov $0x1,%edi callq 1080 <exit@plt> lea 0xd(,%rdi,4),%eax pxor %xmm0,%xmm0 cvtsi2sd %eax,%xmm0 retq
_Z5func0i: endbr64 test edi, edi js short loc_1167 cmp edi, 2 jg short loc_1175 pxor xmm0, xmm0 cvtsi2sd xmm0, edi mulsd xmm0, cs:qword_2008 retn loc_1167: sub rsp, 8 mov edi, 1; status call _exit loc_1175: lea eax, ds:0Dh[rdi*4] pxor xmm0, xmm0 cvtsi2sd xmm0, eax retn
double func0(int a1) { if ( a1 < 0 ) exit(1); if ( a1 > 2 ) return (double)(4 * a1 + 13); else return (double)a1 * 10.5; }
func0: ENDBR64 TEST EDI,EDI JS 0x00101167 CMP EDI,0x2 JG 0x00101175 PXOR XMM0,XMM0 CVTSI2SD XMM0,EDI MULSD XMM0,qword ptr [0x00102008] RET LAB_00101167: SUB RSP,0x8 MOV EDI,0x1 CALL 0x00101050 LAB_00101175: LEA EAX,[0xd + RDI*0x4] PXOR XMM0,XMM0 CVTSI2SD XMM0,EAX RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* func0(int) */ double func0(int param_1) { if (param_1 < 0) { /* WARNING: Subroutine does not return */ exit(1); } if (param_1 < 3) { return (double)param_1 * _DAT_00102008; } return (double)(p...
1,054
func0
#include <iostream> #include <assert.h>
double func0(int h_age) { if (h_age < 0) { exit(1); } else if (h_age <= 2) { return h_age * 10.5; } else { return 21 + (h_age - 2) * 4; } }
int main() { assert(func0(12) == 61); assert(func0(15) == 73); assert(func0(24) == 109); return 0; }
O2
cpp
func0(int): endbr64 test %edi,%edi js 1210 <_Z5func0i+0x30> cmp $0x2,%edi jg 1200 <_Z5func0i+0x20> pxor %xmm0,%xmm0 cvtsi2sd %edi,%xmm0 mulsd 0xe0b(%rip),%xmm0 retq xchg %ax,%ax lea 0xd(,%rdi,4),%eax pxor %xmm0,%xmm0 cvtsi2sd %eax,%xmm0 retq push %rax mov $0x1,%edi callq 1080 <exit@plt> nop...
_Z5func0i: endbr64 test edi, edi js short loc_1190 cmp edi, 2 jg short loc_1180 pxor xmm0, xmm0 cvtsi2sd xmm0, edi mulsd xmm0, cs:qword_2008 retn loc_1180: lea eax, ds:0Dh[rdi*4] pxor xmm0, xmm0 cvtsi2sd xmm0, eax retn loc_1190: push rax mov edi, 1; status call _exit
double func0(int a1) { if ( a1 < 0 ) exit(1); if ( a1 > 2 ) return (double)(4 * a1 + 13); else return (double)a1 * 10.5; }
func0: ENDBR64 TEST EDI,EDI JS 0x00101190 CMP EDI,0x2 JG 0x00101180 PXOR XMM0,XMM0 CVTSI2SD XMM0,EDI MULSD XMM0,qword ptr [0x00102008] RET LAB_00101180: LEA EAX,[0xd + RDI*0x4] PXOR XMM0,XMM0 CVTSI2SD XMM0,EAX RET LAB_00101190: PUSH RAX MOV EDI,0x1 CALL 0x00101050
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* func0(int) */ double func0(int param_1) { if (param_1 < 0) { /* WARNING: Subroutine does not return */ exit(1); } if (param_1 < 3) { return (double)param_1 * _DAT_00102008; } return (double)(p...
1,055
func0
#include <iostream> #include <assert.h>
double func0(int h_age) { if (h_age < 0) { exit(1); } else if (h_age <= 2) { return h_age * 10.5; } else { return 21 + (h_age - 2) * 4; } }
int main() { assert(func0(12) == 61); assert(func0(15) == 73); assert(func0(24) == 109); return 0; }
O3
cpp
func0(int): endbr64 test %edi,%edi js 1210 <_Z5func0i+0x30> cmp $0x2,%edi jg 1200 <_Z5func0i+0x20> pxor %xmm0,%xmm0 cvtsi2sd %edi,%xmm0 mulsd 0xe0b(%rip),%xmm0 retq xchg %ax,%ax lea 0xd(,%rdi,4),%eax pxor %xmm0,%xmm0 cvtsi2sd %eax,%xmm0 retq push %rax mov $0x1,%edi callq 1080 <exit@plt> nop...
_Z5func0i: endbr64 test edi, edi js short loc_1190 cmp edi, 2 jg short loc_1180 pxor xmm0, xmm0 cvtsi2sd xmm0, edi mulsd xmm0, cs:qword_2008 retn loc_1180: lea eax, ds:0Dh[rdi*4] pxor xmm0, xmm0 cvtsi2sd xmm0, eax retn loc_1190: push rax mov edi, 1; status call _exit
double func0(int a1) { if ( a1 < 0 ) exit(1); if ( a1 > 2 ) return (double)(4 * a1 + 13); else return (double)a1 * 10.5; }
func0: ENDBR64 TEST EDI,EDI JS 0x00101190 CMP EDI,0x2 JG 0x00101180 PXOR XMM0,XMM0 CVTSI2SD XMM0,EDI MULSD XMM0,qword ptr [0x00102008] RET LAB_00101180: LEA EAX,[0xd + RDI*0x4] PXOR XMM0,XMM0 CVTSI2SD XMM0,EAX RET LAB_00101190: PUSH RAX MOV EDI,0x1 CALL 0x00101050
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* func0(int) */ double func0(int param_1) { if (param_1 < 0) { /* WARNING: Subroutine does not return */ exit(1); } if (param_1 < 3) { return (double)param_1 * _DAT_00102008; } return (double)(p...
1,056
func0
#include <vector> #include <string> #include <cassert> template <typename T>
std::vector<std::vector<T>> func0(const std::vector<T>& S, int step) { std::vector<std::vector<T>> result(step, std::vector<T>()); for(int i = 0; i < S.size(); ++i) { result[i % step].push_back(S[i]); } return result; }
int main() { // Test case 1 std::vector<std::string> S1 = {"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n"}; std::vector<std::vector<std::string>> expected1 = { {"a", "d", "g", "j", "m"}, {"b", "e", "h", "k", "n"}, {"c", "f", "i", "l"} }; assert(f...
O0
cpp
std::vector<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::allocator<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::al...
_Z5func0INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt6vectorIS6_IT_SaIS7_EESaIS9_EERKS9_i: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 58h mov [rbp+var_48], rdi mov [rbp+var_50], rsi mov [rbp+var_54], edx mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax lea rax...
long long func0<std::string>(long long a1, long long a2, int a3) { long long v3; // rbx long long v4; // rax unsigned long long v5; // rbx char v8; // [rsp+23h] [rbp-3Dh] BYREF int i; // [rsp+24h] [rbp-3Ch] char *v10; // [rsp+28h] [rbp-38h] __int128 v11; // [rsp+30h] [rbp-30h] BYREF long long v12; // [...
func0<std::string>: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x58 MOV qword ptr [RBP + -0x48],RDI MOV qword ptr [RBP + -0x50],RSI MOV dword ptr [RBP + -0x54],EDX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX LEA RAX,[RBP + -0x3d] MOV qword ptr [RBP + -0x38],RAX NOP NOP PXOR XMM0,XMM0 MOVA...
/* std::vector<std::vector<std::string, std::allocator<std::string > >, std::allocator<std::vector<std::string, std::allocator<std::string > > > > func0<std::string >(std::vector<std::string, std::allocator<std::string > > const&, int) */ vector func0<std::string>(vector_conflict *param_1,int param_2) { vecto...
1,057
func0
#include <vector> #include <string> #include <cassert> template <typename T>
std::vector<std::vector<T>> func0(const std::vector<T>& S, int step) { std::vector<std::vector<T>> result(step, std::vector<T>()); for(int i = 0; i < S.size(); ++i) { result[i % step].push_back(S[i]); } return result; }
int main() { // Test case 1 std::vector<std::string> S1 = {"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n"}; std::vector<std::vector<std::string>> expected1 = { {"a", "d", "g", "j", "m"}, {"b", "e", "h", "k", "n"}, {"c", "f", "i", "l"} }; assert(f...
O1
cpp
std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > func0<int>(std::vector<int, std::allocator<int> > const&, int): endbr64 push %r14 push %r13 push %r12 push %rbp push %rbx movslq %edx,%rbx movabs $0x555555555555555,%rax cmp %rax,%rbx ja 279b <...
_Z5func0IiESt6vectorIS0_IT_SaIS1_EESaIS3_EERKS3_i: endbr64 push r13 push r12 push rbp push rbx sub rsp, 28h mov rax, fs:28h mov [rsp+48h+var_30], rax xor eax, eax mov [rsp+48h+var_48], 0 mov [rsp+48h+var_40], 0 mov [rsp+48h+var_38], 0 movsxd rbx, edx mov rax, 555555555555555...
_QWORD * func0<int>(_QWORD *a1, long long *a2, int a3) { long long v3; // rbx long long v7; // rdi long long v8; // rax long long v9; // r8 long long v10; // r9 long long v11; // rcx unsigned long long v12; // rbx long long v14; // rdi _DWORD *v15; // rdx _DWORD *v16; // rsi long long v17; // [rsp...
func0<int>: ENDBR64 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x28 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x18],RAX XOR EAX,EAX MOV qword ptr [RSP],0x0 MOV qword ptr [RSP + 0x8],0x0 MOV qword ptr [RSP + 0x10],0x0 MOVSXD RBX,EDX MOV RAX,0x555555555555555 CMP RAX,RBX JC 0x00102b5f MOV R13,RDI MOV RBP,RSI MOV ...
/* std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > func0<int>(std::vector<int, std::allocator<int> > const&, int) */ long * func0<int>(long *param_1,long *param_2,int param_3) { vector<int,std::allocator<int>> *this; int *piVar1; int *piVar2; ve...
1,058
func0
#include <vector> #include <string> #include <cassert> template <typename T>
std::vector<std::vector<T>> func0(const std::vector<T>& S, int step) { std::vector<std::vector<T>> result(step, std::vector<T>()); for(int i = 0; i < S.size(); ++i) { result[i % step].push_back(S[i]); } return result; }
int main() { // Test case 1 std::vector<std::string> S1 = {"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n"}; std::vector<std::vector<std::string>> expected1 = { {"a", "d", "g", "j", "m"}, {"b", "e", "h", "k", "n"}, {"c", "f", "i", "l"} }; assert(f...
O2
cpp
std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > func0<int>(std::vector<int, std::allocator<int> > const&, int): endbr64 push %r15 movslq %edx,%rax movabs $0x555555555555555,%rdx push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x28,%rsp ...
_Z5func0IiESt6vectorIS0_IT_SaIS1_EESaIS3_EERKS3_i: endbr64 push r13 pxor xmm0, xmm0 push r12 push rbp mov ebp, edx push rbx sub rsp, 28h mov rax, fs:28h mov [rsp+48h+var_30], rax xor eax, eax movsxd rax, edx movaps [rsp+48h+var_48], xmm0 mov rdx, 555555555555555h mov [rsp+48...
long long func0<int>(long long a1, long long *a2, int a3, long long a4, long long a5, long long a6) { long long v7; // rax unsigned long long v10; // rbx long long v11; // rdx long long v12; // rcx unsigned long long v13; // rbx long long v14; // rsi long long v15; // rdi _DWORD *v16; // rdx long lon...
func0<int>: ENDBR64 PUSH R13 PXOR XMM0,XMM0 PUSH R12 PUSH RBP MOV EBP,EDX PUSH RBX SUB RSP,0x28 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x18],RAX XOR EAX,EAX MOVSXD RAX,EDX MOVAPS xmmword ptr [RSP],XMM0 MOV RDX,0x555555555555555 MOV qword ptr [RSP + 0x10],0x0 CMP RDX,RAX JC 0x001028a4 MOV qword ptr [RDI + 0x10...
/* std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > func0<int>(std::vector<int, std::allocator<int> > const&, int) */ int (*) [16] func0<int>(int (*param_1) [16],long *param_2,int param_3) { int (*pauVar1) [16]; vector<int,std::allocator<int>> *this;...
1,059
func0
#include <vector> #include <string> #include <cassert> template <typename T>
std::vector<std::vector<T>> func0(const std::vector<T>& S, int step) { std::vector<std::vector<T>> result(step, std::vector<T>()); for(int i = 0; i < S.size(); ++i) { result[i % step].push_back(S[i]); } return result; }
int main() { // Test case 1 std::vector<std::string> S1 = {"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n"}; std::vector<std::vector<std::string>> expected1 = { {"a", "d", "g", "j", "m"}, {"b", "e", "h", "k", "n"}, {"c", "f", "i", "l"} }; assert(f...
O3
cpp
std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > func0<int>(std::vector<int, std::allocator<int> > const&, int): endbr64 movabs $0x555555555555555,%rax push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx movslq %edx,%rbx sub $0x28,%rsp ...
_Z5func0INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt6vectorIS6_IT_SaIS7_EESaIS9_EERKS9_i: endbr64 push r15 pxor xmm0, xmm0 push r14 push r13 push r12 push rbp push rbx movsxd rbx, edx sub rsp, 48h mov [rsp+78h+var_6C], edx mov rax, fs:28h mov [rsp+78h+var_40], rax xor ...
long long * func0<std::string>(long long *a1, long long *a2, int a3) { unsigned long long v3; // rbx unsigned long long v6; // rbp long long v7; // rax long long v8; // rcx long long v9; // rsi long long v10; // rdx long long v11; // rcx long long v12; // rbx _BYTE *v13; // rdi size_t v14; // r13 ...
func0<std::string>: ENDBR64 PUSH R15 PXOR XMM0,XMM0 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX MOVSXD RBX,EDX SUB RSP,0x48 MOV dword ptr [RSP + 0xc],EDX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x38],RAX XOR EAX,EAX MOVAPS xmmword ptr [RSP + 0x20],XMM0 MOV RAX,0x555555555555555 MOV qword ptr [RSP + 0x30],0x0 ...
/* std::vector<std::vector<std::string, std::allocator<std::string > >, std::allocator<std::vector<std::string, std::allocator<std::string > > > > func0<std::string >(std::vector<std::string, std::allocator<std::string > > const&, int) */ int (*) [16] func0<std::string>(int (*param_1) [16],long *param_2,uint par...
1,060
func0
#include <assert.h>
int func0(int l) { int LSA = 4 * (l * l); return LSA; }
int main() { assert(func0(5) == 100); assert(func0(9) == 324); assert(func0(10) == 400); return 0; }
O0
cpp
func0(int): endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x14(%rbp) mov -0x14(%rbp),%eax imul %eax,%eax shl $0x2,%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] imul eax, eax shl eax, 2 mov [rbp+var_4], eax mov eax, [rbp+var_4] pop rbp retn
long long func0(int a1) { return (unsigned int)(4 * a1 * a1); }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x14],EDI MOV EAX,dword ptr [RBP + -0x14] IMUL EAX,EAX SHL EAX,0x2 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 * param_1 * 4; }
1,061
func0
#include <assert.h>
int func0(int l) { int LSA = 4 * (l * l); return LSA; }
int main() { assert(func0(5) == 100); assert(func0(9) == 324); assert(func0(10) == 400); return 0; }
O1
cpp
func0(int): endbr64 imul %edi,%edi lea 0x0(,%rdi,4),%eax retq
_Z5func0i: endbr64 imul edi, edi lea eax, ds:0[rdi*4] retn
long long func0(int a1) { return (unsigned int)(4 * a1 * a1); }
func0: ENDBR64 IMUL EDI,EDI LEA EAX,[RDI*0x4] RET
/* func0(int) */ int func0(int param_1) { return param_1 * param_1 * 4; }
1,062
func0
#include <assert.h>
int func0(int l) { int LSA = 4 * (l * l); return LSA; }
int main() { assert(func0(5) == 100); assert(func0(9) == 324); assert(func0(10) == 400); return 0; }
O2
cpp
func0(int): endbr64 imul %edi,%edi lea 0x0(,%rdi,4),%eax retq
_Z5func0i: endbr64 imul edi, edi lea eax, ds:0[rdi*4] retn
long long func0(int a1) { return (unsigned int)(4 * a1 * a1); }
func0: ENDBR64 IMUL EDI,EDI LEA EAX,[RDI*0x4] RET
/* func0(int) */ int func0(int param_1) { return param_1 * param_1 * 4; }
1,063
func0
#include <assert.h>
int func0(int l) { int LSA = 4 * (l * l); return LSA; }
int main() { assert(func0(5) == 100); assert(func0(9) == 324); assert(func0(10) == 400); return 0; }
O3
cpp
func0(int): endbr64 imul %edi,%edi lea 0x0(,%rdi,4),%eax retq
_Z5func0i: endbr64 imul edi, edi lea eax, ds:0[rdi*4] retn
long long func0(int a1) { return (unsigned int)(4 * a1 * a1); }
func0: ENDBR64 IMUL EDI,EDI LEA EAX,[RDI*0x4] RET
/* func0(int) */ int func0(int param_1) { return param_1 * param_1 * 4; }
1,064
func0
#include <assert.h>
int func0(int n) { return int(n * (4 * n * n - 1) / 3); }
int main() { assert(func0(2) == 10); assert(func0(3) == 35); assert(func0(4) == 84); return 0; }
O0
cpp
func0(int): endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x4(%rbp) mov -0x4(%rbp),%eax imul %eax,%eax shl $0x2,%eax sub $0x1,%eax imul -0x4(%rbp),%eax movslq %eax,%rdx imul $0x55555556,%rdx,%rdx shr $0x20,%rdx sar $0x1f,%eax mov %edx,%ecx sub %eax,%ecx mov %ecx,%eax pop %rbp retq
_Z5func0i: endbr64 push rbp mov rbp, rsp mov [rbp+var_4], edi mov eax, [rbp+var_4] imul eax, eax shl eax, 2 sub eax, 1 imul eax, [rbp+var_4] movsxd rdx, eax imul rdx, 55555556h shr rdx, 20h sar eax, 1Fh sub edx, eax mov eax, edx pop rbp retn
long long func0(int a1) { return (unsigned int)(a1 * (4 * a1 * a1 - 1) / 3); }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x4],EDI MOV EAX,dword ptr [RBP + -0x4] IMUL EAX,EAX SHL EAX,0x2 SUB EAX,0x1 IMUL EAX,dword ptr [RBP + -0x4] MOVSXD RDX,EAX IMUL RDX,RDX,0x55555556 SHR RDX,0x20 SAR EAX,0x1f SUB EDX,EAX MOV EAX,EDX POP RBP RET
/* func0(int) */ int func0(int param_1) { return ((param_1 * param_1 * 4 + -1) * param_1) / 3; }
1,065
func0
#include <assert.h>
int func0(int n) { return int(n * (4 * n * n - 1) / 3); }
int main() { assert(func0(2) == 10); assert(func0(3) == 35); assert(func0(4) == 84); return 0; }
O1
cpp
func0(int): endbr64 mov %edi,%eax mov %edi,%edx imul %edi,%edx lea -0x1(,%rdx,4),%edi imul %eax,%edi movslq %edi,%rax imul $0x55555556,%rax,%rax shr $0x20,%rax sar $0x1f,%edi sub %edi,%eax retq
_Z5func0i: endbr64 mov eax, edi mov edx, edi imul edx, edi lea edi, ds:0FFFFFFFFFFFFFFFFh[rdx*4] imul edi, eax movsxd rax, edi imul rax, 55555556h shr rax, 20h sar edi, 1Fh sub eax, edi retn
long long func0(int a1) { return (unsigned int)(a1 * (4 * a1 * a1 - 1) / 3); }
func0: ENDBR64 MOV EAX,EDI MOV EDX,EDI IMUL EDX,EDI LEA EDI,[-0x1 + RDX*0x4] IMUL EDI,EAX MOVSXD RAX,EDI IMUL RAX,RAX,0x55555556 SHR RAX,0x20 SAR EDI,0x1f SUB EAX,EDI RET
/* func0(int) */ int func0(int param_1) { return ((param_1 * param_1 * 4 + -1) * param_1) / 3; }
1,066
func0
#include <assert.h>
int func0(int n) { return int(n * (4 * n * n - 1) / 3); }
int main() { assert(func0(2) == 10); assert(func0(3) == 35); assert(func0(4) == 84); return 0; }
O2
cpp
func0(int): endbr64 mov %edi,%edx mov %edi,%eax imul %edi,%edx lea -0x1(,%rdx,4),%edi imul %eax,%edi movslq %edi,%rax sar $0x1f,%edi imul $0x55555556,%rax,%rax shr $0x20,%rax sub %edi,%eax retq nopl 0x0(%rax)
_Z5func0i: endbr64 mov edx, edi mov eax, edi imul edx, edi lea edi, ds:0FFFFFFFFFFFFFFFFh[rdx*4] imul edi, eax movsxd rax, edi sar edi, 1Fh imul rax, 55555556h shr rax, 20h sub eax, edi retn
long long func0(int a1) { return (unsigned int)(a1 * (4 * a1 * a1 - 1) / 3); }
func0: ENDBR64 MOV EDX,EDI MOV EAX,EDI IMUL EDX,EDI LEA EDI,[-0x1 + RDX*0x4] IMUL EDI,EAX MOVSXD RAX,EDI SAR EDI,0x1f IMUL RAX,RAX,0x55555556 SHR RAX,0x20 SUB EAX,EDI RET
/* func0(int) */ int func0(int param_1) { return ((param_1 * param_1 * 4 + -1) * param_1) / 3; }
1,067
func0
#include <assert.h>
int func0(int n) { return int(n * (4 * n * n - 1) / 3); }
int main() { assert(func0(2) == 10); assert(func0(3) == 35); assert(func0(4) == 84); return 0; }
O3
cpp
func0(int): endbr64 mov %edi,%edx mov %edi,%eax imul %edi,%edx lea -0x1(,%rdx,4),%edi imul %eax,%edi movslq %edi,%rax sar $0x1f,%edi imul $0x55555556,%rax,%rax shr $0x20,%rax sub %edi,%eax retq nopl 0x0(%rax)
_Z5func0i: endbr64 mov edx, edi mov eax, edi imul edx, edi lea edi, ds:0FFFFFFFFFFFFFFFFh[rdx*4] imul edi, eax movsxd rax, edi sar edi, 1Fh imul rax, 55555556h shr rax, 20h sub eax, edi retn
long long func0(int a1) { return (unsigned int)(a1 * (4 * a1 * a1 - 1) / 3); }
func0: ENDBR64 MOV EDX,EDI MOV EAX,EDI IMUL EDX,EDI LEA EDI,[-0x1 + RDX*0x4] IMUL EDI,EAX MOVSXD RAX,EDI SAR EDI,0x1f IMUL RAX,RAX,0x55555556 SHR RAX,0x20 SUB EAX,EDI RET
/* func0(int) */ int func0(int param_1) { return ((param_1 * param_1 * 4 + -1) * param_1) / 3; }
1,068
func0
#include <iostream> #include <assert.h>
int func0(int n) { return (6 * n * (n - 1) + 1); }
int main() { assert(func0(3) == 37); assert(func0(4) == 73); assert(func0(5) == 121); return 0; }
O0
cpp
func0(int): endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x4(%rbp) mov -0x4(%rbp),%eax sub $0x1,%eax imul -0x4(%rbp),%eax mov %eax,%edx mov %edx,%eax add %eax,%eax add %edx,%eax add %eax,%eax add $0x1,%eax pop %rbp retq
_Z5func0i: endbr64 push rbp mov rbp, rsp mov [rbp+var_4], edi mov eax, [rbp+var_4] sub eax, 1 imul eax, [rbp+var_4] mov edx, eax mov eax, edx add eax, eax add eax, edx add eax, eax add eax, 1 pop rbp retn
long long func0(int a1) { return (unsigned int)(6 * a1 * (a1 - 1) + 1); }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x4],EDI MOV EAX,dword ptr [RBP + -0x4] SUB EAX,0x1 IMUL EAX,dword ptr [RBP + -0x4] MOV EDX,EAX MOV EAX,EDX ADD EAX,EAX ADD EAX,EDX ADD EAX,EAX ADD EAX,0x1 POP RBP RET
/* func0(int) */ int func0(int param_1) { return (param_1 + -1) * param_1 * 6 + 1; }
1,069
func0
#include <iostream> #include <assert.h>
int func0(int n) { return (6 * n * (n - 1) + 1); }
int main() { assert(func0(3) == 37); assert(func0(4) == 73); assert(func0(5) == 121); return 0; }
O1
cpp
func0(int): endbr64 mov %edi,%eax lea -0x1(%rdi),%edi imul %eax,%edi lea (%rdi,%rdi,2),%eax lea 0x1(%rax,%rax,1),%eax retq
_Z5func0i: endbr64 lea eax, [rdi-1] imul eax, edi lea eax, [rax+rax*2] lea eax, [rax+rax+1] retn
long long func0(int a1) { return (unsigned int)(6 * a1 * (a1 - 1) + 1); }
func0: ENDBR64 LEA EAX,[RDI + -0x1] IMUL EAX,EDI LEA EAX,[RAX + RAX*0x2] LEA EAX,[RAX + RAX*0x1 + 0x1] RET
/* func0(int) */ int func0(int param_1) { return (param_1 + -1) * param_1 * 6 + 1; }
1,070
func0
#include <iostream> #include <assert.h>
int func0(int n) { return (6 * n * (n - 1) + 1); }
int main() { assert(func0(3) == 37); assert(func0(4) == 73); assert(func0(5) == 121); return 0; }
O2
cpp
func0(int): endbr64 mov %edi,%r8d lea -0x1(%rdi),%edi imul %r8d,%edi lea (%rdi,%rdi,2),%eax lea 0x1(%rax,%rax,1),%eax retq nopw %cs:0x0(%rax,%rax,1)
_Z5func0i: endbr64 lea eax, [rdi-1] imul eax, edi lea eax, [rax+rax*2] lea eax, [rax+rax+1] retn
long long func0(int a1) { return (unsigned int)(6 * a1 * (a1 - 1) + 1); }
func0: ENDBR64 LEA EAX,[RDI + -0x1] IMUL EAX,EDI LEA EAX,[RAX + RAX*0x2] LEA EAX,[RAX + RAX*0x1 + 0x1] RET
/* func0(int) */ int func0(int param_1) { return (param_1 + -1) * param_1 * 6 + 1; }
1,071
func0
#include <iostream> #include <assert.h>
int func0(int n) { return (6 * n * (n - 1) + 1); }
int main() { assert(func0(3) == 37); assert(func0(4) == 73); assert(func0(5) == 121); return 0; }
O3
cpp
func0(int): endbr64 mov %edi,%r8d lea -0x1(%rdi),%edi imul %r8d,%edi lea (%rdi,%rdi,2),%eax lea 0x1(%rax,%rax,1),%eax retq nopw %cs:0x0(%rax,%rax,1)
_Z5func0i: endbr64 lea eax, [rdi-1] imul eax, edi lea eax, [rax+rax*2] lea eax, [rax+rax+1] retn
long long func0(int a1) { return (unsigned int)(6 * a1 * (a1 - 1) + 1); }
func0: ENDBR64 LEA EAX,[RDI + -0x1] IMUL EAX,EDI LEA EAX,[RAX + RAX*0x2] LEA EAX,[RAX + RAX*0x1 + 0x1] RET
/* func0(int) */ int func0(int param_1) { return (param_1 + -1) * param_1 * 6 + 1; }
1,072
func0
#include <assert.h>
int func0(char k) { return int(k); }
int main() { assert(func0('A') == 65); assert(func0('R') == 82); assert(func0('S') == 83); return 0; }
O0
cpp
func0(char): endbr64 push %rbp mov %rsp,%rbp mov %edi,%eax mov %al,-0x4(%rbp) movsbl -0x4(%rbp),%eax pop %rbp retq
_Z5func0c: endbr64 push rbp mov rbp, rsp mov eax, edi mov [rbp+var_4], al movsx eax, [rbp+var_4] pop rbp retn
long long func0(char a1) { return (unsigned int)a1; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV EAX,EDI MOV byte ptr [RBP + -0x4],AL MOVSX EAX,byte ptr [RBP + -0x4] POP RBP RET
/* func0(char) */ int func0(char param_1) { return (int)param_1; }
1,073
func0
#include <assert.h>
int func0(char k) { return int(k); }
int main() { assert(func0('A') == 65); assert(func0('R') == 82); assert(func0('S') == 83); return 0; }
O1
cpp
func0(char): endbr64 movsbl %dil,%eax retq
_Z5func0c: endbr64 movsx eax, dil retn
long long func0(char a1) { return (unsigned int)a1; }
func0: ENDBR64 MOVSX EAX,DIL RET
/* func0(char) */ int func0(char param_1) { return (int)param_1; }
1,074
func0
#include <assert.h>
int func0(char k) { return int(k); }
int main() { assert(func0('A') == 65); assert(func0('R') == 82); assert(func0('S') == 83); return 0; }
O2
cpp
func0(char): endbr64 movsbl %dil,%eax retq nopl 0x0(%rax)
_Z5func0c: endbr64 movsx eax, dil retn
long long func0(char a1) { return (unsigned int)a1; }
func0: ENDBR64 MOVSX EAX,DIL RET
/* func0(char) */ int func0(char param_1) { return (int)param_1; }
1,075
func0
#include <assert.h>
int func0(char k) { return int(k); }
int main() { assert(func0('A') == 65); assert(func0('R') == 82); assert(func0('S') == 83); return 0; }
O3
cpp
func0(char): endbr64 movsbl %dil,%eax retq nopl 0x0(%rax)
_Z5func0c: endbr64 movsx eax, dil retn
long long func0(char a1) { return (unsigned int)a1; }
func0: ENDBR64 MOVSX EAX,DIL RET
/* func0(char) */ int func0(char param_1) { return (int)param_1; }
1,076
func0
#include <iostream> #include <assert.h>
int func0(int arr[], int n) { int sum = 0; for(int i = 0; i < n; i += 2) { if (arr[i] % 2 == 0) { sum += arr[i]; } } return sum; }
int main() { int arr1[] = {5, 6, 12, 1, 18, 8}; int arr2[] = {3, 20, 17, 9, 2, 10, 18, 13, 6, 18}; int arr3[] = {5, 6, 12, 1}; assert(func0(arr1, 6) == 30); assert(func0(arr2, 10) == 26); assert(func0(arr3, 4) == 12); return 0; }
O0
cpp
func0(int*, int): endbr64 push %rbp mov %rsp,%rbp mov %rdi,-0x18(%rbp) mov %esi,-0x1c(%rbp) movl $0x0,-0x8(%rbp) movl $0x0,-0x4(%rbp) mov -0x4(%rbp),%eax cmp -0x1c(%rbp),%eax jge 120a <_Z5func0Pii+0x61> mov -0x4(%rbp),%eax cltq lea 0x0(,%rax,4),%rdx mov -0x18(%rbp),%rax add %rdx,%rax...
_Z5func0Pii: endbr64 push rbp mov rbp, rsp mov [rbp+var_18], rdi mov [rbp+var_1C], esi mov [rbp+var_8], 0 mov [rbp+var_4], 0 jmp short loc_11C2 loc_1188: mov eax, [rbp+var_4] cdqe lea rdx, ds:0[rax*4] mov rax, [rbp+var_18] add rax, rdx mov eax, [rax] and eax, 1 test ...
long long func0(int *a1, int a2) { unsigned int v3; // [rsp+14h] [rbp-8h] int i; // [rsp+18h] [rbp-4h] v3 = 0; for ( i = 0; i < a2; i += 2 ) { if ( (a1[i] & 1) == 0 ) v3 += a1[i]; } return v3; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x18],RDI MOV dword ptr [RBP + -0x1c],ESI MOV dword ptr [RBP + -0x8],0x0 MOV dword ptr [RBP + -0x4],0x0 JMP 0x001011c2 LAB_00101188: MOV EAX,dword ptr [RBP + -0x4] CDQE LEA RDX,[RAX*0x4] MOV RAX,qword ptr [RBP + -0x18] ADD RAX,RDX MOV EAX,dword ptr [RAX] AND EAX...
/* func0(int*, int) */ int func0(int *param_1,int param_2) { int local_10; int local_c; local_10 = 0; for (local_c = 0; local_c < param_2; local_c = local_c + 2) { if ((param_1[local_c] & 1U) == 0) { local_10 = local_10 + param_1[local_c]; } } return local_10; }
1,077
func0
#include <iostream> #include <assert.h>
int func0(int arr[], int n) { int sum = 0; for(int i = 0; i < n; i += 2) { if (arr[i] % 2 == 0) { sum += arr[i]; } } return sum; }
int main() { int arr1[] = {5, 6, 12, 1, 18, 8}; int arr2[] = {3, 20, 17, 9, 2, 10, 18, 13, 6, 18}; int arr3[] = {5, 6, 12, 1}; assert(func0(arr1, 6) == 30); assert(func0(arr2, 10) == 26); assert(func0(arr3, 4) == 12); return 0; }
O1
cpp
func0(int*, int): endbr64 test %esi,%esi jle 11dc <_Z5func0Pii+0x33> mov %rdi,%rax sub $0x1,%esi shr %esi mov %esi,%esi lea 0x8(%rdi,%rsi,8),%rdi mov $0x0,%edx mov (%rax),%ecx lea (%rdx,%rcx,1),%esi test $0x1,%cl cmove %esi,%edx add $0x8,%rax cmp %rdi,%rax jne 11c5 <_Z5func0Pii+...
_Z5func0Pii: endbr64 test esi, esi jle short loc_119C mov rax, rdi sub esi, 1 shr esi, 1 mov esi, esi lea rdi, [rdi+rsi*8+8] mov edx, 0 loc_1185: mov ecx, [rax] lea esi, [rdx+rcx] test cl, 1 cmovz edx, esi add rax, 8 cmp rax, rdi jnz short loc_1185 loc_1199: mov ...
long long func0(int *a1, int a2) { int *v2; // rax int *v3; // rdi unsigned int v4; // edx if ( a2 <= 0 ) { return 0; } else { v2 = a1; v3 = &a1[2 * ((unsigned int)(a2 - 1) >> 1) + 2]; v4 = 0; do { if ( (*v2 & 1) == 0 ) v4 += *v2; v2 += 2; } while ( ...
func0: ENDBR64 TEST ESI,ESI JLE 0x0010119c MOV RAX,RDI SUB ESI,0x1 SHR ESI,0x1 MOV ESI,ESI LEA RDI,[RDI + RSI*0x8 + 0x8] MOV EDX,0x0 LAB_00101185: MOV ECX,dword ptr [RAX] LEA ESI,[RDX + RCX*0x1] TEST CL,0x1 CMOVZ EDX,ESI ADD RAX,0x8 CMP RAX,RDI JNZ 0x00101185 LAB_00101199: MOV EAX,EDX RET LAB_0010119c: MOV EDX,0x0 JMP ...
/* func0(int*, int) */ int func0(int *param_1,int param_2) { uint *puVar1; int iVar2; if (param_2 < 1) { iVar2 = 0; } else { puVar1 = (uint *)(param_1 + (ulong)(param_2 - 1U >> 1) * 2 + 2); iVar2 = 0; do { if ((*param_1 & 1U) == 0) { iVar2 = iVar2 + *param_1; } p...
1,078
func0
#include <iostream> #include <assert.h>
int func0(int arr[], int n) { int sum = 0; for(int i = 0; i < n; i += 2) { if (arr[i] % 2 == 0) { sum += arr[i]; } } return sum; }
int main() { int arr1[] = {5, 6, 12, 1, 18, 8}; int arr2[] = {3, 20, 17, 9, 2, 10, 18, 13, 6, 18}; int arr3[] = {5, 6, 12, 1}; assert(func0(arr1, 6) == 30); assert(func0(arr2, 10) == 26); assert(func0(arr3, 4) == 12); return 0; }
O2
cpp
func0(int*, int): endbr64 test %esi,%esi jle 12f0 <_Z5func0Pii+0x30> sub $0x1,%esi xor %eax,%eax shr %esi lea 0x8(%rdi,%rsi,8),%rsi nopl 0x0(%rax) mov (%rdi),%edx lea (%rax,%rdx,1),%ecx and $0x1,%edx cmove %ecx,%eax add $0x8,%rdi cmp %rsi,%rdi jne 12d8 <_Z5func0Pii+0x18> retq nopl ...
_Z5func0Pii: endbr64 test esi, esi jle short loc_12A0 sub esi, 1 xor eax, eax shr esi, 1 lea rsi, [rdi+rsi*8+8] nop dword ptr [rax+00h] loc_1288: mov edx, [rdi] lea ecx, [rax+rdx] and edx, 1 cmovz eax, ecx add rdi, 8 cmp rsi, rdi jnz short loc_1288 retn loc_12A0: xor...
long long func0(int *a1, int a2) { long long result; // rax int *v3; // rsi if ( a2 <= 0 ) return 0LL; result = 0LL; v3 = &a1[2 * ((unsigned int)(a2 - 1) >> 1) + 2]; do { if ( (*a1 & 1) == 0 ) result = (unsigned int)(result + *a1); a1 += 2; } while ( v3 != a1 ); return result; }
func0: ENDBR64 TEST ESI,ESI JLE 0x001012a0 SUB ESI,0x1 XOR EAX,EAX SHR ESI,0x1 LEA RSI,[RDI + RSI*0x8 + 0x8] NOP dword ptr [RAX] LAB_00101288: MOV EDX,dword ptr [RDI] LEA ECX,[RAX + RDX*0x1] AND EDX,0x1 CMOVZ EAX,ECX ADD RDI,0x8 CMP RSI,RDI JNZ 0x00101288 RET LAB_001012a0: XOR EAX,EAX RET
/* func0(int*, int) */ int func0(int *param_1,int param_2) { uint *puVar1; int iVar2; if (0 < param_2) { iVar2 = 0; puVar1 = (uint *)(param_1 + (ulong)(param_2 - 1U >> 1) * 2 + 2); do { if ((*param_1 & 1U) == 0) { iVar2 = iVar2 + *param_1; } param_1 = (int *)((uint *)par...
1,079
func0
#include <iostream> #include <assert.h>
int func0(int arr[], int n) { int sum = 0; for(int i = 0; i < n; i += 2) { if (arr[i] % 2 == 0) { sum += arr[i]; } } return sum; }
int main() { int arr1[] = {5, 6, 12, 1, 18, 8}; int arr2[] = {3, 20, 17, 9, 2, 10, 18, 13, 6, 18}; int arr3[] = {5, 6, 12, 1}; assert(func0(arr1, 6) == 30); assert(func0(arr2, 10) == 26); assert(func0(arr3, 4) == 12); return 0; }
O3
cpp
func0(int*, int): endbr64 test %esi,%esi jle 13a8 <_Z5func0Pii+0xe8> lea -0x1(%rsi),%edx cmp $0x7,%edx jbe 13ab <_Z5func0Pii+0xeb> shr $0x3,%edx pxor %xmm2,%xmm2 movdqa 0xd89(%rip),%xmm4 mov %rdi,%rax mov %edx,%ecx movdqa %xmm2,%xmm3 shl $0x5,%rcx add %rdi,%rcx nopw 0x0(%rax,%rax,1) mov...
_Z5func0Pii: endbr64 test esi, esi jle loc_1230 lea edx, [rsi-1] cmp edx, 7 jbe loc_1233 shr edx, 3 pxor xmm2, xmm2 movdqa xmm4, cs:xmmword_2010 mov rax, rdi mov ecx, edx movdqa xmm3, xmm2 shl rcx, 5 add rcx, rdi nop word ptr [rax+rax+00000000h] loc_1180: movdqu xmm1, xm...
long long func0(const __m128i *a1, int a2) { unsigned int v2; // edx __m128i v3; // xmm2 __m128i si128; // xmm4 const __m128i *v5; // rax __m128 v6; // xmm1 __m128 v7; // xmm5 __m128i v8; // xmm1 int v9; // edx __m128i v10; // xmm2 long long result; // rax long long v12; // rcx int v13; // r8d ...
func0: ENDBR64 TEST ESI,ESI JLE 0x00101230 LEA EDX,[RSI + -0x1] CMP EDX,0x7 JBE 0x00101233 SHR EDX,0x3 PXOR XMM2,XMM2 MOVDQA XMM4,xmmword ptr [0x00102010] MOV RAX,RDI MOV ECX,EDX MOVDQA XMM3,XMM2 SHL RCX,0x5 ADD RCX,RDI NOP word ptr [RAX + RAX*0x1] LAB_00101180: MOVDQU XMM1,xmmword ptr [RAX] MOVDQU XMM5,xmmword ptr [RA...
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* func0(int*, int) */ int func0(int *param_1,int param_2) { uint *puVar1; uint uVar2; uint *puVar3; uint *puVar4; uint *puVar5; uint uVar6; int iVar7; int iVar8; int iVar9; int iVar10; int iVar11; if (para...
1,080
func0
#include <assert.h>
long long func0(int n) { long long sum = 0; for (int i = 1; i <= n; i++) { int j = 2 * i; sum += (long long)j * j * j * j * j; } return sum; }
int main() { assert(func0(2) == 1056); assert(func0(3) == 8832); assert(func0(1) == 32); return 0; }
O0
cpp
func0(int): endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x14(%rbp) movq $0x0,-0x8(%rbp) movl $0x1,-0x10(%rbp) mov -0x10(%rbp),%eax cmp -0x14(%rbp),%eax jg 11a7 <_Z5func0i+0x5e> mov -0x10(%rbp),%eax add %eax,%eax mov %eax,-0xc(%rbp) mov -0xc(%rbp),%eax movslq %eax,%rdx mov -0xc(%rbp),%...
_Z5func0i: endbr64 push rbp mov rbp, rsp mov [rbp+var_14], edi mov [rbp+var_8], 0 mov [rbp+var_10], 1 jmp short loc_119F loc_1165: mov eax, [rbp+var_10] add eax, eax mov [rbp+var_C], eax mov eax, [rbp+var_C] movsxd rdx, eax mov eax, [rbp+var_C] cdqe imul rdx, rax mov e...
long long func0(int a1) { int i; // [rsp+4h] [rbp-10h] long long v3; // [rsp+Ch] [rbp-8h] v3 = 0LL; for ( i = 1; i <= a1; ++i ) v3 += 2 * i * 2 * i * 2 * i * (long long)(2 * i) * 2 * i; return v3; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x14],EDI MOV qword ptr [RBP + -0x8],0x0 MOV dword ptr [RBP + -0x10],0x1 JMP 0x0010119f LAB_00101165: MOV EAX,dword ptr [RBP + -0x10] ADD EAX,EAX MOV dword ptr [RBP + -0xc],EAX MOV EAX,dword ptr [RBP + -0xc] MOVSXD RDX,EAX MOV EAX,dword ptr [RBP + -0xc] CDQE IMU...
/* func0(int) */ long func0(int param_1) { int iVar1; int4 local_18; int8 local_10; local_10 = 0; for (local_18 = 1; local_18 <= param_1; local_18 = local_18 + 1) { iVar1 = local_18 * 2; local_10 = local_10 + (long)iVar1 * (long)iVar1 * (long)iVar1 * (long)iVar1 * (long)iVar1; } return local_...
1,081
func0
#include <assert.h>
long long func0(int n) { long long sum = 0; for (int i = 1; i <= n; i++) { int j = 2 * i; sum += (long long)j * j * j * j * j; } return sum; }
int main() { assert(func0(2) == 1056); assert(func0(3) == 8832); assert(func0(1) == 32); return 0; }
O1
cpp
func0(int): endbr64 test %edi,%edi jle 1182 <_Z5func0i+0x39> lea -0x1(%rdi),%eax lea 0x4(%rax,%rax,1),%rsi mov $0x2,%edx mov $0x0,%ecx mov %rdx,%rax imul %rdx,%rax imul %rax,%rax imul %rdx,%rax add %rax,%rcx add $0x2,%rdx cmp %rsi,%rdx jne 1163 <_Z5func0i+0x1a> mov %rcx,%rax ret...
_Z5func0i: endbr64 test edi, edi jle short loc_1180 lea esi, [rdi+1] add rsi, rsi mov edx, 2 mov ecx, 0 loc_1161: mov rax, rdx imul rax, rdx imul rax, rax imul rax, rdx add rcx, rax add rdx, 2 cmp rdx, rsi jnz short loc_1161 loc_117C: mov rax, rcx retn loc_1180: m...
long long func0(int a1) { long long v1; // rdx long long v2; // rcx if ( a1 <= 0 ) return 0LL; v1 = 2LL; v2 = 0LL; do { v2 += v1 * v1 * v1 * v1 * v1; v1 += 2LL; } while ( v1 != 2LL * (unsigned int)(a1 + 1) ); return v2; }
func0: ENDBR64 TEST EDI,EDI JLE 0x00101180 LEA ESI,[RDI + 0x1] ADD RSI,RSI MOV EDX,0x2 MOV ECX,0x0 LAB_00101161: MOV RAX,RDX IMUL RAX,RDX IMUL RAX,RAX IMUL RAX,RDX ADD RCX,RAX ADD RDX,0x2 CMP RDX,RSI JNZ 0x00101161 LAB_0010117c: MOV RAX,RCX RET LAB_00101180: MOV ECX,0x0 JMP 0x0010117c
/* func0(int) */ long func0(int param_1) { long lVar1; long lVar2; if (param_1 < 1) { lVar1 = 0; } else { lVar2 = 2; lVar1 = 0; do { lVar1 = lVar1 + lVar2 * lVar2 * lVar2 * lVar2 * lVar2; lVar2 = lVar2 + 2; } while (lVar2 != (ulong)(param_1 + 1) * 2); } return lVar1; }