index int64 0 66.5k | func_name stringlengths 2 5.36k | func_dep stringlengths 16 2.19k | func stringlengths 8 55.3k | test stringlengths 0 7.07k | opt stringclasses 4
values | language stringclasses 2
values | asm stringlengths 0 45.4k | ida_asm stringlengths 0 44.7k | ida_pseudo stringlengths 0 44.3k | ghidra_asm stringlengths 0 49.1k | ghidra_pseudo stringlengths 0 64.7k |
|---|---|---|---|---|---|---|---|---|---|---|---|
2,282 | func0 |
#include <iostream>
#include <vector>
#include <algorithm>
#include <assert.h>
| int func0(std::vector<int> arr, int N, int K) {
std::sort(arr.begin(), arr.end());
std::vector<int> dp(N, 0);
dp[0] = 0;
for (int i = 1; i < N; ++i) {
dp[i] = dp[i-1];
if (arr[i] - arr[i-1] < K) {
if (i >= 2) {
dp[i] = std::max(dp[i], dp[i-2] + arr[i] ... | int main() {
assert(func0({3, 5, 10, 15, 17, 12, 9}, 7, 4) == 62);
assert(func0({5, 15, 10, 300}, 4, 12) == 25);
assert(func0({1, 2, 3, 4, 5, 6}, 6, 6) == 21);
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> >, int, int):
endbr64
push %r15
push %r14
push %r13
mov %rdi,%r13
push %r12
push %rbp
mov %esi,%ebp
push %rbx
mov %edx,%ebx
sub $0x8,%rsp
mov 0x8(%rdi),%r14
mov (%rdi),%r15
cmp %r15,%r14
je 158c <_Z5func0St6vectorIiSaIiEEii+0xac>
mov %r1... | _Z5func0St6vectorIiSaIiEEii:
endbr64
push r15
push r14
push r13
push r12
mov r12d, esi
push rbp
mov rbp, rdi
push rbx
mov ebx, edx
sub rsp, 8
mov r14, [rdi+8]
mov r15, [rdi]
cmp r15, r14
jz short loc_1884
mov r13, r14
mov rdx, 0FFFFFFFFFFFFFFFEh
sub r13, r1... | long long func0(char **a1, int a2, int a3)
{
char *v6; // r14
char *v7; // r15
long long v8; // rdx
unsigned long long v9; // rax
char *v10; // r13
int v11; // ecx
int v12; // edx
char *v13; // rax
char *v14; // rsi
unsigned long long v15; // r13
void *v16; // rax
_DWORD *v17; // rax
_DWORD *... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
MOV R12D,ESI
PUSH RBP
MOV RBP,RDI
PUSH RBX
MOV EBX,EDX
SUB RSP,0x8
MOV R14,qword ptr [RDI + 0x8]
MOV R15,qword ptr [RDI]
CMP R15,R14
JZ 0x00101884
MOV R13,R14
MOV RDX,-0x2
SUB R13,R15
MOV RAX,R13
SAR RAX,0x2
JZ 0x00101826
BSR RAX,RAX
CDQE
LEA RDX,[RAX + RAX*0x1]
LAB_00... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(std::vector<int, std::allocator<int> >, int, int) */
void * func0(vector param_1,int param_2,int param_3)
{
uint uVar1;
int *piVar2;
code *pcVar3;
int *piVar4;
ulong uVar5;
int *piVar6;
void *pvVar7;
int4 *pu... |
2,283 | func0 |
#include <iostream>
#include <vector>
#include <algorithm>
#include <assert.h>
| int func0(std::vector<int> arr, int N, int K) {
std::sort(arr.begin(), arr.end());
std::vector<int> dp(N, 0);
dp[0] = 0;
for (int i = 1; i < N; ++i) {
dp[i] = dp[i-1];
if (arr[i] - arr[i-1] < K) {
if (i >= 2) {
dp[i] = std::max(dp[i], dp[i-2] + arr[i] ... | int main() {
assert(func0({3, 5, 10, 15, 17, 12, 9}, 7, 4) == 62);
assert(func0({5, 15, 10, 300}, 4, 12) == 25);
assert(func0({1, 2, 3, 4, 5, 6}, 6, 6) == 21);
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> >, int, int):
endbr64
push %r15
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
mov %edx,%ebp
push %rbx
mov %esi,%ebx
sub $0x18,%rsp
mov 0x8(%rdi),%r13
mov (%rdi),%r15
cmp %r15,%r13
je 15dc <_Z5func0St6vectorIiSaIiEEii+0x11c>
mov %... | _Z5func0St6vectorIiSaIiEEii:
endbr64
push r15
push r14
push r13
push r12
push rbp
mov rbp, rdi
push rbx
mov ebx, edx
sub rsp, 18h
mov r15, [rdi+8]
mov r12, [rdi]
mov [rsp+48h+var_40], esi
cmp r12, r15
jz loc_182C
mov r14, r15
lea r13, [r12+4]
sub r14, r12
m... | long long func0(char **a1, int a2, int a3)
{
char *v5; // r15
char *v6; // r12
char *v7; // r13
unsigned long long v8; // rdx
char *v9; // r14
int v10; // r9d
char *v11; // rsi
int v12; // edx
char *j; // rax
int v14; // ecx
int v15; // edx
char *v16; // rax
char *v17; // rsi
unsigned long ... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
MOV EBX,EDX
SUB RSP,0x18
MOV R15,qword ptr [RDI + 0x8]
MOV R12,qword ptr [RDI]
MOV dword ptr [RSP + 0x8],ESI
CMP R12,R15
JZ 0x0010182c
MOV R14,R15
LEA R13,[R12 + 0x4]
SUB R14,R12
MOV RAX,R14
SAR RAX,0x2
JZ 0x001018ec
BSR RDX,RAX
MOV RSI,R1... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(std::vector<int, std::allocator<int> >, int, int) */
void * func0(vector param_1,int param_2,int param_3,int param_4,int param_5,
int param_6,int4 param_7,int param_8,int param_9,
int param_10,int4 par... |
2,284 | func0 |
#include <vector>
#include <assert.h>
#include <algorithm>
| std::vector<int> func0(const std::vector<int>& nums) {
std::vector<int> result;
for (int num : nums) {
int count = std::count(nums.begin(), nums.end(), num);
if (count == 1) {
result.push_back(num);
}
}
return result;
}
| int main() {
assert((func0({1,2,3,2,3,4,5}) == std::vector<int>{1, 4, 5}));
assert((func0({1,2,3,2,4,5}) == std::vector<int>{1, 3, 4, 5}));
assert((func0({1,2,3,4,5}) == std::vector<int>{1, 2, 3, 4, 5}));
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x48,%rsp
mov %rdi,-0x48(%rbp)
mov %rsi,-0x50(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x48(%rbp),%rax
mov %rax,%rdi
callq 1a50 <_ZNSt6vectorIiSaIiEEC1Ev>
mov -0... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 48h
mov [rbp+var_48], rdi
mov [rbp+var_50], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_48]
mov rdi, rax
call _ZNSt6vectorIiSaIiEEC2Ev; std::vector<int>::vector(void)
mo... | long long func0(long long a1, long long a2)
{
long long v2; // rbx
long long v3; // rax
int v5; // [rsp+18h] [rbp-38h] BYREF
int v6; // [rsp+1Ch] [rbp-34h]
long long v7; // [rsp+20h] [rbp-30h] BYREF
_QWORD v8[4]; // [rsp+28h] [rbp-28h] BYREF
v8[2] = __readfsqword(0x28u);
std::vector<int>::vector(a1);
... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RBP + -0x48],RDI
MOV qword ptr [RBP + -0x50],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x48]
MOV RDI,RAX
CALL 0x00101a9e
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x20],RAX
MO... | /* func0(std::vector<int, std::allocator<int> > const&) */
vector * func0(vector *param_1)
{
bool bVar1;
int *piVar2;
int8 uVar3;
int8 uVar4;
vector<int,std::allocator<int>> *in_RSI;
long in_FS_OFFSET;
int local_40;
int local_3c;
int8 local_38;
int8 local_30;
vector<int,std::allocator<int>> *loc... |
2,285 | func0 |
#include <vector>
#include <assert.h>
#include <algorithm>
| std::vector<int> func0(const std::vector<int>& nums) {
std::vector<int> result;
for (int num : nums) {
int count = std::count(nums.begin(), nums.end(), num);
if (count == 1) {
result.push_back(num);
}
}
return result;
}
| int main() {
assert((func0({1,2,3,2,3,4,5}) == std::vector<int>{1, 4, 5}));
assert((func0({1,2,3,2,4,5}) == std::vector<int>{1, 3, 4, 5}));
assert((func0({1,2,3,4,5}) == std::vector<int>{1, 2, 3, 4, 5}));
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x10,%rsp
mov %rdi,%r12
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi)
movq $0x0,0x10(%rdi)
mov (%rsi),%rbx
mov 0x8(%rsi),%r1... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push r13
push r12
push rbp
push rbx
sub rsp, 18h
mov r12, rdi
mov rbp, rsi
mov rax, fs:28h
mov [rsp+38h+var_30], rax
xor eax, eax
mov qword ptr [rdi], 0
mov qword ptr [rdi+8], 0
mov qword ptr [rdi+10h], 0
mov rbx, [rsi]
mov r13... | _QWORD * func0(_QWORD *a1, int **a2)
{
int *v4; // rbx
int *v5; // r13
int v7; // esi
int *v8; // rdi
int *v9; // rax
int v10; // edx
_DWORD *v11; // rax
int v12; // [rsp+4h] [rbp-34h] BYREF
unsigned long long v13; // [rsp+8h] [rbp-30h]
v13 = __readfsqword(0x28u);
*a1 = 0LL;
a1[1] = 0LL;
a1[2... | func0:
ENDBR64
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x18
MOV R12,RDI
MOV RBP,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
MOV qword ptr [RDI],0x0
MOV qword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
MOV RBX,qword ptr [RSI]
MOV R13,qword ptr [RSI + 0x8]
CMP R13,RBX
JNZ 0x00101... | /* func0(std::vector<int, std::allocator<int> > const&) */
vector * func0(vector *param_1)
{
int *piVar1;
int *piVar2;
int iVar3;
int *piVar4;
int8 *in_RSI;
long in_FS_OFFSET;
int local_34;
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
*(int8 *)param_1 = 0;
*(int8 *)(param_1 + 8) ... |
2,286 | func0 |
#include <vector>
#include <assert.h>
#include <algorithm>
| std::vector<int> func0(const std::vector<int>& nums) {
std::vector<int> result;
for (int num : nums) {
int count = std::count(nums.begin(), nums.end(), num);
if (count == 1) {
result.push_back(num);
}
}
return result;
}
| int main() {
assert((func0({1,2,3,2,3,4,5}) == std::vector<int>{1, 4, 5}));
assert((func0({1,2,3,2,4,5}) == std::vector<int>{1, 3, 4, 5}));
assert((func0({1,2,3,4,5}) == std::vector<int>{1, 2, 3, 4, 5}));
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x10,%rsp
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi)
movq $0x0,0x10(%rdi)
mov (%rsi),%rax
mov 0x8(%rsi),%r1... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push r13
pxor xmm0, xmm0
mov r13, rdi
push r12
push rbp
push rbx
sub rsp, 18h
mov rax, fs:28h
mov [rsp+38h+var_30], rax
xor eax, eax
mov qword ptr [rdi+10h], 0
movups xmmword ptr [rdi], xmm0
mov rax, [rsi]
mov r12, [rsi+8]
cmp r12,... | long long func0(long long a1, int **a2)
{
int *v3; // rax
int *v4; // r12
int *v6; // rbx
int *i; // rdi
int v8; // esi
int v9; // edx
int v10; // ecx
_DWORD *v11; // rax
int v13; // [rsp+0h] [rbp-34h] BYREF
unsigned long long v14; // [rsp+4h] [rbp-30h]
v14 = __readfsqword(0x28u);
*(_QWORD *)(... | func0:
ENDBR64
PUSH R13
PXOR XMM0,XMM0
MOV R13,RDI
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x18
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
MOV qword ptr [RDI + 0x10],0x0
MOVUPS xmmword ptr [RDI],XMM0
MOV RAX,qword ptr [RSI]
MOV R12,qword ptr [RSI + 0x8]
CMP R12,RAX
JZ 0x001016b8
MOV RBP,RSI
MOV RB... | /* func0(std::vector<int, std::allocator<int> > const&) */
vector * func0(vector *param_1)
{
int iVar1;
int *piVar2;
int *piVar3;
int iVar4;
int *piVar5;
int8 *in_RSI;
int *piVar6;
long in_FS_OFFSET;
int local_34;
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
*(int8 *)(param_1 +... |
2,287 | func0 |
#include <vector>
#include <assert.h>
#include <algorithm>
| std::vector<int> func0(const std::vector<int>& nums) {
std::vector<int> result;
for (int num : nums) {
int count = std::count(nums.begin(), nums.end(), num);
if (count == 1) {
result.push_back(num);
}
}
return result;
}
| int main() {
assert((func0({1,2,3,2,3,4,5}) == std::vector<int>{1, 4, 5}));
assert((func0({1,2,3,2,4,5}) == std::vector<int>{1, 3, 4, 5}));
assert((func0({1,2,3,4,5}) == std::vector<int>{1, 2, 3, 4, 5}));
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %r15
pxor %xmm0,%xmm0
push %r14
push %r13
mov %rdi,%r13
push %r12
push %rbp
push %rbx
sub $0x18,%rsp
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
movq $0x0,0x10(%rdi)
movups %xmm0,(%rdi)
mov (%rsi),%rdx
mov 0x8... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push r13
pxor xmm0, xmm0
mov r13, rdi
push r12
push rbp
push rbx
sub rsp, 18h
mov rax, fs:28h
mov [rsp+38h+var_30], rax
xor eax, eax
mov qword ptr [rdi+10h], 0
movups xmmword ptr [rdi], xmm0
mov rdx, [rsi]
mov r12, [rsi+8]
cmp r12,... | long long func0(long long a1, long long a2, double a3, double a4, __m128i a5, __m128i a6, double a7)
{
__m128i v7; // xmm0
const __m128i *v9; // rdx
unsigned int *v10; // r12
unsigned int *v12; // rbx
const __m128i *i; // r8
unsigned int v14; // edi
const __m128i *v15; // rax
unsigned long long v16; //... | func0:
ENDBR64
PUSH R13
PXOR XMM0,XMM0
MOV R13,RDI
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x18
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
MOV qword ptr [RDI + 0x10],0x0
MOVUPS xmmword ptr [RDI],XMM0
MOV RDX,qword ptr [RSI]
MOV R12,qword ptr [RSI + 0x8]
CMP R12,RDX
JZ 0x00101770
MOV RBP,RSI
MOV RB... | /* func0(std::vector<int, std::allocator<int> > const&) */
vector * func0(vector *param_1)
{
int *piVar1;
int *piVar2;
int *piVar3;
int *piVar4;
int iVar5;
int *piVar6;
ulong uVar7;
int *piVar8;
int *piVar9;
int8 *in_RSI;
ulong uVar10;
int *piVar11;
long in_FS_OFFSET;
int iVar13;
int auV... |
2,288 | func0 |
#include <vector>
#include <set>
#include <assert.h>
| int func0(const std::vector<int>& list_data) {
std::set<int> unique_elements(list_data.begin(), list_data.end());
int product = 1;
for (int element : unique_elements) {
product *= element;
}
return product;
}
| int main() {
assert(func0({10, 20, 30, 40, 20, 50, 60, 40}) == 720000000);
assert(func0({1, 2, 3, 1}) == 6);
assert(func0({7, 8, 9, 0, 1, 1}) == 0);
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x78,%rsp
mov %rdi,-0x78(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x78(%rbp),%rax
mov %rax,%rdi
callq 17c0 <_ZNKSt6vectorIiSaIiEE3endEv>
mov %rax,%rbx
mov -0x78(... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 78h
mov [rbp+var_78], rdi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_78]
mov rdi, rax
call _ZNKSt6vectorIiSaIiEE3endEv; std::vector<int>::end(void)
mov rbx, rax
mov rax... | long long func0(long long a1)
{
long long v1; // rbx
long long v2; // rax
unsigned int v4; // [rsp+10h] [rbp-70h]
long long v5; // [rsp+18h] [rbp-68h] BYREF
_QWORD v6[2]; // [rsp+20h] [rbp-60h] BYREF
_BYTE v7[56]; // [rsp+30h] [rbp-50h] BYREF
unsigned long long v8; // [rsp+68h] [rbp-18h]
v8 = __readfs... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x78
MOV qword ptr [RBP + -0x78],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x78]
MOV RDI,RAX
CALL 0x00101812
MOV RBX,RAX
MOV RAX,qword ptr [RBP + -0x78]
MOV RDI,RAX
CALL 0x001017c6
MOV RCX,RAX
LEA RAX,[RBP +... | /* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
char cVar1;
__normal_iterator _Var2;
__normal_iterator _Var3;
int *piVar4;
long in_FS_OFFSET;
int local_78;
int8 local_70;
int8 local_68;
set<int,std::less<int>,std::allocator<int>> *local_60;
set<int,std::less... |
2,289 | func0 |
#include <vector>
#include <set>
#include <assert.h>
| int func0(const std::vector<int>& list_data) {
std::set<int> unique_elements(list_data.begin(), list_data.end());
int product = 1;
for (int element : unique_elements) {
product *= element;
}
return product;
}
| int main() {
assert(func0({10, 20, 30, 40, 20, 50, 60, 40}) == 720000000);
assert(func0({1, 2, 3, 1}) == 6);
assert(func0({7, 8, 9, 0, 1, 1}) == 0);
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x48,%rsp
mov %fs:0x28,%rax
mov %rax,0x38(%rsp)
xor %eax,%eax
mov 0x8(%rdi),%r14
mov (%rdi),%rbx
movl $0x0,0x8(%rsp)
movq $0x0,0x10(%rsp)
lea 0x8(%rsp),%rax... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 48h
mov rax, fs:28h
mov [rsp+78h+var_40], rax
xor eax, eax
mov r14, [rdi+8]
mov rbx, [rdi]
mov [rsp+78h+var_70], 0
mov [rsp+78h+var_68], 0
lea rax, [rsp+78h+var_70]
m... | long long func0(long long a1)
{
_DWORD *v1; // r14
_DWORD *v2; // rbx
long long insert_hint_unique_pos; // rax
int *v4; // rdx
int *v5; // rbp
bool v6; // r12
long long v7; // rax
int *v8; // rdi
unsigned int v9; // ebx
long long v11; // [rsp+0h] [rbp-78h] BYREF
int v12; // [rsp+8h] [rbp-70h] BYR... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x48
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
MOV R14,qword ptr [RDI + 0x8]
MOV RBX,qword ptr [RDI]
MOV dword ptr [RSP + 0x8],0x0
MOV qword ptr [RSP + 0x10],0x0
LEA RAX,[RSP + 0x8]
MOV qword ptr [RSP + 0x18],RAX
M... | /* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
int *piVar1;
_Rb_tree_node_base *p_Var2;
_Rb_tree_node_base *p_Var3;
int iVar4;
int *piVar5;
bool bVar6;
long in_FS_OFFSET;
bool bVar7;
int auVar8 [16];
_Rb_tree<int,int,std::_Identity<int>,std::less<int>,std::... |
2,290 | func0 |
#include <vector>
#include <set>
#include <assert.h>
| int func0(const std::vector<int>& list_data) {
std::set<int> unique_elements(list_data.begin(), list_data.end());
int product = 1;
for (int element : unique_elements) {
product *= element;
}
return product;
}
| int main() {
assert(func0({10, 20, 30, 40, 20, 50, 60, 40}) == 720000000);
assert(func0({1, 2, 3, 1}) == 6);
assert(func0({7, 8, 9, 0, 1, 1}) == 0);
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x48,%rsp
mov 0x8(%rdi),%r15
mov (%rdi),%rbx
mov %fs:0x28,%rax
mov %rax,0x38(%rsp)
xor %eax,%eax
lea 0x8(%rsp),%rbp
movl $0x0,0x8(%rsp)
movq $0x0,0x10(%rsp)... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 58h
mov r14, [rdi+8]
mov rbp, [rdi]
mov rax, fs:28h
mov [rsp+88h+var_40], rax
xor eax, eax
lea r13, [rsp+88h+var_70]
mov [rsp+88h+var_70], 0
mov [rsp+88h+var_68], 0
m... | long long func0(signed int **a1)
{
signed int *v1; // r14
signed int *v2; // rbp
long long v3; // rax
signed int v4; // r15d
int *v5; // rbx
long long insert_unique_pos; // rax
int *v7; // rdx
bool v8; // al
bool v9; // r12
long long v10; // rax
int *v11; // rdi
_QWORD *v12; // rbx
unsigned i... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x58
MOV R14,qword ptr [RDI + 0x8]
MOV RBP,qword ptr [RDI]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x48],RAX
XOR EAX,EAX
LEA R13,[RSP + 0x18]
MOV dword ptr [RSP + 0x18],0x0
MOV qword ptr [RSP + 0x20],0x0
MOV qword ptr [RSP + 0x28],R13... | /* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
uint uVar1;
uint *puVar2;
void *pvVar3;
void *pvVar4;
_Rb_tree_node_base *p_Var5;
_Rb_tree_node_base *p_Var6;
int iVar7;
uint *puVar8;
long in_FS_OFFSET;
bool bVar9;
int auVar10 [16];
_Rb_tree<int,int,std::... |
2,291 | func0 |
#include <vector>
#include <set>
#include <assert.h>
| int func0(const std::vector<int>& list_data) {
std::set<int> unique_elements(list_data.begin(), list_data.end());
int product = 1;
for (int element : unique_elements) {
product *= element;
}
return product;
}
| int main() {
assert(func0({10, 20, 30, 40, 20, 50, 60, 40}) == 720000000);
assert(func0({1, 2, 3, 1}) == 6);
assert(func0({7, 8, 9, 0, 1, 1}) == 0);
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x40,%rsp
mov 0x8(%rdi),%r14
mov (%rdi),%rbx
mov %fs:0x28,%rax
mov %rax,0x38(%rsp)
xor %eax,%eax
lea 0x8(%rsp),%rbp
movl $0x0,0x8(%rsp)
movq $0x0,0x10(%rsp)
mov %rbp... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 48h
mov r13, [rdi+8]
mov r12, [rdi]
mov rax, fs:28h
mov [rsp+78h+var_40], rax
xor eax, eax
lea rbp, [rsp+78h+var_70]
mov [rsp+78h+var_70], 0
mov [rsp+78h+var_68], 0
m... | long long func0(int **a1)
{
int *v1; // r13
int *v2; // r12
long long v3; // r14
int v4; // r15d
int *v5; // rbx
bool v6; // r14
long long v7; // rax
int *v8; // rdi
_QWORD *v9; // rbx
unsigned int v10; // r12d
void *v11; // rdi
int v13; // edx
int *v14; // rax
int v15; // [rsp+8h] [rbp-70h... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x48
MOV R13,qword ptr [RDI + 0x8]
MOV R12,qword ptr [RDI]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
LEA RBP,[RSP + 0x8]
MOV dword ptr [RSP + 0x8],0x0
MOV qword ptr [RSP + 0x10],0x0
MOV qword ptr [RSP + 0x18],RBP
M... | /* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
int *piVar1;
_Rb_tree_node_base *p_Var2;
long lVar3;
int iVar4;
_Rb_tree_node_base *p_Var5;
int iVar6;
int *piVar7;
bool bVar8;
long lVar9;
long in_FS_OFFSET;
int4 local_70 [2];
_Rb_tree_node_base *local_68... |
2,292 | func0 |
#include <cassert>
| double func0(double r, double h) {
double surfacearea = (2 * 3.1415 * r * r) + (2 * 3.1415 * r * h);
return surfacearea;
}
| int main() {
assert(func0(10, 5) == 942.45);
assert(func0(4, 5) == 226.18800000000002);
assert(func0(4, 10) == 351.848);
return 0;
}
| O0 | cpp | func0(double, double):
endbr64
push %rbp
mov %rsp,%rbp
movsd %xmm0,-0x18(%rbp)
movsd %xmm1,-0x20(%rbp)
movsd -0x18(%rbp),%xmm1
movsd 0xf50(%rip),%xmm0
mulsd %xmm1,%xmm0
movapd %xmm0,%xmm1
mulsd -0x18(%rbp),%xmm1
movsd -0x18(%rbp),%xmm2
movsd 0xf36(%rip),%xmm0
mulsd %xmm2,%xmm0
mulsd -0x20(%rbp),%xmm0
add... | _Z5func0dd:
endbr64
push rbp
mov rbp, rsp
movsd [rbp+var_18], xmm0
movsd [rbp+var_20], xmm1
movsd xmm1, [rbp+var_18]
movsd xmm0, cs:qword_2090
mulsd xmm0, xmm1
movapd xmm1, xmm0
mulsd xmm1, [rbp+var_18]
movsd xmm2, [rbp+var_18]
movsd xmm0, cs:qword_2090
mulsd xmm0, xmm2
mulsd xmm0, [rbp+var_... | double func0(double a1, double a2)
{
return 6.283 * a1 * a2 + 6.283 * a1 * a1;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOVSD qword ptr [RBP + -0x18],XMM0
MOVSD qword ptr [RBP + -0x20],XMM1
MOVSD XMM1,qword ptr [RBP + -0x18]
MOVSD XMM0,qword ptr [0x00102090]
MULSD XMM0,XMM1
MOVAPD XMM1,XMM0
MULSD XMM1,qword ptr [RBP + -0x18]
MOVSD XMM2,qword ptr [RBP + -0x18]
MOVSD XMM0,qword ptr [0x00102090]
MULSD XM... | /* func0(double, double) */
double func0(double param_1,double param_2)
{
return DAT_00102090 * param_1 * param_2 + DAT_00102090 * param_1 * param_1;
} |
2,293 | func0 |
#include <cassert>
| double func0(double r, double h) {
double surfacearea = (2 * 3.1415 * r * r) + (2 * 3.1415 * r * h);
return surfacearea;
}
| int main() {
assert(func0(10, 5) == 942.45);
assert(func0(4, 5) == 226.18800000000002);
assert(func0(4, 10) == 351.848);
return 0;
}
| O1 | cpp | func0(double, double):
endbr64
movapd %xmm0,%xmm2
mulsd 0xecf(%rip),%xmm2
mulsd %xmm2,%xmm0
mulsd %xmm1,%xmm2
addsd %xmm2,%xmm0
retq
| _Z5func0dd:
endbr64
movapd xmm2, xmm0
mulsd xmm2, cs:qword_2008
mulsd xmm0, xmm2
mulsd xmm2, xmm1
addsd xmm0, xmm2
retn | double func0(double a1, double a2)
{
return a1 * (a1 * 6.283) + a1 * 6.283 * a2;
} | func0:
ENDBR64
MOVAPD XMM2,XMM0
MULSD XMM2,qword ptr [0x00102008]
MULSD XMM0,XMM2
MULSD XMM2,XMM1
ADDSD XMM0,XMM2
RET | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(double, double) */
double func0(double param_1,double param_2)
{
return param_1 * param_1 * _DAT_00102008 + param_1 * _DAT_00102008 * param_2;
} |
2,294 | func0 |
#include <cassert>
| double func0(double r, double h) {
double surfacearea = (2 * 3.1415 * r * r) + (2 * 3.1415 * r * h);
return surfacearea;
}
| int main() {
assert(func0(10, 5) == 942.45);
assert(func0(4, 5) == 226.18800000000002);
assert(func0(4, 10) == 351.848);
return 0;
}
| O2 | cpp | func0(double, double):
endbr64
movsd 0xebc(%rip),%xmm2
mulsd %xmm0,%xmm2
mulsd %xmm2,%xmm0
mulsd %xmm1,%xmm2
addsd %xmm2,%xmm0
retq
nopl (%rax)
| _Z5func0dd:
endbr64
movsd xmm2, cs:qword_2008
mulsd xmm2, xmm0
mulsd xmm0, xmm2
mulsd xmm2, xmm1
addsd xmm0, xmm2
retn | double func0(double a1, double a2)
{
return a1 * (6.283 * a1) + 6.283 * a1 * a2;
} | func0:
ENDBR64
MOVSD XMM2,qword ptr [0x00102008]
MULSD XMM2,XMM0
MULSD XMM0,XMM2
MULSD XMM2,XMM1
ADDSD XMM0,XMM2
RET | /* func0(double, double) */
double func0(double param_1,double param_2)
{
return param_1 * DAT_00102008 * param_1 + DAT_00102008 * param_1 * param_2;
} |
2,295 | func0 |
#include <cassert>
| double func0(double r, double h) {
double surfacearea = (2 * 3.1415 * r * r) + (2 * 3.1415 * r * h);
return surfacearea;
}
| int main() {
assert(func0(10, 5) == 942.45);
assert(func0(4, 5) == 226.18800000000002);
assert(func0(4, 10) == 351.848);
return 0;
}
| O3 | cpp | func0(double, double):
endbr64
movsd 0xebc(%rip),%xmm2
mulsd %xmm0,%xmm2
mulsd %xmm2,%xmm0
mulsd %xmm1,%xmm2
addsd %xmm2,%xmm0
retq
nopl (%rax)
| _Z5func0dd:
endbr64
movsd xmm2, cs:qword_2008
mulsd xmm2, xmm0
mulsd xmm0, xmm2
mulsd xmm2, xmm1
addsd xmm0, xmm2
retn | double func0(double a1, double a2)
{
return a1 * (6.283 * a1) + 6.283 * a1 * a2;
} | func0:
ENDBR64
MOVSD XMM2,qword ptr [0x00102008]
MULSD XMM2,XMM0
MULSD XMM0,XMM2
MULSD XMM2,XMM1
ADDSD XMM0,XMM2
RET | /* func0(double, double) */
double func0(double param_1,double param_2)
{
return param_1 * DAT_00102008 * param_1 + DAT_00102008 * param_1 * param_2;
} |
2,296 | func0 | #include <iostream>
#include <assert.h>
| int func0(int A, int N, int L, int R) {
int count = 0;
int i;
for (i = L; i <= R; i++) {
if (i % A != 0) {
count++;
}
if (count == N) {
break;
}
}
return i;
}
| int main() {
assert(func0(2, 3, 1, 10) == 5);
assert(func0(3, 6, 4, 20) == 11);
assert(func0(5, 10, 4, 20) == 16);
return 0;
}
| O0 | cpp | func0(int, int, int, int):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
mov %esi,-0x18(%rbp)
mov %edx,-0x1c(%rbp)
mov %ecx,-0x20(%rbp)
movl $0x0,-0x8(%rbp)
mov -0x1c(%rbp),%eax
mov %eax,-0x4(%rbp)
mov -0x4(%rbp),%eax
cmp -0x20(%rbp),%eax
jg 11d2 <_Z5func0iiii+0x49>
mov -0x4... | _Z5func0iiii:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_14], edi
mov [rbp+var_18], esi
mov [rbp+var_1C], edx
mov [rbp+var_20], ecx
mov [rbp+var_8], 0
mov eax, [rbp+var_1C]
mov [rbp+var_4], eax
jmp short loc_1189
loc_116C:
mov eax, [rbp+var_4]
cdq
idiv [rbp+var_14]
mov ... | long long func0(int a1, int a2, signed int a3, signed int a4)
{
int v5; // [rsp+18h] [rbp-8h]
v5 = 0;
while ( a3 <= a4 )
{
if ( a3 % a1 )
++v5;
if ( v5 == a2 )
break;
++a3;
}
return (unsigned int)a3;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x14],EDI
MOV dword ptr [RBP + -0x18],ESI
MOV dword ptr [RBP + -0x1c],EDX
MOV dword ptr [RBP + -0x20],ECX
MOV dword ptr [RBP + -0x8],0x0
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00101189
LAB_0010116c:
MOV EAX,dword ptr [RBP + -0x4]
CD... | /* func0(int, int, int, int) */
int func0(int param_1,int param_2,int param_3,int param_4)
{
int local_10;
int local_c;
local_10 = 0;
local_c = param_3;
while( true ) {
if (param_4 < local_c) {
return local_c;
}
if (local_c % param_1 != 0) {
local_10 = local_10 + 1;
}
if (... |
2,297 | func0 | #include <iostream>
#include <assert.h>
| int func0(int A, int N, int L, int R) {
int count = 0;
int i;
for (i = L; i <= R; i++) {
if (i % A != 0) {
count++;
}
if (count == N) {
break;
}
}
return i;
}
| int main() {
assert(func0(2, 3, 1, 10) == 5);
assert(func0(3, 6, 4, 20) == 11);
assert(func0(5, 10, 4, 20) == 16);
return 0;
}
| O1 | cpp | func0(int, int, int, int):
endbr64
mov %edx,%r8d
cmp %ecx,%edx
jg 11b9 <_Z5func0iiii+0x30>
mov $0x0,%r9d
mov %r8d,%eax
cltd
idiv %edi
cmp $0x1,%edx
sbb $0xffffffff,%r9d
cmp %esi,%r9d
je 11bc <_Z5func0iiii+0x33>
add $0x1,%r8d
cmp %r8d,%ecx
jge 119a <_Z5func0iiii+0x11>
mov %r8d,... | _Z5func0iiii:
endbr64
mov r8d, edx
cmp edx, ecx
jg short loc_1179
mov r9d, 0
loc_115A:
mov eax, r8d
cdq
idiv edi
cmp edx, 1
sbb r9d, 0FFFFFFFFh
cmp r9d, esi
jz short loc_117C
add r8d, 1
cmp ecx, r8d
jge short loc_115A
mov eax, r8d
retn
loc_1179:
mov eax, edx
... | long long func0(int a1, int a2, unsigned int a3, int a4)
{
unsigned int v4; // r8d
int v5; // r9d
v4 = a3;
if ( (int)a3 > a4 )
return a3;
v5 = 0;
while ( 1 )
{
v5 -= ((int)v4 % a1 == 0) - 1;
if ( v5 == a2 )
break;
if ( a4 < (int)++v4 )
return v4;
}
return v4;
} | func0:
ENDBR64
MOV R8D,EDX
CMP EDX,ECX
JG 0x00101179
MOV R9D,0x0
LAB_0010115a:
MOV EAX,R8D
CDQ
IDIV EDI
CMP EDX,0x1
SBB R9D,-0x1
CMP R9D,ESI
JZ 0x0010117c
ADD R8D,0x1
CMP ECX,R8D
JGE 0x0010115a
MOV EAX,R8D
RET
LAB_00101179:
MOV EAX,EDX
RET
LAB_0010117c:
MOV EAX,R8D
RET | /* func0(int, int, int, int) */
int func0(int param_1,int param_2,int param_3,int param_4)
{
int iVar1;
if (param_4 < param_3) {
return param_3;
}
iVar1 = 0;
do {
iVar1 = (iVar1 + 1) - (uint)(param_3 % param_1 == 0);
if (iVar1 == param_2) {
return param_3;
}
param_3 = param_3 + ... |
2,298 | func0 | #include <iostream>
#include <assert.h>
| int func0(int A, int N, int L, int R) {
int count = 0;
int i;
for (i = L; i <= R; i++) {
if (i % A != 0) {
count++;
}
if (count == N) {
break;
}
}
return i;
}
| int main() {
assert(func0(2, 3, 1, 10) == 5);
assert(func0(3, 6, 4, 20) == 11);
assert(func0(5, 10, 4, 20) == 16);
return 0;
}
| O2 | cpp | func0(int, int, int, int):
endbr64
mov %edx,%r8d
cmp %ecx,%edx
jg 12fb <_Z5func0iiii+0x2b>
xor %r9d,%r9d
jmp 12e9 <_Z5func0iiii+0x19>
add $0x1,%r8d
cmp %r8d,%ecx
jl 12fb <_Z5func0iiii+0x2b>
mov %r8d,%eax
cltd
idiv %edi
cmp $0x1,%edx
sbb $0xffffffff,%r9d
cmp %esi,%r9d
jne 12e0 ... | _Z5func0iiii:
endbr64
mov r8d, edx
cmp edx, ecx
jg short loc_127B
xor r9d, r9d
jmp short loc_1269
loc_1260:
add r8d, 1
cmp ecx, r8d
jl short loc_127B
loc_1269:
mov eax, r8d
cdq
idiv edi
cmp edx, 1
sbb r9d, 0FFFFFFFFh
cmp r9d, esi
jnz short loc_1260
loc_127B:
mov ... | long long func0(int a1, int a2, signed int a3, signed int a4)
{
signed int v4; // r8d
int v5; // r9d
v4 = a3;
if ( a3 <= a4 )
{
v5 = 0;
do
{
v5 -= (v4 % a1 == 0) - 1;
if ( v5 == a2 )
break;
++v4;
}
while ( a4 >= v4 );
}
return (unsigned int)v4;
} | func0:
ENDBR64
MOV R8D,EDX
CMP EDX,ECX
JG 0x0010127b
XOR R9D,R9D
JMP 0x00101269
LAB_00101260:
ADD R8D,0x1
CMP ECX,R8D
JL 0x0010127b
LAB_00101269:
MOV EAX,R8D
CDQ
IDIV EDI
CMP EDX,0x1
SBB R9D,-0x1
CMP R9D,ESI
JNZ 0x00101260
LAB_0010127b:
MOV EAX,R8D
RET | /* func0(int, int, int, int) */
int func0(int param_1,int param_2,int param_3,int param_4)
{
int iVar1;
if (param_3 <= param_4) {
iVar1 = 0;
do {
iVar1 = (iVar1 + 1) - (uint)(param_3 % param_1 == 0);
if (iVar1 == param_2) {
return param_3;
}
param_3 = param_3 + 1;
} ... |
2,299 | func0 | #include <iostream>
#include <assert.h>
| int func0(int A, int N, int L, int R) {
int count = 0;
int i;
for (i = L; i <= R; i++) {
if (i % A != 0) {
count++;
}
if (count == N) {
break;
}
}
return i;
}
| int main() {
assert(func0(2, 3, 1, 10) == 5);
assert(func0(3, 6, 4, 20) == 11);
assert(func0(5, 10, 4, 20) == 16);
return 0;
}
| O3 | cpp | func0(int, int, int, int):
endbr64
mov %edx,%r8d
cmp %ecx,%edx
jg 11eb <_Z5func0iiii+0x2b>
xor %r9d,%r9d
jmp 11d9 <_Z5func0iiii+0x19>
add $0x1,%r8d
cmp %r8d,%ecx
jl 11eb <_Z5func0iiii+0x2b>
mov %r8d,%eax
cltd
idiv %edi
cmp $0x1,%edx
sbb $0xffffffff,%r9d
cmp %esi,%r9d
jne 11d0 ... | _Z5func0iiii:
endbr64
mov r8d, edx
cmp edx, ecx
jg short loc_116B
xor r9d, r9d
jmp short loc_1159
loc_1150:
add r8d, 1
cmp ecx, r8d
jl short loc_116B
loc_1159:
mov eax, r8d
cdq
idiv edi
cmp edx, 1
sbb r9d, 0FFFFFFFFh
cmp r9d, esi
jnz short loc_1150
loc_116B:
mov ... | long long func0(int a1, int a2, signed int a3, signed int a4)
{
signed int v4; // r8d
int v5; // r9d
v4 = a3;
if ( a3 <= a4 )
{
v5 = 0;
do
{
v5 -= (v4 % a1 == 0) - 1;
if ( v5 == a2 )
break;
++v4;
}
while ( a4 >= v4 );
}
return (unsigned int)v4;
} | func0:
ENDBR64
MOV R8D,EDX
CMP EDX,ECX
JG 0x0010116b
XOR R9D,R9D
JMP 0x00101159
LAB_00101150:
ADD R8D,0x1
CMP ECX,R8D
JL 0x0010116b
LAB_00101159:
MOV EAX,R8D
CDQ
IDIV EDI
CMP EDX,0x1
SBB R9D,-0x1
CMP R9D,ESI
JNZ 0x00101150
LAB_0010116b:
MOV EAX,R8D
RET | /* func0(int, int, int, int) */
int func0(int param_1,int param_2,int param_3,int param_4)
{
int iVar1;
if (param_3 <= param_4) {
iVar1 = 0;
do {
iVar1 = (iVar1 + 1) - (uint)(param_3 % param_1 == 0);
if (iVar1 == param_2) {
return param_3;
}
param_3 = param_3 + 1;
} ... |
2,300 | func0 |
#include <iostream>
#include <assert.h>
| bool func0(int A[], int B[], int n, int m) {
int i = 0, j = 0;
while (i < n && j < m) {
if (A[i] == B[j]) {
i++;
j++;
if (j == m) {
return true;
}
} else {
i = i - j + 1;
j = 0;
}
}
... | int main() {
int A1[] = {1, 4, 3, 5};
int B1[] = {1, 2};
int A2[] = {1, 2, 1};
int B2[] = {1, 2, 1};
int A3[] = {1, 0, 2, 2};
int B3[] = {2, 2, 0};
assert(func0(A1, B1, 4, 2) == false);
assert(func0(A2, B2, 3, 3) == true);
assert(func0(A3, B3, 4, 3) == false);
retur... | O0 | cpp | func0(int*, int*, int, int):
endbr64
push %rbp
mov %rsp,%rbp
mov %rdi,-0x18(%rbp)
mov %rsi,-0x20(%rbp)
mov %edx,-0x24(%rbp)
mov %ecx,-0x28(%rbp)
movl $0x0,-0x8(%rbp)
movl $0x0,-0x4(%rbp)
mov -0x8(%rbp),%eax
cmp -0x24(%rbp),%eax
jge 1239 <_Z5func0PiS_ii+0x90>
mov -0x4(%rbp),%eax
cmp -... | _Z5func0PiS_ii:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_18], rdi
mov [rbp+var_20], rsi
mov [rbp+var_24], edx
mov [rbp+var_28], ecx
mov [rbp+var_8], 0
mov [rbp+var_4], 0
jmp short loc_11E9
loc_118F:
mov eax, [rbp+var_8]
cdqe
lea rdx, ds:0[rax*4]
mov rax, [rbp+var_18]
add... | long long func0(int *a1, int *a2, int a3, int a4)
{
int v5; // [rsp+20h] [rbp-8h]
int v6; // [rsp+24h] [rbp-4h]
v5 = 0;
v6 = 0;
while ( v5 < a3 && v6 < a4 )
{
if ( a1[v5] == a2[v6] )
{
++v5;
if ( ++v6 == a4 )
return 1LL;
}
else
{
v5 = v5 - v6 + 1;
v6 = 0... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x18],RDI
MOV qword ptr [RBP + -0x20],RSI
MOV dword ptr [RBP + -0x24],EDX
MOV dword ptr [RBP + -0x28],ECX
MOV dword ptr [RBP + -0x8],0x0
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001011e9
LAB_0010118f:
MOV EAX,dword ptr [RBP + -0x8]
CDQE
LEA RDX,[RAX*0x4]
MOV RAX,qwo... | /* func0(int*, int*, int, int) */
int8 func0(int *param_1,int *param_2,int param_3,int param_4)
{
int local_10;
int local_c;
local_10 = 0;
local_c = 0;
while ((local_10 < param_3 && (local_c < param_4))) {
if (param_1[local_10] == param_2[local_c]) {
local_10 = local_10 + 1;
local_c = loc... |
2,301 | func0 |
#include <iostream>
#include <assert.h>
| bool func0(int A[], int B[], int n, int m) {
int i = 0, j = 0;
while (i < n && j < m) {
if (A[i] == B[j]) {
i++;
j++;
if (j == m) {
return true;
}
} else {
i = i - j + 1;
j = 0;
}
}
... | int main() {
int A1[] = {1, 4, 3, 5};
int B1[] = {1, 2};
int A2[] = {1, 2, 1};
int B2[] = {1, 2, 1};
int A3[] = {1, 0, 2, 2};
int B3[] = {2, 2, 0};
assert(func0(A1, B1, 4, 2) == false);
assert(func0(A2, B2, 3, 3) == true);
assert(func0(A3, B3, 4, 3) == false);
retur... | O1 | cpp | func0(int*, int*, int, int):
endbr64
test %edx,%edx
setle %al
test %ecx,%ecx
setle %r11b
or %al,%r11b
jne 1205 <_Z5func0PiS_ii+0x5c>
mov $0x0,%r8d
mov $0x0,%eax
jmp 11df <_Z5func0PiS_ii+0x36>
sub %r8d,%eax
add $0x1,%eax
mov $0x0,%r8d
cmp %edx,%eax
jge 1201 <_Z5func0PiS_ii+0x58>
cmp ... | _Z5func0PiS_ii:
endbr64
mov r9, rdi
mov r10, rsi
mov r8d, edx
mov edi, ecx
test edx, edx
setnle al
test ecx, ecx
setnle dl
and al, dl
mov r11d, eax
jz short locret_11CF
mov ecx, 0
mov edx, 0
jmp short loc_11B0
loc_1195:
sub edx, ecx
add edx, 1
mov ecx, 0
loc_... | bool func0(int *a1, int *a2, int a3, int a4)
{
bool result; // al
bool v8; // r11
int v9; // ecx
int v10; // edx
result = a4 > 0 && a3 > 0;
v8 = result;
if ( result )
{
v9 = 0;
v10 = 0;
do
{
if ( a1[v10] == a2[v9] )
{
++v10;
if ( a4 == ++v9 )
retur... | func0:
ENDBR64
MOV R9,RDI
MOV R10,RSI
MOV R8D,EDX
MOV EDI,ECX
TEST EDX,EDX
SETG AL
TEST ECX,ECX
SETG DL
AND AL,DL
MOV R11D,EAX
JZ 0x001011cf
MOV ECX,0x0
MOV EDX,0x0
JMP 0x001011b0
LAB_00101195:
SUB EDX,ECX
ADD EDX,0x1
MOV ECX,0x0
LAB_0010119f:
CMP EDX,R8D
SETL AL
CMP ECX,EDI
SETL SIL
AND AL,SIL
JZ 0x001011ce
LAB_001011... | /* func0(int*, int*, int, int) */
bool func0(int *param_1,int *param_2,int param_3,int param_4)
{
bool bVar1;
int iVar2;
int iVar3;
bVar1 = 0 < param_3 && 0 < param_4;
if (0 >= param_3 || 0 >= param_4) {
return bVar1;
}
iVar2 = 0;
iVar3 = 0;
do {
if (param_1[iVar3] == param_2[iVar2]) {
... |
2,302 | func0 |
#include <iostream>
#include <assert.h>
| bool func0(int A[], int B[], int n, int m) {
int i = 0, j = 0;
while (i < n && j < m) {
if (A[i] == B[j]) {
i++;
j++;
if (j == m) {
return true;
}
} else {
i = i - j + 1;
j = 0;
}
}
... | int main() {
int A1[] = {1, 4, 3, 5};
int B1[] = {1, 2};
int A2[] = {1, 2, 1};
int B2[] = {1, 2, 1};
int A3[] = {1, 0, 2, 2};
int B3[] = {2, 2, 0};
assert(func0(A1, B1, 4, 2) == false);
assert(func0(A2, B2, 3, 3) == true);
assert(func0(A3, B3, 4, 3) == false);
retur... | O2 | cpp | func0(int*, int*, int, int):
endbr64
test %edx,%edx
setle %al
test %ecx,%ecx
setle %r11b
or %al,%r11b
jne 141a <_Z5func0PiS_ii+0x6a>
xor %r9d,%r9d
xor %eax,%eax
jmp 13e5 <_Z5func0PiS_ii+0x35>
nopl 0x0(%rax,%rax,1)
sub %r9d,%eax
xor %r8d,%r8d
xor %r9d,%r9d
add $0x1,%eax
cmp %edx,%e... | _Z5func0PiS_ii:
endbr64
test edx, edx
mov r8, rdi
mov r9, rsi
mov edi, edx
setnle r10b
test ecx, ecx
mov r11d, ecx
setnle al
and r10b, al
jz short loc_1324
xor ecx, ecx
xor edx, edx
jmp short loc_12EC
loc_12D8:
sub edx, ecx
xor ecx, ecx
mov esi, r10d
add edx,... | bool func0(int *a1, int *a2, int a3, int a4)
{
bool v7; // r10
int v8; // ecx
int v9; // edx
int v10; // edx
bool result; // al
v7 = a4 > 0 && a3 > 0;
if ( !v7 )
return 0;
v8 = 0;
v9 = 0;
while ( 1 )
{
while ( a1[v9] != a2[v8] )
{
v10 = v9 - v8;
v8 = 0;
v9 = v10 + 1... | func0:
ENDBR64
TEST EDX,EDX
MOV R8,RDI
MOV R9,RSI
MOV EDI,EDX
SETG R10B
TEST ECX,ECX
MOV R11D,ECX
SETG AL
AND R10B,AL
JZ 0x00101324
XOR ECX,ECX
XOR EDX,EDX
JMP 0x001012ec
LAB_001012d8:
SUB EDX,ECX
XOR ECX,ECX
MOV ESI,R10D
ADD EDX,0x1
CMP EDX,EDI
SETL AL
AND AL,SIL
JZ 0x00101315
LAB_001012ec:
MOVSXD RSI,ECX
MOVSXD RAX,E... | /* func0(int*, int*, int, int) */
ulong func0(int *param_1,int *param_2,int param_3,int param_4)
{
bool bVar1;
bool bVar2;
bool bVar3;
uint uVar4;
bool bVar5;
int iVar6;
int iVar7;
int4 in_R10D;
bVar2 = 0 < param_3;
bVar3 = 0 < param_4;
if (!bVar2 || !bVar3) {
return 0;
}
iVar6 = 0;
... |
2,303 | func0 |
#include <iostream>
#include <assert.h>
| bool func0(int A[], int B[], int n, int m) {
int i = 0, j = 0;
while (i < n && j < m) {
if (A[i] == B[j]) {
i++;
j++;
if (j == m) {
return true;
}
} else {
i = i - j + 1;
j = 0;
}
}
... | int main() {
int A1[] = {1, 4, 3, 5};
int B1[] = {1, 2};
int A2[] = {1, 2, 1};
int B2[] = {1, 2, 1};
int A3[] = {1, 0, 2, 2};
int B3[] = {2, 2, 0};
assert(func0(A1, B1, 4, 2) == false);
assert(func0(A2, B2, 3, 3) == true);
assert(func0(A3, B3, 4, 3) == false);
retur... | O3 | cpp | func0(int*, int*, int, int):
endbr64
test %edx,%edx
setle %al
test %ecx,%ecx
setle %r11b
or %al,%r11b
jne 140a <_Z5func0PiS_ii+0x6a>
xor %r9d,%r9d
xor %eax,%eax
jmp 13d5 <_Z5func0PiS_ii+0x35>
nopl 0x0(%rax,%rax,1)
sub %r9d,%eax
xor %r8d,%r8d
xor %r9d,%r9d
add $0x1,%eax
cmp %edx,%e... | _Z5func0PiS_ii:
endbr64
test edx, edx
mov r8, rdi
mov r9, rsi
mov edi, edx
setnle r10b
test ecx, ecx
mov r11d, ecx
setnle al
and r10b, al
jz short loc_1394
xor ecx, ecx
xor edx, edx
jmp short loc_135C
loc_1348:
sub edx, ecx
xor ecx, ecx
mov esi, r10d
add edx,... | bool func0(int *a1, int *a2, int a3, int a4)
{
bool v7; // r10
int v8; // ecx
int v9; // edx
int v10; // edx
bool result; // al
v7 = a4 > 0 && a3 > 0;
if ( !v7 )
return 0;
v8 = 0;
v9 = 0;
while ( 1 )
{
while ( a1[v9] != a2[v8] )
{
v10 = v9 - v8;
v8 = 0;
v9 = v10 + 1... | func0:
ENDBR64
TEST EDX,EDX
MOV R8,RDI
MOV R9,RSI
MOV EDI,EDX
SETG R10B
TEST ECX,ECX
MOV R11D,ECX
SETG AL
AND R10B,AL
JZ 0x00101394
XOR ECX,ECX
XOR EDX,EDX
JMP 0x0010135c
LAB_00101348:
SUB EDX,ECX
XOR ECX,ECX
MOV ESI,R10D
ADD EDX,0x1
CMP EDX,EDI
SETL AL
AND AL,SIL
JZ 0x00101385
LAB_0010135c:
MOVSXD RSI,ECX
MOVSXD RAX,E... | /* func0(int*, int*, int, int) */
ulong func0(int *param_1,int *param_2,int param_3,int param_4)
{
bool bVar1;
bool bVar2;
bool bVar3;
uint uVar4;
bool bVar5;
int iVar6;
int iVar7;
int4 in_R10D;
bVar2 = 0 < param_3;
bVar3 = 0 < param_4;
if (!bVar2 || !bVar3) {
return 0;
}
iVar6 = 0;
... |
2,304 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int n) {
if (n == 0) return 1;
else if (n <= 2) return n;
else if (n == 3) return 6;
else if (n == 4) return 4;
else return 0;
}
| int main() {
assert(func0(4) == 4);
assert(func0(21) == 0);
assert(func0(30) == 0);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x4(%rbp)
cmpl $0x0,-0x4(%rbp)
jne 11a1 <_Z5func0i+0x18>
mov $0x1,%eax
jmp 11cb <_Z5func0i+0x42>
cmpl $0x2,-0x4(%rbp)
jg 11ac <_Z5func0i+0x23>
mov -0x4(%rbp),%eax
jmp 11cb <_Z5func0i+0x42>
cmpl $0x3,-0x4(%rbp)
jne 11b9 <_Z5func0i+... | _Z5func0i:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_4], edi
cmp [rbp+var_4], 0
jnz short loc_1161
mov eax, 1
jmp short loc_118B
loc_1161:
cmp [rbp+var_4], 2
jg short loc_116C
mov eax, [rbp+var_4]
jmp short loc_118B
loc_116C:
cmp [rbp+var_4], 3
jnz short loc_1179
mov... | long long func0(int a1)
{
if ( !a1 )
return 1LL;
if ( a1 <= 2 )
return (unsigned int)a1;
if ( a1 == 3 )
return 6LL;
if ( a1 == 4 )
return 4LL;
return 0LL;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x4],EDI
CMP dword ptr [RBP + -0x4],0x0
JNZ 0x00101161
MOV EAX,0x1
JMP 0x0010118b
LAB_00101161:
CMP dword ptr [RBP + -0x4],0x2
JG 0x0010116c
MOV EAX,dword ptr [RBP + -0x4]
JMP 0x0010118b
LAB_0010116c:
CMP dword ptr [RBP + -0x4],0x3
JNZ 0x00101179
MOV EAX,0x6
JMP... | /* func0(int) */
int func0(int param_1)
{
if (param_1 == 0) {
param_1 = 1;
}
else if (2 < param_1) {
if (param_1 == 3) {
param_1 = 6;
}
else if (param_1 == 4) {
param_1 = 4;
}
else {
param_1 = 0;
}
}
return param_1;
} |
2,305 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int n) {
if (n == 0) return 1;
else if (n <= 2) return n;
else if (n == 3) return 6;
else if (n == 4) return 4;
else return 0;
}
| int main() {
assert(func0(4) == 4);
assert(func0(21) == 0);
assert(func0(30) == 0);
return 0;
}
| O1 | cpp | func0(int):
endbr64
mov $0x1,%eax
test %edi,%edi
je 1193 <_Z5func0i+0x2a>
mov %edi,%eax
cmp $0x2,%edi
jle 1193 <_Z5func0i+0x2a>
cmp $0x3,%edi
je 118e <_Z5func0i+0x25>
cmp $0x4,%edi
mov $0x0,%eax
cmove %edi,%eax
retq
mov $0x6,%eax
retq
| _Z5func0i:
endbr64
mov eax, 1
test edi, edi
jz short locret_1154
mov eax, edi
cmp edi, 2
jle short locret_1154
cmp edi, 3
jz short loc_114F
cmp edi, 4
setz al
movzx eax, al
shl eax, 2
retn
loc_114F:
mov eax, 6
locret_1154:
retn | long long func0(int a1)
{
long long result; // rax
result = 1LL;
if ( a1 )
{
result = (unsigned int)a1;
if ( a1 > 2 )
{
if ( a1 == 3 )
return 6LL;
else
return 4 * (unsigned int)(a1 == 4);
}
}
return result;
} | func0:
ENDBR64
MOV EAX,0x1
TEST EDI,EDI
JZ 0x00101154
MOV EAX,EDI
CMP EDI,0x2
JLE 0x00101154
CMP EDI,0x3
JZ 0x0010114f
CMP EDI,0x4
SETZ AL
MOVZX EAX,AL
SHL EAX,0x2
RET
LAB_0010114f:
MOV EAX,0x6
LAB_00101154:
RET | /* func0(int) */
ulong func0(int param_1)
{
ulong uVar1;
uVar1 = 1;
if ((param_1 != 0) && (uVar1 = (ulong)(uint)param_1, 2 < param_1)) {
if (param_1 != 3) {
return (ulong)(param_1 == 4) << 2;
}
uVar1 = 6;
}
return uVar1;
} |
2,306 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int n) {
if (n == 0) return 1;
else if (n <= 2) return n;
else if (n == 3) return 6;
else if (n == 4) return 4;
else return 0;
}
| int main() {
assert(func0(4) == 4);
assert(func0(21) == 0);
assert(func0(30) == 0);
return 0;
}
| O2 | cpp | func0(int):
endbr64
mov $0x1,%eax
test %edi,%edi
je 11f5 <_Z5func0i+0x35>
mov %edi,%eax
cmp $0x2,%edi
jle 11f5 <_Z5func0i+0x35>
cmp $0x3,%edi
je 11f0 <_Z5func0i+0x30>
cmp $0x4,%edi
sete %al
movzbl %al,%eax
shl $0x2,%eax
retq
nopw %cs:0x0(%rax,%rax,1)
mov $0x6,%eax
retq
nopw %cs:0... | _Z5func0i:
endbr64
mov eax, 1
test edi, edi
jz short locret_1175
mov eax, edi
cmp edi, 2
jle short locret_1175
cmp edi, 3
jz short loc_1170
cmp edi, 4
setz al
movzx eax, al
shl eax, 2
retn
loc_1170:
mov eax, 6
locret_1175:
retn | long long func0(int a1)
{
long long result; // rax
result = 1LL;
if ( a1 )
{
result = (unsigned int)a1;
if ( a1 > 2 )
{
if ( a1 == 3 )
return 6LL;
else
return 4 * (unsigned int)(a1 == 4);
}
}
return result;
} | func0:
ENDBR64
MOV EAX,0x1
TEST EDI,EDI
JZ 0x00101175
MOV EAX,EDI
CMP EDI,0x2
JLE 0x00101175
CMP EDI,0x3
JZ 0x00101170
CMP EDI,0x4
SETZ AL
MOVZX EAX,AL
SHL EAX,0x2
RET
LAB_00101170:
MOV EAX,0x6
LAB_00101175:
RET | /* func0(int) */
ulong func0(int param_1)
{
ulong uVar1;
uVar1 = 1;
if ((param_1 != 0) && (uVar1 = (ulong)(uint)param_1, 2 < param_1)) {
if (param_1 != 3) {
return (ulong)(param_1 == 4) << 2;
}
uVar1 = 6;
}
return uVar1;
} |
2,307 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int n) {
if (n == 0) return 1;
else if (n <= 2) return n;
else if (n == 3) return 6;
else if (n == 4) return 4;
else return 0;
}
| int main() {
assert(func0(4) == 4);
assert(func0(21) == 0);
assert(func0(30) == 0);
return 0;
}
| O3 | cpp | func0(int):
endbr64
mov $0x1,%eax
test %edi,%edi
je 11f5 <_Z5func0i+0x35>
mov %edi,%eax
cmp $0x2,%edi
jle 11f5 <_Z5func0i+0x35>
cmp $0x3,%edi
je 11f0 <_Z5func0i+0x30>
cmp $0x4,%edi
sete %al
movzbl %al,%eax
shl $0x2,%eax
retq
nopw %cs:0x0(%rax,%rax,1)
mov $0x6,%eax
retq
nopw %cs:0... | _Z5func0i:
endbr64
mov eax, 1
test edi, edi
jz short locret_1175
mov eax, edi
cmp edi, 2
jle short locret_1175
cmp edi, 3
jz short loc_1170
cmp edi, 4
setz al
movzx eax, al
shl eax, 2
retn
loc_1170:
mov eax, 6
locret_1175:
retn | long long func0(int a1)
{
long long result; // rax
result = 1LL;
if ( a1 )
{
result = (unsigned int)a1;
if ( a1 > 2 )
{
if ( a1 == 3 )
return 6LL;
else
return 4 * (unsigned int)(a1 == 4);
}
}
return result;
} | func0:
ENDBR64
MOV EAX,0x1
TEST EDI,EDI
JZ 0x00101175
MOV EAX,EDI
CMP EDI,0x2
JLE 0x00101175
CMP EDI,0x3
JZ 0x00101170
CMP EDI,0x4
SETZ AL
MOVZX EAX,AL
SHL EAX,0x2
RET
LAB_00101170:
MOV EAX,0x6
LAB_00101175:
RET | /* func0(int) */
ulong func0(int param_1)
{
ulong uVar1;
uVar1 = 1;
if ((param_1 != 0) && (uVar1 = (ulong)(uint)param_1, 2 < param_1)) {
if (param_1 != 3) {
return (ulong)(param_1 == 4) << 2;
}
uVar1 = 6;
}
return uVar1;
} |
2,308 | func0 |
#include <vector>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& list1, const std::vector<int>& list2, const std::vector<int>& list3) {
std::vector<int> result;
for (size_t i = 0; i < list1.size(); ++i) {
result.push_back(list1[i]);
result.push_back(list2[i]);
result.push_back(list3[i]);
}
... | int main() {
assert((func0({1,2,3,4,5,6,7},{10,20,30,40,50,60,70},{100,200,300,400,500,600,700}) == std::vector<int>{1, 10, 100, 2, 20, 200, 3, 30, 300, 4, 40, 400, 5, 50, 500, 6, 60, 600, 7, 70, 700}));
assert((func0({10,20},{15,2},{5,10}) == std::vector<int>{10,15,5,20,2,10}));
assert((func0({11,44}, {... | O0 | cpp | func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x38,%rsp
mov %rdi,-0x28(%rbp)
mov %rsi,-0x30(%rbp)
mov %rdx,-0x38(%rbp)
mov %rcx,-0x40(%rbp)
mov %f... | _Z5func0RKSt6vectorIiSaIiEES3_S3_:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 38h
mov [rbp+var_28], rdi
mov [rbp+var_30], rsi
mov [rbp+var_38], rdx
mov [rbp+var_40], rcx
mov rax, [rbp+var_28]
mov rdi, rax
call _ZNSt6vectorIiSaIiEEC2Ev; std::vector<int>::vector(void)
mov ... | long long func0(long long a1, long long a2, long long a3, long long a4)
{
long long v4; // rax
long long v5; // rax
long long v6; // rax
unsigned long long i; // [rsp+28h] [rbp-18h]
std::vector<int>::vector(a1);
for ( i = 0LL; i < std::vector<int>::size(a2); ++i )
{
v4 = std::vector<int>::operator[]... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x38
MOV qword ptr [RBP + -0x28],RDI
MOV qword ptr [RBP + -0x30],RSI
MOV qword ptr [RBP + -0x38],RDX
MOV qword ptr [RBP + -0x40],RCX
MOV RAX,qword ptr [RBP + -0x28]
MOV RDI,RAX
CALL 0x00101ff6
MOV qword ptr [RBP + -0x18],0x0
JMP 0x00101310
LAB_0010129c:
MOV RDX,qword... | /* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> >
const&, std::vector<int, std::allocator<int> > const&) */
vector * func0(vector *param_1,vector *param_2,vector *param_3)
{
int *piVar1;
ulong uVar2;
vector<int,std::allocator<int>> *in_RCX;
int8 local_20;
s... |
2,309 | func0 |
#include <vector>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& list1, const std::vector<int>& list2, const std::vector<int>& list3) {
std::vector<int> result;
for (size_t i = 0; i < list1.size(); ++i) {
result.push_back(list1[i]);
result.push_back(list2[i]);
result.push_back(list3[i]);
}
... | int main() {
assert((func0({1,2,3,4,5,6,7},{10,20,30,40,50,60,70},{100,200,300,400,500,600,700}) == std::vector<int>{1, 10, 100, 2, 20, 200, 3, 30, 300, 4, 40, 400, 5, 50, 500, 6, 60, 600, 7, 70, 700}));
assert((func0({10,20},{15,2},{5,10}) == std::vector<int>{10,15,5,20,2,10}));
assert((func0({11,44}, {... | O1 | cpp | func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x8,%rsp
mov %rdi,%rbx
mov %rdx,%r13
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi)
... | _Z5func0RKSt6vectorIiSaIiEES3_S3_:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 8
mov rbx, rdi
mov r13, rdx
mov qword ptr [rdi], 0
mov qword ptr [rdi+8], 0
mov qword ptr [rdi+10h], 0
mov rdx, [rsi]
cmp [rsi+8], rdx
jz loc_1332
mov r12,... | _QWORD * func0(_QWORD *a1, long long *a2, _QWORD *a3, _QWORD *a4)
{
long long v5; // rdx
unsigned long long v8; // rbp
long long v9; // r15
_DWORD *v10; // rdx
_DWORD *v11; // rsi
_DWORD *v12; // rdx
_DWORD *v13; // rsi
_DWORD *v14; // r15
_DWORD *v15; // rsi
*a1 = 0LL;
a1[1] = 0LL;
a1[2] = 0LL... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV RBX,RDI
MOV R13,RDX
MOV qword ptr [RDI],0x0
MOV qword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
MOV RDX,qword ptr [RSI]
CMP qword ptr [RSI + 0x8],RDX
JZ 0x00101332
MOV R12,RSI
MOV R14,RCX
MOV EBP,0x0
JMP 0x001012ca
LAB_0010129... | /* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> >
const&, std::vector<int, std::allocator<int> > const&) */
vector * func0(vector *param_1,vector *param_2,vector *param_3)
{
long lVar1;
int *piVar2;
long *in_RCX;
long lVar3;
ulong uVar4;
*(int8 *)param_1 ... |
2,310 | func0 |
#include <vector>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& list1, const std::vector<int>& list2, const std::vector<int>& list3) {
std::vector<int> result;
for (size_t i = 0; i < list1.size(); ++i) {
result.push_back(list1[i]);
result.push_back(list2[i]);
result.push_back(list3[i]);
}
... | int main() {
assert((func0({1,2,3,4,5,6,7},{10,20,30,40,50,60,70},{100,200,300,400,500,600,700}) == std::vector<int>{1, 10, 100, 2, 20, 200, 3, 30, 300, 4, 40, 400, 5, 50, 500, 6, 60, 600, 7, 70, 700}));
assert((func0({10,20},{15,2},{5,10}) == std::vector<int>{10,15,5,20,2,10}));
assert((func0({11,44}, {... | O2 | cpp | func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&):
endbr64
push %r15
push %r14
mov %rdx,%r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x8,%rsp
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi)
... | _Z5func0RKSt6vectorIiSaIiEES3_S3_:
endbr64
push r15
pxor xmm0, xmm0
push r14
mov r14, rdx
push r13
push r12
push rbp
push rbx
mov rbx, rdi
sub rsp, 8
movups xmmword ptr [rdi], xmm0
mov rdx, [rsi]
mov qword ptr [rdi+10h], 0
cmp [rsi+8], rdx
jz loc_1970
mov r13, rsi
... | long long func0(long long a1, long long *a2, long long *a3, _QWORD *a4)
{
long long v5; // rdx
long long v8; // rax
long long v9; // rsi
long long v10; // r12
long long v11; // rsi
long long v12; // rdx
_DWORD *v13; // rdx
long long v14; // rsi
_DWORD *v15; // rbp
long long v16; // rsi
long long ... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
MOV R14,RDX
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV RBX,RDI
SUB RSP,0x8
MOVUPS xmmword ptr [RDI],XMM0
MOV RDX,qword ptr [RSI]
MOV qword ptr [RDI + 0x10],0x0
CMP qword ptr [RSI + 0x8],RDX
JZ 0x00101970
MOV R13,RSI
MOV R15,RCX
XOR EAX,EAX
XOR ESI,ESI
XOR R12D,R12D
JMP 0x001... | /* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> >
const&, std::vector<int, std::allocator<int> > const&) */
vector * func0(vector *param_1,vector *param_2,vector *param_3)
{
long lVar1;
int *piVar2;
long *in_RCX;
long lVar3;
int *piVar4;
int *piVar5;
int *... |
2,311 | func0 |
#include <vector>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& list1, const std::vector<int>& list2, const std::vector<int>& list3) {
std::vector<int> result;
for (size_t i = 0; i < list1.size(); ++i) {
result.push_back(list1[i]);
result.push_back(list2[i]);
result.push_back(list3[i]);
}
... | int main() {
assert((func0({1,2,3,4,5,6,7},{10,20,30,40,50,60,70},{100,200,300,400,500,600,700}) == std::vector<int>{1, 10, 100, 2, 20, 200, 3, 30, 300, 4, 40, 400, 5, 50, 500, 6, 60, 600, 7, 70, 700}));
assert((func0({10,20},{15,2},{5,10}) == std::vector<int>{10,15,5,20,2,10}));
assert((func0({11,44}, {... | O3 | cpp | func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&):
endbr64
push %r15
pxor %xmm0,%xmm0
push %r14
mov %rdx,%r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x8,%rsp
movq $0x0,0x10(%rdi)... | _Z5func0RKSt6vectorIiSaIiEES3_S3_:
endbr64
push r15
pxor xmm0, xmm0
push r14
mov r14, rdx
push r13
push r12
push rbp
push rbx
mov rbx, rdi
sub rsp, 8
movups xmmword ptr [rdi], xmm0
mov rdx, [rsi]
mov qword ptr [rdi+10h], 0
cmp [rsi+8], rdx
jz loc_19E0
mov r13, rsi
... | long long func0(long long a1, long long *a2, long long *a3, _QWORD *a4)
{
long long v5; // rdx
long long v8; // rax
long long v9; // rsi
long long v10; // r12
long long v11; // rsi
long long v12; // rdx
_DWORD *v13; // rdx
long long v14; // rsi
_DWORD *v15; // rbp
long long v16; // rsi
long long ... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
MOV R14,RDX
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV RBX,RDI
SUB RSP,0x8
MOVUPS xmmword ptr [RDI],XMM0
MOV RDX,qword ptr [RSI]
MOV qword ptr [RDI + 0x10],0x0
CMP qword ptr [RSI + 0x8],RDX
JZ 0x001019e0
MOV R13,RSI
MOV R15,RCX
XOR EAX,EAX
XOR ESI,ESI
XOR R12D,R12D
JMP 0x001... | /* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> >
const&, std::vector<int, std::allocator<int> > const&) */
vector * func0(vector *param_1,vector *param_2,vector *param_3)
{
long lVar1;
int *piVar2;
long *in_RCX;
long lVar3;
int *piVar4;
int *piVar5;
int *... |
2,312 | func0 |
#include <vector>
#include <algorithm>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& test_tup1, const std::vector<int>& test_tup2) {
std::vector<int> sorted1 = test_tup1;
std::vector<int> sorted2 = test_tup2;
std::sort(sorted1.begin(), sorted1.end());
std::sort(sorted2.begin(), sorted2.end());
std::vector<int> res;
std::set_sy... | int main() {
assert(func0({3, 4, 5, 6}, {5, 7, 4, 10}) == std::vector<int>({3, 6, 7, 10}));
assert(func0({1, 2, 3, 4}, {7, 2, 3, 9}) == std::vector<int>({1, 4, 7, 9}));
assert(func0({21, 11, 25, 26}, {26, 34, 21, 36}) == std::vector<int>({11, 25, 34, 36}));
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %r14
push %r13
push %r12
push %rbx
sub $0x60,%rsp
mov %rdi,-0x68(%rbp)
mov %rsi,-0x70(%rbp)
mov %rdx,-0x78(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x28(%rbp)... | _Z5func0RKSt6vectorIiSaIiEES3_:
endbr64
push rbp
mov rbp, rsp
push r14
push r13
push r12
push rbx
sub rsp, 60h
mov [rbp+var_68], rdi
mov [rbp+var_70], rsi
mov [rbp+var_78], rdx
mov rax, fs:28h
mov [rbp+var_28], rax
xor eax, eax
mov rdx, [rbp+var_70]
lea rax, [rbp+v... | long long func0(long long a1, long long a2, long long a3)
{
long long v3; // rbx
long long v4; // rax
long long v5; // rbx
long long v6; // rax
long long v7; // r14
long long v8; // r13
long long v9; // r12
long long v10; // rbx
long long v11; // rax
_BYTE v14[32]; // [rsp+20h] [rbp-60h] BYREF
_B... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x60
MOV qword ptr [RBP + -0x68],RDI
MOV qword ptr [RBP + -0x70],RSI
MOV qword ptr [RBP + -0x78],RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
XOR EAX,EAX
MOV RDX,qword ptr [RBP + -0x70]
LEA RAX,[RBP + -0x60]
MOV RSI,RDX
M... | /* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> >
const&) */
vector * func0(vector *param_1,vector *param_2)
{
__normal_iterator _Var1;
__normal_iterator _Var2;
back_insert_iterator bVar3;
__normal_iterator _Var4;
__normal_iterator _Var5;
vector *in_RDX;
l... |
2,313 | func0 |
#include <vector>
#include <algorithm>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& test_tup1, const std::vector<int>& test_tup2) {
std::vector<int> sorted1 = test_tup1;
std::vector<int> sorted2 = test_tup2;
std::sort(sorted1.begin(), sorted1.end());
std::sort(sorted2.begin(), sorted2.end());
std::vector<int> res;
std::set_sy... | int main() {
assert(func0({3, 4, 5, 6}, {5, 7, 4, 10}) == std::vector<int>({3, 6, 7, 10}));
assert(func0({1, 2, 3, 4}, {7, 2, 3, 9}) == std::vector<int>({1, 4, 7, 9}));
assert(func0({21, 11, 25, 26}, {26, 34, 21, 36}) == std::vector<int>({11, 25, 34, 36}));
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x18,%rsp
mov %rdi,%r12
mov %rsi,%rbp
mov %rdx,%r15
mov 0x8(%rsi),%rdi
sub (%rsi),%rdi
mov %rdi,%rax
sar $0x2,... | _Z5func0RKSt6vectorIiSaIiEES3_:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 68h
mov r13, rdi
mov rbp, rsi
mov r15, rdx
mov rax, fs:28h
mov [rsp+98h+var_40], rax
xor eax, eax
mov rax, [rsi+8]
sub rax, [rsi]
mov [rsp+98h+var_90], rax
jz ... | _QWORD * func0(_QWORD *a1, _QWORD *a2, _QWORD *a3)
{
unsigned long long v5; // rax
_DWORD *v6; // rbx
_DWORD *v7; // rsi
long long v8; // r12
_DWORD *v9; // r14
long long v10; // rax
unsigned long long v11; // rcx
struct _Unwind_Exception *v12; // rbx
_DWORD *v13; // rbp
_DWORD *v14; // rsi
_DWORD... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x68
MOV R13,RDI
MOV RBP,RSI
MOV R15,RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x58],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RSI + 0x8]
SUB RAX,qword ptr [RSI]
MOV qword ptr [RSP + 0x8],RAX
JZ 0x00101369
MOV RCX,RAX
MOV RAX,0x7ffffffffff... | /* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> >
const&) */
vector * func0(vector *param_1,vector *param_2,int param_3,int param_4,int param_5
,int param_6,int8 param_7,int8 param_8,int8 param_9,
int param_10,int8 param_11)
{
int4 *puVar1;... |
2,314 | func0 |
#include <vector>
#include <algorithm>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& test_tup1, const std::vector<int>& test_tup2) {
std::vector<int> sorted1 = test_tup1;
std::vector<int> sorted2 = test_tup2;
std::sort(sorted1.begin(), sorted1.end());
std::sort(sorted2.begin(), sorted2.end());
std::vector<int> res;
std::set_sy... | int main() {
assert(func0({3, 4, 5, 6}, {5, 7, 4, 10}) == std::vector<int>({3, 6, 7, 10}));
assert(func0({1, 2, 3, 4}, {7, 2, 3, 9}) == std::vector<int>({1, 4, 7, 9}));
assert(func0({21, 11, 25, 26}, {26, 34, 21, 36}) == std::vector<int>({11, 25, 34, 36}));
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
mov %rsi,%rbp
push %rbx
mov %rdx,%rbx
sub $0x18,%rsp
mov 0x8(%rbp),%rax
mov (%rsi),%rsi
mov %rax,%r14
sub %rsi,... | _Z5func0RKSt6vectorIiSaIiEES3_:
endbr64
push r15
push r14
push r13
push r12
push rbp
mov rbp, rdx
push rbx
mov rbx, rdi
sub rsp, 68h
mov r15, [rsi+8]
mov rax, fs:28h
mov [rsp+98h+var_40], rax
xor eax, eax
sub r15, [rsi]
mov [rsp+98h+var_80], r15
jz loc_1E48
mov... | long long func0(long long a1, _QWORD *a2, _QWORD *a3)
{
signed long long v3; // r14
signed long long v5; // r15
_QWORD *v6; // r12
char *v7; // rax
bool v8; // zf
char *v9; // r14
signed long long v10; // r12
char *v11; // rax
_DWORD *v12; // rsi
signed long long v13; // r13
char *v14; // r13
l... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
MOV RBP,RDX
PUSH RBX
MOV RBX,RDI
SUB RSP,0x68
MOV R15,qword ptr [RSI + 0x8]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x58],RAX
XOR EAX,EAX
SUB R15,qword ptr [RSI]
MOV qword ptr [RSP + 0x18],R15
JZ 0x00101e48
MOV RAX,0x7ffffffffffffffc
CMP RAX,R15
JC 0x... | /* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> >
const&) */
vector * func0(vector *param_1,vector *param_2,int param_3,int param_4,int param_5
,int param_6,int8 param_7,int8 param_8,int8 param_9,
int param_10,int8 param_11)
{
int iVar1;
... |
2,315 | func0 |
#include <vector>
#include <algorithm>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& test_tup1, const std::vector<int>& test_tup2) {
std::vector<int> sorted1 = test_tup1;
std::vector<int> sorted2 = test_tup2;
std::sort(sorted1.begin(), sorted1.end());
std::sort(sorted2.begin(), sorted2.end());
std::vector<int> res;
std::set_sy... | int main() {
assert(func0({3, 4, 5, 6}, {5, 7, 4, 10}) == std::vector<int>({3, 6, 7, 10}));
assert(func0({1, 2, 3, 4}, {7, 2, 3, 9}) == std::vector<int>({1, 4, 7, 9}));
assert(func0({21, 11, 25, 26}, {26, 34, 21, 36}) == std::vector<int>({11, 25, 34, 36}));
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&):
endbr64
push %r15
push %r14
push %r13
mov %rsi,%r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
mov %rdx,%rbx
sub $0x28,%rsp
mov 0x8(%r13),%rax
mov (%rsi),%rsi
mov %rax,%r15
sub %rsi,... | _Z5func0RKSt6vectorIiSaIiEES3_:
endbr64
push r15
push r14
push r13
push r12
push rbp
mov rbp, rdx
push rbx
mov rbx, rdi
sub rsp, 88h
mov rax, fs:28h
mov [rsp+0B8h+var_40], rax
mov rax, [rsi+8]
sub rax, [rsi]
mov [rsp+0B8h+var_A8], rax
mov [rsp+0B8h+var_98], rax
jz ... | _QWORD * func0(_QWORD *a1, _QWORD *a2, _QWORD *a3)
{
char *ii; // r14
signed long long v4; // r15
_QWORD *j; // rbx
unsigned long long v7; // rax
_QWORD *v8; // r12
char *v9; // rax
bool v10; // zf
char *v11; // r15
signed long long v12; // r12
char *v13; // rax
_DWORD *v14; // rsi
signed long l... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
MOV RBP,RDX
PUSH RBX
MOV RBX,RDI
SUB RSP,0x88
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x78],RAX
MOV RAX,qword ptr [RSI + 0x8]
SUB RAX,qword ptr [RSI]
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x20],RAX
JZ 0x00101e88
MOV RDI,RAX
MOV RAX,0x7ff... | /* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> >
const&) */
vector * func0(vector *param_1,vector *param_2,int param_3,int param_4,int param_5
,int param_6,int8 param_7,int8 param_8,int8 param_9,
int8 param_10,int8 param_11,int8 param_12,int8... |
2,316 | func0 | #include <cassert>
#include <functional>
#include <vector>
#include <variant>
struct Nested {
std::variant<int, std::vector<Nested>> value;
// Constructors for int and vector
Nested(int val) : value(val) {}
Nested(const std::vector<Nested>& vec) : value(vec) {}
};
bool operator==(con... | Nested func0(const Nested &test_tuple) {
return even_ele(test_tuple, [](int x){ return x % 2 == 0; });
}
| int main() {
{
// Test 1: extract_even((4, 5, (7, 6, (2, 4)), 6, 8)) == (4, (6, (2, 4)), 6, 8)
Nested input1({
Nested(4),
Nested(5),
Nested(std::vector<Nested>{
Nested(7),
Nested(6),
Nested(std::vector<Neste... | O0 | cpp | func0(Nested const&)::{lambda(int)#1}::operator()(int) const:
push %rbp
mov %rsp,%rbp
mov %rdi,-0x8(%rbp)
mov %esi,-0xc(%rbp)
mov -0xc(%rbp),%eax
and $0x1,%eax
test %eax,%eax
sete %al
pop %rbp
retq
| _ZZ5func0RK6NestedENKUliE_clEi:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov eax, [rbp+var_C]
and eax, 1
test eax, eax
setz al
pop rbp
retn | bool func0(Nested const&)::{lambda(int)#1}::operator()(long long a1, char a2)
{
return (a2 & 1) == 0;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x58
MOV qword ptr [RBP + -0x58],RDI
MOV qword ptr [RBP + -0x60],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RDX,[RBP + -0x41]
LEA RAX,[RBP + -0x40]
MOV RSI,RDX
MOV RDI,RAX
CALL 0x00103604
MOV RAX,qword ptr [RBP + -0x58]
LEA RDX,[R... | /* func0(Nested const&) */
Nested * func0(Nested *param_1)
{
function *in_RSI;
long in_FS_OFFSET;
_lambda_int__1_ local_49;
function<bool(int)> local_48 [40];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
std::function<bool(int)>::function<func0(Nested_const&)::_lambda(int)_1_,void>(local... |
2,317 | func0 | #include <cassert>
#include <functional>
#include <vector>
#include <variant>
struct Nested {
std::variant<int, std::vector<Nested>> value;
// Constructors for int and vector
Nested(int val) : value(val) {}
Nested(const std::vector<Nested>& vec) : value(vec) {}
};
bool operator==(con... | Nested func0(const Nested &test_tuple) {
return even_ele(test_tuple, [](int x){ return x % 2 == 0; });
}
| int main() {
{
// Test 1: extract_even((4, 5, (7, 6, (2, 4)), 6, 8)) == (4, (6, (2, 4)), 6, 8)
Nested input1({
Nested(4),
Nested(5),
Nested(std::vector<Nested>{
Nested(7),
Nested(6),
Nested(std::vector<Neste... | O1 | cpp | std::_Function_handler<bool (int), func0(Nested const&)::{lambda(int)#1}>::_M_invoke(std::_Any_data const&, int&&):
endbr64
mov (%rsi),%eax
xor $0x1,%eax
and $0x1,%eax
retq
| _ZNSt17_Function_handlerIFbiEZ5func0RK6NestedEUliE_E9_M_invokeERKSt9_Any_dataOi:
endbr64
mov eax, [rsi]
xor eax, 1
and eax, 1
retn | long long std::_Function_handler<bool ()(int),func0(Nested const&)::{lambda(int)#1}>::_M_invoke(
long long a1,
_DWORD *a2)
{
return ((unsigned __int8)*a2 ^ 1) & 1;
} | func0:
ENDBR64
PUSH RBX
SUB RSP,0x30
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x28],RAX
XOR EAX,EAX
MOV qword ptr [RSP],0x0
MOV qword ptr [RSP + 0x8],0x0
LEA RAX,[0x1012e9]
MOV qword ptr [RSP + 0x18],RAX
LEA RAX,[0x1012f6]
MOV qword ptr [RSP + 0x10],RAX
MOV RDX,RSP
LAB_0010194d:
CALL 0x001013cb
MOV ... | /* func0(Nested const&) */
Nested * func0(Nested *param_1)
{
function *in_RSI;
long in_FS_OFFSET;
int8 local_38;
int8 local_30;
code *local_28;
code *local_20;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_38 = 0;
local_30 = 0;
local_20 = std::_Function_handler<bool(int),fun... |
2,318 | func0 | #include <cassert>
#include <functional>
#include <vector>
#include <variant>
struct Nested {
std::variant<int, std::vector<Nested>> value;
// Constructors for int and vector
Nested(int val) : value(val) {}
Nested(const std::vector<Nested>& vec) : value(vec) {}
};
bool operator==(con... | Nested func0(const Nested &test_tuple) {
return even_ele(test_tuple, [](int x){ return x % 2 == 0; });
}
| int main() {
{
// Test 1: extract_even((4, 5, (7, 6, (2, 4)), 6, 8)) == (4, (6, (2, 4)), 6, 8)
Nested input1({
Nested(4),
Nested(5),
Nested(std::vector<Nested>{
Nested(7),
Nested(6),
Nested(std::vector<Neste... | O2 | cpp | std::_Function_handler<bool (int), func0(Nested const&)::{lambda(int)#1}>::_M_invoke(std::_Any_data const&, int&&):
endbr64
mov (%rsi),%eax
not %eax
and $0x1,%eax
retq
nopl 0x0(%rax)
| _ZNSt17_Function_handlerIFbiEZ5func0RK6NestedEUliE_E9_M_invokeERKSt9_Any_dataOi:
endbr64
mov eax, [rsi]
not eax
and eax, 1
retn | _BOOL8 std::_Function_handler<bool ()(int),func0(Nested const&)::{lambda(int)#1}>::_M_invoke(
long long a1,
_DWORD *a2)
{
return (*a2 & 1) == 0;
} | func0:
ENDBR64
PUSH RBP
PXOR XMM0,XMM0
LEA RCX,[0x103310]
PUSH RBX
MOV RBX,RDI
SUB RSP,0x38
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x28],RAX
XOR EAX,EAX
LEA RAX,[0x103300]
MOVAPS xmmword ptr [RSP],XMM0
MOV RBP,RSP
MOVQ XMM0,RCX
MOVQ XMM1,RAX
MOV RDX,RBP
PUNPCKLQDQ XMM0,XMM1
MOVAPS xmmword ptr [RSP + 0x10],XMM... | /* func0(Nested const&) */
Nested * func0(Nested *param_1)
{
function *in_RSI;
long in_FS_OFFSET;
int local_48 [16];
code *local_38;
code *pcStack_30;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
local_48 = (int [16])0x0;
local_38 = std::_Function_handler<bool(int),func0(Nested_cons... |
2,319 | func0 | #include <cassert>
#include <functional>
#include <vector>
#include <variant>
struct Nested {
std::variant<int, std::vector<Nested>> value;
// Constructors for int and vector
Nested(int val) : value(val) {}
Nested(const std::vector<Nested>& vec) : value(vec) {}
};
bool operator==(con... | Nested func0(const Nested &test_tuple) {
return even_ele(test_tuple, [](int x){ return x % 2 == 0; });
}
| int main() {
{
// Test 1: extract_even((4, 5, (7, 6, (2, 4)), 6, 8)) == (4, (6, (2, 4)), 6, 8)
Nested input1({
Nested(4),
Nested(5),
Nested(std::vector<Nested>{
Nested(7),
Nested(6),
Nested(std::vector<Neste... | O3 | cpp | std::_Function_handler<bool (int), func0(Nested const&)::{lambda(int)#1}>::_M_invoke(std::_Any_data const&, int&&):
endbr64
mov (%rsi),%eax
not %eax
and $0x1,%eax
retq
nopl 0x0(%rax)
| _ZNSt17_Function_handlerIFbiEZ5func0RK6NestedEUliE_E9_M_invokeERKSt9_Any_dataOi:
endbr64
mov eax, [rsi]
not eax
and eax, 1
retn | _BOOL8 std::_Function_handler<bool ()(int),func0(Nested const&)::{lambda(int)#1}>::_M_invoke(
long long a1,
_DWORD *a2)
{
return (*a2 & 1) == 0;
} | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
LEA RDX,[0x1032a0]
PUSH R14
PUSH R13
MOV R13,RDI
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0xc8
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0xb8],RAX
XOR EAX,EAX
LEA RAX,[0x103290]
MOVAPS xmmword ptr [RSP + 0x70],XMM0
MOVQ XMM0,RDX
MOV qword ptr [RSP + 0x60],0x0
MOVQ XMM1,RAX
MOVZX ... | /* func0(Nested const&) */
Nested * func0(Nested *param_1)
{
vector *pvVar1;
long *plVar2;
function *pfVar3;
vector *pvVar4;
int8 uVar5;
int8 uVar6;
long lVar7;
char cVar8;
vector<Nested,std::allocator<Nested>> *pvVar9;
vector *pvVar10;
long *plVar11;
vector *pvVar12;
function *pfVar13;
ve... |
2,320 | func0 |
#include <cmath>
#include <cassert>
| double func0(double b, double s) {
return 2 * b * s + pow(b, 2);
}
| int main() {
assert(func0(3, 4) == 33);
assert(func0(4, 5) == 56);
assert(func0(1, 2) == 5);
return 0;
}
| O0 | cpp | func0(double, double):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x20,%rsp
movsd %xmm0,-0x8(%rbp)
movsd %xmm1,-0x10(%rbp)
movsd -0x8(%rbp),%xmm0
addsd %xmm0,%xmm0
mulsd -0x10(%rbp),%xmm0
movsd %xmm0,-0x18(%rbp)
movsd 0xef6(%rip),%xmm0
mov -0x8(%rbp),%rax
movapd %xmm0,%xmm1
movq %rax,%xmm0
callq 1060 <po... | _Z5func0dd:
endbr64
push rbp
mov rbp, rsp
sub rsp, 20h
movsd [rbp+x], xmm0
movsd [rbp+var_10], xmm1
movsd xmm0, [rbp+x]
addsd xmm0, xmm0
mulsd xmm0, [rbp+var_10]
movsd [rbp+var_18], xmm0
movsd xmm0, cs:y
mov rax, [rbp+x]
movapd xmm1, xmm0; y
movq xmm0, rax; x
call _pow
addsd xmm0, ... | double func0(double a1, double a2)
{
return pow(a1, 2.0) + (a1 + a1) * a2;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOVSD qword ptr [RBP + -0x8],XMM0
MOVSD qword ptr [RBP + -0x10],XMM1
MOVSD XMM0,qword ptr [RBP + -0x8]
ADDSD XMM0,XMM0
MULSD XMM0,qword ptr [RBP + -0x10]
MOVSD qword ptr [RBP + -0x18],XMM0
MOVSD XMM0,qword ptr [0x00102070]
MOV RAX,qword ptr [RBP + -0x8]
MOVAPD XMM1,XMM0
... | /* func0(double, double) */
double func0(double param_1,double param_2)
{
double dVar1;
dVar1 = pow(param_1,DAT_00102070);
return dVar1 + (param_1 + param_1) * param_2;
} |
2,321 | func0 |
#include <cmath>
#include <cassert>
| double func0(double b, double s) {
return 2 * b * s + pow(b, 2);
}
| int main() {
assert(func0(3, 4) == 33);
assert(func0(4, 5) == 56);
assert(func0(1, 2) == 5);
return 0;
}
| O1 | cpp | func0(double, double):
endbr64
movapd %xmm0,%xmm2
addsd %xmm0,%xmm2
mulsd %xmm1,%xmm2
mulsd %xmm0,%xmm0
addsd %xmm2,%xmm0
retq
| _Z5func0dd:
endbr64
movapd xmm2, xmm0
addsd xmm0, xmm0
mulsd xmm0, xmm1
mulsd xmm2, xmm2
addsd xmm0, xmm2
retn | double func0(double a1, double a2)
{
return (a1 + a1) * a2 + a1 * a1;
} | func0:
ENDBR64
MOVAPD XMM2,XMM0
ADDSD XMM0,XMM0
MULSD XMM0,XMM1
MULSD XMM2,XMM2
ADDSD XMM0,XMM2
RET | /* func0(double, double) */
double func0(double param_1,double param_2)
{
return (param_1 + param_1) * param_2 + param_1 * param_1;
} |
2,322 | func0 |
#include <cmath>
#include <cassert>
| double func0(double b, double s) {
return 2 * b * s + pow(b, 2);
}
| int main() {
assert(func0(3, 4) == 33);
assert(func0(4, 5) == 56);
assert(func0(1, 2) == 5);
return 0;
}
| O2 | cpp | func0(double, double):
endbr64
movapd %xmm0,%xmm2
addsd %xmm0,%xmm2
mulsd %xmm0,%xmm0
mulsd %xmm1,%xmm2
addsd %xmm2,%xmm0
retq
nopl 0x0(%rax)
| _Z5func0dd:
endbr64
movapd xmm2, xmm0
addsd xmm0, xmm0
mulsd xmm2, xmm2
mulsd xmm0, xmm1
addsd xmm0, xmm2
retn | double func0(double a1, double a2)
{
return (a1 + a1) * a2 + a1 * a1;
} | func0:
ENDBR64
MOVAPD XMM2,XMM0
ADDSD XMM0,XMM0
MULSD XMM2,XMM2
MULSD XMM0,XMM1
ADDSD XMM0,XMM2
RET | /* func0(double, double) */
double func0(double param_1,double param_2)
{
return (param_1 + param_1) * param_2 + param_1 * param_1;
} |
2,323 | func0 |
#include <cmath>
#include <cassert>
| double func0(double b, double s) {
return 2 * b * s + pow(b, 2);
}
| int main() {
assert(func0(3, 4) == 33);
assert(func0(4, 5) == 56);
assert(func0(1, 2) == 5);
return 0;
}
| O3 | cpp | func0(double, double):
endbr64
movapd %xmm0,%xmm2
addsd %xmm0,%xmm2
mulsd %xmm0,%xmm0
mulsd %xmm1,%xmm2
addsd %xmm2,%xmm0
retq
nopl 0x0(%rax)
| _Z5func0dd:
endbr64
movapd xmm2, xmm0
addsd xmm0, xmm0
mulsd xmm2, xmm2
mulsd xmm0, xmm1
addsd xmm0, xmm2
retn | double func0(double a1, double a2)
{
return (a1 + a1) * a2 + a1 * a1;
} | func0:
ENDBR64
MOVAPD XMM2,XMM0
ADDSD XMM0,XMM0
MULSD XMM2,XMM2
MULSD XMM0,XMM1
ADDSD XMM0,XMM2
RET | /* func0(double, double) */
double func0(double param_1,double param_2)
{
return (param_1 + param_1) * param_2 + param_1 * param_1;
} |
2,324 | func0 |
#include <iostream>
#include <assert.h>
#include <unordered_map>
| bool func0(std::unordered_map<int, int> dict1) {
if (!dict1.empty()) {
return false;
} else {
return true;
}
}
| int main() {
std::unordered_map<int, int> non_empty_map1 = {{10, 1}};
std::unordered_map<int, int> non_empty_map2 = {{11, 1}};
std::unordered_map<int, int> empty_map;
assert(func0(non_empty_map1) == false);
assert(func0(non_empty_map2) == false);
assert(func0(empty_map) == true);
... | O0 | cpp | func0(std::unordered_map<int, int, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, int> > >):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x10,%rsp
mov %rdi,-0x8(%rbp)
mov -0x8(%rbp),%rax
mov %rax,%rdi
callq 19ca <_ZNKSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEE5empty... | _Z5func0St13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEE:
endbr64
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov rdi, rax
call _ZNKSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEE5emptyEv; std::unordered_map<int,int>::empty(void)
xor ... | _BOOL8 func0(long long a1)
{
return (unsigned __int8)std::unordered_map<int,int>::empty(a1) == 1;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,RAX
CALL 0x001018c0
XOR EAX,0x1
TEST AL,AL
JZ 0x001012f3
MOV EAX,0x0
JMP 0x001012f8
LAB_001012f3:
MOV EAX,0x1
LAB_001012f8:
LEAVE
RET | /* func0(std::unordered_map<int, int, std::hash<int>, std::equal_to<int>,
std::allocator<std::pair<int const, int> > >) */
bool func0(unordered_map param_1)
{
char cVar1;
int4 in_register_0000003c;
cVar1 = std::
unordered_map<int,int,std::hash<int>,std::equal_to<int>,std::allocator<std::pair<int... |
2,325 | func0 |
#include <iostream>
#include <assert.h>
#include <unordered_map>
| bool func0(std::unordered_map<int, int> dict1) {
if (!dict1.empty()) {
return false;
} else {
return true;
}
}
| int main() {
std::unordered_map<int, int> non_empty_map1 = {{10, 1}};
std::unordered_map<int, int> non_empty_map2 = {{11, 1}};
std::unordered_map<int, int> empty_map;
assert(func0(non_empty_map1) == false);
assert(func0(non_empty_map2) == false);
assert(func0(empty_map) == true);
... | O1 | cpp | func0(std::unordered_map<int, int, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, int> > >):
endbr64
cmpq $0x0,0x18(%rdi)
sete %al
retq
| _Z5func0St13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEE:
endbr64
cmp qword ptr [rdi+18h], 0
setz al
retn | bool func0(long long a1)
{
return *(_QWORD *)(a1 + 24) == 0LL;
} | func0:
ENDBR64
CMP qword ptr [RDI + 0x18],0x0
SETZ AL
RET | /* func0(std::unordered_map<int, int, std::hash<int>, std::equal_to<int>,
std::allocator<std::pair<int const, int> > >) */
bool func0(unordered_map param_1)
{
int4 in_register_0000003c;
return *(long *)(CONCAT44(in_register_0000003c,param_1) + 0x18) == 0;
} |
2,326 | func0 |
#include <iostream>
#include <assert.h>
#include <unordered_map>
| bool func0(std::unordered_map<int, int> dict1) {
if (!dict1.empty()) {
return false;
} else {
return true;
}
}
| int main() {
std::unordered_map<int, int> non_empty_map1 = {{10, 1}};
std::unordered_map<int, int> non_empty_map2 = {{11, 1}};
std::unordered_map<int, int> empty_map;
assert(func0(non_empty_map1) == false);
assert(func0(non_empty_map2) == false);
assert(func0(empty_map) == true);
... | O2 | cpp | func0(std::unordered_map<int, int, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, int> > >):
endbr64
cmpq $0x0,0x18(%rdi)
sete %al
retq
nopl (%rax)
| _Z5func0St13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEE:
endbr64
cmp qword ptr [rdi+18h], 0
setz al
retn | bool func0(long long a1)
{
return *(_QWORD *)(a1 + 24) == 0LL;
} | func0:
ENDBR64
CMP qword ptr [RDI + 0x18],0x0
SETZ AL
RET | /* func0(std::unordered_map<int, int, std::hash<int>, std::equal_to<int>,
std::allocator<std::pair<int const, int> > >) */
bool func0(unordered_map param_1)
{
int4 in_register_0000003c;
return *(long *)(CONCAT44(in_register_0000003c,param_1) + 0x18) == 0;
} |
2,327 | func0 |
#include <iostream>
#include <assert.h>
#include <unordered_map>
| bool func0(std::unordered_map<int, int> dict1) {
if (!dict1.empty()) {
return false;
} else {
return true;
}
}
| int main() {
std::unordered_map<int, int> non_empty_map1 = {{10, 1}};
std::unordered_map<int, int> non_empty_map2 = {{11, 1}};
std::unordered_map<int, int> empty_map;
assert(func0(non_empty_map1) == false);
assert(func0(non_empty_map2) == false);
assert(func0(empty_map) == true);
... | O3 | cpp | func0(std::unordered_map<int, int, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, int> > >):
endbr64
cmpq $0x0,0x18(%rdi)
sete %al
retq
nopl (%rax)
| _Z5func0St13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEE:
endbr64
cmp qword ptr [rdi+18h], 0
setz al
retn | bool func0(long long a1)
{
return *(_QWORD *)(a1 + 24) == 0LL;
} | func0:
ENDBR64
CMP qword ptr [RDI + 0x18],0x0
SETZ AL
RET | /* func0(std::unordered_map<int, int, std::hash<int>, std::equal_to<int>,
std::allocator<std::pair<int const, int> > >) */
bool func0(unordered_map param_1)
{
int4 in_register_0000003c;
return *(long *)(CONCAT44(in_register_0000003c,param_1) + 0x18) == 0;
} |
2,328 | func0 | #include <iostream>
#include <assert.h>
| int func0(int num) {
if (num <= 1)
return 1;
int res_num = 0;
for (int i = 0; i < num; ++i) {
res_num += func0(i) * func0(num - i - 1);
}
return res_num;
}
| int main() {
assert(func0(10) == 16796);
assert(func0(9) == 4862);
assert(func0(7) == 429);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x28,%rsp
mov %edi,-0x24(%rbp)
cmpl $0x1,-0x24(%rbp)
jg 11a6 <_Z5func0i+0x1d>
mov $0x1,%eax
jmp 11e7 <_Z5func0i+0x5e>
movl $0x0,-0x18(%rbp)
movl $0x0,-0x14(%rbp)
mov -0x14(%rbp),%eax
cmp -0x24(%rbp),%eax
jge 11e4 <_Z5func0i... | _Z5func0i:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 28h
mov [rbp+var_24], edi
cmp [rbp+var_24], 1
jg short loc_1166
mov eax, 1
jmp short loc_11A7
loc_1166:
mov [rbp+var_18], 0
mov [rbp+var_14], 0
jmp short loc_119C
loc_1176:
mov eax, [rbp+var_14]
mov edi, ea... | long long func0(int a1)
{
int v2; // ebx
unsigned int v3; // [rsp+18h] [rbp-18h]
int i; // [rsp+1Ch] [rbp-14h]
if ( a1 <= 1 )
return 1LL;
v3 = 0;
for ( i = 0; i < a1; ++i )
{
v2 = func0(i);
v3 += v2 * func0(a1 - i - 1);
}
return v3;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x28
MOV dword ptr [RBP + -0x24],EDI
CMP dword ptr [RBP + -0x24],0x1
JG 0x00101166
MOV EAX,0x1
JMP 0x001011a7
LAB_00101166:
MOV dword ptr [RBP + -0x18],0x0
MOV dword ptr [RBP + -0x14],0x0
JMP 0x0010119c
LAB_00101176:
MOV EAX,dword ptr [RBP + -0x14]
MOV EDI,EAX
CALL 0... | /* func0(int) */
int func0(int param_1)
{
int iVar1;
int iVar2;
int4 local_20;
int4 local_1c;
if (param_1 < 2) {
local_20 = 1;
}
else {
local_20 = 0;
for (local_1c = 0; local_1c < param_1; local_1c = local_1c + 1) {
iVar1 = func0(local_1c);
iVar2 = func0((param_1 - local_1c) +... |
2,329 | func0 | #include <iostream>
#include <assert.h>
| int func0(int num) {
if (num <= 1)
return 1;
int res_num = 0;
for (int i = 0; i < num; ++i) {
res_num += func0(i) * func0(num - i - 1);
}
return res_num;
}
| int main() {
assert(func0(10) == 16796);
assert(func0(9) == 4862);
assert(func0(7) == 429);
return 0;
}
| O1 | cpp | func0(int):
endbr64
push %r13
push %r12
push %rbp
push %rbx
sub $0x8,%rsp
mov $0x1,%r12d
cmp $0x1,%edi
jle 11cf <_Z5func0i+0x46>
lea -0x1(%rdi),%ebp
mov $0x0,%r12d
mov %ebp,%r13d
mov %r13d,%edi
sub %ebp,%edi
callq 1189 <_Z5func0i>
mov %eax,%ebx
mov %ebp,%edi
callq 1189 <_Z5fun... | _Z5func0i:
endbr64
push r13
push r12
push rbp
push rbx
sub rsp, 8
mov r12d, 1
cmp edi, 1
jle short loc_118F
lea ebp, [rdi-1]
mov r12d, 0
mov r13d, ebp
loc_116E:
mov edi, r13d
sub edi, ebp; int
call _Z5func0i; func0(int)
mov ebx, eax
mov edi, ebp; int
call _Z... | long long func0(int a1)
{
unsigned int v1; // r12d
int v2; // ebp
int v3; // ebx
v1 = 1;
if ( a1 > 1 )
{
v2 = a1 - 1;
v1 = 0;
do
{
v3 = func0(a1 - 1 - v2);
v1 += func0(v2--) * v3;
}
while ( v2 != -1 );
}
return v1;
} | func0:
ENDBR64
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV R12D,0x1
CMP EDI,0x1
JLE 0x0010118f
LEA EBP,[RDI + -0x1]
MOV R12D,0x0
MOV R13D,EBP
LAB_0010116e:
MOV EDI,R13D
SUB EDI,EBP
CALL 0x00101149
MOV EBX,EAX
MOV EDI,EBP
CALL 0x00101149
IMUL EBX,EAX
ADD R12D,EBX
SUB EBP,0x1
CMP EBP,-0x1
JNZ 0x0010116e
LAB_00101... | /* func0(int) */
int func0(int param_1)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
iVar4 = 1;
if (1 < param_1) {
iVar4 = 0;
iVar3 = param_1 + -1;
do {
iVar1 = func0((param_1 + -1) - iVar3);
iVar2 = func0(iVar3);
iVar4 = iVar4 + iVar1 * iVar2;
iVar3 = iVar3 + -1;
... |
2,330 | func0 | #include <iostream>
#include <assert.h>
| int func0(int num) {
if (num <= 1)
return 1;
int res_num = 0;
for (int i = 0; i < num; ++i) {
res_num += func0(i) * func0(num - i - 1);
}
return res_num;
}
| int main() {
assert(func0(10) == 16796);
assert(func0(9) == 4862);
assert(func0(7) == 429);
return 0;
}
| O2 | cpp | func0(int):
endbr64
cmp $0x1,%edi
jle 1280 <_Z5func0i+0x10>
jmp 1290 <_Z5func0i.part.0>
nopl 0x0(%rax,%rax,1)
mov $0x1,%eax
retq
nopw %cs:0x0(%rax,%rax,1)
| _Z5func0i_part_0:
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 48h
mov [rsp+78h+var_5C], 0
test edi, edi
jle loc_2441
mov [rsp+78h+var_60], 0
lea ebx, [rdi-1]
mov [rsp+78h+var_6C], 1
mov r12d, ebx
loc_1224:
cmp r12d, 1
jle loc_2414
loc_122E:
lea... | long long func0(int a1)
{
int v1; // r12d
int v2; // ebp
int v3; // r15d
int v4; // r13d
int v5; // esi
int v6; // r14d
int v7; // r12d
int v8; // r9d
int v9; // r10d
int v10; // edx
int v11; // r15d
int v12; // esi
unsigned int v13; // ecx
int v14; // r8d
int v15; // r11d
int v16; // e... | func0:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x48
MOV dword ptr [RSP + 0x1c],0x0
TEST EDI,EDI
JLE 0x00102441
MOV dword ptr [RSP + 0x18],0x0
LEA EBX,[RDI + -0x1]
MOV dword ptr [RSP + 0xc],0x1
MOV R12D,EBX
LAB_00101224:
CMP R12D,0x1
JLE 0x00102414
LAB_0010122e:
LEA EBP,[R12 + -0x1]
XOR R15D,R15D
M... | /* func0(int) [clone .part.0] */
int func0(int param_1)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
int iVar6;
int iVar7;
int iVar8;
int iVar9;
int iVar10;
int iVar11;
int iVar12;
int iVar13;
int iVar14;
int iVar15;
int iVar16;
int iVar17;
bool bVar18;
int local_6c;
... |
2,331 | func0 | #include <iostream>
#include <assert.h>
| int func0(int num) {
if (num <= 1)
return 1;
int res_num = 0;
for (int i = 0; i < num; ++i) {
res_num += func0(i) * func0(num - i - 1);
}
return res_num;
}
| int main() {
assert(func0(10) == 16796);
assert(func0(9) == 4862);
assert(func0(7) == 429);
return 0;
}
| O3 | cpp | func0(int) [clone .part.0]:
push %r13
xor %r13d,%r13d
push %r12
push %rbp
push %rbx
sub $0x8,%rsp
test %edi,%edi
jle 12c3 <_Z5func0i.part.0+0x53>
lea -0x1(%rdi),%ebx
xor %ebp,%ebp
mov $0x1,%r12d
cmp $0x1,%ebx
jbe 12b9 <_Z5func0i.part.0+0x49>
mov %ebx,%edi
add $0x1,%ebp
callq 127... | _Z5func0i_part_0:
push r15
push r14
push r13
push r12
push rbp
xor ebp, ebp
push rbx
sub rsp, 48h
test edi, edi
jle loc_2571
xor r12d, r12d
mov [rsp+78h+var_58], 1
lea ebx, [rdi-1]
mov [rsp+78h+var_4C], r12d
mov [rsp+78h+var_48], ebp
loc_121F:
cmp ebx, 1
jle ... | long long func0(int a1)
{
unsigned int v1; // ebp
int v2; // ebx
int v3; // r12d
int v4; // ebp
int v5; // r12d
int v6; // ebx
int v7; // r14d
int v8; // r15d
long long v9; // rdi
int j; // edx
int v11; // ecx
int v12; // ebp
int v13; // r13d
int v14; // eax
int v15; // edx
int i; // r1... | func0:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
XOR EBP,EBP
PUSH RBX
SUB RSP,0x48
TEST EDI,EDI
JLE 0x00102571
XOR R12D,R12D
MOV dword ptr [RSP + 0x20],0x1
LEA EBX,[RDI + -0x1]
MOV dword ptr [RSP + 0x2c],R12D
MOV dword ptr [RSP + 0x30],EBP
LAB_0010121f:
CMP EBX,0x1
JLE 0x00102542
LAB_00101228:
SUB EBX,0x1
MOV dword ... | /* func0(int) [clone .part.0] */
int func0(int param_1)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
int iVar6;
int iVar7;
int iVar8;
uint uVar9;
int iVar10;
uint uVar11;
uint uVar12;
int iVar13;
int iVar14;
int iVar15;
bool bVar16;
int local_74;
int local_70;
int loc... |
2,332 | func0 | #include <iostream>
#include <regex>
#include <assert.h>
| std::string func0(const std::string &text) {
std::regex word_regex("\\w+ly");
std::smatch match;
if (std::regex_search(text, match, word_regex)) {
return std::to_string(match.position(0)) + '-' + std::to_string(match.position(0) + match.length(0)) + ": " + match.str(0);
}
return "";
}... | int main() {
assert(func0("Clearly, he has no excuse for such behavior.") == "0-7: Clearly");
assert(func0("Please handle the situation carefuly") == "28-36: carefuly");
assert(func0("Complete the task quickly") == "18-25: quickly");
return 0;
}
| O0 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x138,%rsp
mov %rdi,-0x138(%rbp)
mov %rsi,-0x140(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
lea -0x120(%rbp),%rax
mov $0x10,%edx
le... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 138h
mov [rbp+var_138], rdi
mov [rbp+var_140], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_120]
mov edx, 10h
lea rcx, aWLy; "\\w+ly"
... | long long func0(long long a1, long long a2)
{
long long v2; // rbx
long long v3; // rax
long long v4; // rax
char v6; // [rsp+17h] [rbp-129h] BYREF
char *v7; // [rsp+18h] [rbp-128h]
_BYTE v8[32]; // [rsp+20h] [rbp-120h] BYREF
_BYTE v9[32]; // [rsp+40h] [rbp-100h] BYREF
_BYTE v10[32]; // [rsp+60h] [rbp-... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x138
MOV qword ptr [RBP + -0x138],RDI
MOV qword ptr [RBP + -0x140],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x120]
MOV EDX,0x10
LEA RCX,[0x134051]
MOV RSI,RCX
MOV RDI,RAX
LAB_00105c0f:
CALL 0x00107992
LEA RAX,[RBP +... | /* func0(std::string const&) */
string * func0(string *param_1)
{
bool bVar1;
string *in_RSI;
long in_FS_OFFSET;
allocator local_131;
allocator *local_130;
regex local_128 [32];
match_results<__normal_iterator<char_const*,std::string>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::stri... |
2,333 | func0 | #include <iostream>
#include <regex>
#include <assert.h>
| std::string func0(const std::string &text) {
std::regex word_regex("\\w+ly");
std::smatch match;
if (std::regex_search(text, match, word_regex)) {
return std::to_string(match.position(0)) + '-' + std::to_string(match.position(0) + match.length(0)) + ": " + match.str(0);
}
return "";
}... | int main() {
assert(func0("Clearly, he has no excuse for such behavior.") == "0-7: Clearly");
assert(func0("Please handle the situation carefuly") == "28-36: carefuly");
assert(func0("Complete the task quickly") == "18-25: quickly");
return 0;
}
| O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r13
push %r12
push %rbp
push %rbx
sub $0x298,%rsp
mov %rdi,%rbx
mov %rsi,%rbp
mov %fs:0x28,%rax
mov %rax,0x288(%rsp)
xor %eax,%eax
lea 0x30(%rsp),%r13
mov %r13,%rdi
callq 4770 <_... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r14
push r13
push r12
push rbx
sub rsp, 290h
mov r14, rdi
mov rbx, rsi
mov rax, fs:28h
mov [rbp+var_28], rax
xor eax, eax
lea r12, [rbp+var_298]
mov rdi, r12; this
call ... | char ** func0(char **a1, long long a2)
{
long long v3; // rdx
long long v4; // rax
long long v5; // rdi
_BYTE *v6; // rax
_QWORD *v7; // rdx
long long v8; // rax
long long v9; // rcx
long long v10; // rax
unsigned long long v11; // r13
unsigned long long v12; // r12
unsigned long long v13; // rdx
... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x290
MOV R14,RDI
MOV RBX,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
XOR EAX,EAX
LEA R12,[RBP + -0x298]
MOV RDI,R12
CALL 0x00104730
MOV qword ptr [RBP + -0x290],0x0
MOV qword ptr [RBP + -0x288],0x0
LEA RDI,[RBP + -0x1c0... | /* func0(std::string const&) */
string * func0(string *param_1)
{
ulong *puVar1;
int *__src;
_Sp_counted_base<(_Lock_policy)2> *this;
_Sp_counted_base<(_Lock_policy)2> *p_Var2;
bool bVar3;
long lVar4;
ulong uVar5;
long *plVar6;
long *plVar7;
string *psVar8;
int8 uVar9;
ulong uVar10;
uint uVa... |
2,334 | func0 | #include <iostream>
#include <regex>
#include <assert.h>
| std::string func0(const std::string &text) {
std::regex word_regex("\\w+ly");
std::smatch match;
if (std::regex_search(text, match, word_regex)) {
return std::to_string(match.position(0)) + '-' + std::to_string(match.position(0) + match.length(0)) + ": " + match.str(0);
}
return "";
}... | int main() {
assert(func0("Clearly, he has no excuse for such behavior.") == "0-7: Clearly");
assert(func0("Please handle the situation carefuly") == "28-36: carefuly");
assert(func0("Complete the task quickly") == "18-25: quickly");
return 0;
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
mov %rsi,%rbx
sub $0x2b8,%rsp
mov %fs:0x28,%rax
mov %rax,0x2a8(%rsp)
xor %eax,%eax
lea 0x50(%rsp),%r14
lea ... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r15
push r14
lea r14, [rbp+var_2A0]
push r13
lea r13, [rbp+var_378]
push r12
mov r12, rdi
mov rdi, r13; this
push rbx
mov rbx, rsi
sub rsp, 3A8h
mov rax, fs:28h
mov [r... | long long func0(long long a1, long long *a2)
{
char *v4; // rsi
__m128i v5; // xmm0
long long v6; // rax
signed __int32 *v7; // rdi
long long v8; // rdx
volatile signed __int32 *v9; // rcx
signed __int32 v10; // eax
long long v11; // rdi
long long v12; // rdx
volatile signed __int32 *v13; // rcx
... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
LEA R14,[RBP + -0x2a0]
PUSH R13
LEA R13,[RBP + -0x378]
PUSH R12
MOV R12,RDI
MOV RDI,R13
PUSH RBX
MOV RBX,RSI
SUB RSP,0x3a8
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x38],RAX
XOR EAX,EAX
CALL 0x00104730
PXOR XMM0,XMM0
MOV RCX,R13
MOV RDI,R14
LEA RDX,[0x11a70... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(std::string const&) */
string * func0(string *param_1)
{
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
ulong *puVar2;
int *__src;
int auVar3 [16];
int auVar4 [16];
int8 uVar5;
int8 uVar6;
bool bVar7;
char cVar... |
2,335 | func0 | #include <iostream>
#include <regex>
#include <assert.h>
| std::string func0(const std::string &text) {
std::regex word_regex("\\w+ly");
std::smatch match;
if (std::regex_search(text, match, word_regex)) {
return std::to_string(match.position(0)) + '-' + std::to_string(match.position(0) + match.length(0)) + ": " + match.str(0);
}
return "";
}... | int main() {
assert(func0("Clearly, he has no excuse for such behavior.") == "0-7: Clearly");
assert(func0("Please handle the situation carefuly") == "28-36: carefuly");
assert(func0("Complete the task quickly") == "18-25: quickly");
return 0;
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r15
mov %rsi,%r15
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x2b8,%rsp
mov %fs:0x28,%rax
mov %rax,0x2a8(%rsp)
xor %eax,%eax
lea 0x50(%rsp),%r14
lea ... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r15
push r14
mov r14, rsi
push r13
lea r13, [rbp+var_378]
push r12
mov r12, rdi
mov rdi, r13; this
push rbx
sub rsp, 3A8h
mov rax, fs:28h
mov [rbp+var_38], rax
xor eax... | long long func0(long long a1, long long *a2)
{
__m128i v3; // xmm0
long long v4; // rdi
void *v5; // rdi
void **v6; // rbx
unsigned long long v7; // r15
void *v8; // rdi
long long v9; // rdi
long long v10; // rsi
__int128 v11; // rax
long long v12; // rcx
long long v13; // rsi
long long v14; //... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
MOV R14,RSI
PUSH R13
LEA R13,[RBP + -0x378]
PUSH R12
MOV R12,RDI
MOV RDI,R13
PUSH RBX
SUB RSP,0x3a8
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x38],RAX
XOR EAX,EAX
CALL 0x00104750
LEA RDX,[0x11b749]
PXOR XMM0,XMM0
LEA RDI,[RBP + -0x2a0]
MOV R8D,0x10
MOV RCX,... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(std::string const&) */
string * func0(string *param_1)
{
uint uVar1;
int *__src;
int auVar2 [16];
int auVar3 [16];
int8 this;
bool bVar4;
char cVar5;
ulong uVar6;
string *psVar7;
long lVar8;
ulong uVar9... |
2,336 | func0 |
#include <vector>
#include <string>
#include <algorithm>
#include <cassert>
struct Item {
std::string name;
double price;
bool operator==(const Item& other) const {
return name == other.name && price == other.price;
}
};
| std::vector<Item> func0(const std::vector<Item>& items, int n){
std::vector<Item> sorted_items = items;
std::sort(sorted_items.begin(), sorted_items.end(), [&](const Item& a, const Item& b) {
return a.price > b.price;
});
if(n > sorted_items.size()) n = sorted_items.size();
return std:... | int main(){
std::vector<Item> result1 = func0(
{ {"Item-1", 101.1}, {"Item-2", 555.22} }, 1
);
std::vector<Item> expected1 = { {"Item-2", 555.22} };
assert(result1 == expected1);
std::vector<Item> result2 = func0(
{ {"Item-1", 101.1}, {"Item-2", 555.22}, {"Item-3", 45.09} },... | O0 | cpp | func0(std::vector<Item, std::allocator<Item> > const&, int)::{lambda(Item const&, Item const&)#1}::operator()(Item const&, Item const&) const:
push %rbp
mov %rsp,%rbp
mov %rdi,-0x8(%rbp)
mov %rsi,-0x10(%rbp)
mov %rdx,-0x18(%rbp)
mov -0x10(%rbp),%rax
movsd 0x20(%rax),%xmm0
mov -0x18(%rbp),%rax
movsd... | _ZZ5func0RKSt6vectorI4ItemSaIS0_EEiENKUlRKS0_S6_E_clES6_S6_:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_10]
movsd xmm0, qword ptr [rax+20h]
mov rax, [rbp+var_18]
movsd xmm1, qword ptr [rax+20h]
comisd xmm0, xmm1
setnbe al
pop... | bool func0(std::vector<Item> const&,int)::{lambda(Item const&,Item const&)#1}::operator()(
long long a1,
long long a2,
long long a3)
{
return *(double *)(a2 + 32) > *(double *)(a3 + 32);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x68
MOV qword ptr [RBP + -0x58],RDI
MOV qword ptr [RBP + -0x60],RSI
MOV dword ptr [RBP + -0x64],EDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RDX,qword ptr [RBP + -0x60]
LEA RAX,[RBP + -0x30]
MOV RSI,RDX
MOV RDI,RAX
LAB_0010252a:
CA... | /* func0(std::vector<Item, std::allocator<Item> > const&, int) */
vector * func0(vector *param_1,int param_2)
{
__normal_iterator _Var1;
__normal_iterator _Var2;
ulong uVar3;
int in_EDX;
_lambda_Item_const__Item_const___1_ extraout_EDX;
int4 in_register_00000034;
long in_FS_OFFSET;
int local_6c;
all... |
2,337 | func0 |
#include <vector>
#include <string>
#include <algorithm>
#include <cassert>
struct Item {
std::string name;
double price;
bool operator==(const Item& other) const {
return name == other.name && price == other.price;
}
};
| std::vector<Item> func0(const std::vector<Item>& items, int n){
std::vector<Item> sorted_items = items;
std::sort(sorted_items.begin(), sorted_items.end(), [&](const Item& a, const Item& b) {
return a.price > b.price;
});
if(n > sorted_items.size()) n = sorted_items.size();
return std:... | int main(){
std::vector<Item> result1 = func0(
{ {"Item-1", 101.1}, {"Item-2", 555.22} }, 1
);
std::vector<Item> expected1 = { {"Item-2", 555.22} };
assert(result1 == expected1);
std::vector<Item> result2 = func0(
{ {"Item-1", 101.1}, {"Item-2", 555.22}, {"Item-3", 45.09} },... | O1 | cpp | void std::__adjust_heap<__gnu_cxx::__normal_iterator<Item*, std::vector<Item, std::allocator<Item> > >, long, Item, __gnu_cxx::__ops::_Iter_comp_iter<func0(std::vector<Item, std::allocator<Item> > const&, int)::{lambda(Item const&, Item const&)#1}> >(__gnu_cxx::__normal_iterator<Item*, std::vector<Item, std::allocator<... | _ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0_:
push rbx
sub rsp, 30h
mov rax, rdi
mov rdx, fs:28h
mov [rsp+38h+var_10], rdx
xor edx, edx
lea rdx, [rsp+38h+var_28]
mov [rsp+38h+var_... | unsigned long long std::__unguarded_linear_insert<__gnu_cxx::__normal_iterator<Item *,std::vector<Item>>,__gnu_cxx::__ops::_Val_comp_iter<func0(std::vector<Item> const&,int)::{lambda(Item const&,Item const&)#1}>>(
double *a1)
{
_BYTE *v1; // rcx
double *v2; // rdx
unsigned int v3; // edx
_DWORD *v4; //... | __unguarded_linear_insert<__normal_iterator<Item*,std::vector<Item,std::allocator<Item>>>,__ops::_Val_comp_iter<func0(std::vector<Item,std::allocator<Item>>const&,int)::{lambda(Item_const&,Item_const&)#1}>>:
PUSH RBX
SUB RSP,0x30
MOV RAX,RDI
MOV RDX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x28],RDX
XOR EDX,EDX
LEA RDX... | /* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* void std::__unguarded_linear_insert<__normal_iterator<Item*, std::vector<Item,
std::allocator<Item> > >, __ops::_Val_comp_iter<func0(std::vector<Item, std::allocator<Item> >
const&, int)::{lambda(Item const&, Item const&)#1}> >(__norm... |
2,338 | func0 |
#include <vector>
#include <string>
#include <algorithm>
#include <cassert>
struct Item {
std::string name;
double price;
bool operator==(const Item& other) const {
return name == other.name && price == other.price;
}
};
| std::vector<Item> func0(const std::vector<Item>& items, int n){
std::vector<Item> sorted_items = items;
std::sort(sorted_items.begin(), sorted_items.end(), [&](const Item& a, const Item& b) {
return a.price > b.price;
});
if(n > sorted_items.size()) n = sorted_items.size();
return std:... | int main(){
std::vector<Item> result1 = func0(
{ {"Item-1", 101.1}, {"Item-2", 555.22} }, 1
);
std::vector<Item> expected1 = { {"Item-2", 555.22} };
assert(result1 == expected1);
std::vector<Item> result2 = func0(
{ {"Item-1", 101.1}, {"Item-2", 555.22}, {"Item-3", 45.09} },... | O2 | cpp | void std::__unguarded_linear_insert<__gnu_cxx::__normal_iterator<Item*, std::vector<Item, std::allocator<Item> > >, __gnu_cxx::__ops::_Val_comp_iter<func0(std::vector<Item, std::allocator<Item> > const&, int)::{lambda(Item const&, Item const&)#1}> >(__gnu_cxx::__normal_iterator<Item*, std::vector<Item, std::allocator<I... | _ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0__isra_0:
push r12
mov rax, rdi
push rbp
mov rbp, rdi
add rdi, 10h
push rbx
sub rsp, 30h
mov rcx, [rax+8]
mov rdx, fs:28h
mov [rsp... | unsigned long long std::__unguarded_linear_insert<__gnu_cxx::__normal_iterator<Item *,std::vector<Item>>,__gnu_cxx::__ops::_Val_comp_iter<func0(std::vector<Item> const&,int)::{lambda(Item const&,Item const&)#1}>>(
long long *a1)
{
long long *v2; // rbp
long long *v3; // rdi
long long v4; // rcx
long lo... | __unguarded_linear_insert<__normal_iterator<Item*,std::vector<Item,std::allocator<Item>>>,__ops::_Val_comp_iter<func0(std::vector<Item,std::allocator<Item>>const&,int)::{lambda(Item_const&,Item_const&)#1}>>:
PUSH R12
MOV RAX,RDI
PUSH RBP
MOV RBP,RDI
ADD RDI,0x10
PUSH RBX
SUB RSP,0x30
MOV RCX,qword ptr [RAX + 0x8]
MOV R... | /* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* void std::__unguarded_linear_insert<__normal_iterator<Item*, std::vector<Item,
std::allocator<Item> > >, __ops::_Val_comp_iter<func0(std::vector<Item, std::allocator<Item> >
const&, int)::{lambda(Item const&, Item const&)#1}> >(__norm... |
2,339 | func0 |
#include <vector>
#include <string>
#include <algorithm>
#include <cassert>
struct Item {
std::string name;
double price;
bool operator==(const Item& other) const {
return name == other.name && price == other.price;
}
};
| std::vector<Item> func0(const std::vector<Item>& items, int n){
std::vector<Item> sorted_items = items;
std::sort(sorted_items.begin(), sorted_items.end(), [&](const Item& a, const Item& b) {
return a.price > b.price;
});
if(n > sorted_items.size()) n = sorted_items.size();
return std:... | int main(){
std::vector<Item> result1 = func0(
{ {"Item-1", 101.1}, {"Item-2", 555.22} }, 1
);
std::vector<Item> expected1 = { {"Item-2", 555.22} };
assert(result1 == expected1);
std::vector<Item> result2 = func0(
{ {"Item-1", 101.1}, {"Item-2", 555.22}, {"Item-3", 45.09} },... | O3 | cpp | void std::__unguarded_linear_insert<__gnu_cxx::__normal_iterator<Item*, std::vector<Item, std::allocator<Item> > >, __gnu_cxx::__ops::_Val_comp_iter<func0(std::vector<Item, std::allocator<Item> > const&, int)::{lambda(Item const&, Item const&)#1}> >(__gnu_cxx::__normal_iterator<Item*, std::vector<Item, std::allocator<I... | _ZSt16__insertion_sortIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_SG_T0__isra_0:
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 48h
mov rax, fs:28h
mov [rsp+78h+var_40], rax
xor eax, eax
cmp ... | unsigned long long std::__insertion_sort<__gnu_cxx::__normal_iterator<Item *,std::vector<Item>>,__gnu_cxx::__ops::_Iter_comp_iter<func0(std::vector<Item> const&,int)::{lambda(Item const&,Item const&)#1}>>(
long long a1,
long long a2)
{
long long v4; // r13
double *v5; // rdx
long long *v6; // rcx... | __insertion_sort<__normal_iterator<Item*,std::vector<Item,std::allocator<Item>>>,__ops::_Iter_comp_iter<func0(std::vector<Item,std::allocator<Item>>const&,int)::{lambda(Item_const&,Item_const&)#1}>>:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x48
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38... | /* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* void std::__insertion_sort<__normal_iterator<Item*, std::vector<Item, std::allocator<Item> > >,
__ops::_Iter_comp_iter<func0(std::vector<Item, std::allocator<Item> > const&, int)::{lambda(Item
const&, Item const&)#1}> >(__normal_itera... |
2,340 | func0 |
#include <vector>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& a, int n, int k) {
std::vector<int> b(a.begin(), a.begin() + k);
std::vector<int> result(a.begin() + k, a.end());
result.insert(result.end(), b.begin(), b.end());
return result;
}
| int main() {
assert((func0({12, 10, 5, 6, 52, 36}, 6, 2) == std::vector<int>{5, 6, 52, 36, 12, 10}));
assert((func0({1, 2, 3, 4}, 4, 1) == std::vector<int>{2, 3, 4, 1}));
assert((func0({0, 1, 2, 3, 4, 5, 6, 7}, 8, 3) == std::vector<int>{3, 4, 5, 6, 7, 0, 1, 2}));
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> > const&, int, int):
endbr64
push %rbp
mov %rsp,%rbp
push %r12
push %rbx
sub $0x50,%rsp
mov %rdi,-0x48(%rbp)
mov %rsi,-0x50(%rbp)
mov %edx,-0x54(%rbp)
mov %ecx,-0x58(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
lea -0x40(%rbp),... | _Z5func0RKSt6vectorIiSaIiEEii:
endbr64
push rbp
mov rbp, rsp
push r12
push rbx
sub rsp, 60h
mov [rbp+var_58], rdi
mov [rbp+var_60], rsi
mov [rbp+var_64], edx
mov [rbp+var_68], ecx
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_50]
mov [rbp+var_4... | long long func0(long long a1, long long a2, long long a3, int a4)
{
long long v4; // rbx
long long v5; // rbx
long long v6; // rax
long long v7; // r12
long long v8; // rax
long long v9; // r12
long long v10; // rbx
long long v13; // [rsp+20h] [rbp-50h] BYREF
_QWORD v14[3]; // [rsp+28h] [rbp-48h] BYR... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R12
PUSH RBX
SUB RSP,0x60
MOV qword ptr [RBP + -0x58],RDI
MOV qword ptr [RBP + -0x60],RSI
MOV dword ptr [RBP + -0x64],EDX
MOV dword ptr [RBP + -0x68],ECX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x50]
MOV qword ptr [RBP + -0x40],RAX... | /* func0(std::vector<int, std::allocator<int> > const&, int, int) */
vector * func0(vector *param_1,int param_2,int param_3)
{
__normal_iterator _Var1;
__normal_iterator _Var2;
int in_ECX;
int4 in_register_00000034;
vector<int,std::allocator<int>> *this;
long in_FS_OFFSET;
int8 local_58;
int8 local_50... |
2,341 | func0 |
#include <vector>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& a, int n, int k) {
std::vector<int> b(a.begin(), a.begin() + k);
std::vector<int> result(a.begin() + k, a.end());
result.insert(result.end(), b.begin(), b.end());
return result;
}
| int main() {
assert((func0({12, 10, 5, 6, 52, 36}, 6, 2) == std::vector<int>{5, 6, 52, 36, 12, 10}));
assert((func0({1, 2, 3, 4}, 4, 1) == std::vector<int>{2, 3, 4, 1}));
assert((func0({0, 1, 2, 3, 4, 5, 6, 7}, 8, 3) == std::vector<int>{3, 4, 5, 6, 7, 0, 1, 2}));
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> > const&, int, int):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x18,%rsp
mov (%rsi),%r14
movslq %ecx,%rcx
movabs $0x1fffffffffffffff,%rax
cmp %rax,%rcx
ja 12f8 <_Z5func0RKSt6vectorIiSaIiEEii+0xaf>
mov %rdi,%rbx
mov ... | _Z5func0RKSt6vectorIiSaIiEEii:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 38h
mov rax, fs:28h
mov [rsp+68h+var_40], rax
xor eax, eax
mov r12, [rsi]
movsxd rbx, ecx
shl rbx, 2
mov [rsp+68h+var_58], 0
mov [rsp+68h+var_50], 0
mov [rsp+68h+v... | _QWORD * func0(_QWORD *a1, long long a2, long long a3, int a4)
{
_DWORD *v4; // r12
signed long long v5; // rbx
_DWORD *v6; // rax
void *v7; // r13
_DWORD *v8; // r14
long long v9; // r12
signed long long v10; // r12
_DWORD *v11; // rax
char *v12; // r15
_DWORD *src; // [rsp+8h] [rbp-60h]
v4 = *(... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x38
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x28],RAX
XOR EAX,EAX
MOV R12,qword ptr [RSI]
MOVSXD RBX,ECX
SHL RBX,0x2
MOV qword ptr [RSP + 0x10],0x0
MOV qword ptr [RSP + 0x18],0x0
MOV qword ptr [RSP + 0x20],0x0
MOV RAX,0x7ffffffffffff... | /* func0(std::vector<int, std::allocator<int> > const&, int, int) */
vector * func0(vector *param_1,int param_2,int param_3)
{
int4 *__dest;
int4 *puVar1;
int4 *__dest_00;
int8 uVar2;
int in_ECX;
int4 in_register_00000014;
ulong __n;
int4 in_register_00000034;
long *plVar3;
ulong __n_00;
int4 *p... |
2,342 | func0 |
#include <vector>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& a, int n, int k) {
std::vector<int> b(a.begin(), a.begin() + k);
std::vector<int> result(a.begin() + k, a.end());
result.insert(result.end(), b.begin(), b.end());
return result;
}
| int main() {
assert((func0({12, 10, 5, 6, 52, 36}, 6, 2) == std::vector<int>{5, 6, 52, 36, 12, 10}));
assert((func0({1, 2, 3, 4}, 4, 1) == std::vector<int>{2, 3, 4, 1}));
assert((func0({0, 1, 2, 3, 4, 5, 6, 7}, 8, 3) == std::vector<int>{3, 4, 5, 6, 7, 0, 1, 2}));
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> > const&, int, int):
endbr64
movabs $0x1fffffffffffffff,%rax
push %r15
movslq %ecx,%rcx
push %r14
push %r13
push %r12
push %rbp
push %rbx
mov %rsi,%rbx
sub $0x18,%rsp
mov (%rsi),%rsi
cmp %rax,%rcx
ja 17a0 <_Z5func0RKSt6vectorIiSaIiEEii+0x120>
lea ... | _Z5func0RKSt6vectorIiSaIiEEii:
endbr64
push r15
movsxd rcx, ecx
pxor xmm0, xmm0
push r14
push r13
lea r13, ds:0[rcx*4]
push r12
push rbp
push rbx
sub rsp, 48h
mov r14, [rsi]
mov rax, fs:28h
mov [rsp+78h+var_40], rax
xor eax, eax
mov [rsp+78h+var_70], rcx
mov rax, 7F... | long long func0(long long a1, long long a2, long long a3, int a4)
{
signed long long v4; // r13
int *v5; // r14
_DWORD *v7; // rax
_DWORD *v8; // r15
_DWORD *v9; // r12
signed long long v10; // rbp
int *v11; // rax
char *v12; // rcx
int *v13; // r14
unsigned long long v14; // rax
int *v15; // r15... | func0:
ENDBR64
PUSH R15
MOVSXD RCX,ECX
PXOR XMM0,XMM0
PUSH R14
PUSH R13
LEA R13,[RCX*0x4]
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x48
MOV R14,qword ptr [RSI]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,0x7ffffffffffffffc
MOV qword ptr [RSP + 0x30],0x0
MOVAPS ... | /* func0(std::vector<int, std::allocator<int> > const&, int, int) */
vector * func0(vector *param_1,int param_2,int param_3)
{
ulong __n;
int4 uVar1;
long lVar2;
int4 *__src;
ulong uVar3;
int4 *puVar4;
int in_ECX;
ulong uVar5;
long lVar6;
vector *unaff_RBX;
ulong unaff_RBP;
int4 *puVar7;
int... |
2,343 | func0 |
#include <vector>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& a, int n, int k) {
std::vector<int> b(a.begin(), a.begin() + k);
std::vector<int> result(a.begin() + k, a.end());
result.insert(result.end(), b.begin(), b.end());
return result;
}
| int main() {
assert((func0({12, 10, 5, 6, 52, 36}, 6, 2) == std::vector<int>{5, 6, 52, 36, 12, 10}));
assert((func0({1, 2, 3, 4}, 4, 1) == std::vector<int>{2, 3, 4, 1}));
assert((func0({0, 1, 2, 3, 4, 5, 6, 7}, 8, 3) == std::vector<int>{3, 4, 5, 6, 7, 0, 1, 2}));
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> > const&, int, int):
endbr64
movabs $0x1fffffffffffffff,%rax
push %r15
movslq %ecx,%rcx
push %r14
push %r13
push %r12
push %rbp
push %rbx
mov %rsi,%rbx
sub $0x18,%rsp
mov (%rsi),%rsi
cmp %rax,%rcx
ja 1720 <_Z5func0RKSt6vectorIiSaIiEEii+0x120>
lea ... | _Z5func0RKSt6vectorIiSaIiEEii:
endbr64
push r15
movsxd rcx, ecx
pxor xmm0, xmm0
push r14
push r13
push r12
lea r12, ds:0[rcx*4]
push rbp
push rbx
sub rsp, 48h
mov r14, [rsi]
mov rax, fs:28h
mov [rsp+78h+var_40], rax
xor eax, eax
mov [rsp+78h+var_70], rcx
mov rax, 7F... | long long func0(long long a1, long long a2, long long a3, int a4)
{
signed long long v4; // r12
int *v5; // r14
_DWORD *v7; // rax
_DWORD *v8; // r15
_DWORD *v9; // r13
signed long long v10; // rbp
int *v11; // rax
char *v12; // rcx
int *v13; // r14
unsigned long long v14; // rax
int *v15; // r15... | func0:
ENDBR64
PUSH R15
MOVSXD RCX,ECX
PXOR XMM0,XMM0
PUSH R14
PUSH R13
PUSH R12
LEA R12,[RCX*0x4]
PUSH RBP
PUSH RBX
SUB RSP,0x48
MOV R14,qword ptr [RSI]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,0x7ffffffffffffffc
MOV qword ptr [RSP + 0x30],0x0
MOVAPS ... | /* func0(std::vector<int, std::allocator<int> > const&, int, int) */
vector * func0(vector *param_1,int param_2,int param_3)
{
ulong __n;
int4 uVar1;
long lVar2;
int4 *__dest;
ulong uVar3;
int4 *__dest_00;
int4 *puVar4;
int in_ECX;
ulong uVar5;
long lVar6;
ulong __n_00;
int4 *puVar7;
int4 *p... |
2,344 | func0 |
#include <vector>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& listx) {
return listx;
}
| int main() {
assert(func0({5, 10, 7, 4, 15, 3}) == std::vector<int>({5, 10, 7, 4, 15, 3}));
assert(func0({2, 4, 5, 6, 2, 3, 4, 4, 7}) == std::vector<int>({2, 4, 5, 6, 2, 3, 4, 4, 7}));
assert(func0({58, 44, 56}) == std::vector<int>({58, 44, 56}));
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x10,%rsp
mov %rdi,-0x8(%rbp)
mov %rsi,-0x10(%rbp)
mov -0x10(%rbp),%rdx
mov -0x8(%rbp),%rax
mov %rdx,%rsi
mov %rax,%rdi
callq 192e <_ZNSt6vectorIiSaIiEEC1ERKS1_>
mov -0x8(%rbp),%rax
leaveq
retq
| _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rdx, [rbp+var_10]
mov rax, [rbp+var_8]
mov rsi, rdx
mov rdi, rax
call _ZNSt6vectorIiSaIiEEC2ERKS1_; std::vector<int>::vector(std::vector<int> const&)
mov rax, ... | long long func0(long long a1, long long a2)
{
std::vector<int>::vector(a1, a2);
return a1;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RDX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV RSI,RDX
MOV RDI,RAX
CALL 0x00101996
MOV RAX,qword ptr [RBP + -0x8]
LEAVE
RET | /* func0(std::vector<int, std::allocator<int> > const&) */
vector * func0(vector *param_1)
{
vector *in_RSI;
std::vector<int,std::allocator<int>>::vector((vector<int,std::allocator<int>> *)param_1,in_RSI);
return param_1;
} |
2,345 | func0 |
#include <vector>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& listx) {
return listx;
}
| int main() {
assert(func0({5, 10, 7, 4, 15, 3}) == std::vector<int>({5, 10, 7, 4, 15, 3}));
assert(func0({2, 4, 5, 6, 2, 3, 4, 4, 7}) == std::vector<int>({2, 4, 5, 6, 2, 3, 4, 4, 7}));
assert(func0({58, 44, 56}) == std::vector<int>({58, 44, 56}));
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %r13
push %r12
push %rbp
push %rbx
sub $0x8,%rsp
mov %rdi,%rbx
mov %rsi,%r13
mov 0x8(%rsi),%r12
sub (%rsi),%r12
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi)
movq $0x0,0x10(%rdi)
mov %r12,%rax
sar $0x2,%rax
je 1304 <_Z5func... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push r13
push r12
push rbp
push rbx
sub rsp, 8
mov rbx, rdi
mov r13, rsi
mov r12, [rsi+8]
sub r12, [rsi]
mov qword ptr [rdi], 0
mov qword ptr [rdi+8], 0
mov qword ptr [rdi+10h], 0
jz short loc_12FB
mov rax, 7FFFFFFFFFFFFFFCh
cmp ... | _QWORD * func0(_QWORD *a1, _QWORD *a2)
{
unsigned long long v3; // r12
_DWORD *v4; // rbp
_DWORD *v5; // rsi
long long v6; // r12
v3 = a2[1] - *a2;
*a1 = 0LL;
a1[1] = 0LL;
a1[2] = 0LL;
if ( v3 )
{
if ( v3 <= 0x7FFFFFFFFFFFFFFCLL )
{
v4 = (_DWORD *)operator new(v3);
goto LABEL_4;... | func0:
ENDBR64
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV RBX,RDI
MOV R13,RSI
MOV R12,qword ptr [RSI + 0x8]
SUB R12,qword ptr [RSI]
MOV qword ptr [RDI],0x0
MOV qword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
JZ 0x001012fb
MOV RAX,0x7ffffffffffffffc
CMP RAX,R12
JC 0x001012f6
MOV RDI,R12
CALL 0x00101130... | /* func0(std::vector<int, std::allocator<int> > const&) */
vector * func0(vector *param_1)
{
int4 *__src;
int4 *__dest;
long *in_RSI;
ulong uVar1;
size_t __n;
uVar1 = in_RSI[1] - *in_RSI;
*(int8 *)param_1 = 0;
*(int8 *)(param_1 + 8) = 0;
*(int8 *)(param_1 + 0x10) = 0;
if (uVar1 != 0) {
if (... |
2,346 | func0 |
#include <vector>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& listx) {
return listx;
}
| int main() {
assert(func0({5, 10, 7, 4, 15, 3}) == std::vector<int>({5, 10, 7, 4, 15, 3}));
assert(func0({2, 4, 5, 6, 2, 3, 4, 4, 7}) == std::vector<int>({2, 4, 5, 6, 2, 3, 4, 4, 7}));
assert(func0({58, 44, 56}) == std::vector<int>({58, 44, 56}));
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %r12
mov %rdi,%r12
push %rbp
mov %rsi,%rbp
push %rbx
mov 0x8(%rsi),%rbx
sub (%rsi),%rbx
movq $0x0,(%rdi)
mov %rbx,%rax
movq $0x0,0x8(%rdi)
sar $0x2,%rax
movq $0x0,0x10(%rdi)
je 1708 <_Z5func0RKSt6vectorIiSaIiEE+0x98>
mo... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push r12
pxor xmm0, xmm0
mov r12, rsi
push rbp
push rbx
mov rbp, [rsi+8]
mov rbx, rdi
sub rbp, [rsi]
mov qword ptr [rdi+10h], 0
movups xmmword ptr [rdi], xmm0
jz short loc_16B8
mov rax, 7FFFFFFFFFFFFFFCh
cmp rax, rbp
jb short loc_16... | long long func0(long long a1, _QWORD *a2)
{
unsigned long long v3; // rbp
_DWORD *v4; // rcx
_DWORD *v5; // rsi
long long v6; // rax
size_t v7; // rbp
long long result; // rax
v3 = a2[1] - *a2;
*(_QWORD *)(a1 + 16) = 0LL;
*(_OWORD *)a1 = 0LL;
if ( v3 )
{
if ( v3 > 0x7FFFFFFFFFFFFFFCLL )
... | func0:
ENDBR64
PUSH R12
PXOR XMM0,XMM0
MOV R12,RSI
PUSH RBP
PUSH RBX
MOV RBP,qword ptr [RSI + 0x8]
MOV RBX,RDI
SUB RBP,qword ptr [RSI]
MOV qword ptr [RDI + 0x10],0x0
MOVUPS xmmword ptr [RDI],XMM0
JZ 0x001016b8
MOV RAX,0x7ffffffffffffffc
CMP RAX,RBP
JC 0x001016d0
MOV RDI,RBP
CALL 0x00101130
MOV RCX,RAX
LAB_00101670:
MOV... | /* func0(std::vector<int, std::allocator<int> > const&) */
vector * func0(vector *param_1)
{
int4 *__src;
uint *__src_00;
int4 *__dest;
size_t __n;
vector *pvVar1;
vector *__n_00;
vector *pvVar2;
vector *extraout_RAX;
ulong uVar3;
long *in_RSI;
uVar3 = in_RSI[1] - *in_RSI;
*(int8 *)(param_1... |
2,347 | func0 |
#include <vector>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& listx) {
return listx;
}
| int main() {
assert(func0({5, 10, 7, 4, 15, 3}) == std::vector<int>({5, 10, 7, 4, 15, 3}));
assert(func0({2, 4, 5, 6, 2, 3, 4, 4, 7}) == std::vector<int>({2, 4, 5, 6, 2, 3, 4, 4, 7}));
assert(func0({58, 44, 56}) == std::vector<int>({58, 44, 56}));
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %r12
pxor %xmm0,%xmm0
mov %rdi,%r12
push %rbp
mov %rsi,%rbp
push %rbx
mov 0x8(%rsi),%rbx
sub (%rsi),%rbx
movq $0x0,0x10(%rdi)
mov %rbx,%rax
movups %xmm0,(%rdi)
sar $0x2,%rax
je 16a0 <_Z5func0RKSt6vectorIiSaIiEE+0x90>
mova... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push r12
pxor xmm0, xmm0
mov r12, rsi
push rbp
push rbx
mov rbp, [rsi+8]
mov rbx, rdi
sub rbp, [rsi]
mov qword ptr [rdi+10h], 0
movups xmmword ptr [rdi], xmm0
jz short loc_16B8
mov rax, 7FFFFFFFFFFFFFFCh
cmp rax, rbp
jb short loc_16... | long long func0(long long a1, _QWORD *a2)
{
unsigned long long v3; // rbp
_DWORD *v4; // rcx
_DWORD *v5; // rsi
long long v6; // rax
size_t v7; // rbp
long long result; // rax
v3 = a2[1] - *a2;
*(_QWORD *)(a1 + 16) = 0LL;
*(_OWORD *)a1 = 0LL;
if ( v3 )
{
if ( v3 > 0x7FFFFFFFFFFFFFFCLL )
... | func0:
ENDBR64
PUSH R12
PXOR XMM0,XMM0
MOV R12,RSI
PUSH RBP
PUSH RBX
MOV RBP,qword ptr [RSI + 0x8]
MOV RBX,RDI
SUB RBP,qword ptr [RSI]
MOV qword ptr [RDI + 0x10],0x0
MOVUPS xmmword ptr [RDI],XMM0
JZ 0x001016b8
MOV RAX,0x7ffffffffffffffc
CMP RAX,RBP
JC 0x001016d0
MOV RDI,RBP
CALL 0x00101130
MOV RCX,RAX
LAB_00101670:
MOV... | /* func0(std::vector<int, std::allocator<int> > const&) */
vector * func0(vector *param_1)
{
int4 *__src;
uint *__src_00;
int4 *__dest;
size_t __n;
vector *pvVar1;
vector *__n_00;
vector *pvVar2;
vector *extraout_RAX;
ulong uVar3;
long *in_RSI;
uVar3 = in_RSI[1] - *in_RSI;
*(int8 *)(param_1... |
2,348 | func0 |
#include <iostream>
#include <vector>
#include <algorithm>
#include <assert.h>
| int func0(const std::vector<int>& nums) {
int diff = *max_element(nums.begin(), nums.end()) - *min_element(nums.begin(), nums.end());
return diff;
}
| int main() {
assert(func0({1,2,3,4}) == 3);
assert(func0({4,5,12}) == 8);
assert(func0({9,2,3}) == 7);
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %r12
push %rbx
sub $0x30,%rsp
mov %rdi,-0x38(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x38(%rbp),%rax
mov %rax,%rdi
callq 16f0 <_ZNKSt6vectorIiSaIiEE3endEv>
mov %rax,%rbx
m... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push rbp
mov rbp, rsp
push r12
push rbx
sub rsp, 30h
mov [rbp+var_38], rdi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_38]
mov rdi, rax
call _ZNKSt6vectorIiSaIiEE3endEv; std::vector<int>::end(void)
mov rbx, rax... | long long func0(long long a1)
{
long long v1; // rbx
long long v2; // rax
long long v3; // r12
long long v4; // rax
long long v6; // [rsp+18h] [rbp-28h] BYREF
_QWORD v7[4]; // [rsp+20h] [rbp-20h] BYREF
v7[1] = __readfsqword(0x28u);
v1 = std::vector<int>::end(a1);
v2 = std::vector<int>::begin(a1);
... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R12
PUSH RBX
SUB RSP,0x30
MOV qword ptr [RBP + -0x38],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RDI,RAX
CALL 0x0010168e
MOV RBX,RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RDI,RAX
CALL 0x00101642
MOV RSI,RBX
MOV R... | /* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
int iVar1;
__normal_iterator _Var2;
__normal_iterator _Var3;
int4 extraout_var;
int *piVar4;
int4 extraout_var_00;
long in_FS_OFFSET;
int8 local_30;
int8 local_28;
long local_20;
local_20 = *(long *)(in_FS... |
2,349 | func0 |
#include <iostream>
#include <vector>
#include <algorithm>
#include <assert.h>
| int func0(const std::vector<int>& nums) {
int diff = *max_element(nums.begin(), nums.end()) - *min_element(nums.begin(), nums.end());
return diff;
}
| int main() {
assert(func0({1,2,3,4}) == 3);
assert(func0({4,5,12}) == 8);
assert(func0({9,2,3}) == 7);
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
mov 0x8(%rdi),%r8
mov (%rdi),%rcx
cmp %r8,%rcx
je 128f <_Z5func0RKSt6vectorIiSaIiEE+0x46>
lea 0x4(%rcx),%rdx
cmp %rdx,%r8
je 1297 <_Z5func0RKSt6vectorIiSaIiEE+0x4e>
mov %rdx,%rax
mov %rcx,%rsi
mov (%rax),%edi
cmp %edi,(%rsi... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
mov r8, [rdi+8]
mov rcx, [rdi]
cmp rcx, r8
jz short loc_1258
lea rdx, [rcx+4]
cmp r8, rdx
jz short loc_1254
mov rax, rdx
mov rsi, rcx
loc_1228:
mov edi, [rax]
cmp [rsi], edi
cmovl rsi, rax
add rax, 4
cmp rax, r8
jnz short l... | long long func0(int **a1)
{
int *v1; // r8
int *v2; // rcx
int *v3; // rdx
int *v4; // rax
int *v5; // rsi
int i; // eax
v1 = a1[1];
v2 = *a1;
if ( *a1 == v1 )
{
i = *v1;
v2 = a1[1];
}
else
{
v3 = v2 + 1;
if ( v1 == v2 + 1 )
{
i = *v2;
}
else
{
v4 ... | func0:
ENDBR64
MOV R8,qword ptr [RDI + 0x8]
MOV RCX,qword ptr [RDI]
CMP RCX,R8
JZ 0x00101258
LEA RDX,[RCX + 0x4]
CMP R8,RDX
JZ 0x00101254
MOV RAX,RDX
MOV RSI,RCX
LAB_00101228:
MOV EDI,dword ptr [RAX]
CMP dword ptr [RSI],EDI
CMOVL RSI,RAX
ADD RAX,0x4
CMP RAX,R8
JNZ 0x00101228
MOV EAX,dword ptr [RSI]
CMP R8,RDX
JZ 0x0010... | /* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
int *piVar1;
int iVar2;
int *piVar3;
int *piVar4;
int *piVar5;
int *piVar6;
piVar1 = *(int **)(param_1 + 8);
piVar4 = *(int **)param_1;
if (piVar4 == piVar1) {
iVar2 = *piVar1;
piVar4 = piVar1;
}
e... |
2,350 | func0 |
#include <iostream>
#include <vector>
#include <algorithm>
#include <assert.h>
| int func0(const std::vector<int>& nums) {
int diff = *max_element(nums.begin(), nums.end()) - *min_element(nums.begin(), nums.end());
return diff;
}
| int main() {
assert(func0({1,2,3,4}) == 3);
assert(func0({4,5,12}) == 8);
assert(func0({9,2,3}) == 7);
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
mov (%rdi),%rdx
mov 0x8(%rdi),%r8
xor %eax,%eax
mov (%rdx),%esi
cmp %rdx,%r8
je 1472 <_Z5func0RKSt6vectorIiSaIiEE+0x52>
add $0x4,%rdx
cmp %rdx,%r8
je 1472 <_Z5func0RKSt6vectorIiSaIiEE+0x52>
mov %rdx,%rcx
mov %esi,%eax
nopw ... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
mov r8, [rdi+8]
mov rdi, [rdi]
xor eax, eax
cmp rdi, r8
jz locret_1412
lea r9, [rdi+4]
cmp r8, r9
jz locret_1412
mov r10, r8
mov edx, [rdi]
mov rcx, r9
mov rsi, r9
sub r10, r9
and r10d, 4
mov eax, edx
jz short loc_13... | long long func0(int **a1)
{
int *v1; // r8
int *v2; // rdi
long long result; // rax
int *v4; // r9
int v5; // edx
int *v6; // rcx
int *v7; // rsi
int v8; // eax
v1 = a1[1];
v2 = *a1;
result = 0LL;
if ( v2 != v1 )
{
v4 = v2 + 1;
if ( v1 != v2 + 1 )
{
v5 = *v2;
v6 = v2 ... | func0:
ENDBR64
MOV R8,qword ptr [RDI + 0x8]
MOV RDI,qword ptr [RDI]
XOR EAX,EAX
CMP RDI,R8
JZ 0x00101412
LEA R9,[RDI + 0x4]
CMP R8,R9
JZ 0x00101412
MOV R10,R8
MOV EDX,dword ptr [RDI]
MOV RCX,R9
MOV RSI,R9
SUB R10,R9
AND R10D,0x4
MOV EAX,EDX
JZ 0x001013c0
MOV EAX,dword ptr [R9]
LEA RSI,[RDI + 0x8]
CMP EDX,EAX
CMOVGE EAX... | /* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
int iVar1;
int *piVar2;
int *piVar3;
int iVar4;
int *piVar5;
int iVar6;
int *piVar7;
piVar2 = *(int **)(param_1 + 8);
piVar3 = *(int **)param_1;
iVar4 = 0;
if ((piVar3 != piVar2) && (piVar5 = piVar3 + 1, p... |
2,351 | func0 |
#include <iostream>
#include <vector>
#include <algorithm>
#include <assert.h>
| int func0(const std::vector<int>& nums) {
int diff = *max_element(nums.begin(), nums.end()) - *min_element(nums.begin(), nums.end());
return diff;
}
| int main() {
assert(func0({1,2,3,4}) == 3);
assert(func0({4,5,12}) == 8);
assert(func0({9,2,3}) == 7);
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
mov 0x8(%rdi),%r11
mov (%rdi),%r8
xor %eax,%eax
mov (%r8),%edi
cmp %r8,%r11
je 15e8 <_Z5func0RKSt6vectorIiSaIiEE+0x1d8>
lea 0x4(%r8),%r9
cmp %r9,%r11
je 15f0 <_Z5func0RKSt6vectorIiSaIiEE+0x1e0>
lea -0x8(%r11),%rcx
push %rbx
... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
mov r10, [rdi+8]
mov rcx, [rdi]
xor eax, eax
cmp rcx, r10
jz locret_1548
lea r8, [rcx+4]
cmp r10, r8
jz locret_1548
lea r11, [r10-8]
push rbx
mov rdx, rcx
mov edi, [rcx]
sub r11, rcx
mov r9, r11
shr r9, 2
add r9, 1
cmp... | long long func0(signed int **a1)
{
signed int *v1; // r10
signed int *v2; // rcx
long long result; // rax
signed int *v4; // r8
signed int *v5; // rdx
signed int v6; // edi
unsigned long long v7; // r11
unsigned long long v8; // r9
signed int *v9; // rax
__m128i v10; // xmm0
__m128i v11; // xmm3
... | func0:
ENDBR64
MOV R10,qword ptr [RDI + 0x8]
MOV RCX,qword ptr [RDI]
XOR EAX,EAX
CMP RCX,R10
JZ 0x00101548
LEA R8,[RCX + 0x4]
CMP R10,R8
JZ 0x00101548
LEA R11,[R10 + -0x8]
PUSH RBX
MOV RDX,RCX
MOV EDI,dword ptr [RCX]
SUB R11,RCX
MOV R9,R11
SHR R9,0x2
ADD R9,0x1
CMP R11,0x8
JBE 0x00101549
MOV RSI,R9
MOVD XMM5,EDI
MOV RA... | /* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
uint *puVar1;
uint *puVar2;
uint *puVar3;
uint *puVar4;
uint *puVar5;
uint *puVar6;
uint *puVar7;
uint *puVar8;
uint *puVar9;
uint uVar10;
uint *puVar11;
uint *puVar12;
uint uVar13;
uint *puVar14;
ulo... |
2,352 | func0 | #include <vector>
#include <assert.h>
| std::vector<int> func0(int a, int b) {
std::vector<int> lists;
for (int i = a; i <= b; i++) {
int j = 1;
while (j * j <= i) {
if (j * j == i) {
lists.push_back(i);
}
j++;
}
}
return lists;
}
| int main() {
assert(func0(1, 30) == std::vector<int>({1, 4, 9, 16, 25}));
assert(func0(50, 100) == std::vector<int>({64, 81, 100}));
assert(func0(100, 200) == std::vector<int>({100, 121, 144, 169, 196}));
return 0;
}
| O0 | cpp | func0(int, int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x28,%rsp
mov %rdi,-0x28(%rbp)
mov %esi,-0x2c(%rbp)
mov %edx,-0x30(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x28(%rbp),%rax
mov %rax,%rdi
callq 1758 <_ZNSt6vectorIiSaIiEEC1Ev>
mov -0x2c(%rbp),%ea... | _Z5func0ii:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 28h
mov [rbp+var_28], rdi
mov [rbp+var_2C], esi
mov [rbp+var_30], edx
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_28]
mov rdi, rax
call _ZNSt6vectorIiSaIiEEC2Ev; std::vector<int>::vector... | long long func0(long long a1, int a2, int a3)
{
int i; // [rsp+10h] [rbp-20h] BYREF
int j; // [rsp+14h] [rbp-1Ch]
unsigned long long v7; // [rsp+18h] [rbp-18h]
v7 = __readfsqword(0x28u);
std::vector<int>::vector(a1);
for ( i = a2; a3 >= i; ++i )
{
for ( j = 1; j * j <= i; ++j )
{
if ( j * ... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x28
MOV qword ptr [RBP + -0x28],RDI
MOV dword ptr [RBP + -0x2c],ESI
MOV dword ptr [RBP + -0x30],EDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RDI,RAX
CALL 0x001017d2
MOV EAX,dword ptr [RBP + -0x2c]
MO... | /* func0(int, int) */
vector<int,std::allocator<int>> * func0(int param_1,int param_2)
{
int in_EDX;
int4 in_register_0000003c;
vector<int,std::allocator<int>> *this;
long in_FS_OFFSET;
int local_28;
int local_24;
long local_20;
this = (vector<int,std::allocator<int>> *)CONCAT44(in_register_0000003... |
2,353 | func0 | #include <vector>
#include <assert.h>
| std::vector<int> func0(int a, int b) {
std::vector<int> lists;
for (int i = a; i <= b; i++) {
int j = 1;
while (j * j <= i) {
if (j * j == i) {
lists.push_back(i);
}
j++;
}
}
return lists;
}
| int main() {
assert(func0(1, 30) == std::vector<int>({1, 4, 9, 16, 25}));
assert(func0(50, 100) == std::vector<int>({64, 81, 100}));
assert(func0(100, 200) == std::vector<int>({100, 121, 144, 169, 196}));
return 0;
}
| O1 | cpp | func0(int, int):
endbr64
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x10,%rsp
mov %rdi,%rbp
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi)
movq $0x0,0x10(%rdi)
mov %esi,0x4(%rsp)
cmp %edx,%esi
jg 1308 <_Z5func0ii+0xbf>
mov ... | _Z5func0ii:
endbr64
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 10h
mov r12, rdi
mov ebp, esi
mov r13d, edx
mov rax, fs:28h
mov [rsp+38h+var_30], rax
xor eax, eax
mov qword ptr [rdi], 0
mov qword ptr [rdi+8], 0
mov qword ptr [rdi+10h], 0
mov [rsp+38h+... | _QWORD * func0(_QWORD *a1, int a2, int a3)
{
int v3; // ebp
int v6; // ebx
int v7; // eax
int *v8; // rsi
int i; // [rsp+4h] [rbp-34h] BYREF
unsigned long long v10; // [rsp+8h] [rbp-30h]
v3 = a2;
v10 = __readfsqword(0x28u);
*a1 = 0LL;
a1[1] = 0LL;
a1[2] = 0LL;
for ( i = a2; v3 <= a3; i = v3 )
... | func0:
ENDBR64
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x10
MOV R12,RDI
MOV EBP,ESI
MOV R13D,EDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
MOV qword ptr [RDI],0x0
MOV qword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
MOV dword ptr [RSP + 0x4],ESI
MOV R14D,0x1
CMP ESI,EDX
... | /* func0(int, int) */
vector<int,std::allocator<int>> * func0(int param_1,int param_2)
{
int *piVar1;
int iVar2;
int iVar3;
int in_EDX;
int iVar4;
int4 in_register_0000003c;
vector<int,std::allocator<int>> *this;
long in_FS_OFFSET;
int local_34;
long local_30;
this = (vector<int,std::allocato... |
2,354 | func0 | #include <vector>
#include <assert.h>
| std::vector<int> func0(int a, int b) {
std::vector<int> lists;
for (int i = a; i <= b; i++) {
int j = 1;
while (j * j <= i) {
if (j * j == i) {
lists.push_back(i);
}
j++;
}
}
return lists;
}
| int main() {
assert(func0(1, 30) == std::vector<int>({1, 4, 9, 16, 25}));
assert(func0(50, 100) == std::vector<int>({64, 81, 100}));
assert(func0(100, 200) == std::vector<int>({100, 121, 144, 169, 196}));
return 0;
}
| O2 | cpp | func0(int, int):
endbr64
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x18,%rsp
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi)
movq $0x0,0x10(%rdi)
mov %esi,0x4(%rsp)
cmp %edx,%esi
jg 156b <_Z5func0ii+0xab>
mov %edx,%ebp
le... | _Z5func0ii:
endbr64
push r13
pxor xmm0, xmm0
mov r13d, edx
push r12
mov r12, rdi
push rbp
mov ebp, esi
push rbx
sub rsp, 18h
mov rax, fs:28h
mov [rsp+38h+var_30], rax
xor eax, eax
mov qword ptr [rdi+10h], 0
mov [rsp+38h+var_34], esi
movups xmmword ptr [rdi], xmm0
cmp ... | long long func0(long long a1, int a2, int a3)
{
int v4; // ebp
int v5; // ebx
int v6; // eax
int *v7; // rsi
int v9; // [rsp+0h] [rbp-34h] BYREF
unsigned long long v10; // [rsp+4h] [rbp-30h]
v4 = a2;
v10 = __readfsqword(0x28u);
*(_QWORD *)(a1 + 16) = 0LL;
v9 = a2;
*(_OWORD *)a1 = 0LL;
if ( a2 ... | func0:
ENDBR64
PUSH R13
PXOR XMM0,XMM0
MOV R13D,EDX
PUSH R12
MOV R12,RDI
PUSH RBP
MOV EBP,ESI
PUSH RBX
SUB RSP,0x18
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
MOV qword ptr [RDI + 0x10],0x0
MOV dword ptr [RSP + 0x4],ESI
MOVUPS xmmword ptr [RDI],XMM0
CMP ESI,EDX
JG 0x00101594
NOP dword ptr [RA... | /* func0(int, int) */
vector<int,std::allocator<int>> * func0(int param_1,int param_2)
{
int *piVar1;
int iVar2;
int iVar3;
int in_EDX;
int iVar4;
int4 in_register_0000003c;
vector<int,std::allocator<int>> *this;
long in_FS_OFFSET;
int local_34;
long local_30;
this = (vector<int,std::allocato... |
2,355 | func0 | #include <vector>
#include <assert.h>
| std::vector<int> func0(int a, int b) {
std::vector<int> lists;
for (int i = a; i <= b; i++) {
int j = 1;
while (j * j <= i) {
if (j * j == i) {
lists.push_back(i);
}
j++;
}
}
return lists;
}
| int main() {
assert(func0(1, 30) == std::vector<int>({1, 4, 9, 16, 25}));
assert(func0(50, 100) == std::vector<int>({64, 81, 100}));
assert(func0(100, 200) == std::vector<int>({100, 121, 144, 169, 196}));
return 0;
}
| O3 | cpp | func0(int, int):
endbr64
push %r13
pxor %xmm0,%xmm0
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x18,%rsp
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
movq $0x0,0x10(%rdi)
mov %esi,0x4(%rsp)
movups %xmm0,(%rdi)
cmp %edx,%esi
jg 153b <_Z5func0ii+0x9b>
mov %edx,%ebp
lea ... | _Z5func0ii:
endbr64
push r13
pxor xmm0, xmm0
mov r13d, edx
push r12
mov r12, rdi
push rbp
mov ebp, esi
push rbx
sub rsp, 18h
mov rax, fs:28h
mov [rsp+38h+var_30], rax
xor eax, eax
mov qword ptr [rdi+10h], 0
mov [rsp+38h+var_34], esi
movups xmmword ptr [rdi], xmm0
cmp ... | long long func0(long long a1, int a2, int a3)
{
int v4; // ebp
int v5; // ebx
int v6; // eax
int *v7; // rsi
int v9; // [rsp+0h] [rbp-34h] BYREF
unsigned long long v10; // [rsp+4h] [rbp-30h]
v4 = a2;
v10 = __readfsqword(0x28u);
*(_QWORD *)(a1 + 16) = 0LL;
v9 = a2;
*(_OWORD *)a1 = 0LL;
if ( a2 ... | func0:
ENDBR64
PUSH R13
PXOR XMM0,XMM0
MOV R13D,EDX
PUSH R12
MOV R12,RDI
PUSH RBP
MOV EBP,ESI
PUSH RBX
SUB RSP,0x18
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
MOV qword ptr [RDI + 0x10],0x0
MOV dword ptr [RSP + 0x4],ESI
MOVUPS xmmword ptr [RDI],XMM0
CMP ESI,EDX
JG 0x00101594
NOP dword ptr [RA... | /* func0(int, int) */
vector<int,std::allocator<int>> * func0(int param_1,int param_2)
{
int *piVar1;
int iVar2;
int iVar3;
int in_EDX;
int iVar4;
int4 in_register_0000003c;
vector<int,std::allocator<int>> *this;
long in_FS_OFFSET;
int local_34;
long local_30;
this = (vector<int,std::allocato... |
2,356 | func0 |
#include <complex>
#include <cmath>
#include <cassert>
| std::pair<std::pair<double, double>, std::complex<double>> func0(double x, double y) {
std::complex<double> cn(x, y);
double magnitude = std::abs(cn);
double angle = std::arg(cn);
std::complex<double> cn1 = std::polar(2.0, M_PI);
return {{magnitude, angle}, cn1};
}
| int main() {
assert(func0(3, 4) == std::make_pair(std::make_pair(5.0, 0.9272952180016122), std::complex<double>(-2, 2.4492935982947064e-16)));
assert(func0(4, 7) == std::make_pair(std::make_pair(8.06225774829855, 1.0516502125483738), std::complex<double>(-2, 2.4492935982947064e-16)));
assert(func0(15, 17... | O0 | cpp | func0(double, double):
endbr64
push %rbp
mov %rsp,%rbp
add $0xffffffffffffff80,%rsp
mov %rdi,-0x68(%rbp)
movsd %xmm0,-0x70(%rbp)
movsd %xmm1,-0x78(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x8(%rbp)
xor %eax,%eax
movsd -0x78(%rbp),%xmm0
mov -0x70(%rbp),%rdx
lea -0x40(%rbp),%rax
movapd %xmm0,%xmm1
m... | _Z5func0dd:
endbr64
push rbp
mov rbp, rsp
add rsp, 0FFFFFFFFFFFFFF80h
mov [rbp+var_68], rdi
movsd [rbp+var_70], xmm0
movsd [rbp+var_78], xmm1
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
movsd xmm0, [rbp+var_78]
mov rdx, [rbp+var_70]
lea rax, [rbp+var_40]
movapd xmm1, xmm0... | long long func0(double a1, double a2, long long a3)
{
double v4; // [rsp+28h] [rbp-58h] BYREF
double v5; // [rsp+30h] [rbp-50h] BYREF
long long v6; // [rsp+38h] [rbp-48h] BYREF
_BYTE v7[16]; // [rsp+40h] [rbp-40h] BYREF
_QWORD v8[2]; // [rsp+50h] [rbp-30h] BYREF
_QWORD v9[4]; // [rsp+60h] [rbp-20h] BYREF
... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
ADD RSP,-0x80
MOV qword ptr [RBP + -0x68],RDI
MOVSD qword ptr [RBP + -0x70],XMM0
MOVSD qword ptr [RBP + -0x78],XMM1
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
MOVSD XMM0,qword ptr [RBP + -0x78]
MOV RDX,qword ptr [RBP + -0x70]
LEA RAX,[RBP + -0x40]
MOVAPD X... | /* func0(double, double) */
pair<std::pair<double,double>,std::complex<double>> * func0(double param_1,double param_2)
{
pair<std::pair<double,double>,std::complex<double>> *in_RDI;
long in_FS_OFFSET;
double local_60;
double local_58;
int8 local_50;
complex<double> local_48 [16];
int8 local_38;
double... |
2,357 | func0 |
#include <complex>
#include <cmath>
#include <cassert>
| std::pair<std::pair<double, double>, std::complex<double>> func0(double x, double y) {
std::complex<double> cn(x, y);
double magnitude = std::abs(cn);
double angle = std::arg(cn);
std::complex<double> cn1 = std::polar(2.0, M_PI);
return {{magnitude, angle}, cn1};
}
| int main() {
assert(func0(3, 4) == std::make_pair(std::make_pair(5.0, 0.9272952180016122), std::complex<double>(-2, 2.4492935982947064e-16)));
assert(func0(4, 7) == std::make_pair(std::make_pair(8.06225774829855, 1.0516502125483738), std::complex<double>(-2, 2.4492935982947064e-16)));
assert(func0(15, 17... | O1 | cpp | func0(double, double):
endbr64
push %rbp
push %rbx
sub $0x18,%rsp
mov %rdi,%rbx
movsd %xmm0,(%rsp)
movsd %xmm1,0x8(%rsp)
callq 10b0 <cabs@plt>
movq %xmm0,%rbp
movsd (%rsp),%xmm1
movsd 0x8(%rsp),%xmm0
callq 10a0 <atan2@plt>
mov %rbp,(%rbx)
movsd %xmm0,0x8(%rbx)
movsd 0xe1d(%rip),%xmm0
movsd %xmm0... | _Z5func0dd:
endbr64
push rbp
push rbx
sub rsp, 18h
mov rbx, rdi
movsd [rsp+28h+x], xmm0
movsd [rsp+28h+y], xmm1
call _cabs
movq rbp, xmm0
movsd xmm1, [rsp+28h+x]; x
movsd xmm0, [rsp+28h+y]; y
call _atan2
mov [rbx], rbp
movsd qword ptr [rbx+8], xmm0
movsd xmm0, cs:qword_2008
movsd ... | long long func0(double a1, double a2, long long a3)
{
double v3; // rbp
double v4; // xmm0_8
v3 = cabs();
v4 = atan2(a2, a1);
*(double *)a3 = v3;
*(double *)(a3 + 8) = v4;
*(_QWORD *)(a3 + 16) = 0xC000000000000000LL;
*(_QWORD *)(a3 + 24) = 0x3CB1A62633145C07LL;
return a3;
} | func0:
ENDBR64
PUSH RBP
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
MOVSD qword ptr [RSP],XMM0
MOVSD qword ptr [RSP + 0x8],XMM1
CALL 0x001010b0
MOVQ RBP,XMM0
MOVSD XMM1,qword ptr [RSP]
MOVSD XMM0,qword ptr [RSP + 0x8]
CALL 0x001010a0
MOV qword ptr [RBX],RBP
MOVSD qword ptr [RBX + 0x8],XMM0
MOVSD XMM0,qword ptr [0x00102008]
MOVSD... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(double, double) */
void func0(double param_1,double param_2)
{
double *in_RDI;
double dVar1;
double dVar2;
dVar1 = cabs(param_1);
dVar2 = atan2(param_2,param_1);
*in_RDI = dVar1;
in_RDI[1] = dVar2;
in_RDI[... |
2,358 | func0 |
#include <complex>
#include <cmath>
#include <cassert>
| std::pair<std::pair<double, double>, std::complex<double>> func0(double x, double y) {
std::complex<double> cn(x, y);
double magnitude = std::abs(cn);
double angle = std::arg(cn);
std::complex<double> cn1 = std::polar(2.0, M_PI);
return {{magnitude, angle}, cn1};
}
| int main() {
assert(func0(3, 4) == std::make_pair(std::make_pair(5.0, 0.9272952180016122), std::complex<double>(-2, 2.4492935982947064e-16)));
assert(func0(4, 7) == std::make_pair(std::make_pair(8.06225774829855, 1.0516502125483738), std::complex<double>(-2, 2.4492935982947064e-16)));
assert(func0(15, 17... | O2 | cpp | func0(double, double):
endbr64
push %r12
mov %rdi,%r12
sub $0x20,%rsp
movsd %xmm1,0x10(%rsp)
movsd %xmm0,0x18(%rsp)
callq 10b0 <cabs@plt>
movsd 0x18(%rsp),%xmm3
movsd 0x10(%rsp),%xmm2
movsd %xmm0,0x8(%rsp)
movapd %xmm3,%xmm1
movapd %xmm2,%xmm0
callq 10a0 <atan2@plt>
movsd 0x8(%rsp),%xmm4
mov %r12,%ra... | _Z5func0dd:
endbr64
push rbx
mov rbx, rdi
sub rsp, 20h
movsd [rsp+28h+y], xmm1
movsd [rsp+28h+x], xmm0
call _cabs
movsd xmm4, [rsp+28h+x]
movsd xmm3, [rsp+28h+y]
movsd [rsp+28h+var_20], xmm0
movapd xmm1, xmm4; x
movapd xmm0, xmm3; y
call _atan2
movsd xmm2, [rsp+28h+var_20]
mov rax, rb... | long long func0(double a1, double a2, long long a3)
{
__m128d v3; // xmm0
long long result; // rax
double v5; // [rsp+8h] [rbp-20h]
v5 = cabs();
v3 = (__m128d)*(unsigned long long *)&a2;
v3.m128d_f64[0] = atan2(a2, a1);
result = a3;
*(__m128d *)a3 = _mm_unpacklo_pd((__m128d)*(unsigned long long *)&v5,... | func0:
ENDBR64
PUSH RBX
MOV RBX,RDI
SUB RSP,0x20
MOVSD qword ptr [RSP + 0x10],XMM1
MOVSD qword ptr [RSP + 0x18],XMM0
CALL 0x001010b0
MOVSD XMM4,qword ptr [RSP + 0x18]
MOVSD XMM3,qword ptr [RSP + 0x10]
MOVSD qword ptr [RSP + 0x8],XMM0
MOVAPD XMM1,XMM4
MOVAPD XMM0,XMM3
CALL 0x001010a0
MOVSD XMM2,qword ptr [RSP + 0x8]
MOV... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(double, double) */
void func0(double param_1,double param_2)
{
double *in_RDI;
double dVar1;
double dVar2;
dVar1 = cabs(param_1);
dVar2 = atan2(param_2,param_1);
*in_RDI = dVar1;
in_RDI[1] = dVar2;
in_RDI[... |
2,359 | func0 |
#include <complex>
#include <cmath>
#include <cassert>
| std::pair<std::pair<double, double>, std::complex<double>> func0(double x, double y) {
std::complex<double> cn(x, y);
double magnitude = std::abs(cn);
double angle = std::arg(cn);
std::complex<double> cn1 = std::polar(2.0, M_PI);
return {{magnitude, angle}, cn1};
}
| int main() {
assert(func0(3, 4) == std::make_pair(std::make_pair(5.0, 0.9272952180016122), std::complex<double>(-2, 2.4492935982947064e-16)));
assert(func0(4, 7) == std::make_pair(std::make_pair(8.06225774829855, 1.0516502125483738), std::complex<double>(-2, 2.4492935982947064e-16)));
assert(func0(15, 17... | O3 | cpp | func0(double, double):
endbr64
push %r12
mov %rdi,%r12
sub $0x20,%rsp
movsd %xmm1,0x10(%rsp)
movsd %xmm0,0x18(%rsp)
callq 10b0 <cabs@plt>
movsd 0x18(%rsp),%xmm4
movsd 0x10(%rsp),%xmm3
movsd %xmm0,0x8(%rsp)
movapd %xmm4,%xmm1
movapd %xmm3,%xmm0
callq 10a0 <atan2@plt>
movsd 0x8(%rsp),%xmm2
mov %r12,%ra... | _Z5func0dd:
endbr64
push rbx
mov rbx, rdi
sub rsp, 20h
movsd [rsp+28h+y], xmm1
movsd [rsp+28h+x], xmm0
call _cabs
movsd xmm4, [rsp+28h+x]
movsd xmm3, [rsp+28h+y]
movsd [rsp+28h+var_20], xmm0
movapd xmm1, xmm4; x
movapd xmm0, xmm3; y
call _atan2
movsd xmm2, [rsp+28h+var_20]
mov rax, rb... | long long func0(double a1, double a2, long long a3)
{
__m128d v3; // xmm0
long long result; // rax
double v5; // [rsp+8h] [rbp-20h]
v5 = cabs();
v3 = (__m128d)*(unsigned long long *)&a2;
v3.m128d_f64[0] = atan2(a2, a1);
result = a3;
*(__m128d *)a3 = _mm_unpacklo_pd((__m128d)*(unsigned long long *)&v5,... | func0:
ENDBR64
PUSH RBX
MOV RBX,RDI
SUB RSP,0x20
MOVSD qword ptr [RSP + 0x10],XMM1
MOVSD qword ptr [RSP + 0x18],XMM0
CALL 0x001010b0
MOVSD XMM4,qword ptr [RSP + 0x18]
MOVSD XMM3,qword ptr [RSP + 0x10]
MOVSD qword ptr [RSP + 0x8],XMM0
MOVAPD XMM1,XMM4
MOVAPD XMM0,XMM3
CALL 0x001010a0
MOVSD XMM2,qword ptr [RSP + 0x8]
MOV... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(double, double) */
void func0(double param_1,double param_2)
{
double *in_RDI;
double dVar1;
double dVar2;
dVar1 = cabs(param_1);
dVar2 = atan2(param_2,param_1);
*in_RDI = dVar1;
in_RDI[1] = dVar2;
in_RDI[... |
2,360 | func0 |
#include <vector>
#include <cassert>
| std::vector<int> func0(std::vector<int> newList) {
int size = newList.size();
int temp = newList[0];
newList[0] = newList[size - 1];
newList[size - 1] = temp;
return newList;
}
| int main() {
assert((func0({12, 35, 9, 56, 24}) == std::vector<int>{24, 35, 9, 56, 12}));
assert((func0({1, 2, 3}) == std::vector<int>{3, 2, 1}));
assert((func0({4, 5, 6}) == std::vector<int>{6, 5, 4}));
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> >):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x28,%rsp
mov %rdi,-0x28(%rbp)
mov %rsi,-0x30(%rbp)
mov -0x30(%rbp),%rax
mov %rax,%rdi
callq 1970 <_ZNKSt6vectorIiSaIiEE4sizeEv>
mov %eax,-0x18(%rbp)
mov -0x30(%rbp),%rax
mov $0x0,%esi
mov %r... | _Z5func0St6vectorIiSaIiEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 28h
mov [rbp+var_28], rdi
mov [rbp+var_30], rsi
mov rax, [rbp+var_30]
mov rdi, rax
call _ZNKSt6vectorIiSaIiEE4sizeEv; std::vector<int>::size(void)
mov [rbp+var_18], eax
mov rax, [rbp+var_30]
mov esi, ... | long long func0(long long a1, long long a2)
{
int v2; // ebx
int v4; // [rsp+18h] [rbp-18h]
int v5; // [rsp+1Ch] [rbp-14h]
v4 = std::vector<int>::size(a2);
v5 = *(_DWORD *)std::vector<int>::operator[](a2, 0LL);
v2 = *(_DWORD *)std::vector<int>::operator[](a2, v4 - 1);
*(_DWORD *)std::vector<int>::operat... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x28
MOV qword ptr [RBP + -0x28],RDI
MOV qword ptr [RBP + -0x30],RSI
MOV RAX,qword ptr [RBP + -0x30]
MOV RDI,RAX
CALL 0x001019de
MOV dword ptr [RBP + -0x18],EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV ESI,0x0
MOV RDI,RAX
CALL 0x00101a06
MOV EAX,dword ptr [RAX]
MOV dword ... | /* func0(std::vector<int, std::allocator<int> >) */
vector<int,std::allocator<int>> * func0(vector param_1)
{
int4 uVar1;
int4 uVar2;
int iVar3;
int4 *puVar4;
vector<int,std::allocator<int>> *in_RSI;
int4 in_register_0000003c;
iVar3 = std::vector<int,std::allocator<int>>::size(in_RSI);
puVar4 = (in... |
2,361 | func0 |
#include <vector>
#include <cassert>
| std::vector<int> func0(std::vector<int> newList) {
int size = newList.size();
int temp = newList[0];
newList[0] = newList[size - 1];
newList[size - 1] = temp;
return newList;
}
| int main() {
assert((func0({12, 35, 9, 56, 24}) == std::vector<int>{24, 35, 9, 56, 12}));
assert((func0({1, 2, 3}) == std::vector<int>{3, 2, 1}));
assert((func0({4, 5, 6}) == std::vector<int>{6, 5, 4}));
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> >):
endbr64
mov %rdi,%rax
mov (%rsi),%rcx
mov (%rcx),%edi
mov 0x8(%rsi),%rdx
sub %rcx,%rdx
sar $0x2,%rdx
sub $0x1,%edx
movslq %edx,%rdx
lea (%rcx,%rdx,4),%rdx
mov (%rdx),%r8d
mov %r8d,(%rcx)
mov %edi,(%rdx)
mov %rcx,(%rax)
mov 0x8(%rsi),%... | _Z5func0St6vectorIiSaIiEE:
endbr64
mov rax, rdi
mov rcx, [rsi]
mov edi, [rcx]
mov rdx, [rsi+8]
sub rdx, rcx
sar rdx, 2
sub edx, 1
movsxd rdx, edx
mov r8d, [rcx+rdx*4]
mov [rcx], r8d
mov rcx, [rsi]
mov [rcx+rdx*4], edi
mov rdx, [rsi]
mov [rax], rdx
mov rdx, [rsi+8... | int ** func0(int **a1, int **a2)
{
int **result; // rax
int v3; // edi
int v4; // edx
result = a1;
v3 = **a2;
v4 = a2[1] - *a2 - 1;
**a2 = (*a2)[v4];
(*a2)[v4] = v3;
*result = *a2;
result[1] = a2[1];
result[2] = a2[2];
a2[2] = 0LL;
a2[1] = 0LL;
*a2 = 0LL;
return result;
} | func0:
ENDBR64
MOV RAX,RDI
MOV RCX,qword ptr [RSI]
MOV EDI,dword ptr [RCX]
MOV RDX,qword ptr [RSI + 0x8]
SUB RDX,RCX
SAR RDX,0x2
SUB EDX,0x1
MOVSXD RDX,EDX
MOV R8D,dword ptr [RCX + RDX*0x4]
MOV dword ptr [RCX],R8D
MOV RCX,qword ptr [RSI]
MOV dword ptr [RCX + RDX*0x4],EDI
MOV RDX,qword ptr [RSI]
MOV qword ptr [RAX],RDX
... | /* func0(std::vector<int, std::allocator<int> >) */
void func0(vector param_1)
{
int4 uVar1;
int4 *puVar2;
long lVar3;
long *in_RSI;
int4 in_register_0000003c;
long *plVar4;
plVar4 = (long *)CONCAT44(in_register_0000003c,param_1);
puVar2 = (int4 *)*in_RSI;
uVar1 = *puVar2;
lVar3 = (long)((int)(... |
2,362 | func0 |
#include <vector>
#include <cassert>
| std::vector<int> func0(std::vector<int> newList) {
int size = newList.size();
int temp = newList[0];
newList[0] = newList[size - 1];
newList[size - 1] = temp;
return newList;
}
| int main() {
assert((func0({12, 35, 9, 56, 24}) == std::vector<int>{24, 35, 9, 56, 12}));
assert((func0({1, 2, 3}) == std::vector<int>{3, 2, 1}));
assert((func0({4, 5, 6}) == std::vector<int>{6, 5, 4}));
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> >):
endbr64
mov %rdi,%rax
mov 0x8(%rsi),%rdi
mov (%rsi),%rcx
mov %rdi,%rdx
mov (%rcx),%r8d
sub %rcx,%rdx
sar $0x2,%rdx
sub $0x1,%edx
movslq %edx,%rdx
lea (%rcx,%rdx,4),%rdx
mov (%rdx),%r9d
mov %r9d,(%rcx)
mov %r8d,(%rdx)
mov 0x10(%rsi),%r... | _Z5func0St6vectorIiSaIiEE:
endbr64
movdqu xmm0, xmmword ptr [rsi]
mov rax, rdi
movhlps xmm1, xmm0
movq rcx, xmm0
movq rdx, xmm1
mov edi, [rcx]
sub rdx, rcx
sar rdx, 2
sub edx, 1
movsxd rdx, edx
lea rdx, [rcx+rdx*4]
mov r8d, [rdx]
mov [rcx], r8d
mov [rdx], edi
mov rdx, [rs... | __m128 * func0(__m128 *a1, const __m128i *a2, double a3, __m128 a4)
{
__m128 v4; // xmm0
__m128 *result; // rax
int v6; // edi
_DWORD *v7; // rdx
long long v8; // rdx
v4 = (__m128)_mm_loadu_si128(a2);
result = a1;
v6 = *(_DWORD *)v4.m128_u64[0];
v7 = (_DWORD *)(v4.m128_u64[0] + 4LL * (int)(((long lon... | func0:
ENDBR64
MOVDQU XMM0,xmmword ptr [RSI]
MOV RAX,RDI
MOVHLPS XMM1,XMM0
MOVQ RCX,XMM0
MOVQ RDX,XMM1
MOV EDI,dword ptr [RCX]
SUB RDX,RCX
SAR RDX,0x2
SUB EDX,0x1
MOVSXD RDX,EDX
LEA RDX,[RCX + RDX*0x4]
MOV R8D,dword ptr [RDX]
MOV dword ptr [RCX],R8D
MOV dword ptr [RDX],EDI
MOV RDX,qword ptr [RSI + 0x10]
MOVUPS xmmword ... | /* func0(std::vector<int, std::allocator<int> >) */
void func0(int8 *param_1,int (*param_2) [16])
{
int4 uVar1;
int8 uVar2;
int4 *puVar3;
long lVar4;
puVar3 = *(int4 **)*param_2;
lVar4 = *(long *)(*param_2 + 8);
uVar1 = *puVar3;
*puVar3 = puVar3[(int)(lVar4 - (long)puVar3 >> 2) + -1];
puVar3[(int... |
2,363 | func0 |
#include <vector>
#include <cassert>
| std::vector<int> func0(std::vector<int> newList) {
int size = newList.size();
int temp = newList[0];
newList[0] = newList[size - 1];
newList[size - 1] = temp;
return newList;
}
| int main() {
assert((func0({12, 35, 9, 56, 24}) == std::vector<int>{24, 35, 9, 56, 12}));
assert((func0({1, 2, 3}) == std::vector<int>{3, 2, 1}));
assert((func0({4, 5, 6}) == std::vector<int>{6, 5, 4}));
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> >):
endbr64
mov (%rsi),%rcx
mov 0x8(%rsi),%rdx
mov %rdi,%rax
pxor %xmm0,%xmm0
movdqu (%rsi),%xmm1
sub %rcx,%rdx
mov (%rcx),%edi
sar $0x2,%rdx
sub $0x1,%edx
movslq %edx,%rdx
lea (%rcx,%rdx,4),%rdx
mov (%rdx),%r8d
mov %r8d,(%rcx)
mov %edi,(%rdx... | _Z5func0St6vectorIiSaIiEE:
endbr64
movdqu xmm0, xmmword ptr [rsi]
mov rax, rdi
movhlps xmm1, xmm0
movq rcx, xmm0
movq rdx, xmm1
mov edi, [rcx]
sub rdx, rcx
sar rdx, 2
sub edx, 1
movsxd rdx, edx
lea rdx, [rcx+rdx*4]
mov r8d, [rdx]
mov [rcx], r8d
mov [rdx], edi
mov rdx, [rs... | __m128 * func0(__m128 *a1, const __m128i *a2, double a3, __m128 a4)
{
__m128 v4; // xmm0
__m128 *result; // rax
int v6; // edi
_DWORD *v7; // rdx
long long v8; // rdx
v4 = (__m128)_mm_loadu_si128(a2);
result = a1;
v6 = *(_DWORD *)v4.m128_u64[0];
v7 = (_DWORD *)(v4.m128_u64[0] + 4LL * (int)(((long lon... | func0:
ENDBR64
MOVDQU XMM0,xmmword ptr [RSI]
MOV RAX,RDI
MOVHLPS XMM1,XMM0
MOVQ RCX,XMM0
MOVQ RDX,XMM1
MOV EDI,dword ptr [RCX]
SUB RDX,RCX
SAR RDX,0x2
SUB EDX,0x1
MOVSXD RDX,EDX
LEA RDX,[RCX + RDX*0x4]
MOV R8D,dword ptr [RDX]
MOV dword ptr [RCX],R8D
MOV dword ptr [RDX],EDI
MOV RDX,qword ptr [RSI + 0x10]
MOVUPS xmmword ... | /* func0(std::vector<int, std::allocator<int> >) */
void func0(int8 *param_1,int (*param_2) [16])
{
int4 uVar1;
int8 uVar2;
int4 *puVar3;
long lVar4;
puVar3 = *(int4 **)*param_2;
lVar4 = *(long *)(*param_2 + 8);
uVar1 = *puVar3;
*puVar3 = puVar3[(int)(lVar4 - (long)puVar3 >> 2) + -1];
puVar3[(int... |
2,364 | func0 |
#include <vector>
#include <cassert>
| int func0(int n) {
int k = n - 1;
n = n * 2;
std::vector<int> C(k + 1, 0);
C[0] = 1; // nC0 is 1
for (int i = 1; i <= n; i++) {
for (int j = std::min(i, k); j > 0; j--) {
C[j] = C[j] + C[j - 1];
}
}
return C[k];
}
| int main() {
assert(func0(3) == 15);
assert(func0(4) == 56);
assert(func0(1) == 1);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x48,%rsp
mov %edi,-0x44(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x44(%rbp),%eax
sub $0x1,%eax
mov %eax,-0x3c(%rbp)
shll -0x44(%rbp)
lea -0x3d(%rbp),%rax
mov %rax,%rdi
callq 1438 <_ZNSaIiEC1Ev>
mov... | _Z5func0i:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 58h
mov [rbp+var_54], edi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov eax, [rbp+var_54]
sub eax, 1
mov [rbp+var_44], eax
shl [rbp+var_54], 1
lea rax, [rbp+var_45]
mov [rbp+var_38], rax
nop
nop
mov... | long long func0(int a1)
{
int v1; // ebx
int v2; // ebx
unsigned int v3; // ebx
char v5; // [rsp+1Bh] [rbp-45h] BYREF
int v6; // [rsp+1Ch] [rbp-44h] BYREF
int i; // [rsp+20h] [rbp-40h] BYREF
int j; // [rsp+24h] [rbp-3Ch]
char *v9; // [rsp+28h] [rbp-38h]
_BYTE v10[24]; // [rsp+30h] [rbp-30h] BYREF
u... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x58
MOV dword ptr [RBP + -0x54],EDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV EAX,dword ptr [RBP + -0x54]
SUB EAX,0x1
MOV dword ptr [RBP + -0x44],EAX
SHL dword ptr [RBP + -0x54],0x1
LEA RAX,[RBP + -0x45]
MOV qword ptr [RBP + -0x38],... | /* func0(int) */
int4 func0(int param_1)
{
int iVar1;
int iVar2;
int4 uVar3;
int4 *puVar4;
int *piVar5;
long in_FS_OFFSET;
allocator local_4d;
int local_4c;
int local_48;
int local_44;
allocator *local_40;
vector<int,std::allocator<int>> local_38 [24];
long local_20;
local_20 = *(long *... |
2,365 | func0 |
#include <vector>
#include <cassert>
| int func0(int n) {
int k = n - 1;
n = n * 2;
std::vector<int> C(k + 1, 0);
C[0] = 1; // nC0 is 1
for (int i = 1; i <= n; i++) {
for (int j = std::min(i, k); j > 0; j--) {
C[j] = C[j] + C[j - 1];
}
}
return C[k];
}
| int main() {
assert(func0(3) == 15);
assert(func0(4) == 56);
assert(func0(1) == 1);
return 0;
}
| O1 | cpp | func0(int):
endbr64
push %r12
push %rbp
push %rbx
lea -0x1(%rdi),%ebx
lea (%rdi,%rdi,1),%ebp
movslq %edi,%rdi
movabs $0x1fffffffffffffff,%rax
cmp %rax,%rdi
ja 120d <_Z5func0i+0x64>
test %rdi,%rdi
je 1255 <_Z5func0i+0xac>
lea 0x0(,%rdi,4),%r12
mov %r12,%rdi
callq 10b0 <_Znwm@plt>
lea (... | _Z5func0i:
endbr64
push r12
push rbp
push rbx
movsxd rbp, edi
mov rax, rbp
shr rax, 3Dh
jnz short loc_1203
mov r12d, edi
lea ebx, [rdi-1]
test rbp, rbp
jz loc_125F
shl rbp, 2
mov rdi, rbp; unsigned __int64
call __Znwm; operator new(ulong)
mov rdi, rax
lea rdx, [r... | long long func0(int a1)
{
unsigned long long v1; // rbp
int v3; // ebx
_DWORD *v4; // rax
_DWORD *v5; // rdi
_DWORD *v6; // rdx
int i; // esi
int v8; // edx
long long v9; // rcx
_DWORD *v10; // rax
long long v11; // rcx
unsigned int v12; // ebx
v1 = a1;
if ( (unsigned long long)a1 >> 61 )
... | func0:
ENDBR64
PUSH R12
PUSH RBP
PUSH RBX
MOVSXD RBP,EDI
MOV RAX,RBP
SHR RAX,0x3d
JNZ 0x00101203
MOV R12D,EDI
LEA EBX,[RDI + -0x1]
TEST RBP,RBP
JZ 0x0010125f
SHL RBP,0x2
MOV RDI,RBP
CALL 0x001010a0
MOV RDI,RAX
LEA RDX,[RAX + RBP*0x1]
LAB_001011df:
MOV dword ptr [RAX],0x0
ADD RAX,0x4
CMP RDX,RAX
JNZ 0x001011df
MOV dword... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(int) */
int4 func0(int param_1)
{
int4 uVar1;
int iVar2;
char *pcVar3;
char *pcVar4;
int *piVar5;
int iVar6;
int unaff_EBX;
ulong uVar7;
ulong in_R8;
char *in_R9;
bool bVar8;
uVar7 = (ulong)param_1... |
2,366 | func0 |
#include <vector>
#include <cassert>
| int func0(int n) {
int k = n - 1;
n = n * 2;
std::vector<int> C(k + 1, 0);
C[0] = 1; // nC0 is 1
for (int i = 1; i <= n; i++) {
for (int j = std::min(i, k); j > 0; j--) {
C[j] = C[j] + C[j - 1];
}
}
return C[k];
}
| int main() {
assert(func0(3) == 15);
assert(func0(4) == 56);
assert(func0(1) == 1);
return 0;
}
| O2 | cpp | func0(int):
endbr64
movabs $0x1fffffffffffffff,%rax
push %r12
push %rbp
lea (%rdi,%rdi,1),%ebp
push %rbx
lea -0x1(%rdi),%ebx
movslq %edi,%rdi
cmp %rax,%rdi
ja 1332 <_Z5func0i+0xe2>
test %rdi,%rdi
je 1325 <_Z5func0i+0xd5>
lea 0x0(,%rdi,4),%r12
mov %r12,%rdi
callq 10b0 <_Znwm@plt>
mov %... | _Z5func0i:
endbr64
push r12
push rbp
push rbx
movsxd rbx, edi
mov rax, rbx
shr rax, 3Dh
jnz loc_1344
test rbx, rbx
jz loc_1337
mov r12, rbx
lea ebp, [rbx-1]
shl rbx, 2
mov rdi, rbx; unsigned __int64
call __Znwm; operator new(ulong)
mov rdx, rbx; n
xor esi, esi; c... | long long func0(int a1)
{
int v1; // ebp
unsigned long long v2; // rbx
void *v3; // rax
char *v4; // rax
int v5; // r9d
int v6; // edi
char *v7; // r8
char *v8; // r10
int v9; // edx
long long v10; // rsi
char *v11; // rax
int v12; // ecx
long long v13; // rsi
int v14; // edx
unsigned int... | func0:
ENDBR64
PUSH R12
PUSH RBP
PUSH RBX
MOVSXD RBX,EDI
MOV RAX,RBX
SHR RAX,0x3d
JNZ 0x00101344
TEST RBX,RBX
JZ 0x00101337
MOV R12,RBX
LEA EBP,[RBX + -0x1]
SHL RBX,0x2
MOV RDI,RBX
CALL 0x001010c0
MOV RDX,RBX
XOR ESI,ESI
MOV RDI,RAX
CALL 0x001010a0
LEA R9D,[R12 + R12*0x1]
MOV EDI,0x1
MOV dword ptr [RAX],0x1
MOV R8,RAX
... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(int) */
ulong func0(int param_1)
{
int *piVar1;
uint uVar2;
code *pcVar3;
void *__s;
int4 *puVar4;
int *piVar5;
int *piVar6;
int iVar7;
int iVar8;
ulong uVar9;
ulong __n;
int iVar10;
bool bVar11;
... |
2,367 | func0 |
#include <vector>
#include <cassert>
| int func0(int n) {
int k = n - 1;
n = n * 2;
std::vector<int> C(k + 1, 0);
C[0] = 1; // nC0 is 1
for (int i = 1; i <= n; i++) {
for (int j = std::min(i, k); j > 0; j--) {
C[j] = C[j] + C[j - 1];
}
}
return C[k];
}
| int main() {
assert(func0(3) == 15);
assert(func0(4) == 56);
assert(func0(1) == 1);
return 0;
}
| O3 | cpp | func0(int):
endbr64
movabs $0x1fffffffffffffff,%rax
push %r12
push %rbp
lea (%rdi,%rdi,1),%ebp
push %rbx
lea -0x1(%rdi),%ebx
movslq %edi,%rdi
cmp %rax,%rdi
ja 1406 <_Z5func0i+0x196>
test %rdi,%rdi
je 13f9 <_Z5func0i+0x189>
lea 0x0(,%rdi,4),%r12
mov %r12,%rdi
callq 10d0 <_Znwm@plt>
mov ... | _Z5func0i:
endbr64
push r12
push rbp
push rbx
movsxd rbx, edi
mov rax, rbx
shr rax, 3Dh
jnz loc_13C9
test rbx, rbx
jz loc_13BC
mov r12, rbx
lea ebp, [rbx-1]
shl rbx, 2
mov rdi, rbx; unsigned __int64
call __Znwm; operator new(ulong)
xor esi, esi; c
mov rdx, rbx; n... | long long func0(int a1)
{
int v1; // ebp
unsigned long long v2; // rbx
void *v3; // rax
_DWORD *v4; // rax
int v5; // r8d
long long v6; // rsi
_DWORD *v7; // rdi
long long v8; // rdx
long long v9; // rax
long long v10; // r9
long long v11; // r10
long long v12; // rax
int v13; // ecx
int v1... | func0:
ENDBR64
PUSH R12
PUSH RBP
PUSH RBX
MOVSXD RBX,EDI
MOV RAX,RBX
SHR RAX,0x3d
JNZ 0x001013c9
TEST RBX,RBX
JZ 0x001013bc
MOV R12,RBX
LEA EBP,[RBX + -0x1]
SHL RBX,0x2
MOV RDI,RBX
CALL 0x001010c0
XOR ESI,ESI
MOV RDX,RBX
MOV RDI,RAX
CALL 0x001010a0
LEA R8D,[R12 + R12*0x1]
MOV ESI,0x1
MOV dword ptr [RAX],0x1
MOV RDI,RAX... | /* WARNING: Control flow encountered bad instruction data */
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(int) */
int4 func0(int param_1)
{
int *piVar1;
int *piVar2;
int *piVar3;
int8 uVar4;
int4 uVar5;
code *pcVar6;
int iVar7;
int iVar8;
int iVar9;
... |
2,368 | func0 |
#include <iostream>
#include <assert.h>
#include <regex>
#include <string>
| std::string func0(const std::string& ip){
std::regex pattern("\\.[0]*");
std::string result = std::regex_replace(ip, pattern, ".");
return result;
}
| int main() {
assert(func0("216.08.094.196") == "216.8.94.196");
assert(func0("12.01.024") == "12.1.24");
assert(func0("216.08.094.0196") == "216.8.94.196");
return 0;
}
| O0 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x48,%rsp
mov %rdi,-0x48(%rbp)
mov %rsi,-0x50(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
lea -0x40(%rbp),%rax
mov $0x10,%edx
lea ... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 48h
mov [rbp+var_48], rdi
mov [rbp+var_50], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_40]
mov edx, 10h
lea rcx, a0; "\\.[0]*"
mov ... | long long func0(long long a1, long long a2)
{
_BYTE v3[40]; // [rsp+10h] [rbp-40h] BYREF
unsigned long long v4; // [rsp+38h] [rbp-18h]
v4 = __readfsqword(0x28u);
std::basic_regex<char,std::regex_traits<char>>::basic_regex(v3, "\\.[0]*", 16LL);
std::regex_replace<std::regex_traits<char>,char,std::char_traits... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RBP + -0x48],RDI
MOV qword ptr [RBP + -0x50],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x40]
MOV EDX,0x10
LEA RCX,[0x134051]
MOV RSI,RCX
MOV RDI,RAX
LAB_00104b63:
CALL 0x00106152
MOV RAX,qword ptr ... | /* func0(std::string const&) */
string * func0(string *param_1)
{
int8 in_RSI;
long in_FS_OFFSET;
regex local_48 [40];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
std::regex::basic_regex(local_48,"\\.[0]*",0x10);
/* try { // try from 00104b84 to 00104b88 has its CatchH... |
2,369 | func0 |
#include <iostream>
#include <assert.h>
#include <regex>
#include <string>
| std::string func0(const std::string& ip){
std::regex pattern("\\.[0]*");
std::string result = std::regex_replace(ip, pattern, ".");
return result;
}
| int main() {
assert(func0("216.08.094.196") == "216.8.94.196");
assert(func0("12.01.024") == "12.1.24");
assert(func0("216.08.094.0196") == "216.8.94.196");
return 0;
}
| O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r13
push %r12
push %rbp
push %rbx
sub $0x48,%rsp
mov %rdi,%rbx
mov %rsi,%rbp
mov %fs:0x28,%rax
mov %rax,0x38(%rsp)
xor %eax,%eax
lea 0x8(%rsp),%r13
mov %r13,%rdi
callq 4730 <_ZNS... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r14
push r12
push rbx
sub rsp, 38h
mov rbx, rdi
mov r14, rsi
mov rax, fs:28h
mov [rbp+var_28], rax
xor eax, eax
lea r12, [rbp+var_50]
lea rdi, [rbp+var_48]; this
call __Z... | long long func0(long long a1, long long *a2)
{
long long v4; // rsi
_DWORD *v5; // rdi
volatile signed __int32 *v6; // rcx
long long v7; // rdx
signed __int32 v8; // eax
_BYTE v10[8]; // [rsp+0h] [rbp-50h] BYREF
_BYTE v11[8]; // [rsp+8h] [rbp-48h] BYREF
long long v12; // [rsp+10h] [rbp-40h]
long long... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV RBX,RDI
MOV R14,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
XOR EAX,EAX
LEA R12,[RBP + -0x50]
LEA RDI,[RBP + -0x48]
CALL 0x00104710
MOV qword ptr [RBP + -0x40],0x0
MOV qword ptr [RBP + -0x38],0x0
MOV ECX,0x10
LEA RDX,[0x... | /* func0(std::string const&) */
string * func0(string *param_1)
{
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
_Sp_counted_base<(_Lock_policy)2> *p_Var2;
int iVar3;
int8 *in_RSI;
long in_FS_OFFSET;
regex local_58 [8];
int local_50 [8];
int8 local_48;
_Sp_counted_base<(_Lock_policy)2> *local_40;
long... |
2,370 | func0 |
#include <iostream>
#include <assert.h>
#include <regex>
#include <string>
| std::string func0(const std::string& ip){
std::regex pattern("\\.[0]*");
std::string result = std::regex_replace(ip, pattern, ".");
return result;
}
| int main() {
assert(func0("216.08.094.196") == "216.8.94.196");
assert(func0("12.01.024") == "12.1.24");
assert(func0("216.08.094.0196") == "216.8.94.196");
return 0;
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
mov %rsi,%rbx
sub $0x40,%rsp
mov %fs:0x28,%rax
mov %rax,0x38(%rsp)
xor %eax,%eax
lea 0x8(%rsp),%rbp
lea 0x18(%rsp),%r13... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r14
mov r14, rsi
push r13
lea r13, [rbp+var_50]
push r12
lea r12, [rbp+var_48]
push rbx
mov rbx, rdi
mov rdi, r12; this
sub rsp, 30h
mov rax, fs:28h
mov [rbp+var_28], rax... | long long func0(long long a1, long long *a2)
{
long long v3; // rsi
long long v4; // rdi
long long v5; // rdx
volatile signed __int32 *v6; // rcx
signed __int32 v7; // eax
long long v9; // rax
_BYTE v10[8]; // [rsp+0h] [rbp-50h] BYREF
_BYTE v11[8]; // [rsp+8h] [rbp-48h] BYREF
__int128 v12; // [rsp+10... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R14
MOV R14,RSI
PUSH R13
LEA R13,[RBP + -0x50]
PUSH R12
LEA R12,[RBP + -0x48]
PUSH RBX
MOV RBX,RDI
MOV RDI,R12
SUB RSP,0x30
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
XOR EAX,EAX
CALL 0x001046f0
LEA RDX,[0x11a661]
PXOR XMM0,XMM0
MOV RDI,R13
MOV ECX,0x10
LEA RSI,... | /* func0(std::string const&) */
string * func0(string *param_1)
{
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
int8 uVar2;
int iVar3;
int8 *in_RSI;
long in_FS_OFFSET;
regex local_58 [8];
int local_50 [8];
int local_48 [24];
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
std::locale::... |
2,371 | func0 |
#include <iostream>
#include <assert.h>
#include <regex>
#include <string>
| std::string func0(const std::string& ip){
std::regex pattern("\\.[0]*");
std::string result = std::regex_replace(ip, pattern, ".");
return result;
}
| int main() {
assert(func0("216.08.094.196") == "216.8.94.196");
assert(func0("12.01.024") == "12.1.24");
assert(func0("216.08.094.0196") == "216.8.94.196");
return 0;
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
mov %rsi,%rbx
sub $0x40,%rsp
mov %fs:0x28,%rax
mov %rax,0x38(%rsp)
xor %eax,%eax
lea 0x8(%rsp),%rbp
lea 0x18(%rsp),%r13... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r15
push r14
lea r15, [rbp+var_E0]
push r13
push r12
mov r12, rsi
push rbx
mov rbx, rdi
sub rsp, 108h
mov rax, fs:28h
mov [rbp+var_38], rax
xor eax, eax
lea rax, [rbp+... | _QWORD * func0(_QWORD *a1, char **a2)
{
char *v3; // rax
long long v4; // r13
char *v5; // r15
char *v6; // r12
char v7; // al
long long v8; // rdx
long long v9; // rcx
long long v10; // r8
long long v11; // r9
unsigned long long v12; // rsi
long long v13; // rdi
volatile signed __int32 *v14; //... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
LEA R15,[RBP + -0xe0]
PUSH R13
PUSH R12
MOV R12,RSI
PUSH RBX
MOV RBX,RDI
SUB RSP,0x108
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x38],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0xd8]
MOV qword ptr [RBP + -0x128],R15
MOV RDI,RAX
MOV qword ptr [RBP + -0x130],RAX
CALL 0x... | /* func0(std::string const&) */
string * func0(string *param_1)
{
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
string sVar2;
string *psVar3;
long lVar4;
int8 uVar5;
bool bVar6;
char cVar7;
int iVar8;
int8 *puVar9;
string *psVar10;
long lVar11;
long *plVar12;
ulong uVar13;
ulong uVar14;
lon... |
2,372 | func0 |
#include <iostream>
#include <vector>
#include <cassert>
| int func0(const std::vector<int>& list1) {
int first_even = -1;
int first_odd = -1;
for(int el : list1) {
if(el % 2 == 0) {
first_even = el;
break;
}
}
for(int el : list1) {
if(el % 2 != 0) {
first_odd = el;
break;
... | int main() {
assert(func0({1,3,5,7,4,1,6,8}) == 3);
assert(func0({1,2,3,4,5,6,7,8,9,10}) == 1);
assert(func0({1,5,7,9,10}) == 9);
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x50,%rsp
mov %rdi,-0x48(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x8(%rbp)
xor %eax,%eax
movl $0xffffffff,-0x38(%rbp)
movl $0xffffffff,-0x34(%rbp)
mov -0x48(%rbp),%rax
mov %rax,-0x18(%rbp)
mov -0x18(%rb... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_48], rdi
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
mov [rbp+var_38], 0FFFFFFFFh
mov [rbp+var_34], 0FFFFFFFFh
mov rax, [rbp+var_48]
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
mov ... | long long func0(long long a1)
{
int v2; // [rsp+18h] [rbp-38h]
int v3; // [rsp+1Ch] [rbp-34h]
int v4; // [rsp+20h] [rbp-30h]
int v5; // [rsp+24h] [rbp-2Ch]
long long v6; // [rsp+28h] [rbp-28h] BYREF
_QWORD v7[2]; // [rsp+30h] [rbp-20h] BYREF
long long v8; // [rsp+40h] [rbp-10h]
unsigned long long v9; /... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x48],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
MOV dword ptr [RBP + -0x38],0xffffffff
MOV dword ptr [RBP + -0x34],0xffffffff
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -... | /* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
uint uVar1;
bool bVar2;
uint *puVar3;
long in_FS_OFFSET;
uint local_40;
uint local_3c;
int8 local_30;
int8 local_28;
vector<int,std::allocator<int>> *local_20;
vector<int,std::allocator<int>> *local_18;
long ... |
2,373 | func0 |
#include <iostream>
#include <vector>
#include <cassert>
| int func0(const std::vector<int>& list1) {
int first_even = -1;
int first_odd = -1;
for(int el : list1) {
if(el % 2 == 0) {
first_even = el;
break;
}
}
for(int el : list1) {
if(el % 2 != 0) {
first_odd = el;
break;
... | int main() {
assert(func0({1,3,5,7,4,1,6,8}) == 3);
assert(func0({1,2,3,4,5,6,7,8,9,10}) == 1);
assert(func0({1,5,7,9,10}) == 9);
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
mov (%rdi),%rdx
mov 0x8(%rdi),%rsi
cmp %rsi,%rdx
je 1288 <_Z5func0RKSt6vectorIiSaIiEE+0x3f>
mov %rdx,%rcx
mov (%rdx),%eax
test $0x1,%al
je 1270 <_Z5func0RKSt6vectorIiSaIiEE+0x27>
add $0x4,%rdx
cmp %rdx,%rsi
jne 125c <_Z5func... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
mov rdx, [rdi]
mov rsi, [rdi+8]
cmp rsi, rdx
jz short loc_1248
mov rcx, rdx
loc_121C:
mov eax, [rdx]
test al, 1
jz short loc_1230
add rdx, 4
cmp rsi, rdx
jnz short loc_121C
mov eax, 0FFFFFFFFh
loc_1230:
mov edx, [rcx]
test dl, ... | long long func0(int **a1)
{
int *v1; // rdx
int *v2; // rsi
int *v3; // rcx
int v4; // eax
int v5; // edx
v1 = *a1;
v2 = a1[1];
if ( v2 == *a1 )
{
v4 = -1;
v5 = -1;
}
else
{
v3 = *a1;
do
{
v4 = *v1;
if ( (*v1 & 1) == 0 )
goto LABEL_6;
++v1;
}
... | func0:
ENDBR64
MOV RDX,qword ptr [RDI]
MOV RSI,qword ptr [RDI + 0x8]
CMP RSI,RDX
JZ 0x00101248
MOV RCX,RDX
LAB_0010121c:
MOV EAX,dword ptr [RDX]
TEST AL,0x1
JZ 0x00101230
ADD RDX,0x4
CMP RSI,RDX
JNZ 0x0010121c
MOV EAX,0xffffffff
LAB_00101230:
MOV EDX,dword ptr [RCX]
TEST DL,0x1
JNZ 0x00101245
ADD RCX,0x4
CMP RSI,RCX
JN... | /* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
uint *puVar1;
uint uVar2;
uint *puVar3;
uint uVar4;
uint *puVar5;
puVar3 = *(uint **)param_1;
puVar1 = *(uint **)(param_1 + 8);
puVar5 = puVar3;
if (puVar1 == puVar3) {
uVar2 = 0xffffffff;
uVar4 = 0xff... |
2,374 | func0 |
#include <iostream>
#include <vector>
#include <cassert>
| int func0(const std::vector<int>& list1) {
int first_even = -1;
int first_odd = -1;
for(int el : list1) {
if(el % 2 == 0) {
first_even = el;
break;
}
}
for(int el : list1) {
if(el % 2 != 0) {
first_odd = el;
break;
... | int main() {
assert(func0({1,3,5,7,4,1,6,8}) == 3);
assert(func0({1,2,3,4,5,6,7,8,9,10}) == 1);
assert(func0({1,5,7,9,10}) == 9);
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
mov (%rdi),%rdx
mov 0x8(%rdi),%rsi
cmp %rsi,%rdx
je 15d4 <_Z5func0RKSt6vectorIiSaIiEE+0x54>
mov %rdx,%rcx
jmp 15a1 <_Z5func0RKSt6vectorIiSaIiEE+0x21>
nopl (%rax)
add $0x4,%rcx
cmp %rcx,%rsi
je 15c8 <_Z5func0RKSt6vectorIiSaIiEE+... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
mov rdx, [rdi]
mov rsi, [rdi+8]
cmp rsi, rdx
jz short loc_13E4
mov rcx, rdx
jmp short loc_13B1
loc_13A8:
add rcx, 4
cmp rsi, rcx
jz short loc_13D8
loc_13B1:
mov eax, [rcx]
test al, 1
jnz short loc_13A8
jmp short loc_13C9
loc_13C0:... | long long func0(int **a1)
{
int *v1; // rdx
int *v2; // rsi
int *v3; // rcx
int v4; // eax
v1 = *a1;
v2 = a1[1];
if ( v2 == *a1 )
return 0LL;
v3 = *a1;
while ( 1 )
{
v4 = *v3;
if ( (*v3 & 1) == 0 )
break;
if ( v2 == ++v3 )
{
v4 = -1;
goto LABEL_7;
}
}
... | func0:
ENDBR64
MOV RDX,qword ptr [RDI]
MOV RSI,qword ptr [RDI + 0x8]
CMP RSI,RDX
JZ 0x001013e4
MOV RCX,RDX
JMP 0x001013b1
LAB_001013a8:
ADD RCX,0x4
CMP RSI,RCX
JZ 0x001013d8
LAB_001013b1:
MOV EAX,dword ptr [RCX]
TEST AL,0x1
JNZ 0x001013a8
JMP 0x001013c9
LAB_001013c0:
ADD RDX,0x4
CMP RSI,RDX
JZ 0x001013e0
LAB_001013c9:
... | /* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
uint *puVar1;
uint uVar2;
uint *puVar3;
uint *puVar4;
puVar4 = *(uint **)param_1;
puVar1 = *(uint **)(param_1 + 8);
puVar3 = puVar4;
if (puVar1 == puVar4) {
return 0;
}
do {
uVar2 = *puVar3;
if (... |
2,375 | func0 |
#include <iostream>
#include <vector>
#include <cassert>
| int func0(const std::vector<int>& list1) {
int first_even = -1;
int first_odd = -1;
for(int el : list1) {
if(el % 2 == 0) {
first_even = el;
break;
}
}
for(int el : list1) {
if(el % 2 != 0) {
first_odd = el;
break;
... | int main() {
assert(func0({1,3,5,7,4,1,6,8}) == 3);
assert(func0({1,2,3,4,5,6,7,8,9,10}) == 1);
assert(func0({1,5,7,9,10}) == 9);
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
mov (%rdi),%rdx
mov 0x8(%rdi),%rsi
cmp %rsi,%rdx
je 1574 <_Z5func0RKSt6vectorIiSaIiEE+0x54>
mov %rdx,%rcx
jmp 1541 <_Z5func0RKSt6vectorIiSaIiEE+0x21>
nopl (%rax)
add $0x4,%rcx
cmp %rcx,%rsi
je 1568 <_Z5func0RKSt6vectorIiSaIiEE+... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
mov rdx, [rdi]
mov rsi, [rdi+8]
cmp rsi, rdx
jz short loc_14F4
mov rcx, rdx
jmp short loc_14C1
loc_14B8:
add rcx, 4
cmp rsi, rcx
jz short loc_14E8
loc_14C1:
mov eax, [rcx]
test al, 1
jnz short loc_14B8
jmp short loc_14D9
loc_14D0:... | long long func0(int **a1)
{
int *v1; // rdx
int *v2; // rsi
int *v3; // rcx
int v4; // eax
v1 = *a1;
v2 = a1[1];
if ( v2 == *a1 )
return 0LL;
v3 = *a1;
while ( 1 )
{
v4 = *v3;
if ( (*v3 & 1) == 0 )
break;
if ( v2 == ++v3 )
{
v4 = -1;
goto LABEL_7;
}
}
... | func0:
ENDBR64
MOV RDX,qword ptr [RDI]
MOV RSI,qword ptr [RDI + 0x8]
CMP RSI,RDX
JZ 0x001014f4
MOV RCX,RDX
JMP 0x001014c1
LAB_001014b8:
ADD RCX,0x4
CMP RSI,RCX
JZ 0x001014e8
LAB_001014c1:
MOV EAX,dword ptr [RCX]
TEST AL,0x1
JNZ 0x001014b8
JMP 0x001014d9
LAB_001014d0:
ADD RDX,0x4
CMP RSI,RDX
JZ 0x001014f0
LAB_001014d9:
... | /* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
uint *puVar1;
uint uVar2;
uint *puVar3;
uint *puVar4;
puVar4 = *(uint **)param_1;
puVar1 = *(uint **)(param_1 + 8);
puVar3 = puVar4;
if (puVar1 == puVar4) {
return 0;
}
do {
uVar2 = *puVar3;
if (... |
2,376 | func0 |
#include <string>
#include <assert.h>
| int func0(std::string str1, std::string str2) {
int count = 0;
for (int i = 0; i < str1.length(); i++) {
if (str1[i] != str2[i])
count++;
}
if (count % 2 == 0)
return count / 2;
else
return -1; // Using -1 to indicate "Not Possible"
}
| int main() {
assert(func0("1101", "1110") == 1);
assert(func0("111", "000") == -1);
assert(func0("111", "110") == -1);
return 0;
}
| O0 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x28,%rsp
mov %rdi,-0x28(%rbp)
mov %rsi,-0x30(%rbp)
movl $0x0,-0x18(%rbp)
movl $0x0,... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 28h
mov [rbp+var_28], rdi
mov [rbp+var_30], rsi
mov [rbp+var_18], 0
mov [rbp+var_14], 0
jmp short loc_13AF
loc_136E:
mov eax, [rbp+var_14]
movsxd rdx, eax
mov rax, ... | long long func0(long long a1, long long a2)
{
char v2; // bl
int v4; // [rsp+18h] [rbp-18h]
int i; // [rsp+1Ch] [rbp-14h]
v4 = 0;
for ( i = 0; i < (unsigned long long)std::string::length(a1); ++i )
{
v2 = *(_BYTE *)std::string::operator[](a1, i);
if ( v2 != *(_BYTE *)std::string::operator[](a2, i)... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x28
MOV qword ptr [RBP + -0x28],RDI
MOV qword ptr [RBP + -0x30],RSI
MOV dword ptr [RBP + -0x18],0x0
MOV dword ptr [RBP + -0x14],0x0
JMP 0x001013af
LAB_0010136e:
MOV EAX,dword ptr [RBP + -0x14]
MOVSXD RDX,EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RSI,RDX
MOV RDI,RAX
CA... | /* func0(std::string, std::string) */
int func0(ulong param_1,ulong param_2)
{
char cVar1;
int iVar2;
char *pcVar3;
ulong uVar4;
int4 local_20;
int4 local_1c;
local_20 = 0;
local_1c = 0;
while( true ) {
uVar4 = std::string::length();
if (uVar4 <= (ulong)(long)local_1c) break;
pcVar3 =... |
2,377 | func0 |
#include <string>
#include <assert.h>
| int func0(std::string str1, std::string str2) {
int count = 0;
for (int i = 0; i < str1.length(); i++) {
if (str1[i] != str2[i])
count++;
}
if (count % 2 == 0)
return count / 2;
else
return -1; // Using -1 to indicate "Not Possible"
}
| int main() {
assert(func0("1101", "1110") == 1);
assert(func0("111", "000") == -1);
assert(func0("111", "110") == -1);
return 0;
}
| O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
mov 0x8(%rdi),%r8
test %r8,%r8
je 124d <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_+0x44>
mov (%rdi),%rdi
mov ... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_:
endbr64
mov rcx, [rdi+8]
test rcx, rcx
jz short loc_1270
mov rdi, [rdi]
mov rsi, [rsi]
mov eax, 0
mov edx, 0
jmp short loc_1251
loc_1248:
add rax, 1
cmp rax, rcx
jz short loc_1261
loc_1251:
movzx r8d, byte pt... | long long func0(long long *a1, long long *a2)
{
long long v2; // rcx
long long v3; // rdi
long long v4; // rsi
long long v5; // rax
int v6; // edx
v2 = a1[1];
if ( !v2 )
{
v6 = 0;
return (unsigned int)(v6 / 2);
}
v3 = *a1;
v4 = *a2;
v5 = 0LL;
v6 = 0;
do
{
if ( *(_BYTE *)(v3 +... | func0:
ENDBR64
MOV RCX,qword ptr [RDI + 0x8]
TEST RCX,RCX
JZ 0x00101270
MOV RDI,qword ptr [RDI]
MOV RSI,qword ptr [RSI]
MOV EAX,0x0
MOV EDX,0x0
JMP 0x00101251
LAB_00101248:
ADD RAX,0x1
CMP RAX,RCX
JZ 0x00101261
LAB_00101251:
MOVZX R8D,byte ptr [RSI + RAX*0x1]
CMP byte ptr [RDI + RAX*0x1],R8B
JZ 0x00101248
ADD EDX,0x1
J... | /* func0(std::string, std::string) */
int func0(long *param_1,long *param_2)
{
long lVar1;
uint uVar2;
if (param_1[1] == 0) {
uVar2 = 0;
}
else {
lVar1 = 0;
uVar2 = 0;
do {
if (*(char *)(*param_1 + lVar1) != *(char *)(*param_2 + lVar1)) {
uVar2 = uVar2 + 1;
}
lVa... |
2,378 | func0 |
#include <string>
#include <assert.h>
| int func0(std::string str1, std::string str2) {
int count = 0;
for (int i = 0; i < str1.length(); i++) {
if (str1[i] != str2[i])
count++;
}
if (count % 2 == 0)
return count / 2;
else
return -1; // Using -1 to indicate "Not Possible"
}
| int main() {
assert(func0("1101", "1110") == 1);
assert(func0("111", "000") == -1);
assert(func0("111", "110") == -1);
return 0;
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
mov 0x8(%rdi),%r8
test %r8,%r8
je 1520 <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_+0x50>
mov (%rdi),%rdi
mov ... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_:
endbr64
mov rcx, [rdi+8]
test rcx, rcx
jz short loc_1460
mov rdi, [rdi]
mov rsi, [rsi]
xor eax, eax
xor edx, edx
nop word ptr [rax+rax+00000000h]
loc_1430:
movzx r8d, byte ptr [rsi+rax]
cmp [rdi+rax], r8b
jz shor... | long long func0(long long *a1, long long *a2)
{
long long v2; // rcx
long long v3; // rdi
long long v4; // rsi
long long v5; // rax
int v6; // edx
v2 = a1[1];
if ( !v2 )
return 0LL;
v3 = *a1;
v4 = *a2;
v5 = 0LL;
v6 = 0;
do
{
if ( *(_BYTE *)(v3 + v5) != *(_BYTE *)(v4 + v5) )
++v... | func0:
ENDBR64
MOV RCX,qword ptr [RDI + 0x8]
TEST RCX,RCX
JZ 0x00101460
MOV RDI,qword ptr [RDI]
MOV RSI,qword ptr [RSI]
XOR EAX,EAX
XOR EDX,EDX
NOP word ptr [RAX + RAX*0x1]
LAB_00101430:
MOVZX R8D,byte ptr [RSI + RAX*0x1]
CMP byte ptr [RDI + RAX*0x1],R8B
JZ 0x0010143e
ADD EDX,0x1
LAB_0010143e:
ADD RAX,0x1
CMP RCX,RAX
J... | /* func0(std::string, std::string) */
int func0(long *param_1,long *param_2)
{
long lVar1;
uint uVar2;
if (param_1[1] == 0) {
return 0;
}
lVar1 = 0;
uVar2 = 0;
do {
if (*(char *)(*param_1 + lVar1) != *(char *)(*param_2 + lVar1)) {
uVar2 = uVar2 + 1;
}
lVar1 = lVar1 + 1;
} whil... |
2,379 | func0 |
#include <string>
#include <assert.h>
| int func0(std::string str1, std::string str2) {
int count = 0;
for (int i = 0; i < str1.length(); i++) {
if (str1[i] != str2[i])
count++;
}
if (count % 2 == 0)
return count / 2;
else
return -1; // Using -1 to indicate "Not Possible"
}
| int main() {
assert(func0("1101", "1110") == 1);
assert(func0("111", "000") == -1);
assert(func0("111", "110") == -1);
return 0;
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
mov 0x8(%rdi),%r8
test %r8,%r8
je 1f50 <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_+0x2d0>
lea -0x1(%r8),%rax
m... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_:
endbr64
mov r8, [rdi+8]
test r8, r8
jz loc_1DA8
lea rax, [r8-1]
mov rdi, [rdi]
mov rcx, [rsi]
cmp rax, 0Eh
jbe loc_1DAB
mov rdx, r8
pxor xmm1, xmm1
pxor xmm5, xmm5
xor eax, eax
and rdx, 0FFFFFFFFFFFFFFF0h
... | long long func0(long long *a1, long long *a2)
{
unsigned long long v2; // r8
long long v3; // rdi
long long v4; // rcx
__m128i v5; // xmm1
long long v6; // rax
unsigned long long v7; // rdx
__m128i v8; // xmm0
__m128i v9; // xmm7
__m128i v10; // xmm0
__m128i v11; // xmm3
__m128i v12; // xmm2
__... | func0:
ENDBR64
MOV R8,qword ptr [RDI + 0x8]
TEST R8,R8
JZ 0x00101da8
LEA RAX,[R8 + -0x1]
MOV RDI,qword ptr [RDI]
MOV RCX,qword ptr [RSI]
CMP RAX,0xe
JBE 0x00101dab
MOV RDX,R8
PXOR XMM1,XMM1
PXOR XMM5,XMM5
XOR EAX,EAX
AND RDX,-0x10
PXOR XMM4,XMM4
NOP word ptr [RAX + RAX*0x1]
LAB_00101bb0:
MOVDQU XMM0,xmmword ptr [RDI + ... | /* func0(std::string, std::string) */
int func0(long *param_1,long *param_2)
{
char *pcVar1;
char *pcVar2;
int8 uVar3;
ulong uVar4;
long lVar5;
long lVar6;
bool bVar7;
bool bVar8;
bool bVar9;
bool bVar10;
bool bVar11;
bool bVar12;
bool bVar13;
bool bVar14;
int auVar15 [14];
int auVar16... |
2,380 | func0 |
#include <tuple>
#include <cassert>
template <typename T>
| size_t func0(const T& t) {
return sizeof(t);
}
| int main() {
assert(func0(std::make_tuple("A", 1, "B", 2, "C", 3)) == sizeof(std::make_tuple("A", 1, "B", 2, "C", 3)));
assert(func0(std::make_tuple(1, "Raju", 2, "Nikhil", 3, "Deepanshu")) == sizeof(std::make_tuple(1, "Raju", 2, "Nikhil", 3, "Deepanshu")));
assert(func0(std::make_tuple(std::make_tuple(1... | O0 | cpp | unsigned long func0<std::tuple<char const*, int, char const*, int, char const*, int> >(std::tuple<char const*, int, char const*, int, char const*, int> const&):
endbr64
push %rbp
mov %rsp,%rbp
mov %rdi,-0x8(%rbp)
mov $0x30,%eax
pop %rbp
retq
| ||||
2,381 | func0 |
#include <tuple>
#include <cassert>
template <typename T>
| size_t func0(const T& t) {
return sizeof(t);
}
| int main() {
assert(func0(std::make_tuple("A", 1, "B", 2, "C", 3)) == sizeof(std::make_tuple("A", 1, "B", 2, "C", 3)));
assert(func0(std::make_tuple(1, "Raju", 2, "Nikhil", 3, "Deepanshu")) == sizeof(std::make_tuple(1, "Raju", 2, "Nikhil", 3, "Deepanshu")));
assert(func0(std::make_tuple(std::make_tuple(1... | O1 | cpp |
Subsets and Splits
C++ Functions With Standard Library Dependencies
Identifies C++ functions that depend on standard library components, revealing patterns in how developers utilize STL libraries and potentially highlighting common coding practices or dependencies in the dataset.
C++ Standard Library Function Analysis
Filters C++ code examples that use standard library containers and types, providing useful insights into common programming patterns and data structures in the dataset.
Random Training Function Samples
Performs basic filtering and random sampling of assembly code data without revealing meaningful patterns or relationships.
Random Training Function Samples
Retrieves a random sample of 1000 records from the training dataset, providing basic data exploration but offering limited analytical value beyond seeing raw entries.