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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
82 | func0 |
#include <vector>
#include <assert.h>
| std::vector<int> func0(int m, int n) {
std::vector<int> multiples;
for (int i = 1; i <= m; i++) {
multiples.push_back(i * n);
}
return multiples;
}
| int main() {
std::vector<int> result;
result = func0(4, 3);
assert((result == std::vector<int>{3, 6, 9, 12}));
result = func0(2, 5);
assert((result == std::vector<int>{5, 10}));
result = func0(9, 2);
assert((result == std::vector<int>{2, 4, 6, 8, 10, 12, 14, 16, 18}));
... | O2 | cpp | func0(int, int):
endbr64
push %r15
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x18,%rsp
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi)
movq $0x0,0x10(%rdi)
test %esi,%esi
jle 1670 <_Z5func0ii+0xa0>
mov %esi,%r13d... | _Z5func0ii:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
push r12
push rbp
mov rbp, rdi
push rbx
sub rsp, 18h
mov rax, fs:28h
mov [rsp+48h+var_40], rax
xor eax, eax
mov qword ptr [rdi+10h], 0
movups xmmword ptr [rdi], xmm0
test esi, esi
jle short loc_1620
mov ... | long long func0(long long a1, int a2, int a3)
{
_DWORD *v3; // rax
int v6; // ebx
_DWORD *v7; // rsi
int v8; // r12d
int v10; // [rsp+0h] [rbp-44h] BYREF
unsigned long long v11; // [rsp+4h] [rbp-40h]
v11 = __readfsqword(0x28u);
v3 = 0LL;
*(_QWORD *)(a1 + 16) = 0LL;
*(_OWORD *)a1 = 0LL;
if ( a2 >... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
SUB RSP,0x18
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
MOV qword ptr [RDI + 0x10],0x0
MOVUPS xmmword ptr [RDI],XMM0
TEST ESI,ESI
JLE 0x00101620
MOV R13D,ESI
MOV R14D,EDX
MOV EBX,EDX
XOR ESI,ESI
MO... | /* func0(int, int) */
vector<int,std::allocator<int>> * func0(int param_1,int param_2)
{
int *piVar1;
int in_EDX;
int iVar2;
int *piVar3;
int4 in_register_0000003c;
vector<int,std::allocator<int>> *this;
int iVar4;
long in_FS_OFFSET;
int local_44;
long local_40;
this = (vector<int,std::alloca... |
83 | func0 |
#include <vector>
#include <assert.h>
| std::vector<int> func0(int m, int n) {
std::vector<int> multiples;
for (int i = 1; i <= m; i++) {
multiples.push_back(i * n);
}
return multiples;
}
| int main() {
std::vector<int> result;
result = func0(4, 3);
assert((result == std::vector<int>{3, 6, 9, 12}));
result = func0(2, 5);
assert((result == std::vector<int>{5, 10}));
result = func0(9, 2);
assert((result == std::vector<int>{2, 4, 6, 8, 10, 12, 14, 16, 18}));
... | O3 | cpp | func0(int, int):
endbr64
push %r15
pxor %xmm0,%xmm0
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x18,%rsp
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
movq $0x0,0x10(%rdi)
movups %xmm0,(%rdi)
test %esi,%esi
jle 1600 <_Z5func0ii+0x90>
mov %esi,%r13d
m... | _Z5func0ii:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
push r12
mov r12, rdi
push rbp
push rbx
sub rsp, 28h
mov qword ptr [rdi+10h], 0
movups xmmword ptr [rdi], xmm0
test esi, esi
jle loc_15F3
mov r13d, esi
mov r14d, edx
mov ebp, edx
xor r8d, r8d
xor ... | long long func0(long long a1, int a2, int a3)
{
int v6; // ebp
char *v7; // r8
char *v8; // rcx
int v9; // ebx
signed long long v10; // r15
unsigned long long v11; // rax
unsigned long long v12; // rdx
char *v13; // r9
char *v15; // rax
unsigned long long v16; // rsi
bool v17; // cf
unsigned lo... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
PUSH R13
PUSH R12
MOV R12,RDI
PUSH RBP
PUSH RBX
SUB RSP,0x28
MOV qword ptr [RDI + 0x10],0x0
MOVUPS xmmword ptr [RDI],XMM0
TEST ESI,ESI
JLE 0x001015f3
MOV R13D,ESI
MOV R14D,EDX
MOV EBP,EDX
XOR R8D,R8D
XOR ECX,ECX
MOV EBX,0x1
JMP 0x0010156a
LAB_00101550:
MOV dword ptr [RCX]... | /* func0(int, int) */
int (*) [16] func0(int param_1,int param_2)
{
int *__src;
ulong uVar1;
void *__dest;
int (*pauVar2) [16];
int *piVar3;
int in_EDX;
int iVar4;
int iVar5;
int iVar6;
ulong uVar7;
int4 in_register_0000003c;
int *piVar8;
size_t __n;
ulong local_50;
pauVar2 = (int (*)... |
84 | func0 |
#include <vector>
#include <unordered_set>
#include <assert.h>
| int func0(std::vector<int>& nums) {
std::unordered_set<int> num_set;
int no_duplicate = -1;
for (int num : nums) {
if (num_set.find(num) != num_set.end()) {
return num;
} else {
num_set.insert(num);
}
}
return no_duplicate;
}
| int main() {
std::vector<int> v1 = {1, 2, 3, 4, 4, 5};
std::vector<int> v2 = {1, 2, 3, 4};
std::vector<int> v3 = {1, 1, 2, 3, 3, 2, 2};
assert(func0(v1) == 4);
assert(func0(v2) == -1);
assert(func0(v3) == 1);
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> >&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x88,%rsp
mov %rdi,-0x88(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
lea -0x50(%rbp),%rax
mov %rax,%rdi
callq 191c <_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEEC1Ev>
movl ... | _Z5func0RSt6vectorIiSaIiEE:
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
lea rax, [rbp+var_50]
mov rdi, rax
call _ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEEC2Ev; std::unordered_set<int>::uno... | long long func0(long long a1)
{
unsigned int v1; // ebx
unsigned int v3; // [rsp+10h] [rbp-80h] BYREF
int v4; // [rsp+14h] [rbp-7Ch]
long long v5; // [rsp+18h] [rbp-78h] BYREF
long long v6; // [rsp+20h] [rbp-70h] BYREF
long long v7; // [rsp+28h] [rbp-68h] BYREF
_QWORD v8[2]; // [rsp+30h] [rbp-60h] BYREF
... | 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
LEA RAX,[RBP + -0x50]
MOV RDI,RAX
CALL 0x001019ba
MOV dword ptr [RBP + -0x7c],0xffffffff
MOV RAX,qword ptr [RBP + -0x88]
MOV qword ptr [RBP + -0x58],RAX
MOV R... | /* func0(std::vector<int, std::allocator<int> >&) */
int func0(vector *param_1)
{
char cVar1;
bool bVar2;
int *piVar3;
int iVar4;
long in_FS_OFFSET;
int local_88;
int local_84;
int8 local_80;
int8 local_78;
int8 local_70;
int8 local_68;
vector<int,std::allocator<int>> *local_60;
unordered_se... |
85 | func0 |
#include <vector>
#include <unordered_set>
#include <assert.h>
| int func0(std::vector<int>& nums) {
std::unordered_set<int> num_set;
int no_duplicate = -1;
for (int num : nums) {
if (num_set.find(num) != num_set.end()) {
return num;
} else {
num_set.insert(num);
}
}
return no_duplicate;
}
| int main() {
std::vector<int> v1 = {1, 2, 3, 4, 4, 5};
std::vector<int> v2 = {1, 2, 3, 4};
std::vector<int> v3 = {1, 1, 2, 3, 3, 2, 2};
assert(func0(v1) == 4);
assert(func0(v2) == -1);
assert(func0(v3) == 1);
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> >&):
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,0x28(%rsp... | _Z5func0RSt6vectorIiSaIiEE:
endbr64
push r13
push r12
push rbp
push rbx
sub rsp, 58h
mov rax, fs:28h
mov [rsp+78h+var_30], rax
xor eax, eax
lea rax, [rsp+78h+var_38]
mov [rsp+78h+var_68], rax
mov [rsp+78h+var_60], 1
mov [rsp+78h+var_58], 0
mov [rsp+78h+var_50], 0
mov ... | long long func0(signed int **a1, long long a2, long long a3, long long a4, unsigned long long a5, unsigned long long a6)
{
signed int *v6; // rbp
signed int *v7; // r13
_DWORD **v8; // rsi
_DWORD *i; // rax
signed int v10; // ecx
long long *v11; // rax
unsigned int v12; // ebx
signed int v14; // [rsp+4... | func0:
ENDBR64
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x58
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
MO... | /* func0(std::vector<int, std::allocator<int> >&) */
int func0(vector *param_1)
{
int *piVar1;
long *plVar2;
int8 *puVar3;
long *plVar4;
int iVar5;
int *piVar6;
long *plVar7;
long in_FS_OFFSET;
int local_74;
int8 **local_70;
int8 *local_68;
ulong local_60;
int8 *local_58;
long local_50;
... |
86 | func0 |
#include <vector>
#include <unordered_set>
#include <assert.h>
| int func0(std::vector<int>& nums) {
std::unordered_set<int> num_set;
int no_duplicate = -1;
for (int num : nums) {
if (num_set.find(num) != num_set.end()) {
return num;
} else {
num_set.insert(num);
}
}
return no_duplicate;
}
| int main() {
std::vector<int> v1 = {1, 2, 3, 4, 4, 5};
std::vector<int> v2 = {1, 2, 3, 4};
std::vector<int> v3 = {1, 1, 2, 3, 3, 2, 2};
assert(func0(v1) == 4);
assert(func0(v2) == -1);
assert(func0(v3) == 1);
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> >&):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x68,%rsp
mov (%rdi),%rbx
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,0x20(%r... | _Z5func0RSt6vectorIiSaIiEE:
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_8... | long long func0(unsigned int **a1)
{
unsigned int *v1; // rbx
unsigned int *v2; // r13
signed int v3; // ebp
_QWORD *v4; // rdx
_QWORD *v5; // rax
unsigned int v6; // r12d
unsigned long long v8; // r14
unsigned long long v9; // rdx
_QWORD *v10; // r10
unsigned long long v11; // r15
_QWORD *v12; /... | 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> >&) */
int func0(vector *param_1)
{
int iVar1;
int *piVar2;
long *plVar3;
long *plVar4;
char cVar5;
long *plVar6;
long *plVar7;
void *__s;
int8 *puVar8;
long *plVar9;
ulong uVar10;
ulong extraout_RDX;
int *piVar11;
int iVar12;
ulong uVar13;
... |
87 | func0 |
#include <vector>
#include <unordered_set>
#include <assert.h>
| int func0(std::vector<int>& nums) {
std::unordered_set<int> num_set;
int no_duplicate = -1;
for (int num : nums) {
if (num_set.find(num) != num_set.end()) {
return num;
} else {
num_set.insert(num);
}
}
return no_duplicate;
}
| int main() {
std::vector<int> v1 = {1, 2, 3, 4, 4, 5};
std::vector<int> v2 = {1, 2, 3, 4};
std::vector<int> v3 = {1, 1, 2, 3, 3, 2, 2};
assert(func0(v1) == 4);
assert(func0(v2) == -1);
assert(func0(v3) == 1);
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> >&):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x68,%rsp
mov (%rdi),%rbx
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,0x8(%rs... | _Z5func0RSt6vectorIiSaIiEE:
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+v... | 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; // r14d
void *v8; // rdi
_QWORD *v9; // rdi
size_t v10; // rdx
unsigned long long v12; // r12
unsigned long long v13; // r14
long lon... | 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> >&) */
int func0(vector *param_1)
{
int iVar1;
int *piVar2;
long *plVar3;
long *plVar4;
long *plVar5;
long *plVar6;
long *plVar7;
char cVar8;
int8 *puVar9;
ulong uVar10;
ulong extraout_RDX;
size_t __n;
int iVar11;
int *piVar12;
int8 *puVar13;... |
88 | func0 | #include <vector>
#include <cassert>
#include <algorithm>
| int func0(const std::vector<std::vector<int>>& list1) {
int maxi = -100000;
for (const auto& x : list1) {
int sum = 0;
for (int y : x) {
sum += y;
}
maxi = std::max(sum, maxi);
}
return maxi;
}
| int main() {
assert(func0({{1,2,3},{4,5,6},{10,11,12},{7,8,9}}) == 33);
assert(func0({{0,1,1},{1,1,2},{3,2,1}}) == 6);
assert(func0({{0,1,3},{1,2,1},{9,8,2},{0,1,0},{6,4,8}}) == 19);
assert(func0({{0,-1,-1},{-1,-1,-2},{-3,-2,-1}}) == -2);
return 0;
}
| 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
sub $0x60,%rsp
mov %rdi,-0x58(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x8(%rbp)
xor %eax,%eax
movl $0xfffe7960,-0x4c(%rbp)
mov -0x58(%rbp),%rax
... | _Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EE:
endbr64
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_58], rdi
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
mov [rbp+var_4C], 0FFFE7960h
mov rax, [rbp+var_58]
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
mov rdi, rax
call _Z... | long long func0(long long a1)
{
unsigned int v2; // [rsp+14h] [rbp-4Ch] BYREF
int v3; // [rsp+18h] [rbp-48h] BYREF
int v4; // [rsp+1Ch] [rbp-44h]
long long v5; // [rsp+20h] [rbp-40h] BYREF
long long v6; // [rsp+28h] [rbp-38h] BYREF
long long v7; // [rsp+30h] [rbp-30h] BYREF
_QWORD v8[2]; // [rsp+38h] [rb... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x58],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
MOV dword ptr [RBP + -0x4c],0xfffe7960
MOV RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RDI,RAX
CALL 0x0010219c
MOV q... | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > > const&) */
int func0(vector *param_1)
{
bool bVar1;
int *piVar2;
long in_FS_OFFSET;
int local_54;
int local_50;
int local_4c;
int8 local_48;
int8 local_40;
int8 local_38;
int8 ... |
89 | func0 | #include <vector>
#include <cassert>
#include <algorithm>
| int func0(const std::vector<std::vector<int>>& list1) {
int maxi = -100000;
for (const auto& x : list1) {
int sum = 0;
for (int y : x) {
sum += y;
}
maxi = std::max(sum, maxi);
}
return maxi;
}
| int main() {
assert(func0({{1,2,3},{4,5,6},{10,11,12},{7,8,9}}) == 33);
assert(func0({{0,1,1},{1,1,2},{3,2,1}}) == 6);
assert(func0({{0,1,3},{1,2,1},{9,8,2},{0,1,0},{6,4,8}}) == 19);
assert(func0({{0,-1,-1},{-1,-1,-2},{-3,-2,-1}}) == -2);
return 0;
}
| O1 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&):
endbr64
mov (%rdi),%rsi
mov 0x8(%rdi),%r8
cmp %rsi,%r8
je 12f3 <_Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EE+0x4a>
mov $0xfffe7960,%edi
mov $0x0,%r9d
jmp 12d7 <_Z5func0RKSt6vector... | _Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EE:
endbr64
mov rsi, [rdi]
mov r8, [rdi+8]
cmp r8, rsi
jz short loc_12F4
mov edi, 0FFFE7960h
mov r9d, 0
loc_12C4:
mov rax, [rsi]
mov rcx, [rsi+8]
cmp rcx, rax
jz short loc_12EF
mov edx, r9d
loc_12D3:
add edx, [rax]
add rax, 4
cmp ... | long long func0(long long *a1)
{
long long v1; // rsi
long long v2; // r8
int v3; // edi
_DWORD *v4; // rax
_DWORD *v5; // rcx
int v6; // edx
v1 = *a1;
v2 = a1[1];
if ( v2 == *a1 )
{
return (unsigned int)-100000;
}
else
{
v3 = -100000;
do
{
v4 = *(_DWORD **)v1;
v5... | func0:
ENDBR64
MOV RSI,qword ptr [RDI]
MOV R8,qword ptr [RDI + 0x8]
CMP R8,RSI
JZ 0x001012f4
MOV EDI,0xfffe7960
MOV R9D,0x0
LAB_001012c4:
MOV RAX,qword ptr [RSI]
MOV RCX,qword ptr [RSI + 0x8]
CMP RCX,RAX
JZ 0x001012ef
MOV EDX,R9D
LAB_001012d3:
ADD EDX,dword ptr [RAX]
ADD RAX,0x4
CMP RCX,RAX
JNZ 0x001012d3
LAB_001012de:... | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > > const&) */
int func0(vector *param_1)
{
int *piVar1;
int iVar2;
int8 *puVar3;
int iVar4;
puVar3 = *(int8 **)param_1;
if (*(int8 **)(param_1 + 8) == puVar3) {
iVar4 = -100000;
... |
90 | func0 | #include <vector>
#include <cassert>
#include <algorithm>
| int func0(const std::vector<std::vector<int>>& list1) {
int maxi = -100000;
for (const auto& x : list1) {
int sum = 0;
for (int y : x) {
sum += y;
}
maxi = std::max(sum, maxi);
}
return maxi;
}
| int main() {
assert(func0({{1,2,3},{4,5,6},{10,11,12},{7,8,9}}) == 33);
assert(func0({{0,1,1},{1,1,2},{3,2,1}}) == 6);
assert(func0({{0,1,3},{1,2,1},{9,8,2},{0,1,0},{6,4,8}}) == 19);
assert(func0({{0,-1,-1},{-1,-1,-2},{-3,-2,-1}}) == -2);
return 0;
}
| O2 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&):
endbr64
mov (%rdi),%rsi
mov 0x8(%rdi),%rdi
mov $0xfffe7960,%r8d
cmp %rdi,%rsi
je 195b <_Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EE+0x4b>
nopw %cs:0x0(%rax,%rax,1)
mov (%rsi),%rax
... | _Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EE:
endbr64
mov rsi, [rdi]
mov r8, [rdi+8]
mov edi, 0FFFE7960h
cmp r8, rsi
jz short loc_1AB9
nop dword ptr [rax]
loc_1A88:
mov rax, [rsi]
mov rcx, [rsi+8]
xor edx, edx
cmp rcx, rax
jz short loc_1AAB
nop word ptr [rax+rax+00000000h]
lo... | long long func0(long long *a1)
{
long long v1; // rsi
long long v2; // r8
int i; // edi
_DWORD *v4; // rax
_DWORD *v5; // rcx
int v6; // edx
v1 = *a1;
v2 = a1[1];
for ( i = -100000; v2 != v1; v1 += 24LL )
{
v4 = *(_DWORD **)v1;
v5 = *(_DWORD **)(v1 + 8);
v6 = 0;
if ( v5 != *(_DWORD... | func0:
ENDBR64
MOV RSI,qword ptr [RDI]
MOV R8,qword ptr [RDI + 0x8]
MOV EDI,0xfffe7960
CMP R8,RSI
JZ 0x00101ab9
NOP dword ptr [RAX]
LAB_00101a88:
MOV RAX,qword ptr [RSI]
MOV RCX,qword ptr [RSI + 0x8]
XOR EDX,EDX
CMP RCX,RAX
JZ 0x00101aab
NOP word ptr CS:[RAX + RAX*0x1]
LAB_00101aa0:
ADD EDX,dword ptr [RAX]
ADD RAX,0x4
... | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > > const&) */
int func0(vector *param_1)
{
int *piVar1;
int iVar2;
int8 *puVar3;
int iVar4;
iVar4 = -100000;
for (puVar3 = *(int8 **)param_1; *(int8 **)(param_1 + 8) != puVar3;
p... |
91 | func0 | #include <vector>
#include <cassert>
#include <algorithm>
| int func0(const std::vector<std::vector<int>>& list1) {
int maxi = -100000;
for (const auto& x : list1) {
int sum = 0;
for (int y : x) {
sum += y;
}
maxi = std::max(sum, maxi);
}
return maxi;
}
| int main() {
assert(func0({{1,2,3},{4,5,6},{10,11,12},{7,8,9}}) == 33);
assert(func0({{0,1,1},{1,1,2},{3,2,1}}) == 6);
assert(func0({{0,1,3},{1,2,1},{9,8,2},{0,1,0},{6,4,8}}) == 19);
assert(func0({{0,-1,-1},{-1,-1,-2},{-3,-2,-1}}) == -2);
return 0;
}
| O3 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&):
endbr64
mov (%rdi),%rsi
mov 0x8(%rdi),%r10
mov $0xfffe7960,%r9d
cmp %r10,%rsi
je 1a51 <_Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EE+0xe1>
movabs $0x3ffffffffffffffc,%r11
nopl 0x0(%rax... | _Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EE:
endbr64
mov rax, rdi
mov rdi, [rdi]
mov r9d, 0FFFE7960h
mov r10, [rax+8]
cmp r10, rdi
jz loc_1C23
nop dword ptr [rax]
loc_1B70:
mov rdx, [rdi]
mov r8, [rdi+8]
cmp r8, rdx
jz loc_1C30
lea rcx, [r8-4]
mov rax, rdx
sub rcx, r... | long long func0(long long *a1)
{
long long v2; // rdi
int v3; // r9d
long long v4; // r10
const __m128i *v5; // rdx
unsigned long long *v6; // r8
const __m128i *v7; // rax
unsigned long long v8; // rsi
__m128i v9; // xmm0
__m128i v10; // xmm2
__m128i v11; // xmm0
int v12; // eax
v2 = *a1;
v3... | func0:
ENDBR64
MOV RAX,RDI
MOV RDI,qword ptr [RDI]
MOV R9D,0xfffe7960
MOV R10,qword ptr [RAX + 0x8]
CMP R10,RDI
JZ 0x00101c23
NOP dword ptr [RAX]
LAB_00101b70:
MOV RDX,qword ptr [RDI]
MOV R8,qword ptr [RDI + 0x8]
CMP R8,RDX
JZ 0x00101c30
LEA RCX,[R8 + -0x4]
MOV RAX,RDX
SUB RCX,RDX
MOV RSI,RCX
SHR RSI,0x2
ADD RSI,0x1
CM... | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > > const&) */
int func0(vector *param_1)
{
int *piVar1;
int iVar2;
int *piVar3;
int *piVar4;
int *piVar5;
int *piVar6;
ulong uVar7;
int *piVar8;
ulong uVar9;
int8 *puVar10;
int ... |
92 | func0 |
#include <cmath>
#include <cassert>
| int func0(int binary) {
int binary1 = binary;
int decimal = 0, i = 0, n = 0;
while (binary != 0) {
int dec = binary % 10;
decimal = decimal + dec * std::pow(2, i);
binary = binary / 10;
i++;
}
return decimal;
}
| int main() {
assert(func0(100) == 4);
assert(func0(1011) == 11);
assert(func0(1101101) == 109);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x40,%rsp
mov %edi,-0x24(%rbp)
mov -0x24(%rbp),%eax
mov %eax,-0xc(%rbp)
movl $0x0,-0x14(%rbp)
movl $0x0,-0x10(%rbp)
movl $0x0,-0x8(%rbp)
cmpl $0x0,-0x24(%rbp)
je 1225 <_Z5func0i+0xbc>
mov -0x24(%rbp),%edx
movslq %edx,%rax
imul $0x6666666... | _Z5func0i:
endbr64
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_24], edi
mov eax, [rbp+var_24]
mov [rbp+var_C], eax
mov [rbp+var_14], 0
mov [rbp+var_10], 0
mov [rbp+var_8], 0
jmp loc_1221
loc_1198:
mov edx, [rbp+var_24]
movsxd rax, edx
imul rax, 66666667h
shr rax, 2... | long long func0(int a1)
{
int v3; // [rsp+2Ch] [rbp-14h]
unsigned int v4; // [rsp+30h] [rbp-10h]
v3 = 0;
v4 = 0;
while ( a1 )
{
v3 = (int)(std::pow<int,int>(2LL, v4) * (double)(a1 % 10) + (double)v3);
a1 /= 10;
++v4;
}
return (unsigned int)v3;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV dword ptr [RBP + -0x24],EDI
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0xc],EAX
MOV dword ptr [RBP + -0x14],0x0
MOV dword ptr [RBP + -0x10],0x0
MOV dword ptr [RBP + -0x8],0x0
JMP 0x00101221
LAB_00101198:
MOV EDX,dword ptr [RBP + -0x24]
MOVSXD RAX,EDX
IMUL ... | /* func0(int) */
int func0(int param_1)
{
double extraout_XMM0_Qa;
int4 local_2c;
int4 local_1c;
int4 local_18;
local_1c = 0;
local_18 = 0;
for (local_2c = param_1; local_2c != 0; local_2c = local_2c / 10) {
std::pow<int,int>(2,local_18);
local_1c = (int)(extraout_XMM0_Qa * (double)(local_2c ... |
93 | func0 |
#include <cmath>
#include <cassert>
| int func0(int binary) {
int binary1 = binary;
int decimal = 0, i = 0, n = 0;
while (binary != 0) {
int dec = binary % 10;
decimal = decimal + dec * std::pow(2, i);
binary = binary / 10;
i++;
}
return decimal;
}
| int main() {
assert(func0(100) == 4);
assert(func0(1011) == 11);
assert(func0(1101101) == 109);
return 0;
}
| O1 | cpp | func0(int):
endbr64
push %r12
push %rbp
push %rbx
mov %edi,%ebx
test %edi,%edi
je 11e9 <_Z5func0i+0x80>
mov $0x0,%r12d
mov $0x0,%ebp
pxor %xmm1,%xmm1
cvtsi2sd %r12d,%xmm1
mov 0xefe(%rip),%rax
movq %rax,%xmm0
callq 1060 <pow@plt>
movapd %xmm0,%xmm1
movslq %ebx,%rax
imul $0x66666667,%rax,%r... | _Z5func0i:
endbr64
push r12
push rbp
push rbx
mov ebx, edi
test edi, edi
jz short loc_11E6
mov ebp, 0
mov r12d, 0
loc_1182:
pxor xmm1, xmm1
cvtsi2sd xmm1, ebp; y
movsd xmm0, cs:x; x
call _pow
movapd xmm1, xmm0
movsxd rax, ebx
imul rax, 66666667h
sar rax, 22h
mov edx, eb... | long long func0(int a1)
{
int v1; // ebx
int v2; // ebp
int v3; // r12d
v1 = a1;
if ( a1 )
{
v2 = 0;
v3 = 0;
do
{
v3 = (int)((double)(v1 % 10) * pow(2.0, (double)v2) + (double)v3);
v1 /= 10;
++v2;
}
while ( v1 );
}
else
{
return 0;
}
return (unsigned... | func0:
ENDBR64
PUSH R12
PUSH RBP
PUSH RBX
MOV EBX,EDI
TEST EDI,EDI
JZ 0x001011e6
MOV EBP,0x0
MOV R12D,0x0
LAB_00101182:
PXOR XMM1,XMM1
CVTSI2SD XMM1,EBP
MOVSD XMM0,qword ptr [0x00102068]
CALL 0x00101060
MOVAPD XMM1,XMM0
MOVSXD RAX,EBX
IMUL RAX,RAX,0x66666667
SAR RAX,0x22
MOV EDX,EBX
SAR EDX,0x1f
SUB EAX,EDX
LEA EDX,[RA... | /* func0(int) */
int func0(int param_1)
{
int iVar1;
int iVar2;
int iVar3;
double dVar4;
if (param_1 == 0) {
iVar3 = 0;
}
else {
iVar2 = 0;
iVar3 = 0;
do {
dVar4 = pow(DAT_00102068,(double)iVar2);
iVar1 = param_1 / 10;
iVar3 = (int)((double)(param_1 % 10) * dVar4 + (... |
94 | func0 |
#include <cmath>
#include <cassert>
| int func0(int binary) {
int binary1 = binary;
int decimal = 0, i = 0, n = 0;
while (binary != 0) {
int dec = binary % 10;
decimal = decimal + dec * std::pow(2, i);
binary = binary / 10;
i++;
}
return decimal;
}
| int main() {
assert(func0(100) == 4);
assert(func0(1011) == 11);
assert(func0(1101101) == 109);
return 0;
}
| O2 | cpp | func0(int):
endbr64
push %r12
push %rbp
push %rbx
test %edi,%edi
je 1290 <_Z5func0i+0x80>
mov %edi,%ebx
xor %ebp,%ebp
xor %r12d,%r12d
nopl 0x0(%rax,%rax,1)
pxor %xmm1,%xmm1
mov 0xe5d(%rip),%rax
cvtsi2sd %ebp,%xmm1
add $0x1,%ebp
movq %rax,%xmm0
callq 1060 <pow@plt>
movslq %ebx,%rax
mov ... | _Z5func0i:
endbr64
push r12
push rbp
push rbx
test edi, edi
jz short loc_1290
mov ebx, edi
xor ebp, ebp
xor r12d, r12d
nop dword ptr [rax+rax+00h]
loc_1228:
pxor xmm1, xmm1
movsd xmm0, cs:x; x
cvtsi2sd xmm1, ebp; y
add ebp, 1
call _pow
movsxd rax, ebx
mov edx, ebx
imul ... | long long func0(int a1)
{
int v1; // ebx
int v2; // ebp
int v3; // r12d
double v4; // xmm1_8
double v5; // xmm1_8
double v6; // xmm0_8
if ( !a1 )
return 0LL;
v1 = a1;
v2 = 0;
v3 = 0;
do
{
v4 = (double)v2++;
v5 = pow(2.0, v4);
v6 = (double)(v1 % 10);
v1 /= 10;
v3 = (int)... | func0:
ENDBR64
PUSH R12
PUSH RBP
PUSH RBX
TEST EDI,EDI
JZ 0x00101290
MOV EBX,EDI
XOR EBP,EBP
XOR R12D,R12D
NOP dword ptr [RAX + RAX*0x1]
LAB_00101228:
PXOR XMM1,XMM1
MOVSD XMM0,qword ptr [0x00102068]
CVTSI2SD XMM1,EBP
ADD EBP,0x1
CALL 0x00101060
MOVSXD RAX,EBX
MOV EDX,EBX
IMUL RAX,RAX,0x66666667
SAR EDX,0x1f
MOVAPD XMM... | /* func0(int) */
int func0(int param_1)
{
int iVar1;
int iVar2;
int iVar3;
double dVar4;
if (param_1 != 0) {
iVar2 = 0;
iVar3 = 0;
do {
dVar4 = (double)iVar2;
iVar2 = iVar2 + 1;
dVar4 = pow(DAT_00102068,dVar4);
iVar1 = param_1 / 10;
iVar3 = (int)((double)(param_1... |
95 | func0 |
#include <cmath>
#include <cassert>
| int func0(int binary) {
int binary1 = binary;
int decimal = 0, i = 0, n = 0;
while (binary != 0) {
int dec = binary % 10;
decimal = decimal + dec * std::pow(2, i);
binary = binary / 10;
i++;
}
return decimal;
}
| int main() {
assert(func0(100) == 4);
assert(func0(1011) == 11);
assert(func0(1101101) == 109);
return 0;
}
| O3 | cpp | func0(int):
endbr64
push %r12
push %rbp
push %rbx
test %edi,%edi
je 1290 <_Z5func0i+0x80>
mov %edi,%ebx
xor %ebp,%ebp
xor %r12d,%r12d
nopl 0x0(%rax,%rax,1)
pxor %xmm1,%xmm1
mov 0xe5d(%rip),%rax
cvtsi2sd %ebp,%xmm1
add $0x1,%ebp
movq %rax,%xmm0
callq 1060 <pow@plt>
movslq %ebx,%rax
mov ... | _Z5func0i:
endbr64
push r12
push rbp
push rbx
test edi, edi
jz short loc_1290
mov ebx, edi
xor ebp, ebp
xor r12d, r12d
nop dword ptr [rax+rax+00h]
loc_1228:
pxor xmm1, xmm1
movsd xmm0, cs:x; x
cvtsi2sd xmm1, ebp; y
add ebp, 1
call _pow
movsxd rax, ebx
mov edx, ebx
imul ... | long long func0(int a1)
{
int v1; // ebx
int v2; // ebp
int v3; // r12d
double v4; // xmm1_8
double v5; // xmm1_8
double v6; // xmm0_8
if ( !a1 )
return 0LL;
v1 = a1;
v2 = 0;
v3 = 0;
do
{
v4 = (double)v2++;
v5 = pow(2.0, v4);
v6 = (double)(v1 % 10);
v1 /= 10;
v3 = (int)... | func0:
ENDBR64
PUSH R12
PUSH RBP
PUSH RBX
TEST EDI,EDI
JZ 0x00101290
MOV EBX,EDI
XOR EBP,EBP
XOR R12D,R12D
NOP dword ptr [RAX + RAX*0x1]
LAB_00101228:
PXOR XMM1,XMM1
MOVSD XMM0,qword ptr [0x00102070]
CVTSI2SD XMM1,EBP
ADD EBP,0x1
CALL 0x00101060
MOVSXD RAX,EBX
MOV EDX,EBX
IMUL RAX,RAX,0x66666667
SAR EDX,0x1f
MOVAPD XMM... | /* func0(int) */
int func0(int param_1)
{
int iVar1;
int iVar2;
int iVar3;
double dVar4;
if (param_1 != 0) {
iVar2 = 0;
iVar3 = 0;
do {
dVar4 = (double)iVar2;
iVar2 = iVar2 + 1;
dVar4 = pow(DAT_00102070,dVar4);
iVar1 = param_1 / 10;
iVar3 = (int)((double)(param_1... |
96 | func0 |
#include <vector>
#include <algorithm>
#include <assert.h>
| int func0(std::vector<int>& arr, int n) {
std::sort(arr.begin(), arr.end());
int prod = 1;
for (int i = 0; i < n; i++) {
if (i == 0 || arr[i - 1] != arr[i]) {
prod = prod * arr[i];
}
}
return prod;
}
| int main() {
std::vector<int> arr1 = {1,1,2,3};
std::vector<int> arr2 = {1,2,3,1,1};
std::vector<int> arr3 = {1,1,4,5,6};
std::vector<int> arr4 = {1,1,4,5,6,5,7,1,1,3,4};
assert(func0(arr1, 4) == 6);
assert(func0(arr2, 5) == 6);
assert(func0(arr3, 5) == 120);
assert(func0(a... | O0 | cpp | func0(std::vector<int, std::allocator<int> >&, int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x28,%rsp
mov %rdi,-0x28(%rbp)
mov %esi,-0x2c(%rbp)
mov -0x28(%rbp),%rax
mov %rax,%rdi
callq 1814 <_ZNSt6vectorIiSaIiEE3endEv>
mov %rax,%rbx
mov -0x28(%rbp),%rax
mov %rax,%rdi
callq 17c8 ... | _Z5func0RSt6vectorIiSaIiEEi:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 28h
mov [rbp+var_28], rdi
mov [rbp+var_2C], esi
mov rax, [rbp+var_28]
mov rdi, rax
call _ZNSt6vectorIiSaIiEE3endEv; std::vector<int>::end(void)
mov rbx, rax
mov rax, [rbp+var_28]
mov rdi, rax
call ... | long long func0(long long a1, int a2)
{
long long v2; // rbx
long long v3; // rax
int v4; // ebx
unsigned int v7; // [rsp+18h] [rbp-18h]
int i; // [rsp+1Ch] [rbp-14h]
v2 = std::vector<int>::end(a1);
v3 = std::vector<int>::begin(a1);
std::sort<__gnu_cxx::__normal_iterator<int *,std::vector<int>>>(v3, v... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x28
MOV qword ptr [RBP + -0x28],RDI
MOV dword ptr [RBP + -0x2c],ESI
MOV RAX,qword ptr [RBP + -0x28]
MOV RDI,RAX
CALL 0x00101816
MOV RBX,RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RDI,RAX
CALL 0x001017ca
MOV RSI,RBX
MOV RDI,RAX
CALL 0x00101866
MOV dword ptr [RBP + -0x18... | /* func0(std::vector<int, std::allocator<int> >&, int) */
int func0(vector *param_1,int param_2)
{
int iVar1;
bool bVar2;
__normal_iterator _Var3;
__normal_iterator _Var4;
int *piVar5;
int4 local_20;
int4 local_1c;
_Var3 = std::vector<int,std::allocator<int>>::end((vector<int,std::allocator<int>> *... |
97 | func0 |
#include <vector>
#include <algorithm>
#include <assert.h>
| int func0(std::vector<int>& arr, int n) {
std::sort(arr.begin(), arr.end());
int prod = 1;
for (int i = 0; i < n; i++) {
if (i == 0 || arr[i - 1] != arr[i]) {
prod = prod * arr[i];
}
}
return prod;
}
| int main() {
std::vector<int> arr1 = {1,1,2,3};
std::vector<int> arr2 = {1,2,3,1,1};
std::vector<int> arr3 = {1,1,4,5,6};
std::vector<int> arr4 = {1,1,4,5,6,5,7,1,1,3,4};
assert(func0(arr1, 4) == 6);
assert(func0(arr2, 5) == 6);
assert(func0(arr3, 5) == 120);
assert(func0(a... | O1 | cpp | func0(std::vector<int, std::allocator<int> >&, int):
endbr64
push %r14
push %r13
push %r12
push %rbp
push %rbx
mov %rdi,%rbx
mov %esi,%ebp
mov 0x8(%rdi),%r13
mov (%rdi),%r14
cmp %r14,%r13
je 12d0 <_Z5func0RSt6vectorIiSaIiEEi+0xa7>
mov %r13,%r12
sub %r14,%r12
mov %r12,%rax
sar $0... | _Z5func0RSt6vectorIiSaIiEEi:
endbr64
push r14
push r13
push r12
push rbp
push rbx
mov rbx, rdi
mov ebp, esi
mov r13, [rdi+8]
mov r14, [rdi]
cmp r13, r14
jz loc_12D6
mov r12, r13
sub r12, r14
mov rdx, r12
sar rdx, 2
mov eax, 40h ; '@'
jz short loc_1265
bsr... | long long func0(char **a1, int a2)
{
char *v3; // r13
char *v4; // r14
int v5; // eax
unsigned long long v6; // rax
char *v7; // r12
int v8; // ecx
char *v9; // rax
int v10; // edx
char *v11; // rsi
long long v12; // rax
int v13; // edx
unsigned int v14; // esi
v3 = a1[1];
v4 = *a1;
if (... | func0:
ENDBR64
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV RBX,RDI
MOV EBP,ESI
MOV R13,qword ptr [RDI + 0x8]
MOV R14,qword ptr [RDI]
CMP R13,R14
JZ 0x001012d6
MOV R12,R13
SUB R12,R14
MOV RDX,R12
SAR RDX,0x2
MOV EAX,0x40
JZ 0x00101265
BSR RAX,RDX
XOR EAX,0x3f
LAB_00101265:
MOV EDX,0x3f
SUB EDX,EAX
MOVSXD RDX,EDX
AD... | /* func0(std::vector<int, std::allocator<int> >&, int) */
int func0(vector *param_1,int param_2)
{
int *piVar1;
int *piVar2;
int *piVar3;
int *piVar4;
uint uVar5;
long lVar6;
_Iter_less_iter in_ECX;
_Iter_less_iter extraout_EDX;
int iVar7;
ulong uVar8;
int iVar9;
__normal_iterator _Var10;
in... |
98 | func0 |
#include <vector>
#include <algorithm>
#include <assert.h>
| int func0(std::vector<int>& arr, int n) {
std::sort(arr.begin(), arr.end());
int prod = 1;
for (int i = 0; i < n; i++) {
if (i == 0 || arr[i - 1] != arr[i]) {
prod = prod * arr[i];
}
}
return prod;
}
| int main() {
std::vector<int> arr1 = {1,1,2,3};
std::vector<int> arr2 = {1,2,3,1,1};
std::vector<int> arr3 = {1,1,4,5,6};
std::vector<int> arr4 = {1,1,4,5,6,5,7,1,1,3,4};
assert(func0(arr1, 4) == 6);
assert(func0(arr2, 5) == 6);
assert(func0(arr3, 5) == 120);
assert(func0(a... | O2 | cpp | func0(std::vector<int, std::allocator<int> >&, int):
endbr64
push %r14
push %r13
mov %esi,%r13d
push %r12
push %rbp
mov %rdi,%rbp
push %rbx
mov 0x8(%rdi),%r12
mov (%rdi),%r14
cmp %r14,%r12
je 15e4 <_Z5func0RSt6vectorIiSaIiEEi+0xa4>
mov %r12,%rbx
mov $0x3f,%edx
mov %r12,%rsi
mov ... | _Z5func0RSt6vectorIiSaIiEEi:
endbr64
push r14
push r13
mov r13, rdi
push r12
push rbp
mov ebp, esi
push rbx
mov r12, [rdi+8]
mov r14, [rdi]
cmp r12, r14
jz short loc_18FC
mov rbx, r12
mov rdx, 0FFFFFFFFFFFFFFFEh
sub rbx, r14
mov rax, rbx
sar rax, 2
jz sho... | long long func0(char **a1, int a2)
{
char *v4; // r12
char *v5; // r14
long long v6; // rdx
unsigned long long v7; // rax
char *i; // rdi
int v9; // ecx
int v10; // edx
char *v11; // rsi
char *v12; // rax
unsigned int v13; // edi
char *v14; // rcx
long long v15; // rax
int v16; // edx
long ... | func0:
ENDBR64
PUSH R14
PUSH R13
MOV R13,RDI
PUSH R12
PUSH RBP
MOV EBP,ESI
PUSH RBX
MOV R12,qword ptr [RDI + 0x8]
MOV R14,qword ptr [RDI]
CMP R12,R14
JZ 0x001018fc
MOV RBX,R12
MOV RDX,-0x2
SUB RBX,R14
MOV RAX,RBX
SAR RAX,0x2
JZ 0x0010189d
BSR RAX,RAX
CDQE
LEA RDX,[RAX + RAX*0x1]
LAB_0010189d:
MOV RSI,R12
MOV RDI,R14
CA... | /* func0(std::vector<int, std::allocator<int> >&, int) */
int func0(vector *param_1,int param_2)
{
int *piVar1;
int *piVar2;
long lVar3;
ulong uVar4;
long lVar5;
_Iter_less_iter in_ECX;
_Iter_less_iter extraout_EDX;
int iVar6;
long lVar7;
__normal_iterator _Var8;
int iVar9;
int *piVar10;
... |
99 | func0 |
#include <vector>
#include <algorithm>
#include <assert.h>
| int func0(std::vector<int>& arr, int n) {
std::sort(arr.begin(), arr.end());
int prod = 1;
for (int i = 0; i < n; i++) {
if (i == 0 || arr[i - 1] != arr[i]) {
prod = prod * arr[i];
}
}
return prod;
}
| int main() {
std::vector<int> arr1 = {1,1,2,3};
std::vector<int> arr2 = {1,2,3,1,1};
std::vector<int> arr3 = {1,1,4,5,6};
std::vector<int> arr4 = {1,1,4,5,6,5,7,1,1,3,4};
assert(func0(arr1, 4) == 6);
assert(func0(arr2, 5) == 6);
assert(func0(arr3, 5) == 120);
assert(func0(a... | O3 | cpp | func0(std::vector<int, std::allocator<int> >&, int):
endbr64
push %r15
mov %rdi,%r15
push %r14
push %r13
push %r12
push %rbp
mov %esi,%ebp
push %rbx
sub $0x18,%rsp
mov 0x8(%rdi),%r13
mov (%rdi),%r12
cmp %r12,%r13
je 160c <_Z5func0RSt6vectorIiSaIiEEi+0x11c>
mov %r13,%r14
mov $0x3f... | _Z5func0RSt6vectorIiSaIiEEi:
endbr64
push r15
push r14
push r13
push r12
push rbp
mov rbp, rdi
push rbx
sub rsp, 18h
mov r13, [rdi+8]
mov rbx, [rdi]
mov [rsp+48h+var_3C], esi
cmp r13, rbx
jz loc_1894
mov r14, r13
lea r12, [rbx+4]
sub r14, rbx
mov rax, r14
s... | long long func0(char **a1, int a2)
{
char *v2; // r13
char *v3; // rbx
char *v4; // r12
unsigned long long v5; // rdx
char *v6; // r15
int v7; // r14d
char *v8; // rsi
int v9; // edx
char *j; // rax
int v11; // ecx
int v12; // edx
char *v13; // rax
char *v14; // rsi
unsigned int v15; // ecx... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
SUB RSP,0x18
MOV R13,qword ptr [RDI + 0x8]
MOV RBX,qword ptr [RDI]
MOV dword ptr [RSP + 0xc],ESI
CMP R13,RBX
JZ 0x00101894
MOV R14,R13
LEA R12,[RBX + 0x4]
SUB R14,RBX
MOV RAX,R14
SAR RAX,0x2
JZ 0x001018ec
BSR RDX,RAX
MOV RSI,R13
MOV RDI,RB... | /* func0(std::vector<int, std::allocator<int> >&, int) */
int func0(vector *param_1,int 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,
int4 param_11)
{
int *piVar1;
int *piVar2;
long lVar3;
int *piVar4;
ulong uVar5;
long lVar6;
... |
100 | func0 |
#include <vector>
#include <tuple>
#include <assert.h>
| bool func0(const std::vector<std::vector<int>>& test_list, int K) {
bool res = true;
for (const auto& tup : test_list) {
for (int ele : tup) {
if (ele != K) {
res = false;
break;
}
}
if (!res) break;
}
return res;... | int main() {
assert(func0({{4, 4}, {4, 4, 4}, {4, 4}, {4, 4, 4, 4}, {4}}, 4) == true);
assert(func0({{7, 7, 7}, {7, 7}}, 7) == true);
assert(func0({{9, 9}, {9, 9, 9, 9}}, 7) == false);
assert(func0({{4, 4}, {4, 4, 4}, {4, 4}, {4, 4, 6, 4}, {4}}, 4) == false);
return 0;
}
| O0 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, int):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x60,%rsp
mov %rdi,-0x58(%rbp)
mov %esi,-0x5c(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x8(%rbp)
xor %eax,%eax
movb $0x1,-0x45(%rbp)
mo... | _Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EEi:
endbr64
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_58], rdi
mov [rbp+var_5C], esi
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
mov [rbp+var_45], 1
mov rax, [rbp+var_58]
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
mov r... | long long func0(long long a1, int a2)
{
unsigned __int8 v3; // [rsp+1Bh] [rbp-45h]
long long v4; // [rsp+20h] [rbp-40h] BYREF
long long v5; // [rsp+28h] [rbp-38h] BYREF
long long v6; // [rsp+30h] [rbp-30h] BYREF
_QWORD v7[2]; // [rsp+38h] [rbp-28h] BYREF
long long v8; // [rsp+48h] [rbp-18h]
long long v9;... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x58],RDI
MOV dword ptr [RBP + -0x5c],ESI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
MOV byte ptr [RBP + -0x45],0x1
MOV RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RDI,R... | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > > const&, int) */
char func0(vector *param_1,int param_2)
{
bool bVar1;
int *piVar2;
long in_FS_OFFSET;
char local_4d;
int8 local_48;
int8 local_40;
int8 local_38;
int8 local_30;
v... |
101 | func0 |
#include <vector>
#include <tuple>
#include <assert.h>
| bool func0(const std::vector<std::vector<int>>& test_list, int K) {
bool res = true;
for (const auto& tup : test_list) {
for (int ele : tup) {
if (ele != K) {
res = false;
break;
}
}
if (!res) break;
}
return res;... | int main() {
assert(func0({{4, 4}, {4, 4, 4}, {4, 4}, {4, 4, 4, 4}, {4}}, 4) == true);
assert(func0({{7, 7, 7}, {7, 7}}, 7) == true);
assert(func0({{9, 9}, {9, 9, 9, 9}}, 7) == false);
assert(func0({{4, 4}, {4, 4, 4}, {4, 4}, {4, 4, 6, 4}, {4}}, 4) == false);
return 0;
}
| O1 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, int):
endbr64
mov (%rdi),%rcx
mov 0x8(%rdi),%rdi
cmp %rdi,%rcx
jne 12c8 <_Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EEi+0x1f>
mov $0x1,%eax
retq
add $0x18,%rcx
cmp %rcx,%rdi
je 1... | _Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EEi:
endbr64
mov rcx, [rdi]
mov rdi, [rdi+8]
cmp rdi, rcx
jnz short loc_12C8
mov eax, 1
retn
loc_12BF:
add rcx, 18h
cmp rdi, rcx
jz short loc_12E3
loc_12C8:
mov rax, [rcx]
mov rdx, [rcx+8]
cmp rax, rdx
jz short loc_12BF
loc_12D4:
cmp ... | long long func0(long long *a1, int a2)
{
long long v2; // rcx
long long v3; // rdi
_DWORD *v5; // rax
_DWORD *v6; // rdx
v2 = *a1;
v3 = a1[1];
if ( v3 == v2 )
return 1LL;
while ( 1 )
{
v5 = *(_DWORD **)v2;
v6 = *(_DWORD **)(v2 + 8);
if ( *(_DWORD **)v2 != v6 )
break;
LABEL_3:
... | func0:
ENDBR64
MOV RCX,qword ptr [RDI]
MOV RDI,qword ptr [RDI + 0x8]
CMP RDI,RCX
JNZ 0x001012c8
MOV EAX,0x1
RET
LAB_001012bf:
ADD RCX,0x18
CMP RDI,RCX
JZ 0x001012e3
LAB_001012c8:
MOV RAX,qword ptr [RCX]
MOV RDX,qword ptr [RCX + 0x8]
CMP RAX,RDX
JZ 0x001012bf
LAB_001012d4:
CMP dword ptr [RAX],ESI
JNZ 0x001012e9
ADD RAX,... | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > > const&, int) */
int8 func0(vector *param_1,int param_2)
{
int *piVar1;
int8 *puVar2;
puVar2 = *(int8 **)param_1;
if (*(int8 **)(param_1 + 8) == puVar2) {
return 1;
}
do {
fo... |
102 | func0 |
#include <vector>
#include <tuple>
#include <assert.h>
| bool func0(const std::vector<std::vector<int>>& test_list, int K) {
bool res = true;
for (const auto& tup : test_list) {
for (int ele : tup) {
if (ele != K) {
res = false;
break;
}
}
if (!res) break;
}
return res;... | int main() {
assert(func0({{4, 4}, {4, 4, 4}, {4, 4}, {4, 4, 4, 4}, {4}}, 4) == true);
assert(func0({{7, 7, 7}, {7, 7}}, 7) == true);
assert(func0({{9, 9}, {9, 9, 9, 9}}, 7) == false);
assert(func0({{4, 4}, {4, 4, 4}, {4, 4}, {4, 4, 6, 4}, {4}}, 4) == false);
return 0;
}
| O2 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, int):
endbr64
mov (%rdi),%rcx
mov 0x8(%rdi),%rdi
cmp %rdi,%rcx
je 1999 <_Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EEi+0x39>
mov (%rcx),%rax
mov 0x8(%rcx),%rdx
cmp %rdx,%rax
jne ... | _Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EEi:
endbr64
mov rcx, [rdi]
mov rdi, [rdi+8]
cmp rdi, rcx
jz short loc_1A39
loc_1A10:
mov rax, [rcx]
mov rdx, [rcx+8]
cmp rax, rdx
jnz short loc_1A29
jmp short loc_1A30
loc_1A20:
add rax, 4
cmp rdx, rax
jz short loc_1A30
loc_1A29:
cmp... | long long func0(long long *a1, int a2)
{
long long v2; // rcx
long long v3; // rdi
_DWORD *v4; // rax
_DWORD *v5; // rdx
v2 = *a1;
v3 = a1[1];
if ( v3 == v2 )
return 1LL;
while ( 1 )
{
v4 = *(_DWORD **)v2;
v5 = *(_DWORD **)(v2 + 8);
if ( *(_DWORD **)v2 != v5 )
break;
LABEL_7:
... | func0:
ENDBR64
MOV RCX,qword ptr [RDI]
MOV RDI,qword ptr [RDI + 0x8]
CMP RDI,RCX
JZ 0x00101a39
LAB_00101a10:
MOV RAX,qword ptr [RCX]
MOV RDX,qword ptr [RCX + 0x8]
CMP RAX,RDX
JNZ 0x00101a29
JMP 0x00101a30
LAB_00101a20:
ADD RAX,0x4
CMP RDX,RAX
JZ 0x00101a30
LAB_00101a29:
CMP dword ptr [RAX],ESI
JZ 0x00101a20
XOR EAX,EAX... | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > > const&, int) */
int8 func0(vector *param_1,int param_2)
{
int *piVar1;
int8 *puVar2;
puVar2 = *(int8 **)param_1;
do {
if (*(int8 **)(param_1 + 8) == puVar2) {
return 1;
}
... |
103 | func0 |
#include <vector>
#include <tuple>
#include <assert.h>
| bool func0(const std::vector<std::vector<int>>& test_list, int K) {
bool res = true;
for (const auto& tup : test_list) {
for (int ele : tup) {
if (ele != K) {
res = false;
break;
}
}
if (!res) break;
}
return res;... | int main() {
assert(func0({{4, 4}, {4, 4, 4}, {4, 4}, {4, 4, 4, 4}, {4}}, 4) == true);
assert(func0({{7, 7, 7}, {7, 7}}, 7) == true);
assert(func0({{9, 9}, {9, 9, 9, 9}}, 7) == false);
assert(func0({{4, 4}, {4, 4, 4}, {4, 4}, {4, 4, 6, 4}, {4}}, 4) == false);
return 0;
}
| O3 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, int):
endbr64
mov (%rdi),%rcx
mov 0x8(%rdi),%rdi
cmp %rdi,%rcx
je 1a09 <_Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EEi+0x39>
mov (%rcx),%rax
mov 0x8(%rcx),%rdx
cmp %rdx,%rax
jne ... | _Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EEi:
endbr64
mov rcx, [rdi]
mov rdi, [rdi+8]
cmp rdi, rcx
jz short loc_1BA9
loc_1B80:
mov rax, [rcx]
mov rdx, [rcx+8]
cmp rax, rdx
jnz short loc_1B99
jmp short loc_1BA0
loc_1B90:
add rax, 4
cmp rdx, rax
jz short loc_1BA0
loc_1B99:
cmp... | long long func0(long long *a1, int a2)
{
long long v2; // rcx
long long v3; // rdi
_DWORD *v4; // rax
_DWORD *v5; // rdx
v2 = *a1;
v3 = a1[1];
if ( v3 == v2 )
return 1LL;
while ( 1 )
{
v4 = *(_DWORD **)v2;
v5 = *(_DWORD **)(v2 + 8);
if ( *(_DWORD **)v2 != v5 )
break;
LABEL_7:
... | func0:
ENDBR64
MOV RCX,qword ptr [RDI]
MOV RDI,qword ptr [RDI + 0x8]
CMP RDI,RCX
JZ 0x00101ba9
LAB_00101b80:
MOV RAX,qword ptr [RCX]
MOV RDX,qword ptr [RCX + 0x8]
CMP RAX,RDX
JNZ 0x00101b99
JMP 0x00101ba0
LAB_00101b90:
ADD RAX,0x4
CMP RDX,RAX
JZ 0x00101ba0
LAB_00101b99:
CMP dword ptr [RAX],ESI
JZ 0x00101b90
XOR EAX,EAX... | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > > const&, int) */
int8 func0(vector *param_1,int param_2)
{
int *piVar1;
int8 *puVar2;
puVar2 = *(int8 **)param_1;
do {
if (*(int8 **)(param_1 + 8) == puVar2) {
return 1;
}
... |
104 | func0 | #include <cassert>
#include <vector>
#include <string>
#include <regex>
using namespace std;
| vector<string> func0(const vector<string>& list) {
regex pattern("[0-9]");
vector<string> result;
for (const auto& s : list) {
result.push_back(regex_replace(s, pattern, ""));
}
return result;
}
| int main() {
{
vector<string> input = {"4words", "3letters", "4digits"};
vector<string> expected = {"words", "letters", "digits"};
assert(func0(input) == expected);
}
{
vector<string> input = {"28Jan", "12Jan", "11Jan"};
vector<string> expected = {"Jan",... | O0 | cpp | func0(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x88,%rsp
mov %rdi,-0x88(%rbp)
mov %rsi,-0x90(%rbp... | _Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 88h
mov [rbp+var_88], rdi
mov [rbp+var_90], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_60]
mov edx, 10h
lea rcx, a... | long long func0(long long a1, long long a2)
{
long long v3; // [rsp+10h] [rbp-80h] BYREF
_QWORD v4[2]; // [rsp+18h] [rbp-78h] BYREF
long long v5; // [rsp+28h] [rbp-68h]
_BYTE v6[32]; // [rsp+30h] [rbp-60h] BYREF
_BYTE v7[40]; // [rsp+50h] [rbp-40h] BYREF
unsigned long long v8; // [rsp+78h] [rbp-18h]
v8 ... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x88
MOV qword ptr [RBP + -0x88],RDI
MOV qword ptr [RBP + -0x90],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x60]
MOV EDX,0x10
LEA RCX,[0x135051]
MOV RSI,RCX
MOV RDI,RAX
LAB_00104b6c:
CALL 0x00106556
MOV RAX,qword ptr ... | /* func0(std::vector<std::string, std::allocator<std::string > > const&) */
vector * func0(vector *param_1)
{
bool bVar1;
vector<std::string,std::allocator<std::string>> *in_RSI;
long in_FS_OFFSET;
int8 local_88;
int8 local_80;
vector<std::string,std::allocator<std::string>> *local_78;
int8 local_70;
... |
105 | func0 | #include <cassert>
#include <vector>
#include <string>
#include <regex>
using namespace std;
| vector<string> func0(const vector<string>& list) {
regex pattern("[0-9]");
vector<string> result;
for (const auto& s : list) {
result.push_back(regex_replace(s, pattern, ""));
}
return result;
}
| int main() {
{
vector<string> input = {"4words", "3letters", "4digits"};
vector<string> expected = {"words", "letters", "digits"};
assert(func0(input) == expected);
}
{
vector<string> input = {"28Jan", "12Jan", "11Jan"};
vector<string> expected = {"Jan",... | O1 | cpp | func0(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&):
endbr64
push %r13
push %r12
push %rbp
push %rbx
sub $0x1d8,%rsp
mov %rdi,%rbp
mov %rsi,%rbx
mov ... | _Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE:
endbr64
push rbp
mov rbp, rsp
push r14
push r13
push r12
push rbx
sub rsp, 1C0h
mov r14, rdi
mov rbx, rsi
mov rax, fs:28h
mov [rbp+var_28], rax
xor eax, eax
lea r12, [rbp+var_1D8]
mov rdi... | _QWORD * func0(_QWORD *a1, long long *a2)
{
long long v3; // rsi
long long v4; // rdx
long long v5; // rax
long long v6; // r12
volatile signed __int32 *v7; // rcx
long long v8; // rdx
signed __int32 v9; // eax
long long v10; // r13
long long i; // rbx
_DWORD *v12; // rbx
volatile signed __int32 *... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x1c0
MOV R14,RDI
MOV RBX,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
XOR EAX,EAX
LEA R12,[RBP + -0x1d8]
MOV RDI,R12
CALL 0x00104710
MOV qword ptr [RBP + -0x1d0],0x0
MOV qword ptr [RBP + -0x1c8],0x0
LEA RDI,[RBP + -0x1c0... | /* func0(std::vector<std::string, std::allocator<std::string > > const&) */
vector * func0(vector *param_1)
{
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
int8 *puVar2;
long *plVar3;
_Sp_counted_base<(_Lock_policy)2> *p_Var4;
int iVar5;
uint uVar6;
ulong uVar7;
uint uVar8;
long lVar9;
int8 *puVar10;... |
106 | func0 | #include <cassert>
#include <vector>
#include <string>
#include <regex>
using namespace std;
| vector<string> func0(const vector<string>& list) {
regex pattern("[0-9]");
vector<string> result;
for (const auto& s : list) {
result.push_back(regex_replace(s, pattern, ""));
}
return result;
}
| int main() {
{
vector<string> input = {"4words", "3letters", "4digits"};
vector<string> expected = {"words", "letters", "digits"};
assert(func0(input) == expected);
}
{
vector<string> input = {"28Jan", "12Jan", "11Jan"};
vector<string> expected = {"Jan",... | O2 | cpp | func0(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
mov %rsi,%rbx... | _Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE:
endbr64
push rbp
mov rbp, rsp
push r15
push r14
lea r15, [rbp+var_1E8]
push r13
lea r13, [rbp+var_1D0]
push r12
push rbx
mov rbx, rsi
sub rsp, 1D8h
mov [rbp+var_1F8], rdi
mov rdi, r15; this
mo... | long long func0(long long a1, long long *a2)
{
long long v3; // rsi
__m128i v4; // xmm0
volatile signed __int32 *v5; // r12
long long v6; // rdx
volatile signed __int32 *v7; // rcx
signed __int32 v8; // eax
long long v9; // r12
long long v10; // rdx
volatile signed __int32 *v11; // rcx
signed __int... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
LEA R15,[RBP + -0x1e8]
PUSH R13
LEA R13,[RBP + -0x1d0]
PUSH R12
PUSH RBX
MOV RBX,RSI
SUB RSP,0x1d8
MOV qword ptr [RBP + -0x1f8],RDI
MOV RDI,R15
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x38],RAX
XOR EAX,EAX
MOV qword ptr [RBP + -0x200],R15
CALL 0x001036f0
P... | /* func0(std::vector<std::string, std::allocator<std::string > > const&) */
vector * func0(vector *param_1)
{
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
_Sp_counted_base<(_Lock_policy)2> *p_Var2;
int8 *puVar3;
long *plVar4;
int8 uVar5;
int auVar6 [16];
int iVar7;
uint uVar8;
uint uVar9;
long lVar1... |
107 | func0 | #include <cassert>
#include <vector>
#include <string>
#include <regex>
using namespace std;
| vector<string> func0(const vector<string>& list) {
regex pattern("[0-9]");
vector<string> result;
for (const auto& s : list) {
result.push_back(regex_replace(s, pattern, ""));
}
return result;
}
| int main() {
{
vector<string> input = {"4words", "3letters", "4digits"};
vector<string> expected = {"words", "letters", "digits"};
assert(func0(input) == expected);
}
{
vector<string> input = {"28Jan", "12Jan", "11Jan"};
vector<string> expected = {"Jan",... | O3 | cpp | func0(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
mov %rsi,%rbp
push %rbx... | _Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE:
endbr64
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
mov r12, rsi
push rbx
lea rbx, [rbp+var_268]
sub rsp, 2B8h
mov [rbp+var_2C0], rdi
mov rdi, rbx; this
mov rax, fs:28h
mov [... | long long func0(long long a1, long long *a2)
{
__m128i v2; // xmm0
long long v3; // rdi
void *v4; // rdi
void **v5; // rbx
unsigned long long v6; // r14
void *v7; // rdi
char *v8; // rbx
long long v9; // rax
char *v10; // r13
long long v11; // r15
char v12; // al
long long v13; // rdx
long lo... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
MOV R12,RSI
PUSH RBX
LEA RBX,[RBP + -0x268]
SUB RSP,0x2b8
MOV qword ptr [RBP + -0x2c0],RDI
MOV RDI,RBX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x38],RAX
XOR EAX,EAX
MOV qword ptr [RBP + -0x2d8],RBX
CALL 0x00104710
LEA RDX,[0x11b625]
PXOR ... | /* func0(std::vector<std::string, std::allocator<std::string > > const&) */
vector * func0(vector *param_1)
{
int uVar1;
long *plVar2;
int *puVar3;
int8 this;
ulong uVar4;
int auVar5 [16];
bool bVar6;
char cVar7;
uint uVar8;
int8 *puVar9;
uint uVar10;
ulong uVar11;
long lVar12;
int8 *puVar... |
108 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int n, int k) {
if (k > n) {
return 0;
}
if (k == 0 || k == n) {
return 1;
}
return func0(n - 1, k - 1) + func0(n - 1, k);
}
| int main() {
assert(func0(5, 2) == 10);
assert(func0(4, 3) == 4);
assert(func0(3, 2) == 3);
assert(func0(14, 6) == 3003);
return 0;
}
| O0 | cpp | func0(int, int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x18,%rsp
mov %edi,-0x14(%rbp)
mov %esi,-0x18(%rbp)
mov -0x18(%rbp),%eax
cmp -0x14(%rbp),%eax
jle 11ab <_Z5func0ii+0x22>
mov $0x0,%eax
jmp 11eb <_Z5func0ii+0x62>
cmpl $0x0,-0x18(%rbp)
je 11b9 <_Z5func0ii+0x30>
mov -0... | _Z5func0ii:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 18h
mov [rbp+var_14], edi
mov [rbp+var_18], esi
mov eax, [rbp+var_18]
cmp eax, [rbp+var_14]
jle short loc_116B
mov eax, 0
jmp short loc_11AB
loc_116B:
cmp [rbp+var_18], 0
jz short loc_1179
mov eax, [rbp+va... | long long func0(int a1, int a2)
{
int v3; // ebx
if ( a2 > a1 )
return 0LL;
if ( !a2 || a2 == a1 )
return 1LL;
v3 = func0(a1 - 1, a2 - 1);
return v3 + (unsigned int)func0(a1 - 1, a2);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x18
MOV dword ptr [RBP + -0x14],EDI
MOV dword ptr [RBP + -0x18],ESI
MOV EAX,dword ptr [RBP + -0x18]
CMP EAX,dword ptr [RBP + -0x14]
JLE 0x0010116b
MOV EAX,0x0
JMP 0x001011ab
LAB_0010116b:
CMP dword ptr [RBP + -0x18],0x0
JZ 0x00101179
MOV EAX,dword ptr [RBP + -0x18]
... | /* func0(int, int) */
int func0(int param_1,int param_2)
{
int iVar1;
int iVar2;
if (param_1 < param_2) {
iVar2 = 0;
}
else if ((param_2 == 0) || (param_2 == param_1)) {
iVar2 = 1;
}
else {
iVar1 = func0(param_1 + -1,param_2 + -1);
iVar2 = func0(param_1 + -1,param_2);
iVar2 = iVar... |
109 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int n, int k) {
if (k > n) {
return 0;
}
if (k == 0 || k == n) {
return 1;
}
return func0(n - 1, k - 1) + func0(n - 1, k);
}
| int main() {
assert(func0(5, 2) == 10);
assert(func0(4, 3) == 4);
assert(func0(3, 2) == 3);
assert(func0(14, 6) == 3003);
return 0;
}
| O1 | cpp | func0(int, int):
endbr64
mov $0x0,%eax
cmp %edi,%esi
jg 11cc <_Z5func0ii+0x43>
push %r12
push %rbp
push %rbx
mov %esi,%ebx
test %esi,%esi
je 11c2 <_Z5func0ii+0x39>
cmp %edi,%esi
je 11c2 <_Z5func0ii+0x39>
lea -0x1(%rdi),%ebp
lea -0x1(%rsi),%esi
mov %ebp,%edi
callq 1189 <_Z5func0... | _Z5func0ii:
endbr64
mov eax, 0
cmp esi, edi
jg short locret_118C
push r12
push rbp
push rbx
mov ebx, esi
test esi, esi
jz short loc_1182
cmp esi, edi
jz short loc_1182
lea ebp, [rdi-1]
lea esi, [rsi-1]; int
mov edi, ebp; int
call _Z5func0ii; func0(int,int)
mov ... | long long func0(int a1, int a2)
{
long long result; // rax
int v3; // r12d
result = 0LL;
if ( a2 <= a1 )
{
if ( !a2 || a2 == a1 )
{
return 1LL;
}
else
{
v3 = func0(a1 - 1, a2 - 1);
return v3 + (unsigned int)func0(a1 - 1, a2);
}
}
return result;
} | func0:
ENDBR64
MOV EAX,0x0
CMP ESI,EDI
JG 0x0010118c
PUSH R12
PUSH RBP
PUSH RBX
MOV EBX,ESI
TEST ESI,ESI
JZ 0x00101182
CMP ESI,EDI
JZ 0x00101182
LEA EBP,[RDI + -0x1]
LEA ESI,[RSI + -0x1]
MOV EDI,EBP
CALL 0x00101149
MOV R12D,EAX
MOV ESI,EBX
MOV EDI,EBP
CALL 0x00101149
ADD EAX,R12D
JMP 0x00101187
LAB_00101182:
MOV EAX,0x... | /* func0(int, int) */
int func0(int param_1,int param_2)
{
int iVar1;
int iVar2;
if (param_2 <= param_1) {
if ((param_2 == 0) || (param_2 == param_1)) {
iVar2 = 1;
}
else {
iVar1 = func0(param_1 + -1,param_2 + -1);
iVar2 = func0(param_1 + -1,param_2);
iVar2 = iVar2 + iVar1... |
110 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int n, int k) {
if (k > n) {
return 0;
}
if (k == 0 || k == n) {
return 1;
}
return func0(n - 1, k - 1) + func0(n - 1, k);
}
| int main() {
assert(func0(5, 2) == 10);
assert(func0(4, 3) == 4);
assert(func0(3, 2) == 3);
assert(func0(14, 6) == 3003);
return 0;
}
| O2 | cpp | func0(int, int):
endbr64
push %r13
push %r12
push %rbp
push %rbx
sub $0x8,%rsp
cmp %edi,%esi
jg 1310 <_Z5func0ii+0x50>
je 1328 <_Z5func0ii+0x68>
mov %esi,%ebp
test %esi,%esi
je 1328 <_Z5func0ii+0x68>
mov %edi,%ebx
lea -0x1(%rsi),%r13d
xor %r12d,%r12d
sub $0x1,%ebx
mov %r13d... | _Z5func0ii:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 68h
cmp edi, esi
jl loc_16CB
mov r9d, esi
test esi, esi
jz loc_16D2
cmp edi, esi
jz loc_16D2
lea eax, [rsi-9]
xor ebp, ebp
mov ebx, edi
mov [rsp+98h+var_6C], eax
loc_127... | long long func0(int a1, int a2)
{
int v2; // r9d
unsigned int v3; // ebp
int v4; // ebx
int v5; // eax
int v6; // r14d
int v7; // r13d
int v8; // ebp
int v9; // ecx
int v10; // r15d
int v11; // r12d
int v12; // r14d
int v13; // ebx
int v14; // eax
int v15; // ebp
int v16; // r15d
int v1... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x68
CMP EDI,ESI
JL 0x001016cb
MOV R9D,ESI
TEST ESI,ESI
JZ 0x001016d2
CMP EDI,ESI
JZ 0x001016d2
LEA EAX,[RSI + -0x9]
XOR EBP,EBP
MOV EBX,EDI
MOV dword ptr [RSP + 0x2c],EAX
LAB_00101278:
MOV EAX,EBX
SUB EBX,0x1
CMP R9D,EAX
JG 0x0010158c
JZ 0x00... | /* func0(int, int) */
int func0(int param_1,int param_2)
{
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;
... |
111 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int n, int k) {
if (k > n) {
return 0;
}
if (k == 0 || k == n) {
return 1;
}
return func0(n - 1, k - 1) + func0(n - 1, k);
}
| int main() {
assert(func0(5, 2) == 10);
assert(func0(4, 3) == 4);
assert(func0(3, 2) == 3);
assert(func0(14, 6) == 3003);
return 0;
}
| O3 | cpp | func0(int, int):
endbr64
push %r13
push %r12
push %rbp
push %rbx
sub $0x8,%rsp
cmp %edi,%esi
jg 1310 <_Z5func0ii+0x50>
je 1328 <_Z5func0ii+0x68>
mov %esi,%ebp
test %esi,%esi
je 1328 <_Z5func0ii+0x68>
mov %edi,%ebx
lea -0x1(%rsi),%r13d
xor %r12d,%r12d
sub $0x1,%ebx
mov %r13d... | _Z5func0ii:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 68h
cmp edi, esi
jl loc_16CB
mov r9d, esi
test esi, esi
jz loc_16D2
cmp edi, esi
jz loc_16D2
lea eax, [rsi-9]
xor ebp, ebp
mov ebx, edi
mov [rsp+98h+var_6C], eax
loc_127... | long long func0(int a1, int a2)
{
int v2; // r9d
unsigned int v3; // ebp
int v4; // ebx
int v5; // eax
int v6; // r14d
int v7; // r13d
int v8; // ebp
int v9; // ecx
int v10; // r15d
int v11; // r12d
int v12; // r14d
int v13; // ebx
int v14; // eax
int v15; // ebp
int v16; // r15d
int v1... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x68
CMP EDI,ESI
JL 0x001016cb
MOV R9D,ESI
TEST ESI,ESI
JZ 0x001016d2
CMP EDI,ESI
JZ 0x001016d2
LEA EAX,[RSI + -0x9]
XOR EBP,EBP
MOV EBX,EDI
MOV dword ptr [RSP + 0x2c],EAX
LAB_00101278:
MOV EAX,EBX
SUB EBX,0x1
CMP R9D,EAX
JG 0x0010158c
JZ 0x00... | /* func0(int, int) */
int func0(int param_1,int param_2)
{
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;
... |
112 | func0 |
#include <cassert>
| int func0(int arr[], int arr_size) {
for (int i = 0; i < arr_size; i++) {
int count = 0;
for (int j = 0; j < arr_size; j++) {
if (arr[i] == arr[j]) {
count++;
}
}
if (count % 2 != 0) {
return arr[i];
}
}
... | int main() {
int arr1[] = {1, 2, 3, 1, 2, 3, 1};
assert(func0(arr1, 7) == 1);
int arr2[] = {1, 2, 3, 2, 3, 1, 3};
assert(func0(arr2, 7) == 3);
int arr3[] = {2, 3, 5, 4, 5, 2, 4, 3, 5, 2, 4, 4, 2};
assert(func0(arr3, 13) == 5);
return 0;
}
| O0 | cpp | func0(int*, int):
endbr64
push %rbp
mov %rsp,%rbp
mov %rdi,-0x18(%rbp)
mov %esi,-0x1c(%rbp)
movl $0x0,-0xc(%rbp)
mov -0xc(%rbp),%eax
cmp -0x1c(%rbp),%eax
jge 11ff <_Z5func0Pii+0x96>
movl $0x0,-0x8(%rbp)
movl $0x0,-0x4(%rbp)
mov -0x4(%rbp),%eax
cmp -0x1c(%rbp),%eax
jge 11d7 <_Z5func0Pi... | _Z5func0Pii:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_18], rdi
mov [rbp+var_1C], esi
mov [rbp+var_C], 0
jmp short loc_11F7
loc_1181:
mov [rbp+var_8], 0
mov [rbp+var_4], 0
jmp short loc_11C9
loc_1191:
mov eax, [rbp+var_C]
cdqe
lea rdx, ds:0[rax*4]
mov rax, [rbp+var_18]
ad... | long long func0(int *a1, int a2)
{
int i; // [rsp+10h] [rbp-Ch]
char v4; // [rsp+14h] [rbp-8h]
int j; // [rsp+18h] [rbp-4h]
for ( i = 0; i < a2; ++i )
{
v4 = 0;
for ( j = 0; j < a2; ++j )
{
if ( a1[i] == a1[j] )
++v4;
}
if ( (v4 & 1) != 0 )
return (unsigned int)a1[i];... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x1c],ESI
MOV dword ptr [RBP + -0xc],0x0
JMP 0x001011f7
LAB_00101181:
MOV dword ptr [RBP + -0x8],0x0
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001011c9
LAB_00101191:
MOV EAX,dword ptr [RBP + -0xc]
CDQE
LEA RDX,[RAX*0x4]
MOV RAX,qword p... | /* func0(int*, int) */
int func0(int *param_1,int param_2)
{
byte bVar1;
int local_14;
int local_c;
local_14 = 0;
while( true ) {
if (param_2 <= local_14) {
return -1;
}
bVar1 = 0;
for (local_c = 0; local_c < param_2; local_c = local_c + 1) {
if (param_1[local_14] == param_1[l... |
113 | func0 |
#include <cassert>
| int func0(int arr[], int arr_size) {
for (int i = 0; i < arr_size; i++) {
int count = 0;
for (int j = 0; j < arr_size; j++) {
if (arr[i] == arr[j]) {
count++;
}
}
if (count % 2 != 0) {
return arr[i];
}
}
... | int main() {
int arr1[] = {1, 2, 3, 1, 2, 3, 1};
assert(func0(arr1, 7) == 1);
int arr2[] = {1, 2, 3, 2, 3, 1, 3};
assert(func0(arr2, 7) == 3);
int arr3[] = {2, 3, 5, 4, 5, 2, 4, 3, 5, 2, 4, 4, 2};
assert(func0(arr3, 13) == 5);
return 0;
}
| O1 | cpp | func0(int*, int):
endbr64
test %esi,%esi
jle 11cb <_Z5func0Pii+0x62>
push %rbx
lea -0x1(%rsi),%r11d
mov %rdi,%rbx
lea 0x4(%rdi,%r11,4),%r8
mov $0x0,%r9d
jmp 1197 <_Z5func0Pii+0x2e>
test $0x1,%dl
jne 11bb <_Z5func0Pii+0x52>
lea 0x1(%r9),%rax
cmp %r11,%r9
je 11c4 <_Z5func0Pii+0x5b>
mo... | _Z5func0Pii:
endbr64
test esi, esi
jle short loc_11B7
movsxd r10, esi
lea r8, [rdi+r10*4]
mov r9d, 0
jmp short loc_118E
loc_1180:
test dl, 1
jnz short loc_11AF
add r9, 1
cmp r9, r10
jz short loc_11BD
loc_118E:
mov esi, [rdi+r9*4]
mov rax, rdi
mov edx, 0
loc_119A:
cmp ... | long long func0(int *a1, int a2)
{
long long i; // r9
int *v3; // rax
char v4; // dl
if ( a2 <= 0 )
return 0xFFFFFFFFLL;
for ( i = 0LL; i != a2; ++i )
{
v3 = a1;
v4 = 0;
do
v4 += a1[i] == *v3++;
while ( v3 != &a1[a2] );
if ( (v4 & 1) != 0 )
return (unsigned int)a1[(int)... | func0:
ENDBR64
TEST ESI,ESI
JLE 0x001011b7
MOVSXD R10,ESI
LEA R8,[RDI + R10*0x4]
MOV R9D,0x0
JMP 0x0010118e
LAB_00101180:
TEST DL,0x1
JNZ 0x001011af
ADD R9,0x1
CMP R9,R10
JZ 0x001011bd
LAB_0010118e:
MOV ESI,dword ptr [RDI + R9*0x4]
MOV RAX,RDI
MOV EDX,0x0
LAB_0010119a:
CMP ESI,dword ptr [RAX]
SETZ CL
MOVZX ECX,CL
ADD E... | /* func0(int*, int) */
int func0(int *param_1,int param_2)
{
int *piVar1;
bool bVar2;
long lVar3;
if (param_2 < 1) {
return -1;
}
lVar3 = 0;
while( true ) {
bVar2 = false;
piVar1 = param_1;
do {
bVar2 = (bool)(bVar2 ^ param_1[lVar3] == *piVar1);
piVar1 = piVar1 + 1;
} ... |
114 | func0 |
#include <cassert>
| int func0(int arr[], int arr_size) {
for (int i = 0; i < arr_size; i++) {
int count = 0;
for (int j = 0; j < arr_size; j++) {
if (arr[i] == arr[j]) {
count++;
}
}
if (count % 2 != 0) {
return arr[i];
}
}
... | int main() {
int arr1[] = {1, 2, 3, 1, 2, 3, 1};
assert(func0(arr1, 7) == 1);
int arr2[] = {1, 2, 3, 2, 3, 1, 3};
assert(func0(arr2, 7) == 3);
int arr3[] = {2, 3, 5, 4, 5, 2, 4, 3, 5, 2, 4, 4, 2};
assert(func0(arr3, 13) == 5);
return 0;
}
| O2 | cpp | func0(int*, int):
endbr64
test %esi,%esi
jle 1331 <_Z5func0Pii+0x41>
lea -0x1(%rsi),%eax
mov %rdi,%r9
lea 0x4(%rdi,%rax,4),%rsi
nopl 0x0(%rax,%rax,1)
mov (%r9),%r8d
mov %rdi,%rax
xor %edx,%edx
xor %ecx,%ecx
cmp (%rax),%r8d
sete %cl
add $0x4,%rax
add %ecx,%edx
cmp %rsi,%rax
jne ... | _Z5func0Pii:
endbr64
test esi, esi
jle short loc_1300
movsxd rsi, esi
mov r9, rdi
lea r8, [rdi+rsi*4]
nop word ptr [rax+rax+00h]
loc_12D8:
mov esi, [r9]
mov rax, rdi
xor edx, edx
loc_12E0:
xor ecx, ecx
cmp esi, [rax]
setz cl
add rax, 4
add edx, ecx
cmp rax, r8
jnz ... | long long func0(int *a1, int a2)
{
int *v2; // r9
int *v3; // r8
unsigned int v4; // esi
int *v5; // rax
char v6; // dl
char v7; // cl
if ( a2 <= 0 )
{
return (unsigned int)-1;
}
else
{
v2 = a1;
v3 = &a1[a2];
while ( 1 )
{
v4 = *v2;
v5 = a1;
v6 = 0;
do... | func0:
ENDBR64
TEST ESI,ESI
JLE 0x00101300
MOVSXD RSI,ESI
MOV R9,RDI
LEA R8,[RDI + RSI*0x4]
NOP word ptr [RAX + RAX*0x1]
LAB_001012d8:
MOV ESI,dword ptr [R9]
MOV RAX,RDI
XOR EDX,EDX
LAB_001012e0:
XOR ECX,ECX
CMP ESI,dword ptr [RAX]
SETZ CL
ADD RAX,0x4
ADD EDX,ECX
CMP RAX,R8
JNZ 0x001012e0
AND EDX,0x1
JNZ 0x00101305
ADD... | /* func0(int*, int) */
int func0(int *param_1,int param_2)
{
int iVar1;
int *piVar2;
bool bVar3;
int *piVar4;
if (0 < param_2) {
piVar4 = param_1;
do {
bVar3 = false;
piVar2 = param_1;
do {
iVar1 = *piVar2;
piVar2 = piVar2 + 1;
bVar3 = (bool)(bVar3 ^ *piV... |
115 | func0 |
#include <cassert>
| int func0(int arr[], int arr_size) {
for (int i = 0; i < arr_size; i++) {
int count = 0;
for (int j = 0; j < arr_size; j++) {
if (arr[i] == arr[j]) {
count++;
}
}
if (count % 2 != 0) {
return arr[i];
}
}
... | int main() {
int arr1[] = {1, 2, 3, 1, 2, 3, 1};
assert(func0(arr1, 7) == 1);
int arr2[] = {1, 2, 3, 2, 3, 1, 3};
assert(func0(arr2, 7) == 3);
int arr3[] = {2, 3, 5, 4, 5, 2, 4, 3, 5, 2, 4, 4, 2};
assert(func0(arr3, 13) == 5);
return 0;
}
| O3 | cpp | func0(int*, int):
endbr64
test %esi,%esi
jle 13c6 <_Z5func0Pii+0x106>
mov %esi,%edx
push %r12
lea -0x1(%rsi),%eax
mov %rdi,%r9
shr $0x2,%edx
push %rbp
lea 0x4(%rdi,%rax,4),%r12
mov %rax,%rbp
push %rbx
shl $0x4,%rdx
mov %esi,%ebx
add %rdi,%rdx
and $0xfffffffc,%ebx
mov (%r9),%r... | _Z5func0Pii:
endbr64
test esi, esi
jle loc_13B6
mov edx, esi
push r12
movsxd rax, esi
mov r12d, esi
shr edx, 2
push rbp
mov r8, rdi
mov r9d, esi
shl rdx, 4
push rbx
lea r11d, [rsi-1]
lea rbx, [rdi+rax*4]
add rdx, rdi
and r12d, 0FFFFFFFCh
nop dword ptr [rax+00... | long long func0(unsigned int *a1, int a2)
{
unsigned int *v2; // r8
unsigned int v4; // r11d
int *v5; // rbx
int *v6; // rdx
unsigned int v7; // r12d
unsigned int v8; // esi
const __m128i *v9; // rax
__m128i v10; // xmm0
__m128i v11; // xmm2
__m128i v12; // xmm1
signed int v13; // ecx
__m128i v... | func0:
ENDBR64
TEST ESI,ESI
JLE 0x001013b6
MOV EDX,ESI
PUSH R12
MOVSXD RAX,ESI
MOV R12D,ESI
SHR EDX,0x2
PUSH RBP
MOV R8,RDI
MOV R9D,ESI
SHL RDX,0x4
PUSH RBX
LEA R11D,[RSI + -0x1]
LEA RBX,[RDI + RAX*0x4]
ADD RDX,RDI
AND R12D,0xfffffffc
NOP dword ptr [RAX]
LAB_001012f8:
MOV ESI,dword ptr [RDI]
CMP R11D,0x2
JBE 0x001013b0... | /* func0(int*, int) */
int func0(int *param_1,int param_2)
{
int iVar1;
int iVar2;
int *piVar3;
int *piVar4;
int *piVar5;
bool bVar6;
int *piVar7;
uint uVar8;
int *piVar9;
byte bVar10;
byte bVar11;
byte bVar12;
byte bVar13;
if (param_2 < 1) {
return -1;
}
piVar9 = param_1;
do ... |
116 | func0 |
#include <iostream>
#include <string>
#include <assert.h>
| int func0(std::string s) {
int result = 0;
int n = s.length();
for (int i = 0; i < n; ++i) {
for (int j = 1; j <= n - i; ++j) {
std::string substr = s.substr(i, j);
if (substr[0] == substr[substr.length() - 1]) {
result += 1;
}
}
... | int main() {
assert(func0("abc") == 3);
assert(func0("abcda") == 6);
assert(func0("ab") == 2);
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 %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
movl $0x0,-0x50(%rbp)
mov -0x58(%rbp),%rax
mov %rax,%rdi
callq 22e0 <_... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 58h
mov [rbp+var_58], rdi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov [rbp+var_50], 0
mov rax, [rbp+var_58]
mov rdi, rax
call __ZNKSt7__cxx1112basic_strin... | long long func0(long long a1)
{
char v1; // bl
long long v2; // rax
unsigned int v4; // [rsp+10h] [rbp-50h]
int i; // [rsp+14h] [rbp-4Ch]
int j; // [rsp+18h] [rbp-48h]
int v7; // [rsp+1Ch] [rbp-44h]
_BYTE v8[40]; // [rsp+20h] [rbp-40h] BYREF
unsigned long long v9; // [rsp+48h] [rbp-18h]
v9 = __readf... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x58
MOV qword ptr [RBP + -0x58],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV dword ptr [RBP + -0x50],0x0
MOV RAX,qword ptr [RBP + -0x58]
MOV RDI,RAX
CALL 0x00101230
MOV dword ptr [RBP + -0x44],EAX
MOV dword ptr [RBP + -0x4c],0x0
JM... | /* func0(std::string) */
int func0(ulong param_1)
{
char cVar1;
int iVar2;
char *pcVar3;
long in_FS_OFFSET;
int local_58;
int local_54;
int local_50;
string local_48 [40];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
local_58 = 0;
iVar2 = std::string::length();
for (local_54 ... |
117 | func0 |
#include <iostream>
#include <string>
#include <assert.h>
| int func0(std::string s) {
int result = 0;
int n = s.length();
for (int i = 0; i < n; ++i) {
for (int j = 1; j <= n - i; ++j) {
std::string substr = s.substr(i, j);
if (substr[0] == substr[substr.length() - 1]) {
result += 1;
}
}
... | int main() {
assert(func0("abc") == 3);
assert(func0("abcda") == 6);
assert(func0("ab") == 2);
return 0;
}
| O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x48,%rsp
mov %fs:0x28,%rax
mov %rax,0x38(%rsp)
xor %eax,%eax
mov 0x8(%rdi),%rax
test %eax,%eax
jle 1351 <_Z5func0NSt7__cxx1112... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 48h
mov rax, fs:28h
mov [rsp+78h+var_40], rax
xor eax, eax
mov rax, [rdi+8]
test eax, eax
jle loc_1374
mov r12, rdi
mov [rsp+78h+var_6... | long long func0(_QWORD *a1)
{
unsigned long long v1; // rbp
unsigned int v2; // r15d
unsigned long long v3; // rbx
unsigned long long v4; // rcx
unsigned long long v5; // rcx
int v7; // [rsp+Ch] [rbp-6Ch]
void *v8[2]; // [rsp+10h] [rbp-68h] BYREF
_QWORD v9[11]; // [rsp+20h] [rbp-58h] BYREF
v9[3] = _... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x48
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RDI + 0x8]
TEST EAX,EAX
JLE 0x00101374
MOV R12,RDI
MOV dword ptr [RSP + 0xc],EAX
MOV EBP,0x0
MOV R15D,0x0
LEA R14,[RSP + 0x10]
JMP 0x00101359
LAB_00... | /* func0(std::string) */
int func0(long *param_1)
{
ulong uVar1;
ulong uVar2;
ulong uVar3;
int iVar4;
long in_FS_OFFSET;
int local_6c;
long *local_68;
long local_60;
long local_58 [3];
long local_40;
local_40 = *(long *)(in_FS_OFFSET + 0x28);
local_6c = (int)param_1[1];
if (local_6c < 1) ... |
118 | func0 |
#include <iostream>
#include <string>
#include <assert.h>
| int func0(std::string s) {
int result = 0;
int n = s.length();
for (int i = 0; i < n; ++i) {
for (int j = 1; j <= n - i; ++j) {
std::string substr = s.substr(i, j);
if (substr[0] == substr[substr.length() - 1]) {
result += 1;
}
}
... | int main() {
assert(func0("abc") == 3);
assert(func0("abcda") == 6);
assert(func0("ab") == 2);
return 0;
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x48,%rsp
mov 0x8(%rdi),%rdx
mov %fs:0x28,%rax
mov %rax,0x38(%rsp)
xor %eax,%eax
test %edx,%edx
jle 1537 <_Z5func0NSt7__cxx1112... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 68h
mov rbx, [rdi+8]
mov rax, fs:28h
mov [rsp+98h+var_40], rax
xor eax, eax
test ebx, ebx
jle loc_154E
lea eax, [rbx-1]
mov rbp, rdi
m... | long long func0(long long *a1)
{
unsigned long long v1; // rbx
int v3; // r12d
unsigned long long v4; // r15
unsigned long long v5; // r14
_QWORD *v6; // rax
long long v7; // r11
size_t v8; // rbx
_BYTE *v9; // r11
void *v10; // rax
_QWORD *v11; // rdi
_BYTE *src; // [rsp+0h] [rbp-98h]
unsigned... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x68
MOV RBX,qword ptr [RDI + 0x8]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x58],RAX
XOR EAX,EAX
TEST EBX,EBX
JLE 0x0010154e
LEA EAX,[RBX + -0x1]
MOV RBP,RDI
MOV R12D,EBX
XOR R15D,R15D
MOV qword ptr [RSP + 0x18],RAX
LEA RAX,[RSP + 0x3... | /* func0(std::string) */
int func0(long *param_1)
{
long lVar1;
int iVar2;
ulong uVar3;
ulong __n;
ulong uVar4;
ulong uVar5;
ulong uVar6;
long in_FS_OFFSET;
int local_8c;
ulong local_70;
ulong *local_68;
ulong local_60;
ulong local_58 [3];
long local_40;
uVar3 = param_1[1];
local_40... |
119 | func0 |
#include <iostream>
#include <string>
#include <assert.h>
| int func0(std::string s) {
int result = 0;
int n = s.length();
for (int i = 0; i < n; ++i) {
for (int j = 1; j <= n - i; ++j) {
std::string substr = s.substr(i, j);
if (substr[0] == substr[substr.length() - 1]) {
result += 1;
}
}
... | int main() {
assert(func0("abc") == 3);
assert(func0("abcda") == 6);
assert(func0("ab") == 2);
return 0;
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x68,%rsp
mov 0x8(%rdi),%r12
mov %fs:0x28,%rax
mov %rax,0x58(%rsp)
xor %eax,%eax
test %r12d,%r12d
jle 15d7 <_Z5func0NSt7__cxx11... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 68h
mov rbx, [rdi+8]
mov rax, fs:28h
mov [rsp+98h+var_40], rax
xor eax, eax
test ebx, ebx
jle loc_155E
lea eax, [rbx-1]
mov rbp, rdi
m... | long long func0(long long *a1)
{
unsigned long long v1; // rbx
int v3; // r12d
unsigned long long v4; // r15
unsigned long long v5; // r14
_QWORD *v6; // rax
long long v7; // r11
size_t v8; // rbx
_BYTE *v9; // r11
void *v10; // rax
_QWORD *v11; // rdi
_BYTE *src; // [rsp+0h] [rbp-98h]
unsigned... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x68
MOV RBX,qword ptr [RDI + 0x8]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x58],RAX
XOR EAX,EAX
TEST EBX,EBX
JLE 0x0010155e
LEA EAX,[RBX + -0x1]
MOV RBP,RDI
MOV R12D,EBX
XOR R15D,R15D
MOV qword ptr [RSP + 0x18],RAX
LEA RAX,[RSP + 0x3... | /* func0(std::string) */
int func0(long *param_1)
{
long lVar1;
int iVar2;
ulong uVar3;
ulong __n;
ulong uVar4;
ulong uVar5;
ulong uVar6;
long in_FS_OFFSET;
int local_8c;
ulong local_70;
ulong *local_68;
ulong local_60;
ulong local_58 [3];
long local_40;
uVar3 = param_1[1];
local_40... |
120 | func0 | #include <iostream>
#include <vector>
#include <queue>
#include <unordered_map>
#include <cassert>
using namespace std;
| vector<int> func0(const vector<vector<int>> &nums, int k) {
unordered_map<int, int> freq;
// Record order of first appearance
vector<int> order;
for (const auto &row : nums) {
for (int x : row) {
if (freq.find(x) == freq.end()) {
order.push_back(x);
... | int main(){
{
vector<vector<int>> input = {
{1, 2, 6},
{1, 3, 4, 5, 7, 8},
{1, 3, 5, 6, 8, 9},
{2, 5, 7, 11},
{1, 4, 7, 8, 12}
};
vector<int> res1 = func0(input, 3);
vector<int> expected1 = {5, 7, 1};
asse... | O0 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, int)::{lambda(std::pair<int, int> const&, std::pair<int, int> const&)#1}::operator()(std::pair<int, int> const&, std::pair<int, int> const&) const:
push %rbp
mov %rsp,%rbp
mov %rdi,-0x8(%r... | _ZZ5func0RKSt6vectorIS_IiSaIiEESaIS1_EEiENKUlRKSt4pairIiiES9_E_clES9_S9_:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_10]
mov edx, [rax]
mov rax, [rbp+var_18]
mov eax, [rax]
cmp edx, eax
jnz short loc_133F
mov ra... | bool func0(std::vector<std::vector<int>> const&,int)::{lambda(std::pair<int,int> const&,std::pair<int,int> const&)#1}::operator()(
long long a1,
int *a2,
int *a3)
{
int v3; // edx
int v4; // eax
if ( *a2 == *a3 )
{
v3 = a2[1];
v4 = a3[1];
}
else
{
v3 = *a2;
v4 = *... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x118
MOV qword ptr [RBP + -0x108],RDI
MOV qword ptr [RBP + -0x110],RSI
MOV dword ptr [RBP + -0x114],EDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x50]
MOV RDI,RAX
CALL 0x00102bf6
LEA RAX,[RBP + -0xb0]
MOV RDI,RAX
CALL 0... | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > > const&, int) */
vector * func0(vector *param_1,int param_2)
{
bool bVar1;
char cVar2;
int8 uVar3;
int4 *puVar4;
ulong uVar5;
int *piVar6;
long lVar7;
int in_EDX;
int4 in_register... |
121 | func0 | #include <iostream>
#include <vector>
#include <queue>
#include <unordered_map>
#include <cassert>
using namespace std;
| vector<int> func0(const vector<vector<int>> &nums, int k) {
unordered_map<int, int> freq;
// Record order of first appearance
vector<int> order;
for (const auto &row : nums) {
for (int x : row) {
if (freq.find(x) == freq.end()) {
order.push_back(x);
... | int main(){
{
vector<vector<int>> input = {
{1, 2, 6},
{1, 3, 4, 5, 7, 8},
{1, 3, 5, 6, 8, 9},
{2, 5, 7, 11},
{1, 4, 7, 8, 12}
};
vector<int> res1 = func0(input, 3);
vector<int> expected1 = {5, 7, 1};
asse... | O1 | cpp | void std::__push_heap<__gnu_cxx::__normal_iterator<std::pair<int, int>*, std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > >, long, std::pair<int, int>, __gnu_cxx::__ops::_Iter_comp_val<func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > ... | _ZSt11__push_heapIN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS3_SaIS3_EEEElS3_NS0_5__ops14_Iter_comp_valIZ5func0RKS5_IS5_IiSaIiEESaISC_EEiEUlRKS3_SI_E_EEEvT_T0_SM_T1_RT2_:
push rbx
mov r9, rdx
mov r10, rcx
mov r8d, ecx
mov r11, rcx
sar r11, 20h
mov ebx, r11d
lea rax, [rsi-1]
mov... | _DWORD * std::__push_heap<__gnu_cxx::__normal_iterator<std::pair<int,int> *,std::vector<std::pair<int,int>>>,long,std::pair<int,int>,__gnu_cxx::__ops::_Iter_comp_val<func0(std::vector const&<std::vector<int>,std::allocator<std::vector const&>>,int)::{lambda(std::pair<int,int> const&,std::pair<int,int> const&)#1}>>(
... | __push_heap<__normal_iterator<std::pair<int,int>*,std::vector<std::pair<int,int>,std::allocator<std::pair<int,int>>>>,long,std::pair<int,int>,__ops::_Iter_comp_val<func0(std::vector<std::vector<int,std::allocator<int>>,std::allocator<std::vector<int,std::allocator<int>>>>const&,int)::{lambda(std::pair<int,int>const&,st... | /* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* void std::__push_heap<__normal_iterator<std::pair<int, int>*, std::vector<std::pair<int, int>,
std::allocator<std::pair<int, int> > > >, long, std::pair<int, int>,
__ops::_Iter_comp_val<func0(std::vector<std::vector<int, std::allocato... |
122 | func0 | #include <iostream>
#include <vector>
#include <queue>
#include <unordered_map>
#include <cassert>
using namespace std;
| vector<int> func0(const vector<vector<int>> &nums, int k) {
unordered_map<int, int> freq;
// Record order of first appearance
vector<int> order;
for (const auto &row : nums) {
for (int x : row) {
if (freq.find(x) == freq.end()) {
order.push_back(x);
... | int main(){
{
vector<vector<int>> input = {
{1, 2, 6},
{1, 3, 4, 5, 7, 8},
{1, 3, 5, 6, 8, 9},
{2, 5, 7, 11},
{1, 4, 7, 8, 12}
};
vector<int> res1 = func0(input, 3);
vector<int> expected1 = {5, 7, 1};
asse... | O2 | cpp | void std::__push_heap<__gnu_cxx::__normal_iterator<std::pair<int, int>*, std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > >, long, std::pair<int, int>, __gnu_cxx::__ops::_Iter_comp_val<func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > ... | _ZSt11__push_heapIN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS3_SaIS3_EEEElS3_NS0_5__ops14_Iter_comp_valIZ5func0RKS5_IS5_IiSaIiEESaISC_EEiEUlRKS3_SI_E_EEEvT_T0_SM_T1_RT2__isra_0:
lea rax, [rsi-1]
mov r8, rdx
movq xmm1, rcx
mov r9d, ecx
mov rdx, rax
pshufd xmm3, xmm1, 0E5h
movd r10d, xmm... | long long std::__push_heap<__gnu_cxx::__normal_iterator<std::pair<int,int> *,std::vector<std::pair<int,int>>>,long,std::pair<int,int>,__gnu_cxx::__ops::_Iter_comp_val<func0(std::vector const&<std::vector<int>,std::allocator<std::vector const&>>,int)::{lambda(std::pair<int,int> const&,std::pair<int,int> const&)#1}>>(
... | __push_heap<__normal_iterator<std::pair<int,int>*,std::vector<std::pair<int,int>,std::allocator<std::pair<int,int>>>>,long,std::pair<int,int>,__ops::_Iter_comp_val<func0(std::vector<std::vector<int,std::allocator<int>>,std::allocator<std::vector<int,std::allocator<int>>>>const&,int)::{lambda(std::pair<int,int>const&,st... | /* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* void std::__push_heap<__normal_iterator<std::pair<int, int>*, std::vector<std::pair<int, int>,
std::allocator<std::pair<int, int> > > >, long, std::pair<int, int>,
__ops::_Iter_comp_val<func0(std::vector<std::vector<int, std::allocato... |
123 | func0 | #include <iostream>
#include <vector>
#include <queue>
#include <unordered_map>
#include <cassert>
using namespace std;
| vector<int> func0(const vector<vector<int>> &nums, int k) {
unordered_map<int, int> freq;
// Record order of first appearance
vector<int> order;
for (const auto &row : nums) {
for (int x : row) {
if (freq.find(x) == freq.end()) {
order.push_back(x);
... | int main(){
{
vector<vector<int>> input = {
{1, 2, 6},
{1, 3, 4, 5, 7, 8},
{1, 3, 5, 6, 8, 9},
{2, 5, 7, 11},
{1, 4, 7, 8, 12}
};
vector<int> res1 = func0(input, 3);
vector<int> expected1 = {5, 7, 1};
asse... | O3 | cpp | void std::__adjust_heap<__gnu_cxx::__normal_iterator<std::pair<int, int>*, std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > >, long, std::pair<int, int>, __gnu_cxx::__ops::_Iter_comp_iter<func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int>... | _ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS3_SaIS3_EEEElS3_NS0_5__ops15_Iter_comp_iterIZ5func0RKS5_IS5_IiSaIiEESaISC_EEiEUlRKS3_SI_E_EEEvT_T0_SM_T1_T2__isra_0:
lea rax, [rdx-1]
push rbx
mov r8, rsi
mov r11, rdx
mov r10, rax
movq xmm0, rcx
shr r10, 3Fh
add r10... | _DWORD * std::__adjust_heap<__gnu_cxx::__normal_iterator<std::pair<int,int> *,std::vector<std::pair<int,int>>>,long,std::pair<int,int>,__gnu_cxx::__ops::_Iter_comp_iter<func0(std::vector const&<std::vector<int>,std::allocator<std::vector const&>>,int)::{lambda(std::pair<int,int> const&,std::pair<int,int> const&)#1}>>(
... | __adjust_heap<__normal_iterator<std::pair<int,int>*,std::vector<std::pair<int,int>,std::allocator<std::pair<int,int>>>>,long,std::pair<int,int>,__ops::_Iter_comp_iter<func0(std::vector<std::vector<int,std::allocator<int>>,std::allocator<std::vector<int,std::allocator<int>>>>const&,int)::{lambda(std::pair<int,int>const&... | /* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* void std::__adjust_heap<__normal_iterator<std::pair<int, int>*, std::vector<std::pair<int, int>,
std::allocator<std::pair<int, int> > > >, long, std::pair<int, int>,
__ops::_Iter_comp_iter<func0(std::vector<std::vector<int, std::alloc... |
124 | func0 |
#include <iostream>
#include <cmath>
#include <assert.h>
| int func0(int n) {
int maxPrime = -1;
while (n % 2 == 0) {
maxPrime = 2;
n >>= 1;
}
for (int i = 3; i <= sqrt(n); i += 2) {
while (n % i == 0) {
maxPrime = i;
n = n / i;
}
}
if (n > 2) {
maxPrime = n;
}
return... | int main() {
assert(func0(15) == 5);
assert(func0(6) == 3);
assert(func0(2) == 2);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x20,%rsp
mov %edi,-0x14(%rbp)
movl $0xffffffff,-0x8(%rbp)
mov -0x14(%rbp),%eax
and $0x1,%eax
test %eax,%eax
jne 11d5 <_Z5func0i+0x2c>
movl $0x2,-0x8(%rbp)
sarl -0x14(%rbp)
jmp 11bf <_Z5func0i+0x16>
movl $0x3,-0x4(%rbp)
cvtsi2sdl -0x4(%rb... | _Z5func0i:
endbr64
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_14], edi
mov [rbp+var_8], 0FFFFFFFFh
jmp short loc_118B
loc_1181:
mov [rbp+var_8], 2
sar [rbp+var_14], 1
loc_118B:
mov eax, [rbp+var_14]
and eax, 1
test eax, eax
jz short loc_1181
mov [rbp+var_4], 3
jmp... | long long func0(int a1)
{
unsigned int v3; // [rsp+18h] [rbp-8h]
int i; // [rsp+1Ch] [rbp-4h]
v3 = -1;
while ( (a1 & 1) == 0 )
{
v3 = 2;
a1 >>= 1;
}
for ( i = 3; sqrt((double)a1) >= (double)i; i += 2 )
{
while ( !(a1 % i) )
{
v3 = i;
a1 /= i;
}
}
if ( a1 > 2 )
r... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0x14],EDI
MOV dword ptr [RBP + -0x8],0xffffffff
JMP 0x0010118b
LAB_00101181:
MOV dword ptr [RBP + -0x8],0x2
SAR dword ptr [RBP + -0x14],0x1
LAB_0010118b:
MOV EAX,dword ptr [RBP + -0x14]
AND EAX,0x1
TEST EAX,EAX
JZ 0x00101181
MOV dword ptr [RBP + -0x... | /* func0(int) */
uint func0(int param_1)
{
double dVar1;
int4 local_1c;
int4 local_10;
int4 local_c;
local_10 = 0xffffffff;
for (local_1c = param_1; (local_1c & 1) == 0; local_1c = (int)local_1c >> 1) {
local_10 = 2;
}
local_c = 3;
while( true ) {
dVar1 = sqrt((double)(int)local_1c);
... |
125 | func0 |
#include <iostream>
#include <cmath>
#include <assert.h>
| int func0(int n) {
int maxPrime = -1;
while (n % 2 == 0) {
maxPrime = 2;
n >>= 1;
}
for (int i = 3; i <= sqrt(n); i += 2) {
while (n % i == 0) {
maxPrime = i;
n = n / i;
}
}
if (n > 2) {
maxPrime = n;
}
return... | int main() {
assert(func0(15) == 5);
assert(func0(6) == 3);
assert(func0(2) == 2);
return 0;
}
| O1 | cpp | func0(int):
endbr64
push %r12
push %rbp
push %rbx
sub $0x10,%rsp
mov %edi,%ebx
mov $0xffffffff,%r12d
test $0x1,%dil
jne 11d0 <_Z5func0i+0x27>
sar %ebx
test $0x1,%bl
je 11c3 <_Z5func0i+0x1a>
mov $0x2,%r12d
mov $0x3,%ebp
jmp 11e1 <_Z5func0i+0x38>
callq 1090 <sqrt@plt>
jmp 120e <_... | _Z5func0i:
endbr64
push r13
push r12
push rbp
push rbx
sub rsp, 18h
mov ebx, edi
test dil, 1
jnz short loc_1199
loc_117F:
sar ebx, 1
test bl, 1
jz short loc_117F
mov r13d, 2
loc_118C:
mov ebp, 3
mov r12d, 0
jmp short loc_11B5
loc_1199:
mov r13d, 0FFFFFFFFh
jmp ... | long long func0(int a1)
{
int v1; // ebx
unsigned int v2; // r13d
int i; // ebp
double v4; // xmm0_8
double v5; // xmm0_8
v1 = a1;
if ( (a1 & 1) != 0 )
{
v2 = -1;
}
else
{
do
v1 >>= 1;
while ( (v1 & 1) == 0 );
v2 = 2;
}
for ( i = 3; ; i += 2 )
{
v4 = (double)v1;
... | func0:
ENDBR64
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x18
MOV EBX,EDI
TEST DIL,0x1
JNZ 0x00101199
LAB_0010117f:
SAR EBX,0x1
TEST BL,0x1
JZ 0x0010117f
MOV R13D,0x2
LAB_0010118c:
MOV EBP,0x3
MOV R12D,0x0
JMP 0x001011b5
LAB_00101199:
MOV R13D,0xffffffff
JMP 0x0010118c
LAB_001011a1:
MOV EAX,EBX
CDQ
IDIV EBP
MOV EBX,E... | /* func0(int) */
uint func0(int param_1)
{
long lVar1;
int iVar2;
uint uVar3;
uint uVar4;
double dVar5;
if ((param_1 & 1U) == 0) {
do {
param_1 = param_1 >> 1;
} while ((param_1 & 1U) == 0);
uVar4 = 2;
}
else {
uVar4 = 0xffffffff;
}
uVar3 = 3;
while( true ) {
dVar5 =... |
126 | func0 |
#include <iostream>
#include <cmath>
#include <assert.h>
| int func0(int n) {
int maxPrime = -1;
while (n % 2 == 0) {
maxPrime = 2;
n >>= 1;
}
for (int i = 3; i <= sqrt(n); i += 2) {
while (n % i == 0) {
maxPrime = i;
n = n / i;
}
}
if (n > 2) {
maxPrime = n;
}
return... | int main() {
assert(func0(15) == 5);
assert(func0(6) == 3);
assert(func0(2) == 2);
return 0;
}
| O2 | cpp | func0(int):
endbr64
push %r12
mov $0xffffffff,%r12d
push %rbx
sub $0x28,%rsp
test $0x1,%dil
jne 12be <_Z5func0i+0x2e>
nopw 0x0(%rax,%rax,1)
sar %edi
test $0x1,%dil
je 12b0 <_Z5func0i+0x20>
mov $0x2,%r12d
pxor %xmm1,%xmm1
mov $0x3,%ebx
pxor %xmm4,%xmm4
cvtsi2sd %edi,%xmm1
ucomisd %xmm... | _Z5func0i:
endbr64
push rbp
push rbx
sub rsp, 28h
test dil, 1
jnz short loc_1297
loc_1220:
sar edi, 1
test dil, 1
jz short loc_1220
mov ebp, 2
loc_122D:
pxor xmm1, xmm1
mov ebx, 3
pxor xmm3, xmm3
cvtsi2sd xmm1, edi
xchg ax, ax
loc_1240:
ucomisd xmm3, xmm1
pxor xmm2, xmm2... | long long func0(int a1)
{
unsigned int v1; // ebp
int v2; // ebx
double v3; // xmm1_8
double v4; // xmm2_8
double v5; // xmm0_8
int v6; // edx
if ( (a1 & 1) != 0 )
{
v1 = -1;
}
else
{
do
a1 >>= 1;
while ( (a1 & 1) == 0 );
v1 = 2;
}
v2 = 3;
v3 = (double)a1;
while ( 1... | func0:
ENDBR64
PUSH RBP
PUSH RBX
SUB RSP,0x28
TEST DIL,0x1
JNZ 0x00101297
LAB_00101220:
SAR EDI,0x1
TEST DIL,0x1
JZ 0x00101220
MOV EBP,0x2
LAB_0010122d:
PXOR XMM1,XMM1
MOV EBX,0x3
PXOR XMM3,XMM3
CVTSI2SD XMM1,EDI
NOP
LAB_00101240:
UCOMISD XMM3,XMM1
PXOR XMM2,XMM2
CVTSI2SD XMM2,EBX
JA 0x0010129e
MOVAPD XMM0,XMM1
SQRTSD ... | /* func0(int) */
uint func0(int param_1)
{
long lVar1;
uint uVar2;
uint uVar3;
double dVar4;
double __x;
if ((param_1 & 1U) == 0) {
do {
param_1 = param_1 >> 1;
} while ((param_1 & 1U) == 0);
uVar3 = 2;
}
else {
uVar3 = 0xffffffff;
}
uVar2 = 3;
__x = (double)param_1;
w... |
127 | func0 |
#include <iostream>
#include <cmath>
#include <assert.h>
| int func0(int n) {
int maxPrime = -1;
while (n % 2 == 0) {
maxPrime = 2;
n >>= 1;
}
for (int i = 3; i <= sqrt(n); i += 2) {
while (n % i == 0) {
maxPrime = i;
n = n / i;
}
}
if (n > 2) {
maxPrime = n;
}
return... | int main() {
assert(func0(15) == 5);
assert(func0(6) == 3);
assert(func0(2) == 2);
return 0;
}
| O3 | cpp | func0(int):
endbr64
push %r12
mov $0xffffffff,%r12d
push %rbx
sub $0x28,%rsp
test $0x1,%dil
jne 12be <_Z5func0i+0x2e>
nopw 0x0(%rax,%rax,1)
sar %edi
test $0x1,%dil
je 12b0 <_Z5func0i+0x20>
mov $0x2,%r12d
pxor %xmm1,%xmm1
mov $0x3,%ebx
pxor %xmm4,%xmm4
cvtsi2sd %edi,%xmm1
ucomisd %xmm... | _Z5func0i:
endbr64
push rbp
push rbx
sub rsp, 28h
test dil, 1
jnz short loc_1297
loc_1220:
sar edi, 1
test dil, 1
jz short loc_1220
mov ebp, 2
loc_122D:
pxor xmm1, xmm1
mov ebx, 3
pxor xmm3, xmm3
cvtsi2sd xmm1, edi
xchg ax, ax
loc_1240:
ucomisd xmm3, xmm1
pxor xmm2, xmm2... | long long func0(int a1)
{
unsigned int v1; // ebp
int v2; // ebx
double v3; // xmm1_8
double v4; // xmm2_8
double v5; // xmm0_8
int v6; // edx
if ( (a1 & 1) != 0 )
{
v1 = -1;
}
else
{
do
a1 >>= 1;
while ( (a1 & 1) == 0 );
v1 = 2;
}
v2 = 3;
v3 = (double)a1;
while ( 1... | func0:
ENDBR64
PUSH RBP
PUSH RBX
SUB RSP,0x28
TEST DIL,0x1
JNZ 0x00101297
LAB_00101220:
SAR EDI,0x1
TEST DIL,0x1
JZ 0x00101220
MOV EBP,0x2
LAB_0010122d:
PXOR XMM1,XMM1
MOV EBX,0x3
PXOR XMM3,XMM3
CVTSI2SD XMM1,EDI
NOP
LAB_00101240:
UCOMISD XMM3,XMM1
PXOR XMM2,XMM2
CVTSI2SD XMM2,EBX
JA 0x0010129e
MOVAPD XMM0,XMM1
SQRTSD ... | /* func0(int) */
uint func0(int param_1)
{
long lVar1;
uint uVar2;
uint uVar3;
double dVar4;
double __x;
if ((param_1 & 1U) == 0) {
do {
param_1 = param_1 >> 1;
} while ((param_1 & 1U) == 0);
uVar3 = 2;
}
else {
uVar3 = 0xffffffff;
}
uVar2 = 3;
__x = (double)param_1;
w... |
128 | func0 |
#include <iostream>
#include <cmath>
#include <assert.h>
| int func0(int N) {
int B_Number = 0;
int cnt = 0;
while (N != 0) {
int rem = N % 2;
int c = pow(10, cnt);
B_Number += rem * c;
N /= 2;
cnt += 1;
}
return B_Number;
}
| int main() {
assert(func0(10) == 1010);
assert(func0(1) == 1);
assert(func0(20) == 10100);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x20,%rsp
mov %edi,-0x14(%rbp)
movl $0x0,-0x10(%rbp)
movl $0x0,-0xc(%rbp)
cmpl $0x0,-0x14(%rbp)
je 121d <_Z5func0i+0x74>
mov -0x14(%rbp),%eax
cltd
shr $0x1f,%edx
add %edx,%eax
and $0x1,%eax
sub %edx,%eax
mov %eax,-0x8(%rbp)
cvtsi2sd... | _Z5func0i:
endbr64
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_14], edi
mov [rbp+var_10], 0
mov [rbp+var_C], 0
jmp short loc_11DF
loc_1188:
mov edx, [rbp+var_14]
mov eax, edx
sar eax, 1Fh
shr eax, 1Fh
add edx, eax
and edx, 1
sub edx, eax
mov [rbp+var_8], ed... | long long func0(int a1)
{
unsigned int v3; // [rsp+10h] [rbp-10h]
int v4; // [rsp+14h] [rbp-Ch]
v3 = 0;
v4 = 0;
while ( a1 )
{
v3 += (int)pow(10.0, (double)v4) * (a1 % 2);
a1 /= 2;
++v4;
}
return v3;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0x14],EDI
MOV dword ptr [RBP + -0x10],0x0
MOV dword ptr [RBP + -0xc],0x0
JMP 0x001011df
LAB_00101188:
MOV EDX,dword ptr [RBP + -0x14]
MOV EAX,EDX
SAR EAX,0x1f
SHR EAX,0x1f
ADD EDX,EAX
AND EDX,0x1
SUB EDX,EAX
MOV dword ptr [RBP + -0x8],EDX
PXOR XMM0,... | /* func0(int) */
int func0(int param_1)
{
double dVar1;
int4 local_1c;
int4 local_18;
int4 local_14;
local_18 = 0;
local_14 = 0;
for (local_1c = param_1; local_1c != 0; local_1c = local_1c / 2) {
dVar1 = pow(DAT_00102070,(double)local_14);
local_18 = local_18 + (local_1c % 2) * (int)dVar1;
... |
129 | func0 |
#include <iostream>
#include <cmath>
#include <assert.h>
| int func0(int N) {
int B_Number = 0;
int cnt = 0;
while (N != 0) {
int rem = N % 2;
int c = pow(10, cnt);
B_Number += rem * c;
N /= 2;
cnt += 1;
}
return B_Number;
}
| int main() {
assert(func0(10) == 1010);
assert(func0(1) == 1);
assert(func0(20) == 10100);
return 0;
}
| O1 | cpp | func0(int):
endbr64
push %r12
push %rbp
push %rbx
mov %edi,%ebx
test %edi,%edi
je 120c <_Z5func0i+0x63>
mov $0x0,%ebp
mov $0x0,%r12d
pxor %xmm1,%xmm1
cvtsi2sd %ebp,%xmm1
mov 0xebf(%rip),%rax
movq %rax,%xmm0
callq 10b0 <pow@plt>
mov %ebx,%edx
shr $0x1f,%edx
lea (%rbx,%rdx,1),%eax
an... | _Z5func0i:
endbr64
push r12
push rbp
push rbx
mov ebx, edi
test edi, edi
jz short loc_11C8
mov ebp, 0
mov r12d, 0
loc_1182:
pxor xmm1, xmm1
cvtsi2sd xmm1, ebp; y
movsd xmm0, cs:x; x
call _pow
mov edx, ebx
shr edx, 1Fh
lea eax, [rbx+rdx]
and eax, 1
sub eax, edx
cv... | long long func0(int a1)
{
int v1; // ebx
int v2; // ebp
unsigned int v3; // r12d
v1 = a1;
if ( a1 )
{
v2 = 0;
v3 = 0;
do
{
v3 += (int)pow(10.0, (double)v2) * (v1 % 2);
v1 /= 2;
++v2;
}
while ( v1 );
}
else
{
return 0;
}
return v3;
} | func0:
ENDBR64
PUSH R12
PUSH RBP
PUSH RBX
MOV EBX,EDI
TEST EDI,EDI
JZ 0x001011c8
MOV EBP,0x0
MOV R12D,0x0
LAB_00101182:
PXOR XMM1,XMM1
CVTSI2SD XMM1,EBP
MOVSD XMM0,qword ptr [0x00102068]
CALL 0x00101070
MOV EDX,EBX
SHR EDX,0x1f
LEA EAX,[RBX + RDX*0x1]
AND EAX,0x1
SUB EAX,EDX
CVTTSD2SI EDX,XMM0
IMUL EAX,EDX
ADD R12D,EAX... | /* func0(int) */
int func0(int param_1)
{
int iVar1;
int iVar2;
double dVar3;
if (param_1 == 0) {
iVar2 = 0;
}
else {
iVar1 = 0;
iVar2 = 0;
do {
dVar3 = pow(DAT_00102068,(double)iVar1);
iVar2 = iVar2 + (param_1 % 2) * (int)dVar3;
param_1 = param_1 / 2;
iVar1 = iV... |
130 | func0 |
#include <iostream>
#include <cmath>
#include <assert.h>
| int func0(int N) {
int B_Number = 0;
int cnt = 0;
while (N != 0) {
int rem = N % 2;
int c = pow(10, cnt);
B_Number += rem * c;
N /= 2;
cnt += 1;
}
return B_Number;
}
| int main() {
assert(func0(10) == 1010);
assert(func0(1) == 1);
assert(func0(20) == 10100);
return 0;
}
| O2 | cpp | func0(int):
endbr64
push %r12
push %rbp
push %rbx
test %edi,%edi
je 12f0 <_Z5func0i+0x60>
mov %edi,%ebx
xor %ebp,%ebp
xor %r12d,%r12d
nopl 0x0(%rax,%rax,1)
pxor %xmm1,%xmm1
mov 0xddd(%rip),%rax
cvtsi2sd %ebp,%xmm1
add $0x1,%ebp
movq %rax,%xmm0
callq 10b0 <pow@plt>
mov %ebx,%edx
mov ... | _Z5func0i:
endbr64
push r12
push rbp
push rbx
test edi, edi
jz short loc_1270
mov ebx, edi
xor r12d, r12d
xor ebp, ebp
nop dword ptr [rax+rax+00h]
loc_1228:
pxor xmm1, xmm1
movsd xmm0, cs:x; x
cvtsi2sd xmm1, r12d; y
add r12d, 1
call _pow
mov edx, ebx
shr edx, 1Fh
lea... | long long func0(int a1)
{
int v1; // ebx
int v2; // r12d
unsigned int v3; // ebp
double v4; // xmm1_8
if ( !a1 )
return 0LL;
v1 = a1;
v2 = 0;
v3 = 0;
do
{
v4 = (double)v2++;
v3 += (int)pow(10.0, v4) * (v1 % 2);
v1 /= 2;
}
while ( v1 );
return v3;
} | func0:
ENDBR64
PUSH R12
PUSH RBP
PUSH RBX
TEST EDI,EDI
JZ 0x00101270
MOV EBX,EDI
XOR R12D,R12D
XOR EBP,EBP
NOP dword ptr [RAX + RAX*0x1]
LAB_00101228:
PXOR XMM1,XMM1
MOVSD XMM0,qword ptr [0x00102068]
CVTSI2SD XMM1,R12D
ADD R12D,0x1
CALL 0x00101070
MOV EDX,EBX
SHR EDX,0x1f
LEA EAX,[RBX + RDX*0x1]
AND EAX,0x1
SUB EAX,EDX... | /* func0(int) */
int func0(int param_1)
{
int iVar1;
int iVar2;
double dVar3;
if (param_1 != 0) {
iVar2 = 0;
iVar1 = 0;
do {
dVar3 = (double)iVar2;
iVar2 = iVar2 + 1;
dVar3 = pow(DAT_00102068,dVar3);
iVar1 = iVar1 + (param_1 % 2) * (int)dVar3;
param_1 = param_1 / 2... |
131 | func0 |
#include <iostream>
#include <cmath>
#include <assert.h>
| int func0(int N) {
int B_Number = 0;
int cnt = 0;
while (N != 0) {
int rem = N % 2;
int c = pow(10, cnt);
B_Number += rem * c;
N /= 2;
cnt += 1;
}
return B_Number;
}
| int main() {
assert(func0(10) == 1010);
assert(func0(1) == 1);
assert(func0(20) == 10100);
return 0;
}
| O3 | cpp | func0(int):
endbr64
push %r12
push %rbp
push %rbx
test %edi,%edi
je 12f0 <_Z5func0i+0x60>
mov %edi,%ebx
xor %ebp,%ebp
xor %r12d,%r12d
nopl 0x0(%rax,%rax,1)
pxor %xmm1,%xmm1
mov 0xddd(%rip),%rax
cvtsi2sd %ebp,%xmm1
add $0x1,%ebp
movq %rax,%xmm0
callq 10b0 <pow@plt>
mov %ebx,%edx
mov ... | _Z5func0i:
endbr64
push r12
push rbp
push rbx
test edi, edi
jz short loc_1270
mov ebx, edi
xor r12d, r12d
xor ebp, ebp
nop dword ptr [rax+rax+00h]
loc_1228:
pxor xmm1, xmm1
movsd xmm0, cs:x; x
cvtsi2sd xmm1, r12d; y
add r12d, 1
call _pow
mov edx, ebx
shr edx, 1Fh
lea... | long long func0(int a1)
{
int v1; // ebx
int v2; // r12d
unsigned int v3; // ebp
double v4; // xmm1_8
if ( !a1 )
return 0LL;
v1 = a1;
v2 = 0;
v3 = 0;
do
{
v4 = (double)v2++;
v3 += (int)pow(10.0, v4) * (v1 % 2);
v1 /= 2;
}
while ( v1 );
return v3;
} | func0:
ENDBR64
PUSH R12
PUSH RBP
PUSH RBX
TEST EDI,EDI
JZ 0x00101270
MOV EBX,EDI
XOR R12D,R12D
XOR EBP,EBP
NOP dword ptr [RAX + RAX*0x1]
LAB_00101228:
PXOR XMM1,XMM1
MOVSD XMM0,qword ptr [0x00102070]
CVTSI2SD XMM1,R12D
ADD R12D,0x1
CALL 0x00101070
MOV EDX,EBX
SHR EDX,0x1f
LEA EAX,[RBX + RDX*0x1]
AND EAX,0x1
SUB EAX,EDX... | /* func0(int) */
int func0(int param_1)
{
int iVar1;
int iVar2;
double dVar3;
if (param_1 != 0) {
iVar2 = 0;
iVar1 = 0;
do {
dVar3 = (double)iVar2;
iVar2 = iVar2 + 1;
dVar3 = pow(DAT_00102070,dVar3);
iVar1 = iVar1 + (param_1 % 2) * (int)dVar3;
param_1 = param_1 / 2... |
132 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int ar[], int N) {
int l = 0;
int r = N - 1;
while (l <= r) {
int mid = (l + r) / 2;
if (ar[mid] != mid + 1 && ar[mid - 1] == mid) {
return mid + 1;
} else if (ar[mid] != mid + 1) {
r = mid - 1;
} else {
l = mid + 1;
... | int main() {
int arr1[] = {1, 2, 3, 5};
int arr2[] = {1, 3, 4, 5};
int arr3[] = {1, 2, 3, 5, 6, 7};
assert(func0(arr1, 4) == 4);
assert(func0(arr2, 4) == 2);
assert(func0(arr3, 5) == 4);
return 0;
}
| O0 | cpp | func0(int*, int):
endbr64
push %rbp
mov %rsp,%rbp
mov %rdi,-0x18(%rbp)
mov %esi,-0x1c(%rbp)
movl $0x0,-0xc(%rbp)
mov -0x1c(%rbp),%eax
sub $0x1,%eax
mov %eax,-0x8(%rbp)
mov -0xc(%rbp),%eax
cmp -0x8(%rbp),%eax
jg 1267 <_Z5func0Pii+0xbe>
mov -0xc(%rbp),%edx
mov -0x8(%rbp),%eax
add ... | _Z5func0Pii:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_18], rdi
mov [rbp+var_1C], esi
mov [rbp+var_C], 0
mov eax, [rbp+var_1C]
sub eax, 1
mov [rbp+var_8], eax
jmp loc_1218
loc_118D:
mov edx, [rbp+var_C]
mov eax, [rbp+var_8]
add eax, edx
mov edx, eax
shr edx, 1Fh
a... | long long func0(int *a1, int a2)
{
int v3; // [rsp+10h] [rbp-Ch]
int v4; // [rsp+14h] [rbp-8h]
int v5; // [rsp+18h] [rbp-4h]
v3 = 0;
v4 = a2 - 1;
while ( v3 <= v4 )
{
v5 = (v3 + v4) / 2;
if ( a1[v5] != v5 + 1 && v5 == a1[v5 - 1] )
return (unsigned int)(v5 + 1);
if ( a1[v5] == v5 + 1 )
... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x1c],ESI
MOV dword ptr [RBP + -0xc],0x0
MOV EAX,dword ptr [RBP + -0x1c]
SUB EAX,0x1
MOV dword ptr [RBP + -0x8],EAX
JMP 0x00101218
LAB_0010118d:
MOV EDX,dword ptr [RBP + -0xc]
MOV EAX,dword ptr [RBP + -0x8]
ADD EAX,EDX
MOV EDX,EAX... | /* func0(int*, int) */
int func0(int *param_1,int param_2)
{
int iVar1;
int local_14;
int local_10;
local_14 = 0;
local_10 = param_2 + -1;
while( true ) {
if (local_10 < local_14) {
return -1;
}
iVar1 = (local_10 + local_14) / 2;
if ((param_1[iVar1] != iVar1 + 1) && (iVar1 == para... |
133 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int ar[], int N) {
int l = 0;
int r = N - 1;
while (l <= r) {
int mid = (l + r) / 2;
if (ar[mid] != mid + 1 && ar[mid - 1] == mid) {
return mid + 1;
} else if (ar[mid] != mid + 1) {
r = mid - 1;
} else {
l = mid + 1;
... | int main() {
int arr1[] = {1, 2, 3, 5};
int arr2[] = {1, 3, 4, 5};
int arr3[] = {1, 2, 3, 5, 6, 7};
assert(func0(arr1, 4) == 4);
assert(func0(arr2, 4) == 2);
assert(func0(arr3, 5) == 4);
return 0;
}
| O1 | cpp | func0(int*, int):
endbr64
sub $0x1,%esi
mov $0x0,%ecx
jmp 11b9 <_Z5func0Pii+0x10>
mov %eax,%ecx
cmp %ecx,%esi
jl 11ec <_Z5func0Pii+0x43>
lea (%rsi,%rcx,1),%edx
mov %edx,%eax
shr $0x1f,%eax
add %edx,%eax
sar %eax
mov %eax,%r8d
movslq %eax,%rdx
lea 0x0(,%rdx,4),%r9
add $0x1,%eax... | _Z5func0Pii:
endbr64
sub esi, 1
mov ecx, 0
jmp short loc_117A
loc_1177:
mov ecx, r8d
loc_117A:
cmp esi, ecx
jl short loc_11AB
lea edx, [rsi+rcx]
mov eax, edx
shr eax, 1Fh
add eax, edx
sar eax, 1
movsxd rdx, eax
lea r9, ds:0[rdx*4]
lea r8d, [rax+1]
cmp [rdi+rdx*4... | long long func0(int *a1, int a2)
{
int v2; // esi
int v3; // ecx
int v4; // eax
unsigned int v5; // r8d
v2 = a2 - 1;
v3 = 0;
while ( v2 >= v3 )
{
v4 = (v2 + v3) / 2;
v5 = v4 + 1;
if ( a1[v4] == v4 + 1 )
{
v3 = v4 + 1;
}
else
{
if ( a1[v4 - 1] == v4 )
ret... | func0:
ENDBR64
SUB ESI,0x1
MOV ECX,0x0
JMP 0x0010117a
LAB_00101177:
MOV ECX,R8D
LAB_0010117a:
CMP ESI,ECX
JL 0x001011ab
LEA EDX,[RSI + RCX*0x1]
MOV EAX,EDX
SHR EAX,0x1f
ADD EAX,EDX
SAR EAX,0x1
MOVSXD RDX,EAX
LEA R9,[RDX*0x4]
LEA R8D,[RAX + 0x1]
CMP dword ptr [RDI + RDX*0x4],R8D
JZ 0x00101177
CMP dword ptr [RDI + R9*0x1... | /* func0(int*, int) */
int func0(int *param_1,int param_2)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
iVar4 = param_2 + -1;
iVar1 = 0;
while( true ) {
do {
iVar3 = iVar1;
if (iVar4 < iVar3) {
return -1;
}
iVar2 = (iVar4 + iVar3) / 2;
iVar1 = iVar2 + 1;
... |
134 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int ar[], int N) {
int l = 0;
int r = N - 1;
while (l <= r) {
int mid = (l + r) / 2;
if (ar[mid] != mid + 1 && ar[mid - 1] == mid) {
return mid + 1;
} else if (ar[mid] != mid + 1) {
r = mid - 1;
} else {
l = mid + 1;
... | int main() {
int arr1[] = {1, 2, 3, 5};
int arr2[] = {1, 3, 4, 5};
int arr3[] = {1, 2, 3, 5, 6, 7};
assert(func0(arr1, 4) == 4);
assert(func0(arr2, 4) == 2);
assert(func0(arr3, 5) == 4);
return 0;
}
| O2 | cpp | func0(int*, int):
endbr64
sub $0x1,%esi
xor %ecx,%ecx
nopl 0x0(%rax)
cmp %ecx,%esi
jl 1378 <_Z5func0Pii+0x48>
lea (%rsi,%rcx,1),%edx
mov %edx,%eax
shr $0x1f,%eax
add %edx,%eax
sar %eax
movslq %eax,%rdx
lea 0x1(%rax),%r8d
lea 0x0(,%rdx,4),%r9
cmp %r8d,(%rdi,%rdx,4)
je 1388 <_Z5... | _Z5func0Pii:
endbr64
sub esi, 1
xor ecx, ecx
nop dword ptr [rax+00000000h]
loc_1280:
cmp esi, ecx
jl short loc_12B8
loc_1284:
lea edx, [rsi+rcx]
mov eax, edx
shr eax, 1Fh
add eax, edx
sar eax, 1
movsxd rdx, eax
lea r8d, [rax+1]
lea r9, ds:0[rdx*4]
cmp [rdi+rdx*4], r... | long long func0(int *a1, int a2)
{
int v2; // esi
int i; // ecx
int v4; // eax
unsigned int v5; // r8d
v2 = a2 - 1;
for ( i = 0; v2 >= i; i = v4 + 1 )
{
while ( 1 )
{
v4 = (v2 + i) / 2;
v5 = v4 + 1;
if ( a1[v4] == v4 + 1 )
break;
if ( a1[v4 - 1] == v4 )
re... | func0:
ENDBR64
SUB ESI,0x1
XOR ECX,ECX
NOP dword ptr [RAX]
LAB_00101280:
CMP ESI,ECX
JL 0x001012b8
LAB_00101284:
LEA EDX,[RSI + RCX*0x1]
MOV EAX,EDX
SHR EAX,0x1f
ADD EAX,EDX
SAR EAX,0x1
MOVSXD RDX,EAX
LEA R8D,[RAX + 0x1]
LEA R9,[RDX*0x4]
CMP dword ptr [RDI + RDX*0x4],R8D
JZ 0x001012c8
CMP dword ptr [RDI + R9*0x1 + -0x4... | /* func0(int*, int) */
int func0(int *param_1,int param_2)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
iVar4 = param_2 + -1;
iVar1 = 0;
do {
iVar3 = iVar1;
if (iVar4 < iVar3) {
return -1;
}
while( true ) {
iVar2 = (iVar4 + iVar3) / 2;
iVar1 = iVar2 + 1;
if (p... |
135 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int ar[], int N) {
int l = 0;
int r = N - 1;
while (l <= r) {
int mid = (l + r) / 2;
if (ar[mid] != mid + 1 && ar[mid - 1] == mid) {
return mid + 1;
} else if (ar[mid] != mid + 1) {
r = mid - 1;
} else {
l = mid + 1;
... | int main() {
int arr1[] = {1, 2, 3, 5};
int arr2[] = {1, 3, 4, 5};
int arr3[] = {1, 2, 3, 5, 6, 7};
assert(func0(arr1, 4) == 4);
assert(func0(arr2, 4) == 2);
assert(func0(arr3, 5) == 4);
return 0;
}
| O3 | cpp | func0(int*, int):
endbr64
sub $0x1,%esi
xor %ecx,%ecx
nopl 0x0(%rax)
cmp %ecx,%esi
jl 1358 <_Z5func0Pii+0x48>
lea (%rsi,%rcx,1),%edx
mov %edx,%eax
shr $0x1f,%eax
add %edx,%eax
sar %eax
movslq %eax,%rdx
lea 0x1(%rax),%r8d
lea 0x0(,%rdx,4),%r9
cmp %r8d,(%rdi,%rdx,4)
je 1368 <_Z5... | _Z5func0Pii:
endbr64
sub esi, 1
xor ecx, ecx
nop dword ptr [rax+00000000h]
loc_12A0:
cmp esi, ecx
jl short loc_12D8
loc_12A4:
lea edx, [rsi+rcx]
mov eax, edx
shr eax, 1Fh
add eax, edx
sar eax, 1
movsxd rdx, eax
lea r8d, [rax+1]
lea r9, ds:0[rdx*4]
cmp [rdi+rdx*4], r... | long long func0(int *a1, int a2)
{
int v2; // esi
int i; // ecx
int v4; // eax
unsigned int v5; // r8d
v2 = a2 - 1;
for ( i = 0; v2 >= i; i = v4 + 1 )
{
while ( 1 )
{
v4 = (v2 + i) / 2;
v5 = v4 + 1;
if ( a1[v4] == v4 + 1 )
break;
if ( a1[v4 - 1] == v4 )
re... | func0:
ENDBR64
SUB ESI,0x1
XOR ECX,ECX
NOP dword ptr [RAX]
LAB_001012a0:
CMP ESI,ECX
JL 0x001012d8
LAB_001012a4:
LEA EDX,[RSI + RCX*0x1]
MOV EAX,EDX
SHR EAX,0x1f
ADD EAX,EDX
SAR EAX,0x1
MOVSXD RDX,EAX
LEA R8D,[RAX + 0x1]
LEA R9,[RDX*0x4]
CMP dword ptr [RDI + RDX*0x4],R8D
JZ 0x001012e8
CMP dword ptr [RDI + R9*0x1 + -0x4... | /* func0(int*, int) */
int func0(int *param_1,int param_2)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
iVar4 = param_2 + -1;
iVar1 = 0;
do {
iVar3 = iVar1;
if (iVar4 < iVar3) {
return -1;
}
while( true ) {
iVar2 = (iVar4 + iVar3) / 2;
iVar1 = iVar2 + 1;
if (p... |
136 | func0 |
#include <assert.h>
| int func0(int n) {
return n * (n + 1);
}
| int main() {
assert(func0(4) == 20);
assert(func0(5) == 30);
assert(func0(6) == 42);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x4(%rbp)
mov -0x4(%rbp),%eax
add $0x1,%eax
imul -0x4(%rbp),%eax
pop %rbp
retq
| _Z5func0i:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_4], edi
mov eax, [rbp+var_4]
add eax, 1
imul eax, [rbp+var_4]
pop rbp
retn | long long func0(int a1)
{
return (unsigned int)(a1 * (a1 + 1));
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x4],EDI
MOV EAX,dword ptr [RBP + -0x4]
ADD EAX,0x1
IMUL EAX,dword ptr [RBP + -0x4]
POP RBP
RET | /* func0(int) */
int func0(int param_1)
{
return (param_1 + 1) * param_1;
} |
137 | func0 |
#include <assert.h>
| int func0(int n) {
return n * (n + 1);
}
| int main() {
assert(func0(4) == 20);
assert(func0(5) == 30);
assert(func0(6) == 42);
return 0;
}
| O1 | cpp | func0(int):
endbr64
lea 0x1(%rdi),%eax
imul %edi,%eax
retq
| _Z5func0i:
endbr64
lea eax, [rdi+1]
imul eax, edi
retn | long long func0(int a1)
{
return (unsigned int)(a1 * (a1 + 1));
} | func0:
ENDBR64
LEA EAX,[RDI + 0x1]
IMUL EAX,EDI
RET | /* func0(int) */
int func0(int param_1)
{
return (param_1 + 1) * param_1;
} |
138 | func0 |
#include <assert.h>
| int func0(int n) {
return n * (n + 1);
}
| int main() {
assert(func0(4) == 20);
assert(func0(5) == 30);
assert(func0(6) == 42);
return 0;
}
| O2 | cpp | func0(int):
endbr64
lea 0x1(%rdi),%eax
imul %edi,%eax
retq
nopl 0x0(%rax,%rax,1)
| _Z5func0i:
endbr64
lea eax, [rdi+1]
imul eax, edi
retn | long long func0(int a1)
{
return (unsigned int)(a1 * (a1 + 1));
} | func0:
ENDBR64
LEA EAX,[RDI + 0x1]
IMUL EAX,EDI
RET | /* func0(int) */
int func0(int param_1)
{
return (param_1 + 1) * param_1;
} |
139 | func0 |
#include <assert.h>
| int func0(int n) {
return n * (n + 1);
}
| int main() {
assert(func0(4) == 20);
assert(func0(5) == 30);
assert(func0(6) == 42);
return 0;
}
| O3 | cpp | func0(int):
endbr64
lea 0x1(%rdi),%eax
imul %edi,%eax
retq
nopl 0x0(%rax,%rax,1)
| _Z5func0i:
endbr64
lea eax, [rdi+1]
imul eax, edi
retn | long long func0(int a1)
{
return (unsigned int)(a1 * (a1 + 1));
} | func0:
ENDBR64
LEA EAX,[RDI + 0x1]
IMUL EAX,EDI
RET | /* func0(int) */
int func0(int param_1)
{
return (param_1 + 1) * param_1;
} |
140 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int p, int q, int N) {
int res = 0;
while (N > 0) {
N--;
p *= 10;
res = p / q;
p %= q;
}
return res;
}
| int main() {
assert(func0(1, 2, 1) == 5);
assert(func0(3, 5, 1) == 6);
assert(func0(5, 6, 5) == 3);
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)
movl $0x0,-0x4(%rbp)
cmpl $0x0,-0x1c(%rbp)
jle 11d0 <_Z5func0iii+0x47>
subl $0x1,-0x1c(%rbp)
mov -0x14(%rbp),%edx
mov %edx,%eax
shl $0x2,%eax
add %edx,%eax
add %eax,... | _Z5func0iii:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_14], edi
mov [rbp+var_18], esi
mov [rbp+var_1C], edx
mov [rbp+var_4], 0
jmp short loc_118A
loc_1163:
sub [rbp+var_1C], 1
mov edx, [rbp+var_14]
mov eax, edx
shl eax, 2
add eax, edx
add eax, eax
mov [rbp+var_14]... | long long func0(int a1, int a2, int a3)
{
int v6; // [rsp+8h] [rbp-14h]
unsigned int v7; // [rsp+18h] [rbp-4h]
v7 = 0;
while ( a3 > 0 )
{
--a3;
v6 = 10 * a1;
v7 = v6 / a2;
a1 = v6 % a2;
}
return v7;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x14],EDI
MOV dword ptr [RBP + -0x18],ESI
MOV dword ptr [RBP + -0x1c],EDX
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0010118a
LAB_00101163:
SUB dword ptr [RBP + -0x1c],0x1
MOV EDX,dword ptr [RBP + -0x14]
MOV EAX,EDX
SHL EAX,0x2
ADD EAX,EDX
ADD EAX,EAX
MOV dword ptr [R... | /* func0(int, int, int) */
int func0(int param_1,int param_2,int param_3)
{
int4 local_24;
int4 local_1c;
int4 local_c;
local_c = 0;
local_1c = param_1;
for (local_24 = param_3; 0 < local_24; local_24 = local_24 + -1) {
local_c = (local_1c * 10) / param_2;
local_1c = (local_1c * 10) % param_2;
... |
141 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int p, int q, int N) {
int res = 0;
while (N > 0) {
N--;
p *= 10;
res = p / q;
p %= q;
}
return res;
}
| int main() {
assert(func0(1, 2, 1) == 5);
assert(func0(3, 5, 1) == 6);
assert(func0(5, 6, 5) == 3);
return 0;
}
| O1 | cpp | func0(int, int, int):
endbr64
mov %edx,%r8d
test %edx,%edx
jle 11ac <_Z5func0iii+0x23>
lea (%rdi,%rdi,4),%ecx
add %ecx,%ecx
mov %ecx,%eax
cltd
idiv %esi
mov %edx,%edi
sub $0x1,%r8d
jne 1194 <_Z5func0iii+0xb>
mov %ecx,%eax
cltd
idiv %esi
retq
mov $0x0,%eax
retq
| _Z5func0iii:
endbr64
mov r8d, edx
test edx, edx
jle short loc_116C
loc_1154:
lea ecx, [rdi+rdi*4]
add ecx, ecx
mov eax, ecx
cdq
idiv esi
mov edi, edx
sub r8d, 1
jnz short loc_1154
mov eax, ecx
cdq
idiv esi
retn
loc_116C:
mov eax, 0
retn | long long func0(int a1, int a2, int a3)
{
int v3; // r8d
int v4; // ecx
v3 = a3;
if ( a3 <= 0 )
return 0LL;
do
{
v4 = 10 * a1;
a1 = 10 * a1 % a2;
--v3;
}
while ( v3 );
return (unsigned int)(v4 / a2);
} | func0:
ENDBR64
MOV R8D,EDX
TEST EDX,EDX
JLE 0x0010116c
LAB_00101154:
LEA ECX,[RDI + RDI*0x4]
ADD ECX,ECX
MOV EAX,ECX
CDQ
IDIV ESI
MOV EDI,EDX
SUB R8D,0x1
JNZ 0x00101154
MOV EAX,ECX
CDQ
IDIV ESI
RET
LAB_0010116c:
MOV EAX,0x0
RET | /* func0(int, int, int) */
int [16] func0(int param_1,int param_2,int param_3)
{
int auVar1 [16];
int iVar2;
int4 in_register_00000014;
int auVar3 [16];
auVar1._4_4_ = in_register_00000014;
auVar1._0_4_ = param_3;
if (0 < param_3) {
do {
iVar2 = param_1 * 10;
param_1 = iVar2 % param_... |
142 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int p, int q, int N) {
int res = 0;
while (N > 0) {
N--;
p *= 10;
res = p / q;
p %= q;
}
return res;
}
| int main() {
assert(func0(1, 2, 1) == 5);
assert(func0(3, 5, 1) == 6);
assert(func0(5, 6, 5) == 3);
return 0;
}
| O2 | cpp | func0(int, int, int):
endbr64
mov %edx,%ecx
test %edx,%edx
jle 11e0 <_Z5func0iii+0x20>
nopw 0x0(%rax,%rax,1)
lea (%rdi,%rdi,4),%eax
add %eax,%eax
cltd
idiv %esi
mov %edx,%edi
sub $0x1,%ecx
jne 11d0 <_Z5func0iii+0x10>
retq
xor %eax,%eax
retq
nopw %cs:0x0(%rax,%rax,1)
nopl (%rax)
| _Z5func0iii:
endbr64
mov ecx, edx
test edx, edx
jle short loc_11E0
nop word ptr [rax+rax+00h]
loc_11D0:
lea eax, [rdi+rdi*4]
add eax, eax
cdq
idiv esi
mov edi, edx
sub ecx, 1
jnz short loc_11D0
retn
loc_11E0:
xor eax, eax
retn | long long func0(int a1, int a2, int a3)
{
int v3; // ecx
long long result; // rax
v3 = a3;
if ( a3 <= 0 )
return 0LL;
do
{
result = (unsigned int)(10 * a1 / a2);
a1 = 10 * a1 % a2;
--v3;
}
while ( v3 );
return result;
} | func0:
ENDBR64
MOV ECX,EDX
TEST EDX,EDX
JLE 0x001011e0
NOP word ptr [RAX + RAX*0x1]
LAB_001011d0:
LEA EAX,[RDI + RDI*0x4]
ADD EAX,EAX
CDQ
IDIV ESI
MOV EDI,EDX
SUB ECX,0x1
JNZ 0x001011d0
RET
LAB_001011e0:
XOR EAX,EAX
RET | /* func0(int, int, int) */
ulong func0(int param_1,int param_2,int param_3)
{
int iVar1;
if (param_3 < 1) {
return 0;
}
do {
iVar1 = param_1 * 10;
param_1 = iVar1 % param_2;
param_3 = param_3 + -1;
} while (param_3 != 0);
return (long)iVar1 / (long)param_2 & 0xffffffff;
} |
143 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int p, int q, int N) {
int res = 0;
while (N > 0) {
N--;
p *= 10;
res = p / q;
p %= q;
}
return res;
}
| int main() {
assert(func0(1, 2, 1) == 5);
assert(func0(3, 5, 1) == 6);
assert(func0(5, 6, 5) == 3);
return 0;
}
| O3 | cpp | func0(int, int, int):
endbr64
mov %edx,%ecx
test %edx,%edx
jle 11e0 <_Z5func0iii+0x20>
nopw 0x0(%rax,%rax,1)
lea (%rdi,%rdi,4),%eax
add %eax,%eax
cltd
idiv %esi
mov %edx,%edi
sub $0x1,%ecx
jne 11d0 <_Z5func0iii+0x10>
retq
xor %eax,%eax
retq
nopw %cs:0x0(%rax,%rax,1)
nopl (%rax)
| _Z5func0iii:
endbr64
mov ecx, edx
test edx, edx
jle short loc_1160
nop word ptr [rax+rax+00h]
loc_1150:
lea eax, [rdi+rdi*4]
add eax, eax
cdq
idiv esi
mov edi, edx
sub ecx, 1
jnz short loc_1150
retn
loc_1160:
xor eax, eax
retn | long long func0(int a1, int a2, int a3)
{
int v3; // ecx
long long result; // rax
v3 = a3;
if ( a3 <= 0 )
return 0LL;
do
{
result = (unsigned int)(10 * a1 / a2);
a1 = 10 * a1 % a2;
--v3;
}
while ( v3 );
return result;
} | func0:
ENDBR64
MOV ECX,EDX
TEST EDX,EDX
JLE 0x00101160
NOP word ptr [RAX + RAX*0x1]
LAB_00101150:
LEA EAX,[RDI + RDI*0x4]
ADD EAX,EAX
CDQ
IDIV ESI
MOV EDI,EDX
SUB ECX,0x1
JNZ 0x00101150
RET
LAB_00101160:
XOR EAX,EAX
RET | /* func0(int, int, int) */
ulong func0(int param_1,int param_2,int param_3)
{
int iVar1;
if (param_3 < 1) {
return 0;
}
do {
iVar1 = param_1 * 10;
param_1 = iVar1 % param_2;
param_3 = param_3 + -1;
} while (param_3 != 0);
return (long)iVar1 / (long)param_2 & 0xffffffff;
} |
144 | func0 |
#include <vector>
#include <string>
#include <algorithm>
#include <cassert>
| std::vector<std::string> func0(const std::vector<std::string>& mixed_list) {
std::vector<int> int_part;
std::vector<std::string> str_part;
for (const auto& item : mixed_list) {
if (isdigit(item[0]) || (item.size() > 1 && item[0] == '-' && isdigit(item[1]))) {
int_part.push_back(stoi... | int main() {
std::vector<std::string> mixed_list1 = {"19", "red", "12", "green", "blue", "10", "white", "green", "1"};
std::vector<std::string> sorted_list1 = {"1", "10", "12", "19", "blue", "green", "green", "red", "white"};
assert(func0(mixed_list1) == sorted_list1);
std::vector<std::string> mix... | O0 | cpp | func0(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %r12
push %rbx
sub $0xc0,%rsp
mov %rdi,-0xc8(%rbp)
mov %rs... | _Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE:
endbr64
push rbp
mov rbp, rsp
push r12
push rbx
sub rsp, 0C0h
mov [rbp+var_C8], rdi
mov [rbp+var_D0], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_80]
mov rdi, rax
c... | long long func0(long long a1, long long a2)
{
long long v3; // rbx
long long v4; // rax
long long v5; // rbx
long long v6; // rax
long long v7; // r12
long long v8; // rbx
int v10; // [rsp+1Ch] [rbp-B4h] BYREF
long long v11; // [rsp+20h] [rbp-B0h] BYREF
_QWORD v12[2]; // [rsp+28h] [rbp-A8h] BYREF
_... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R12
PUSH RBX
SUB RSP,0xc0
MOV qword ptr [RBP + -0xc8],RDI
MOV qword ptr [RBP + -0xd0],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x80]
MOV RDI,RAX
CALL 0x001033e4
LEA RAX,[RBP + -0x60]
MOV RDI,RAX
CALL 0x0010344c
MOV RAX,qword ptr... | /* func0(std::vector<std::string, std::allocator<std::string > > const&) */
vector * func0(vector *param_1)
{
bool bVar1;
char *pcVar2;
ulong uVar3;
int8 uVar4;
int8 uVar5;
vector<std::string,std::allocator<std::string>> *in_RSI;
long in_FS_OFFSET;
int local_bc;
int8 local_b8;
int8 local_b0;
vec... |
145 | func0 |
#include <vector>
#include <string>
#include <algorithm>
#include <cassert>
| std::vector<std::string> func0(const std::vector<std::string>& mixed_list) {
std::vector<int> int_part;
std::vector<std::string> str_part;
for (const auto& item : mixed_list) {
if (isdigit(item[0]) || (item.size() > 1 && item[0] == '-' && isdigit(item[1]))) {
int_part.push_back(stoi... | int main() {
std::vector<std::string> mixed_list1 = {"19", "red", "12", "green", "blue", "10", "white", "green", "1"};
std::vector<std::string> sorted_list1 = {"1", "10", "12", "19", "blue", "green", "green", "red", "white"};
assert(func0(mixed_list1) == sorted_list1);
std::vector<std::string> mix... | O1 | cpp | func0(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x98,%rsp
mov %rdi,%rb... | _Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 178h
mov r15, rdi
mov rax, fs:28h
mov [rsp+1A8h+var_40], rax
xor eax, eax
mov [rsp+1A8h+var_178], 0
mov [rsp+1A8h+var_170... | _QWORD * func0(_QWORD *a1, char ***a2)
{
char **v3; // rbx
char **v4; // r13
int *v5; // r12
int v6; // r14d
long long v7; // rax
char *v8; // rsi
char *v9; // rbp
char v10; // dl
char *v11; // rbp
long long v12; // rbx
int v13; // eax
unsigned long long v14; // rax
unsigned int *v15; // rbx
... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x178
MOV R15,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x168],RAX
XOR EAX,EAX
MOV qword ptr [RSP + 0x30],0x0
MOV qword ptr [RSP + 0x38],0x0
MOV qword ptr [RSP + 0x40],0x0
MOV qword ptr [RSP + 0x50],0x0
MOV qword ptr [RSP + 0x58],0x... | /* func0(std::vector<std::string, std::allocator<std::string > > const&) */
vector * func0(vector *param_1,int param_2,int param_3,int param_4,
int param_5,int param_6,int8 param_7,int8 param_8,
int8 param_9,int param_10,int8 param_11,int8 param_12,
int8 param_13,int8 param_14... |
146 | func0 |
#include <vector>
#include <string>
#include <algorithm>
#include <cassert>
| std::vector<std::string> func0(const std::vector<std::string>& mixed_list) {
std::vector<int> int_part;
std::vector<std::string> str_part;
for (const auto& item : mixed_list) {
if (isdigit(item[0]) || (item.size() > 1 && item[0] == '-' && isdigit(item[1]))) {
int_part.push_back(stoi... | int main() {
std::vector<std::string> mixed_list1 = {"19", "red", "12", "green", "blue", "10", "white", "green", "1"};
std::vector<std::string> sorted_list1 = {"1", "10", "12", "19", "blue", "green", "green", "red", "white"};
assert(func0(mixed_list1) == sorted_list1);
std::vector<std::string> mix... | O2 | cpp | func0(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0xa8,%rs... | _Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
push r12
push rbp
mov rbp, rdi
push rbx
sub rsp, 188h
mov rbx, [rsi]
mov r13, [rsi+8]
mov rax, fs:28h
mov [rsp+1B8h+var_40], rax
xor eax, ... | long long func0(long long a1, char ***a2)
{
char **v3; // rbx
char **v4; // r13
unsigned long long v5; // rdx
long long v6; // r12
long long v7; // rdi
char *v8; // r15
int v9; // esi
int *v10; // r12
int v11; // eax
long long v12; // rax
long long v13; // rsi
char *v14; // r15
long long v15;... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
SUB RSP,0x188
MOV RBX,qword ptr [RSI]
MOV R13,qword ptr [RSI + 0x8]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x178],RAX
XOR EAX,EAX
MOVAPS xmmword ptr [RSP + 0x40],XMM0
MOV qword ptr [RSP + 0x50],0x0
MOV qword ptr [R... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(std::vector<std::string, std::allocator<std::string > > const&) */
vector * func0(vector *param_1,int param_2,int param_3,int param_4,byte param_5,
byte param_6,int8 param_7,int8 param_8,int8 param_9,
... |
147 | func0 |
#include <vector>
#include <string>
#include <algorithm>
#include <cassert>
| std::vector<std::string> func0(const std::vector<std::string>& mixed_list) {
std::vector<int> int_part;
std::vector<std::string> str_part;
for (const auto& item : mixed_list) {
if (isdigit(item[0]) || (item.size() > 1 && item[0] == '-' && isdigit(item[1]))) {
int_part.push_back(stoi... | int main() {
std::vector<std::string> mixed_list1 = {"19", "red", "12", "green", "blue", "10", "white", "green", "1"};
std::vector<std::string> sorted_list1 = {"1", "10", "12", "19", "blue", "green", "green", "red", "white"};
assert(func0(mixed_list1) == sorted_list1);
std::vector<std::string> mix... | O3 | cpp | func0(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&):
endbr64
push %r15
pxor %xmm0,%xmm0
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %r... | _Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE:
endbr64
push r15
pxor xmm0, xmm0
mov r15d, 80000000h
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 1A8h
mov rbx, [rsi]
mov r13, [rsi+8]
mov [rsp+1D8h+var_1C8], rdi
mov rax, fs:28h
mov ... | long long func0(long long a1, char ***a2)
{
char **v2; // rbx
char **v3; // r13
size_t v4; // r12
long long *v5; // rbp
void *v6; // rdi
char *v7; // r14
char *v8; // r14
int v9; // edx
int *v10; // rax
int v11; // r12d
int *v12; // rbp
long long v13; // rax
char *v14; // rsi
char *v15; // ... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
MOV R15D,0x80000000
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x1a8
MOV RBX,qword ptr [RSI]
MOV R13,qword ptr [RSI + 0x8]
MOV qword ptr [RSP + 0x10],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x198],RAX
XOR EAX,EAX
LEA RAX,[RSP + 0x58]
MOVAPS xmmword ptr [RSP ... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(std::vector<std::string, std::allocator<std::string > > const&) */
vector * func0(vector *param_1,int param_2,int param_3,int param_4,
int param_5,byte param_6,int8 param_7,int8 param_8,
int8 param... |
148 | func0 |
#include <vector>
#include <cassert>
#include <cmath>
| double func0(const std::vector<int>& list1) {
int first_even = -1;
int first_odd = -1;
for (int el : list1) {
if (el % 2 == 0 && first_even == -1) {
first_even = el;
}
if (el % 2 != 0 && first_odd == -1) {
first_odd = el;
}
if (firs... | int main() {
assert(std::fabs(func0({1,3,5,7,4,1,6,8}) - 4.0) < 1e-9);
assert(std::fabs(func0({1,2,3,4,5,6,7,8,9,10}) - 2.0) < 1e-9);
assert(std::fabs(func0({1,5,7,9,10}) - 10.0) < 1e-9);
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x40,%rsp
mov %rdi,-0x38(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x8(%rbp)
xor %eax,%eax
movl $0xffffffff,-0x2c(%rbp)
movl $0xffffffff,-0x28(%rbp)
mov -0x38(%rbp),%rax
mov %rax,-0x10(%rbp)
mov -0x10(%rb... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_38], rdi
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
mov [rbp+var_2C], 0FFFFFFFFh
mov [rbp+var_28], 0FFFFFFFFh
mov rax, [rbp+var_38]
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov ... | unsigned long long func0(long long a1)
{
int v2; // [rsp+14h] [rbp-2Ch]
int v3; // [rsp+18h] [rbp-28h]
int v4; // [rsp+1Ch] [rbp-24h]
long long v5; // [rsp+20h] [rbp-20h] BYREF
_QWORD v6[2]; // [rsp+28h] [rbp-18h] BYREF
unsigned long long v7; // [rsp+38h] [rbp-8h]
v7 = __readfsqword(0x28u);
v2 = -1;
... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x38],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
MOV dword ptr [RBP + -0x2c],0xffffffff
MOV dword ptr [RBP + -0x28],0xffffffff
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -... | /* func0(std::vector<int, std::allocator<int> > const&) */
double func0(vector *param_1)
{
uint uVar1;
bool bVar2;
uint *puVar3;
long in_FS_OFFSET;
double dVar4;
uint local_34;
uint local_30;
int8 local_28;
int8 local_20;
vector<int,std::allocator<int>> *local_18;
long local_10;
local_10 = ... |
149 | func0 |
#include <vector>
#include <cassert>
#include <cmath>
| double func0(const std::vector<int>& list1) {
int first_even = -1;
int first_odd = -1;
for (int el : list1) {
if (el % 2 == 0 && first_even == -1) {
first_even = el;
}
if (el % 2 != 0 && first_odd == -1) {
first_odd = el;
}
if (firs... | int main() {
assert(std::fabs(func0({1,3,5,7,4,1,6,8}) - 4.0) < 1e-9);
assert(std::fabs(func0({1,2,3,4,5,6,7,8,9,10}) - 2.0) < 1e-9);
assert(std::fabs(func0({1,5,7,9,10}) - 10.0) < 1e-9);
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
mov (%rdi),%rax
mov 0x8(%rdi),%r8
cmp %r8,%rax
je 1278 <_Z5func0RKSt6vectorIiSaIiEE+0x6f>
mov $0xffffffff,%edx
mov $0xffffffff,%esi
jmp 1242 <_Z5func0RKSt6vectorIiSaIiEE+0x39>
cmp $0xffffffff,%edx
jne 122f <_Z5func0RKSt6vectorIiSa... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
mov rax, [rdi]
mov r8, [rdi+8]
cmp r8, rax
jz short loc_126F
mov ecx, 0FFFFFFFFh
mov esi, 0FFFFFFFFh
jmp short loc_1242
loc_1225:
cmp ecx, 0FFFFFFFFh
jnz short loc_122F
test edi, edi
cmovnz ecx, edx
loc_122F:
cmp esi, 0FFFFFFFFh
jz s... | double func0(int **a1)
{
int *v1; // rax
int *v2; // r8
int v3; // ecx
int v4; // esi
int v5; // edi
v1 = *a1;
v2 = a1[1];
if ( v2 == *a1 )
{
v3 = -1;
v4 = -1;
return (double)v4 / (double)v3;
}
v3 = -1;
v4 = -1;
do
{
v5 = *v1 & 1;
if ( v4 != -1 || v5 )
{
if ( ... | func0:
ENDBR64
MOV RAX,qword ptr [RDI]
MOV R8,qword ptr [RDI + 0x8]
CMP R8,RAX
JZ 0x0010126f
MOV ECX,0xffffffff
MOV ESI,0xffffffff
JMP 0x00101242
LAB_00101225:
CMP ECX,-0x1
JNZ 0x0010122f
TEST EDI,EDI
CMOVNZ ECX,EDX
LAB_0010122f:
CMP ESI,-0x1
JZ 0x00101239
CMP ECX,-0x1
JNZ 0x00101256
LAB_00101239:
ADD RAX,0x4
CMP R8,RA... | /* func0(std::vector<int, std::allocator<int> > const&) */
double func0(vector *param_1)
{
uint uVar1;
uint *puVar2;
uint uVar3;
uint uVar4;
uint uVar5;
puVar2 = *(uint **)param_1;
if (*(uint **)(param_1 + 8) == puVar2) {
uVar3 = 0xffffffff;
uVar4 = 0xffffffff;
}
else {
uVar3 = 0xffff... |
150 | func0 |
#include <vector>
#include <cassert>
#include <cmath>
| double func0(const std::vector<int>& list1) {
int first_even = -1;
int first_odd = -1;
for (int el : list1) {
if (el % 2 == 0 && first_even == -1) {
first_even = el;
}
if (el % 2 != 0 && first_odd == -1) {
first_odd = el;
}
if (firs... | int main() {
assert(std::fabs(func0({1,3,5,7,4,1,6,8}) - 4.0) < 1e-9);
assert(std::fabs(func0({1,2,3,4,5,6,7,8,9,10}) - 2.0) < 1e-9);
assert(std::fabs(func0({1,5,7,9,10}) - 10.0) < 1e-9);
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
mov (%rdi),%rax
mov 0x8(%rdi),%rdi
cmp %rdi,%rax
je 14b5 <_Z5func0RKSt6vectorIiSaIiEE+0x65>
mov $0xffffffff,%esi
mov $0xffffffff,%edx
jmp 1489 <_Z5func0RKSt6vectorIiSaIiEE+0x39>
nopl 0x0(%rax)
cmp $0xffffffff,%edx
cmove %ecx,%edx
... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
mov rax, [rdi]
mov rdi, [rdi+8]
cmp rdi, rax
jz short loc_1459
mov esi, 0FFFFFFFFh
mov ecx, 0FFFFFFFFh
jmp short loc_1419
loc_1400:
cmp esi, 0FFFFFFFFh
cmovz esi, edx
loc_1406:
cmp ecx, 0FFFFFFFFh
jz short loc_1410
cmp esi, 0FFFFFFFFh
... | double func0(int **a1)
{
int *v1; // rax
int *v2; // rdi
int v3; // esi
int v4; // ecx
v1 = *a1;
v2 = a1[1];
if ( v2 == v1 )
return 1.0;
v3 = -1;
v4 = -1;
do
{
if ( (*v1 & 1) != 0 )
{
if ( v3 == -1 )
v3 = *v1;
}
else if ( v4 == -1 )
{
v4 = *v1;
}
... | func0:
ENDBR64
MOV RAX,qword ptr [RDI]
MOV RDI,qword ptr [RDI + 0x8]
CMP RDI,RAX
JZ 0x00101459
MOV ESI,0xffffffff
MOV ECX,0xffffffff
JMP 0x00101419
LAB_00101400:
CMP ESI,-0x1
CMOVZ ESI,EDX
LAB_00101406:
CMP ECX,-0x1
JZ 0x00101410
CMP ESI,-0x1
JNZ 0x00101430
LAB_00101410:
ADD RAX,0x4
CMP RDI,RAX
JZ 0x00101430
LAB_001014... | /* func0(std::vector<int, std::allocator<int> > const&) */
double func0(vector *param_1)
{
uint uVar1;
uint *puVar2;
uint uVar3;
uint uVar4;
puVar2 = *(uint **)param_1;
if (*(uint **)(param_1 + 8) == puVar2) {
return DAT_00102108;
}
uVar4 = 0xffffffff;
uVar3 = 0xffffffff;
do {
uVar1 = *... |
151 | func0 |
#include <vector>
#include <cassert>
#include <cmath>
| double func0(const std::vector<int>& list1) {
int first_even = -1;
int first_odd = -1;
for (int el : list1) {
if (el % 2 == 0 && first_even == -1) {
first_even = el;
}
if (el % 2 != 0 && first_odd == -1) {
first_odd = el;
}
if (firs... | int main() {
assert(std::fabs(func0({1,3,5,7,4,1,6,8}) - 4.0) < 1e-9);
assert(std::fabs(func0({1,2,3,4,5,6,7,8,9,10}) - 2.0) < 1e-9);
assert(std::fabs(func0({1,5,7,9,10}) - 10.0) < 1e-9);
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
mov (%rdi),%rax
mov 0x8(%rdi),%rdi
cmp %rdi,%rax
je 1465 <_Z5func0RKSt6vectorIiSaIiEE+0x65>
mov $0xffffffff,%esi
mov $0xffffffff,%edx
jmp 1439 <_Z5func0RKSt6vectorIiSaIiEE+0x39>
nopl 0x0(%rax)
cmp $0xffffffff,%edx
cmove %ecx,%edx
... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
mov rax, [rdi]
mov rdi, [rdi+8]
cmp rdi, rax
jz short loc_1459
mov esi, 0FFFFFFFFh
mov ecx, 0FFFFFFFFh
jmp short loc_1419
loc_1400:
cmp esi, 0FFFFFFFFh
cmovz esi, edx
loc_1406:
cmp ecx, 0FFFFFFFFh
jz short loc_1410
cmp esi, 0FFFFFFFFh
... | double func0(int **a1)
{
int *v1; // rax
int *v2; // rdi
int v3; // esi
int v4; // ecx
v1 = *a1;
v2 = a1[1];
if ( v2 == v1 )
return 1.0;
v3 = -1;
v4 = -1;
do
{
if ( (*v1 & 1) != 0 )
{
if ( v3 == -1 )
v3 = *v1;
}
else if ( v4 == -1 )
{
v4 = *v1;
}
... | func0:
ENDBR64
MOV RAX,qword ptr [RDI]
MOV RDI,qword ptr [RDI + 0x8]
CMP RDI,RAX
JZ 0x00101459
MOV ESI,0xffffffff
MOV ECX,0xffffffff
JMP 0x00101419
LAB_00101400:
CMP ESI,-0x1
CMOVZ ESI,EDX
LAB_00101406:
CMP ECX,-0x1
JZ 0x00101410
CMP ESI,-0x1
JNZ 0x00101430
LAB_00101410:
ADD RAX,0x4
CMP RDI,RAX
JZ 0x00101430
LAB_001014... | /* func0(std::vector<int, std::allocator<int> > const&) */
double func0(vector *param_1)
{
uint uVar1;
uint *puVar2;
uint uVar3;
uint uVar4;
puVar2 = *(uint **)param_1;
if (*(uint **)(param_1 + 8) == puVar2) {
return DAT_00102110;
}
uVar4 = 0xffffffff;
uVar3 = 0xffffffff;
do {
uVar1 = *... |
152 | func0 |
#include <bits/stdc++.h>
#include <cassert>
using namespace std;
| string func0(const string& S){
map<char, int> ctr;
for(char c : S) ctr[c]++;
auto cmp = [&](const pair<int, char>& a, const pair<int, char>& b) -> bool {
if(a.first != b.first) return a.first < b.first;
return a.second > b.second;
};
priority_queue<pair<int, char>,... | int main(){
assert(func0("aab") == "aba");
assert(func0("aabb") == "abab");
assert(func0("abccdd") == "cdabcd");
}
| O0 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)::{lambda(std::pair<int, char> const&, std::pair<int, char> const&)#1}::operator()(std::pair<int, char> const&, std::pair<int, char> const&) const:
push %rbp
mov %rsp,%rbp
mov %rdi,-0x8(%rbp)
mov %rsi,-0x10(%rbp)
mov... | _ZZ5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEENKUlRKSt4pairIicESA_E_clESA_SA_:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_10]
mov edx, [rax]
mov rax, [rbp+var_18]
mov eax, [rax]
cmp edx, eax
jz sh... | bool func0(std::string const&)::{lambda(std::pair<int,char> const&,std::pair<int,char> const&)#1}::operator()(
long long a1,
long long a2,
long long a3)
{
if ( *(_DWORD *)a2 == *(_DWORD *)a3 )
return *(_BYTE *)(a2 + 4) > *(_BYTE *)(a3 + 4);
else
return *(_DWORD *)a2 < *(_DWORD *)a3;... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x158
MOV qword ptr [RBP + -0x158],RDI
MOV qword ptr [RBP + -0x160],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x90]
MOV RDI,RAX
CALL 0x00103c40
MOV RAX,qword ptr [RBP + -0x160]
MOV qword ptr [RBP + -0x148],RAX
MOV RAX... | /* func0(std::string const&) */
string * func0(string *param_1)
{
int iVar1;
bool bVar2;
char cVar3;
int *puVar4;
int8 uVar5;
int *piVar6;
long lVar7;
int8 *puVar8;
ulong uVar9;
long in_FS_OFFSET;
_lambda_std__pair<int,char>_const__std__pair<int,char>_const___1_ local_155;
int local_154 [3];
... |
153 | func0 |
#include <bits/stdc++.h>
#include <cassert>
using namespace std;
| string func0(const string& S){
map<char, int> ctr;
for(char c : S) ctr[c]++;
auto cmp = [&](const pair<int, char>& a, const pair<int, char>& b) -> bool {
if(a.first != b.first) return a.first < b.first;
return a.second > b.second;
};
priority_queue<pair<int, char>,... | int main(){
assert(func0("aab") == "aba");
assert(func0("aabb") == "abab");
assert(func0("abccdd") == "cdabcd");
}
| O1 | cpp | void std::__push_heap<__gnu_cxx::__normal_iterator<std::pair<int, char>*, std::vector<std::pair<int, char>, std::allocator<std::pair<int, char> > > >, long, std::pair<int, char>, __gnu_cxx::__ops::_Iter_comp_val<func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)::{lambda(std::... | _ZSt11__push_heapIN9__gnu_cxx17__normal_iteratorIPSt4pairIicESt6vectorIS3_SaIS3_EEEElS3_NS0_5__ops14_Iter_comp_valIZ5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEUlRKS3_SK_E_EEEvT_T0_SO_T1_RT2_:
push rbx
mov r9, rdx
mov r10, rcx
mov r8d, ecx
mov rbx, rcx
shl rbx, 18h
sar rbx, 3... | long long std::__push_heap<__gnu_cxx::__normal_iterator<std::pair<int,char> *,std::vector<std::pair<int,char>>>,long,std::pair<int,char>,__gnu_cxx::__ops::_Iter_comp_val<func0(std::string const&)::{lambda(std::pair<int,char> const&,std::pair<int,char> const&)#1}>>(
long long a1,
long long a2,
l... | __push_heap<__normal_iterator<std::pair<int,char>*,std::vector<std::pair<int,char>,std::allocator<std::pair<int,char>>>>,long,std::pair<int,char>,__ops::_Iter_comp_val<func0(std::string_const&)::{lambda(std::pair<int,char>const&,std::pair<int,char>const&)#1}>>:
PUSH RBX
MOV R9,RDX
MOV R10,RCX
MOV R8D,ECX
MOV RBX,RCX
SH... | /* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* void std::__push_heap<__normal_iterator<std::pair<int, char>*, std::vector<std::pair<int, char>,
std::allocator<std::pair<int, char> > > >, long, std::pair<int, char>,
__ops::_Iter_comp_val<func0(std::string const&)::{lambda(std::pair... |
154 | func0 |
#include <bits/stdc++.h>
#include <cassert>
using namespace std;
| string func0(const string& S){
map<char, int> ctr;
for(char c : S) ctr[c]++;
auto cmp = [&](const pair<int, char>& a, const pair<int, char>& b) -> bool {
if(a.first != b.first) return a.first < b.first;
return a.second > b.second;
};
priority_queue<pair<int, char>,... | int main(){
assert(func0("aab") == "aba");
assert(func0("aabb") == "abab");
assert(func0("abccdd") == "cdabcd");
}
| O2 | cpp | void std::__push_heap<__gnu_cxx::__normal_iterator<std::pair<int, char>*, std::vector<std::pair<int, char>, std::allocator<std::pair<int, char> > > >, long, std::pair<int, char>, __gnu_cxx::__ops::_Iter_comp_val<func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)::{lambda(std::... | _ZSt11__push_heapIN9__gnu_cxx17__normal_iteratorIPSt4pairIicESt6vectorIS3_SaIS3_EEEElS3_NS0_5__ops14_Iter_comp_valIZ5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEUlRKS3_SK_E_EEEvT_T0_SO_T1_RT2__isra_0:
lea rax, [rsi-1]
mov r9, rdx
mov r10d, ecx
mov rdx, rax
shr rdx, 3Fh
add rdx, r... | long long std::__push_heap<__gnu_cxx::__normal_iterator<std::pair<int,char> *,std::vector<std::pair<int,char>>>,long,std::pair<int,char>,__gnu_cxx::__ops::_Iter_comp_val<func0(std::string const&)::{lambda(std::pair<int,char> const&,std::pair<int,char> const&)#1}>>(
long long a1,
long long a2,
l... | __push_heap<__normal_iterator<std::pair<int,char>*,std::vector<std::pair<int,char>,std::allocator<std::pair<int,char>>>>,long,std::pair<int,char>,__ops::_Iter_comp_val<func0(std::string_const&)::{lambda(std::pair<int,char>const&,std::pair<int,char>const&)#1}>>:
LEA RAX,[RSI + -0x1]
MOV R9,RDX
MOV R10D,ECX
MOV RDX,RAX
S... | /* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* void std::__push_heap<__normal_iterator<std::pair<int, char>*, std::vector<std::pair<int, char>,
std::allocator<std::pair<int, char> > > >, long, std::pair<int, char>,
__ops::_Iter_comp_val<func0(std::string const&)::{lambda(std::pair... |
155 | func0 |
#include <bits/stdc++.h>
#include <cassert>
using namespace std;
| string func0(const string& S){
map<char, int> ctr;
for(char c : S) ctr[c]++;
auto cmp = [&](const pair<int, char>& a, const pair<int, char>& b) -> bool {
if(a.first != b.first) return a.first < b.first;
return a.second > b.second;
};
priority_queue<pair<int, char>,... | int main(){
assert(func0("aab") == "aba");
assert(func0("aabb") == "abab");
assert(func0("abccdd") == "cdabcd");
}
| O3 | cpp | void std::__adjust_heap<__gnu_cxx::__normal_iterator<std::pair<int, char>*, std::vector<std::pair<int, char>, std::allocator<std::pair<int, char> > > >, long, std::pair<int, char>, __gnu_cxx::__ops::_Iter_comp_iter<func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)::{lambda(st... | _ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIPSt4pairIicESt6vectorIS3_SaIS3_EEEElS3_NS0_5__ops15_Iter_comp_iterIZ5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEUlRKS3_SK_E_EEEvT_T0_SO_T1_T2__isra_0:
lea rax, [rdx-1]
push r15
mov r9, rsi
mov r10d, ecx
push r14
push r13
mov r1... | int * std::__adjust_heap<__gnu_cxx::__normal_iterator<std::pair<int,char> *,std::vector<std::pair<int,char>>>,long,std::pair<int,char>,__gnu_cxx::__ops::_Iter_comp_iter<func0(std::string const&)::{lambda(std::pair<int,char> const&,std::pair<int,char> const&)#1}>>(
long long a1,
long long a2,
lon... | __adjust_heap<__normal_iterator<std::pair<int,char>*,std::vector<std::pair<int,char>,std::allocator<std::pair<int,char>>>>,long,std::pair<int,char>,__ops::_Iter_comp_iter<func0(std::string_const&)::{lambda(std::pair<int,char>const&,std::pair<int,char>const&)#1}>>:
LEA RAX,[RDX + -0x1]
PUSH R15
MOV R9,RSI
MOV R10D,ECX
P... | /* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* void std::__adjust_heap<__normal_iterator<std::pair<int, char>*, std::vector<std::pair<int,
char>, std::allocator<std::pair<int, char> > > >, long, std::pair<int, char>,
__ops::_Iter_comp_iter<func0(std::string const&)::{lambda(std::p... |
156 | func0 |
#include <vector>
#include <unordered_map>
#include <cassert>
| std::unordered_map<int, int> func0(const std::vector<std::vector<int>>& nums) {
std::unordered_map<int, int> result;
for (const auto& vec : nums) {
for (int num : vec) {
result[num]++;
}
}
return result;
}
| int main() {
assert((func0({{1, 2, 3, 2}, {4, 5, 6, 2}, {7, 1, 9, 5}}) == std::unordered_map<int,int>{{2, 3}, {1, 2}, {5, 2}, {3, 1}, {4, 1}, {6, 1}, {7, 1}, {9, 1}}));
assert((func0({{1, 2, 3, 4}, {5, 6, 7, 8}, {9, 10, 11, 12}}) == std::unordered_map<int,int>{{1, 1}, {2, 1}, {3, 1}, {4, 1}, {5, 1}, {6, 1}, {... | 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
mov -0x68(%rbp)... | _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 rax, [rbp+var_68]
mov rdi, rax
call _ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiES... | long long func0(long long a1, long long a2)
{
_DWORD *v2; // rax
int v4; // [rsp+1Ch] [rbp-54h] BYREF
long long v5; // [rsp+20h] [rbp-50h] BYREF
long long v6; // [rsp+28h] [rbp-48h] BYREF
long long v7; // [rsp+30h] [rbp-40h] BYREF
_QWORD v8[2]; // [rsp+38h] [rbp-38h] BYREF
long long v9; // [rsp+48h] [rbp... | 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 RAX,qword ptr [RBP + -0x68]
MOV RDI,RAX
CALL 0x0010263c
MOV RAX,qword ptr [RBP + -0x70]
MOV qword ptr [RBP + -0x30],RAX
MO... | /* 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;
int *piVar2;
vector<std::vector<int,std::allocator<int>>,std::allocator<std::vector<int,std::allocator<int>>>>
*in_RSI;
long in_F... |
157 | func0 |
#include <vector>
#include <unordered_map>
#include <cassert>
| std::unordered_map<int, int> func0(const std::vector<std::vector<int>>& nums) {
std::unordered_map<int, int> result;
for (const auto& vec : nums) {
for (int num : vec) {
result[num]++;
}
}
return result;
}
| int main() {
assert((func0({{1, 2, 3, 2}, {4, 5, 6, 2}, {7, 1, 9, 5}}) == std::unordered_map<int,int>{{2, 3}, {1, 2}, {5, 2}, {3, 1}, {4, 1}, {6, 1}, {7, 1}, {9, 1}}));
assert((func0({{1, 2, 3, 4}, {5, 6, 7, 8}, {9, 10, 11, 12}}) == std::unordered_map<int,int>{{1, 1}, {2, 1}, {3, 1}, {4, 1}, {5, 1}, {6, 1}, {... | O1 | 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 %rdi,%r14
mov %fs:0x28,%rax
mov %rax,0x28(%rsp)
xor %eax,%eax
lea 0x30(%rdi),%... | _Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 18h
mov r12, rdi
mov rax, fs:28h
mov [rsp+48h+var_40], rax
xor eax, eax
lea rax, [rdi+30h]
mov [rdi], rax
mov qword ptr [rdi+8], 1
mov qword ptr [rdi+10h],... | long long func0(long long a1, int ***a2)
{
int **v2; // r14
int **v3; // r15
int *v4; // rbx
_DWORD *v5; // rax
int *v6; // rbp
int v8; // [rsp+4h] [rbp-44h] BYREF
unsigned long long v9; // [rsp+8h] [rbp-40h]
v9 = __readfsqword(0x28u);
*(_QWORD *)a1 = a1 + 48;
*(_QWORD *)(a1 + 8) = 1LL;
*(_QWORD... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x18
MOV R12,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
LEA RAX,[RDI + 0x30]
MOV qword ptr [RDI],RAX
MOV qword ptr [RDI + 0x8],0x1
MOV qword ptr [RDI + 0x10],0x0
MOV qword ptr [RDI + 0x18],0x0
MOV dword ptr [RDI ... | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > > const&) */
vector * func0(vector *param_1)
{
int8 *puVar1;
int *piVar2;
int *piVar3;
int *piVar4;
int8 *in_RSI;
int8 *puVar5;
long in_FS_OFFSET;
int local_44;
long local_40;
... |
158 | func0 |
#include <vector>
#include <unordered_map>
#include <cassert>
| std::unordered_map<int, int> func0(const std::vector<std::vector<int>>& nums) {
std::unordered_map<int, int> result;
for (const auto& vec : nums) {
for (int num : vec) {
result[num]++;
}
}
return result;
}
| int main() {
assert((func0({{1, 2, 3, 2}, {4, 5, 6, 2}, {7, 1, 9, 5}}) == std::unordered_map<int,int>{{2, 3}, {1, 2}, {5, 2}, {3, 1}, {4, 1}, {6, 1}, {7, 1}, {9, 1}}));
assert((func0({{1, 2, 3, 4}, {5, 6, 7, 8}, {9, 10, 11, 12}}) == std::unordered_map<int,int>{{1, 1}, {2, 1}, {3, 1}, {4, 1}, {5, 1}, {6, 1}, {... | O2 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&):
endbr64
push %r15
lea 0x30(%rdi),%rax
push %r14
mov %rdi,%r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x18,%rsp
mov %rax,(%rdi)
mov (%rsi),%rbx
mov 0x8(%rsi),%r... | _Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EE:
endbr64
push r15
lea rax, [rdi+30h]
mov r15, rdi
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 28h
mov [rdi], rax
mov rbx, [rsi]
mov rax, [rsi+8]
mov qword ptr [rdi+8], 1
mov qword ptr [rdi+10h], 0
mov qword ptr [rdi+1... | long long func0(long long a1, int ***a2)
{
int **v3; // rbx
int **v4; // rax
int *v5; // rbp
unsigned long long v6; // r13
unsigned long long v7; // rdi
int v8; // ebx
long long **v9; // r8
unsigned long long v10; // r12
long long *v11; // rax
int v12; // ecx
_DWORD *v13; // rax
long long v15; ... | func0:
ENDBR64
PUSH R15
LEA RAX,[RDI + 0x30]
MOV R15,RDI
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x28
MOV qword ptr [RDI],RAX
MOV RBX,qword ptr [RSI]
MOV RAX,qword ptr [RSI + 0x8]
MOV qword ptr [RDI + 0x8],0x1
MOV qword ptr [RDI + 0x10],0x0
MOV qword ptr [RDI + 0x18],0x0
MOV dword ptr [RDI + 0x20],0x3f8000... | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > > const&) */
vector * func0(vector *param_1)
{
int iVar1;
int iVar2;
int8 *puVar3;
int8 *puVar4;
int *piVar5;
long *plVar6;
long *plVar7;
long *plVar8;
int8 *puVar9;
long lVar10;... |
159 | func0 |
#include <vector>
#include <unordered_map>
#include <cassert>
| std::unordered_map<int, int> func0(const std::vector<std::vector<int>>& nums) {
std::unordered_map<int, int> result;
for (const auto& vec : nums) {
for (int num : vec) {
result[num]++;
}
}
return result;
}
| int main() {
assert((func0({{1, 2, 3, 2}, {4, 5, 6, 2}, {7, 1, 9, 5}}) == std::unordered_map<int,int>{{2, 3}, {1, 2}, {5, 2}, {3, 1}, {4, 1}, {6, 1}, {7, 1}, {9, 1}}));
assert((func0({{1, 2, 3, 4}, {5, 6, 7, 8}, {9, 10, 11, 12}}) == std::unordered_map<int,int>{{1, 1}, {2, 1}, {3, 1}, {4, 1}, {5, 1}, {6, 1}, {... | O3 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&):
endbr64
push %r15
lea 0x30(%rdi),%rax
push %r14
mov %rdi,%r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x18,%rsp
mov %rax,(%rdi)
mov 0x8(%rsi),%rax
mov (%rsi),%r... | _Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EE:
endbr64
push r15
lea rax, [rdi+30h]
mov r15, rdi
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 28h
mov [rdi], rax
mov rbx, [rsi]
mov rax, [rsi+8]
mov qword ptr [rdi+8], 1
mov qword ptr [rdi+10h], 0
mov qword ptr [rdi+1... | long long func0(long long a1, int ***a2)
{
int **v3; // rbx
int **v4; // rax
int *v5; // rbp
unsigned long long v6; // r13
unsigned long long v7; // rdi
int v8; // ebx
long long **v9; // r8
unsigned long long v10; // r12
long long *v11; // rax
int v12; // ecx
_DWORD *v13; // rax
long long v15; ... | func0:
ENDBR64
PUSH R15
LEA RAX,[RDI + 0x30]
MOV R15,RDI
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x28
MOV qword ptr [RDI],RAX
MOV RBX,qword ptr [RSI]
MOV RAX,qword ptr [RSI + 0x8]
MOV qword ptr [RDI + 0x8],0x1
MOV qword ptr [RDI + 0x10],0x0
MOV qword ptr [RDI + 0x18],0x0
MOV dword ptr [RDI + 0x20],0x3f8000... | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > > const&) */
vector * func0(vector *param_1)
{
int iVar1;
int iVar2;
int8 *puVar3;
int8 *puVar4;
int *piVar5;
long *plVar6;
long *plVar7;
long *plVar8;
int8 *puVar9;
long lVar10;... |
160 | func0 |
#include <iostream>
#include <vector>
#include <cassert>
| std::vector<int> func0(std::vector<int> nums) {
std::vector<int> even_nums;
for (int num : nums) {
if (num % 2 == 0) {
even_nums.push_back(num);
}
}
return even_nums;
}
| int main() {
std::vector<int> result;
result = func0({1, 2, 3, 4, 5, 6, 7, 8, 9, 10});
assert((result == std::vector<int>{2, 4, 6, 8, 10}));
result = func0({10, 20, 45, 67, 84, 93});
assert((result == std::vector<int>{10, 20, 84}));
result = func0({5, 7, 9, 8, 6, 4, 3});
assert((r... | O0 | cpp | func0(std::vector<int, std::allocator<int> >):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x48,%rsp
mov %rdi,-0x48(%rbp)
mov %rsi,-0x50(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x48(%rbp),%rax
mov %rax,%rdi
callq 1b1e <_ZNSt6vectorIiSaIiEEC1Ev>
mov -0x50(%rb... | _Z5func0St6vectorIiSaIiEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 48h
mov [rbp+var_48], rdi
mov [rbp+var_50], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_48]
mov rdi, rax
call _ZNSt6vectorIiSaIiEEC2Ev; std::vector<int>::vector(void)
mov ... | long long func0(long long a1, long long a2)
{
int v3; // [rsp+1Ch] [rbp-34h] BYREF
long long v4; // [rsp+20h] [rbp-30h] BYREF
_QWORD v5[4]; // [rsp+28h] [rbp-28h] BYREF
v5[2] = __readfsqword(0x28u);
std::vector<int>::vector(a1);
v5[1] = a2;
v4 = std::vector<int>::begin(a2);
v5[0] = std::vector<int>::e... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RBP + -0x48],RDI
MOV qword ptr [RBP + -0x50],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x48]
MOV RDI,RAX
CALL 0x00101afe
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x20],RAX
MO... | /* func0(std::vector<int, std::allocator<int> >) */
vector<int,std::allocator<int>> * func0(vector param_1)
{
bool bVar1;
uint *puVar2;
vector<int,std::allocator<int>> *in_RSI;
int4 in_register_0000003c;
vector<int,std::allocator<int>> *this;
long in_FS_OFFSET;
uint local_3c;
int8 local_38;
int8 loc... |
161 | func0 |
#include <iostream>
#include <vector>
#include <cassert>
| std::vector<int> func0(std::vector<int> nums) {
std::vector<int> even_nums;
for (int num : nums) {
if (num % 2 == 0) {
even_nums.push_back(num);
}
}
return even_nums;
}
| int main() {
std::vector<int> result;
result = func0({1, 2, 3, 4, 5, 6, 7, 8, 9, 10});
assert((result == std::vector<int>{2, 4, 6, 8, 10}));
result = func0({10, 20, 45, 67, 84, 93});
assert((result == std::vector<int>{10, 20, 84}));
result = func0({5, 7, 9, 8, 6, 4, 3});
assert((r... | O1 | cpp | func0(std::vector<int, std::allocator<int> >):
endbr64
push %r13
push %r12
push %rbp
push %rbx
sub $0x18,%rsp
mov %rdi,%rbp
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi)
movq $0x0,0x10(%rdi)
mov (%rsi),%rbx
mov 0x8(%rsi),%r12
cmp %r12,%rbx
... | _Z5func0St6vectorIiSaIiEE:
endbr64
push r12
push rbp
push rbx
sub rsp, 10h
mov rbp, rdi
mov rax, fs:28h
mov [rsp+28h+var_20], rax
xor eax, eax
mov qword ptr [rdi], 0
mov qword ptr [rdi+8], 0
mov qword ptr [rdi+10h], 0
mov rbx, [rsi]
mov r12, [rsi+8]
cmp r12, rbx
jnz ... | _QWORD * func0(_QWORD *a1, int **a2)
{
int *v2; // rbx
int *v3; // r12
int v5; // eax
_DWORD *v6; // rsi
int v7; // [rsp+4h] [rbp-24h] BYREF
unsigned long long v8; // [rsp+8h] [rbp-20h]
v8 = __readfsqword(0x28u);
*a1 = 0LL;
a1[1] = 0LL;
a1[2] = 0LL;
v2 = *a2;
v3 = a2[1];
if ( v3 != *a2 )
{
... | func0:
ENDBR64
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x10
MOV RBP,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
MOV qword ptr [RDI],0x0
MOV qword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
MOV RBX,qword ptr [RSI]
MOV R12,qword ptr [RSI + 0x8]
CMP R12,RBX
JNZ 0x001012f7
LAB_001012cb:
MOV... | /* func0(std::vector<int, std::allocator<int> >) */
vector<int,std::allocator<int>> * func0(vector param_1)
{
uint *puVar1;
uint *puVar2;
uint *puVar3;
int8 *in_RSI;
int4 in_register_0000003c;
vector<int,std::allocator<int>> *this;
long in_FS_OFFSET;
uint local_24;
long local_20;
this = (vector... |
162 | func0 |
#include <iostream>
#include <vector>
#include <cassert>
| std::vector<int> func0(std::vector<int> nums) {
std::vector<int> even_nums;
for (int num : nums) {
if (num % 2 == 0) {
even_nums.push_back(num);
}
}
return even_nums;
}
| int main() {
std::vector<int> result;
result = func0({1, 2, 3, 4, 5, 6, 7, 8, 9, 10});
assert((result == std::vector<int>{2, 4, 6, 8, 10}));
result = func0({10, 20, 45, 67, 84, 93});
assert((result == std::vector<int>{10, 20, 84}));
result = func0({5, 7, 9, 8, 6, 4, 3});
assert((r... | O2 | cpp | func0(std::vector<int, std::allocator<int> >):
endbr64
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x18,%rsp
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi)
movq $0x0,0x10(%rdi)
mov (%rsi),%rbx
mov 0x8(%rsi),%rbp
cmp %rbp,%rbx
... | _Z5func0St6vectorIiSaIiEE:
endbr64
push r12
pxor xmm0, xmm0
push rbp
mov rbp, rdi
push rbx
sub rsp, 10h
mov rax, fs:28h
mov [rsp+28h+var_20], rax
xor eax, eax
mov qword ptr [rdi+10h], 0
movups xmmword ptr [rdi], xmm0
mov rbx, [rsi]
mov r12, [rsi+8]
cmp r12, rbx
jnz s... | long long func0(long long a1, int **a2)
{
int *v2; // rbx
int *v3; // r12
int v4; // eax
_DWORD *v5; // rsi
int v7; // [rsp+0h] [rbp-24h] BYREF
unsigned long long v8; // [rsp+4h] [rbp-20h]
v8 = __readfsqword(0x28u);
*(_QWORD *)(a1 + 16) = 0LL;
*(_OWORD *)a1 = 0LL;
v2 = *a2;
v3 = a2[1];
if ( v3... | func0:
ENDBR64
PUSH R12
PXOR XMM0,XMM0
PUSH RBP
MOV RBP,RDI
PUSH RBX
SUB RSP,0x10
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
MOV qword ptr [RDI + 0x10],0x0
MOVUPS xmmword ptr [RDI],XMM0
MOV RBX,qword ptr [RSI]
MOV R12,qword ptr [RSI + 0x8]
CMP R12,RBX
JNZ 0x00101809
JMP 0x00101830
LAB_0010180... | /* func0(std::vector<int, std::allocator<int> >) */
vector<int,std::allocator<int>> * func0(vector param_1)
{
uint *puVar1;
uint *puVar2;
uint *puVar3;
int8 *in_RSI;
int4 in_register_0000003c;
vector<int,std::allocator<int>> *this;
long in_FS_OFFSET;
uint local_24;
long local_20;
this = (vector... |
163 | func0 |
#include <iostream>
#include <vector>
#include <cassert>
| std::vector<int> func0(std::vector<int> nums) {
std::vector<int> even_nums;
for (int num : nums) {
if (num % 2 == 0) {
even_nums.push_back(num);
}
}
return even_nums;
}
| int main() {
std::vector<int> result;
result = func0({1, 2, 3, 4, 5, 6, 7, 8, 9, 10});
assert((result == std::vector<int>{2, 4, 6, 8, 10}));
result = func0({10, 20, 45, 67, 84, 93});
assert((result == std::vector<int>{10, 20, 84}));
result = func0({5, 7, 9, 8, 6, 4, 3});
assert((r... | O3 | cpp | func0(std::vector<int, std::allocator<int> >):
endbr64
push %r13
pxor %xmm0,%xmm0
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x18,%rsp
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
movq $0x0,0x10(%rdi)
movups %xmm0,(%rdi)
mov (%rsi),%rbx
mov 0x8(%rsi),%rbp
cmp %rbp,%rbx
je... | _Z5func0St6vectorIiSaIiEE:
endbr64
push r12
pxor xmm0, xmm0
push rbp
mov rbp, rdi
push rbx
sub rsp, 10h
mov rax, fs:28h
mov [rsp+28h+var_20], rax
xor eax, eax
mov qword ptr [rdi+10h], 0
movups xmmword ptr [rdi], xmm0
mov rbx, [rsi]
mov r12, [rsi+8]
cmp r12, rbx
jnz s... | long long func0(long long a1, int **a2)
{
int *v2; // rbx
int *v3; // r12
int v4; // eax
_DWORD *v5; // rsi
int v7; // [rsp+0h] [rbp-24h] BYREF
unsigned long long v8; // [rsp+4h] [rbp-20h]
v8 = __readfsqword(0x28u);
*(_QWORD *)(a1 + 16) = 0LL;
*(_OWORD *)a1 = 0LL;
v2 = *a2;
v3 = a2[1];
if ( v3... | func0:
ENDBR64
PUSH R12
PXOR XMM0,XMM0
PUSH RBP
MOV RBP,RDI
PUSH RBX
SUB RSP,0x10
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
MOV qword ptr [RDI + 0x10],0x0
MOVUPS xmmword ptr [RDI],XMM0
MOV RBX,qword ptr [RSI]
MOV R12,qword ptr [RSI + 0x8]
CMP R12,RBX
JNZ 0x00101809
JMP 0x00101830
LAB_0010180... | /* func0(std::vector<int, std::allocator<int> >) */
vector<int,std::allocator<int>> * func0(vector param_1)
{
uint *puVar1;
uint *puVar2;
uint *puVar3;
int8 *in_RSI;
int4 in_register_0000003c;
vector<int,std::allocator<int>> *this;
long in_FS_OFFSET;
uint local_24;
long local_20;
this = (vector... |
164 | func0 |
#include <vector>
#include <unordered_map>
#include <cassert>
| int func0(const std::vector<int>& arr, int n) {
std::unordered_map<int, int> count;
for (int num : arr) {
count[num]++;
}
int sum = 0;
for (auto& pair : count) {
if (pair.second > 1) {
sum += (pair.first * pair.second);
}
}
return sum;
}
| int main() {
assert(func0({1, 2, 3, 1, 1, 4, 5, 6}, 8) == 3);
assert(func0({1, 2, 3, 1, 1}, 5) == 3);
assert(func0({1, 1, 2}, 3) == 2);
assert(func0({1, 1, 2, 3, 4, 5, 6, 3, 5}, 9) == 18);
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> > const&, int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x88,%rsp
mov %rdi,-0x88(%rbp)
mov %esi,-0x8c(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
lea -0x50(%rbp),%rax
mov %rax,%rdi
callq 1aae <_ZNSt13unordered_mapIiiSt4hash... | _Z5func0RKSt6vectorIiSaIiEEi:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 88h
mov [rbp+var_88], rdi
mov [rbp+var_8C], esi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_50]
mov rdi, rax
call _ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairI... | long long func0(long long a1)
{
_DWORD *v1; // rax
unsigned int v2; // ebx
int v4; // [rsp+10h] [rbp-80h] BYREF
unsigned int v5; // [rsp+14h] [rbp-7Ch]
long long v6; // [rsp+18h] [rbp-78h] BYREF
_QWORD v7[2]; // [rsp+20h] [rbp-70h] BYREF
_BYTE *v8; // [rsp+30h] [rbp-60h]
_DWORD *v9; // [rsp+38h] [rbp-5... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x88
MOV qword ptr [RBP + -0x88],RDI
MOV dword ptr [RBP + -0x8c],ESI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x50]
MOV RDI,RAX
CALL 0x00101b7e
MOV RAX,qword ptr [RBP + -0x88]
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qwor... | /* func0(std::vector<int, std::allocator<int> > const&, int) */
int func0(vector *param_1,int param_2)
{
int iVar1;
bool bVar2;
char cVar3;
int *piVar4;
long in_FS_OFFSET;
int local_88;
int local_84;
int8 local_80;
int8 local_78;
vector<int,std::allocator<int>> *local_70;
unordered_map<int,int,s... |
165 | func0 |
#include <vector>
#include <unordered_map>
#include <cassert>
| int func0(const std::vector<int>& arr, int n) {
std::unordered_map<int, int> count;
for (int num : arr) {
count[num]++;
}
int sum = 0;
for (auto& pair : count) {
if (pair.second > 1) {
sum += (pair.first * pair.second);
}
}
return sum;
}
| int main() {
assert(func0({1, 2, 3, 1, 1, 4, 5, 6}, 8) == 3);
assert(func0({1, 2, 3, 1, 1}, 5) == 3);
assert(func0({1, 1, 2}, 3) == 2);
assert(func0({1, 1, 2, 3, 4, 5, 6, 3, 5}, 9) == 18);
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> > const&, int):
endbr64
push %r12
push %rbp
push %rbx
sub $0x50,%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,0x28(%rsp)
movl $0x3f800000,0x30... | _Z5func0RKSt6vectorIiSaIiEEi:
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+v... | long long func0(int **a1)
{
int *v1; // rbx
int *v2; // rbp
_DWORD *v3; // rax
long long *v4; // rax
unsigned int v5; // ebx
int v6; // edx
int v8; // [rsp+Ch] [rbp-5Ch] BYREF
_QWORD v9[2]; // [rsp+10h] [rbp-58h] BYREF
long long *v10; // [rsp+20h] [rbp-48h]
long long v11; // [rsp+28h] [rbp-40h]
i... | 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&, int) */
int func0(vector *param_1,int param_2)
{
int *piVar1;
int *piVar2;
long *plVar3;
int iVar4;
int *piVar5;
long in_FS_OFFSET;
int local_5c;
int8 *local_58;
int8 local_50;
long *local_48;
int8 local_40;
int4 local_38;
int8 local_30... |
166 | func0 |
#include <vector>
#include <unordered_map>
#include <cassert>
| int func0(const std::vector<int>& arr, int n) {
std::unordered_map<int, int> count;
for (int num : arr) {
count[num]++;
}
int sum = 0;
for (auto& pair : count) {
if (pair.second > 1) {
sum += (pair.first * pair.second);
}
}
return sum;
}
| int main() {
assert(func0({1, 2, 3, 1, 1, 4, 5, 6}, 8) == 3);
assert(func0({1, 2, 3, 1, 1}, 5) == 3);
assert(func0({1, 1, 2}, 3) == 2);
assert(func0({1, 1, 2, 3, 4, 5, 6, 3, 5}, 9) == 18);
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> > const&, int):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x68,%rsp
mov (%rdi),%rbx
mov 0x8(%rdi),%r15
mov %fs:0x28,%rax
mov %rax,0x58(%rsp)
xor %eax,%eax
lea 0x50(%rsp),%rsi
movl $0x3f800000,0x40(%rsp)
mov %... | _Z5func0RKSt6vectorIiSaIiEEi:
endbr64
push r13
push r12
push rbp
push rbx
sub rsp, 58h
mov rbx, [rdi]
mov r12, [rdi+8]
mov rax, fs:28h
mov [rsp+78h+var_30], rax
xor eax, eax
lea rax, [rsp+78h+var_38]
lea rbp, [rsp+78h+var_68]
mov [rsp+78h+var_60], 1
mov [rsp+78h+var_6... | long long func0(int **a1)
{
int *v1; // rbx
int *v2; // r12
_DWORD *v3; // rax
long long *v4; // rax
unsigned int v5; // ebx
int v6; // edx
int v8; // [rsp+Ch] [rbp-6Ch] BYREF
_QWORD v9[2]; // [rsp+10h] [rbp-68h] BYREF
long long *v10; // [rsp+20h] [rbp-58h]
long long v11; // [rsp+28h] [rbp-50h]
i... | func0:
ENDBR64
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x58
MOV RBX,qword ptr [RDI]
MOV R12,qword ptr [RDI + 0x8]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x48],RAX
XOR EAX,EAX
LEA RAX,[RSP + 0x40]
LEA RBP,[RSP + 0x10]
MOV qword ptr [RSP + 0x18],0x1
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x20],... | /* func0(std::vector<int, std::allocator<int> > const&, int) */
int func0(vector *param_1,int param_2)
{
int *piVar1;
int *piVar2;
long *plVar3;
int iVar4;
int *piVar5;
long in_FS_OFFSET;
int local_6c;
int8 *local_68;
int8 local_60;
long *local_58;
int8 local_50;
int4 local_48;
int8 local_40... |
167 | func0 |
#include <vector>
#include <unordered_map>
#include <cassert>
| int func0(const std::vector<int>& arr, int n) {
std::unordered_map<int, int> count;
for (int num : arr) {
count[num]++;
}
int sum = 0;
for (auto& pair : count) {
if (pair.second > 1) {
sum += (pair.first * pair.second);
}
}
return sum;
}
| int main() {
assert(func0({1, 2, 3, 1, 1, 4, 5, 6}, 8) == 3);
assert(func0({1, 2, 3, 1, 1}, 5) == 3);
assert(func0({1, 1, 2}, 3) == 2);
assert(func0({1, 1, 2, 3, 4, 5, 6, 3, 5}, 9) == 18);
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> > const&, int):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x68,%rsp
mov (%rdi),%rbx
mov 0x8(%rdi),%r15
mov %fs:0x28,%rax
mov %rax,0x58(%rsp)
xor %eax,%eax
lea 0x50(%rsp),%rax
movl $0x3f800000,0x40(%rsp)
mov %... | _Z5func0RKSt6vectorIiSaIiEEi:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 68h
mov r12, [rdi]
mov r15, [rdi+8]
mov rax, fs:28h
mov [rsp+98h+var_40], rax
xor eax, eax
lea r8, [rsp+98h+s]
mov [rsp+98h+var_58], 3F800000h
mov [rsp+98h+var_80], ... | long long func0(int **a1)
{
int *v1; // r12
int *v2; // r15
_QWORD *v3; // r8
unsigned long long i; // rdi
unsigned long long v5; // r13
int v6; // ebp
long long **v7; // r9
long long *v8; // rax
int v9; // ecx
_DWORD *v10; // rax
_DWORD *v11; // rbx
unsigned long long v12; // rdx
char v13; /... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x68
MOV R12,qword ptr [RDI]
MOV R15,qword ptr [RDI + 0x8]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x58],RAX
XOR EAX,EAX
LEA R8,[RSP + 0x50]
MOV dword ptr [RSP + 0x40],0x3f800000
MOV qword ptr [RSP + 0x18],R8
MOV qword ptr [RSP + 0x20... | /* func0(std::vector<int, std::allocator<int> > const&, int) */
int func0(vector *param_1,int param_2)
{
int *piVar1;
long *plVar2;
int iVar3;
int *piVar4;
char cVar5;
long *plVar6;
long *plVar7;
void *__s;
int8 *puVar8;
ulong uVar9;
ulong extraout_RDX;
int iVar10;
long *plVar11;
ulong uVa... |
168 | func0 | #include <iostream>
#include <regex>
#include <cassert>
| std::string func0(const std::string &text) {
std::regex pattern("^[a-z]+_[a-z]+$");
if (std::regex_search(text, pattern)) {
return "Found a match!";
} else {
return "Not matched!";
}
}
| int main() {
assert(func0("aab_cbbbc") == "Found a match!");
assert(func0("aab_Abbbc") == "Not matched!");
assert(func0("Aaab_abbbc") == "Not matched!");
assert(func0("aab-cbbbc") == "Not matched!");
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 $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 ... | _Z5func0RKNSt7__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, aAZAZ; "^[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 0x001062e8
LEA RCX,[RBP + -0x... | /* func0(std::string const&) */
string * func0(string *param_1)
{
bool bVar1;
string *in_RSI;
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]+... |
169 | func0 | #include <iostream>
#include <regex>
#include <cassert>
| std::string func0(const std::string &text) {
std::regex pattern("^[a-z]+_[a-z]+$");
if (std::regex_search(text, pattern)) {
return "Found a match!";
} else {
return "Not matched!";
}
}
| int main() {
assert(func0("aab_cbbbc") == "Found a match!");
assert(func0("aab_Abbbc") == "Not matched!");
assert(func0("Aaab_abbbc") == "Not matched!");
assert(func0("aab-cbbbc") == "Not matched!");
return 0;
}
| O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r13
push %r12
push %rbp
push %rbx
sub $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 <_ZN... | _Z5func0RKNSt7__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 __Z... | 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 0x001046d0
MOV qword ptr [RBP + -0x60],0x0
MOV qword ptr [RBP + -0x58],0x0
MOV ECX,0x10
LEA RDX,[0x... | /* func0(std::string const&) */
string * func0(string *param_1)
{
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
_Sp_counted_base<(_Lock_policy)2> *p_Var2;
bool bVar3;
int iVar4;
int8 *in_RSI;
long in_FS_OFFSET;
regex local_78 [8];
int local_70 [8];
int8 local_68;
_Sp_counted_base<(_Lock_policy)2> *lo... | |
170 | func0 | #include <iostream>
#include <regex>
#include <cassert>
| std::string func0(const std::string &text) {
std::regex pattern("^[a-z]+_[a-z]+$");
if (std::regex_search(text, pattern)) {
return "Found a match!";
} else {
return "Not matched!";
}
}
| int main() {
assert(func0("aab_cbbbc") == "Found a match!");
assert(func0("aab_Abbbc") == "Not matched!");
assert(func0("Aaab_abbbc") == "Not matched!");
assert(func0("aab-cbbbc") == "Not matched!");
return 0;
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
mov %rsi,%rbx
sub $0x50,%rsp
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
lea 0x20(%rsp),%r13
lea 0x8(%rsp),%rbp... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r14
mov r14, rsi
push r13
lea r13, [rbp+var_70]
push r12
lea r12, [rbp+var_68]
push rbx
mov rbx, rdi
mov rdi, r12; this
sub rsp, 50h
mov rax, fs:28h
mov [rbp+var_28], rax... | long long func0(long long a1, long long *a2)
{
long long v3; // rdi
long long v4; // rsi
long long v5; // rsi
char v6; // r13
long long v7; // rdi
long long v8; // rdx
volatile signed __int32 *v9; // rcx
signed __int32 v10; // eax
long long v12; // rax
_BYTE v13[8]; // [rsp+0h] [rbp-70h] BYREF
_B... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R14
MOV R14,RSI
PUSH R13
LEA R13,[RBP + -0x70]
PUSH R12
LEA R12,[RBP + -0x68]
PUSH RBX
MOV RBX,RDI
MOV RDI,R12
SUB RSP,0x50
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
XOR EAX,EAX
CALL 0x001036d0
LEA RDX,[0x118686]
PXOR XMM0,XMM0
MOV RDI,R13
MOV ECX,0x10
LEA RSI,... | /* func0(std::string const&) */
string * func0(string *param_1)
{
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
int8 uVar2;
bool bVar3;
int iVar4;
int8 *in_RSI;
long in_FS_OFFSET;
regex local_78 [8];
int local_70 [8];
int local_68 [16];
int local_58 [16];
int local_48 [16];
long local_30;
lo... |
171 | func0 | #include <iostream>
#include <regex>
#include <cassert>
| std::string func0(const std::string &text) {
std::regex pattern("^[a-z]+_[a-z]+$");
if (std::regex_search(text, pattern)) {
return "Found a match!";
} else {
return "Not matched!";
}
}
| int main() {
assert(func0("aab_cbbbc") == "Found a match!");
assert(func0("aab_Abbbc") == "Not matched!");
assert(func0("Aaab_abbbc") == "Not matched!");
assert(func0("aab-cbbbc") == "Not matched!");
return 0;
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
mov %rsi,%rbx
sub $0x50,%rsp
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
lea 0x20(%rsp),%r13
lea 0x8(%rsp),%rbp... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
mov r15, rsi
push r14
push r13
push r12
push rbp
push rbx
mov rbx, rdi
sub rsp, 2B8h
mov rax, fs:28h
mov [rsp+2E8h+var_40], rax
xor eax, eax
lea r14, [rsp+2E8h+var_2A0]
mov rdi, r14; this
c... | long long func0(long long a1, unsigned long long *a2)
{
__m128i v3; // xmm0
long long v4; // rdi
void *v5; // rdi
void **v6; // rbp
unsigned long long v7; // r12
void *v8; // rdi
unsigned long long v9; // r13
unsigned long long v10; // rbp
long long v11; // rax
long long v12; // rcx
unsigned long... | func0:
ENDBR64
PUSH R15
MOV R15,RSI
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV RBX,RDI
SUB RSP,0x2b8
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x2a8],RAX
XOR EAX,EAX
LEA R14,[RSP + 0x48]
MOV RDI,R14
CALL 0x00104730
LEA RDX,[0x11a6cb]
PXOR XMM0,XMM0
LEA RDI,[RSP + 0x110]
MOV R8D,0x10
MOV RCX,R14
LEA RSI,[RD... | /* func0(std::string const&) */
string * func0(string *param_1)
{
ulong uVar1;
int8 uVar2;
ulong uVar3;
int auVar4 [16];
bool bVar5;
char cVar6;
long lVar7;
int8 *puVar8;
int8 *puVar9;
ulong uVar10;
ulong *puVar11;
long lVar12;
ulong uVar13;
ulong *in_RSI;
uint *puVar14;
_Match_mode _V... |
172 | func0 |
#include <iostream>
#include <regex>
#include <cassert>
| std::string func0(const std::string& text) {
std::regex pattern("^[a-zA-Z0-9_]+");
if (std::regex_search(text, pattern))
return "Found a match!";
else
return "Not matched!";
}
| int main() {
assert(func0(" python") == "Not matched!");
assert(func0("python") == "Found a match!");
assert(func0(" lang") == "Not matched!");
assert(func0("foo") == "Found a match!");
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 $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 ... | _Z5func0RKNSt7__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, aAZaZ09; "^[a-zA-Z0... | 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 0x001062e8
LEA RCX,[RBP + -0x... | /* func0(std::string const&) */
string * func0(string *param_1)
{
bool bVar1;
string *in_RSI;
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-zA-... |
173 | func0 |
#include <iostream>
#include <regex>
#include <cassert>
| std::string func0(const std::string& text) {
std::regex pattern("^[a-zA-Z0-9_]+");
if (std::regex_search(text, pattern))
return "Found a match!";
else
return "Not matched!";
}
| int main() {
assert(func0(" python") == "Not matched!");
assert(func0("python") == "Found a match!");
assert(func0(" lang") == "Not matched!");
assert(func0("foo") == "Found a match!");
return 0;
}
| O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r13
push %r12
push %rbp
push %rbx
sub $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 <_ZN... | _Z5func0RKNSt7__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 __Z... | 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 0x001046d0
MOV qword ptr [RBP + -0x60],0x0
MOV qword ptr [RBP + -0x58],0x0
MOV ECX,0x10
LEA RDX,[0x... | /* func0(std::string const&) */
string * func0(string *param_1)
{
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
_Sp_counted_base<(_Lock_policy)2> *p_Var2;
bool bVar3;
int iVar4;
int8 *in_RSI;
long in_FS_OFFSET;
regex local_78 [8];
int local_70 [8];
int8 local_68;
_Sp_counted_base<(_Lock_policy)2> *lo... | |
174 | func0 |
#include <iostream>
#include <regex>
#include <cassert>
| std::string func0(const std::string& text) {
std::regex pattern("^[a-zA-Z0-9_]+");
if (std::regex_search(text, pattern))
return "Found a match!";
else
return "Not matched!";
}
| int main() {
assert(func0(" python") == "Not matched!");
assert(func0("python") == "Found a match!");
assert(func0(" lang") == "Not matched!");
assert(func0("foo") == "Found a match!");
return 0;
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
mov %rsi,%rbx
sub $0x50,%rsp
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
lea 0x20(%rsp),%r13
lea 0x8(%rsp),%rbp... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r14
mov r14, rsi
push r13
lea r13, [rbp+var_70]
push r12
lea r12, [rbp+var_68]
push rbx
mov rbx, rdi
mov rdi, r12; this
sub rsp, 50h
mov rax, fs:28h
mov [rbp+var_28], rax... | long long func0(long long a1, long long *a2)
{
long long v3; // rdi
long long v4; // rsi
long long v5; // rsi
char v6; // r13
long long v7; // rdi
long long v8; // rdx
volatile signed __int32 *v9; // rcx
signed __int32 v10; // eax
long long v12; // rax
_BYTE v13[8]; // [rsp+0h] [rbp-70h] BYREF
_B... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R14
MOV R14,RSI
PUSH R13
LEA R13,[RBP + -0x70]
PUSH R12
LEA R12,[RBP + -0x68]
PUSH RBX
MOV RBX,RDI
MOV RDI,R12
SUB RSP,0x50
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
XOR EAX,EAX
CALL 0x001036d0
LEA RDX,[0x118689]
PXOR XMM0,XMM0
MOV RDI,R13
MOV ECX,0x10
LEA RSI,... | /* func0(std::string const&) */
string * func0(string *param_1)
{
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
int8 uVar2;
bool bVar3;
int iVar4;
int8 *in_RSI;
long in_FS_OFFSET;
regex local_78 [8];
int local_70 [8];
int local_68 [16];
int local_58 [16];
int local_48 [16];
long local_30;
lo... |
175 | func0 |
#include <iostream>
#include <regex>
#include <cassert>
| std::string func0(const std::string& text) {
std::regex pattern("^[a-zA-Z0-9_]+");
if (std::regex_search(text, pattern))
return "Found a match!";
else
return "Not matched!";
}
| int main() {
assert(func0(" python") == "Not matched!");
assert(func0("python") == "Found a match!");
assert(func0(" lang") == "Not matched!");
assert(func0("foo") == "Found a match!");
return 0;
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
mov %rsi,%rbx
sub $0x50,%rsp
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
lea 0x20(%rsp),%r13
lea 0x8(%rsp),%rbp... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
mov r15, rsi
push r14
push r13
push r12
push rbp
push rbx
mov rbx, rdi
sub rsp, 2B8h
mov rax, fs:28h
mov [rsp+2E8h+var_40], rax
xor eax, eax
lea r14, [rsp+2E8h+var_2A0]
mov rdi, r14; this
c... | long long func0(long long a1, unsigned long long *a2)
{
__m128i v3; // xmm0
long long v4; // rdi
void *v5; // rdi
void **v6; // rbp
unsigned long long v7; // r12
void *v8; // rdi
unsigned long long v9; // r13
unsigned long long v10; // rbp
long long v11; // rax
long long v12; // rcx
unsigned long... | func0:
ENDBR64
PUSH R15
MOV R15,RSI
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV RBX,RDI
SUB RSP,0x2b8
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x2a8],RAX
XOR EAX,EAX
LEA R14,[RSP + 0x48]
MOV RDI,R14
CALL 0x00104730
LEA RDX,[0x11a6ce]
PXOR XMM0,XMM0
LEA RDI,[RSP + 0x110]
MOV R8D,0x10
MOV RCX,R14
LEA RSI,[RD... | /* func0(std::string const&) */
string * func0(string *param_1)
{
ulong uVar1;
int8 uVar2;
ulong uVar3;
int auVar4 [16];
bool bVar5;
char cVar6;
long lVar7;
int8 *puVar8;
int8 *puVar9;
ulong uVar10;
ulong *puVar11;
long lVar12;
ulong uVar13;
ulong *in_RSI;
uint *puVar14;
_Match_mode _V... |
176 | func0 |
#include <iostream>
#include <vector>
#include <assert.h>
int find_gcd(int x, int y) {
while (y != 0) {
int temp = x % y;
x = y;
y = temp;
}
return x;
}
| int func0(std::vector<int> l) {
int num1 = l[0];
int num2 = l[1];
int gcd = find_gcd(num1, num2);
for (size_t i = 2; i < l.size(); i++) {
gcd = find_gcd(gcd, l[i]);
}
return gcd;
}
| int main() {
assert(func0({2, 4, 6, 8, 16}) == 2);
assert(func0({1, 2, 3}) == 1);
assert(func0({2, 4, 6, 8}) == 2);
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> >):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x30,%rsp
mov %rdi,-0x28(%rbp)
mov -0x28(%rbp),%rax
mov $0x0,%esi
mov %rax,%rdi
callq 163c <_ZNSt6vectorIiSaIiEEixEm>
mov (%rax),%eax
mov %eax,-0x10(%rbp)
mov -0x28(%rbp),%rax
mov $0x1,%esi
mov %rax,%... | _Z5func0St6vectorIiSaIiEE:
endbr64
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_28], rdi
mov rax, [rbp+var_28]
mov esi, 0
mov rdi, rax
call _ZNSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong)
mov eax, [rax]
mov [rbp+var_10], eax
mov rax, [rbp+var_28]
mov esi, 1... | long long func0(long long a1)
{
int *v1; // rax
unsigned int gcd; // [rsp+1Ch] [rbp-14h]
int v4; // [rsp+20h] [rbp-10h]
int v5; // [rsp+24h] [rbp-Ch]
unsigned long long i; // [rsp+28h] [rbp-8h]
v4 = *(_DWORD *)std::vector<int>::operator[](a1, 0LL);
v5 = *(_DWORD *)std::vector<int>::operator[](a1, 1LL);
... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x28],RDI
MOV RAX,qword ptr [RBP + -0x28]
MOV ESI,0x0
MOV RDI,RAX
CALL 0x0010161a
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x10],EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV ESI,0x1
MOV RDI,RAX
CALL 0x0010161a
MOV EAX,dword ptr [RAX]
MOV dword ptr [... | /* func0(std::vector<int, std::allocator<int> >) */
int func0(vector param_1)
{
int iVar1;
int *piVar2;
ulong uVar3;
int4 in_register_0000003c;
vector<int,std::allocator<int>> *this;
int4 local_1c;
int8 local_10;
this = (vector<int,std::allocator<int>> *)CONCAT44(in_register_0000003c,param_1);
pi... |
177 | func0 |
#include <iostream>
#include <vector>
#include <assert.h>
int find_gcd(int x, int y) {
while (y != 0) {
int temp = x % y;
x = y;
y = temp;
}
return x;
}
| int func0(std::vector<int> l) {
int num1 = l[0];
int num2 = l[1];
int gcd = find_gcd(num1, num2);
for (size_t i = 2; i < l.size(); i++) {
gcd = find_gcd(gcd, l[i]);
}
return gcd;
}
| int main() {
assert(func0({2, 4, 6, 8, 16}) == 2);
assert(func0({1, 2, 3}) == 1);
assert(func0({2, 4, 6, 8}) == 2);
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> >):
endbr64
mov %rdi,%rsi
mov (%rdi),%rdi
mov (%rdi),%eax
mov 0x4(%rdi),%ecx
test %ecx,%ecx
je 1287 <_Z5func0St6vectorIiSaIiEE+0x20>
cltd
idiv %ecx
mov %ecx,%eax
test %edx,%edx
je 1289 <_Z5func0St6vectorIiSaIiEE+0x22>
mov %edx,%ecx
jmp 127a <... | _Z5func0St6vectorIiSaIiEE:
endbr64
mov r9, [rdi]
mov eax, [r9]
mov esi, [r9+4]
test esi, esi
jz short loc_1283
loc_1239:
mov ecx, esi
cdq
idiv esi
mov esi, edx
mov eax, ecx
test edx, edx
jnz short loc_1239
loc_1246:
mov rax, [rdi+8]
sub rax, r9
mov r10, rax
sar ... | long long func0(char **a1)
{
char *v1; // r9
int v2; // eax
int v3; // esi
int v4; // ecx
unsigned long long v5; // r10
unsigned long long v6; // r8
int i; // esi
int v8; // edi
v1 = *a1;
v2 = *(_DWORD *)*a1;
v3 = *((_DWORD *)*a1 + 1);
if ( v3 )
{
do
{
v4 = v3;
v3 = v2 % ... | func0:
ENDBR64
MOV R9,qword ptr [RDI]
MOV EAX,dword ptr [R9]
MOV ESI,dword ptr [R9 + 0x4]
TEST ESI,ESI
JZ 0x00101283
LAB_00101239:
MOV ECX,ESI
CDQ
IDIV ESI
MOV ESI,EDX
MOV EAX,ECX
TEST EDX,EDX
JNZ 0x00101239
LAB_00101246:
MOV RAX,qword ptr [RDI + 0x8]
SUB RAX,R9
MOV R10,RAX
SAR R10,0x2
CMP RAX,0x8
JBE 0x00101280
MOV R8... | /* func0(std::vector<int, std::allocator<int> >) */
int func0(vector param_1)
{
int *piVar1;
int iVar2;
ulong uVar3;
int iVar4;
int iVar5;
int4 in_register_0000003c;
ulong uVar6;
piVar1 = *(int **)CONCAT44(in_register_0000003c,param_1);
iVar4 = *piVar1;
iVar2 = piVar1[1];
while (iVar2 != 0) {... |
178 | func0 |
#include <iostream>
#include <vector>
#include <assert.h>
int find_gcd(int x, int y) {
while (y != 0) {
int temp = x % y;
x = y;
y = temp;
}
return x;
}
| int func0(std::vector<int> l) {
int num1 = l[0];
int num2 = l[1];
int gcd = find_gcd(num1, num2);
for (size_t i = 2; i < l.size(); i++) {
gcd = find_gcd(gcd, l[i]);
}
return gcd;
}
| int main() {
assert(func0({2, 4, 6, 8, 16}) == 2);
assert(func0({1, 2, 3}) == 1);
assert(func0({2, 4, 6, 8}) == 2);
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> >):
endbr64
mov (%rdi),%rsi
mov 0x4(%rsi),%edx
mov (%rsi),%eax
test %edx,%edx
je 15cc <_Z5func0St6vectorIiSaIiEE+0x5c>
mov %edx,%r8d
cltd
idiv %r8d
mov %r8d,%eax
test %edx,%edx
jne 1580 <_Z5func0St6vectorIiSaIiEE+0x10>
mov 0x8(%rdi),%rdi
mov %... | _Z5func0St6vectorIiSaIiEE:
endbr64
mov r8, [rdi]
mov edx, [r8+4]
mov eax, [r8]
test edx, edx
jz short loc_1407
nop word ptr [rax+rax+00h]
loc_13B8:
mov ecx, edx
cdq
idiv ecx
mov eax, ecx
test edx, edx
jnz short loc_13B8
loc_13C3:
mov rax, [rdi+8]
sub rax, r8
mov rdi... | long long func0(unsigned int **a1)
{
char *v1; // r8
int v2; // edx
signed int v3; // eax
unsigned int v4; // ecx
long long v5; // rax
unsigned long long v6; // rdi
unsigned long long v7; // rsi
int v8; // edx
signed int v9; // eax
v1 = (char *)*a1;
v2 = (*a1)[1];
v3 = **a1;
if ( v2 )
{
... | func0:
ENDBR64
MOV R8,qword ptr [RDI]
MOV EDX,dword ptr [R8 + 0x4]
MOV EAX,dword ptr [R8]
TEST EDX,EDX
JZ 0x00101407
NOP word ptr [RAX + RAX*0x1]
LAB_001013b8:
MOV ECX,EDX
CDQ
IDIV ECX
MOV EAX,ECX
TEST EDX,EDX
JNZ 0x001013b8
LAB_001013c3:
MOV RAX,qword ptr [RDI + 0x8]
SUB RAX,R8
MOV RDI,RAX
SAR RDI,0x2
CMP RAX,0x8
JBE ... | /* func0(std::vector<int, std::allocator<int> >) */
int func0(vector param_1)
{
int *piVar1;
int iVar2;
int iVar3;
ulong uVar4;
int iVar5;
ulong uVar6;
int4 in_register_0000003c;
piVar1 = *(int **)CONCAT44(in_register_0000003c,param_1);
iVar3 = piVar1[1];
iVar5 = *piVar1;
while (iVar2 = iVar3... |
179 | func0 |
#include <iostream>
#include <vector>
#include <assert.h>
int find_gcd(int x, int y) {
while (y != 0) {
int temp = x % y;
x = y;
y = temp;
}
return x;
}
| int func0(std::vector<int> l) {
int num1 = l[0];
int num2 = l[1];
int gcd = find_gcd(num1, num2);
for (size_t i = 2; i < l.size(); i++) {
gcd = find_gcd(gcd, l[i]);
}
return gcd;
}
| int main() {
assert(func0({2, 4, 6, 8, 16}) == 2);
assert(func0({1, 2, 3}) == 1);
assert(func0({2, 4, 6, 8}) == 2);
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> >):
endbr64
mov (%rdi),%rsi
mov 0x4(%rsi),%edx
mov (%rsi),%eax
test %edx,%edx
je 15ac <_Z5func0St6vectorIiSaIiEE+0x5c>
mov %edx,%r8d
cltd
idiv %r8d
mov %r8d,%eax
test %edx,%edx
jne 1560 <_Z5func0St6vectorIiSaIiEE+0x10>
mov 0x8(%rdi),%rdi
mov %... | _Z5func0St6vectorIiSaIiEE:
endbr64
mov r8, [rdi]
mov edx, [r8+4]
mov eax, [r8]
test edx, edx
jz short loc_1537
nop word ptr [rax+rax+00h]
loc_14E8:
mov ecx, edx
cdq
idiv ecx
mov eax, ecx
test edx, edx
jnz short loc_14E8
loc_14F3:
mov rax, [rdi+8]
sub rax, r8
mov rdi... | long long func0(unsigned int **a1)
{
char *v1; // r8
int v2; // edx
signed int v3; // eax
unsigned int v4; // ecx
long long v5; // rax
unsigned long long v6; // rdi
unsigned long long v7; // rsi
int v8; // edx
signed int v9; // eax
v1 = (char *)*a1;
v2 = (*a1)[1];
v3 = **a1;
if ( v2 )
{
... | func0:
ENDBR64
MOV R8,qword ptr [RDI]
MOV EDX,dword ptr [R8 + 0x4]
MOV EAX,dword ptr [R8]
TEST EDX,EDX
JZ 0x00101537
NOP word ptr [RAX + RAX*0x1]
LAB_001014e8:
MOV ECX,EDX
CDQ
IDIV ECX
MOV EAX,ECX
TEST EDX,EDX
JNZ 0x001014e8
LAB_001014f3:
MOV RAX,qword ptr [RDI + 0x8]
SUB RAX,R8
MOV RDI,RAX
SAR RDI,0x2
CMP RAX,0x8
JBE ... | /* func0(std::vector<int, std::allocator<int> >) */
int func0(vector param_1)
{
int *piVar1;
int iVar2;
int iVar3;
ulong uVar4;
int iVar5;
ulong uVar6;
int4 in_register_0000003c;
piVar1 = *(int **)CONCAT44(in_register_0000003c,param_1);
iVar3 = piVar1[1];
iVar5 = *piVar1;
while (iVar2 = iVar3... |
180 | func0 |
#include <vector>
#include <unordered_set>
#include <assert.h>
| bool func0(const std::vector<int>& data) {
std::unordered_set<int> unique_elements(data.begin(), data.end());
return data.size() == unique_elements.size();
}
| int main() {
assert(func0({1, 5, 7, 9}) == true);
assert(func0({2, 4, 5, 5, 7, 9}) == false);
assert(func0({1, 2, 3}) == true);
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x68,%rsp
mov %rdi,-0x68(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
lea -0x51(%rbp),%rax
mov %rax,%rdi
callq 198e <_ZNSaIiEC1Ev>
mov -0x68(%rbp),%rax
mov %rax,%rdi
call... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 68h
mov [rbp+var_68], rdi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_59]
mov [rbp+var_58], rax
nop
nop
mov rax, [rbp+var_68]
mov rdi, rax
call _ZNKSt6vectorIiSaIiEE3end... | long long func0(long long a1)
{
int v1; // ebx
int v2; // esi
long long v3; // rbx
char v5; // [rsp+15h] [rbp-5Bh] BYREF
char v6; // [rsp+16h] [rbp-5Ah] BYREF
char v7; // [rsp+17h] [rbp-59h] BYREF
char *v8; // [rsp+18h] [rbp-58h]
_BYTE v9[56]; // [rsp+20h] [rbp-50h] BYREF
unsigned long long v10; // [... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x68
MOV qword ptr [RBP + -0x68],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x59]
MOV qword ptr [RBP + -0x58],RAX
NOP
NOP
MOV RAX,qword ptr [RBP + -0x68]
MOV RDI,RAX
CALL 0x001018c6
MOV RBX,RAX
MOV RAX,qword ptr [RBP +... | /* func0(std::vector<int, std::allocator<int> > const&) */
ulong func0(vector *param_1)
{
__normal_iterator _Var1;
__normal_iterator _Var2;
long lVar3;
long lVar4;
long in_FS_OFFSET;
hash local_63;
equal_to local_62;
allocator local_61;
allocator *local_60;
unordered_set<int,std::hash<int>,std::eq... |
181 | func0 |
#include <vector>
#include <unordered_set>
#include <assert.h>
| bool func0(const std::vector<int>& data) {
std::unordered_set<int> unique_elements(data.begin(), data.end());
return data.size() == unique_elements.size();
}
| int main() {
assert(func0({1, 5, 7, 9}) == true);
assert(func0({2, 4, 5, 5, 7, 9}) == false);
assert(func0({1, 2, 3}) == 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 %rdi,%rbp
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
mov 0x8(%rdi),%r12
mov (%rdi),%rbx
lea 0x40(%rsp),%rax
mov %rax,0x10(%rsp)
mov... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 50h
mov r13, rdi
mov rax, fs:28h
mov [rsp+78h+var_30], rax
xor eax, eax
mov rbp, [rdi+8]
mov r14, [rdi]
lea rax, [rsp+78h+var_38]
mov [rsp+78h+var_68], rax
mov [rsp+78h+var_6... | long long func0(long long *a1)
{
long long v1; // rbp
long long v2; // r14
unsigned long long bkt; // rax
int v4; // r8d
int v5; // r9d
unsigned long long v6; // rbx
long long i; // rbx
long long v9; // [rsp+0h] [rbp-78h]
_QWORD **v10; // [rsp+8h] [rbp-70h] BYREF
_QWORD *v11; // [rsp+10h] [rbp-68h]... | func0:
ENDBR64
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x50
MOV R13,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x48],RAX
XOR EAX,EAX
MOV RBP,qword ptr [RDI + 0x8]
MOV R14,qword ptr [RDI]
LEA RAX,[RSP + 0x40]
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x18],0x1
MOV qword ptr [RSP + 0x20],... | /* func0(std::vector<int, std::allocator<int> > const&) */
ulong func0(vector *param_1)
{
int *piVar1;
ulong uVar2;
int *piVar3;
long in_FS_OFFSET;
bool bVar4;
int8 *local_68;
ulong local_60;
int8 local_58;
long local_50;
int4 local_48 [2];
int8 local_40;
int8 local_38;
long local_30;
l... |
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.