index int64 0 66.5k | func_name stringlengths 2 5.36k | func_dep stringlengths 16 2.19k | func stringlengths 8 55.3k | test stringlengths 0 7.07k | opt stringclasses 4
values | language stringclasses 2
values | asm stringlengths 0 45.4k | ida_asm stringlengths 0 44.7k | ida_pseudo stringlengths 0 44.3k | ghidra_asm stringlengths 0 49.1k | ghidra_pseudo stringlengths 0 64.7k |
|---|---|---|---|---|---|---|---|---|---|---|---|
1,482 | func0 |
#include <cassert>
#include <vector>
| int func0(const std::vector<int>& A, int left_element, int right_element) {
if (left_element > right_element) {
return left_element;
}
int mid = left_element + (right_element - left_element) / 2;
if (A[mid] == mid) {
return func0(A, mid + 1, right_element);
} else {
r... | int main() {
assert(func0({0, 1, 2, 3, 4, 5, 6}, 0, 6) == 7);
assert(func0({0, 1, 2, 6, 9, 11, 15}, 0, 6) == 3);
assert(func0({1, 2, 3, 4, 6, 9, 11, 15}, 0, 7) == 0);
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> > const&, int, int):
endbr64
mov %esi,%r8d
cmp %edx,%esi
jg 1493 <_Z5func0RKSt6vectorIiSaIiEEii+0x33>
mov (%rdi),%rsi
jmp 1478 <_Z5func0RKSt6vectorIiSaIiEEii+0x18>
lea -0x1(%rax),%edx
cmp %edx,%r8d
jg 1493 <_Z5func0RKSt6vectorIiSaIiEEii+0x33>
mov %... | _Z5func0RKSt6vectorIiSaIiEEii:
endbr64
mov eax, esi
cmp esi, edx
jg short locret_13E0
mov rdi, [rdi]
jmp short loc_13C7
loc_13C0:
lea edx, [rcx-1]
cmp eax, edx
jg short locret_13DE
loc_13C7:
mov ecx, edx
sub ecx, eax
sar ecx, 1
add ecx, eax
movsxd rsi, ecx
cmp ecx,... | long long func0(long long *a1, int a2, int a3)
{
long long result; // rax
long long v4; // rdi
int v5; // ecx
result = (unsigned int)a2;
if ( a2 <= a3 )
{
v4 = *a1;
do
{
while ( 1 )
{
v5 = result + ((a3 - (int)result) >> 1);
if ( v5 == *(_DWORD *)(v4 + 4LL * v5) )
... | func0:
ENDBR64
MOV EAX,ESI
CMP ESI,EDX
JG 0x001013e0
MOV RDI,qword ptr [RDI]
JMP 0x001013c7
LAB_001013c0:
LEA EDX,[RCX + -0x1]
CMP EAX,EDX
JG 0x001013de
LAB_001013c7:
MOV ECX,EDX
SUB ECX,EAX
SAR ECX,0x1
ADD ECX,EAX
MOVSXD RSI,ECX
CMP ECX,dword ptr [RDI + RSI*0x4]
JNZ 0x001013c0
LEA EAX,[RCX + 0x1]
CMP EAX,EDX
JLE 0x001... | /* func0(std::vector<int, std::allocator<int> > const&, int, int) */
void func0(vector *param_1,int param_2,int param_3)
{
int iVar1;
if (param_3 < param_2) {
return;
}
do {
while (iVar1 = (param_3 - param_2 >> 1) + param_2,
iVar1 != *(int *)(*(long *)param_1 + (long)iVar1 * 4)) {
p... |
1,483 | func0 |
#include <cassert>
#include <vector>
| int func0(const std::vector<int>& A, int left_element, int right_element) {
if (left_element > right_element) {
return left_element;
}
int mid = left_element + (right_element - left_element) / 2;
if (A[mid] == mid) {
return func0(A, mid + 1, right_element);
} else {
r... | int main() {
assert(func0({0, 1, 2, 3, 4, 5, 6}, 0, 6) == 7);
assert(func0({0, 1, 2, 6, 9, 11, 15}, 0, 6) == 3);
assert(func0({1, 2, 3, 4, 6, 9, 11, 15}, 0, 7) == 0);
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> > const&, int, int):
endbr64
mov %esi,%r8d
cmp %edx,%esi
jg 146a <_Z5func0RKSt6vectorIiSaIiEEii+0x2a>
mov (%rdi),%rsi
xchg %ax,%ax
mov %edx,%eax
sub %r8d,%eax
sar %eax
add %r8d,%eax
movslq %eax,%rcx
cmp %eax,(%rsi,%rcx,4)
je 1470 <_Z5func0RKSt... | _Z5func0RKSt6vectorIiSaIiEEii:
endbr64
mov eax, esi
cmp esi, edx
jg short locret_1480
mov rdi, [rdi]
nop dword ptr [rax]
loc_1450:
mov ecx, edx
sub ecx, eax
sar ecx, 1
add ecx, eax
movsxd rsi, ecx
cmp [rdi+rsi*4], ecx
jz short loc_1470
lea edx, [rcx-1]
cmp edx, eax... | long long func0(long long *a1, int a2, int a3)
{
long long result; // rax
long long v4; // rdi
int v5; // ecx
result = (unsigned int)a2;
if ( a2 <= a3 )
{
v4 = *a1;
do
{
while ( 1 )
{
v5 = result + ((a3 - (int)result) >> 1);
if ( *(_DWORD *)(v4 + 4LL * v5) == v5 )
... | func0:
ENDBR64
MOV EAX,ESI
CMP ESI,EDX
JG 0x00101480
MOV RDI,qword ptr [RDI]
NOP dword ptr [RAX]
LAB_00101450:
MOV ECX,EDX
SUB ECX,EAX
SAR ECX,0x1
ADD ECX,EAX
MOVSXD RSI,ECX
CMP dword ptr [RDI + RSI*0x4],ECX
JZ 0x00101470
LEA EDX,[RCX + -0x1]
CMP EDX,EAX
JGE 0x00101450
RET
LAB_00101470:
LEA EAX,[RCX + 0x1]
CMP EAX,EDX
... | /* func0(std::vector<int, std::allocator<int> > const&, int, int) */
void func0(vector *param_1,int param_2,int param_3)
{
int iVar1;
if (param_3 < param_2) {
return;
}
do {
while( true ) {
iVar1 = (param_3 - param_2 >> 1) + param_2;
if (*(int *)(*(long *)param_1 + (long)iVar1 * 4) != i... |
1,484 | func0 |
#include <vector>
#include <queue>
#include <cassert>
| std::vector<int> func0(std::vector<int> nums) {
std::priority_queue<int, std::vector<int>, std::greater<int>> pq(nums.begin(), nums.end());
std::vector<int> s_result;
while (!pq.empty()) {
s_result.push_back(pq.top());
pq.pop();
}
return s_result;
}
| int main() {
assert(func0({18, 14, 10, 9, 8, 7, 9, 3, 2, 4, 1}) == std::vector<int>({1, 2, 3, 4, 7, 8, 9, 9, 10, 14, 18}));
assert(func0({25, 35, 22, 85, 14, 65, 75, 25, 58}) == std::vector<int>({14, 22, 25, 25, 35, 58, 65, 75, 85}));
assert(func0({1, 3, 5, 7, 9, 2, 4, 6, 8, 0}) == std::vector<int>({0, 1... | O0 | cpp | func0(std::vector<int, std::allocator<int> >):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x78,%rsp
mov %rdi,-0x78(%rbp)
mov %rsi,-0x80(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
movq $0x0,-0x60(%rbp)
movq $0x0,-0x58(%rbp)
movq $0x0,-0x50(%rbp)
lea -0x60(%rbp),%rax
... | _Z5func0St6vectorIiSaIiEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 58h
mov [rbp+var_58], rdi
mov [rbp+var_60], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_60]
mov rdi, rax
call _ZNSt6vectorIiSaIiEE3endEv; std::vector<int>::end(void)
mov ... | long long func0(long long a1, long long a2)
{
long long v2; // rbx
long long v3; // rax
long long v4; // rax
char v6; // [rsp+1Fh] [rbp-41h] BYREF
_BYTE v7[40]; // [rsp+20h] [rbp-40h] BYREF
unsigned long long v8; // [rsp+48h] [rbp-18h]
v8 = __readfsqword(0x28u);
v2 = std::vector<int>::end(a2);
v3 = ... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x58
MOV qword ptr [RBP + -0x58],RDI
MOV qword ptr [RBP + -0x60],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x60]
MOV RDI,RAX
CALL 0x00101c30
MOV RBX,RAX
MOV RAX,qword ptr [RBP + -0x60]
MOV RDI,RAX
CALL 0x001... | /* func0(std::vector<int, std::allocator<int> >) */
vector<int,std::allocator<int>> * func0(vector param_1)
{
char cVar1;
__normal_iterator _Var2;
greater *pgVar3;
int *piVar4;
vector<int,std::allocator<int>> *in_RSI;
int4 in_register_0000003c;
vector<int,std::allocator<int>> *this;
long in_FS_OFFSET;... |
1,485 | func0 |
#include <vector>
#include <queue>
#include <cassert>
| std::vector<int> func0(std::vector<int> nums) {
std::priority_queue<int, std::vector<int>, std::greater<int>> pq(nums.begin(), nums.end());
std::vector<int> s_result;
while (!pq.empty()) {
s_result.push_back(pq.top());
pq.pop();
}
return s_result;
}
| int main() {
assert(func0({18, 14, 10, 9, 8, 7, 9, 3, 2, 4, 1}) == std::vector<int>({1, 2, 3, 4, 7, 8, 9, 9, 10, 14, 18}));
assert(func0({25, 35, 22, 85, 14, 65, 75, 25, 58}) == std::vector<int>({14, 22, 25, 25, 35, 58, 65, 75, 85}));
assert(func0({1, 3, 5, 7, 9, 2, 4, 6, 8, 0}) == std::vector<int>({0, 1... | O1 | cpp | func0(std::vector<int, std::allocator<int> >):
endbr64
push %r13
push %r12
push %rbp
push %rbx
sub $0x38,%rsp
mov %rdi,%rbx
mov %fs:0x28,%rax
mov %rax,0x28(%rsp)
xor %eax,%eax
mov 0x8(%rsi),%rcx
mov (%rsi),%rdx
movq $0x0,(%rsp)
movq $0x0,0x8(%rsp)
movq $0x0,0x10(%rsp)
mov %rsp,%rdi... | _Z5func0St6vectorIiSaIiEE:
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 r14, [rsi+8]
mov r13, [rsi]
mov [rsp+68h+var_68], 0
mov [rsp+68h+var_60], 0
mov [rsp+68h+var_58], 0
sub ... | _QWORD * func0(_QWORD *a1, long long a2, long long a3, long long a4, long long a5, long long a6)
{
_DWORD *v6; // r13
signed long long v7; // r14
char *v8; // rax
char *v9; // rbp
char *v10; // rbx
long long i; // r13
_DWORD *v12; // rsi
long long v13; // rcx
char *v15; // [rsp+0h] [rbp-68h]
char *v... | 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 R14,qword ptr [RSI + 0x8]
MOV R13,qword ptr [RSI]
MOV qword ptr [RSP],0x0
MOV qword ptr [RSP + 0x8],0x0
MOV qword ptr [RSP + 0x10],0x0
SUB R14,R13
MOV R15,R14
SAR ... | /* func0(std::vector<int, std::allocator<int> >) */
vector<int,std::allocator<int>> * func0(vector param_1)
{
int iVar1;
int *piVar2;
int *__dest;
int8 uVar3;
int *piVar4;
int8 *in_RSI;
int4 in_register_0000003c;
vector<int,std::allocator<int>> *this;
_Iter_comp_iter in_R8D;
long lVar5;
ulong __... |
1,486 | func0 |
#include <vector>
#include <queue>
#include <cassert>
| std::vector<int> func0(std::vector<int> nums) {
std::priority_queue<int, std::vector<int>, std::greater<int>> pq(nums.begin(), nums.end());
std::vector<int> s_result;
while (!pq.empty()) {
s_result.push_back(pq.top());
pq.pop();
}
return s_result;
}
| int main() {
assert(func0({18, 14, 10, 9, 8, 7, 9, 3, 2, 4, 1}) == std::vector<int>({1, 2, 3, 4, 7, 8, 9, 9, 10, 14, 18}));
assert(func0({25, 35, 22, 85, 14, 65, 75, 25, 58}) == std::vector<int>({14, 22, 25, 25, 35, 58, 65, 75, 85}));
assert(func0({1, 3, 5, 7, 9, 2, 4, 6, 8, 0}) == std::vector<int>({0, 1... | O2 | cpp | func0(std::vector<int, std::allocator<int> >):
endbr64
push %r15
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x38,%rsp
mov 0x8(%rsi),%rcx
mov (%rsi),%rdx
xor %esi,%esi
mov %fs:0x28,%rax
mov %rax,0x28(%rsp)
xor %eax,%eax
mov %rsp,%rdi
movq $0x0,(%rsp)
mov... | _Z5func0St6vectorIiSaIiEE:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 38h
mov r13, [rsi+8]
mov r14, [rsi]
mov rax, fs:28h
mov [rsp+68h+var_40], rax
xor eax, eax
movaps [rsp+68h+var_68], xmm0
mov rax, 7FFFFFFFFFFFFFFCh
mov ... | long long func0(long long a1, long long a2)
{
_DWORD *v2; // r14
signed long long v3; // r13
_DWORD *v4; // rax
long long v5; // r8
long long v6; // r9
char *v7; // rbx
char *v8; // rbp
long long v9; // r14
long long v10; // r8
long long v11; // r9
long long v12; // rax
long long v13; // rsi
... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x38
MOV R13,qword ptr [RSI + 0x8]
MOV R14,qword ptr [RSI]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x28],RAX
XOR EAX,EAX
MOVAPS xmmword ptr [RSP],XMM0
MOV RAX,0x7ffffffffffffffc
MOV qword ptr [RSP + 0x10],0x0
SUB R13,R1... | /* func0(std::vector<int, std::allocator<int> >) */
vector<int,std::allocator<int>> * func0(vector param_1)
{
int iVar1;
int *__dest;
int *piVar2;
vector<int,std::allocator<int>> *pvVar3;
int in_CL;
int extraout_DL;
int *piVar4;
int *piVar5;
int8 *in_RSI;
int *piVar6;
vector vVar7;
int4 in_reg... |
1,487 | func0 |
#include <vector>
#include <queue>
#include <cassert>
| std::vector<int> func0(std::vector<int> nums) {
std::priority_queue<int, std::vector<int>, std::greater<int>> pq(nums.begin(), nums.end());
std::vector<int> s_result;
while (!pq.empty()) {
s_result.push_back(pq.top());
pq.pop();
}
return s_result;
}
| int main() {
assert(func0({18, 14, 10, 9, 8, 7, 9, 3, 2, 4, 1}) == std::vector<int>({1, 2, 3, 4, 7, 8, 9, 9, 10, 14, 18}));
assert(func0({25, 35, 22, 85, 14, 65, 75, 25, 58}) == std::vector<int>({14, 22, 25, 25, 35, 58, 65, 75, 85}));
assert(func0({1, 3, 5, 7, 9, 2, 4, 6, 8, 0}) == std::vector<int>({0, 1... | O3 | cpp | func0(std::vector<int, std::allocator<int> >):
endbr64
push %r15
pxor %xmm0,%xmm0
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x38,%rsp
mov 0x8(%rsi),%rcx
mov (%rsi),%rdx
xor %esi,%esi
mov %fs:0x28,%rax
mov %rax,0x28(%rsp)
xor %eax,%eax
mov %rsp,%rdi
mov... | _Z5func0St6vectorIiSaIiEE:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 38h
mov r13, [rsi+8]
mov r14, [rsi]
mov rax, fs:28h
mov [rsp+68h+var_40], rax
xor eax, eax
movaps [rsp+68h+var_68], xmm0
mov rax, 7FFFFFFFFFFFFFFCh
mov ... | long long func0(long long a1, long long a2)
{
_DWORD *v2; // r14
signed long long v3; // r13
char *v4; // rax
long long v5; // r8
long long v6; // r9
char *v7; // rbx
char *v8; // rbp
long long v9; // r14
long long v10; // r8
long long v11; // r9
long long v12; // rsi
long long v13; // rax
lo... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x38
MOV R13,qword ptr [RSI + 0x8]
MOV R14,qword ptr [RSI]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x28],RAX
XOR EAX,EAX
MOVAPS xmmword ptr [RSP],XMM0
MOV RAX,0x7ffffffffffffffc
MOV qword ptr [RSP + 0x10],0x0
SUB R13,R1... | /* func0(std::vector<int, std::allocator<int> >) */
vector<int,std::allocator<int>> * func0(vector param_1)
{
int iVar1;
long lVar2;
int *__dest;
int *piVar3;
int *piVar4;
int *piVar5;
int8 *in_RSI;
int *piVar6;
int4 in_register_0000003c;
vector<int,std::allocator<int>> *this;
_Iter_comp_iter in... |
1,488 | func0 | #include <assert.h>
| int func0(int l, int w, int h) {
return l * w * h;
}
| int main() {
assert(func0(1, 2, 3) == 6);
assert(func0(5, 7, 9) == 315);
assert(func0(10, 15, 21) == 3150);
return 0;
}
| O0 | cpp | func0(int, int, int):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x4(%rbp)
mov %esi,-0x8(%rbp)
mov %edx,-0xc(%rbp)
mov -0x4(%rbp),%eax
imul -0x8(%rbp),%eax
imul -0xc(%rbp),%eax
pop %rbp
retq
| _Z5func0iii:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_4], edi
mov [rbp+var_8], esi
mov [rbp+var_C], edx
mov eax, [rbp+var_4]
imul eax, [rbp+var_8]
imul eax, [rbp+var_C]
pop rbp
retn | long long func0(int a1, int a2, int a3)
{
return (unsigned int)(a3 * a2 * a1);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x4],EDI
MOV dword ptr [RBP + -0x8],ESI
MOV dword ptr [RBP + -0xc],EDX
MOV EAX,dword ptr [RBP + -0x4]
IMUL EAX,dword ptr [RBP + -0x8]
IMUL EAX,dword ptr [RBP + -0xc]
POP RBP
RET | /* func0(int, int, int) */
int func0(int param_1,int param_2,int param_3)
{
return param_1 * param_2 * param_3;
} |
1,489 | func0 | #include <assert.h>
| int func0(int l, int w, int h) {
return l * w * h;
}
| int main() {
assert(func0(1, 2, 3) == 6);
assert(func0(5, 7, 9) == 315);
assert(func0(10, 15, 21) == 3150);
return 0;
}
| O1 | cpp | func0(int, int, int):
endbr64
imul %esi,%edi
mov %edi,%eax
imul %edx,%eax
retq
| _Z5func0iii:
endbr64
imul edi, esi
mov eax, edi
imul eax, edx
retn | long long func0(int a1, int a2, int a3)
{
return (unsigned int)(a3 * a2 * a1);
} | func0:
ENDBR64
IMUL EDI,ESI
MOV EAX,EDI
IMUL EAX,EDX
RET | /* func0(int, int, int) */
int func0(int param_1,int param_2,int param_3)
{
return param_1 * param_2 * param_3;
} |
1,490 | func0 | #include <assert.h>
| int func0(int l, int w, int h) {
return l * w * h;
}
| int main() {
assert(func0(1, 2, 3) == 6);
assert(func0(5, 7, 9) == 315);
assert(func0(10, 15, 21) == 3150);
return 0;
}
| O2 | cpp | func0(int, int, int):
endbr64
imul %esi,%edi
mov %edi,%eax
imul %edx,%eax
retq
nopl (%rax)
| _Z5func0iii:
endbr64
imul edi, esi
mov eax, edi
imul eax, edx
retn | long long func0(int a1, int a2, int a3)
{
return (unsigned int)(a3 * a2 * a1);
} | func0:
ENDBR64
IMUL EDI,ESI
MOV EAX,EDI
IMUL EAX,EDX
RET | /* func0(int, int, int) */
int func0(int param_1,int param_2,int param_3)
{
return param_1 * param_2 * param_3;
} |
1,491 | func0 | #include <assert.h>
| int func0(int l, int w, int h) {
return l * w * h;
}
| int main() {
assert(func0(1, 2, 3) == 6);
assert(func0(5, 7, 9) == 315);
assert(func0(10, 15, 21) == 3150);
return 0;
}
| O3 | cpp | func0(int, int, int):
endbr64
imul %esi,%edi
mov %edi,%eax
imul %edx,%eax
retq
nopl (%rax)
| _Z5func0iii:
endbr64
imul edi, esi
mov eax, edi
imul eax, edx
retn | long long func0(int a1, int a2, int a3)
{
return (unsigned int)(a3 * a2 * a1);
} | func0:
ENDBR64
IMUL EDI,ESI
MOV EAX,EDI
IMUL EAX,EDX
RET | /* func0(int, int, int) */
int func0(int param_1,int param_2,int param_3)
{
return param_1 * param_2 * param_3;
} |
1,492 | func0 |
#include <cassert>
#include <string>
#include <vector>
#include <algorithm>
| std::vector<std::string> func0(const std::string& str) {
if (str.empty()) {
return {""};
}
std::vector<std::string> prev_list = func0(str.substr(1, str.size() - 1));
std::vector<std::string> next_list;
char first_char = str[0];
for (const auto& s : prev_list) {
for (size_... | int main() {
std::vector<std::string> result;
result = func0("ab");
assert(result.size() == 2);
assert(std::find(result.begin(), result.end(), "ab") != result.end());
assert(std::find(result.begin(), result.end(), "ba") != result.end());
result = func0("abc");
assert(result.size()... | O0 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %r13
push %r12
push %rbx
sub $0x128,%rsp
mov %rdi,-0x138(%rbp)
mov %rsi,-0x140(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x28(%rbp)
xor %eax,%eax
mov -0x140(%rbp),%... | _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
mov rax, [rbp+var_140]
mov rdi, rax
call __ZNKSt7__cxx1112bas... | long long func0(long long a1, long long a2)
{
long long v2; // rax
long long v3; // rax
long long v4; // rbx
long long v5; // rax
unsigned long long v6; // rax
char v8; // [rsp+1Fh] [rbp-121h]
long long v9; // [rsp+20h] [rbp-120h] BYREF
long long v10; // [rsp+28h] [rbp-118h] BYREF
long long v11; // [... | 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
MOV RAX,qword ptr [RBP + -0x140]
MOV RDI,RAX
CALL 0x00102450
TEST AL,AL
JZ 0x0010261d
LEA RAX,[0x106008]
MOV qword ptr [RBP... | /* func0(std::string const&) */
string * func0(string *param_1)
{
char cVar1;
bool bVar2;
char *pcVar3;
int8 uVar4;
int8 uVar5;
ulong uVar6;
ulong in_RSI;
long in_FS_OFFSET;
int8 local_128;
int8 local_120;
int8 local_118;
int8 local_110;
ulong local_108;
vector<std::string,std::allocator<s... |
1,493 | func0 |
#include <cassert>
#include <string>
#include <vector>
#include <algorithm>
| std::vector<std::string> func0(const std::string& str) {
if (str.empty()) {
return {""};
}
std::vector<std::string> prev_list = func0(str.substr(1, str.size() - 1));
std::vector<std::string> next_list;
char first_char = str[0];
for (const auto& s : prev_list) {
for (size_... | int main() {
std::vector<std::string> result;
result = func0("ab");
assert(result.size() == 2);
assert(std::find(result.begin(), result.end(), "ab") != result.end());
assert(std::find(result.begin(), result.end(), "ba") != result.end());
result = func0("abc");
assert(result.size()... | O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0xf8,%rsp
mov %rdi,0x18(%rsp)
mov %fs:0x28,%rax
mov %rax,0xe8(%rsp)
xor %eax,%eax
mov 0x8(%rsi),%rax
test %rax,%rax
jne ... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 0E8h
mov [rsp+118h+var_110], rdi
mov rax, fs:28h
mov [rsp+118h+var_40], rax
xor eax, eax
mov rax, [rsi+8]
test rax, rax
jnz loc_145C
lea... | _QWORD * func0(_QWORD *a1, char **a2)
{
char *v2; // rax
long long v3; // rax
int v5; // edx
int v6; // ecx
int v7; // r8d
int v8; // r9d
char v9; // r13
_QWORD *v10; // r15
void **v11; // rbp
void **v12; // rbx
unsigned long long v13; // rdx
long long v14; // rax
long long v15; // rcx
long ... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0xe8
MOV qword ptr [RSP + 0x8],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0xd8],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RSI + 0x8]
TEST RAX,RAX
JNZ 0x0010145c
LEA RAX,[0x1032d4]
MOV qword ptr [RSP + 0xb0],RAX
MOV RBX,RDI
MOV qword ptr [RD... | /* func0(std::string const&) */
string * func0(string *param_1)
{
char **ppcVar1;
long *plVar2;
__normal_iterator _Var3;
string *psVar4;
long *plVar5;
long *plVar6;
int8 uVar7;
int4 extraout_var;
random_access_iterator_tag rVar8;
uint uVar9;
long *plVar10;
char *pcVar11;
char **ppcVar12;
u... |
1,494 | func0 |
#include <cassert>
#include <string>
#include <vector>
#include <algorithm>
| std::vector<std::string> func0(const std::string& str) {
if (str.empty()) {
return {""};
}
std::vector<std::string> prev_list = func0(str.substr(1, str.size() - 1));
std::vector<std::string> next_list;
char first_char = str[0];
for (const auto& s : prev_list) {
for (size_... | int main() {
std::vector<std::string> result;
result = func0("ab");
assert(result.size() == 2);
assert(std::find(result.begin(), result.end(), "ab") != result.end());
assert(std::find(result.begin(), result.end(), "ba") != result.end());
result = func0("abc");
assert(result.size()... | O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x108,%rsp
mov %rdi,0x20(%rsp)
mov %fs:0x28,%rax
mov %rax,0xf8(%rsp)
xor %eax,%eax
mov 0x8(%rsi),%rax
test %rax,%rax
jne... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 108h
mov [rsp+138h+var_118], rdi
mov rax, fs:28h
mov [rsp+138h+var_40], rax
mov rax, [rsi+8]
test rax, rax
jnz loc_1F90
mov qword ptr [r... | long long func0(long long a1, char **a2)
{
char *v2; // rax
long long v3; // rax
char *v5; // rcx
long long v7; // rsi
int v8; // edx
int v9; // ecx
int v10; // r8d
int v11; // r9d
char *v12; // rax
void **v13; // r12
unsigned long long v14; // rdx
unsigned long long v15; // rbx
unsigned long... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x108
MOV qword ptr [RSP + 0x20],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0xf8],RAX
MOV RAX,qword ptr [RSI + 0x8]
TEST RAX,RAX
JNZ 0x00101f90
MOV qword ptr [RDI + 0x10],0x0
PXOR XMM0,XMM0
LEA RAX,[0x1042d4]
MOV RBX,RDI
MOVUPS xmmwo... | /* func0(std::string const&) */
string * func0(string *param_1)
{
char **ppcVar1;
char *pcVar2;
int8 uVar3;
__normal_iterator _Var4;
string *psVar5;
long *plVar6;
int4 extraout_var;
random_access_iterator_tag rVar7;
uint uVar8;
ulong uVar10;
long ***ppplVar11;
ulong uVar12;
char **ppcVar13;
... |
1,495 | func0 |
#include <cassert>
#include <string>
#include <vector>
#include <algorithm>
| std::vector<std::string> func0(const std::string& str) {
if (str.empty()) {
return {""};
}
std::vector<std::string> prev_list = func0(str.substr(1, str.size() - 1));
std::vector<std::string> next_list;
char first_char = str[0];
for (const auto& s : prev_list) {
for (size_... | int main() {
std::vector<std::string> result;
result = func0("ab");
assert(result.size() == 2);
assert(std::find(result.begin(), result.end(), "ab") != result.end());
assert(std::find(result.begin(), result.end(), "ba") != result.end());
result = func0("abc");
assert(result.size()... | O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x128,%rsp
mov 0x8(%rsi),%r12
mov %rdi,0x30(%rsp)
mov %fs:0x28,%rax
mov %rax,0x118(%rsp)
xor %eax,%eax
test %r12,%r12
jn... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 138h
mov rbp, [rsi+8]
mov [rsp+168h+var_130], rdi
mov rax, fs:28h
mov [rsp+168h+var_40], rax
xor eax, eax
test rbp, rbp
jnz short loc_1E... | long long func0(long long a1, char **a2, int a3, int a4, int a5, int a6)
{
char *v6; // rbp
long long v7; // rax
size_t v9; // rbp
char *v10; // r12
_QWORD *v11; // rax
char *v12; // rax
_QWORD *v13; // r15
unsigned long long v14; // rbp
size_t v15; // rbx
size_t v16; // rbp
_BYTE *v17; // r12
... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x138
MOV RBP,qword ptr [RSI + 0x8]
MOV qword ptr [RSP + 0x38],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x128],RAX
XOR EAX,EAX
TEST RBP,RBP
JNZ 0x00101eb8
MOV qword ptr [RDI + 0x10],0x0
PXOR XMM0,XMM0
MOV RBX,RDI
MOVUPS xmmword ptr... | /* func0(std::string const&) */
string * func0(string *param_1)
{
long *plVar1;
int *__src;
int8 uVar2;
long ****__src_00;
__normal_iterator _Var3;
long *plVar4;
long *plVar5;
int4 extraout_var;
ulong *puVar6;
random_access_iterator_tag rVar7;
uint uVar8;
long *****ppppplVar10;
ulong uVar11;... |
1,496 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int n, int m) {
int a = (n / m) * m;
int b = a + m;
return (n - a > b - n ? b : a);
}
| int main() {
assert(func0(4722, 10) == 4720);
assert(func0(1111, 5) == 1110);
assert(func0(219, 2) == 218);
return 0;
}
| O0 | cpp | func0(int, int):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
mov %esi,-0x18(%rbp)
mov -0x14(%rbp),%eax
cltd
idivl -0x18(%rbp)
mov %eax,%edx
mov -0x18(%rbp),%eax
imul %edx,%eax
mov %eax,-0x8(%rbp)
mov -0x8(%rbp),%edx
mov -0x18(%rbp),%eax
add %edx,%eax
mov %eax,-0x4(%rbp)
mo... | _Z5func0ii:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_14], edi
mov [rbp+var_18], esi
mov eax, [rbp+var_14]
cdq
idiv [rbp+var_18]
mov edx, eax
mov eax, [rbp+var_18]
imul eax, edx
mov [rbp+var_8], eax
mov edx, [rbp+var_8]
mov eax, [rbp+var_18]
add eax, edx
mov [rbp+va... | long long func0(int a1, int a2)
{
if ( a1 % a2 <= a1 / a2 * a2 + a2 - a1 )
return (unsigned int)(a1 / a2 * a2);
else
return (unsigned int)(a1 / a2 * a2 + a2);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x14],EDI
MOV dword ptr [RBP + -0x18],ESI
MOV EAX,dword ptr [RBP + -0x14]
CDQ
IDIV dword ptr [RBP + -0x18]
MOV EDX,EAX
MOV EAX,dword ptr [RBP + -0x18]
IMUL EAX,EDX
MOV dword ptr [RBP + -0x8],EAX
MOV EDX,dword ptr [RBP + -0x8]
MOV EAX,dword ptr [RBP + -0x18]
ADD ... | /* func0(int, int) */
int func0(int param_1,int param_2)
{
int iVar1;
iVar1 = param_2 * (param_1 / param_2);
if ((param_2 + iVar1) - param_1 < param_1 - iVar1) {
iVar1 = param_2 + iVar1;
}
return iVar1;
} |
1,497 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int n, int m) {
int a = (n / m) * m;
int b = a + m;
return (n - a > b - n ? b : a);
}
| int main() {
assert(func0(4722, 10) == 4720);
assert(func0(1111, 5) == 1110);
assert(func0(219, 2) == 218);
return 0;
}
| O1 | cpp | func0(int, int):
endbr64
mov %edi,%eax
cltd
idiv %esi
imul %esi,%eax
mov %eax,%ecx
lea (%rsi,%rax,1),%eax
sub %edi,%eax
add %ecx,%esi
cmp %edx,%eax
mov %ecx,%eax
cmovl %esi,%eax
retq
| _Z5func0ii:
endbr64
mov eax, edi
cdq
idiv esi
imul eax, esi
add esi, eax
mov ecx, esi
sub ecx, edi
cmp ecx, edx
cmovl eax, esi
retn | long long func0(int a1, int a2)
{
int v2; // edx
long long result; // rax
unsigned int v4; // esi
v2 = a1 % a2;
result = (unsigned int)(a2 * (a1 / a2));
v4 = result + a2;
if ( (int)(v4 - a1) < v2 )
return v4;
return result;
} | func0:
ENDBR64
MOV EAX,EDI
CDQ
IDIV ESI
IMUL EAX,ESI
ADD ESI,EAX
MOV ECX,ESI
SUB ECX,EDI
CMP ECX,EDX
CMOVL EAX,ESI
RET | /* func0(int, int) */
int func0(int param_1,int param_2)
{
int iVar1;
int iVar2;
iVar1 = (param_1 / param_2) * param_2;
iVar2 = param_2 + iVar1;
if (iVar2 - param_1 < param_1 % param_2) {
iVar1 = iVar2;
}
return iVar1;
} |
1,498 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int n, int m) {
int a = (n / m) * m;
int b = a + m;
return (n - a > b - n ? b : a);
}
| int main() {
assert(func0(4722, 10) == 4720);
assert(func0(1111, 5) == 1110);
assert(func0(219, 2) == 218);
return 0;
}
| O2 | cpp | func0(int, int):
endbr64
mov %edi,%eax
cltd
idiv %esi
imul %esi,%eax
mov %eax,%ecx
lea (%rsi,%rax,1),%eax
mov %eax,%esi
sub %edi,%esi
cmp %edx,%esi
cmovge %ecx,%eax
retq
nopl 0x0(%rax,%rax,1)
| _Z5func0ii:
endbr64
mov eax, edi
cdq
idiv esi
imul eax, esi
add esi, eax
mov ecx, esi
sub ecx, edi
cmp ecx, edx
cmovl eax, esi
retn | long long func0(int a1, int a2)
{
int v2; // edx
long long result; // rax
unsigned int v4; // esi
v2 = a1 % a2;
result = (unsigned int)(a2 * (a1 / a2));
v4 = result + a2;
if ( (int)(v4 - a1) < v2 )
return v4;
return result;
} | func0:
ENDBR64
MOV EAX,EDI
CDQ
IDIV ESI
IMUL EAX,ESI
ADD ESI,EAX
MOV ECX,ESI
SUB ECX,EDI
CMP ECX,EDX
CMOVL EAX,ESI
RET | /* func0(int, int) */
int func0(int param_1,int param_2)
{
int iVar1;
int iVar2;
iVar1 = (param_1 / param_2) * param_2;
iVar2 = param_2 + iVar1;
if (iVar2 - param_1 < param_1 % param_2) {
iVar1 = iVar2;
}
return iVar1;
} |
1,499 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int n, int m) {
int a = (n / m) * m;
int b = a + m;
return (n - a > b - n ? b : a);
}
| int main() {
assert(func0(4722, 10) == 4720);
assert(func0(1111, 5) == 1110);
assert(func0(219, 2) == 218);
return 0;
}
| O3 | cpp | func0(int, int):
endbr64
mov %edi,%eax
cltd
idiv %esi
imul %esi,%eax
mov %eax,%ecx
lea (%rsi,%rax,1),%eax
mov %eax,%esi
sub %edi,%esi
cmp %edx,%esi
cmovge %ecx,%eax
retq
nopl 0x0(%rax,%rax,1)
| _Z5func0ii:
endbr64
mov eax, edi
cdq
idiv esi
imul eax, esi
add esi, eax
mov ecx, esi
sub ecx, edi
cmp ecx, edx
cmovl eax, esi
retn | long long func0(int a1, int a2)
{
int v2; // edx
long long result; // rax
unsigned int v4; // esi
v2 = a1 % a2;
result = (unsigned int)(a2 * (a1 / a2));
v4 = result + a2;
if ( (int)(v4 - a1) < v2 )
return v4;
return result;
} | func0:
ENDBR64
MOV EAX,EDI
CDQ
IDIV ESI
IMUL EAX,ESI
ADD ESI,EAX
MOV ECX,ESI
SUB ECX,EDI
CMP ECX,EDX
CMOVL EAX,ESI
RET | /* func0(int, int) */
int func0(int param_1,int param_2)
{
int iVar1;
int iVar2;
iVar1 = (param_1 / param_2) * param_2;
iVar2 = param_2 + iVar1;
if (iVar2 - param_1 < param_1 % param_2) {
iVar1 = iVar2;
}
return iVar1;
} |
1,500 | func0 |
#include <iostream>
#include <tuple>
#include <set>
#include <vector>
#include <cassert>
#include <variant>
| std::tuple<std::vector<std::variant<int, const char*>>> func0(const std::vector<int>& test_tup) {
std::set<int> temp;
std::vector<std::variant<int, const char*>> res;
for (auto ele : test_tup) {
if (temp.find(ele) == temp.end()) {
res.push_back(ele);
temp.insert(ele);
... | int main() {
assert(func0({1, 1, 4, 4, 4, 5, 5, 6, 7, 7}) == std::make_tuple(std::vector<std::variant<int, const char*>>{1, "MSP", 4, "MSP", "MSP", 5, "MSP", 6, 7, "MSP"}));
assert(func0({2, 3, 4, 4, 5, 6, 6, 7, 8, 9, 9}) == std::make_tuple(std::vector<std::variant<int, const char*>>{2, 3, 4, "MSP", 5, 6, "MS... | O0 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0xb8,%rsp
mov %rdi,-0xb8(%rbp)
mov %rsi,-0xc0(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
lea -0x50(%rbp),%rax
mov %rax,%rdi
callq 2076 <_ZNSt3setIiSt4lessIiESaIiEEC1Ev>
le... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 0B8h
mov [rbp+var_B8], rdi
mov [rbp+var_C0], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_50]
mov rdi, rax
call _ZNSt3setIiSt4lessIiESaIiEEC2Ev; std::set<int>::set(void)
... | long long func0(long long a1, long long a2)
{
int v3; // [rsp+1Ch] [rbp-A4h] BYREF
long long v4; // [rsp+20h] [rbp-A0h] BYREF
long long v5; // [rsp+28h] [rbp-98h] BYREF
_QWORD v6[2]; // [rsp+30h] [rbp-90h] BYREF
_QWORD v7[2]; // [rsp+40h] [rbp-80h] BYREF
_BYTE v8[32]; // [rsp+50h] [rbp-70h] BYREF
_BYTE v... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0xb8
MOV qword ptr [RBP + -0xb8],RDI
MOV qword ptr [RBP + -0xc0],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x50]
MOV RDI,RAX
CALL 0x001020e2
LEA RAX,[RBP + -0x70]
MOV RDI,RAX
CALL 0x0010216a
MOV RAX,qword ptr [RBP + -... | /* func0(std::vector<int, std::allocator<int> > const&) */
vector * func0(vector *param_1)
{
char cVar1;
bool bVar2;
int *piVar3;
vector<int,std::allocator<int>> *in_RSI;
long in_FS_OFFSET;
int local_ac;
int8 local_a8;
int8 local_a0;
int8 local_98;
vector<int,std::allocator<int>> *local_90;
int8... |
1,501 | func0 |
#include <iostream>
#include <tuple>
#include <set>
#include <vector>
#include <cassert>
#include <variant>
| std::tuple<std::vector<std::variant<int, const char*>>> func0(const std::vector<int>& test_tup) {
std::set<int> temp;
std::vector<std::variant<int, const char*>> res;
for (auto ele : test_tup) {
if (temp.find(ele) == temp.end()) {
res.push_back(ele);
temp.insert(ele);
... | int main() {
assert(func0({1, 1, 4, 4, 4, 5, 5, 6, 7, 7}) == std::make_tuple(std::vector<std::variant<int, const char*>>{1, "MSP", 4, "MSP", "MSP", 5, "MSP", 6, 7, "MSP"}));
assert(func0({2, 3, 4, 4, 5, 6, 6, 7, 8, 9, 9}) == std::make_tuple(std::vector<std::variant<int, const char*>>{2, 3, 4, "MSP", 5, 6, "MS... | O1 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %r13
push %r12
push %rbp
push %rbx
sub $0x88,%rsp
mov %rdi,%rbp
mov %fs:0x28,%rax
mov %rax,0x78(%rsp)
xor %eax,%eax
movl $0x0,0x48(%rsp)
movq $0x0,0x50(%rsp)
lea 0x48(%rsp),%rax
mov %rax,0x58(%rsp)
mov %rax,0x60(%rsp)... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push r13
push r12
push rbp
push rbx
sub rsp, 88h
mov rbp, rdi
mov rax, fs:28h
mov [rsp+0A8h+var_30], rax
xor eax, eax
mov [rsp+0A8h+var_60], 0
mov [rsp+0A8h+var_58], 0
lea rax, [rsp+0A8h+var_60]
mov [rsp+0A8h+var_50], rax
mov [rsp+... | _QWORD * func0(_QWORD *a1, int **a2)
{
int *v2; // rbx
int *v3; // r12
long long v4; // rax
int *v5; // rcx
int v6; // edx
_BYTE *v7; // r12
char *v8; // rbx
unsigned long long v9; // r13
long long v10; // rax
struct _Unwind_Exception *v11; // rbx
long long v12; // rcx
long long v13; // rdx
in... | func0:
ENDBR64
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x88
MOV RBP,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x78],RAX
XOR EAX,EAX
MOV dword ptr [RSP + 0x48],0x0
MOV qword ptr [RSP + 0x50],0x0
LEA RAX,[RSP + 0x48]
MOV qword ptr [RSP + 0x58],RAX
MOV qword ptr [RSP + 0x60],RAX
MOV qword ptr [RSP + 0x68],0... | /* func0(std::vector<int, std::allocator<int> > const&) */
vector * func0(vector *param_1)
{
int *piVar1;
void *pvVar2;
void *pvVar3;
_Rb_tree_node *p_Var4;
_Rb_tree_node *p_Var5;
void *pvVar6;
int8 uVar7;
_Rb_tree_node *p_Var8;
long lVar9;
int *piVar10;
int8 *in_RSI;
ulong uVar11;
long in_F... |
1,502 | func0 |
#include <iostream>
#include <tuple>
#include <set>
#include <vector>
#include <cassert>
#include <variant>
| std::tuple<std::vector<std::variant<int, const char*>>> func0(const std::vector<int>& test_tup) {
std::set<int> temp;
std::vector<std::variant<int, const char*>> res;
for (auto ele : test_tup) {
if (temp.find(ele) == temp.end()) {
res.push_back(ele);
temp.insert(ele);
... | int main() {
assert(func0({1, 1, 4, 4, 4, 5, 5, 6, 7, 7}) == std::make_tuple(std::vector<std::variant<int, const char*>>{1, "MSP", 4, "MSP", "MSP", 5, "MSP", 6, 7, "MSP"}));
assert(func0({2, 3, 4, 4, 5, 6, 6, 7, 8, 9, 9}) == std::make_tuple(std::vector<std::variant<int, const char*>>{2, 3, 4, "MSP", 5, 6, "MS... | O2 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x98,%rsp
mov (%rsi),%rbp
mov %rdi,0x10(%rsp)
lea 0x58(%rsp),%r13
mov %fs:0x28,%rax
mov %rax,0x88(%rsp)
xor %eax,%eax
mov 0x8(%rsi),%rax
movl $0x0,0x58(%rs... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push r15
pxor xmm0, xmm0
push r14
mov r14, rdi
push r13
push r12
push rbp
push rbx
sub rsp, 98h
mov rbp, [rsi]
mov r13, [rsi+8]
mov rax, fs:28h
mov [rsp+0C8h+var_40], rax
xor eax, eax
lea r12, [rsp+0C8h+var_70]
mov [rsp+0C8h+v... | _QWORD * func0(_QWORD *a1, __int32 **a2)
{
__int32 *v3; // rbp
__int32 *v4; // r13
_QWORD *v5; // rax
__m128i *v6; // r8
__m128i *v7; // rbx
__int32 v8; // esi
int *v9; // rdi
long long v10; // rdx
long long v11; // rcx
__m128i *v12; // rbx
__m128i *v13; // rbp
unsigned long long v14; // r12
l... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
MOV R14,RDI
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x98
MOV RBP,qword ptr [RSI]
MOV R13,qword ptr [RSI + 0x8]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x88],RAX
XOR EAX,EAX
LEA R12,[RSP + 0x58]
MOV dword ptr [RSP + 0x58],0x0
MOV qword ptr [RSP + 0x60],0x0
MOV... | /* func0(std::vector<int, std::allocator<int> > const&) */
vector * func0(vector *param_1)
{
int *piVar1;
int8 uVar2;
int8 uVar3;
int4 *puVar4;
int4 *puVar5;
void *pvVar6;
long lVar7;
int8 *puVar8;
int *piVar9;
int8 *in_RSI;
int4 *puVar10;
ulong uVar11;
long in_FS_OFFSET;
int local_ac;
i... |
1,503 | func0 |
#include <iostream>
#include <tuple>
#include <set>
#include <vector>
#include <cassert>
#include <variant>
| std::tuple<std::vector<std::variant<int, const char*>>> func0(const std::vector<int>& test_tup) {
std::set<int> temp;
std::vector<std::variant<int, const char*>> res;
for (auto ele : test_tup) {
if (temp.find(ele) == temp.end()) {
res.push_back(ele);
temp.insert(ele);
... | int main() {
assert(func0({1, 1, 4, 4, 4, 5, 5, 6, 7, 7}) == std::make_tuple(std::vector<std::variant<int, const char*>>{1, "MSP", 4, "MSP", "MSP", 5, "MSP", 6, 7, "MSP"}));
assert(func0({2, 3, 4, 4, 5, 6, 6, 7, 8, 9, 9}) == std::make_tuple(std::vector<std::variant<int, const char*>>{2, 3, 4, "MSP", 5, 6, "MS... | O3 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %r15
pxor %xmm0,%xmm0
mov %rdi,%r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x88,%rsp
mov (%rsi),%rbp
mov 0x8(%rsi),%r14
mov %fs:0x28,%rax
mov %rax,0x78(%rsp)
xor %eax,%eax
lea 0x48(%rsp),%r13
movl ... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push r15
pxor xmm0, xmm0
push r14
mov r14, rdi
push r13
push r12
push rbp
push rbx
sub rsp, 98h
mov rbp, [rsi]
mov r13, [rsi+8]
mov rax, fs:28h
mov [rsp+0C8h+var_40], rax
xor eax, eax
lea r12, [rsp+0C8h+var_70]
mov [rsp+0C8h+v... | _QWORD * func0(_QWORD *a1, __int32 **a2)
{
__int32 *v3; // rbp
__int32 *v4; // r13
int *v5; // rax
__m128i *v6; // r8
__m128i *v7; // rbx
__int32 v8; // esi
int *v9; // rdi
int *v10; // rcx
int *v11; // rdx
__m128i *v12; // rbx
__m128i *v13; // rbp
unsigned long long v14; // r12
long long v15;... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
MOV R14,RDI
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x98
MOV RBP,qword ptr [RSI]
MOV R13,qword ptr [RSI + 0x8]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x88],RAX
XOR EAX,EAX
LEA R12,[RSP + 0x58]
MOV dword ptr [RSP + 0x58],0x0
MOV qword ptr [RSP + 0x60],0x0
MOV... | /* func0(std::vector<int, std::allocator<int> > const&) */
vector * func0(vector *param_1)
{
int iVar1;
int *piVar2;
int8 uVar3;
int4 *puVar4;
int4 *puVar5;
int8 uVar6;
int4 *puVar7;
int4 *puVar8;
int4 *puVar9;
int4 *puVar10;
void *pvVar11;
long lVar12;
int8 *puVar13;
int *piVar14;
int8 ... |
1,504 | func0 |
#include <iostream>
#include <string>
#include <assert.h>
#include <algorithm>
| std::string func0(std::string s, char c) {
int counts = std::count(s.begin(), s.end(), c);
s.erase(std::remove(s.begin(), s.end(), c), s.end());
return s;
}
| int main() {
assert(func0("aba", 'a') == "b");
assert(func0("toggle", 'g') == "tole");
assert(func0("aabbc", 'b') == "aac");
return 0;
}
| O0 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x58,%rsp
mov %rdi,-0x48(%rbp)
mov %rsi,-0x50(%rbp)
mov %edx,%eax
mov %al,-0x54(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEc:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 58h
mov [rbp+var_48], rdi
mov [rbp+var_50], rsi
mov eax, edx
mov [rbp+var_54], al
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_50]
mov ... | long long func0(long long a1, long long a2, char a3)
{
long long v3; // rbx
long long v4; // rax
long long v5; // rbx
long long v6; // rax
_BYTE v8[4]; // [rsp+Ch] [rbp-54h] BYREF
long long v9; // [rsp+10h] [rbp-50h]
long long v10; // [rsp+18h] [rbp-48h]
int v11; // [rsp+24h] [rbp-3Ch]
long long v12;... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x58
MOV qword ptr [RBP + -0x48],RDI
MOV qword ptr [RBP + -0x50],RSI
MOV EAX,EDX
MOV byte ptr [RBP + -0x54],AL
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x50]
MOV RDI,RAX
CALL 0x001021d0
MOV RBX,RAX
MOV RAX,qwor... | /* func0(std::string, char) */
string * func0(string *param_1,string *param_2,char param_3)
{
__normal_iterator _Var1;
__normal_iterator _Var2;
int4 extraout_var;
long in_FS_OFFSET;
char local_5c [4];
string *local_58;
string *local_50;
difference_type local_44;
int8 local_40;
int8 local_38;
__n... |
1,505 | func0 |
#include <iostream>
#include <string>
#include <assert.h>
#include <algorithm>
| std::string func0(std::string s, char c) {
int counts = std::count(s.begin(), s.end(), c);
s.erase(std::remove(s.begin(), s.end(), c), s.end());
return s;
}
| int main() {
assert(func0("aba", 'a') == "b");
assert(func0("toggle", 'g') == "tole");
assert(func0("aabbc", 'b') == "aac");
return 0;
}
| O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char):
endbr64
push %r12
push %rbp
push %rbx
sub $0x10,%rsp
mov %rdi,%rbp
mov %rsi,%rbx
mov %dl,0xc(%rsp)
mov (%rsi),%rdi
mov 0x8(%rsi),%rdx
lea (%rdi,%rdx,1),%r12
cmp %r12,%rdi
je 12bd <_Z5func0NSt7... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEc:
endbr64
push r12
push rbp
push rbx
sub rsp, 10h
mov rbp, rdi
mov rbx, rsi
mov [rsp+28h+var_1C], dl
mov rdi, [rsi]
mov rdx, [rsi+8]
lea r12, [rdi+rdx]
cmp rdi, r12
jz short loc_129D
mov eax, 0
loc_1294:
add ... | _QWORD * func0(_QWORD *a1, _QWORD *a2, char a3)
{
long long v5; // rdx
long long v6; // r12
long long v7; // rax
_BYTE *v8; // rax
_BYTE *v9; // rsi
_QWORD *v10; // rcx
char *v11; // rax
unsigned int v13; // edx
unsigned long long v14; // rdi
char *v15; // rcx
char *v16; // r9
unsigned int v17; ... | func0:
ENDBR64
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x10
MOV RBP,RDI
MOV RBX,RSI
MOV byte ptr [RSP + 0xc],DL
MOV RDI,qword ptr [RSI]
MOV RDX,qword ptr [RSI + 0x8]
LEA R12,[RDI + RDX*0x1]
CMP RDI,R12
JZ 0x0010129d
MOV EAX,0x0
LAB_00101294:
ADD RAX,0x1
CMP RDX,RAX
JNZ 0x00101294
LAB_0010129d:
LEA RDX,[RSP + 0xc]
MOV RSI,R1... | /* func0(std::string, char) */
long * func0(long *param_1,long *param_2,int param_3)
{
long *plVar1;
long lVar2;
__normal_iterator _Var3;
long lVar4;
int4 extraout_var;
uint uVar5;
long lVar6;
uint uVar7;
ulong uVar8;
int local_1c [4];
lVar2 = *param_2;
lVar6 = lVar2 + param_2[1];
if (lVa... |
1,506 | func0 |
#include <iostream>
#include <string>
#include <assert.h>
#include <algorithm>
| std::string func0(std::string s, char c) {
int counts = std::count(s.begin(), s.end(), c);
s.erase(std::remove(s.begin(), s.end(), c), s.end());
return s;
}
| int main() {
assert(func0("aba", 'a') == "b");
assert(func0("toggle", 'g') == "tole");
assert(func0("aabbc", 'b') == "aac");
return 0;
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char):
endbr64
push %r12
mov %rdi,%r12
mov %edx,%eax
push %rbx
mov %rsi,%rbx
mov %edx,%esi
sub $0x8,%rsp
mov 0x8(%rbx),%r8
mov (%rbx),%rdi
mov %r8,%rcx
lea (%rdi,%r8,1),%rdx
sar $0x2,%rcx
test %rcx... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEc:
endbr64
push rbp
mov ecx, edx
mov rbp, rdi
push rbx
mov rbx, rsi
sub rsp, 8
mov r8, [rsi+8]
mov r9, [rsi]
mov rax, r8
lea rdi, [r9+r8]
sar rax, 2
test rax, rax
jle loc_1689
lea rsi, [r9+rax*4]
mov rax... | _QWORD * func0(_QWORD *a1, _QWORD *a2, char a3)
{
long long v6; // r8
_BYTE *v7; // r9
_BYTE *v8; // rdi
_BYTE *v9; // rax
_BYTE *v10; // rdx
_QWORD *v11; // rcx
char *v12; // rax
long long v13; // rsi
_QWORD *result; // rax
long long v15; // rsi
unsigned int v16; // edx
unsigned long long v17; ... | func0:
ENDBR64
PUSH RBP
MOV ECX,EDX
MOV RBP,RDI
PUSH RBX
MOV RBX,RSI
SUB RSP,0x8
MOV R8,qword ptr [RSI + 0x8]
MOV R9,qword ptr [RSI]
MOV RAX,R8
LEA RDI,[R9 + R8*0x1]
SAR RAX,0x2
TEST RAX,RAX
JLE 0x00101689
LEA RSI,[R9 + RAX*0x4]
MOV RAX,R9
JMP 0x001014b8
LAB_00101490:
CMP byte ptr [RAX + 0x1],CL
JZ 0x00101570
CMP byte ... | /* func0(std::string, char) */
int8 * func0(int8 *param_1,long *param_2,char param_3)
{
long *plVar1;
char *pcVar2;
char *pcVar3;
char *pcVar4;
uint uVar5;
long lVar6;
uint uVar7;
char *pcVar8;
ulong uVar9;
ulong uVar10;
uVar10 = param_2[1];
pcVar3 = (char *)*param_2;
pcVar2 = pcVar3 + uV... |
1,507 | func0 |
#include <iostream>
#include <string>
#include <assert.h>
#include <algorithm>
| std::string func0(std::string s, char c) {
int counts = std::count(s.begin(), s.end(), c);
s.erase(std::remove(s.begin(), s.end(), c), s.end());
return s;
}
| int main() {
assert(func0("aba", 'a') == "b");
assert(func0("toggle", 'g') == "tole");
assert(func0("aabbc", 'b') == "aac");
return 0;
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char):
endbr64
push %r12
mov %rdi,%r12
mov %edx,%eax
push %rbx
mov %rsi,%rbx
mov %edx,%esi
sub $0x8,%rsp
mov 0x8(%rbx),%r8
mov (%rbx),%rdi
mov %r8,%rcx
lea (%rdi,%r8,1),%rdx
sar $0x2,%rcx
test %rcx... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEc:
endbr64
push rbp
mov ecx, edx
mov rbp, rdi
push rbx
mov rbx, rsi
sub rsp, 8
mov r8, [rsi+8]
mov r9, [rsi]
mov rax, r8
lea rdi, [r9+r8]
sar rax, 2
test rax, rax
jle loc_1691
lea rsi, [r9+rax*4]
mov rax... | _QWORD * func0(_QWORD *a1, _QWORD *a2, char a3)
{
long long v6; // r8
_BYTE *v7; // r9
_BYTE *v8; // rdi
_BYTE *v9; // rax
_BYTE *v10; // rdx
_QWORD *v11; // rcx
char *v12; // rax
long long v13; // rsi
_QWORD *result; // rax
long long v15; // rsi
unsigned int v16; // edx
unsigned long long v17; ... | func0:
ENDBR64
PUSH RBP
MOV ECX,EDX
MOV RBP,RDI
PUSH RBX
MOV RBX,RSI
SUB RSP,0x8
MOV R8,qword ptr [RSI + 0x8]
MOV R9,qword ptr [RSI]
MOV RAX,R8
LEA RDI,[R9 + R8*0x1]
SAR RAX,0x2
TEST RAX,RAX
JLE 0x00101691
LEA RSI,[R9 + RAX*0x4]
MOV RAX,R9
JMP 0x001014b8
LAB_00101490:
CMP byte ptr [RAX + 0x1],CL
JZ 0x00101578
CMP byte ... | /* func0(std::string, char) */
int8 * func0(int8 *param_1,long *param_2,char param_3)
{
long *plVar1;
char *pcVar2;
char *pcVar3;
char *pcVar4;
uint uVar5;
long lVar6;
uint uVar7;
char *pcVar8;
ulong uVar9;
ulong uVar10;
uVar10 = param_2[1];
pcVar3 = (char *)*param_2;
pcVar2 = pcVar3 + uV... |
1,508 | func0 |
#include <vector>
#include <cassert>
using namespace std;
| vector<int> func0(vector<int> test_list) {
if (!test_list.empty()) {
vector<int> temp = {test_list.back()};
temp.insert(temp.end(), test_list.begin(), test_list.end() - 1);
return temp;
}
return test_list;
}
| int main() {
assert((func0({1,2,3,4}) == vector<int>{4,1,2,3}));
assert((func0({0,1,2,3}) == vector<int>{3,0,1,2}));
assert((func0({9,8,7,1}) == vector<int>{1,9,8,7}));
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> >):
endbr64
push %rbp
mov %rsp,%rbp
push %r13
push %r12
push %rbx
sub $0x68,%rsp
mov %rdi,-0x78(%rbp)
mov %rsi,-0x80(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x28(%rbp)
xor %eax,%eax
mov -0x80(%rbp),%rax
mov %rax,%rdi
callq 1ace <_ZNKSt6vectorIiSaI... | _Z5func0St6vectorIiSaIiEE:
endbr64
push rbp
mov rbp, rsp
push r13
push r12
push rbx
sub rsp, 68h
mov [rbp+var_78], rdi
mov [rbp+var_80], rsi
mov rax, fs:28h
mov [rbp+var_28], rax
xor eax, eax
mov rax, [rbp+var_80]
mov rdi, rax
call _ZNKSt6vectorIiSaIiEE5emptyEv; std::v... | long long func0(long long a1, long long a2)
{
long long v2; // r12
long long v3; // rbx
long long v5; // [rsp+10h] [rbp-70h] BYREF
long long v6; // [rsp+18h] [rbp-68h] BYREF
_QWORD v7[2]; // [rsp+20h] [rbp-60h] BYREF
_BYTE v8[36]; // [rsp+30h] [rbp-50h] BYREF
int v9; // [rsp+54h] [rbp-2Ch] BYREF
unsign... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV qword ptr [RBP + -0x78],RDI
MOV qword ptr [RBP + -0x80],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x80]
MOV RDI,RAX
CALL 0x00101b66
XOR EAX,0x1
TEST AL,AL
JZ 0x001013ef
MOV RAX,qwo... | /* func0(std::vector<int, std::allocator<int> >) */
vector<int,std::allocator<int>> * func0(vector param_1)
{
char cVar1;
int4 *puVar2;
int8 uVar3;
int8 uVar4;
vector<int,std::allocator<int>> *in_RSI;
int4 in_register_0000003c;
vector<int,std::allocator<int>> *this;
long in_FS_OFFSET;
int8 local_78;... |
1,509 | func0 |
#include <vector>
#include <cassert>
using namespace std;
| vector<int> func0(vector<int> test_list) {
if (!test_list.empty()) {
vector<int> temp = {test_list.back()};
temp.insert(temp.end(), test_list.begin(), test_list.end() - 1);
return temp;
}
return test_list;
}
| int main() {
assert((func0({1,2,3,4}) == vector<int>{4,1,2,3}));
assert((func0({0,1,2,3}) == vector<int>{3,0,1,2}));
assert((func0({9,8,7,1}) == vector<int>{1,9,8,7}));
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> >):
endbr64
push %r12
push %rbp
push %rbx
sub $0x20,%rsp
mov %rdi,%rbp
mov %rsi,%rbx
mov %fs:0x28,%rax
mov %rax,0x18(%rsp)
xor %eax,%eax
mov 0x8(%rsi),%rax
mov (%rsi),%rdx
cmp %rax,%rdx
je 1320 <_Z5func0St6vectorIiSaIiEE+0xd7>
mov -0x4(%... | _Z5func0St6vectorIiSaIiEE:
endbr64
push r12
push rbp
push rbx
sub rsp, 20h
mov rbp, rdi
mov rbx, rsi
mov rax, fs:28h
mov [rsp+38h+var_20], rax
xor eax, eax
mov rax, [rsi+8]
mov rdx, [rsi]
cmp rdx, rax
jz loc_132F
mov r12d, [rax-4]
mov [rsp+38h+var_38], 0
mov ... | _QWORD * func0(_QWORD *a1, _QWORD *a2)
{
long long v2; // rax
int v3; // r12d
_DWORD *v4; // rax
_DWORD *v6; // [rsp+0h] [rbp-38h] BYREF
_DWORD *v7; // [rsp+8h] [rbp-30h]
_DWORD *v8; // [rsp+10h] [rbp-28h]
unsigned long long v9; // [rsp+18h] [rbp-20h]
v9 = __readfsqword(0x28u);
v2 = a2[1];
if ( *a2... | func0:
ENDBR64
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x20
MOV RBP,RDI
MOV RBX,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RSI + 0x8]
MOV RDX,qword ptr [RSI]
CMP RDX,RAX
JZ 0x0010132f
MOV R12D,dword ptr [RAX + -0x4]
MOV qword ptr [RSP],0x0
MOV qword ptr [RSP + 0x8],0x0
MOV ... | /* func0(std::vector<int, std::allocator<int> >) */
long * func0(vector param_1)
{
int4 uVar1;
long lVar2;
long *in_RSI;
int4 in_register_0000003c;
long *plVar3;
long in_FS_OFFSET;
int4 *local_38;
int4 *local_30;
int4 *local_28;
long local_20;
plVar3 = (long *)CONCAT44(in_register_0000003c,pa... |
1,510 | func0 |
#include <vector>
#include <cassert>
using namespace std;
| vector<int> func0(vector<int> test_list) {
if (!test_list.empty()) {
vector<int> temp = {test_list.back()};
temp.insert(temp.end(), test_list.begin(), test_list.end() - 1);
return temp;
}
return test_list;
}
| int main() {
assert((func0({1,2,3,4}) == vector<int>{4,1,2,3}));
assert((func0({0,1,2,3}) == vector<int>{3,0,1,2}));
assert((func0({9,8,7,1}) == vector<int>{1,9,8,7}));
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> >):
endbr64
push %r12
mov %rdi,%r12
push %rbp
push %rbx
mov %rsi,%rbx
sub $0x20,%rsp
mov 0x8(%rsi),%rdx
mov %fs:0x28,%rax
mov %rax,0x18(%rsp)
xor %eax,%eax
mov (%rsi),%rax
cmp %rdx,%rax
je 16e0 <_Z5func0St6vectorIiSaIiEE+0xc0>
mov $0x4,%... | _Z5func0St6vectorIiSaIiEE:
endbr64
push r15
push r14
push r13
push r12
push rbp
mov rbp, rdi
push rbx
mov rbx, rsi
sub rsp, 38h
movdqu xmm0, xmmword ptr [rsi]
mov rax, fs:28h
mov [rsp+68h+var_40], rax
xor eax, eax
movhlps xmm1, xmm0
movq rdx, xmm0
movq rax, xmm1
cmp ... | __m128 * func0(__m128 *a1, const __m128i *a2, double a3, __m128 a4)
{
__m128 v4; // xmm0
unsigned long long v5; // xmm1_8
int v6; // r14d
_DWORD *v7; // rax
long long v8; // r13
_DWORD *v9; // r12
_DWORD *v10; // r14
_DWORD *v11; // r15
long long v12; // rax
size_t v13; // rbx
_DWORD *v14; // rcx
... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
MOV RBX,RSI
SUB RSP,0x38
MOVDQU XMM0,xmmword ptr [RSI]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x28],RAX
XOR EAX,EAX
MOVHLPS XMM1,XMM0
MOVQ RDX,XMM0
MOVQ RAX,XMM1
CMP RAX,RDX
JZ 0x00101730
PXOR XMM0,XMM0
MOV EDI,0x4
MOV R14D,dword... | /* func0(std::vector<int, std::allocator<int> >) */
long * func0(vector param_1)
{
int4 uVar1;
long lVar2;
int4 *__src;
long lVar3;
long lVar4;
int4 *puVar5;
int4 *puVar6;
ulong __n;
int4 *puVar7;
int (*in_RSI) [16];
int4 in_register_0000003c;
long *plVar8;
int4 *puVar9;
ulong uVar10;
in... |
1,511 | func0 |
#include <vector>
#include <cassert>
using namespace std;
| vector<int> func0(vector<int> test_list) {
if (!test_list.empty()) {
vector<int> temp = {test_list.back()};
temp.insert(temp.end(), test_list.begin(), test_list.end() - 1);
return temp;
}
return test_list;
}
| int main() {
assert((func0({1,2,3,4}) == vector<int>{4,1,2,3}));
assert((func0({0,1,2,3}) == vector<int>{3,0,1,2}));
assert((func0({9,8,7,1}) == vector<int>{1,9,8,7}));
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> >):
endbr64
push %r15
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
mov %rsi,%rbx
sub $0x18,%rsp
mov 0x8(%rsi),%rdx
mov (%rsi),%rax
cmp %rdx,%rax
je 1648 <_Z5func0St6vectorIiSaIiEE+0xd8>
mov -0x4(%rdx),%r13d
mov $0x4,%e... | _Z5func0St6vectorIiSaIiEE:
endbr64
push r15
push r14
push r13
push r12
push rbp
mov rbp, rdi
push rbx
mov rbx, rsi
sub rsp, 38h
movdqu xmm0, xmmword ptr [rsi]
mov rax, fs:28h
mov [rsp+68h+var_40], rax
xor eax, eax
movhlps xmm1, xmm0
movq rdx, xmm0
movq rax, xmm1
cmp ... | __m128 * func0(__m128 *a1, const __m128i *a2, double a3, __m128 a4)
{
__m128 v4; // xmm0
unsigned long long v5; // xmm1_8
int v6; // r14d
_DWORD *v7; // rax
long long v8; // r13
_DWORD *v9; // r12
_DWORD *v10; // r14
long long v11; // rax
size_t v12; // rbx
_DWORD *v13; // rcx
long long v14; // r1... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
MOV RBX,RSI
SUB RSP,0x38
MOVDQU XMM0,xmmword ptr [RSI]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x28],RAX
XOR EAX,EAX
MOVHLPS XMM1,XMM0
MOVQ RDX,XMM0
MOVQ RAX,XMM1
CMP RAX,RDX
JZ 0x001016c0
MOV R14D,dword ptr [RAX + -0x4]
MOV EDI,0... | /* func0(std::vector<int, std::allocator<int> >) */
long * func0(vector param_1)
{
int4 uVar1;
long lVar2;
long lVar3;
int4 *puVar4;
int4 *puVar5;
ulong __n;
int4 *puVar6;
long *plVar7;
int in_CL;
int extraout_DL;
int uVar8;
int (*in_RSI) [16];
vector vVar10;
int4 in_register_0000003c;
i... |
1,512 | func0 |
#include <assert.h>
| int func0(int l, int w, int h) {
int SA = 2 * (l * w + l * h + w * h);
return SA;
}
| int main() {
assert(func0(1, 2, 3) == 22);
assert(func0(5, 7, 9) == 286);
assert(func0(10, 15, 21) == 1350);
return 0;
}
| O0 | cpp | func0(int, int, int):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
mov %esi,-0x18(%rbp)
mov %edx,-0x1c(%rbp)
mov -0x14(%rbp),%eax
imul -0x18(%rbp),%eax
mov %eax,%edx
mov -0x14(%rbp),%eax
imul -0x1c(%rbp),%eax
add %eax,%edx
mov -0x18(%rbp),%eax
imul -0x1c(%rbp),%eax
add %edx... | _Z5func0iii:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_14], edi
mov [rbp+var_18], esi
mov [rbp+var_1C], edx
mov eax, [rbp+var_14]
imul eax, [rbp+var_18]
mov edx, eax
mov eax, [rbp+var_14]
imul eax, [rbp+var_1C]
add edx, eax
mov eax, [rbp+var_18]
imul eax, [rbp+var_1C]
ad... | long long func0(int a1, int a2, int a3)
{
return (unsigned int)(2 * (a3 * a1 + a2 * a1 + a3 * a2));
} | 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 EAX,dword ptr [RBP + -0x14]
IMUL EAX,dword ptr [RBP + -0x18]
MOV EDX,EAX
MOV EAX,dword ptr [RBP + -0x14]
IMUL EAX,dword ptr [RBP + -0x1c]
ADD EDX,EAX
MOV EAX,dword ptr [RBP + -0x18]
IM... | /* func0(int, int, int) */
int func0(int param_1,int param_2,int param_3)
{
return (param_2 * param_3 + param_1 * param_2 + param_1 * param_3) * 2;
} |
1,513 | func0 |
#include <assert.h>
| int func0(int l, int w, int h) {
int SA = 2 * (l * w + l * h + w * h);
return SA;
}
| int main() {
assert(func0(1, 2, 3) == 22);
assert(func0(5, 7, 9) == 286);
assert(func0(10, 15, 21) == 1350);
return 0;
}
| O1 | cpp | func0(int, int, int):
endbr64
mov %edi,%ecx
lea (%rdx,%rsi,1),%edi
imul %ecx,%edi
imul %edx,%esi
lea (%rdi,%rsi,1),%eax
add %eax,%eax
retq
| _Z5func0iii:
endbr64
lea eax, [rdx+rsi]
imul eax, edi
imul esi, edx
add eax, esi
add eax, eax
retn | long long func0(int a1, int a2, int a3)
{
return (unsigned int)(2 * (a3 * a2 + a1 * (a3 + a2)));
} | func0:
ENDBR64
LEA EAX,[RDX + RSI*0x1]
IMUL EAX,EDI
IMUL ESI,EDX
ADD EAX,ESI
ADD EAX,EAX
RET | /* func0(int, int, int) */
int func0(int param_1,int param_2,int param_3)
{
return ((param_3 + param_2) * param_1 + param_2 * param_3) * 2;
} |
1,514 | func0 |
#include <assert.h>
| int func0(int l, int w, int h) {
int SA = 2 * (l * w + l * h + w * h);
return SA;
}
| int main() {
assert(func0(1, 2, 3) == 22);
assert(func0(5, 7, 9) == 286);
assert(func0(10, 15, 21) == 1350);
return 0;
}
| O2 | cpp | func0(int, int, int):
endbr64
mov %edi,%r8d
lea (%rdx,%rsi,1),%edi
imul %r8d,%edi
imul %edx,%esi
lea (%rdi,%rsi,1),%eax
add %eax,%eax
retq
nopw 0x0(%rax,%rax,1)
| _Z5func0iii:
endbr64
lea eax, [rdx+rsi]
imul eax, edi
imul esi, edx
add eax, esi
add eax, eax
retn | long long func0(int a1, int a2, int a3)
{
return (unsigned int)(2 * (a3 * a2 + a1 * (a3 + a2)));
} | func0:
ENDBR64
LEA EAX,[RDX + RSI*0x1]
IMUL EAX,EDI
IMUL ESI,EDX
ADD EAX,ESI
ADD EAX,EAX
RET | /* func0(int, int, int) */
int func0(int param_1,int param_2,int param_3)
{
return ((param_3 + param_2) * param_1 + param_2 * param_3) * 2;
} |
1,515 | func0 |
#include <assert.h>
| int func0(int l, int w, int h) {
int SA = 2 * (l * w + l * h + w * h);
return SA;
}
| int main() {
assert(func0(1, 2, 3) == 22);
assert(func0(5, 7, 9) == 286);
assert(func0(10, 15, 21) == 1350);
return 0;
}
| O3 | cpp | func0(int, int, int):
endbr64
mov %edi,%r8d
lea (%rdx,%rsi,1),%edi
imul %r8d,%edi
imul %edx,%esi
lea (%rdi,%rsi,1),%eax
add %eax,%eax
retq
nopw 0x0(%rax,%rax,1)
| _Z5func0iii:
endbr64
lea eax, [rdx+rsi]
imul eax, edi
imul esi, edx
add eax, esi
add eax, eax
retn | long long func0(int a1, int a2, int a3)
{
return (unsigned int)(2 * (a3 * a2 + a1 * (a3 + a2)));
} | func0:
ENDBR64
LEA EAX,[RDX + RSI*0x1]
IMUL EAX,EDI
IMUL ESI,EDX
ADD EAX,ESI
ADD EAX,EAX
RET | /* func0(int, int, int) */
int func0(int param_1,int param_2,int param_3)
{
return ((param_3 + param_2) * param_1 + param_2 * param_3) * 2;
} |
1,516 | func0 |
#include <vector>
#include <assert.h>
| std::vector<std::vector<int>> func0(int rownum, int colnum) {
std::vector<std::vector<int>> multi_list(rownum, std::vector<int>(colnum, 0));
for (int row = 0; row < rownum; ++row) {
for (int col = 0; col < colnum; ++col) {
multi_list[row][col] = row * col;
}
}
return m... | int main() {
assert((func0(3,4) == std::vector<std::vector<int>>{{0, 0, 0, 0}, {0, 1, 2, 3}, {0, 2, 4, 6}}));
assert((func0(5,7) == std::vector<std::vector<int>>{{0, 0, 0, 0, 0, 0, 0}, {0, 1, 2, 3, 4, 5, 6}, {0, 2, 4, 6, 8, 10, 12}, {0, 3, 6, 9, 12, 15, 18}, {0, 4, 8, 12, 16, 20, 24}}));
assert((func0(10... | O0 | cpp | func0(int, int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x48,%rsp
mov %rdi,-0x48(%rbp)
mov %esi,-0x4c(%rbp)
mov %edx,-0x50(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
lea -0x3d(%rbp),%rax
mov %rax,%rdi
callq 2ad0 <_ZNSaISt6vectorIiSaIiEEEC1Ev>
lea -0x3e(%rbp)... | _Z5func0ii:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 58h
mov [rbp+var_58], rdi
mov [rbp+var_5C], esi
mov [rbp+var_60], edx
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_4D]
mov [rbp+var_38], rax
nop
nop
lea rax, [rbp+var_4E]
mov [rbp+va... | long long func0(long long a1, int a2, int a3)
{
int v3; // ebx
long long v4; // rax
char v7; // [rsp+12h] [rbp-4Eh] BYREF
char v8; // [rsp+13h] [rbp-4Dh] BYREF
int v9; // [rsp+14h] [rbp-4Ch] BYREF
int i; // [rsp+18h] [rbp-48h]
int j; // [rsp+1Ch] [rbp-44h]
char *v12; // [rsp+20h] [rbp-40h]
char *v13;... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x58
MOV qword ptr [RBP + -0x58],RDI
MOV dword ptr [RBP + -0x5c],ESI
MOV dword ptr [RBP + -0x60],EDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x4d]
MOV qword ptr [RBP + -0x38],RAX
NOP
NOP
LEA RAX,[RBP + -0x4e]
MOV qword ... | /* func0(int, int) */
vector<std::vector<int,std::allocator<int>>,std::allocator<std::vector<int,std::allocator<int>>>> *
func0(int param_1,int param_2)
{
int iVar1;
vector<int,std::allocator<int>> *this;
int *piVar2;
int in_EDX;
int4 in_register_0000003c;
vector<std::vector<int,std::allocator<int>>,std::... |
1,517 | func0 |
#include <vector>
#include <assert.h>
| std::vector<std::vector<int>> func0(int rownum, int colnum) {
std::vector<std::vector<int>> multi_list(rownum, std::vector<int>(colnum, 0));
for (int row = 0; row < rownum; ++row) {
for (int col = 0; col < colnum; ++col) {
multi_list[row][col] = row * col;
}
}
return m... | int main() {
assert((func0(3,4) == std::vector<std::vector<int>>{{0, 0, 0, 0}, {0, 1, 2, 3}, {0, 2, 4, 6}}));
assert((func0(5,7) == std::vector<std::vector<int>>{{0, 0, 0, 0, 0, 0, 0}, {0, 1, 2, 3, 4, 5, 6}, {0, 2, 4, 6, 8, 10, 12}, {0, 3, 6, 9, 12, 15, 18}, {0, 4, 8, 12, 16, 20, 24}}));
assert((func0(10... | O1 | cpp | func0(int, int):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x28,%rsp
mov %esi,0x8(%rsp)
mov %edx,%eax
mov %edx,0xc(%rsp)
cltq
movabs $0x1fffffffffffffff,%rdx
cmp %rdx,%rax
ja 136a <_Z5func0ii+0xa1>
mov %rdi,%rbx
test %rax,%rax
je 1376 <_Z5func0ii+0x... | _Z5func0ii:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 38h
mov rax, fs:28h
mov [rsp+68h+var_40], rax
xor eax, eax
movsxd rbp, edx
mov rax, rbp
shr rax, 3Dh
jnz loc_1384
mov rbx, rdi
mov r12d, esi
mov r13d, edx
test rbp, rbp
jz ... | _QWORD * func0(_QWORD *a1, int a2, int a3)
{
long long v3; // rbp
unsigned long long v7; // r14
_DWORD *v8; // rax
void *v9; // r15
_DWORD *v10; // rdx
long long v11; // rdi
long long v12; // rbp
long long v13; // rsi
int v14; // r8d
long long v15; // rax
int v16; // edx
unsigned long long v18; ... | 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
MOVSXD RBP,EDX
MOV RAX,RBP
SHR RAX,0x3d
JNZ 0x00101384
MOV RBX,RDI
MOV R12D,ESI
MOV R13D,EDX
TEST RBP,RBP
JZ 0x00101497
LEA R14,[RBP*0x4]
MOV qword ptr [RSP + 0x8],R14... | /* func0(int, int) */
long * func0(int param_1,int param_2)
{
int4 *puVar1;
vector *pvVar2;
int8 uVar3;
long lVar4;
int in_EDX;
int iVar5;
ulong uVar6;
long lVar7;
int4 in_register_0000003c;
long *plVar8;
int iVar9;
ulong uVar10;
long in_FS_OFFSET;
ulong local_60;
int4 *local_58;
int4 ... |
1,518 | func0 |
#include <vector>
#include <assert.h>
| std::vector<std::vector<int>> func0(int rownum, int colnum) {
std::vector<std::vector<int>> multi_list(rownum, std::vector<int>(colnum, 0));
for (int row = 0; row < rownum; ++row) {
for (int col = 0; col < colnum; ++col) {
multi_list[row][col] = row * col;
}
}
return m... | int main() {
assert((func0(3,4) == std::vector<std::vector<int>>{{0, 0, 0, 0}, {0, 1, 2, 3}, {0, 2, 4, 6}}));
assert((func0(5,7) == std::vector<std::vector<int>>{{0, 0, 0, 0, 0, 0, 0}, {0, 1, 2, 3, 4, 5, 6}, {0, 2, 4, 6, 8, 10, 12}, {0, 3, 6, 9, 12, 15, 18}, {0, 4, 8, 12, 16, 20, 24}}));
assert((func0(10... | O2 | cpp | func0(int, int):
endbr64
push %r15
movslq %edx,%rax
movabs $0x1fffffffffffffff,%rdx
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x28,%rsp
mov %esi,0x8(%rsp)
mov %eax,0xc(%rsp)
cmp %rdx,%rax
ja 20e7 <_Z5func0ii+0x1e7>
mov %rdi,%r15
test %rax,%rax
je 20c4 <_Z5func0ii+0x1c4>... | _Z5func0ii:
endbr64
push r15
push r14
push r13
push r12
push rbp
movsxd rbp, edx
push rbx
sub rsp, 38h
mov rax, fs:28h
mov [rsp+68h+var_40], rax
mov rax, rbp
shr rax, 3Dh
jnz loc_2049
pxor xmm0, xmm0
mov r12, rdi
mov ebx, esi
mov r15, rbp
movups [rsp+68h+var_50... | long long * func0(long long *a1, int a2, int a3)
{
long long v3; // rbp
void *v7; // r14
unsigned long long v8; // rdi
long long v9; // rbp
long long v10; // rdi
int v11; // ecx
long long v12; // r8
_DWORD *v13; // rax
int v14; // edx
_DWORD *v15; // rsi
int v17; // ecx
long long v18; // [rsp+8h... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
MOVSXD RBP,EDX
PUSH RBX
SUB RSP,0x38
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,RBP
SHR RAX,0x3d
JNZ 0x00102049
PXOR XMM0,XMM0
MOV R12,RDI
MOV EBX,ESI
MOV R15,RBP
MOVUPS xmmword ptr [RSP + 0x18],XMM0
TEST RBP,RBP
JZ 0x00102000
LEA R13,[... | /* func0(int, int) */
int (*) [16] func0(int param_1,int param_2)
{
int *piVar1;
long lVar2;
void *__s;
vector *pvVar3;
int *piVar4;
int iVar5;
int in_EDX;
int iVar6;
ulong uVar7;
int4 in_register_0000003c;
int (*pauVar8) [16];
long lVar9;
ulong uVar10;
void *pvVar11;
long in_FS_OFFSET;
... |
1,519 | func0 |
#include <vector>
#include <assert.h>
| std::vector<std::vector<int>> func0(int rownum, int colnum) {
std::vector<std::vector<int>> multi_list(rownum, std::vector<int>(colnum, 0));
for (int row = 0; row < rownum; ++row) {
for (int col = 0; col < colnum; ++col) {
multi_list[row][col] = row * col;
}
}
return m... | int main() {
assert((func0(3,4) == std::vector<std::vector<int>>{{0, 0, 0, 0}, {0, 1, 2, 3}, {0, 2, 4, 6}}));
assert((func0(5,7) == std::vector<std::vector<int>>{{0, 0, 0, 0, 0, 0, 0}, {0, 1, 2, 3, 4, 5, 6}, {0, 2, 4, 6, 8, 10, 12}, {0, 3, 6, 9, 12, 15, 18}, {0, 4, 8, 12, 16, 20, 24}}));
assert((func0(10... | O3 | cpp | func0(int, int):
endbr64
push %r15
movslq %edx,%rax
movabs $0x1fffffffffffffff,%rdx
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x28,%rsp
mov %rdi,0x18(%rsp)
mov %esi,0x4(%rsp)
cmp %rdx,%rax
ja 202c <_Z5func0ii+0x31c>
mov %rax,%rbp
test %rax,%rax
je 200d <_Z5func0ii+0x2fd... | _Z5func0ii:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 48h
mov [rsp+78h+var_60], rdi
mov rax, fs:28h
mov [rsp+78h+var_40], rax
xor eax, eax
movsxd rax, edx
mov [rsp+78h+n], rax
shr rax, 3Dh
jnz loc_2365
pxor xmm0, xmm0
cmp [rsp+78h+n]... | long long ** func0(long long **a1, int a2, int a3)
{
int *v5; // rax
char *v6; // r13
long long v7; // r14
unsigned long long v8; // r12
long long *v9; // rbx
signed long long v10; // r13
long long *v11; // rbx
char *v12; // rax
long long v13; // rdi
unsigned int v14; // ecx
long long *v15; // r11... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RSP + 0x18],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
MOVSXD RAX,EDX
MOV qword ptr [RSP + 0x10],RAX
SHR RAX,0x3d
JNZ 0x00102365
PXOR XMM0,XMM0
CMP qword ptr [RSP + 0x10],0x0
MOV R15D,ESI
MOV... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(int, int) */
int (*) [16] func0(int param_1,int param_2)
{
long lVar1;
int4 uVar2;
long lVar3;
long *plVar4;
int auVar5 [16];
int iVar6;
int iVar7;
int iVar8;
ulong uVar9;
int (*pauVar10) [16];
void *pv... |
1,520 | func0 |
#include <vector>
#include <tuple>
#include <algorithm>
#include <assert.h>
typedef std::tuple<std::string, int, int> Person;
| std::vector<Person> func0(std::vector<Person> list_data, int index_no) {
std::sort(list_data.begin(), list_data.end(),
[index_no](const Person &a, const Person &b) {
if (index_no == 0) return std::get<0>(a) < std::get<0>(b);
else if (index_no == 1) return std::g... | int main() {
std::vector<Person> input = {
std::make_tuple("Greyson Fulton", 98, 99),
std::make_tuple("Brady Kent", 97, 96),
std::make_tuple("Wyatt Knott", 91, 94),
std::make_tuple("Beau Turnbull", 94, 98)
};
std::vector<Person> expected0 = {
std::make_tuple... | O0 | cpp | func0(std::vector<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int>, std::allocator<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int> > >, int)::{lambda(std::tuple<std::__cxx11::basic_string<char, std::char_traits<ch... | ||||
1,521 | func0 |
#include <vector>
#include <tuple>
#include <algorithm>
#include <assert.h>
typedef std::tuple<std::string, int, int> Person;
| std::vector<Person> func0(std::vector<Person> list_data, int index_no) {
std::sort(list_data.begin(), list_data.end(),
[index_no](const Person &a, const Person &b) {
if (index_no == 0) return std::get<0>(a) < std::get<0>(b);
else if (index_no == 1) return std::g... | int main() {
std::vector<Person> input = {
std::make_tuple("Greyson Fulton", 98, 99),
std::make_tuple("Brady Kent", 97, 96),
std::make_tuple("Wyatt Knott", 91, 94),
std::make_tuple("Beau Turnbull", 94, 98)
};
std::vector<Person> expected0 = {
std::make_tuple... | O1 | cpp | void std::__adjust_heap<__gnu_cxx::__normal_iterator<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int>*, std::vector<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int>, std::allocator<std::tuple<std::__cxx11::basic_st... | ||||
1,522 | func0 |
#include <vector>
#include <tuple>
#include <algorithm>
#include <assert.h>
typedef std::tuple<std::string, int, int> Person;
| std::vector<Person> func0(std::vector<Person> list_data, int index_no) {
std::sort(list_data.begin(), list_data.end(),
[index_no](const Person &a, const Person &b) {
if (index_no == 0) return std::get<0>(a) < std::get<0>(b);
else if (index_no == 1) return std::g... | int main() {
std::vector<Person> input = {
std::make_tuple("Greyson Fulton", 98, 99),
std::make_tuple("Brady Kent", 97, 96),
std::make_tuple("Wyatt Knott", 91, 94),
std::make_tuple("Beau Turnbull", 94, 98)
};
std::vector<Person> expected0 = {
std::make_tuple... | O2 | cpp | void std::__unguarded_linear_insert<__gnu_cxx::__normal_iterator<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int>*, std::vector<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int>, std::allocator<std::tuple<std::__cxx... | ||||
1,523 | func0 |
#include <vector>
#include <tuple>
#include <algorithm>
#include <assert.h>
typedef std::tuple<std::string, int, int> Person;
| std::vector<Person> func0(std::vector<Person> list_data, int index_no) {
std::sort(list_data.begin(), list_data.end(),
[index_no](const Person &a, const Person &b) {
if (index_no == 0) return std::get<0>(a) < std::get<0>(b);
else if (index_no == 1) return std::g... | int main() {
std::vector<Person> input = {
std::make_tuple("Greyson Fulton", 98, 99),
std::make_tuple("Brady Kent", 97, 96),
std::make_tuple("Wyatt Knott", 91, 94),
std::make_tuple("Beau Turnbull", 94, 98)
};
std::vector<Person> expected0 = {
std::make_tuple... | O3 | cpp | void std::__unguarded_linear_insert<__gnu_cxx::__normal_iterator<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int>*, std::vector<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int>, std::allocator<std::tuple<std::__cxx... | ||||
1,524 | func0 |
#include <vector>
#include <cassert>
| int func0(const std::vector<int>& A) {
int left = 0;
int right = A.size() - 1;
while (left <= right) {
if (A[left] <= A[right]) {
return left;
}
int mid = (left + right) / 2;
int next = (mid + 1) % A.size();
int prev = (mid - 1 + A.size()) % A.siz... | int main() {
assert(func0({8, 9, 10, 1, 2, 3, 4, 5, 6, 7}) == 3);
assert(func0({8, 9, 10, 2, 5, 6}) == 3);
assert(func0({2, 5, 6, 8, 9, 10}) == 0);
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x38,%rsp
mov %rdi,-0x38(%rbp)
movl $0x0,-0x24(%rbp)
mov -0x38(%rbp),%rax
mov %rax,%rdi
callq 1738 <_ZNKSt6vectorIiSaIiEE4sizeEv>
sub $0x1,%eax
mov %eax,-0x20(%rbp)
mov -0x24(%rbp),%eax
cm... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 38h
mov [rbp+var_38], rdi
mov [rbp+var_24], 0
mov rax, [rbp+var_38]
mov rdi, rax
call _ZNKSt6vectorIiSaIiEE4sizeEv; std::vector<int>::size(void)
sub eax, 1
mov [rbp+var_20], eax
jmp loc_1430
loc_127... | long long func0(long long a1)
{
int v1; // ebx
unsigned long long v3; // rbx
int v4; // ebx
int v6; // ebx
int v7; // ebx
int v8; // [rsp+1Ch] [rbp-24h]
int v9; // [rsp+20h] [rbp-20h]
int v10; // [rsp+24h] [rbp-1Ch]
int v11; // [rsp+28h] [rbp-18h]
int v12; // [rsp+2Ch] [rbp-14h]
v8 = 0;
v9 = s... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x38
MOV qword ptr [RBP + -0x38],RDI
MOV dword ptr [RBP + -0x24],0x0
MOV RAX,qword ptr [RBP + -0x38]
MOV RDI,RAX
CALL 0x00101796
SUB EAX,0x1
MOV dword ptr [RBP + -0x20],EAX
JMP 0x00101430
LAB_00101278:
MOV EAX,dword ptr [RBP + -0x24]
MOVSXD RDX,EAX
MOV RAX,qword ptr ... | /* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
int iVar1;
bool bVar2;
int iVar3;
int *piVar4;
ulong uVar5;
long lVar6;
ulong uVar7;
int local_2c;
int local_28;
local_2c = 0;
local_28 = std::vector<int,std::allocator<int>>::size((vector<int,std::allocat... |
1,525 | func0 |
#include <vector>
#include <cassert>
| int func0(const std::vector<int>& A) {
int left = 0;
int right = A.size() - 1;
while (left <= right) {
if (A[left] <= A[right]) {
return left;
}
int mid = (left + right) / 2;
int next = (mid + 1) % A.size();
int prev = (mid - 1 + A.size()) % A.siz... | int main() {
assert(func0({8, 9, 10, 1, 2, 3, 4, 5, 6, 7}) == 3);
assert(func0({8, 9, 10, 2, 5, 6}) == 3);
assert(func0({2, 5, 6, 8, 9, 10}) == 0);
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %r13
push %r12
push %rbp
push %rbx
mov (%rdi),%rsi
mov 0x8(%rdi),%rcx
sub %rsi,%rcx
sar $0x2,%rcx
mov %rcx,%rdi
sub $0x1,%ecx
mov $0x0,%r10d
movslq %r10d,%rax
lea (%rsi,%rax,4),%rbx
jmp 123e <_Z5func0RKSt6vectorIiSaIiE... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
mov r8, [rdi]
mov r15, [rdi+8]
sub r15, r8
sar r15, 2
mov rbp, r15
lea esi, [r15-1]
mov r11d, 0
mov r14, r15
loc_1235:
movsxd rax, r11d
lea r13, [r8+rax*4]
jmp short loc_... | long long func0(long long *a1)
{
long long v1; // r8
unsigned long long v2; // r15
int v3; // esi
int v4; // r11d
int v5; // ebx
int v6; // r9d
int v7; // ecx
int v8; // edi
v1 = *a1;
v2 = (a1[1] - *a1) >> 2;
v3 = v2 - 1;
v4 = 0;
while ( v3 >= v4 )
{
v5 = *(_DWORD *)(v1 + 4LL * v4);
... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV R8,qword ptr [RDI]
MOV R15,qword ptr [RDI + 0x8]
SUB R15,R8
SAR R15,0x2
MOV RBP,R15
LEA ESI,[R15 + -0x1]
MOV R11D,0x0
MOV R14,R15
LAB_00101235:
MOVSXD RAX,R11D
LEA R13,[R8 + RAX*0x4]
JMP 0x00101246
LAB_0010123e:
CMP R9D,EDI
JL 0x001012a7
MOV ESI,R... | /* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
int iVar1;
int iVar2;
int iVar3;
long lVar4;
int iVar5;
int iVar6;
int iVar7;
int iVar8;
ulong uVar9;
lVar4 = *(long *)param_1;
uVar9 = *(long *)(param_1 + 8) - lVar4 >> 2;
iVar7 = (int)uVar9 + -1;
iVa... |
1,526 | func0 |
#include <vector>
#include <cassert>
| int func0(const std::vector<int>& A) {
int left = 0;
int right = A.size() - 1;
while (left <= right) {
if (A[left] <= A[right]) {
return left;
}
int mid = (left + right) / 2;
int next = (mid + 1) % A.size();
int prev = (mid - 1 + A.size()) % A.siz... | int main() {
assert(func0({8, 9, 10, 1, 2, 3, 4, 5, 6, 7}) == 3);
assert(func0({8, 9, 10, 2, 5, 6}) == 3);
assert(func0({2, 5, 6, 8, 9, 10}) == 0);
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %r14
xor %r11d,%r11d
xor %r14d,%r14d
push %r13
push %r12
push %rbp
push %rbx
mov (%rdi),%rsi
mov 0x8(%rdi),%rdi
sub %rsi,%rdi
sar $0x2,%rdi
lea -0x1(%rdi),%r9d
lea (%rsi,%r14,4),%r13
cmp %r11d,%r9d
jl 148c <_Z5fu... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push r14
xor r11d, r11d
xor r14d, r14d
push r13
push r12
push rbp
push rbx
mov rsi, [rdi]
mov rdi, [rdi+8]
sub rdi, rsi
sar rdi, 2
lea r9d, [rdi-1]
loc_13B4:
lea r13, [rsi+r14*4]
loc_13B8:
cmp r9d, r11d
jl short loc_1426
loc_13... | long long func0(long long *a1)
{
int v1; // r11d
long long v2; // r14
long long v3; // rsi
unsigned long long v4; // rdi
int v5; // r9d
_DWORD *v6; // r13
int v7; // r10d
int v8; // ecx
int v9; // ebp
int v10; // r8d
v1 = 0;
v2 = 0LL;
v3 = *a1;
v4 = (a1[1] - *a1) >> 2;
v5 = v4 - 1;
LABEL... | func0:
ENDBR64
PUSH R14
XOR R11D,R11D
XOR R14D,R14D
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV RSI,qword ptr [RDI]
MOV RDI,qword ptr [RDI + 0x8]
SUB RDI,RSI
SAR RDI,0x2
LEA R9D,[RDI + -0x1]
LAB_001013b4:
LEA R13,[RSI + R14*0x4]
LAB_001013b8:
CMP R9D,R11D
JL 0x00101426
LAB_001013bd:
MOVSXD RAX,R9D
MOV EBX,dword ptr [R13]
M... | /* func0(std::vector<int, std::allocator<int> > const&) */
ulong func0(vector *param_1)
{
int iVar1;
int iVar2;
int iVar3;
long lVar4;
int iVar5;
uint uVar6;
ulong uVar7;
int iVar8;
int *piVar9;
ulong uVar10;
ulong uVar11;
uVar11 = 0;
uVar10 = 0;
lVar4 = *(long *)param_1;
uVar7 = *(lo... |
1,527 | func0 |
#include <vector>
#include <cassert>
| int func0(const std::vector<int>& A) {
int left = 0;
int right = A.size() - 1;
while (left <= right) {
if (A[left] <= A[right]) {
return left;
}
int mid = (left + right) / 2;
int next = (mid + 1) % A.size();
int prev = (mid - 1 + A.size()) % A.siz... | int main() {
assert(func0({8, 9, 10, 1, 2, 3, 4, 5, 6, 7}) == 3);
assert(func0({8, 9, 10, 2, 5, 6}) == 3);
assert(func0({2, 5, 6, 8, 9, 10}) == 0);
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %r14
xor %r11d,%r11d
xor %r14d,%r14d
push %r13
push %r12
push %rbp
push %rbx
mov (%rdi),%rsi
mov 0x8(%rdi),%rdi
sub %rsi,%rdi
sar $0x2,%rdi
lea -0x1(%rdi),%r9d
lea (%rsi,%r14,4),%r13
cmp %r11d,%r9d
jl 143c <_Z5fu... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push r14
xor r11d, r11d
xor r14d, r14d
push r13
push r12
push rbp
push rbx
mov rsi, [rdi]
mov rdi, [rdi+8]
sub rdi, rsi
sar rdi, 2
lea r9d, [rdi-1]
loc_13B4:
lea r13, [rsi+r14*4]
loc_13B8:
cmp r9d, r11d
jl short loc_1426
loc_13... | long long func0(long long *a1)
{
int v1; // r11d
long long v2; // r14
long long v3; // rsi
unsigned long long v4; // rdi
int v5; // r9d
_DWORD *v6; // r13
int v7; // r10d
int v8; // ecx
int v9; // ebp
int v10; // r8d
v1 = 0;
v2 = 0LL;
v3 = *a1;
v4 = (a1[1] - *a1) >> 2;
v5 = v4 - 1;
LABEL... | func0:
ENDBR64
PUSH R14
XOR R11D,R11D
XOR R14D,R14D
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV RSI,qword ptr [RDI]
MOV RDI,qword ptr [RDI + 0x8]
SUB RDI,RSI
SAR RDI,0x2
LEA R9D,[RDI + -0x1]
LAB_001013b4:
LEA R13,[RSI + R14*0x4]
LAB_001013b8:
CMP R9D,R11D
JL 0x00101426
LAB_001013bd:
MOVSXD RAX,R9D
MOV EBX,dword ptr [R13]
M... | /* func0(std::vector<int, std::allocator<int> > const&) */
ulong func0(vector *param_1)
{
int iVar1;
int iVar2;
int iVar3;
long lVar4;
int iVar5;
uint uVar6;
ulong uVar7;
int iVar8;
int *piVar9;
ulong uVar10;
ulong uVar11;
uVar11 = 0;
uVar10 = 0;
lVar4 = *(long *)param_1;
uVar7 = *(lo... |
1,528 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int n) {
int res = 0, count = 0, temp = n;
while (temp > 0) {
if (count % 2 == 0) {
res = res | (1 << count);
}
count++;
temp >>= 1;
}
return n ^ res;
}
| int main() {
assert(func0(10) == 15);
assert(func0(20) == 1);
assert(func0(30) == 11);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
movl $0x0,-0xc(%rbp)
movl $0x0,-0x8(%rbp)
mov -0x14(%rbp),%eax
mov %eax,-0x4(%rbp)
cmpl $0x0,-0x4(%rbp)
jle 11d2 <_Z5func0i+0x49>
mov -0x8(%rbp),%eax
and $0x1,%eax
test %eax,%eax
jne 11c9 <_Z5func0i+0x40>
mov -0x8(%rbp... | _Z5func0i:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_14], edi
mov [rbp+var_C], 0
mov [rbp+var_8], 0
mov eax, [rbp+var_14]
mov [rbp+var_4], eax
jmp short loc_118C
loc_116A:
mov eax, [rbp+var_8]
and eax, 1
test eax, eax
jnz short loc_1185
mov eax, [rbp+var_8]
mov edx... | long long func0(int a1)
{
int v2; // [rsp+8h] [rbp-Ch]
char v3; // [rsp+Ch] [rbp-8h]
int i; // [rsp+10h] [rbp-4h]
v2 = 0;
v3 = 0;
for ( i = a1; i > 0; i >>= 1 )
{
if ( (v3 & 1) == 0 )
v2 |= 1 << v3;
++v3;
}
return v2 ^ (unsigned int)a1;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x14],EDI
MOV dword ptr [RBP + -0xc],0x0
MOV dword ptr [RBP + -0x8],0x0
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0010118c
LAB_0010116a:
MOV EAX,dword ptr [RBP + -0x8]
AND EAX,0x1
TEST EAX,EAX
JNZ 0x00101185
MOV EAX,dword ptr [RBP + -0... | /* func0(int) */
uint func0(int param_1)
{
byte bVar1;
int4 local_14;
int4 local_c;
local_14 = 0;
bVar1 = 0;
for (local_c = param_1; 0 < local_c; local_c = local_c >> 1) {
if (!(bool)(bVar1 & 1)) {
local_14 = local_14 | 1 << (bVar1 & 0x1f);
}
bVar1 = bVar1 + 1;
}
return param_1 ^ ... |
1,529 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int n) {
int res = 0, count = 0, temp = n;
while (temp > 0) {
if (count % 2 == 0) {
res = res | (1 << count);
}
count++;
temp >>= 1;
}
return n ^ res;
}
| int main() {
assert(func0(10) == 15);
assert(func0(20) == 1);
assert(func0(30) == 11);
return 0;
}
| O1 | cpp | func0(int):
endbr64
test %edi,%edi
jle 11bc <_Z5func0i+0x33>
mov %edi,%edx
mov $0x0,%ecx
mov $0x0,%eax
mov $0x1,%r8d
jmp 11ae <_Z5func0i+0x25>
add $0x1,%ecx
sar %edx
test %edx,%edx
jle 11c1 <_Z5func0i+0x38>
test $0x1,%cl
jne 11a5 <_Z5func0i+0x1c>
mov %r8d,%esi
shl %cl,%esi
or ... | _Z5func0i:
endbr64
mov eax, edi
test edi, edi
jle short loc_117F
mov edx, edi
mov ecx, 0
mov esi, 0
mov edi, 1
jmp short loc_116F
loc_1166:
add ecx, 1
sar edx, 1
test edx, edx
jle short loc_1184
loc_116F:
test cl, 1
jnz short loc_1166
mov r8d, edi
shl r8d, cl... | long long func0(int a1)
{
int v1; // edx
char v2; // cl
int v3; // esi
if ( a1 <= 0 )
{
v3 = 0;
}
else
{
v1 = a1;
v2 = 0;
v3 = 0;
do
{
if ( (v2 & 1) == 0 )
v3 |= 1 << v2;
++v2;
v1 >>= 1;
}
while ( v1 > 0 );
}
return v3 ^ (unsigned int)a1;
} | func0:
ENDBR64
MOV EAX,EDI
TEST EDI,EDI
JLE 0x0010117f
MOV EDX,EDI
MOV ECX,0x0
MOV ESI,0x0
MOV EDI,0x1
JMP 0x0010116f
LAB_00101166:
ADD ECX,0x1
SAR EDX,0x1
TEST EDX,EDX
JLE 0x00101184
LAB_0010116f:
TEST CL,0x1
JNZ 0x00101166
MOV R8D,EDI
SHL R8D,CL
OR ESI,R8D
JMP 0x00101166
LAB_0010117f:
MOV ESI,0x0
LAB_00101184:
XOR EA... | /* func0(int) */
uint func0(int param_1)
{
bool bVar1;
int iVar2;
uint uVar3;
if (param_1 < 1) {
uVar3 = 0;
}
else {
bVar1 = false;
uVar3 = 0;
iVar2 = param_1;
do {
if (!bVar1) {
uVar3 = uVar3 | 1 << bVar1;
}
bVar1 = (bool)(bVar1 ^ 1);
iVar2 = iVar2 >... |
1,530 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int n) {
int res = 0, count = 0, temp = n;
while (temp > 0) {
if (count % 2 == 0) {
res = res | (1 << count);
}
count++;
temp >>= 1;
}
return n ^ res;
}
| int main() {
assert(func0(10) == 15);
assert(func0(20) == 1);
assert(func0(30) == 11);
return 0;
}
| O2 | cpp | func0(int):
endbr64
test %edi,%edi
jle 11f0 <_Z5func0i+0x30>
mov %edi,%edx
xor %ecx,%ecx
xor %eax,%eax
mov $0x1,%r8d
nopl 0x0(%rax)
test $0x1,%cl
jne 11e4 <_Z5func0i+0x24>
mov %r8d,%esi
shl %cl,%esi
or %esi,%eax
add $0x1,%ecx
sar %edx
jne 11d8 <_Z5func0i+0x18>
xor %edi,%eax... | _Z5func0i:
endbr64
test edi, edi
jle short loc_1228
mov edx, edi
xor ecx, ecx
xor esi, esi
mov eax, 1
nop dword ptr [rax+rax+00h]
loc_1208:
test cl, 1
jnz short loc_1216
mov r8d, eax
shl r8d, cl
or esi, r8d
loc_1216:
add ecx, 1
sar edx, 1
jnz short loc_1208
mov... | long long func0(int a1)
{
int v1; // edx
char v2; // cl
int v3; // esi
if ( a1 <= 0 )
return (unsigned int)a1;
v1 = a1;
v2 = 0;
v3 = 0;
do
{
if ( (v2 & 1) == 0 )
v3 |= 1 << v2;
++v2;
v1 >>= 1;
}
while ( v1 );
return v3 ^ (unsigned int)a1;
} | func0:
ENDBR64
TEST EDI,EDI
JLE 0x00101228
MOV EDX,EDI
XOR ECX,ECX
XOR ESI,ESI
MOV EAX,0x1
NOP dword ptr [RAX + RAX*0x1]
LAB_00101208:
TEST CL,0x1
JNZ 0x00101216
MOV R8D,EAX
SHL R8D,CL
OR ESI,R8D
LAB_00101216:
ADD ECX,0x1
SAR EDX,0x1
JNZ 0x00101208
MOV EAX,EDI
XOR EAX,ESI
RET
LAB_00101228:
MOV EAX,EDI
RET | /* func0(int) */
uint func0(int param_1)
{
byte bVar1;
int iVar2;
uint uVar3;
if (0 < param_1) {
bVar1 = 0;
uVar3 = 0;
iVar2 = param_1;
do {
if (!(bool)(bVar1 & 1)) {
uVar3 = uVar3 | 1 << (bVar1 & 0x1f);
}
bVar1 = bVar1 + 1;
iVar2 = iVar2 >> 1;
} while (i... |
1,531 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int n) {
int res = 0, count = 0, temp = n;
while (temp > 0) {
if (count % 2 == 0) {
res = res | (1 << count);
}
count++;
temp >>= 1;
}
return n ^ res;
}
| int main() {
assert(func0(10) == 15);
assert(func0(20) == 1);
assert(func0(30) == 11);
return 0;
}
| O3 | cpp | func0(int):
endbr64
test %edi,%edi
jle 11f0 <_Z5func0i+0x30>
mov %edi,%edx
xor %ecx,%ecx
xor %eax,%eax
mov $0x1,%r8d
nopl 0x0(%rax)
test $0x1,%cl
jne 11e4 <_Z5func0i+0x24>
mov %r8d,%esi
shl %cl,%esi
or %esi,%eax
add $0x1,%ecx
sar %edx
jne 11d8 <_Z5func0i+0x18>
xor %edi,%eax... | _Z5func0i:
endbr64
test edi, edi
jle short loc_1178
mov edx, edi
xor ecx, ecx
xor esi, esi
mov eax, 1
nop dword ptr [rax+rax+00h]
loc_1158:
test cl, 1
jnz short loc_1166
mov r8d, eax
shl r8d, cl
or esi, r8d
loc_1166:
add ecx, 1
sar edx, 1
jnz short loc_1158
mov... | long long func0(int a1)
{
int v1; // edx
char v2; // cl
int v3; // esi
if ( a1 <= 0 )
return (unsigned int)a1;
v1 = a1;
v2 = 0;
v3 = 0;
do
{
if ( (v2 & 1) == 0 )
v3 |= 1 << v2;
++v2;
v1 >>= 1;
}
while ( v1 );
return v3 ^ (unsigned int)a1;
} | func0:
ENDBR64
TEST EDI,EDI
JLE 0x00101178
MOV EDX,EDI
XOR ECX,ECX
XOR ESI,ESI
MOV EAX,0x1
NOP dword ptr [RAX + RAX*0x1]
LAB_00101158:
TEST CL,0x1
JNZ 0x00101166
MOV R8D,EAX
SHL R8D,CL
OR ESI,R8D
LAB_00101166:
ADD ECX,0x1
SAR EDX,0x1
JNZ 0x00101158
MOV EAX,EDI
XOR EAX,ESI
RET
LAB_00101178:
MOV EAX,EDI
RET | /* func0(int) */
uint func0(int param_1)
{
byte bVar1;
int iVar2;
uint uVar3;
if (0 < param_1) {
bVar1 = 0;
uVar3 = 0;
iVar2 = param_1;
do {
if (!(bool)(bVar1 & 1)) {
uVar3 = uVar3 | 1 << (bVar1 & 0x1f);
}
bVar1 = bVar1 + 1;
iVar2 = iVar2 >> 1;
} while (i... |
1,532 | func0 |
#include <iostream>
#include <cassert>
| int func0(int n, int arr[]) {
int mn = arr[0];
int freq = 1;
for (int i = 1; i < n; ++i) {
if (arr[i] < mn) {
mn = arr[i];
freq = 1;
} else if (arr[i] == mn) {
freq += 1;
}
}
return freq;
}
| int main() {
int arr1[] = {1, 2, 3, 4, 3};
int arr2[] = {3, 1, 2, 5, 6, 2, 3};
int arr3[] = {3, 3, 6, 3, 7, 4, 9};
assert(func0(5, arr1) == 1);
assert(func0(7, arr2) == 1);
assert(func0(7, arr3) == 3);
std::cout << "All test cases passed!" << std::endl;
return 0;
}
| O0 | cpp | func0(int, int*):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
mov %rsi,-0x20(%rbp)
mov -0x20(%rbp),%rax
mov (%rax),%eax
mov %eax,-0xc(%rbp)
movl $0x1,-0x8(%rbp)
movl $0x1,-0x4(%rbp)
mov -0x4(%rbp),%eax
cmp -0x14(%rbp),%eax
jge 1279 <_Z5func0iPi+0x90>
mov -0x4(%rbp),%eax
cltq... | _Z5func0iPi:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_14], edi
mov [rbp+var_20], rsi
mov rax, [rbp+var_20]
mov eax, [rax]
mov [rbp+var_C], eax
mov [rbp+var_8], 1
mov [rbp+var_4], 1
jmp short loc_1231
loc_11D1:
mov eax, [rbp+var_4]
cdqe
lea rdx, ds:0[rax*4]
mov rax, [... | long long func0(int a1, int *a2)
{
int v3; // [rsp+14h] [rbp-Ch]
unsigned int v4; // [rsp+18h] [rbp-8h]
int i; // [rsp+1Ch] [rbp-4h]
v3 = *a2;
v4 = 1;
for ( i = 1; i < a1; ++i )
{
if ( v3 <= a2[i] )
{
if ( v3 == a2[i] )
++v4;
}
else
{
v3 = a2[i];
v4 = 1;
... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x14],EDI
MOV qword ptr [RBP + -0x20],RSI
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0xc],EAX
MOV dword ptr [RBP + -0x8],0x1
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00101231
LAB_001011d1:
MOV EAX,dword ptr [RBP + -0x4]
CDQE
LEA RD... | /* func0(int, int*) */
int func0(int param_1,int *param_2)
{
int local_14;
int local_10;
int local_c;
local_14 = *param_2;
local_10 = 1;
for (local_c = 1; local_c < param_1; local_c = local_c + 1) {
if (param_2[local_c] < local_14) {
local_14 = param_2[local_c];
local_10 = 1;
}
... |
1,533 | func0 |
#include <iostream>
#include <cassert>
| int func0(int n, int arr[]) {
int mn = arr[0];
int freq = 1;
for (int i = 1; i < n; ++i) {
if (arr[i] < mn) {
mn = arr[i];
freq = 1;
} else if (arr[i] == mn) {
freq += 1;
}
}
return freq;
}
| int main() {
int arr1[] = {1, 2, 3, 4, 3};
int arr2[] = {3, 1, 2, 5, 6, 2, 3};
int arr3[] = {3, 3, 6, 3, 7, 4, 9};
assert(func0(5, arr1) == 1);
assert(func0(7, arr2) == 1);
assert(func0(7, arr3) == 3);
std::cout << "All test cases passed!" << std::endl;
return 0;
}
| O1 | cpp | func0(int, int*):
endbr64
mov (%rsi),%ecx
cmp $0x1,%edi
jle 1227 <_Z5func0iPi+0x3e>
lea 0x4(%rsi),%rax
lea -0x2(%rdi),%edx
lea 0x8(%rsi,%rdx,4),%rdi
mov $0x1,%esi
jmp 1217 <_Z5func0iPi+0x2e>
mov %edx,%ecx
mov $0x1,%esi
add $0x4,%rax
cmp %rdi,%rax
je 122c <_Z5func0iPi+0x43>
mov ... | _Z5func0iPi:
endbr64
mov ecx, [rsi]
cmp edi, 1
jle short loc_11E7
lea rax, [rsi+4]
lea edx, [rdi-2]
lea rdi, [rsi+rdx*4+8]
mov esi, 1
jmp short loc_11D7
loc_11C7:
mov ecx, edx
mov esi, 1
loc_11CE:
add rax, 4
cmp rax, rdi
jz short loc_11EC
loc_11D7:
mov edx, [rax]... | long long func0(int a1, int *a2)
{
int v2; // ecx
int *v3; // rax
int *v4; // rdi
unsigned int v5; // esi
v2 = *a2;
if ( a1 <= 1 )
{
return 1;
}
else
{
v3 = a2 + 1;
v4 = &a2[a1 - 2 + 2];
v5 = 1;
do
{
if ( *v3 < v2 )
{
v2 = *v3;
v5 = 1;
}
... | func0:
ENDBR64
MOV ECX,dword ptr [RSI]
CMP EDI,0x1
JLE 0x001011e7
LEA RAX,[RSI + 0x4]
LEA EDX,[RDI + -0x2]
LEA RDI,[RSI + RDX*0x4 + 0x8]
MOV ESI,0x1
JMP 0x001011d7
LAB_001011c7:
MOV ECX,EDX
MOV ESI,0x1
LAB_001011ce:
ADD RAX,0x4
CMP RAX,RDI
JZ 0x001011ec
LAB_001011d7:
MOV EDX,dword ptr [RAX]
CMP EDX,ECX
JL 0x001011c7
SE... | /* func0(int, int*) */
int func0(int param_1,int *param_2)
{
int iVar1;
int *piVar2;
int iVar3;
int iVar4;
iVar3 = *param_2;
if (param_1 < 2) {
iVar4 = 1;
}
else {
piVar2 = param_2 + 1;
iVar4 = 1;
do {
iVar1 = *piVar2;
if (iVar1 < iVar3) {
iVar4 = 1;
iVar... |
1,534 | func0 |
#include <iostream>
#include <cassert>
| int func0(int n, int arr[]) {
int mn = arr[0];
int freq = 1;
for (int i = 1; i < n; ++i) {
if (arr[i] < mn) {
mn = arr[i];
freq = 1;
} else if (arr[i] == mn) {
freq += 1;
}
}
return freq;
}
| int main() {
int arr1[] = {1, 2, 3, 4, 3};
int arr2[] = {3, 1, 2, 5, 6, 2, 3};
int arr3[] = {3, 3, 6, 3, 7, 4, 9};
assert(func0(5, arr1) == 1);
assert(func0(7, arr2) == 1);
assert(func0(7, arr3) == 3);
std::cout << "All test cases passed!" << std::endl;
return 0;
}
| O2 | cpp | func0(int, int*):
endbr64
mov (%rsi),%ecx
cmp $0x1,%edi
jle 14a0 <_Z5func0iPi+0x50>
lea -0x2(%rdi),%edx
lea 0x4(%rsi),%rax
mov $0x1,%r8d
lea 0x8(%rsi,%rdx,4),%rsi
jmp 1482 <_Z5func0iPi+0x32>
sete %dl
add $0x4,%rax
movzbl %dl,%edx
add %edx,%r8d
cmp %rsi,%rax
je 1499 <_Z5func0iPi+0x... | _Z5func0iPi:
endbr64
mov r8d, [rsi]
cmp edi, 1
jle short loc_1420
lea edx, [rdi-2]
lea rax, [rsi+4]
mov ecx, 1
lea rsi, [rsi+rdx*4+8]
jmp short loc_1401
loc_13F0:
setz dl
add rax, 4
movzx edx, dl
add ecx, edx
cmp rsi, rax
jz short loc_1419
loc_1401:
mov edx, [ra... | long long func0(int a1, int *a2)
{
int v2; // r8d
int *v3; // rax
unsigned int v4; // ecx
int *v5; // rsi
int v6; // edx
bool v7; // zf
v2 = *a2;
if ( a1 <= 1 )
return 1LL;
v3 = a2 + 1;
v4 = 1;
v5 = &a2[a1 - 2 + 2];
do
{
while ( 1 )
{
v6 = *v3;
v7 = v2 == *v3;
i... | func0:
ENDBR64
MOV R8D,dword ptr [RSI]
CMP EDI,0x1
JLE 0x00101420
LEA EDX,[RDI + -0x2]
LEA RAX,[RSI + 0x4]
MOV ECX,0x1
LEA RSI,[RSI + RDX*0x4 + 0x8]
JMP 0x00101401
LAB_001013f0:
SETZ DL
ADD RAX,0x4
MOVZX EDX,DL
ADD ECX,EDX
CMP RSI,RAX
JZ 0x00101419
LAB_00101401:
MOV EDX,dword ptr [RAX]
CMP R8D,EDX
JLE 0x001013f0
ADD RA... | /* func0(int, int*) */
int func0(int param_1,int *param_2)
{
int iVar1;
int *piVar2;
int iVar3;
int iVar4;
if (param_1 < 2) {
return 1;
}
piVar2 = param_2 + 1;
iVar3 = 1;
iVar4 = *param_2;
do {
while( true ) {
iVar1 = *piVar2;
if (iVar1 < iVar4) break;
piVar2 = piVar2 ... |
1,535 | func0 |
#include <iostream>
#include <cassert>
| int func0(int n, int arr[]) {
int mn = arr[0];
int freq = 1;
for (int i = 1; i < n; ++i) {
if (arr[i] < mn) {
mn = arr[i];
freq = 1;
} else if (arr[i] == mn) {
freq += 1;
}
}
return freq;
}
| int main() {
int arr1[] = {1, 2, 3, 4, 3};
int arr2[] = {3, 1, 2, 5, 6, 2, 3};
int arr3[] = {3, 3, 6, 3, 7, 4, 9};
assert(func0(5, arr1) == 1);
assert(func0(7, arr2) == 1);
assert(func0(7, arr3) == 3);
std::cout << "All test cases passed!" << std::endl;
return 0;
}
| O3 | cpp | func0(int, int*):
endbr64
mov (%rsi),%ecx
cmp $0x1,%edi
jle 1530 <_Z5func0iPi+0x50>
lea -0x2(%rdi),%edx
lea 0x4(%rsi),%rax
mov $0x1,%r8d
lea 0x8(%rsi,%rdx,4),%rsi
jmp 1512 <_Z5func0iPi+0x32>
sete %dl
add $0x4,%rax
movzbl %dl,%edx
add %edx,%r8d
cmp %rax,%rsi
je 1529 <_Z5func0iPi+0x... | _Z5func0iPi:
endbr64
mov r8d, [rsi]
cmp edi, 1
jle short loc_12A0
lea edx, [rdi-2]
lea rax, [rsi+4]
mov ecx, 1
lea rsi, [rsi+rdx*4+8]
jmp short loc_1281
loc_1270:
setz dl
add rax, 4
movzx edx, dl
add ecx, edx
cmp rsi, rax
jz short loc_1299
loc_1281:
mov edx, [ra... | long long func0(int a1, int *a2)
{
int v2; // r8d
int *v3; // rax
unsigned int v4; // ecx
int *v5; // rsi
int v6; // edx
bool v7; // zf
v2 = *a2;
if ( a1 <= 1 )
return 1LL;
v3 = a2 + 1;
v4 = 1;
v5 = &a2[a1 - 2 + 2];
do
{
while ( 1 )
{
v6 = *v3;
v7 = v2 == *v3;
i... | func0:
ENDBR64
MOV R8D,dword ptr [RSI]
CMP EDI,0x1
JLE 0x001012a0
LEA EDX,[RDI + -0x2]
LEA RAX,[RSI + 0x4]
MOV ECX,0x1
LEA RSI,[RSI + RDX*0x4 + 0x8]
JMP 0x00101281
LAB_00101270:
SETZ DL
ADD RAX,0x4
MOVZX EDX,DL
ADD ECX,EDX
CMP RSI,RAX
JZ 0x00101299
LAB_00101281:
MOV EDX,dword ptr [RAX]
CMP R8D,EDX
JLE 0x00101270
ADD RA... | /* func0(int, int*) */
int func0(int param_1,int *param_2)
{
int iVar1;
int *piVar2;
int iVar3;
int iVar4;
if (param_1 < 2) {
return 1;
}
piVar2 = param_2 + 1;
iVar3 = 1;
iVar4 = *param_2;
do {
while( true ) {
iVar1 = *piVar2;
if (iVar1 < iVar4) break;
piVar2 = piVar2 ... |
1,536 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int n) {
if (n == 0) {
return 3;
}
if (n == 1) {
return 0;
}
if (n == 2) {
return 2;
}
return func0(n - 2) + func0(n - 3);
}
| int main() {
assert(func0(9) == 12);
assert(func0(4) == 2);
assert(func0(6) == 5);
std::cout << "All test cases passed." << std::endl;
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x18,%rsp
mov %edi,-0x14(%rbp)
cmpl $0x0,-0x14(%rbp)
jne 11e6 <_Z5func0i+0x1d>
mov $0x3,%eax
jmp 121e <_Z5func0i+0x55>
cmpl $0x1,-0x14(%rbp)
jne 11f3 <_Z5func0i+0x2a>
mov $0x0,%eax
jmp 121e <_Z5func0i+0x55>
cmpl $0x2,-0x14(%... | _Z5func0i:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 18h
mov [rbp+var_14], edi
cmp [rbp+var_14], 0
jnz short loc_11A6
mov eax, 3
jmp short loc_11DE
loc_11A6:
cmp [rbp+var_14], 1
jnz short loc_11B3
mov eax, 0
jmp short loc_11DE
loc_11B3:
cmp [rbp+var_14], 2
jnz... | long long func0(int a1)
{
int v2; // ebx
switch ( a1 )
{
case 0:
return 3LL;
case 1:
return 0LL;
case 2:
return 2LL;
}
v2 = func0(a1 - 2);
return v2 + (unsigned int)func0(a1 - 3);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x18
MOV dword ptr [RBP + -0x14],EDI
CMP dword ptr [RBP + -0x14],0x0
JNZ 0x001011a6
MOV EAX,0x3
JMP 0x001011de
LAB_001011a6:
CMP dword ptr [RBP + -0x14],0x1
JNZ 0x001011b3
MOV EAX,0x0
JMP 0x001011de
LAB_001011b3:
CMP dword ptr [RBP + -0x14],0x2
JNZ 0x001011c0
MOV EAX... | /* func0(int) */
int func0(int param_1)
{
int iVar1;
int iVar2;
if (param_1 == 0) {
iVar2 = 3;
}
else if (param_1 == 1) {
iVar2 = 0;
}
else if (param_1 == 2) {
iVar2 = 2;
}
else {
iVar1 = func0(param_1 + -2);
iVar2 = func0(param_1 + -3);
iVar2 = iVar2 + iVar1;
}
return... |
1,537 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int n) {
if (n == 0) {
return 3;
}
if (n == 1) {
return 0;
}
if (n == 2) {
return 2;
}
return func0(n - 2) + func0(n - 3);
}
| int main() {
assert(func0(9) == 12);
assert(func0(4) == 2);
assert(func0(6) == 5);
std::cout << "All test cases passed." << std::endl;
return 0;
}
| O1 | cpp | func0(int):
endbr64
mov $0x3,%eax
test %edi,%edi
je 120a <_Z5func0i+0x41>
push %rbp
push %rbx
sub $0x8,%rsp
mov %edi,%ebx
mov $0x0,%eax
cmp $0x1,%edi
je 1203 <_Z5func0i+0x3a>
mov %edi,%eax
cmp $0x2,%edi
je 1203 <_Z5func0i+0x3a>
lea -0x2(%rdi),%edi
callq 11c9 <_Z5func0i>
mov ... | _Z5func0i:
endbr64
mov eax, 3
test edi, edi
jz short locret_11CA
push rbp
push rbx
sub rsp, 8
mov ebx, edi
mov eax, 0
cmp edi, 1
jz short loc_11C3
mov eax, edi
cmp edi, 2
jz short loc_11C3
lea edi, [rdi-2]; int
call _Z5func0i; func0(int)
mov ebp, eax
lea ... | long long func0(unsigned int a1)
{
long long result; // rax
int v2; // ebp
result = 3LL;
if ( a1 )
{
result = 0LL;
if ( a1 != 1 )
{
result = a1;
if ( a1 != 2 )
{
v2 = func0(a1 - 2);
return v2 + (unsigned int)func0(a1 - 3);
}
}
}
return result;
} | func0:
ENDBR64
MOV EAX,0x3
TEST EDI,EDI
JZ 0x001011ca
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV EBX,EDI
MOV EAX,0x0
CMP EDI,0x1
JZ 0x001011c3
MOV EAX,EDI
CMP EDI,0x2
JZ 0x001011c3
LEA EDI,[RDI + -0x2]
CALL 0x00101189
MOV EBP,EAX
LEA EDI,[RBX + -0x3]
CALL 0x00101189
ADD EAX,EBP
LAB_001011c3:
ADD RSP,0x8
POP RBX
POP RBP
RET
LAB_... | /* func0(int) */
int func0(int param_1)
{
int iVar1;
int iVar2;
if (param_1 != 0) {
iVar2 = 0;
if ((param_1 != 1) && (iVar2 = param_1, param_1 != 2)) {
iVar1 = func0(param_1 + -2);
iVar2 = func0(param_1 + -3);
iVar2 = iVar2 + iVar1;
}
return iVar2;
}
return 3;
} |
1,538 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int n) {
if (n == 0) {
return 3;
}
if (n == 1) {
return 0;
}
if (n == 2) {
return 2;
}
return func0(n - 2) + func0(n - 3);
}
| int main() {
assert(func0(9) == 12);
assert(func0(4) == 2);
assert(func0(6) == 5);
std::cout << "All test cases passed." << std::endl;
return 0;
}
| O2 | cpp | func0(int):
endbr64
push %r12
push %rbx
sub $0x8,%rsp
test %edi,%edi
je 1330 <_Z5func0i+0x60>
cmp $0x1,%edi
je 1340 <_Z5func0i+0x70>
lea -0x2(%rdi),%ebx
xor %r12d,%r12d
cmp $0x2,%edi
je 1348 <_Z5func0i+0x78>
mov %ebx,%edi
callq 12d0 <_Z5func0i>
add %eax,%r12d
cmp $0x1,%ebx
je ... | _Z5func0i:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 38h
test edi, edi
jz loc_1676
mov r13d, edi
cmp edi, 1
jz loc_1681
cmp edi, 2
jz loc_15B4
lea ebx, [rdi-2]
xor ebp, ebp
loc_1354:
cmp ebx, 1
jz loc_166A
cmp ebx, 2
j... | long long func0(unsigned int a1)
{
unsigned int v1; // r13d
unsigned int v2; // ebx
int v3; // ebp
unsigned int v4; // r12d
int v5; // r15d
unsigned int v6; // r13d
unsigned int v7; // eax
unsigned int v8; // r14d
unsigned int v9; // r12d
int v10; // r13d
unsigned int v11; // ebp
unsigned int v... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x38
TEST EDI,EDI
JZ 0x00101676
MOV R13D,EDI
CMP EDI,0x1
JZ 0x00101681
CMP EDI,0x2
JZ 0x001015b4
LEA EBX,[RDI + -0x2]
XOR EBP,EBP
LAB_00101354:
CMP EBX,0x1
JZ 0x0010166a
CMP EBX,0x2
JZ 0x001015ad
MOV dword ptr [RSP],EBP
LEA R12D,[RBX + -0x2]
X... | /* func0(int) */
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;
int iVar18;
int iVar19;
if (param_1 ==... |
1,539 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int n) {
if (n == 0) {
return 3;
}
if (n == 1) {
return 0;
}
if (n == 2) {
return 2;
}
return func0(n - 2) + func0(n - 3);
}
| int main() {
assert(func0(9) == 12);
assert(func0(4) == 2);
assert(func0(6) == 5);
std::cout << "All test cases passed." << std::endl;
return 0;
}
| O3 | cpp | func0(int):
endbr64
push %r12
push %rbx
sub $0x8,%rsp
test %edi,%edi
je 1330 <_Z5func0i+0x60>
cmp $0x1,%edi
je 1340 <_Z5func0i+0x70>
lea -0x2(%rdi),%ebx
xor %r12d,%r12d
cmp $0x2,%edi
je 1348 <_Z5func0i+0x78>
mov %ebx,%edi
callq 12d0 <_Z5func0i>
add %eax,%r12d
cmp $0x1,%ebx
je ... | _Z5func0i:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 38h
test edi, edi
jz loc_1647
mov r13d, edi
cmp edi, 1
jz loc_1652
cmp edi, 2
jz loc_1598
lea ebx, [rdi-2]
xor ebp, ebp
loc_1354:
cmp ebx, 1
jz loc_163B
cmp ebx, 2
j... | long long func0(unsigned int a1)
{
unsigned int v1; // r13d
unsigned int v2; // ebx
int v3; // ebp
unsigned int v4; // r12d
int v5; // r15d
unsigned int v6; // r13d
unsigned int v7; // r14d
int v8; // r13d
unsigned int v9; // r12d
unsigned int v10; // ebp
unsigned int v11; // eax
int v12; // r1... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x38
TEST EDI,EDI
JZ 0x00101647
MOV R13D,EDI
CMP EDI,0x1
JZ 0x00101652
CMP EDI,0x2
JZ 0x00101598
LEA EBX,[RDI + -0x2]
XOR EBP,EBP
LAB_00101354:
CMP EBX,0x1
JZ 0x0010163b
CMP EBX,0x2
JZ 0x00101591
MOV dword ptr [RSP],EBP
LEA R12D,[RBX + -0x2]
X... | /* func0(int) */
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;
int iVar18;
int iVar19;
if (param_1 ==... |
1,540 | func0 |
#include <iostream>
#include <string>
#include <assert.h>
| int func0(std::string s) {
int count_left = 0;
int count_right = 0;
int swap = 0;
int imbalance = 0;
for (size_t i = 0; i < s.length(); ++i) {
if (s[i] == '[') {
count_left++;
if (imbalance > 0) {
swap += imbalance;
imba... | int main() {
assert(func0("[]][][") == 2);
assert(func0("[[][]]") == 0);
assert(func0("[[][]]][") == 1);
return 0;
}
| O0 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x30,%rsp
mov %rdi,-0x28(%rbp)
movl $0x0,-0x18(%rbp)
movl $0x0,-0x14(%rbp)
movl $0x0,-0x10(%rbp)
movl $0x0,-0xc(%rbp)
movq $0x0,-0x8(%rbp)
mov -0x28(%rbp),%rax
mov %rax... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_28], rdi
mov [rbp+var_18], 0
mov [rbp+var_14], 0
mov [rbp+var_10], 0
mov [rbp+var_C], 0
mov [rbp+var_8], 0
jmp short loc_13E5
loc_137F:
mov rdx, [rbp+var_8]
mo... | long long func0(long long a1)
{
unsigned long long i; // rax
int v3; // [rsp+18h] [rbp-18h]
int v4; // [rsp+1Ch] [rbp-14h]
unsigned int v5; // [rsp+20h] [rbp-10h]
int v6; // [rsp+24h] [rbp-Ch]
unsigned long long v7; // [rsp+28h] [rbp-8h]
v3 = 0;
v4 = 0;
v5 = 0;
v6 = 0;
v7 = 0LL;
for ( i = std:... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x28],RDI
MOV dword ptr [RBP + -0x18],0x0
MOV dword ptr [RBP + -0x14],0x0
MOV dword ptr [RBP + -0x10],0x0
MOV dword ptr [RBP + -0xc],0x0
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001013e5
LAB_0010137f:
MOV RDX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RB... | /* func0(std::string) */
int func0(ulong param_1)
{
char *pcVar1;
ulong uVar2;
int4 local_20;
int4 local_1c;
int4 local_18;
int4 local_14;
int8 local_10;
local_20 = 0;
local_1c = 0;
local_18 = 0;
local_14 = 0;
local_10 = 0;
while( true ) {
uVar2 = std::string::length();
if (uVar2 ... |
1,541 | func0 |
#include <iostream>
#include <string>
#include <assert.h>
| int func0(std::string s) {
int count_left = 0;
int count_right = 0;
int swap = 0;
int imbalance = 0;
for (size_t i = 0; i < s.length(); ++i) {
if (s[i] == '[') {
count_left++;
if (imbalance > 0) {
swap += imbalance;
imba... | int main() {
assert(func0("[]][][") == 2);
assert(func0("[[][]]") == 0);
assert(func0("[[][]]][") == 1);
return 0;
}
| O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
mov 0x8(%rdi),%rcx
test %rcx,%rcx
je 1282 <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x59>
mov (%rdi),%rax
add %rax,%rcx
mov $0x0,%esi
mov $0x0,%r9d
mov $0x0,%r8d
mov $0x0,%edi
j... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
mov rcx, [rdi+8]
test rcx, rcx
jz short loc_1262
mov rax, [rdi]
add rcx, rax
mov esi, 0
mov r9d, 0
mov r8d, 0
mov edi, 0
jmp short loc_124A
loc_1234:
add edi, 1
test esi, esi
jle short loc_1241
add ... | long long func0(long long a1)
{
long long v1; // rcx
_BYTE *v2; // rax
_BYTE *v3; // rcx
int v4; // esi
unsigned int v5; // r9d
int v6; // r8d
int v7; // edi
v1 = *(_QWORD *)(a1 + 8);
if ( v1 )
{
v2 = *(_BYTE **)a1;
v3 = (_BYTE *)(*(_QWORD *)a1 + v1);
v4 = 0;
v5 = 0;
v6 = 0;
... | func0:
ENDBR64
MOV RCX,qword ptr [RDI + 0x8]
TEST RCX,RCX
JZ 0x00101262
MOV RAX,qword ptr [RDI]
ADD RCX,RAX
MOV ESI,0x0
MOV R9D,0x0
MOV R8D,0x0
MOV EDI,0x0
JMP 0x0010124a
LAB_00101234:
ADD EDI,0x1
TEST ESI,ESI
JLE 0x00101241
ADD R9D,ESI
SUB ESI,0x1
LAB_00101241:
ADD RAX,0x1
CMP RCX,RAX
JZ 0x00101268
LAB_0010124a:
MOVZX... | /* func0(std::string) */
int func0(int8 *param_1)
{
char *pcVar1;
char *pcVar2;
int iVar3;
int iVar4;
int iVar5;
int iVar6;
if (param_1[1] == 0) {
iVar6 = 0;
}
else {
pcVar1 = (char *)*param_1;
pcVar2 = pcVar1 + param_1[1];
iVar3 = 0;
iVar6 = 0;
iVar5 = 0;
iVar4 = 0;
... |
1,542 | func0 |
#include <iostream>
#include <string>
#include <assert.h>
| int func0(std::string s) {
int count_left = 0;
int count_right = 0;
int swap = 0;
int imbalance = 0;
for (size_t i = 0; i < s.length(); ++i) {
if (s[i] == '[') {
count_left++;
if (imbalance > 0) {
swap += imbalance;
imba... | int main() {
assert(func0("[]][][") == 2);
assert(func0("[[][]]") == 0);
assert(func0("[[][]]][") == 1);
return 0;
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
mov 0x8(%rdi),%rcx
test %rcx,%rcx
je 1530 <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x60>
mov (%rdi),%rax
xor %esi,%esi
xor %r9d,%r9d
xor %r8d,%r8d
xor %edi,%edi
add %rax,%rcx
j... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
mov rcx, [rdi+8]
test rcx, rcx
jz short loc_1390
mov rax, [rdi]
xor esi, esi
xor r9d, r9d
xor r8d, r8d
xor edi, edi
add rcx, rax
jmp short loc_1367
loc_1350:
cmp dl, 5Dh ; ']'
jnz short loc_135E
add ... | long long func0(long long a1)
{
long long v1; // rcx
_BYTE *v2; // rax
int v3; // esi
unsigned int v4; // r9d
int v5; // r8d
int v6; // edi
_BYTE *v7; // rcx
v1 = *(_QWORD *)(a1 + 8);
if ( v1 )
{
v2 = *(_BYTE **)a1;
v3 = 0;
v4 = 0;
v5 = 0;
v6 = 0;
v7 = &v2[v1];
while ( ... | func0:
ENDBR64
MOV RCX,qword ptr [RDI + 0x8]
TEST RCX,RCX
JZ 0x00101390
MOV RAX,qword ptr [RDI]
XOR ESI,ESI
XOR R9D,R9D
XOR R8D,R8D
XOR EDI,EDI
ADD RCX,RAX
JMP 0x00101367
LAB_00101350:
CMP DL,0x5d
JNZ 0x0010135e
ADD R8D,0x1
MOV ESI,R8D
SUB ESI,EDI
LAB_0010135e:
ADD RAX,0x1
CMP RCX,RAX
JZ 0x00101385
LAB_00101367:
MOVZX ... | /* func0(std::string) */
int func0(int8 *param_1)
{
char *pcVar1;
char *pcVar2;
int iVar3;
int iVar4;
int iVar5;
int iVar6;
if (param_1[1] != 0) {
pcVar1 = (char *)*param_1;
iVar3 = 0;
iVar6 = 0;
iVar5 = 0;
iVar4 = 0;
pcVar2 = pcVar1 + param_1[1];
do {
if (*pcVar1 ==... |
1,543 | func0 |
#include <iostream>
#include <string>
#include <assert.h>
| int func0(std::string s) {
int count_left = 0;
int count_right = 0;
int swap = 0;
int imbalance = 0;
for (size_t i = 0; i < s.length(); ++i) {
if (s[i] == '[') {
count_left++;
if (imbalance > 0) {
swap += imbalance;
imba... | int main() {
assert(func0("[]][][") == 2);
assert(func0("[[][]]") == 0);
assert(func0("[[][]]][") == 1);
return 0;
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
mov 0x8(%rdi),%rcx
test %rcx,%rcx
je 1530 <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x60>
mov (%rdi),%rax
xor %esi,%esi
xor %r9d,%r9d
xor %r8d,%r8d
xor %edi,%edi
add %rax,%rcx
j... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
mov rcx, [rdi+8]
test rcx, rcx
jz short loc_1490
mov rax, [rdi]
xor esi, esi
xor r9d, r9d
xor r8d, r8d
xor edi, edi
add rcx, rax
jmp short loc_1467
loc_1450:
cmp dl, 5Dh ; ']'
jnz short loc_145E
add ... | long long func0(long long a1)
{
long long v1; // rcx
_BYTE *v2; // rax
int v3; // esi
unsigned int v4; // r9d
int v5; // r8d
int v6; // edi
_BYTE *v7; // rcx
v1 = *(_QWORD *)(a1 + 8);
if ( v1 )
{
v2 = *(_BYTE **)a1;
v3 = 0;
v4 = 0;
v5 = 0;
v6 = 0;
v7 = &v2[v1];
while ( ... | func0:
ENDBR64
MOV RCX,qword ptr [RDI + 0x8]
TEST RCX,RCX
JZ 0x00101490
MOV RAX,qword ptr [RDI]
XOR ESI,ESI
XOR R9D,R9D
XOR R8D,R8D
XOR EDI,EDI
ADD RCX,RAX
JMP 0x00101467
LAB_00101450:
CMP DL,0x5d
JNZ 0x0010145e
ADD R8D,0x1
MOV ESI,R8D
SUB ESI,EDI
LAB_0010145e:
ADD RAX,0x1
CMP RCX,RAX
JZ 0x00101485
LAB_00101467:
MOVZX ... | /* func0(std::string) */
int func0(int8 *param_1)
{
char *pcVar1;
char *pcVar2;
int iVar3;
int iVar4;
int iVar5;
int iVar6;
if (param_1[1] != 0) {
pcVar1 = (char *)*param_1;
iVar3 = 0;
iVar6 = 0;
iVar5 = 0;
iVar4 = 0;
pcVar2 = pcVar1 + param_1[1];
do {
if (*pcVar1 ==... |
1,544 | func0 |
#include <string>
#include <cassert>
| std::string func0(const std::string &N) {
int l = N.length();
if (N[l-1] == '0' || N[l-1] == '2' ||
N[l-1] == '4' || N[l-1] == '6' ||
N[l-1] == '8' || N[l-1] == 'A' ||
N[l-1] == 'C' || N[l-1] == 'E') {
return "Even";
} else {
return "Odd";
}
}
| int main() {
assert(func0("AB3454D") == "Odd");
assert(func0("ABC") == "Even");
assert(func0("AAD") == "Odd");
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 $0x28,%rsp
mov %rdi,-0x28(%rbp)
mov %rsi,-0x30(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x30(%rbp),%rax
mov %rax,%rdi
callq ... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 38h
mov [rbp+var_38], rdi
mov [rbp+var_40], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_40]
mov rdi, rax
call __ZNKSt7__cxx1112basic_s... | long long func0(long long a1, long long a2)
{
char v4; // [rsp+13h] [rbp-2Dh] BYREF
int v5; // [rsp+14h] [rbp-2Ch]
char *v6; // [rsp+18h] [rbp-28h]
char *v7; // [rsp+20h] [rbp-20h]
unsigned long long v8; // [rsp+28h] [rbp-18h]
v8 = __readfsqword(0x28u);
v5 = std::string::length(a2);
if ( *(_BYTE *)std... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x38
MOV qword ptr [RBP + -0x38],RDI
MOV qword ptr [RBP + -0x40],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x40]
MOV RDI,RAX
CALL 0x00101280
MOV dword ptr [RBP + -0x2c],EAX
MOV EAX,dword ptr [RBP + -0x2c]
SU... | /* func0(std::string const&) */
string * func0(string *param_1)
{
bool bVar1;
char *pcVar2;
ulong in_RSI;
long in_FS_OFFSET;
allocator local_35;
int4 local_34;
allocator *local_30;
allocator *local_28;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
local_34 = std::string::length();... |
1,545 | func0 |
#include <string>
#include <cassert>
| std::string func0(const std::string &N) {
int l = N.length();
if (N[l-1] == '0' || N[l-1] == '2' ||
N[l-1] == '4' || N[l-1] == '6' ||
N[l-1] == '8' || N[l-1] == 'A' ||
N[l-1] == 'C' || N[l-1] == 'E') {
return "Even";
} else {
return "Odd";
}
}
| int main() {
assert(func0("AB3454D") == "Odd");
assert(func0("ABC") == "Even");
assert(func0("AAD") == "Odd");
return 0;
}
| O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %rbx
mov %rdi,%rbx
mov 0x8(%rsi),%eax
sub $0x1,%eax
cltq
mov (%rsi),%rdx
movzbl (%rdx,%rax,1),%eax
sub $0x30,%eax
cmp $0x15,%al
ja 126e <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_trait... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbx
mov rbx, rdi
mov eax, [rsi+8]
sub eax, 1
cdqe
mov rdx, [rsi]
movzx eax, byte ptr [rdx+rax]
sub eax, 30h ; '0'
cmp al, 15h
ja short loc_128E
mov edx, 2A0155h
bt rdx, rax
jnb short loc_128E
lea ... | _QWORD * func0(_QWORD *a1, long long a2)
{
long long v2; // rdx
if ( (unsigned __int8)(*(_BYTE *)(*(_QWORD *)a2 + *(_DWORD *)(a2 + 8) - 1) - 48) <= 0x15u
&& (v2 = 2752853LL, _bittest64(
&v2,
(unsigned int)*(unsigned __int8 *)(*(_QWORD *)a2 + *(_DWORD *)(a2 + ... | func0:
ENDBR64
PUSH RBX
MOV RBX,RDI
MOV EAX,dword ptr [RSI + 0x8]
SUB EAX,0x1
CDQE
MOV RDX,qword ptr [RSI]
MOVZX EAX,byte ptr [RDX + RAX*0x1]
SUB EAX,0x30
CMP AL,0x15
JA 0x0010128e
MOV EDX,0x2a0155
BT RDX,RAX
JNC 0x0010128e
LEA RAX,[RDI + 0x10]
MOV qword ptr [RDI],RAX
LEA RDX,[0x102064]
LEA RSI,[RDX + -0x4]
CALL 0x0010... | /* func0(std::string const&) */
string * func0(string *param_1)
{
uint uVar1;
long *in_RSI;
uVar1 = *(byte *)(*in_RSI + (long)(*(int *)(in_RSI + 1) + -1)) - 0x30;
if (((byte)uVar1 < 0x16) && ((0x2a0155UL >> ((ulong)uVar1 & 0x3f) & 1) != 0)) {
*(string **)param_1 = param_1 + 0x10;
std::string::_M_co... |
1,546 | func0 |
#include <string>
#include <cassert>
| std::string func0(const std::string &N) {
int l = N.length();
if (N[l-1] == '0' || N[l-1] == '2' ||
N[l-1] == '4' || N[l-1] == '6' ||
N[l-1] == '8' || N[l-1] == 'A' ||
N[l-1] == 'C' || N[l-1] == 'E') {
return "Even";
} else {
return "Odd";
}
}
| int main() {
assert(func0("AB3454D") == "Odd");
assert(func0("ABC") == "Even");
assert(func0("AAD") == "Odd");
return 0;
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
mov %rdi,%rax
mov 0x8(%rsi),%edi
mov (%rsi),%rcx
lea -0x1(%rdi),%edx
movslq %edx,%rdx
movzbl (%rcx,%rdx,1),%edx
lea 0x10(%rax),%rcx
sub $0x30,%edx
cmp $0x15,%dl
jbe 1420 <_Z5func0RKNSt7__cxx111... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbx
mov eax, [rsi+8]
mov rbx, rdi
mov rdx, [rsi]
sub eax, 1
cdqe
movzx eax, byte ptr [rdx+rax]
sub eax, 30h ; '0'
cmp al, 15h
ja short loc_1518
mov edx, 2A0155h
bt rdx, rax
jnb short loc_1518
lea ... | _QWORD * func0(_QWORD *a1, long long a2)
{
long long v2; // rdx
if ( (unsigned __int8)(*(_BYTE *)(*(_QWORD *)a2 + *(_DWORD *)(a2 + 8) - 1) - 48) <= 0x15u
&& (v2 = 2752853LL, _bittest64(
&v2,
(unsigned int)*(unsigned __int8 *)(*(_QWORD *)a2 + *(_DWORD *)(a2 + ... | func0:
ENDBR64
PUSH RBX
MOV EAX,dword ptr [RSI + 0x8]
MOV RBX,RDI
MOV RDX,qword ptr [RSI]
SUB EAX,0x1
CDQE
MOVZX EAX,byte ptr [RDX + RAX*0x1]
SUB EAX,0x30
CMP AL,0x15
JA 0x00101518
MOV EDX,0x2a0155
BT RDX,RAX
JNC 0x00101518
LEA RAX,[RDI + 0x10]
LEA RDX,[0x102008]
MOV qword ptr [RDI],RAX
LEA RSI,[RDX + -0x4]
CALL 0x0010... | /* func0(std::string const&) */
string * func0(string *param_1)
{
uint uVar1;
long *in_RSI;
uVar1 = *(byte *)(*in_RSI + (long)(*(int *)(in_RSI + 1) + -1)) - 0x30;
if (((byte)uVar1 < 0x16) && ((0x2a0155UL >> ((ulong)uVar1 & 0x3f) & 1) != 0)) {
*(string **)param_1 = param_1 + 0x10;
std::string::_M_co... |
1,547 | func0 |
#include <string>
#include <cassert>
| std::string func0(const std::string &N) {
int l = N.length();
if (N[l-1] == '0' || N[l-1] == '2' ||
N[l-1] == '4' || N[l-1] == '6' ||
N[l-1] == '8' || N[l-1] == 'A' ||
N[l-1] == 'C' || N[l-1] == 'E') {
return "Even";
} else {
return "Odd";
}
}
| int main() {
assert(func0("AB3454D") == "Odd");
assert(func0("ABC") == "Even");
assert(func0("AAD") == "Odd");
return 0;
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
mov %rdi,%rax
mov 0x8(%rsi),%edi
mov (%rsi),%rcx
lea -0x1(%rdi),%edx
movslq %edx,%rdx
movzbl (%rcx,%rdx,1),%edx
lea 0x10(%rax),%rcx
sub $0x30,%edx
cmp $0x15,%dl
jbe 1420 <_Z5func0RKNSt7__cxx111... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
mov rax, rdi
mov edi, [rsi+8]
mov rcx, [rsi]
lea edx, [rdi-1]
movsxd rdx, edx
movzx edx, byte ptr [rcx+rdx]
sub edx, 30h ; '0'
cmp dl, 15h
ja short loc_13F8
mov ecx, 2A0155h
bt rcx, rdx
jnb short loc_13F... | long long func0(long long a1, long long a2)
{
long long result; // rax
int v3; // edi
long long v4; // rcx
result = a1;
v3 = *(_DWORD *)(a2 + 8);
if ( (unsigned __int8)(*(_BYTE *)(*(_QWORD *)a2 + v3 - 1) - 48) <= 0x15u
&& (v4 = 2752853LL, _bittest64(&v4, (unsigned int)*(unsigned __int8 *)(*(_QWORD *)a... | func0:
ENDBR64
MOV RAX,RDI
MOV EDI,dword ptr [RSI + 0x8]
MOV RCX,qword ptr [RSI]
LEA EDX,[RDI + -0x1]
MOVSXD RDX,EDX
MOVZX EDX,byte ptr [RCX + RDX*0x1]
SUB EDX,0x30
CMP DL,0x15
JA 0x001013f8
MOV ECX,0x2a0155
BT RCX,RDX
JNC 0x001013f8
LEA RDX,[RAX + 0x10]
MOV dword ptr [RAX + 0x10],0x6e657645
MOV qword ptr [RAX],RDX
MOV... | /* func0(std::string const&) */
void func0(string *param_1)
{
uint uVar1;
long *in_RSI;
uVar1 = *(byte *)(*in_RSI + (long)(*(int *)(in_RSI + 1) + -1)) - 0x30;
if (((byte)uVar1 < 0x16) && ((0x2a0155UL >> ((ulong)uVar1 & 0x3f) & 1) != 0)) {
*(int4 *)(param_1 + 0x10) = 0x6e657645;
*(string **)param_1 ... |
1,548 | func0 |
#include <assert.h>
| int func0(int n) {
int res = 0;
for (int i = n; i > 0; i--) {
if ((i & (i - 1)) == 0) {
res = i;
break;
}
}
return res;
}
| int main() {
assert(func0(10) == 8);
assert(func0(19) == 16);
assert(func0(32) == 32);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
movl $0x0,-0x8(%rbp)
mov -0x14(%rbp),%eax
mov %eax,-0x4(%rbp)
cmpl $0x0,-0x4(%rbp)
jle 1182 <_Z5func0i+0x39>
mov -0x4(%rbp),%eax
sub $0x1,%eax
and -0x4(%rbp),%eax
test %eax,%eax
jne 117c <_Z5func0i+0x33>
mov -0x4(%rbp... | _Z5func0i:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_14], edi
mov [rbp+var_8], 0
mov eax, [rbp+var_14]
mov [rbp+var_4], eax
jmp short loc_117C
loc_1163:
mov eax, [rbp+var_4]
sub eax, 1
and eax, [rbp+var_4]
test eax, eax
jnz short loc_1178
mov eax, [rbp+var_4]
mov [... | long long func0(int a1)
{
unsigned int v2; // [rsp+Ch] [rbp-8h]
v2 = 0;
while ( a1 > 0 )
{
if ( (a1 & (a1 - 1)) == 0 )
return (unsigned int)a1;
--a1;
}
return v2;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x14],EDI
MOV dword ptr [RBP + -0x8],0x0
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0010117c
LAB_00101163:
MOV EAX,dword ptr [RBP + -0x4]
SUB EAX,0x1
AND EAX,dword ptr [RBP + -0x4]
TEST EAX,EAX
JNZ 0x00101178
MOV EAX,dword ptr [RBP + -0... | /* func0(int) */
uint func0(int param_1)
{
uint local_c;
local_c = param_1;
while( true ) {
if ((int)local_c < 1) {
return 0;
}
if ((local_c - 1 & local_c) == 0) break;
local_c = local_c - 1;
}
return local_c;
} |
1,549 | func0 |
#include <assert.h>
| int func0(int n) {
int res = 0;
for (int i = n; i > 0; i--) {
if ((i & (i - 1)) == 0) {
res = i;
break;
}
}
return res;
}
| int main() {
assert(func0(10) == 8);
assert(func0(19) == 16);
assert(func0(32) == 32);
return 0;
}
| O1 | cpp | func0(int):
endbr64
jmp 1151 <_Z5func0i+0x8>
mov %eax,%edi
test %edi,%edi
jle 115f <_Z5func0i+0x16>
lea -0x1(%rdi),%eax
test %edi,%eax
jne 114f <_Z5func0i+0x6>
mov %edi,%eax
retq
mov $0x0,%eax
retq
| _Z5func0i:
endbr64
loc_114D:
test edi, edi
jle short loc_115C
lea eax, [rdi-1]
test eax, edi
jz short loc_1162
mov edi, eax
jmp short loc_114D
loc_115C:
mov eax, 0
retn
loc_1162:
mov eax, edi
retn | long long func0(int a1)
{
while ( 1 )
{
if ( a1 <= 0 )
return 0LL;
if ( (a1 & (a1 - 1)) == 0 )
break;
--a1;
}
return (unsigned int)a1;
} | func0:
ENDBR64
LAB_0010114d:
TEST EDI,EDI
JLE 0x0010115c
LEA EAX,[RDI + -0x1]
TEST EAX,EDI
JZ 0x00101162
MOV EDI,EAX
JMP 0x0010114d
LAB_0010115c:
MOV EAX,0x0
RET
LAB_00101162:
MOV EAX,EDI
RET | /* func0(int) */
uint func0(int param_1)
{
uint uVar1;
do {
uVar1 = param_1;
if ((int)uVar1 < 1) {
return 0;
}
param_1 = uVar1 - 1;
} while ((uVar1 - 1 & uVar1) != 0);
return uVar1;
} |
1,550 | func0 |
#include <assert.h>
| int func0(int n) {
int res = 0;
for (int i = n; i > 0; i--) {
if ((i & (i - 1)) == 0) {
res = i;
break;
}
}
return res;
}
| int main() {
assert(func0(10) == 8);
assert(func0(19) == 16);
assert(func0(32) == 32);
return 0;
}
| O2 | cpp | func0(int):
endbr64
jmp 11e9 <_Z5func0i+0x19>
nopw %cs:0x0(%rax,%rax,1)
lea -0x1(%rdi),%eax
test %edi,%eax
je 11f0 <_Z5func0i+0x20>
mov %eax,%edi
test %edi,%edi
jg 11e0 <_Z5func0i+0x10>
xor %eax,%eax
retq
mov %edi,%eax
retq
nopw %cs:0x0(%rax,%rax,1)
nopl (%rax)
| _Z5func0i:
endbr64
test edi, edi
jle short loc_11F0
nop dword ptr [rax+rax+00000000h]
loc_11E0:
mov eax, edi
sub edi, 1
test edi, eax
jnz short loc_11E0
retn
loc_11F0:
xor eax, eax
retn | long long func0(int a1)
{
long long result; // rax
if ( a1 <= 0 )
return 0LL;
do
result = (unsigned int)a1--;
while ( ((unsigned int)result & a1) != 0 );
return result;
} | func0:
ENDBR64
TEST EDI,EDI
JLE 0x001011f0
NOP dword ptr [RAX + RAX*0x1]
LAB_001011e0:
MOV EAX,EDI
SUB EDI,0x1
TEST EDI,EAX
JNZ 0x001011e0
RET
LAB_001011f0:
XOR EAX,EAX
RET | /* func0(int) */
uint func0(int param_1)
{
uint uVar1;
uint uVar2;
if (param_1 < 1) {
return 0;
}
do {
uVar2 = param_1;
uVar1 = param_1 - 1U & param_1;
param_1 = param_1 - 1U;
} while (uVar1 != 0);
return uVar2;
} |
1,551 | func0 |
#include <assert.h>
| int func0(int n) {
int res = 0;
for (int i = n; i > 0; i--) {
if ((i & (i - 1)) == 0) {
res = i;
break;
}
}
return res;
}
| int main() {
assert(func0(10) == 8);
assert(func0(19) == 16);
assert(func0(32) == 32);
return 0;
}
| O3 | cpp | func0(int):
endbr64
jmp 11b9 <_Z5func0i+0x19>
nopw %cs:0x0(%rax,%rax,1)
lea -0x1(%rdi),%eax
test %edi,%eax
je 11c0 <_Z5func0i+0x20>
mov %eax,%edi
test %edi,%edi
jg 11b0 <_Z5func0i+0x10>
xor %eax,%eax
retq
mov %edi,%eax
retq
nopw %cs:0x0(%rax,%rax,1)
nopl (%rax)
| _Z5func0i:
endbr64
test edi, edi
jle short loc_11C0
nop dword ptr [rax+rax+00000000h]
loc_11B0:
mov eax, edi
sub edi, 1
test edi, eax
jnz short loc_11B0
retn
loc_11C0:
xor eax, eax
retn | long long func0(int a1)
{
long long result; // rax
if ( a1 <= 0 )
return 0LL;
do
result = (unsigned int)a1--;
while ( ((unsigned int)result & a1) != 0 );
return result;
} | func0:
ENDBR64
TEST EDI,EDI
JLE 0x001011c0
NOP dword ptr [RAX + RAX*0x1]
LAB_001011b0:
MOV EAX,EDI
SUB EDI,0x1
TEST EDI,EAX
JNZ 0x001011b0
RET
LAB_001011c0:
XOR EAX,EAX
RET | /* func0(int) */
uint func0(int param_1)
{
uint uVar1;
uint uVar2;
if (param_1 < 1) {
return 0;
}
do {
uVar2 = param_1;
uVar1 = param_1 - 1U & param_1;
param_1 = param_1 - 1U;
} while (uVar1 != 0);
return uVar2;
} |
1,552 | func0 |
#include <assert.h>
| int func0(int n) {
if (n == 0) {
return 2;
}
if (n == 1) {
return 1;
}
return func0(n - 1) + func0(n - 2);
}
| int main() {
assert(func0(9) == 76);
assert(func0(4) == 7);
assert(func0(3) == 4);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x18,%rsp
mov %edi,-0x14(%rbp)
cmpl $0x0,-0x14(%rbp)
jne 1166 <_Z5func0i+0x1d>
mov $0x2,%eax
jmp 1191 <_Z5func0i+0x48>
cmpl $0x1,-0x14(%rbp)
jne 1173 <_Z5func0i+0x2a>
mov $0x1,%eax
jmp 1191 <_Z5func0i+0x48>
mov -0x14(%rbp),... | _Z5func0i:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 18h
mov [rbp+var_14], edi
cmp [rbp+var_14], 0
jnz short loc_1166
mov eax, 2
jmp short loc_1191
loc_1166:
cmp [rbp+var_14], 1
jnz short loc_1173
mov eax, 1
jmp short loc_1191
loc_1173:
mov eax, [rbp+var_14]
s... | long long func0(int a1)
{
int v2; // ebx
if ( !a1 )
return 2LL;
if ( a1 == 1 )
return 1LL;
v2 = func0(a1 - 1);
return v2 + (unsigned int)func0(a1 - 2);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x18
MOV dword ptr [RBP + -0x14],EDI
CMP dword ptr [RBP + -0x14],0x0
JNZ 0x00101166
MOV EAX,0x2
JMP 0x00101191
LAB_00101166:
CMP dword ptr [RBP + -0x14],0x1
JNZ 0x00101173
MOV EAX,0x1
JMP 0x00101191
LAB_00101173:
MOV EAX,dword ptr [RBP + -0x14]
SUB EAX,0x1
MOV EDI,EA... | /* func0(int) */
int func0(int param_1)
{
int iVar1;
int iVar2;
if (param_1 == 0) {
iVar2 = 2;
}
else if (param_1 == 1) {
iVar2 = 1;
}
else {
iVar1 = func0(param_1 + -1);
iVar2 = func0(param_1 + -2);
iVar2 = iVar2 + iVar1;
}
return iVar2;
} |
1,553 | func0 |
#include <assert.h>
| int func0(int n) {
if (n == 0) {
return 2;
}
if (n == 1) {
return 1;
}
return func0(n - 1) + func0(n - 2);
}
| int main() {
assert(func0(9) == 76);
assert(func0(4) == 7);
assert(func0(3) == 4);
return 0;
}
| O1 | cpp | func0(int):
endbr64
mov $0x2,%eax
test %edi,%edi
je 1180 <_Z5func0i+0x37>
push %rbp
push %rbx
sub $0x8,%rsp
mov %edi,%ebx
mov %edi,%eax
cmp $0x1,%edi
je 1179 <_Z5func0i+0x30>
lea -0x1(%rdi),%edi
callq 1149 <_Z5func0i>
mov %eax,%ebp
lea -0x2(%rbx),%edi
callq 1149 <_Z5func0i>
add ... | _Z5func0i:
endbr64
mov eax, 2
test edi, edi
jz short locret_1180
push rbp
push rbx
sub rsp, 8
mov ebx, edi
mov eax, edi
cmp edi, 1
jz short loc_1179
lea edi, [rdi-1]; int
call _Z5func0i; func0(int)
mov ebp, eax
lea edi, [rbx-2]; int
call _Z5func0i; func0(int)
add... | long long func0(unsigned int a1)
{
long long result; // rax
int v2; // ebp
result = 2LL;
if ( a1 )
{
result = a1;
if ( a1 != 1 )
{
v2 = func0(a1 - 1);
return v2 + (unsigned int)func0(a1 - 2);
}
}
return result;
} | func0:
ENDBR64
MOV EAX,0x2
TEST EDI,EDI
JZ 0x00101180
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV EBX,EDI
MOV EAX,EDI
CMP EDI,0x1
JZ 0x00101179
LEA EDI,[RDI + -0x1]
CALL 0x00101149
MOV EBP,EAX
LEA EDI,[RBX + -0x2]
CALL 0x00101149
ADD EAX,EBP
LAB_00101179:
ADD RSP,0x8
POP RBX
POP RBP
RET
LAB_00101180:
RET | /* func0(int) */
int func0(int param_1)
{
int iVar1;
int iVar2;
if (param_1 != 0) {
if (param_1 != 1) {
iVar1 = func0(param_1 + -1);
iVar2 = func0(param_1 + -2);
param_1 = iVar2 + iVar1;
}
return param_1;
}
return 2;
} |
1,554 | func0 |
#include <assert.h>
| int func0(int n) {
if (n == 0) {
return 2;
}
if (n == 1) {
return 1;
}
return func0(n - 1) + func0(n - 2);
}
| int main() {
assert(func0(9) == 76);
assert(func0(4) == 7);
assert(func0(3) == 4);
return 0;
}
| O2 | cpp | func0(int):
endbr64
test %edi,%edi
je 1238 <_Z5func0i+0x48>
push %rbp
push %rbx
mov %edi,%ebx
sub $0x8,%rsp
cmp $0x1,%edi
je 1240 <_Z5func0i+0x50>
xor %ebp,%ebp
lea -0x1(%rbx),%edi
callq 11f0 <_Z5func0i>
add %eax,%ebp
sub $0x2,%ebx
je 1228 <_Z5func0i+0x38>
cmp $0x1,%ebx
jne ... | _Z5func0i:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 58h
test edi, edi
jz loc_153C
mov r15d, edi
cmp edi, 1
jz loc_1449
lea r13d, [rdi-1]
xor r15d, r15d
loc_121D:
cmp r13d, 1
jz loc_1533
lea ebx, [r13-1]
mov [rsp+88h+var_6C... | long long func0(unsigned int a1)
{
unsigned int v1; // r15d
unsigned int v2; // r13d
int v3; // r15d
unsigned int v4; // ebx
unsigned int v5; // eax
int v6; // ebp
int v7; // r13d
unsigned int v8; // esi
unsigned int v9; // ebx
unsigned int v10; // edx
int v11; // r12d
unsigned int v12; // r15d... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x58
TEST EDI,EDI
JZ 0x0010153c
MOV R15D,EDI
CMP EDI,0x1
JZ 0x00101449
LEA R13D,[RDI + -0x1]
XOR R15D,R15D
LAB_0010121d:
CMP R13D,0x1
JZ 0x00101533
LEA EBX,[R13 + -0x1]
MOV dword ptr [RSP + 0x1c],R15D
XOR R12D,R12D
MOV EAX,R13D
MOV dword ptr [... | /* func0(int) */
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;
int iVar18;
int iVar19;
int iVar20;
int... |
1,555 | func0 |
#include <assert.h>
| int func0(int n) {
if (n == 0) {
return 2;
}
if (n == 1) {
return 1;
}
return func0(n - 1) + func0(n - 2);
}
| int main() {
assert(func0(9) == 76);
assert(func0(4) == 7);
assert(func0(3) == 4);
return 0;
}
| O3 | cpp | func0(int):
endbr64
test %edi,%edi
je 1238 <_Z5func0i+0x48>
push %rbp
push %rbx
mov %edi,%ebx
sub $0x8,%rsp
cmp $0x1,%edi
je 1240 <_Z5func0i+0x50>
xor %ebp,%ebp
lea -0x1(%rbx),%edi
callq 11f0 <_Z5func0i>
add %eax,%ebp
sub $0x2,%ebx
je 1228 <_Z5func0i+0x38>
cmp $0x1,%ebx
jne ... | _Z5func0i:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 58h
test edi, edi
jz loc_1528
mov r15d, edi
cmp edi, 1
jz loc_143D
lea r13d, [rdi-1]
xor r15d, r15d
loc_121D:
cmp r13d, 1
jz loc_151F
lea ebx, [r13-1]
mov [rsp+88h+var_6C... | long long func0(unsigned int a1)
{
unsigned int v1; // r15d
unsigned int v2; // r13d
int v3; // r15d
unsigned int v4; // ebx
int v5; // ebp
unsigned int v6; // edx
int v7; // r13d
int v8; // ecx
unsigned int v9; // ebx
unsigned int v10; // edi
int v11; // r12d
unsigned int v12; // r15d
unsign... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x58
TEST EDI,EDI
JZ 0x00101528
MOV R15D,EDI
CMP EDI,0x1
JZ 0x0010143d
LEA R13D,[RDI + -0x1]
XOR R15D,R15D
LAB_0010121d:
CMP R13D,0x1
JZ 0x0010151f
LEA EBX,[R13 + -0x1]
MOV dword ptr [RSP + 0x1c],R15D
XOR R12D,R12D
MOV dword ptr [RSP + 0x20],R... | /* func0(int) */
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;
int iVar18;
int iVar19;
int iVar20;
int... |
1,556 | func0 | #include <vector>
#include <string>
#include <assert.h>
#include <iostream>
| std::vector<std::string> func0(const std::vector<std::string>& list, const std::string& str_template) {
std::vector<std::string> formatted_strings;
for (const auto& item : list) {
formatted_strings.push_back(str_template + item);
}
return formatted_strings;
}
| int main() {
std::vector<std::string> list_1 = {"1", "2", "3", "4"};
std::vector<std::string> result_1 = {"temp1", "temp2", "temp3", "temp4"};
assert(func0(list_1, "temp") == result_1);
std::vector<std::string> list_2 = {"a", "b", "c", "d"};
std::vector<std::string> result_2 = {"pythona", "py... | O0 | cpp | func0(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %rbp
mov ... | _Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERKS5_:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 78h
mov [rbp+var_68], rdi
mov [rbp+var_70], rsi
mov [rbp+var_78], rdx
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_68]
... | long long func0(long long a1, long long a2, long long a3)
{
long long v5; // [rsp+20h] [rbp-60h] BYREF
_QWORD v6[2]; // [rsp+28h] [rbp-58h] BYREF
long long v7; // [rsp+38h] [rbp-48h]
_BYTE v8[40]; // [rsp+40h] [rbp-40h] BYREF
unsigned long long v9; // [rsp+68h] [rbp-18h]
v9 = __readfsqword(0x28u);
std::... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x78
MOV qword ptr [RBP + -0x68],RDI
MOV qword ptr [RBP + -0x70],RSI
MOV qword ptr [RBP + -0x78],RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x68]
MOV RDI,RAX
CALL 0x00102f5e
MOV RAX,qword ptr [RBP + -0x70]
MO... | /* func0(std::vector<std::string, std::allocator<std::string > > const&, std::string const&) */
vector * func0(vector *param_1,string *param_2)
{
bool bVar1;
int8 in_RDX;
long in_FS_OFFSET;
int8 local_68;
int8 local_60;
vector<std::string,std::allocator<std::string>> *local_58;
int8 local_50;
string l... |
1,557 | func0 | #include <vector>
#include <string>
#include <assert.h>
#include <iostream>
| std::vector<std::string> func0(const std::vector<std::string>& list, const std::string& str_template) {
std::vector<std::string> formatted_strings;
for (const auto& item : list) {
formatted_strings.push_back(str_template + item);
}
return formatted_strings;
}
| int main() {
std::vector<std::string> list_1 = {"1", "2", "3", "4"};
std::vector<std::string> result_1 = {"temp1", "temp2", "temp3", "temp4"};
assert(func0(list_1, "temp") == result_1);
std::vector<std::string> list_2 = {"a", "b", "c", "d"};
std::vector<std::string> result_2 = {"pythona", "py... | O1 | cpp | func0(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r14
push ... | _Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERKS5_:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 58h
mov rbp, rdi
mov rax, fs:28h
mov [rsp+88h+var_40], rax
xor eax, eax
mov qword ptr [rdi], 0
mov qword ptr [rdi+8]... | _QWORD * func0(_QWORD *a1, long long **a2, long long *a3)
{
long long *v4; // rbx
void **v6; // rsi
_QWORD *v7; // rdx
unsigned int v8; // eax
unsigned long long v9; // rdi
char *v10; // rdx
char *v11; // rcx
unsigned int v12; // eax
unsigned int v13; // eax
unsigned int v14; // edx
unsigned long ... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x58
MOV RBP,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x48],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 RAX,qword ptr [RSI + 0x8]
MOV qword ptr [R... | /* func0(std::vector<std::string, std::allocator<std::string > > const&, std::string const&) */
vector * func0(vector *param_1,string *param_2)
{
ulong *puVar1;
long *plVar2;
ulong uVar3;
ulong uVar4;
ulong uVar5;
uint uVar6;
int8 uVar7;
ulong uVar8;
uint uVar9;
ulong *in_RDX;
long lVar10;
ulo... |
1,558 | func0 | #include <vector>
#include <string>
#include <assert.h>
#include <iostream>
| std::vector<std::string> func0(const std::vector<std::string>& list, const std::string& str_template) {
std::vector<std::string> formatted_strings;
for (const auto& item : list) {
formatted_strings.push_back(str_template + item);
}
return formatted_strings;
}
| int main() {
std::vector<std::string> list_1 = {"1", "2", "3", "4"};
std::vector<std::string> result_1 = {"temp1", "temp2", "temp3", "temp4"};
assert(func0(list_1, "temp") == result_1);
std::vector<std::string> list_2 = {"a", "b", "c", "d"};
std::vector<std::string> result_2 = {"pythona", "py... | O2 | cpp | func0(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r15
push ... | _Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERKS5_:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
push r12
push rbp
mov rbp, rdi
push rbx
sub rsp, 58h
mov [rsp+88h+var_78], rdx
mov rax, fs:28h
mov [rsp+88h+var_40], rax
xor eax, eax
mov... | long long func0(long long a1, long long **a2, long long *a3)
{
long long *v4; // rbx
_QWORD *v5; // rdx
void *v6; // rax
unsigned long long v7; // r13
unsigned long long v8; // r12
long long v9; // rcx
long long v10; // rax
void **v11; // rsi
unsigned int v13; // ecx
unsigned long long v14; // rdi
... | func0:
MOV RDI,R14
CALL 0x00101290
MOV RDI,RBP
CALL 0x00101d30
MOV RAX,qword ptr [RSP + 0x48]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x00101328
MOV RDI,RBX
LAB_00101323:
CALL 0x001012e0
LAB_00101328:
CALL 0x00101270 | /* func0(std::vector<std::string, std::allocator<std::string > > const&, std::string const&) [clone
.cold] */
void func0(vector *param_1,string *param_2,int param_3,int param_4,int param_5,
int param_6,int param_7,int param_8,int param_9,int param_10
,long param_11)
{
vector<std::string,std::... |
1,559 | func0 | #include <vector>
#include <string>
#include <assert.h>
#include <iostream>
| std::vector<std::string> func0(const std::vector<std::string>& list, const std::string& str_template) {
std::vector<std::string> formatted_strings;
for (const auto& item : list) {
formatted_strings.push_back(str_template + item);
}
return formatted_strings;
}
| int main() {
std::vector<std::string> list_1 = {"1", "2", "3", "4"};
std::vector<std::string> result_1 = {"temp1", "temp2", "temp3", "temp4"};
assert(func0(list_1, "temp") == result_1);
std::vector<std::string> list_2 = {"a", "b", "c", "d"};
std::vector<std::string> result_2 = {"pythona", "py... | O3 | cpp | func0(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r15
pxor ... | _Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERKS5_:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
push r12
push rbp
mov rbp, rdi
push rbx
sub rsp, 58h
mov [rsp+88h+var_78], rdx
mov rax, fs:28h
mov [rsp+88h+var_40], rax
xor eax, eax
mov... | long long func0(long long a1, long long **a2, long long *a3)
{
long long *v4; // rbx
_QWORD *v5; // rdx
void *v6; // rax
long long v7; // rax
unsigned long long v8; // r13
unsigned long long v9; // r12
void **v10; // rsi
unsigned int v12; // ecx
unsigned long long v13; // rdi
char *v14; // rdx
ch... | func0:
MOV RDI,R14
CALL 0x00101290
MOV RDI,RBP
CALL 0x00101de0
MOV RAX,qword ptr [RSP + 0x48]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x00101328
MOV RDI,RBX
LAB_00101323:
CALL 0x001012e0
LAB_00101328:
CALL 0x00101260 | /* func0(std::vector<std::string, std::allocator<std::string > > const&, std::string const&) [clone
.cold] */
void func0(vector *param_1,string *param_2,int param_3,int param_4,int param_5,
int param_6,int param_7,int param_8,int param_9,int param_10
,long param_11)
{
vector<std::string,std::... |
1,560 | func0 |
#include <vector>
#include <map>
#include <string>
#include <cassert>
| std::vector<std::map<std::string, std::map<std::string, int>>> func0(const std::vector<std::string>& l1, const std::vector<std::string>& l2, const std::vector<int>& l3) {
std::vector<std::map<std::string, std::map<std::string, int>>> result;
for (size_t i = 0; i < l1.size(); ++i) {
result.push_back({... | int main() {
assert((func0({"S001", "S002", "S003", "S004"}, {"Adina Park", "Leyton Marsh", "Duncan Boyle", "Saim Richards"}, {85, 98, 89, 92}) ==
std::vector<std::map<std::string, std::map<std::string, int>>>{{{"S001", {{"Adina Park", 85}}}}, {{"S002", {{"Leyton Marsh", 98}}}}, {{"S003", {{"Duncan Bo... | O0 | cpp | func0(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::_... | _Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EES9_RKS_IiSaIiEE:
endbr64
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 178h
mov [rbp+var_148], rdi
mov [rbp+var_150], rsi
mov [rbp+var_158], rdx
mov [rbp+var_160], rcx
... | long long func0(long long a1, long long a2, long long a3, long long a4)
{
long long v4; // r15
long long v5; // rbx
long long v6; // rax
_BYTE *j; // rbx
long long *k; // rbx
unsigned long long v9; // rax
char v13; // [rsp+64h] [rbp-13Ch] BYREF
char v14; // [rsp+65h] [rbp-13Bh] BYREF
char v15; // [rs... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x178
MOV qword ptr [RBP + -0x148],RDI
MOV qword ptr [RBP + -0x150],RSI
MOV qword ptr [RBP + -0x158],RDX
MOV qword ptr [RBP + -0x160],RCX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x38],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RB... | /* func0(std::vector<std::string, std::allocator<std::string > > const&, std::vector<std::string,
std::allocator<std::string > > const&, std::vector<int, std::allocator<int> > const&) */
vector * func0(vector *param_1,vector *param_2,vector *param_3)
{
string *psVar1;
string *psVar2;
int *piVar3;
ulong uVa... |
1,561 | func0 |
#include <vector>
#include <map>
#include <string>
#include <cassert>
| std::vector<std::map<std::string, std::map<std::string, int>>> func0(const std::vector<std::string>& l1, const std::vector<std::string>& l2, const std::vector<int>& l3) {
std::vector<std::map<std::string, std::map<std::string, int>>> result;
for (size_t i = 0; i < l1.size(); ++i) {
result.push_back({... | int main() {
assert((func0({"S001", "S002", "S003", "S004"}, {"Adina Park", "Leyton Marsh", "Duncan Boyle", "Saim Richards"}, {85, 98, 89, 92}) ==
std::vector<std::map<std::string, std::map<std::string, int>>>{{{"S001", {{"Adina Park", 85}}}}, {{"S002", {{"Leyton Marsh", 98}}}}, {{"S003", {{"Duncan Bo... | O1 | cpp | func0(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::_... | _Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EES9_RKS_IiSaIiEE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 118h
mov r12, rdi
mov [rsp+148h+var_140], rdx
mov rax, fs:28h
mov [rsp+148h+var_40], rax
xor eax, eax
mov ... | _QWORD * func0(_QWORD *a1, long long *a2, _QWORD *a3, _QWORD *a4)
{
long long v4; // rbx
unsigned long long v7; // rbp
long long v8; // rax
long long v9; // rdx
int *v10; // rcx
long long v11; // rdx
int *v12; // rcx
long long v13; // rsi
long long v14; // rax
_QWORD *v15; // rax
int *v16; // r14
... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x118
MOV R12,RDI
MOV qword ptr [RSP + 0x8],RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x108],RAX
XOR EAX,EAX
MOV qword ptr [RDI],0x0
MOV qword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
MOV RBX,qword ptr [RSI]
CMP qword ptr ... | /* func0(std::vector<std::string, std::allocator<std::string > > const&, std::vector<std::string,
std::allocator<std::string > > const&, std::vector<int, std::allocator<int> > const&) */
vector * func0(vector *param_1,vector *param_2,vector *param_3)
{
char *pcVar1;
_Rb_tree_node_base *p_Var2;
_Rb_tree_node ... |
1,562 | func0 |
#include <vector>
#include <map>
#include <string>
#include <cassert>
| std::vector<std::map<std::string, std::map<std::string, int>>> func0(const std::vector<std::string>& l1, const std::vector<std::string>& l2, const std::vector<int>& l3) {
std::vector<std::map<std::string, std::map<std::string, int>>> result;
for (size_t i = 0; i < l1.size(); ++i) {
result.push_back({... | int main() {
assert((func0({"S001", "S002", "S003", "S004"}, {"Adina Park", "Leyton Marsh", "Duncan Boyle", "Saim Richards"}, {85, 98, 89, 92}) ==
std::vector<std::map<std::string, std::map<std::string, int>>>{{{"S001", {{"Adina Park", 85}}}}, {{"S002", {{"Leyton Marsh", 98}}}}, {{"S003", {{"Duncan Bo... | O2 | cpp | func0(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::_... | _Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EES9_RKS_IiSaIiEE:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
mov r13, rdi
push r12
push rbp
push rbx
sub rsp, 138h
mov [rsp+168h+var_150], rdx
lea rbx, [rsp+168h+s1]
mov [rsp+168h+var_148], rc... | long long func0(long long a1, long long *a2, _QWORD *a3, _QWORD *a4)
{
long long v5; // rax
long long v7; // r12
_QWORD *v8; // rax
int *v9; // rbx
int v10; // eax
long long insert_hint_unique_pos; // rax
int *v12; // rdx
int *v13; // rbx
long long v14; // r14
char *v15; // rsi
size_t v16; // rdx... | func0:
MOV RDI,qword ptr [RSP + 0x80]
CALL 0x00102e70
LAB_0010139a:
MOV RDI,RBX
CALL 0x00103a70
LAB_001013a2:
MOV RDI,qword ptr [RSP + 0x50]
MOV RBX,RBP
CALL 0x00102cf0
JMP 0x001013f1 | /* func0(std::vector<std::string, std::allocator<std::string > > const&, std::vector<std::string,
std::allocator<std::string > > const&, std::vector<int, std::allocator<int> > const&) [clone
.cold] */
void func0(vector *param_1,vector *param_2,vector *param_3,int param_4,int param_5,
int param_6,int pa... |
1,563 | func0 |
#include <vector>
#include <map>
#include <string>
#include <cassert>
| std::vector<std::map<std::string, std::map<std::string, int>>> func0(const std::vector<std::string>& l1, const std::vector<std::string>& l2, const std::vector<int>& l3) {
std::vector<std::map<std::string, std::map<std::string, int>>> result;
for (size_t i = 0; i < l1.size(); ++i) {
result.push_back({... | int main() {
assert((func0({"S001", "S002", "S003", "S004"}, {"Adina Park", "Leyton Marsh", "Duncan Boyle", "Saim Richards"}, {85, 98, 89, 92}) ==
std::vector<std::map<std::string, std::map<std::string, int>>>{{{"S001", {{"Adina Park", 85}}}}, {{"S002", {{"Leyton Marsh", 98}}}}, {{"S003", {{"Duncan Bo... | O3 | cpp | func0(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::_... | _Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EES9_RKS_IiSaIiEE:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
push r12
mov r12, rdi
push rbp
xor ebp, ebp
push rbx
sub rsp, 148h
mov [rsp+178h+var_150], rdx
lea rdx, [rsp+178h+s1]
mov [rsp+... | long long func0(long long a1, long long *a2, _QWORD *a3, _QWORD *a4)
{
unsigned long long v5; // rbp
long long v6; // rax
long long v7; // rax
size_t v8; // rbx
int *v9; // r13
_BYTE *v10; // r14
_QWORD *v11; // rax
int v12; // eax
long long insert_unique_pos; // rax
int *v14; // rdx
const void *... | func0:
MOV RDI,R14
CALL 0x00101230
LAB_00101494:
MOV RDI,qword ptr [RSP + 0x60]
CALL 0x00103120
MOV RDI,qword ptr [RSP + 0x20]
CALL 0x00101230
LAB_001014a8:
MOV RDI,R12
CALL 0x00104ca0
MOV RAX,qword ptr [RSP + 0x138]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x00101521
MOV RDI,RBX
LAB_001014c6:
CALL 0x00101260 | /* func0(std::vector<std::string, std::allocator<std::string > > const&, std::vector<std::string,
std::allocator<std::string > > const&, std::vector<int, std::allocator<int> > const&) [clone
.cold] */
void func0(vector *param_1,vector *param_2,vector *param_3,int param_4,int param_5,
int param_6,int pa... |
1,564 | func0 |
#include <iostream>
#include <vector>
#include <assert.h>
| int func0(int n) {
std::vector<int> res;
res.push_back(0);
res.push_back(1);
int i = 2;
while (i < n + 1) {
res.push_back(std::max(i, res[i / 2] + res[i / 3] + res[i / 4] + res[i / 5]));
i++;
}
return res[n];
}
| int main() {
assert(func0(60) == 106);
assert(func0(10) == 12);
assert(func0(2) == 2);
std::cout << "All test cases passed." << std::endl;
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
lea -0x30(%rbp),%rax
mov %rax,%rdi
callq 15d2 <_ZNSt6vectorIiSaIiEEC1Ev>
movl $0x0,-0x34(%rbp)
lea -0x34(%rbp),%rdx
lea -0x30(%rbp),%rax
mov... | _Z5func0i:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 48h
mov [rbp+var_44], edi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_30]
mov rdi, rax
call _ZNSt6vectorIiSaIiEEC2Ev; std::vector<int>::vector(void)
mov [rbp+var_34], 0
lea rdx, [rbp+var_... | long long func0(int a1)
{
int v1; // ebx
int v2; // ebx
int v3; // ebx
long long v4; // rax
unsigned int v5; // ebx
int i; // [rsp+18h] [rbp-38h] BYREF
int v8; // [rsp+1Ch] [rbp-34h] BYREF
_BYTE v9[24]; // [rsp+20h] [rbp-30h] BYREF
unsigned long long v10; // [rsp+38h] [rbp-18h]
v10 = __readfsqword... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x48
MOV dword ptr [RBP + -0x44],EDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x30]
MOV RDI,RAX
CALL 0x00101580
MOV dword ptr [RBP + -0x34],0x0
LEA RDX,[RBP + -0x34]
LEA RAX,[RBP + -0x30]
MOV RSI,RDX
MOV RDI,RAX
LAB_0010... | /* func0(int) */
int4 func0(int param_1)
{
int iVar1;
int iVar2;
int4 uVar3;
int iVar4;
int *piVar5;
int4 *puVar6;
long in_FS_OFFSET;
int local_40;
int local_3c;
vector<int,std::allocator<int>> local_38 [24];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
std::vector<int,std::a... |
1,565 | func0 |
#include <iostream>
#include <vector>
#include <assert.h>
| int func0(int n) {
std::vector<int> res;
res.push_back(0);
res.push_back(1);
int i = 2;
while (i < n + 1) {
res.push_back(std::max(i, res[i / 2] + res[i / 3] + res[i / 4] + res[i / 5]));
i++;
}
return res[n];
}
| int main() {
assert(func0(60) == 106);
assert(func0(10) == 12);
assert(func0(2) == 2);
std::cout << "All test cases passed." << std::endl;
return 0;
}
| O1 | cpp | func0(int):
endbr64
push %rbp
push %rbx
sub $0x38,%rsp
mov %edi,%ebx
mov %fs:0x28,%rax
mov %rax,0x28(%rsp)
xor %eax,%eax
movq $0x0,0x10(%rsp)
movq $0x0,0x18(%rsp)
movq $0x0,0x20(%rsp)
movl $0x0,0xc(%rsp)
lea 0xc(%rsp),%rsi
lea 0x10(%rsp),%rdi
callq 1772 <_ZNSt6vectorIiSaIiEE12emplace_b... | _Z5func0i:
endbr64
push r12
push rbp
push rbx
sub rsp, 30h
mov ebp, edi
mov rax, fs:28h
mov [rsp+48h+var_20], rax
xor eax, eax
mov [rsp+48h+var_38], 0
mov [rsp+48h+var_30], 0
mov [rsp+48h+var_28], 0
mov [rsp+48h+var_3C], 0
lea rsi, [rsp+48h+var_3C]
lea rdi, [rsp+48h+... | long long func0(int a1)
{
int i; // ebx
int *v2; // rdx
int *v3; // rsi
unsigned int v4; // ebx
int v6; // [rsp+8h] [rbp-40h] BYREF
int v7; // [rsp+Ch] [rbp-3Ch] BYREF
void *v8; // [rsp+10h] [rbp-38h] BYREF
int *v9; // [rsp+18h] [rbp-30h]
int *v10; // [rsp+20h] [rbp-28h]
unsigned long long v11; // ... | func0:
ENDBR64
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x30
MOV EBP,EDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x28],RAX
XOR EAX,EAX
MOV qword ptr [RSP + 0x10],0x0
MOV qword ptr [RSP + 0x18],0x0
MOV qword ptr [RSP + 0x20],0x0
MOV dword ptr [RSP + 0xc],0x0
LEA RSI,[RSP + 0xc]
LEA RDI,[RSP + 0x10]
LAB_001012b4:
CALL... | /* func0(int) */
int4 func0(int param_1)
{
int4 uVar1;
int iVar2;
int iVar3;
int *piVar4;
long in_FS_OFFSET;
int local_40;
int local_3c;
void *local_38;
int *local_30;
int *local_28;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
local_38 = (void *)0x0;
local_30 = (int *)0x0;... |
1,566 | func0 |
#include <iostream>
#include <vector>
#include <assert.h>
| int func0(int n) {
std::vector<int> res;
res.push_back(0);
res.push_back(1);
int i = 2;
while (i < n + 1) {
res.push_back(std::max(i, res[i / 2] + res[i / 3] + res[i / 4] + res[i / 5]));
i++;
}
return res[n];
}
| int main() {
assert(func0(60) == 106);
assert(func0(10) == 12);
assert(func0(2) == 2);
std::cout << "All test cases passed." << std::endl;
return 0;
}
| O2 | cpp | func0(int):
endbr64
push %r15
xor %esi,%esi
push %r14
push %r13
movslq %edi,%r13
push %r12
push %rbp
push %rbx
sub $0x48,%rsp
mov %fs:0x28,%rax
mov %rax,0x38(%rsp)
xor %eax,%eax
lea 0x1c(%rsp),%r14
lea 0x20(%rsp),%rbp
movq $0x0,0x20(%rsp)
mov %r14,%rdx
mov %rbp,%rdi
movq $0x0,... | _Z5func0i:
endbr64
push r15
pxor xmm0, xmm0
xor esi, esi
push r14
push r13
push r12
push rbp
movsxd rbp, edi
push rbx
sub rsp, 48h
mov rax, fs:28h
mov [rsp+78h+var_40], rax
xor eax, eax
lea r12, [rsp+78h+var_5C]
lea rax, [rsp+78h+var_58]
mov [rsp+78h+var_48], 0
mov ... | long long func0(int a1)
{
long long v1; // rbp
char *v2; // rax
_BYTE *v3; // rsi
_DWORD *v4; // rdi
int v5; // ebx
int v6; // edx
char *v7; // rax
int *v8; // rdx
unsigned int v9; // ebx
int v11; // [rsp+10h] [rbp-60h] BYREF
int v12; // [rsp+14h] [rbp-5Ch] BYREF
void *v13[2]; // [rsp+18h] [rbp... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
XOR ESI,ESI
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
MOVSXD RBP,EDI
PUSH RBX
SUB RSP,0x48
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
LEA R12,[RSP + 0x1c]
LEA RAX,[RSP + 0x20]
MOV qword ptr [RSP + 0x30],0x0
MOV RDX,R12
MOV RDI,RAX
MOV qword ptr [RSP + 0x8],RA... | /* func0(int) */
int4 func0(int param_1)
{
int4 uVar1;
uint uVar2;
uint *puVar3;
uint *puVar4;
uint *puVar5;
void *pvVar6;
long in_FS_OFFSET;
uint local_60;
uint local_5c;
void *local_58;
uint *puStack_50;
uint *local_48;
long local_40;
local_40 = *(long *)(in_FS_OFFSET + 0x28);
local... |
1,567 | func0 |
#include <iostream>
#include <vector>
#include <assert.h>
| int func0(int n) {
std::vector<int> res;
res.push_back(0);
res.push_back(1);
int i = 2;
while (i < n + 1) {
res.push_back(std::max(i, res[i / 2] + res[i / 3] + res[i / 4] + res[i / 5]));
i++;
}
return res[n];
}
| int main() {
assert(func0(60) == 106);
assert(func0(10) == 12);
assert(func0(2) == 2);
std::cout << "All test cases passed." << std::endl;
return 0;
}
| O3 | cpp | func0(int):
endbr64
push %r15
pxor %xmm0,%xmm0
xor %esi,%esi
push %r14
movslq %edi,%r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x48,%rsp
mov %fs:0x28,%rax
mov %rax,0x38(%rsp)
xor %eax,%eax
lea 0x1c(%rsp),%r12
lea 0x20(%rsp),%rbp
movq $0x0,0x30(%rsp)
mov %r12,%rdx
mov %rb... | _Z5func0i:
endbr64
push r13
pxor xmm0, xmm0
xor esi, esi
push r12
push rbp
movsxd rbp, edi
push rbx
sub rsp, 38h
mov rax, fs:28h
mov [rsp+58h+var_30], rax
xor eax, eax
lea r12, [rsp+58h+var_4C]
lea r13, [rsp+58h+var_48]
mov [rsp+58h+var_38], 0
mov rdx, r12
mov rdi... | long long func0(int a1)
{
long long v1; // rbp
char *v2; // rax
_BYTE *v3; // rsi
_DWORD *v4; // rdi
int v5; // ebx
int *v6; // rcx
int v7; // eax
char *v8; // rdx
unsigned int v9; // ebx
int v11; // [rsp+0h] [rbp-50h] BYREF
int v12; // [rsp+4h] [rbp-4Ch] BYREF
void *v13[2]; // [rsp+8h] [rbp-48... | func0:
ENDBR64
PUSH R13
PXOR XMM0,XMM0
XOR ESI,ESI
PUSH R12
PUSH RBP
MOVSXD RBP,EDI
PUSH RBX
SUB RSP,0x38
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x28],RAX
XOR EAX,EAX
LEA R12,[RSP + 0xc]
LEA R13,[RSP + 0x10]
MOV qword ptr [RSP + 0x20],0x0
MOV RDX,R12
MOV RDI,R13
MOVAPS xmmword ptr [RSP + 0x10],XMM0
MOV dword ... | /* func0(int) */
int4 func0(int param_1)
{
int4 uVar1;
int iVar2;
int iVar3;
int *piVar4;
int *piVar5;
void *pvVar6;
long in_FS_OFFSET;
int local_50;
int local_4c;
void *local_48;
int *piStack_40;
int *local_38;
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
local_38 = (int... |
1,568 | func0 |
#include <iostream>
#include <vector>
#include <cassert>
| std::pair<int, std::vector<int>> func0(const std::vector<std::vector<int>>& input_list){
int max_length = 0;
std::vector<int> max_list;
for(const auto& sublist : input_list){
if(sublist.size() > max_length){
max_length = sublist.size();
max_list = sublist;
... | int main(){
assert(func0({{0}, {1, 3}, {5, 7}, {9, 11}, {13, 15, 17}}) == std::make_pair(3, std::vector<int>{13, 15, 17}));
assert(func0({{1,2,3,4,5}, {1,2,3,4}, {1,2,3}, {1,2}, {1}}) == std::make_pair(5, std::vector<int>{1,2,3,4,5}));
assert(func0({{3,4,5}, {6,7,8,9}, {10,11,12}}) == std::make_pair(4, s... | O0 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x68,%rsp
mov %rdi,-0x68(%rbp)
mov %rsi,-0x70(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
movl $0x0,-0x54(... | _Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 68h
mov [rbp+var_68], rdi
mov [rbp+var_70], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov [rbp+var_54], 0
lea rax, [rbp+var_30]
mov rdi, rax
call _ZNSt6vectorIiSaIiEEC2Ev... | long long func0(long long a1, long long a2)
{
int v3; // [rsp+1Ch] [rbp-54h] BYREF
long long v4; // [rsp+20h] [rbp-50h] BYREF
_QWORD v5[2]; // [rsp+28h] [rbp-48h] BYREF
long long v6; // [rsp+38h] [rbp-38h]
_BYTE v7[24]; // [rsp+40h] [rbp-30h] BYREF
unsigned long long v8; // [rsp+58h] [rbp-18h]
v8 = __re... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x68
MOV qword ptr [RBP + -0x68],RDI
MOV qword ptr [RBP + -0x70],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV dword ptr [RBP + -0x54],0x0
LEA RAX,[RBP + -0x30]
MOV RDI,RAX
CALL 0x0010247e
MOV RAX,qword ptr [RBP + -0x70]
MOV qword pt... | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > > const&) */
vector * func0(vector *param_1)
{
bool bVar1;
ulong uVar2;
vector<std::vector<int,std::allocator<int>>,std::allocator<std::vector<int,std::allocator<int>>>>
*in_RSI;
long in_F... |
1,569 | func0 |
#include <iostream>
#include <vector>
#include <cassert>
| std::pair<int, std::vector<int>> func0(const std::vector<std::vector<int>>& input_list){
int max_length = 0;
std::vector<int> max_list;
for(const auto& sublist : input_list){
if(sublist.size() > max_length){
max_length = sublist.size();
max_list = sublist;
... | int main(){
assert(func0({{0}, {1, 3}, {5, 7}, {9, 11}, {13, 15, 17}}) == std::make_pair(3, std::vector<int>{13, 15, 17}));
assert(func0({{1,2,3,4,5}, {1,2,3,4}, {1,2,3}, {1,2}, {1}}) == std::make_pair(5, std::vector<int>{1,2,3,4,5}));
assert(func0({{3,4,5}, {6,7,8,9}, {10,11,12}}) == std::make_pair(4, s... | O1 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&):
endbr64
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x20,%rsp
mov %rdi,%r12
mov %fs:0x28,%rax
mov %rax,0x18(%rsp)
xor %eax,%eax
movq $0x0,(%rsp)
movq $0x0,... | _Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EE:
endbr64
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 20h
mov r12, rdi
mov rax, fs:28h
mov [rsp+48h+var_30], rax
xor eax, eax
mov [rsp+48h+src], 0
mov [rsp+48h+var_40], 0
mov [rsp+48h+var_38], 0
mov rbx, [rsi]
mov r13... | long long func0(long long a1, long long a2)
{
_QWORD *v2; // rbx
_QWORD *v3; // r13
int v4; // ebp
char *v5; // rbp
signed long long v6; // rbx
_DWORD *v7; // rax
struct _Unwind_Exception *v8; // rbx
char *v9; // r13
unsigned long long v10; // rsi
void *src; // [rsp+0h] [rbp-48h] BYREF
char *v13;... | func0:
ENDBR64
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x20
MOV R12,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x18],RAX
XOR EAX,EAX
MOV qword ptr [RSP],0x0
MOV qword ptr [RSP + 0x8],0x0
MOV qword ptr [RSP + 0x10],0x0
MOV RBX,qword ptr [RSI]
MOV R13,qword ptr [RSI + 0x8]
CMP R13,RBX
JZ 0x00101387... | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > > const&) */
vector * func0(vector *param_1)
{
vector *pvVar1;
int4 *__src;
int iVar2;
ulong uVar3;
int4 *__dest;
int8 uVar4;
vector *pvVar5;
long *in_RSI;
long in_FS_OFFSET;
int... |
1,570 | func0 |
#include <iostream>
#include <vector>
#include <cassert>
| std::pair<int, std::vector<int>> func0(const std::vector<std::vector<int>>& input_list){
int max_length = 0;
std::vector<int> max_list;
for(const auto& sublist : input_list){
if(sublist.size() > max_length){
max_length = sublist.size();
max_list = sublist;
... | int main(){
assert(func0({{0}, {1, 3}, {5, 7}, {9, 11}, {13, 15, 17}}) == std::make_pair(3, std::vector<int>{13, 15, 17}));
assert(func0({{1,2,3,4,5}, {1,2,3,4}, {1,2,3}, {1,2}, {1}}) == std::make_pair(5, std::vector<int>{1,2,3,4,5}));
assert(func0({{3,4,5}, {6,7,8,9}, {10,11,12}}) == std::make_pair(4, s... | O2 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&):
endbr64
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x20,%rsp
mov (%rsi),%rbx
mov 0x8(%rsi),%r13
mov %fs:0x28,%rax
mov %rax,0x18(%rsp)
xor ... | _Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EE:
endbr64
push r15
pxor xmm0, xmm0
push r14
xor r14d, r14d
push r13
xor r13d, r13d
push r12
push rbp
push rbx
sub rsp, 48h
mov rbx, [rsi]
mov r15, [rsi+8]
mov [rsp+78h+var_70], rdi
mov rax, fs:28h
mov [rsp+78h+var_40], rax
xor ... | _DWORD * func0(_DWORD *a1, char ***a2)
{
_DWORD *v2; // r14
int v3; // r13d
char **v4; // rbx
char **v5; // r15
char *v6; // rdx
char *v7; // r12
signed long long v8; // rbp
_DWORD *v9; // r8
long long v10; // rcx
_DWORD *v11; // rax
bool v12; // zf
unsigned long long v13; // rsi
char *v15; //... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
XOR R14D,R14D
PUSH R13
XOR R13D,R13D
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x48
MOV RBX,qword ptr [RSI]
MOV R15,qword ptr [RSI + 0x8]
MOV qword ptr [RSP + 0x8],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
MOVAPS xmmword ptr [RSP + 0x20],XMM0
MOV... | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > > const&) */
vector * func0(vector *param_1)
{
vector *pvVar1;
vector *pvVar2;
long lVar3;
int iVar4;
vector *__dest;
vector *__dest_00;
long lVar5;
size_t __n;
vector *__n_00;
v... |
1,571 | func0 |
#include <iostream>
#include <vector>
#include <cassert>
| std::pair<int, std::vector<int>> func0(const std::vector<std::vector<int>>& input_list){
int max_length = 0;
std::vector<int> max_list;
for(const auto& sublist : input_list){
if(sublist.size() > max_length){
max_length = sublist.size();
max_list = sublist;
... | int main(){
assert(func0({{0}, {1, 3}, {5, 7}, {9, 11}, {13, 15, 17}}) == std::make_pair(3, std::vector<int>{13, 15, 17}));
assert(func0({{1,2,3,4,5}, {1,2,3,4}, {1,2,3}, {1,2}, {1}}) == std::make_pair(5, std::vector<int>{1,2,3,4,5}));
assert(func0({{3,4,5}, {6,7,8,9}, {10,11,12}}) == std::make_pair(4, s... | O3 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x38,%rsp
mov 0x8(%rsi),%rax
mov (%rsi),%rbx
mov %rdi,0x10(%rsp)
mov %rax,(%rsp)
cmp %rax,%r... | _Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EE:
endbr64
push r15
pxor xmm0, xmm0
push r14
xor r14d, r14d
push r13
xor r13d, r13d
push r12
push rbp
push rbx
sub rsp, 48h
mov rbx, [rsi]
mov r15, [rsi+8]
mov [rsp+78h+var_70], rdi
mov rax, fs:28h
mov [rsp+78h+var_40], rax
xor ... | _DWORD * func0(_DWORD *a1, char ***a2)
{
_DWORD *v2; // r14
int v3; // r13d
char **v4; // rbx
char **v5; // r15
char *v6; // rdx
char *v7; // r12
signed long long v8; // rbp
_DWORD *v9; // r8
long long v10; // rcx
char *v11; // rsi
signed long long v12; // rdx
_DWORD *v13; // rax
bool v14; // ... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
XOR R14D,R14D
PUSH R13
XOR R13D,R13D
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x48
MOV RBX,qword ptr [RSI]
MOV R15,qword ptr [RSI + 0x8]
MOV qword ptr [RSP + 0x8],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
MOVAPS xmmword ptr [RSP + 0x20],XMM0
MOV... | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > > const&) */
vector * func0(vector *param_1)
{
vector *pvVar1;
vector *pvVar2;
long lVar3;
int iVar4;
vector *__dest;
vector *__dest_00;
long lVar5;
size_t __n;
vector *__n_00;
v... |
1,572 | func0 |
#include <cassert>
#include <vector>
#include <unordered_set>
| bool func0(const std::vector<int>& test_tup) {
bool res = true;
std::unordered_set<int> temp;
for(auto ele : test_tup){
if(temp.find(ele) != temp.end()){
res = false;
break;
}
temp.insert(ele);
}
return res;
}
| int main(){
assert(func0(std::vector<int>{1, 4, 5, 6, 1, 4}) == false);
assert(func0(std::vector<int>{1, 4, 5, 6}) == true);
assert(func0(std::vector<int>{2, 3, 4, 5, 6}) == true);
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x88,%rsp
mov %rdi,-0x88(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
movb $0x1,-0x7d(%rbp)
lea -0x50(%rbp),%rax
mov %rax,%rdi
callq 1904 <_ZNSt13unordered_setIiSt4hashIiESt8... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 88h
mov [rbp+var_88], rdi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov [rbp+var_7D], 1
lea rax, [rbp+var_50]
mov rdi, rax
call _ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEEC2Ev; std... | long long func0(long long a1)
{
unsigned __int8 v2; // [rsp+13h] [rbp-7Dh]
int v3; // [rsp+14h] [rbp-7Ch] BYREF
long long v4; // [rsp+18h] [rbp-78h] BYREF
long long v5; // [rsp+20h] [rbp-70h] BYREF
long long v6; // [rsp+28h] [rbp-68h] BYREF
_QWORD v7[2]; // [rsp+30h] [rbp-60h] BYREF
_BYTE v8[56]; // [rsp... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x88
MOV qword ptr [RBP + -0x88],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV byte ptr [RBP + -0x7d],0x1
LEA RAX,[RBP + -0x50]
MOV RDI,RAX
CALL 0x001019d4
MOV RAX,qword ptr [RBP + -0x88]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword... | /* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
char cVar1;
bool bVar2;
int *piVar3;
long in_FS_OFFSET;
int local_85;
int local_84;
int8 local_80;
int8 local_78;
int8 local_70;
int8 local_68;
vector<int,std::allocator<int>> *local_60;
unordered_set<int,s... |
1,573 | func0 |
#include <cassert>
#include <vector>
#include <unordered_set>
| bool func0(const std::vector<int>& test_tup) {
bool res = true;
std::unordered_set<int> temp;
for(auto ele : test_tup){
if(temp.find(ele) != temp.end()){
res = false;
break;
}
temp.insert(ele);
}
return res;
}
| int main(){
assert(func0(std::vector<int>{1, 4, 5, 6, 1, 4}) == false);
assert(func0(std::vector<int>{1, 4, 5, 6}) == true);
assert(func0(std::vector<int>{2, 3, 4, 5, 6}) == true);
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 $0x58,%rsp
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
lea 0x40(%rsp),%rax
mov %rax,0x10(%rsp)
movq $0x1,0x18(%rsp)
movq $0x0,0x20(%rsp)
movq $0x0,0x2... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push r12
push rbp
push rbx
sub rsp, 50h
mov rax, fs:28h
mov [rsp+68h+var_20], rax
xor eax, eax
lea rax, [rsp+68h+var_28]
mov [rsp+68h+var_58], rax
mov [rsp+68h+var_50], 1
mov [rsp+68h+var_48], 0
mov [rsp+68h+var_40], 0
mov [rsp+68h+va... | long long func0(int **a1, long long a2, long long a3, long long a4, unsigned long long a5, unsigned long long a6)
{
int *v6; // rbx
int *v7; // r12
_DWORD **v8; // rsi
_DWORD *i; // rax
int v10; // ecx
long long *v11; // rax
unsigned int v12; // ebx
int v14; // [rsp+4h] [rbp-64h] BYREF
_QWORD **v15; ... | func0:
ENDBR64
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x50
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x48],RAX
XOR EAX,EAX
LEA RAX,[RSP + 0x40]
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x18],0x1
MOV qword ptr [RSP + 0x20],0x0
MOV qword ptr [RSP + 0x28],0x0
MOV dword ptr [RSP + 0x30],0x3f800000
MOV qword p... | /* func0(std::vector<int, std::allocator<int> > const&) */
int8 func0(vector *param_1)
{
int *piVar1;
long *plVar2;
int8 *puVar3;
long *plVar4;
int *piVar5;
int8 uVar6;
long *plVar7;
long in_FS_OFFSET;
int local_64;
int8 **local_60;
int8 *local_58;
ulong local_50;
int8 *local_48;
long loca... |
1,574 | func0 |
#include <cassert>
#include <vector>
#include <unordered_set>
| bool func0(const std::vector<int>& test_tup) {
bool res = true;
std::unordered_set<int> temp;
for(auto ele : test_tup){
if(temp.find(ele) != temp.end()){
res = false;
break;
}
temp.insert(ele);
}
return res;
}
| int main(){
assert(func0(std::vector<int>{1, 4, 5, 6, 1, 4}) == false);
assert(func0(std::vector<int>{1, 4, 5, 6}) == true);
assert(func0(std::vector<int>{2, 3, 4, 5, 6}) == true);
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 $0x68,%rsp
mov (%rdi),%rbp
mov 0x8(%rdi),%r14
mov %fs:0x28,%rax
mov %rax,0x58(%rsp)
xor %eax,%eax
lea 0x50(%rsp),%rsi
movl $0x3f800000,0x40(%rsp)
mov %rsi,0... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 68h
mov rbx, [rdi]
mov r13, [rdi+8]
mov rax, fs:28h
mov [rsp+98h+var_40], rax
xor eax, eax
lea rax, [rsp+98h+var_48]
mov [rsp+98h+var_58], 3F800000h
mov [rsp+98h+var_... | long long func0(int **a1)
{
int *v1; // rbx
int *v2; // r13
int v3; // ebp
_QWORD *v4; // rdx
_QWORD *v5; // rax
unsigned int v6; // ebx
unsigned long long v8; // r14
unsigned long long v9; // rdx
_QWORD *v10; // r10
unsigned long long v11; // r15
_QWORD *v12; // rdi
_QWORD *v13; // r11
_QWOR... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x68
MOV RBX,qword ptr [RDI]
MOV R13,qword ptr [RDI + 0x8]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x58],RAX
XOR EAX,EAX
LEA RAX,[RSP + 0x50]
MOV dword ptr [RSP + 0x40],0x3f800000
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x... | /* func0(std::vector<int, std::allocator<int> > const&) */
int8 func0(vector *param_1)
{
int iVar1;
int iVar2;
int *piVar3;
long *plVar4;
long *plVar5;
char cVar6;
long *plVar7;
long *plVar8;
void *__s;
int8 *puVar9;
long *plVar10;
ulong uVar11;
ulong extraout_RDX;
int *piVar12;
int8 uVa... |
1,575 | func0 |
#include <cassert>
#include <vector>
#include <unordered_set>
| bool func0(const std::vector<int>& test_tup) {
bool res = true;
std::unordered_set<int> temp;
for(auto ele : test_tup){
if(temp.find(ele) != temp.end()){
res = false;
break;
}
temp.insert(ele);
}
return res;
}
| int main(){
assert(func0(std::vector<int>{1, 4, 5, 6, 1, 4}) == false);
assert(func0(std::vector<int>{1, 4, 5, 6}) == true);
assert(func0(std::vector<int>{2, 3, 4, 5, 6}) == true);
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x68,%rsp
mov (%rdi),%rbp
mov 0x8(%rdi),%r15
mov %fs:0x28,%rax
mov %rax,0x58(%rsp)
xor %eax,%eax
lea 0x50(%rsp),%r10
movl $0x3f800000,0x40(%rsp)
mov %r10,0... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 78h
mov rbp, [rdi]
mov r13, [rdi+8]
mov rax, fs:28h
mov [rsp+0A8h+var_40], rax
xor eax, eax
lea rax, [rsp+0A8h+var_48]
mov [rsp+0A8h+var_58], 3F800000h
mov [rsp+0A8h+... | long long func0(int **a1)
{
int *v1; // rbp
int *v2; // r13
unsigned long long v3; // rdx
int v4; // ebx
_DWORD *v5; // r12
_DWORD *v6; // rax
unsigned int v7; // ebx
void *v8; // rdi
_QWORD *v9; // rdi
size_t v10; // rdx
unsigned long long v12; // r12
unsigned long long v13; // r14
long long... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x78
MOV RBP,qword ptr [RDI]
MOV R13,qword ptr [RDI + 0x8]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x68],RAX
XOR EAX,EAX
LEA RAX,[RSP + 0x60]
MOV dword ptr [RSP + 0x50],0x3f800000
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x... | /* func0(std::vector<int, std::allocator<int> > const&) */
int4 func0(vector *param_1)
{
int iVar1;
int iVar2;
int *piVar3;
long *plVar4;
long *plVar5;
long *plVar6;
long *plVar7;
long *plVar8;
char cVar9;
int8 *puVar10;
ulong uVar11;
ulong extraout_RDX;
size_t __n;
int4 uVar12;
int iVar... |
1,576 | func0 |
#include <iostream>
#include <cassert>
#include <unordered_map>
#include <vector>
| char func0(std::string str1) {
std::vector<char> char_order;
std::unordered_map<char, int> ctr;
for (char c : str1) {
if (ctr.find(c) != ctr.end()) {
ctr[c] += 1;
} else {
ctr[c] = 1;
char_order.push_back(c);
}
}
for (char c : ch... | int main() {
assert(func0("abcabc") == '\0');
assert(func0("abc") == 'a');
assert(func0("ababc") == 'c');
return 0;
}
| O0 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0xb8,%rsp
mov %rdi,-0xb8(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
lea -0x70(%rbp),%rax
mov %rax,%rdi
callq 2bb4 <_ZNSt6vectorIcSaIcEEC1Ev>... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 0B8h
mov [rbp+var_B8], rdi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_70]
mov rdi, rax
call _ZNSt6vectorIcSaIcEEC2Ev; std::vector<char>::vector... | long long func0(long long a1)
{
_DWORD *v1; // rax
unsigned int v2; // ebx
char v4; // [rsp+1Fh] [rbp-A1h] BYREF
long long v5; // [rsp+20h] [rbp-A0h] BYREF
long long v6; // [rsp+28h] [rbp-98h] BYREF
long long v7; // [rsp+30h] [rbp-90h] BYREF
_QWORD v8[2]; // [rsp+38h] [rbp-88h] BYREF
_BYTE *v9; // [rsp... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0xb8
MOV qword ptr [RBP + -0xb8],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x70]
MOV RDI,RAX
CALL 0x00102b36
LEA RAX,[RBP + -0x50]
MOV RDI,RAX
CALL 0x00102c92
MOV RAX,qword ptr [RBP + -0xb8]
MOV qword ptr [RBP + -0x80... | /* func0(std::string) */
ulong func0(int8 param_1)
{
char cVar1;
bool bVar2;
char *pcVar3;
int4 *puVar4;
int *puVar5;
int *piVar6;
ulong uVar7;
long in_FS_OFFSET;
char local_a9;
int8 local_a8;
ulong local_a0;
int8 local_98;
int8 local_90;
int8 local_88;
vector<char,std::allocator<char>> ... |
1,577 | func0 |
#include <iostream>
#include <cassert>
#include <unordered_map>
#include <vector>
| char func0(std::string str1) {
std::vector<char> char_order;
std::unordered_map<char, int> ctr;
for (char c : str1) {
if (ctr.find(c) != ctr.end()) {
ctr[c] += 1;
} else {
ctr[c] = 1;
char_order.push_back(c);
}
}
for (char c : ch... | int main() {
assert(func0("abcabc") == '\0');
assert(func0("abc") == 'a');
assert(func0("ababc") == 'c');
return 0;
}
| O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %r12
push %rbp
push %rbx
sub $0x70,%rsp
mov %fs:0x28,%rax
mov %rax,0x68(%rsp)
xor %eax,%eax
movq $0x0,0x10(%rsp)
movq $0x0,0x18(%rsp)
movq $0x0,0x20(%rsp)
lea 0x60(%rsp),%rax
mov %rax,0x30(... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 70h
mov rax, fs:28h
mov [rsp+98h+var_30], rax
xor eax, eax
mov [rsp+98h+var_88], 0
mov [rsp+98h+var_80], 0
mov [rsp+98h+var_78], 0
lea rax, [rsp+98h+... | long long func0(long long a1)
{
char *v1; // rbp
char *v2; // r13
_QWORD *v3; // rax
_DWORD *v4; // rax
char v5; // bl
long long *v6; // rax
_BYTE *v7; // rsi
void *v8; // r14
unsigned __int8 *v9; // r12
char *v10; // rbx
unsigned int v11; // ebp
char v13; // [rsp+Fh] [rbp-89h] BYREF
void *v1... | func0:
ENDBR64
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x70
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x68],RAX
XOR EAX,EAX
MOV qword ptr [RSP + 0x10],0x0
MOV qword ptr [RSP + 0x18],0x0
MOV qword ptr [RSP + 0x20],0x0
LEA RAX,[RSP + 0x60]
MOV qword ptr [RSP + 0x30],RAX
MOV qword ptr [RSP + 0x38],0x1
... | /* func0(std::string) */
char func0(int8 *param_1)
{
int8 *puVar1;
long *plVar2;
int4 *puVar3;
int *piVar4;
char *pcVar5;
char cVar6;
char *pcVar7;
char *pcVar8;
long in_FS_OFFSET;
char local_89;
char *local_88;
char *local_80;
char *local_78;
int8 *local_68;
ulong local_60;
int8 *loca... |
1,578 | func0 |
#include <iostream>
#include <cassert>
#include <unordered_map>
#include <vector>
| char func0(std::string str1) {
std::vector<char> char_order;
std::unordered_map<char, int> ctr;
for (char c : str1) {
if (ctr.find(c) != ctr.end()) {
ctr[c] += 1;
} else {
ctr[c] = 1;
char_order.push_back(c);
}
}
for (char c : ch... | int main() {
assert(func0("abcabc") == '\0');
assert(func0("abc") == 'a');
assert(func0("ababc") == 'c');
return 0;
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x70,%rsp
mov (%rdi),%rbx
mov 0x8(%rdi),%r13
mov %fs:0x28,%rax
mov %rax,0x68(%rsp)
xor %eax,%eax
lea 0x60(%rsp),%rsi
lea 0x30(%rsp),%rb... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 88h
mov rbp, [rdi]
mov r14, [rdi+8]
mov rax, fs:28h
mov [rsp+0B8h+var_40], rax
xor eax, eax
lea rax, [rsp+0B8h+var_48]
mov... | long long func0(long long a1)
{
char *v1; // rbp
long long v2; // r14
char *v3; // r14
char v4; // bl
long long v5; // r15
long long *v6; // rax
_DWORD *v7; // rax
long long **v8; // r8
long long *v9; // rax
char v10; // cl
long long v11; // rax
unsigned __int8 *v12; // r14
char *v13; // rbx
... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x88
MOV RBP,qword ptr [RDI]
MOV R14,qword ptr [RDI + 0x8]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x78],RAX
XOR EAX,EAX
LEA RAX,[RSP + 0x70]
MOV dword ptr [RSP + 0x60],0x3f800000
LEA R12,[RSP + 0x40]
ADD R14,RBP
MOV qw... | /* func0(std::string) */
char func0(int8 *param_1)
{
long *plVar1;
long *plVar2;
char *pcVar3;
char *pcVar4;
long *plVar5;
int8 *puVar6;
char *pcVar7;
int4 *puVar8;
int *piVar9;
char cVar10;
char *pcVar11;
char *pcVar12;
char *pcVar13;
char *pcVar14;
long in_FS_OFFSET;
char local_99;
... |
1,579 | func0 |
#include <iostream>
#include <cassert>
#include <unordered_map>
#include <vector>
| char func0(std::string str1) {
std::vector<char> char_order;
std::unordered_map<char, int> ctr;
for (char c : str1) {
if (ctr.find(c) != ctr.end()) {
ctr[c] += 1;
} else {
ctr[c] = 1;
char_order.push_back(c);
}
}
for (char c : ch... | int main() {
assert(func0("abcabc") == '\0');
assert(func0("abc") == 'a');
assert(func0("ababc") == 'c');
return 0;
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %r15
pxor %xmm0,%xmm0
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x78,%rsp
mov (%rdi),%rbx
mov 0x8(%rdi),%r13
mov %fs:0x28,%rax
mov %rax,0x68(%rsp)
xor %eax,%eax
lea 0x60(%... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 88h
mov rbp, [rdi]
mov r15, [rdi+8]
mov rax, fs:28h
mov [rsp+0B8h+var_40], rax
xor eax, eax
lea rax, [rsp+0B8h+var_48]
mov... | long long func0(long long a1)
{
char *v1; // rbp
long long v2; // r15
char *v3; // r15
char v4; // bl
_BYTE *v5; // r14
_BYTE *v6; // rax
_DWORD *v7; // rax
long long **v8; // r8
long long *v9; // rax
char v10; // cl
char *v11; // rax
void *v12; // r15
unsigned __int8 *v13; // rbp
char *v14... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x88
MOV RBP,qword ptr [RDI]
MOV R15,qword ptr [RDI + 0x8]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x78],RAX
XOR EAX,EAX
LEA RAX,[RSP + 0x70]
MOV dword ptr [RSP + 0x60],0x3f800000
ADD R15,RBP
MOV qword ptr [RSP],RAX
MOV... | /* func0(std::string) */
char func0(int8 *param_1)
{
long *plVar1;
long *plVar2;
int8 *puVar3;
char *pcVar4;
long *plVar5;
int8 *puVar6;
int4 *puVar7;
int *piVar8;
char *pcVar9;
char cVar10;
char *pcVar11;
char *pcVar12;
char *pcVar13;
long in_FS_OFFSET;
ulong local_b0;
char local_99;
... |
1,580 | func0 |
#include <iostream>
#include <regex>
#include <cassert>
| std::string func0(std::string string) {
std::regex regex(R"(^[a-z]$|^([a-z]).*\1$)");
if (std::regex_search(string, regex))
return "Valid";
else
return "Invalid";
}
| int main() {
assert(func0("abba") == "Valid");
assert(func0("a") == "Valid");
assert(func0("abcd") == "Invalid");
return 0;
}
| O0 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x58,%rsp
mov %rdi,-0x58(%rbp)
mov %rsi,-0x60(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
lea -0x40(%rbp),%rax
mov $0x10,%edx
lea 0x2b3e... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 68h
mov [rbp+var_68], rdi
mov [rbp+var_70], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_40]
mov edx, 10h
lea rcx, aAZAZ1; "^[a-z]$|^([a... | long long func0(long long a1, long long a2)
{
char v3; // [rsp+1Fh] [rbp-51h] BYREF
char *v4; // [rsp+20h] [rbp-50h]
char *v5; // [rsp+28h] [rbp-48h]
_BYTE v6[40]; // [rsp+30h] [rbp-40h] BYREF
unsigned long long v7; // [rsp+58h] [rbp-18h]
v7 = __readfsqword(0x28u);
std::basic_regex<char,std::regex_trait... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x68
MOV qword ptr [RBP + -0x68],RDI
MOV qword ptr [RBP + -0x70],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,[0x132051]
MOV RSI,RCX
MOV RDI,RAX
LAB_00104b43:
CALL 0x001061ba
LEA RCX,[RBP + -0x... | /* func0(std::string) */
string * func0(string *param_1,string *param_2)
{
bool bVar1;
long in_FS_OFFSET;
allocator local_59;
allocator *local_58;
allocator *local_50;
regex local_48 [40];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
std::regex::basic_regex(local_48,"^[a-z]$|^([a-z])... |
1,581 | func0 |
#include <iostream>
#include <regex>
#include <cassert>
| std::string func0(std::string string) {
std::regex regex(R"(^[a-z]$|^([a-z]).*\1$)");
if (std::regex_search(string, regex))
return "Valid";
else
return "Invalid";
}
| int main() {
assert(func0("abba") == "Valid");
assert(func0("a") == "Valid");
assert(func0("abcd") == "Invalid");
return 0;
}
| O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %r13
push %r12
push %rbp
push %rbx
sub $0x58,%rsp
mov %rdi,%rbx
mov %rsi,%rbp
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
lea 0x20(%rsp),%r13
mov %r13,%rdi
callq 4730 <_ZNSt6loca... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r14
push r12
push rbx
sub rsp, 58h
mov rbx, rdi
mov r14, rsi
mov rax, fs:28h
mov [rbp+var_28], rax
xor eax, eax
lea r12, [rbp+var_70]
lea rdi, [rbp+var_68]; this
call __ZNS... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV RBX,RDI
MOV R14,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
XOR EAX,EAX
LEA R12,[RBP + -0x70]
LEA RDI,[RBP + -0x68]
CALL 0x001046f0
MOV qword ptr [RBP + -0x60],0x0
MOV qword ptr [RBP + -0x58],0x0
MOV ECX,0x10
LEA RDX,[0x... | /* func0(std::string) */
long * func0(long *param_1,int8 *param_2)
{
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
_Sp_counted_base<(_Lock_policy)2> *p_Var2;
bool bVar3;
int iVar4;
long in_FS_OFFSET;
regex local_78 [8];
int local_70 [8];
int8 local_68;
_Sp_counted_base<(_Lock_policy)2> *local_60;
voi... |
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.