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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
3,582 | func0 |
#include <vector>
#include <algorithm>
#include <cassert>
bool compareByLast(const std::pair<int, int> &a, const std::pair<int, int> &b) {
return a.second < b.second;
}
| std::vector<std::pair<int, int>> func0(const std::vector<std::pair<int, int>> &tuples) {
std::vector<std::pair<int, int>> sorted_tuples = tuples;
std::sort(sorted_tuples.begin(), sorted_tuples.end(), compareByLast);
return sorted_tuples;
}
| int main() {
assert((func0({{2, 5}, {1, 2}, {4, 4}, {2, 3}, {2, 1}}) == std::vector<std::pair<int, int>>{{2, 1}, {1, 2}, {2, 3}, {4, 4}, {2, 5}}));
assert((func0({{9, 8}, {4, 7}, {3, 5}, {7, 9}, {1, 2}}) == std::vector<std::pair<int, int>>{{1, 2}, {3, 5}, {4, 7}, {9, 8}, {7, 9}}));
assert((func0({{20, 50... | O2 | cpp | func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&):
endbr64
push %r13
mov %rsi,%r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x8,%rsp
mov 0x8(%rsi),%rbx
sub (%rsi),%rbx
movq $0x0,(%rdi)
mov %rbx,%rax
movq $0x0,0x8(%rdi)
sar $0x3,%rax
movq $0x... | _Z5func0RKSt6vectorISt4pairIiiESaIS1_EE:
endbr64
push r14
pxor xmm0, xmm0
push r13
mov r13, rsi
push r12
mov r12, rdi
push rbp
push rbx
mov rbp, [rsi+8]
sub rbp, [rsi]
mov qword ptr [rdi+10h], 0
movups xmmword ptr [rdi], xmm0
jz loc_1760
mov rax, 7FFFFFFFFFFFFFF8h
cmp ... | long long func0(long long a1, long long *a2)
{
unsigned long long v2; // rbp
unsigned long long v3; // rbx
long long v4; // rbp
long long v5; // rcx
long long v6; // rbp
long long v7; // rax
unsigned long long v8; // r13
long long v9; // rdx
unsigned long long v10; // rax
unsigned long long v11; //... | func0:
MOV RDI,R12
CALL 0x001017c0
MOV RDI,RBX
LAB_0010114b:
CALL 0x00101130 | /* func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&) [clone
.cold] */
void func0(vector *param_1)
{
vector<std::pair<int,int>,std::allocator<std::pair<int,int>>> *unaff_R12;
std::vector<std::pair<int,int>,std::allocator<std::pair<int,int>>>::~vector(unaff_R12);
... |
3,583 | func0 |
#include <vector>
#include <algorithm>
#include <cassert>
bool compareByLast(const std::pair<int, int> &a, const std::pair<int, int> &b) {
return a.second < b.second;
}
| std::vector<std::pair<int, int>> func0(const std::vector<std::pair<int, int>> &tuples) {
std::vector<std::pair<int, int>> sorted_tuples = tuples;
std::sort(sorted_tuples.begin(), sorted_tuples.end(), compareByLast);
return sorted_tuples;
}
| int main() {
assert((func0({{2, 5}, {1, 2}, {4, 4}, {2, 3}, {2, 1}}) == std::vector<std::pair<int, int>>{{2, 1}, {1, 2}, {2, 3}, {4, 4}, {2, 5}}));
assert((func0({{9, 8}, {4, 7}, {3, 5}, {7, 9}, {1, 2}}) == std::vector<std::pair<int, int>>{{1, 2}, {3, 5}, {4, 7}, {9, 8}, {7, 9}}));
assert((func0({{20, 50... | O3 | cpp | func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&):
endbr64
push %r14
pxor %xmm0,%xmm0
push %r13
mov %rsi,%r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x10,%rsp
mov 0x8(%rsi),%rbp
sub (%rsi),%rbp
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %ea... | _Z5func0RKSt6vectorISt4pairIiiESaIS1_EE:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
mov r13, rdi
push r12
mov r12, rsi
push rbp
push rbx
sub rsp, 18h
mov rbx, [rsi+8]
sub rbx, [rsi]
movups xmmword ptr [rdi], xmm0
mov qword ptr [rdi+10h], 0
jz loc_1D1A
mov r... | long long func0(long long a1, long long *a2)
{
unsigned long long v4; // rbx
unsigned int *v5; // rbp
long long v6; // rcx
long long v7; // rsi
long long v8; // rcx
long long v9; // rax
const __m128i *v10; // r14
unsigned long long v11; // r12
char *v12; // rbx
long long v13; // r12
signed int v1... | func0:
MOV RDI,R13
CALL 0x00101d60
MOV RDI,RBX
LAB_0010114b:
CALL 0x00101130 | /* func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&) [clone
.cold] */
void func0(vector *param_1)
{
vector<std::pair<int,int>,std::allocator<std::pair<int,int>>> *unaff_R13;
std::vector<std::pair<int,int>,std::allocator<std::pair<int,int>>>::~vector(unaff_R13);
... |
3,584 | func0 |
#include <iostream>
#include <string>
#include <cassert>
#include <sstream>
#include <vector>
#include <iterator>
| bool func0(std::string sentence, std::string word) {
std::istringstream iss(sentence);
std::vector<std::string> words((std::istream_iterator<std::string>(iss)),
std::istream_iterator<std::string>());
for (auto &w : words) {
if (w == word) {
retu... | int main() {
assert(func0("machine learning", "machine") == true);
assert(func0("easy", "fun") == false);
assert(func0("python language", "code") == false);
return 0;
}
| O0 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x248,%rsp
mov %rdi,-0x248(%rbp)
mov %rsi,-0x250(%rbp)
mov %fs:0x28,%rax
mov %rax,... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 258h
mov [rbp+var_258], rdi
mov [rbp+var_260], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rcx, [rbp+var_258]
lea rax, [rbp+var_1A0]
mov edx, 8
mo... | long long func0(long long a1, long long a2)
{
unsigned int v2; // ebx
long long v4; // [rsp+18h] [rbp-248h] BYREF
long long v5; // [rsp+20h] [rbp-240h] BYREF
_BYTE *v6; // [rsp+28h] [rbp-238h]
long long v7; // [rsp+30h] [rbp-230h]
long long *v8; // [rsp+38h] [rbp-228h]
_BYTE v9[32]; // [rsp+40h] [rbp-220... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x258
MOV qword ptr [RBP + -0x258],RDI
MOV qword ptr [RBP + -0x260],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RCX,qword ptr [RBP + -0x258]
LEA RAX,[RBP + -0x1a0]
MOV EDX,0x8
MOV RSI,RCX
MOV RDI,RAX
LAB_0010258f:
CALL 0x00102420
L... | /* func0(std::string, std::string) */
int8 func0(string *param_1,string *param_2)
{
bool bVar1;
int8 uVar2;
long in_FS_OFFSET;
int8 local_250;
int8 local_248;
vector<std::string,std::allocator<std::string>> *local_240;
string *local_238;
int8 *local_230;
vector<std::string,std::allocator<std::string... |
3,585 | func0 |
#include <iostream>
#include <string>
#include <cassert>
#include <sstream>
#include <vector>
#include <iterator>
| bool func0(std::string sentence, std::string word) {
std::istringstream iss(sentence);
std::vector<std::string> words((std::istream_iterator<std::string>(iss)),
std::istream_iterator<std::string>());
for (auto &w : words) {
if (w == word) {
retu... | int main() {
assert(func0("machine learning", "machine") == true);
assert(func0("easy", "fun") == false);
assert(func0("python language", "code") == false);
return 0;
}
| O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x278,%rsp
mov %rdi,%rbx
mov %rsi,%r14
mov %fs:0x28,%r... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 288h
mov rbx, rdi
mov r14, rsi
mov rax, fs:28h
mov [rsp+2B8h+var_40], rax
xor eax, eax
lea rbp, [rsp+2B8h+var_1C8]
lea rdi, [rsp+2B8h+... | _BOOL8 func0(long long *a1, long long a2)
{
long long v3; // rdx
long long v4; // rsi
_QWORD *v5; // rax
char *v6; // rbx
void **v7; // r13
void **v8; // rbp
long long v9; // r12
const void **v10; // rbx
_QWORD *v11; // rax
size_t v12; // rdx
void **v13; // rbx
bool v15; // [rsp+Fh] [rbp-2A9h]
... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x288
MOV RBX,RDI
MOV R14,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x278],RAX
XOR EAX,EAX
LEA RBP,[RSP + 0xf0]
LEA RDI,[RSP + 0x168]
CALL 0x001021b0
LEA RAX,[0x105b78]
MOV qword ptr [RSP + 0x168],RAX
MOV qword ptr [RSP + 0x240],0x0... | /* func0(std::string, std::string) */
bool func0(int8 *param_1,int8 *param_2)
{
char *pcVar1;
size_t sVar2;
size_t __n;
int8 uVar3;
long *plVar4;
long *plVar5;
int iVar6;
int8 uVar7;
istream *piVar8;
long *plVar9;
long *plVar10;
long in_FS_OFFSET;
bool local_2a9;
long *local_2a8;
long *l... |
3,586 | func0 |
#include <iostream>
#include <string>
#include <cassert>
#include <sstream>
#include <vector>
#include <iterator>
| bool func0(std::string sentence, std::string word) {
std::istringstream iss(sentence);
std::vector<std::string> words((std::istream_iterator<std::string>(iss)),
std::istream_iterator<std::string>());
for (auto &w : words) {
if (w == word) {
retu... | int main() {
assert(func0("machine learning", "machine") == true);
assert(func0("easy", "fun") == false);
assert(func0("python language", "code") == false);
return 0;
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
mov %rdi,%rbp
push %rbx
sub $0x2b8,%rsp
mov %rsi,0x8(%rsp)
lea 0x198(... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_:
endbr64
push r15
push r14
push r13
push r12
mov r12, rsi
push rbp
mov rbp, rdi
push rbx
sub rsp, 2D8h
mov rax, fs:28h
mov [rsp+308h+var_40], rax
xor eax, eax
lea rax, [rsp+308h+var_150]
lea rbx, [rsp+308h+... | _BOOL8 func0(long long a1, long long a2)
{
char *v2; // rbx
_BYTE *v3; // rbp
void *v4; // rax
__m128i si128; // xmm2
_QWORD *v6; // rax
char v7; // al
_BYTE *v8; // rbp
char *v9; // rbx
void *v10; // rdx
void *v11; // rdi
_QWORD *v12; // rax
void **v13; // r14
void **v14; // r13
size_t v15... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
MOV R12,RSI
PUSH RBP
MOV RBP,RDI
PUSH RBX
SUB RSP,0x2d8
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x2c8],RAX
XOR EAX,EAX
LEA RAX,[RSP + 0x1b8]
LEA RBX,[RSP + 0x140]
MOV RDI,RAX
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x10],RBX
CALL 0x001021b0
LEA RAX... | /* func0(std::string, std::string) */
ulong func0(int8 *param_1,int8 *param_2)
{
int *__src;
size_t __n;
int8 uVar1;
int8 uVar2;
int iVar3;
istream *piVar4;
ulong uVar5;
int8 *puVar6;
int8 *puVar7;
long *plVar8;
long in_FS_OFFSET;
bool local_2f9;
int local_2a8 [16];
long *local_298;
istr... |
3,587 | func0 |
#include <iostream>
#include <string>
#include <cassert>
#include <sstream>
#include <vector>
#include <iterator>
| bool func0(std::string sentence, std::string word) {
std::istringstream iss(sentence);
std::vector<std::string> words((std::istream_iterator<std::string>(iss)),
std::istream_iterator<std::string>());
for (auto &w : words) {
if (w == word) {
retu... | int main() {
assert(func0("machine learning", "machine") == true);
assert(func0("easy", "fun") == false);
assert(func0("python language", "code") == false);
return 0;
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
mov %rdi,%rbp
push %rbx
sub $0x2c8,%rsp
mov %rsi,(%rsp)
lea 0x1a8(%rs... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_:
endbr64
push r15
push r14
push r13
push r12
mov r12, rsi
push rbp
mov rbp, rdi
push rbx
sub rsp, 2D8h
mov rax, fs:28h
mov [rsp+308h+var_40], rax
xor eax, eax
lea rax, [rsp+308h+var_150]
lea rbx, [rsp+308h+... | _BOOL8 func0(long long a1, long long a2)
{
char *v2; // rbx
_BYTE *v3; // rbp
void *v4; // rax
__m128i v5; // xmm2
_QWORD *v6; // rax
void *v7; // rbx
void *v8; // rbp
_QWORD *v9; // rax
size_t v10; // rbx
const void *v11; // rbp
_QWORD *v12; // rax
_BYTE *v13; // rbp
char v14; // al
long l... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
MOV R12,RSI
PUSH RBP
MOV RBP,RDI
PUSH RBX
SUB RSP,0x2d8
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x2c8],RAX
XOR EAX,EAX
LEA RAX,[RSP + 0x1b8]
LEA RBX,[RSP + 0x140]
MOV RDI,RAX
MOV qword ptr [RSP + 0x20],RBX
MOV qword ptr [RSP + 0x18],RAX
CALL 0x001021b0
LEA RAX... | /* func0(std::string, std::string) */
bool func0(int8 *param_1,int8 *param_2)
{
int *puVar1;
size_t __n;
int8 uVar2;
int8 uVar3;
ulong *__src;
int iVar4;
istream *piVar5;
ulong *puVar6;
ulong uVar7;
int8 *puVar8;
int8 *puVar9;
long in_FS_OFFSET;
bool local_2f1;
ulong local_2b0;
int local... |
3,588 | func0 |
#include <vector>
#include <map>
#include <assert.h>
| std::vector<int> func0(std::vector<int> numbers, int n) {
std::map<int, int> count;
std::vector<int> result;
for (int number : numbers) {
count[number]++;
}
for (auto iter : count) {
if (iter.second == n) {
result.push_back(iter.first);
}
}
retu... | int main() {
assert((func0({1, 1, 3, 4, 4, 5, 6, 7}, 2) == std::vector<int>{1, 4}));
assert((func0({0, 1, 2, 3, 4, 4, 4, 4, 5, 7}, 4) == std::vector<int>{4}));
assert((func0({0, 0, 0, 0, 0}, 5) == std::vector<int>{0}));
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> >, int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x98,%rsp
mov %rdi,-0x88(%rbp)
mov %rsi,-0x90(%rbp)
mov %edx,-0x94(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
lea -0x50(%rbp),%rax
mov %rax,%rdi
callq 1bc2 <_ZNSt3mapIiiS... | _Z5func0St6vectorIiSaIiEEi:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 98h
mov [rbp+var_88], rdi
mov [rbp+var_90], rsi
mov [rbp+var_94], edx
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_50]
mov rdi, rax
call _ZNSt3mapIiiSt4lessIiESaISt4pairIK... | long long func0(long long a1, long long a2, int a3)
{
_DWORD *v3; // rax
long long v6; // [rsp+28h] [rbp-78h] BYREF
_QWORD v7[2]; // [rsp+30h] [rbp-70h] BYREF
_BYTE *v8; // [rsp+40h] [rbp-60h]
long long v9; // [rsp+48h] [rbp-58h] BYREF
_BYTE v10[56]; // [rsp+50h] [rbp-50h] BYREF
unsigned long long v11; /... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x98
MOV qword ptr [RBP + -0x88],RDI
MOV qword ptr [RBP + -0x90],RSI
MOV dword ptr [RBP + -0x94],EDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x50]
MOV RDI,RAX
CALL 0x00101c42
MOV RAX,qword ptr [RBP + -0x88]
MOV RDI,RAX
... | /* func0(std::vector<int, std::allocator<int> >, int) */
vector<int,std::allocator<int>> * func0(vector param_1,int param_2)
{
int8 uVar1;
bool bVar2;
char cVar3;
int4 *puVar4;
int *piVar5;
int8 *puVar6;
int in_EDX;
int4 in_register_00000034;
int4 in_register_0000003c;
vector<int,std::allocator<in... |
3,589 | func0 |
#include <vector>
#include <map>
#include <assert.h>
| std::vector<int> func0(std::vector<int> numbers, int n) {
std::map<int, int> count;
std::vector<int> result;
for (int number : numbers) {
count[number]++;
}
for (auto iter : count) {
if (iter.second == n) {
result.push_back(iter.first);
}
}
retu... | int main() {
assert((func0({1, 1, 3, 4, 4, 5, 6, 7}, 2) == std::vector<int>{1, 4}));
assert((func0({0, 1, 2, 3, 4, 4, 4, 4, 5, 7}, 4) == std::vector<int>{4}));
assert((func0({0, 0, 0, 0, 0}, 5) == std::vector<int>{0}));
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> >, int):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x68,%rsp
mov %rdi,%r13
mov %fs:0x28,%rax
mov %rax,0x58(%rsp)
xor %eax,%eax
movl $0x0,0x28(%rsp)
movq $0x0,0x30(%rsp)
lea 0x28(%rsp),%rax
mov %rax,0x38(%rsp)
... | _Z5func0St6vectorIiSaIiEEi:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 68h
mov r13, rdi
mov rax, fs:28h
mov [rsp+98h+var_40], rax
xor eax, eax
mov [rsp+98h+var_70], 0
mov [rsp+98h+var_68], 0
lea rax, [rsp+98h+var_70]
mov [rsp+98h+var_60],... | _QWORD * func0(_QWORD *a1, int **a2, int a3)
{
int *v4; // r12
int *v5; // r15
long long v7; // rax
int *v8; // rbx
long long insert_hint_unique_pos; // rax
int *v10; // rdx
bool v11; // di
int v12; // ebp
long long i; // rbx
long long v14; // rcx
_DWORD *v15; // rsi
int *v17; // [rsp+0h] [rbp-9... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x68
MOV R13,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x58],RAX
XOR EAX,EAX
MOV dword ptr [RSP + 0x28],0x0
MOV qword ptr [RSP + 0x30],0x0
LEA RAX,[RSP + 0x28]
MOV qword ptr [RSP + 0x38],RAX
MOV qword ptr [RSP + 0x40],RAX
MOV qword ... | /* func0(std::vector<int, std::allocator<int> >, int) */
vector<int,std::allocator<int>> * func0(vector param_1,int param_2)
{
int iVar1;
int *piVar2;
bool bVar3;
_Rb_tree_node_base *p_Var4;
_Rb_tree_node_base *p_Var5;
_Rb_tree_node_base *p_Var6;
int in_EDX;
int4 in_register_00000034;
int4 in_regist... |
3,590 | func0 |
#include <vector>
#include <map>
#include <assert.h>
| std::vector<int> func0(std::vector<int> numbers, int n) {
std::map<int, int> count;
std::vector<int> result;
for (int number : numbers) {
count[number]++;
}
for (auto iter : count) {
if (iter.second == n) {
result.push_back(iter.first);
}
}
retu... | int main() {
assert((func0({1, 1, 3, 4, 4, 5, 6, 7}, 2) == std::vector<int>{1, 4}));
assert((func0({0, 1, 2, 3, 4, 4, 4, 4, 5, 7}, 4) == std::vector<int>{4}));
assert((func0({0, 0, 0, 0, 0}, 5) == std::vector<int>{0}));
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> >, int):
endbr64
push %r15
push %r14
push %r13
mov %rdi,%r13
push %r12
push %rbp
push %rbx
sub $0x78,%rsp
mov %edx,0x14(%rsp)
lea 0x38(%rsp),%rbp
mov %fs:0x28,%rax
mov %rax,0x68(%rsp)
xor %eax,%eax
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi)
movq ... | _Z5func0St6vectorIiSaIiEEi:
endbr64
push r15
pxor xmm0, xmm0
push r14
mov r14, rdi
push r13
push r12
push rbp
push rbx
sub rsp, 78h
mov [rsp+0A8h+var_9C], edx
lea r12, [rsp+0A8h+var_70]
mov rax, fs:28h
mov [rsp+0A8h+var_40], rax
xor eax, eax
mov qword ptr [rdi+10h], ... | long long func0(long long a1, signed int **a2, int a3)
{
signed int *v4; // rax
signed int *v5; // r13
_QWORD *i; // rax
signed int v7; // ebx
int *v8; // rbp
long long v9; // rdx
long long v10; // rcx
_DWORD *v11; // rax
_DWORD *v12; // r15
long long v13; // rax
long long insert_unique_pos; // r... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
MOV R14,RDI
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x78
MOV dword ptr [RSP + 0xc],EDX
LEA R12,[RSP + 0x38]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x68],RAX
XOR EAX,EAX
MOV qword ptr [RDI + 0x10],0x0
MOVUPS xmmword ptr [RDI],XMM0
MOV RAX,qword ptr [RSI + 0x8... | /* func0(std::vector<int, std::allocator<int> >, int) */
vector<int,std::allocator<int>> * func0(vector param_1,int param_2)
{
uint uVar1;
uint *puVar2;
int *piVar3;
_Rb_tree_node_base *p_Var4;
_Rb_tree_node_base *p_Var5;
_Rb_tree_node_base *p_Var6;
int in_EDX;
int4 in_register_00000034;
int4 in_reg... |
3,591 | func0 |
#include <vector>
#include <map>
#include <assert.h>
| std::vector<int> func0(std::vector<int> numbers, int n) {
std::map<int, int> count;
std::vector<int> result;
for (int number : numbers) {
count[number]++;
}
for (auto iter : count) {
if (iter.second == n) {
result.push_back(iter.first);
}
}
retu... | int main() {
assert((func0({1, 1, 3, 4, 4, 5, 6, 7}, 2) == std::vector<int>{1, 4}));
assert((func0({0, 1, 2, 3, 4, 4, 4, 4, 5, 7}, 4) == std::vector<int>{4}));
assert((func0({0, 0, 0, 0, 0}, 5) == std::vector<int>{0}));
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> >, int):
endbr64
push %r15
pxor %xmm0,%xmm0
push %r14
push %r13
mov %rdi,%r13
push %r12
push %rbp
push %rbx
sub $0x78,%rsp
mov %edx,0x14(%rsp)
lea 0x38(%rsp),%rbp
mov %fs:0x28,%rax
mov %rax,0x68(%rsp)
xor %eax,%eax
movq $0x0,0x10(%rdi)
movu... | _Z5func0St6vectorIiSaIiEEi:
endbr64
push r15
pxor xmm0, xmm0
push r14
mov r14, rdi
push r13
push r12
push rbp
push rbx
sub rsp, 78h
mov rax, fs:28h
mov [rsp+0A8h+var_40], rax
xor eax, eax
mov qword ptr [rdi+10h], 0
lea r12, [rsp+0A8h+var_70]
movups xmmword ptr [rdi], xm... | long long func0(long long a1, int **a2, int a3)
{
int *v4; // rax
int *v5; // r13
int v6; // ebp
int **v8; // rcx
int **v9; // rdx
int *v10; // rax
int **v11; // rbx
_DWORD *v12; // rax
long long v13; // rdx
long long v14; // rcx
void *v15; // r8
long long v16; // rax
int **v17; // rdx
int ... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
MOV R14,RDI
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x78
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x68],RAX
XOR EAX,EAX
MOV qword ptr [RDI + 0x10],0x0
LEA R12,[RSP + 0x38]
MOVUPS xmmword ptr [RDI],XMM0
MOV RAX,qword ptr [RSI + 0x8]
MOV R13,qword ptr [RSI]
MOV ... | /* func0(std::vector<int, std::allocator<int> >, int) */
vector<int,std::allocator<int>> * func0(vector param_1,int param_2)
{
int *piVar1;
_Rb_tree_node_base *p_Var2;
_Rb_tree_node_base *p_Var3;
_Rb_tree_node_base *p_Var4;
_Rb_tree_node_base *p_Var5;
_Rb_tree_node_base *p_Var6;
_Rb_tree_node_base *p_Va... |
3,592 | func0 |
#include <cassert>
#include <vector>
| bool func0(const std::vector<int>& arr, int n) {
int g = 0;
for (int i = 1; i < n; i++) {
if ((arr[i] - arr[i - 1] > 0) && g == 1) {
return false;
}
if ((arr[i] - arr[i] < 0)) {
g = 1;
}
}
return true;
}
| int main() {
assert(func0({3, 2, 1, 2, 3, 4}, 6) == true);
assert(func0({2, 1, 4, 5, 1}, 5) == true);
assert(func0({1, 2, 2, 1, 2, 3}, 6) == true);
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> > const&, int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x28,%rsp
mov %rdi,-0x28(%rbp)
mov %esi,-0x2c(%rbp)
movl $0x0,-0x18(%rbp)
movl $0x1,-0x14(%rbp)
mov -0x14(%rbp),%eax
cmp -0x2c(%rbp),%eax
jge 12f6 <_Z5func0RKSt6vectorIiSaIiEEi+0xcd>
mo... | _Z5func0RKSt6vectorIiSaIiEEi:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 28h
mov [rbp+var_28], rdi
mov [rbp+var_2C], esi
mov [rbp+var_18], 0
mov [rbp+var_14], 1
jmp loc_130C
loc_1270:
mov eax, [rbp+var_14]
movsxd rdx, eax
mov rax, [rbp+var_28]
mov rsi, rdx
mov rdi... | long long func0(long long a1, int a2)
{
int v2; // ebx
int v5; // ebx
int v6; // [rsp+18h] [rbp-18h]
int i; // [rsp+1Ch] [rbp-14h]
v6 = 0;
for ( i = 1; i < a2; ++i )
{
v2 = *(_DWORD *)std::vector<int>::operator[](a1, i);
if ( v2 - *(_DWORD *)std::vector<int>::operator[](a1, i - 1) > 0 && v6 == 1... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x28
MOV qword ptr [RBP + -0x28],RDI
MOV dword ptr [RBP + -0x2c],ESI
MOV dword ptr [RBP + -0x18],0x0
MOV dword ptr [RBP + -0x14],0x1
JMP 0x0010130c
LAB_00101270:
MOV EAX,dword ptr [RBP + -0x14]
MOVSXD RDX,EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RSI,RDX
MOV RDI,RAX
CA... | /* func0(std::vector<int, std::allocator<int> > const&, int) */
int8 func0(vector *param_1,int param_2)
{
int iVar1;
bool bVar2;
bool bVar3;
int *piVar4;
int local_1c;
bVar3 = false;
local_1c = 1;
while( true ) {
if (param_2 <= local_1c) {
return 1;
}
piVar4 = (int *)std::vector<i... |
3,593 | func0 |
#include <cassert>
#include <vector>
| bool func0(const std::vector<int>& arr, int n) {
int g = 0;
for (int i = 1; i < n; i++) {
if ((arr[i] - arr[i - 1] > 0) && g == 1) {
return false;
}
if ((arr[i] - arr[i] < 0)) {
g = 1;
}
}
return true;
}
| int main() {
assert(func0({3, 2, 1, 2, 3, 4}, 6) == true);
assert(func0({2, 1, 4, 5, 1}, 5) == true);
assert(func0({1, 2, 2, 1, 2, 3}, 6) == true);
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> > const&, int):
endbr64
cmp $0x1,%esi
jle 121e <_Z5func0RKSt6vectorIiSaIiEEi+0x15>
mov $0x1,%eax
add $0x1,%eax
cmp %eax,%esi
jne 1217 <_Z5func0RKSt6vectorIiSaIiEEi+0xe>
mov $0x1,%eax
retq
| _Z5func0RKSt6vectorIiSaIiEEi:
endbr64
cmp esi, 1
jle short loc_121E
mov eax, 1
loc_1217:
add eax, 1
cmp esi, eax
jnz short loc_1217
loc_121E:
mov eax, 1
retn | long long func0(long long a1, int a2)
{
int i; // eax
if ( a2 > 1 )
{
for ( i = 1; i != a2; ++i )
;
}
return 1LL;
} | func0:
ENDBR64
CMP ESI,0x1
JLE 0x0010121e
MOV EAX,0x1
LAB_00101217:
ADD EAX,0x1
CMP ESI,EAX
JNZ 0x00101217
LAB_0010121e:
MOV EAX,0x1
RET | /* func0(std::vector<int, std::allocator<int> > const&, int) */
int8 func0(vector *param_1,int param_2)
{
int iVar1;
if (1 < param_2) {
iVar1 = 1;
do {
iVar1 = iVar1 + 1;
} while (param_2 != iVar1);
}
return 1;
} |
3,594 | func0 |
#include <cassert>
#include <vector>
| bool func0(const std::vector<int>& arr, int n) {
int g = 0;
for (int i = 1; i < n; i++) {
if ((arr[i] - arr[i - 1] > 0) && g == 1) {
return false;
}
if ((arr[i] - arr[i] < 0)) {
g = 1;
}
}
return true;
}
| int main() {
assert(func0({3, 2, 1, 2, 3, 4}, 6) == true);
assert(func0({2, 1, 4, 5, 1}, 5) == true);
assert(func0({1, 2, 2, 1, 2, 3}, 6) == true);
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> > const&, int):
endbr64
mov $0x1,%eax
retq
nopw 0x0(%rax,%rax,1)
| _Z5func0RKSt6vectorIiSaIiEEi:
endbr64
mov eax, 1
retn | long long func0()
{
return 1LL;
} | func0:
ENDBR64
MOV EAX,0x1
RET | /* func0(std::vector<int, std::allocator<int> > const&, int) */
int8 func0(vector *param_1,int param_2)
{
return 1;
} |
3,595 | func0 |
#include <cassert>
#include <vector>
| bool func0(const std::vector<int>& arr, int n) {
int g = 0;
for (int i = 1; i < n; i++) {
if ((arr[i] - arr[i - 1] > 0) && g == 1) {
return false;
}
if ((arr[i] - arr[i] < 0)) {
g = 1;
}
}
return true;
}
| int main() {
assert(func0({3, 2, 1, 2, 3, 4}, 6) == true);
assert(func0({2, 1, 4, 5, 1}, 5) == true);
assert(func0({1, 2, 2, 1, 2, 3}, 6) == true);
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> > const&, int):
endbr64
mov $0x1,%eax
retq
nopw 0x0(%rax,%rax,1)
| _Z5func0RKSt6vectorIiSaIiEEi:
endbr64
mov eax, 1
retn | long long func0()
{
return 1LL;
} | func0:
ENDBR64
MOV EAX,0x1
RET | /* func0(std::vector<int, std::allocator<int> > const&, int) */
int8 func0(vector *param_1,int param_2)
{
return 1;
} |
3,596 | func0 |
#include <iostream>
#include <regex>
#include <assert.h>
| bool func0(std::string string) {
std::regex text("^5");
return std::regex_search(string, text);
}
| int main() {
assert(func0("5-2345861") == true);
assert(func0("6-2345861") == false);
assert(func0("78910") == false);
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 $0x48,%rsp
mov %rdi,-0x48(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
lea -0x40(%rbp),%rax
mov $0x10,%edx
lea 0x2b3f0(%rip),%rsi
mov %rax... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 48h
mov [rbp+var_48], rdi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_40]
mov edx, 10h
lea rcx, a5; "^5"
mov rsi, rcx
mov rdi, rax
call... | long long func0(long long a1)
{
unsigned int v1; // ebx
_BYTE v3[40]; // [rsp+10h] [rbp-40h] BYREF
unsigned long long v4; // [rsp+38h] [rbp-18h]
v4 = __readfsqword(0x28u);
std::basic_regex<char,std::regex_traits<char>>::basic_regex(v3, "^5", 16LL);
v1 = std::regex_search<std::char_traits<char>,std::alloca... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RBP + -0x48],RDI
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_00104b3f:
CALL 0x00106074
LEA RCX,[RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x... | /* func0(std::string) */
ulong func0(string *param_1)
{
bool bVar1;
int7 extraout_var;
long in_FS_OFFSET;
regex local_48 [40];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
std::regex::basic_regex(local_48,"^5",0x10);
/* try { // try from 00104b57 to 00104b5b has its C... |
3,597 | func0 |
#include <iostream>
#include <regex>
#include <assert.h>
| bool func0(std::string string) {
std::regex text("^5");
return std::regex_search(string, text);
}
| int main() {
assert(func0("5-2345861") == true);
assert(func0("6-2345861") == false);
assert(func0("78910") == false);
return 0;
}
| O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %r12
push %rbp
push %rbx
sub $0x50,%rsp
mov %rdi,%rbx
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
lea 0x20(%rsp),%r12
mov %r12,%rdi
callq 4730 <_ZNSt6localeC1Ev@plt>
movl $0x10,(%rs... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 50h
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea r14, [rbp+var_60]
lea rdi, [rbp+var_58]; this
call __ZNSt6localeC1Ev; std::locale::lo... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x50
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA R14,[RBP + -0x60]
LEA RDI,[RBP + -0x58]
CALL 0x001046f0
MOV qword ptr [RBP + -0x50],0x0
MOV qword ptr [RBP + -0x48],0x0
MOV ECX,0x10
LEA RDX,[0x1185e1]
LEA RSI,[RDX ... | /* func0(std::string) */
ulong func0(int8 *param_1)
{
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
_Sp_counted_base<(_Lock_policy)2> *p_Var2;
bool bVar3;
int iVar4;
int7 extraout_var;
long in_FS_OFFSET;
regex local_68 [8];
int local_60 [8];
int8 local_58;
_Sp_counted_base<(_Lock_policy)2> *local_50;... | |
3,598 | func0 |
#include <iostream>
#include <regex>
#include <assert.h>
| bool func0(std::string string) {
std::regex text("^5");
return std::regex_search(string, text);
}
| int main() {
assert(func0("5-2345861") == true);
assert(func0("6-2345861") == false);
assert(func0("78910") == false);
return 0;
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %r13
push %r12
push %rbp
push %rbx
mov %rdi,%rbx
sub $0x58,%rsp
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
lea 0x20(%rsp),%r12
lea 0x8(%rsp),%rbp
mov %r12,%rdi
callq 4750 <_ZNSt... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r14
push r12
lea r12, [rbp+var_70]
push rbx
mov rbx, rdi
sub rsp, 58h
mov rax, fs:28h
mov [rbp+var_28], rax
xor eax, eax
lea rax, [rbp+var_68]
mov rdi, rax; this
mov r14, ... | long long func0(long long *a1)
{
long long v2; // rdi
long long v3; // rsi
long long v4; // rsi
unsigned int v5; // r12d
long long v6; // rbx
long long v7; // rdx
volatile signed __int32 *v8; // rcx
signed __int32 v9; // eax
long long v11; // rax
long long v12; // rdi
_BYTE v13[8]; // [rsp+0h] [r... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH R12
LEA R12,[RBP + -0x70]
PUSH RBX
MOV RBX,RDI
SUB RSP,0x58
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x68]
MOV RDI,RAX
MOV R14,RAX
CALL 0x001036d0
LEA RDX,[0x1185e1]
PXOR XMM0,XMM0
MOV RDI,R12
MOV ECX,0x10
LEA RSI,[RDX + -0... | /* func0(std::string) */
ulong func0(int8 *param_1)
{
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
int8 uVar2;
bool bVar3;
int iVar4;
int7 extraout_var;
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;
local_30 ... |
3,599 | func0 |
#include <iostream>
#include <regex>
#include <assert.h>
| bool func0(std::string string) {
std::regex text("^5");
return std::regex_search(string, text);
}
| int main() {
assert(func0("5-2345861") == true);
assert(func0("6-2345861") == false);
assert(func0("78910") == false);
return 0;
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %r13
push %r12
push %rbp
push %rbx
mov %rdi,%rbx
sub $0x58,%rsp
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
lea 0x20(%rsp),%r12
lea 0x8(%rsp),%rbp
mov %r12,%rdi
callq 47b0 <_ZNSt... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
push r14
mov r14, rdi
push r13
push r12
push rbp
push rbx
sub rsp, 2A8h
mov rax, fs:28h
mov [rsp+2D8h+var_40], rax
xor eax, eax
lea r12, [rsp+2D8h+var_2A0]
mov rdi, r12; this
call __ZNSt6local... | long long func0(unsigned long long *a1)
{
__m128i v2; // xmm0
long long v3; // rdi
void *v4; // rdi
void **v5; // rbx
unsigned long long v6; // rbp
void *v7; // rdi
unsigned long long v8; // r13
unsigned long long v9; // rbx
long long v10; // rax
long long v11; // rcx
unsigned long long v12; // r... | func0:
ENDBR64
PUSH R15
PUSH R14
MOV R14,RDI
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x2a8
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x298],RAX
XOR EAX,EAX
LEA R12,[RSP + 0x38]
MOV RDI,R12
CALL 0x00104730
LEA RDX,[0x11a622]
PXOR XMM0,XMM0
LEA RDI,[RSP + 0x100]
MOV R8D,0x10
MOV RCX,R12
LEA RSI,[RDX + -0x2]
MO... | /* func0(std::string) */
int8 func0(ulong *param_1)
{
ulong uVar1;
ulong uVar2;
int auVar3 [16];
bool bVar4;
char cVar5;
long lVar6;
int8 *puVar7;
int8 *puVar8;
ulong uVar9;
ulong *puVar10;
long lVar11;
ulong uVar12;
int8 uVar13;
int8 uVar14;
_Match_mode _Var15;
long in_FS_OFFSET;
ul... |
3,600 | func0 |
#include <iostream>
#include <vector>
#include <cassert>
| int func0(int n) {
if (n <= 2) {
return n;
}
int i = n * 2;
std::vector<int> factors;
for (int number = n; number > 1; number--) {
if (number * 2 > n) {
factors.push_back(number);
}
}
while (true) {
for (size_t j = 0; j < factors.si... | int main() {
assert(func0(13) == 360360);
assert(func0(2) == 2);
assert(func0(1) == 1);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x48,%rsp
mov %edi,-0x44(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
cmpl $0x2,-0x44(%rbp)
jg 1296 <_Z5func0i+0x2d>
mov -0x44(%rbp),%ebx
jmpq 1394 <_Z5func0i+0x12b>
mov -0x44(%rbp),%eax
add %eax,%eax
mov ... | _Z5func0i:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 48h
mov [rbp+var_44], edi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
cmp [rbp+var_44], 2
jg short loc_1276
mov ebx, [rbp+var_44]
jmp loc_137C
loc_1276:
mov eax, [rbp+var_44]
add eax, eax
mov [rb... | long long func0(int a1)
{
unsigned int v1; // ebx
_DWORD *v2; // rax
long long v3; // rax
_DWORD *v4; // rax
unsigned long long v6; // rax
int i; // [rsp+10h] [rbp-40h] BYREF
int v9; // [rsp+14h] [rbp-3Ch]
unsigned long long j; // [rsp+18h] [rbp-38h]
_BYTE v11[24]; // [rsp+20h] [rbp-30h] BYREF
unsi... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x48
MOV dword ptr [RBP + -0x44],EDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
CMP dword ptr [RBP + -0x44],0x2
JG 0x00101276
MOV EBX,dword ptr [RBP + -0x44]
JMP 0x0010137c
LAB_00101276:
MOV EAX,dword ptr [RBP + -0x44]
ADD EAX,EAX
MOV dwo... | /* func0(int) */
int func0(int param_1)
{
bool bVar1;
int iVar2;
int *piVar3;
long lVar4;
ulong uVar5;
long in_FS_OFFSET;
int local_48;
int local_44;
ulong local_40;
vector<int,std::allocator<int>> local_38 [24];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
if (param_1 < 3) {... |
3,601 | func0 |
#include <iostream>
#include <vector>
#include <cassert>
| int func0(int n) {
if (n <= 2) {
return n;
}
int i = n * 2;
std::vector<int> factors;
for (int number = n; number > 1; number--) {
if (number * 2 > n) {
factors.push_back(number);
}
}
while (true) {
for (size_t j = 0; j < factors.si... | int main() {
assert(func0(13) == 360360);
assert(func0(2) == 2);
assert(func0(1) == 1);
return 0;
}
| O1 | cpp | func0(int):
endbr64
push %r12
push %rbp
push %rbx
sub $0x30,%rsp
mov %edi,%ebp
mov %fs:0x28,%rax
mov %rax,0x28(%rsp)
xor %eax,%eax
cmp $0x2,%edi
jle 1352 <_Z5func0i+0xe9>
lea (%rdi,%rdi,1),%ebx
movq $0x0,0x10(%rsp)
movq $0x0,0x18(%rsp)
movq $0x0,0x20(%rsp)
mov %edi,0xc(%rsp)
mov ... | _Z5func0i:
endbr64
push r12
push rbp
push rbx
sub rsp, 30h
mov r12d, edi
mov rax, fs:28h
mov [rsp+48h+var_20], rax
xor eax, eax
cmp edi, 2
jle loc_131D
lea ebx, [rdi+rdi]
mov [rsp+48h+var_38], 0
mov [rsp+48h+var_30], 0
mov [rsp+48h+var_28], 0
mov [rsp+48h+var_3C]... | long long func0(int a1)
{
int v1; // ebx
int i; // ebp
char *v3; // rsi
unsigned long long v4; // rsi
long long v5; // rcx
int v7; // [rsp+Ch] [rbp-3Ch] BYREF
void *v8; // [rsp+10h] [rbp-38h] BYREF
char *v9; // [rsp+18h] [rbp-30h]
char *v10; // [rsp+20h] [rbp-28h]
unsigned long long v11; // [rsp+28... | func0:
ENDBR64
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x30
MOV R12D,EDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x28],RAX
XOR EAX,EAX
CMP EDI,0x2
JLE 0x0010131d
LEA EBX,[RDI + RDI*0x1]
MOV qword ptr [RSP + 0x10],0x0
MOV qword ptr [RSP + 0x18],0x0
MOV qword ptr [RSP + 0x20],0x0
MOV dword ptr [RSP + 0xc],EDI
MOV EBP... | /* func0(int) */
int func0(int param_1)
{
int iVar1;
ulong uVar2;
int iVar3;
ulong uVar4;
long in_FS_OFFSET;
int local_3c;
int *local_38;
int *local_30;
int *local_28;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
if (param_1 < 3) {
LAB_00101302:
if (local_20 != *(long *)(in... |
3,602 | func0 |
#include <iostream>
#include <vector>
#include <cassert>
| int func0(int n) {
if (n <= 2) {
return n;
}
int i = n * 2;
std::vector<int> factors;
for (int number = n; number > 1; number--) {
if (number * 2 > n) {
factors.push_back(number);
}
}
while (true) {
for (size_t j = 0; j < factors.si... | int main() {
assert(func0(13) == 360360);
assert(func0(2) == 2);
assert(func0(1) == 1);
return 0;
}
| O2 | cpp | func0(int):
endbr64
push %r12
push %rbp
push %rbx
mov %edi,%ebx
sub $0x30,%rsp
mov %fs:0x28,%rax
mov %rax,0x28(%rsp)
xor %eax,%eax
cmp $0x2,%edi
jle 1408 <_Z5func0i+0xf8>
mov %edi,0xc(%rsp)
lea (%rdi,%rdi,1),%r12d
mov %edi,%eax
xor %esi,%esi
movq $0x0,0x10(%rsp)
lea 0xc(%rsp)... | _Z5func0i:
endbr64
push r12
mov r12d, edi
push rbp
push rbx
sub rsp, 30h
mov rax, fs:28h
mov [rsp+48h+var_20], rax
xor eax, eax
cmp edi, 2
jle loc_13A0
pxor xmm0, xmm0
mov [rsp+48h+var_3C], edi
lea ebx, [rdi+rdi]
mov ebp, edi
mov [rsp+48h+var_28], 0
xor r10d, ... | long long func0(int a1)
{
int v1; // ebx
int v2; // ebp
char *v3; // r10
char *v4; // rsi
unsigned long long v5; // r8
long long v6; // rcx
int v8; // [rsp+Ch] [rbp-3Ch] BYREF
void *v9[2]; // [rsp+10h] [rbp-38h] BYREF
char *v10; // [rsp+20h] [rbp-28h]
unsigned long long v11; // [rsp+28h] [rbp-20h]
... | func0:
ENDBR64
PUSH R12
MOV R12D,EDI
PUSH RBP
PUSH RBX
SUB RSP,0x30
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x28],RAX
XOR EAX,EAX
CMP EDI,0x2
JLE 0x001013a0
PXOR XMM0,XMM0
MOV dword ptr [RSP + 0xc],EDI
LEA EBX,[RDI + RDI*0x1]
MOV EBP,EDI
MOV qword ptr [RSP + 0x20],0x0
XOR R10D,R10D
XOR ESI,ESI
MOVAPS xmmword p... | /* func0(int) */
int func0(int param_1)
{
int iVar1;
ulong uVar2;
int iVar3;
int *piVar4;
ulong uVar5;
int *piVar6;
long in_FS_OFFSET;
int local_3c;
int local_38 [16];
int *local_28;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
if (param_1 < 3) {
LAB_00101383:
if (local_2... |
3,603 | func0 |
#include <iostream>
#include <vector>
#include <cassert>
| int func0(int n) {
if (n <= 2) {
return n;
}
int i = n * 2;
std::vector<int> factors;
for (int number = n; number > 1; number--) {
if (number * 2 > n) {
factors.push_back(number);
}
}
while (true) {
for (size_t j = 0; j < factors.si... | int main() {
assert(func0(13) == 360360);
assert(func0(2) == 2);
assert(func0(1) == 1);
return 0;
}
| O3 | cpp | func0(int):
endbr64
push %r12
push %rbp
push %rbx
mov %edi,%ebx
sub $0x30,%rsp
mov %fs:0x28,%rax
mov %rax,0x28(%rsp)
xor %eax,%eax
cmp $0x2,%edi
jle 1408 <_Z5func0i+0xf8>
pxor %xmm0,%xmm0
mov %edi,0xc(%rsp)
lea (%rdi,%rdi,1),%r12d
mov %edi,%eax
movq $0x0,0x20(%rsp)
xor %esi,%e... | _Z5func0i:
endbr64
push r12
mov r12d, edi
push rbp
push rbx
sub rsp, 30h
mov rax, fs:28h
mov [rsp+48h+var_20], rax
xor eax, eax
cmp edi, 2
jle loc_13A0
pxor xmm0, xmm0
mov [rsp+48h+var_3C], edi
lea ebx, [rdi+rdi]
mov ebp, edi
mov [rsp+48h+var_28], 0
xor r10d, ... | long long func0(int a1)
{
int v1; // ebx
int v2; // ebp
char *v3; // r10
char *v4; // rsi
unsigned long long v5; // r8
long long v6; // rcx
int v8; // [rsp+Ch] [rbp-3Ch] BYREF
void *v9[2]; // [rsp+10h] [rbp-38h] BYREF
char *v10; // [rsp+20h] [rbp-28h]
unsigned long long v11; // [rsp+28h] [rbp-20h]
... | func0:
ENDBR64
PUSH R12
MOV R12D,EDI
PUSH RBP
PUSH RBX
SUB RSP,0x30
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x28],RAX
XOR EAX,EAX
CMP EDI,0x2
JLE 0x001013a0
PXOR XMM0,XMM0
MOV dword ptr [RSP + 0xc],EDI
LEA EBX,[RDI + RDI*0x1]
MOV EBP,EDI
MOV qword ptr [RSP + 0x20],0x0
XOR R10D,R10D
XOR ESI,ESI
MOVAPS xmmword p... | /* func0(int) */
int func0(int param_1)
{
int iVar1;
ulong uVar2;
int iVar3;
int *piVar4;
ulong uVar5;
int *piVar6;
long in_FS_OFFSET;
int local_3c;
int local_38 [16];
int *local_28;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
if (param_1 < 3) {
LAB_00101383:
if (local_2... |
3,604 | func0 | #include <map>
#include <cassert>
| std::map<char, int> func0(std::map<char, int> d1, std::map<char, int> d2) {
std::map<char, int> result;
for (auto& pair : d1) {
result[pair.first] += pair.second;
}
for (auto& pair : d2) {
result[pair.first] += pair.second;
}
return result;
}
| int main() {
std::map<char, int> result1 = func0({{'a', 100}, {'b', 200}, {'c', 300}}, {{'a', 300}, {'b', 200}, {'d', 400}});
std::map<char, int> expected1 = {{'b', 400}, {'d', 400}, {'a', 400}, {'c', 300}};
for (auto& pair : expected1) {
assert(result1[pair.first] == pair.second);
}
... | O0 | cpp | func0(std::map<char, int, std::less<char>, std::allocator<std::pair<char const, int> > >, std::map<char, int, std::less<char>, std::allocator<std::pair<char const, int> > >):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x68,%rsp
mov %rdi,-0x58(%rbp)
mov %rsi,-0x60(%rbp)
mov %rdx,-0x68(%rbp)
mov ... | _Z5func0St3mapIciSt4lessIcESaISt4pairIKciEEES6_:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 68h
mov [rbp+var_58], rdi
mov [rbp+var_60], rsi
mov [rbp+var_68], rdx
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_58]
mov rdi, rax
call _ZNSt3mapIciS... | long long func0(long long a1, long long a2, long long a3)
{
_DWORD *v3; // rax
_DWORD *v4; // rax
long long v7; // [rsp+28h] [rbp-48h] BYREF
_QWORD v8[2]; // [rsp+30h] [rbp-40h] BYREF
long long v9; // [rsp+40h] [rbp-30h]
long long v10; // [rsp+48h] [rbp-28h]
long long v11; // [rsp+50h] [rbp-20h]
unsign... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x68
MOV qword ptr [RBP + -0x58],RDI
MOV qword ptr [RBP + -0x60],RSI
MOV qword ptr [RBP + -0x68],RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x58]
MOV RDI,RAX
CALL 0x0010209e
MOV RAX,qword ptr [RBP + -0x60]
MO... | /* func0(std::map<char, int, std::less<char>, std::allocator<std::pair<char const, int> > >,
std::map<char, int, std::less<char>, std::allocator<std::pair<char const, int> > >) */
map<char,int,std::less<char>,std::allocator<std::pair<char_const,int>>> *
func0(map param_1,map param_2)
{
char cVar1;
int *piVar2;... |
3,605 | func0 | #include <map>
#include <cassert>
| std::map<char, int> func0(std::map<char, int> d1, std::map<char, int> d2) {
std::map<char, int> result;
for (auto& pair : d1) {
result[pair.first] += pair.second;
}
for (auto& pair : d2) {
result[pair.first] += pair.second;
}
return result;
}
| int main() {
std::map<char, int> result1 = func0({{'a', 100}, {'b', 200}, {'c', 300}}, {{'a', 300}, {'b', 200}, {'d', 400}});
std::map<char, int> expected1 = {{'b', 400}, {'d', 400}, {'a', 400}, {'c', 300}};
for (auto& pair : expected1) {
assert(result1[pair.first] == pair.second);
}
... | O1 | cpp | func0(std::map<char, int, std::less<char>, std::allocator<std::pair<char const, int> > >, std::map<char, int, std::less<char>, std::allocator<std::pair<char const, int> > >):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x38,%rsp
mov %rdi,%rbp
mov %rdx,0x8(%rsp)
mov %... | _Z5func0St3mapIciSt4lessIcESaISt4pairIKciEEES6_:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 38h
mov rbp, rdi
mov [rsp+68h+var_60], rdx
mov rax, fs:28h
mov [rsp+68h+var_40], rax
xor eax, eax
mov dword ptr [rdi+8], 0
mov qword ptr [rdi+10h], 0
... | long long func0(long long a1, long long a2, long long a3)
{
long long v3; // r12
long long i; // rbx
long long v5; // rax
long long j; // rbx
long long v7; // rax
char v10; // [rsp+16h] [rbp-52h] BYREF
char v11; // [rsp+17h] [rbp-51h] BYREF
long long v12; // [rsp+18h] [rbp-50h] BYREF
_QWORD v13[9]; /... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x38
MOV RBP,RDI
MOV qword ptr [RSP + 0x8],RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x28],RAX
XOR EAX,EAX
MOV dword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
LEA R12,[RDI + 0x8]
MOV qword ptr [RDI + 0x18],R12
MOV qword ptr... | /* func0(std::map<char, int, std::less<char>, std::allocator<std::pair<char const, int> > >,
std::map<char, int, std::less<char>, std::allocator<std::pair<char const, int> > >) */
_Rb_tree<char,std::pair<char_const,int>,std::_Select1st<std::pair<char_const,int>>,std::less<char>,std::allocator<std::pair<char_const,i... |
3,606 | func0 | #include <map>
#include <cassert>
| std::map<char, int> func0(std::map<char, int> d1, std::map<char, int> d2) {
std::map<char, int> result;
for (auto& pair : d1) {
result[pair.first] += pair.second;
}
for (auto& pair : d2) {
result[pair.first] += pair.second;
}
return result;
}
| int main() {
std::map<char, int> result1 = func0({{'a', 100}, {'b', 200}, {'c', 300}}, {{'a', 300}, {'b', 200}, {'d', 400}});
std::map<char, int> expected1 = {{'b', 400}, {'d', 400}, {'a', 400}, {'c', 300}};
for (auto& pair : expected1) {
assert(result1[pair.first] == pair.second);
}
... | O2 | cpp | func0(std::map<char, int, std::less<char>, std::allocator<std::pair<char const, int> > >, std::map<char, int, std::less<char>, std::allocator<std::pair<char const, int> > >):
endbr64
push %r15
push %r14
lea 0x8(%rsi),%r14
push %r13
mov %rdx,%r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
lea 0x... | _Z5func0St3mapIciSt4lessIcESaISt4pairIKciEEES6_:
endbr64
push r15
push r14
lea r14, [rsi+8]
push r13
mov r13, rdx
push r12
lea r12, [rdi+8]
push rbp
mov rbp, rdi
push rbx
sub rsp, 28h
mov rax, fs:28h
mov [rsp+58h+var_40], rax
xor eax, eax
mov [rdi+18h], r12
mov ... | long long func0(long long a1, long long a2, long long a3, long long a4)
{
long long v4; // r14
long long v6; // r12
long long v8; // rbx
char v9; // al
long long v10; // rsi
long long v11; // rdx
long long v12; // rdi
long long v13; // rax
long long v14; // rbx
long long v15; // r13
long long v16... | func0:
ENDBR64
PUSH R15
PUSH R14
LEA R14,[RSI + 0x8]
PUSH R13
MOV R13,RDX
PUSH R12
LEA R12,[RDI + 0x8]
PUSH RBP
MOV RBP,RDI
PUSH RBX
SUB RSP,0x28
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x18],RAX
XOR EAX,EAX
MOV qword ptr [RDI + 0x18],R12
MOV RBX,qword ptr [RSI + 0x18]
MOV dword ptr [RDI + 0x8],0x0
MOV qword p... | /* WARNING: Removing unreachable block (ram,0x00101ee8) */
/* func0(std::map<char, int, std::less<char>, std::allocator<std::pair<char const, int> > >,
std::map<char, int, std::less<char>, std::allocator<std::pair<char const, int> > >) */
long func0(map param_1,map param_2)
{
tuple *ptVar1;
tuple *ptVar2;
_R... |
3,607 | func0 | #include <map>
#include <cassert>
| std::map<char, int> func0(std::map<char, int> d1, std::map<char, int> d2) {
std::map<char, int> result;
for (auto& pair : d1) {
result[pair.first] += pair.second;
}
for (auto& pair : d2) {
result[pair.first] += pair.second;
}
return result;
}
| int main() {
std::map<char, int> result1 = func0({{'a', 100}, {'b', 200}, {'c', 300}}, {{'a', 300}, {'b', 200}, {'d', 400}});
std::map<char, int> expected1 = {{'b', 400}, {'d', 400}, {'a', 400}, {'c', 300}};
for (auto& pair : expected1) {
assert(result1[pair.first] == pair.second);
}
... | O3 | cpp | func0(std::map<char, int, std::less<char>, std::allocator<std::pair<char const, int> > >, std::map<char, int, std::less<char>, std::allocator<std::pair<char const, int> > >):
endbr64
push %r15
push %r14
lea 0x8(%rsi),%r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
lea 0x8(%rdi),%rbx
sub ... | _Z5func0St3mapIciSt4lessIcESaISt4pairIKciEEES6_:
endbr64
push r15
push r14
lea r14, [rsi+8]
push r13
mov r13, rdx
push r12
lea r12, [rdi+8]
push rbp
mov rbp, rdi
push rbx
sub rsp, 28h
mov rax, fs:28h
mov [rsp+58h+var_40], rax
xor eax, eax
mov [rdi+18h], r12
mov ... | long long func0(long long a1, long long a2, long long a3)
{
long long v3; // r14
long long v5; // r12
long long v7; // rbx
char v8; // cl
long long v9; // rdi
long long v10; // rdx
long long v11; // rax
long long v12; // rsi
long long v13; // rax
long long v14; // rbx
long long v15; // r13
long... | func0:
ENDBR64
PUSH R15
PUSH R14
LEA R14,[RSI + 0x8]
PUSH R13
MOV R13,RDX
PUSH R12
LEA R12,[RDI + 0x8]
PUSH RBP
MOV RBP,RDI
PUSH RBX
SUB RSP,0x28
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x18],RAX
XOR EAX,EAX
MOV qword ptr [RDI + 0x18],R12
MOV RBX,qword ptr [RSI + 0x18]
MOV dword ptr [RDI + 0x8],0x0
MOV qword p... | /* func0(std::map<char, int, std::less<char>, std::allocator<std::pair<char const, int> > >,
std::map<char, int, std::less<char>, std::allocator<std::pair<char const, int> > >) */
long func0(map param_1,map param_2)
{
piecewise_construct_t *ppVar1;
piecewise_construct_t pVar2;
_Rb_tree_node_base _Var3;
pie... |
3,608 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int n) {
int cnt = 0;
for (int i = 1; i <= n; ++i) {
int temp = i;
while (temp) {
if (temp % 2 == 0) {
cnt++;
}
temp = temp / 2;
}
}
return cnt;
}
| int main() {
assert(func0(2) == 1);
assert(func0(5) == 4);
assert(func0(14) == 17);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
movl $0x0,-0xc(%rbp)
movl $0x1,-0x8(%rbp)
mov -0x8(%rbp),%eax
cmp -0x14(%rbp),%eax
jg 11db <_Z5func0i+0x52>
mov -0x8(%rbp),%eax
mov %eax,-0x4(%rbp)
cmpl $0x0,-0x4(%rbp)
je 11d5 <_Z5func0i+0x4c>
mov -0x4(%rbp),%eax
and ... | _Z5func0i:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_14], edi
mov [rbp+var_C], 0
mov [rbp+var_8], 1
jmp short loc_1193
loc_1164:
mov eax, [rbp+var_8]
mov [rbp+var_4], eax
jmp short loc_1189
loc_116C:
mov eax, [rbp+var_4]
and eax, 1
test eax, eax
jnz short loc_117A
add ... | long long func0(int a1)
{
unsigned int v2; // [rsp+8h] [rbp-Ch]
int i; // [rsp+Ch] [rbp-8h]
int j; // [rsp+10h] [rbp-4h]
v2 = 0;
for ( i = 1; i <= a1; ++i )
{
for ( j = i; j; j /= 2 )
{
if ( (j & 1) == 0 )
++v2;
}
}
return v2;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x14],EDI
MOV dword ptr [RBP + -0xc],0x0
MOV dword ptr [RBP + -0x8],0x1
JMP 0x00101193
LAB_00101164:
MOV EAX,dword ptr [RBP + -0x8]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00101189
LAB_0010116c:
MOV EAX,dword ptr [RBP + -0x4]
AND EAX,0x1
TEST EAX,EAX
JNZ 0x0010117a... | /* func0(int) */
int func0(int param_1)
{
int4 local_14;
int4 local_10;
int4 local_c;
local_14 = 0;
for (local_10 = 1; (int)local_10 <= param_1; local_10 = local_10 + 1) {
for (local_c = local_10; local_c != 0; local_c = (int)local_c / 2) {
if ((local_c & 1) == 0) {
local_14 = local_14 ... |
3,609 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int n) {
int cnt = 0;
for (int i = 1; i <= n; ++i) {
int temp = i;
while (temp) {
if (temp % 2 == 0) {
cnt++;
}
temp = temp / 2;
}
}
return cnt;
}
| int main() {
assert(func0(2) == 1);
assert(func0(5) == 4);
assert(func0(14) == 17);
return 0;
}
| O1 | cpp | func0(int):
endbr64
test %edi,%edi
jle 11c8 <_Z5func0i+0x3f>
mov $0x1,%esi
mov $0x0,%ecx
jmp 11a0 <_Z5func0i+0x17>
add $0x1,%esi
mov %esi,%edx
test %esi,%esi
je 119d <_Z5func0i+0x14>
mov %edx,%eax
and $0x1,%eax
cmp $0x1,%eax
adc $0x0,%ecx
mov %edx,%eax
shr $0x1f,%eax
add %... | _Z5func0i:
endbr64
test edi, edi
jle short loc_1186
add edi, 1
mov esi, 1
mov ecx, 0
loc_115E:
mov edx, esi
test esi, esi
jz short loc_118D
loc_1164:
mov eax, edx
and eax, 1
cmp eax, 1
adc ecx, 0
mov eax, edx
shr eax, 1Fh
add eax, edx
sar eax, 1
mov edx... | long long func0(int a1)
{
int v1; // edi
int v2; // esi
unsigned int v3; // ecx
int v4; // edx
if ( a1 <= 0 )
{
return 0;
}
else
{
v1 = a1 + 1;
v2 = 1;
v3 = 0;
do
{
while ( 1 )
{
v4 = v2;
if ( v2 )
break;
v2 = 1;
}
do
... | func0:
ENDBR64
TEST EDI,EDI
JLE 0x00101186
ADD EDI,0x1
MOV ESI,0x1
MOV ECX,0x0
LAB_0010115e:
MOV EDX,ESI
TEST ESI,ESI
JZ 0x0010118d
LAB_00101164:
MOV EAX,EDX
AND EAX,0x1
CMP EAX,0x1
ADC ECX,0x0
MOV EAX,EDX
SHR EAX,0x1f
ADD EAX,EDX
SAR EAX,0x1
MOV EDX,EAX
JNZ 0x00101164
ADD ESI,0x1
CMP EDI,ESI
JNZ 0x0010115e
LAB_0010118... | /* func0(int) */
int func0(int param_1)
{
uint uVar1;
int iVar2;
uint uVar3;
if (param_1 < 1) {
iVar2 = 0;
}
else {
uVar3 = 1;
iVar2 = 0;
do {
while (uVar1 = uVar3, uVar3 == 0) {
uVar3 = 1;
}
do {
iVar2 = iVar2 + (uint)((uVar1 & 1) == 0);
uVar1 ... |
3,610 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int n) {
int cnt = 0;
for (int i = 1; i <= n; ++i) {
int temp = i;
while (temp) {
if (temp % 2 == 0) {
cnt++;
}
temp = temp / 2;
}
}
return cnt;
}
| int main() {
assert(func0(2) == 1);
assert(func0(5) == 4);
assert(func0(14) == 17);
return 0;
}
| O2 | cpp | func0(int):
endbr64
test %edi,%edi
jle 12bb <_Z5func0i+0x3b>
lea 0x1(%rdi),%esi
mov $0x1,%ecx
xor %r8d,%r8d
nopl 0x0(%rax,%rax,1)
mov %ecx,%eax
nopw 0x0(%rax,%rax,1)
mov %eax,%edx
and $0x1,%edx
cmp $0x1,%edx
adc $0x0,%r8d
sar %eax
jne 12a0 <_Z5func0i+0x20>
add $0x1,%ecx
cmp ... | _Z5func0i:
endbr64
test edi, edi
jle short loc_1230
add edi, 1
mov esi, 1
xor edx, edx
nop word ptr [rax+rax+00h]
loc_1208:
mov eax, esi
nop word ptr [rax+rax+00h]
loc_1210:
mov ecx, eax
and ecx, 1
cmp ecx, 1
mov ecx, eax
adc edx, 0
shr ecx, 1Fh
add eax, ecx
sa... | long long func0(int a1)
{
int v1; // edi
int v2; // esi
unsigned int v3; // edx
int v4; // eax
if ( a1 <= 0 )
return 0LL;
v1 = a1 + 1;
v2 = 1;
v3 = 0;
do
{
v4 = v2;
do
{
v3 += (v4 & 1) == 0;
v4 /= 2;
}
while ( v4 );
++v2;
}
while ( v1 != v2 );
return v... | func0:
ENDBR64
TEST EDI,EDI
JLE 0x00101230
ADD EDI,0x1
MOV ESI,0x1
XOR EDX,EDX
NOP word ptr [RAX + RAX*0x1]
LAB_00101208:
MOV EAX,ESI
NOP word ptr [RAX + RAX*0x1]
LAB_00101210:
MOV ECX,EAX
AND ECX,0x1
CMP ECX,0x1
MOV ECX,EAX
ADC EDX,0x0
SHR ECX,0x1f
ADD EAX,ECX
SAR EAX,0x1
JNZ 0x00101210
ADD ESI,0x1
CMP EDI,ESI
JNZ 0x0... | /* func0(int) */
int func0(int param_1)
{
uint uVar1;
int iVar2;
uint uVar3;
if (param_1 < 1) {
return 0;
}
uVar1 = 1;
iVar2 = 0;
uVar3 = uVar1;
do {
do {
iVar2 = iVar2 + (uint)((uVar1 & 1) == 0);
uVar1 = (int)uVar1 / 2;
} while (uVar1 != 0);
uVar1 = uVar3 + 1;
uVa... |
3,611 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int n) {
int cnt = 0;
for (int i = 1; i <= n; ++i) {
int temp = i;
while (temp) {
if (temp % 2 == 0) {
cnt++;
}
temp = temp / 2;
}
}
return cnt;
}
| int main() {
assert(func0(2) == 1);
assert(func0(5) == 4);
assert(func0(14) == 17);
return 0;
}
| O3 | cpp | func0(int):
endbr64
test %edi,%edi
jle 12bb <_Z5func0i+0x3b>
lea 0x1(%rdi),%esi
mov $0x1,%ecx
xor %r8d,%r8d
nopl 0x0(%rax,%rax,1)
mov %ecx,%eax
nopw 0x0(%rax,%rax,1)
mov %eax,%edx
and $0x1,%edx
cmp $0x1,%edx
adc $0x0,%r8d
sar %eax
jne 12a0 <_Z5func0i+0x20>
add $0x1,%ecx
cmp ... | _Z5func0i:
endbr64
test edi, edi
jle short loc_1260
add edi, 1
mov esi, 1
xor edx, edx
nop word ptr [rax+rax+00h]
loc_1238:
mov eax, esi
nop word ptr [rax+rax+00h]
loc_1240:
mov ecx, eax
and ecx, 1
cmp ecx, 1
mov ecx, eax
adc edx, 0
shr ecx, 1Fh
add eax, ecx
sa... | long long func0(int a1)
{
int v1; // edi
int v2; // esi
unsigned int v3; // edx
int v4; // eax
if ( a1 <= 0 )
return 0LL;
v1 = a1 + 1;
v2 = 1;
v3 = 0;
do
{
v4 = v2;
do
{
v3 += (v4 & 1) == 0;
v4 /= 2;
}
while ( v4 );
++v2;
}
while ( v1 != v2 );
return v... | func0:
ENDBR64
TEST EDI,EDI
JLE 0x00101260
ADD EDI,0x1
MOV ESI,0x1
XOR EDX,EDX
NOP word ptr [RAX + RAX*0x1]
LAB_00101238:
MOV EAX,ESI
NOP word ptr [RAX + RAX*0x1]
LAB_00101240:
MOV ECX,EAX
AND ECX,0x1
CMP ECX,0x1
MOV ECX,EAX
ADC EDX,0x0
SHR ECX,0x1f
ADD EAX,ECX
SAR EAX,0x1
JNZ 0x00101240
ADD ESI,0x1
CMP EDI,ESI
JNZ 0x0... | /* func0(int) */
int func0(int param_1)
{
uint uVar1;
int iVar2;
uint uVar3;
if (param_1 < 1) {
return 0;
}
uVar1 = 1;
iVar2 = 0;
uVar3 = uVar1;
do {
do {
iVar2 = iVar2 + (uint)((uVar1 & 1) == 0);
uVar1 = (int)uVar1 / 2;
} while (uVar1 != 0);
uVar1 = uVar3 + 1;
uVa... |
3,612 | func0 |
#include <cassert>
| bool func0(int x) {
return x % 2 == 0;
}
| int main() {
assert(!func0(13));
assert(func0(0));
assert(!func0(-9));
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x4(%rbp)
mov -0x4(%rbp),%eax
and $0x1,%eax
test %eax,%eax
sete %al
pop %rbp
retq
| _Z5func0i:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_4], edi
mov eax, [rbp+var_4]
and eax, 1
test eax, eax
setz al
pop rbp
retn | bool func0(char a1)
{
return (a1 & 1) == 0;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x4],EDI
MOV EAX,dword ptr [RBP + -0x4]
AND EAX,0x1
TEST EAX,EAX
SETZ AL
POP RBP
RET | /* func0(int) */
bool func0(int param_1)
{
return (param_1 & 1U) == 0;
} |
3,613 | func0 |
#include <cassert>
| bool func0(int x) {
return x % 2 == 0;
}
| int main() {
assert(!func0(13));
assert(func0(0));
assert(!func0(-9));
return 0;
}
| O1 | cpp | func0(int):
endbr64
mov %edi,%eax
xor $0x1,%eax
and $0x1,%eax
retq
| _Z5func0i:
endbr64
mov eax, edi
xor eax, 1
and eax, 1
retn | long long func0(unsigned __int8 a1)
{
return (a1 ^ 1) & 1;
} | func0:
ENDBR64
MOV EAX,EDI
XOR EAX,0x1
AND EAX,0x1
RET | /* func0(int) */
uint func0(int param_1)
{
return (param_1 ^ 1U) & 1;
} |
3,614 | func0 |
#include <cassert>
| bool func0(int x) {
return x % 2 == 0;
}
| int main() {
assert(!func0(13));
assert(func0(0));
assert(!func0(-9));
return 0;
}
| O2 | cpp | func0(int):
endbr64
mov %edi,%eax
not %eax
and $0x1,%eax
retq
nopl 0x0(%rax)
| _Z5func0i:
endbr64
mov eax, edi
not eax
and eax, 1
retn | _BOOL8 func0(char a1)
{
return (a1 & 1) == 0;
} | func0:
ENDBR64
MOV EAX,EDI
NOT EAX
AND EAX,0x1
RET | /* func0(int) */
uint func0(int param_1)
{
return ~param_1 & 1;
} |
3,615 | func0 |
#include <cassert>
| bool func0(int x) {
return x % 2 == 0;
}
| int main() {
assert(!func0(13));
assert(func0(0));
assert(!func0(-9));
return 0;
}
| O3 | cpp | func0(int):
endbr64
mov %edi,%eax
not %eax
and $0x1,%eax
retq
nopl 0x0(%rax)
| _Z5func0i:
endbr64
mov eax, edi
not eax
and eax, 1
retn | _BOOL8 func0(char a1)
{
return (a1 & 1) == 0;
} | func0:
ENDBR64
MOV EAX,EDI
NOT EAX
AND EAX,0x1
RET | /* func0(int) */
uint func0(int param_1)
{
return ~param_1 & 1;
} |
3,616 | func0 |
#include <cassert>
long long factorial(int start, int end) {
long long res = 1;
for (int i = start; i <= end; i++) {
res *= i;
}
return res;
}
| long long func0(int n) {
return factorial(n + 1, 2 * n) / factorial(1, n);
}
| int main() {
assert(func0(4) == 70);
assert(func0(5) == 252);
assert(func0(2) == 6);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x8,%rsp
mov %edi,-0xc(%rbp)
mov -0xc(%rbp),%eax
lea (%rax,%rax,1),%edx
mov -0xc(%rbp),%eax
add $0x1,%eax
mov %edx,%esi
mov %eax,%edi
callq 1149 <_Z9factorialii>
mov %rax,%rbx
mov -0xc(%rbp),%eax
mov %eax,%esi
mov $0x... | _Z5func0i:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 8
mov [rbp+var_C], edi
mov eax, [rbp+var_C]
lea edx, [rax+rax]
mov eax, [rbp+var_C]
add eax, 1
mov esi, edx; int
mov edi, eax; int
call _Z9factorialii; factorial(int,int)
mov rbx, rax
mov eax, [rbp+var_C]
mov... | long long func0(int a1)
{
long long v1; // rbx
v1 = factorial(a1 + 1, 2 * a1);
return v1 / factorial(1, a1);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x8
MOV dword ptr [RBP + -0xc],EDI
MOV EAX,dword ptr [RBP + -0xc]
LEA EDX,[RAX + RAX*0x1]
MOV EAX,dword ptr [RBP + -0xc]
ADD EAX,0x1
MOV ESI,EDX
MOV EDI,EAX
CALL 0x00101149
MOV RBX,RAX
MOV EAX,dword ptr [RBP + -0xc]
MOV ESI,EAX
MOV EDI,0x1
CALL 0x00101149
MOV RCX,RAX... | /* func0(int) */
long func0(int param_1)
{
long lVar1;
long lVar2;
lVar1 = factorial(param_1 + 1,param_1 * 2);
lVar2 = factorial(1,param_1);
return lVar1 / lVar2;
} |
3,617 | func0 |
#include <cassert>
long long factorial(int start, int end) {
long long res = 1;
for (int i = start; i <= end; i++) {
res *= i;
}
return res;
}
| long long func0(int n) {
return factorial(n + 1, 2 * n) / factorial(1, n);
}
| int main() {
assert(func0(4) == 70);
assert(func0(5) == 252);
assert(func0(2) == 6);
return 0;
}
| O1 | cpp | func0(int):
endbr64
lea (%rdi,%rdi,1),%eax
lea 0x1(%rdi),%ecx
cmp %ecx,%eax
jl 11d0 <_Z5func0i+0x58>
movslq %ecx,%rcx
sub %edi,%eax
lea -0x1(%rax),%edx
movslq %edi,%rax
lea 0x2(%rdx,%rax,1),%rdx
mov $0x1,%eax
imul %rcx,%rax
add $0x1,%rcx
cmp %rdx,%rcx
jne 119b <_Z5func0i+0x23>
test ... | _Z5func0i:
endbr64
lea edx, [rdi+1]
lea eax, [rdi+rdi]
cmp eax, edx
jl short loc_11CA
movsxd rdx, edx
movsxd rax, edi
lea ecx, [rdi-1]
lea rcx, [rax+rcx+2]
mov eax, 1
loc_1199:
imul rax, rdx
add rdx, 1
cmp rdx, rcx
jnz short loc_1199
loc_11A6:
test edi, edi
jle short... | long long func0(int a1)
{
long long v1; // rdx
long long v2; // rax
long long v3; // rdx
long long v4; // rcx
LODWORD(v1) = a1 + 1;
if ( 2 * a1 < a1 + 1 )
{
v2 = 1LL;
}
else
{
v1 = (int)v1;
v2 = 1LL;
do
v2 *= v1++;
while ( v1 != a1 + (unsigned long long)(unsigned int)(a1 ... | func0:
ENDBR64
LEA EDX,[RDI + 0x1]
LEA EAX,[RDI + RDI*0x1]
CMP EAX,EDX
JL 0x001011ca
MOVSXD RDX,EDX
MOVSXD RAX,EDI
LEA ECX,[RDI + -0x1]
LEA RCX,[RAX + RCX*0x1 + 0x2]
MOV EAX,0x1
LAB_00101199:
IMUL RAX,RDX
ADD RDX,0x1
CMP RDX,RCX
JNZ 0x00101199
LAB_001011a6:
TEST EDI,EDI
JLE 0x001011d1
LEA ESI,[RDI + 0x1]
MOV EDX,0x1
MO... | /* func0(int) */
long func0(int param_1)
{
long lVar1;
long lVar2;
ulong uVar3;
if (param_1 * 2 < param_1 + 1) {
lVar1 = 1;
}
else {
lVar2 = (long)(param_1 + 1);
lVar1 = 1;
do {
lVar1 = lVar1 * lVar2;
lVar2 = lVar2 + 1;
} while (lVar2 != (long)param_1 + 2 + (ulong)(param... |
3,618 | func0 |
#include <cassert>
long long factorial(int start, int end) {
long long res = 1;
for (int i = start; i <= end; i++) {
res *= i;
}
return res;
}
| long long func0(int n) {
return factorial(n + 1, 2 * n) / factorial(1, n);
}
| int main() {
assert(func0(4) == 70);
assert(func0(5) == 252);
assert(func0(2) == 6);
return 0;
}
| O2 | cpp | func0(int):
endbr64
lea (%rdi,%rdi,1),%eax
lea 0x1(%rdi),%edx
cmp %edx,%eax
jl 11f8 <_Z5func0i+0x68>
sub %edi,%eax
movslq %edx,%rdx
lea -0x1(%rax),%ecx
movslq %edi,%rax
lea 0x2(%rcx,%rax,1),%rcx
mov $0x1,%eax
nopl 0x0(%rax,%rax,1)
imul %rdx,%rax
add $0x1,%rdx
cmp %rcx,%rdx
jne 11b8... | _Z5func0i:
endbr64
lea r8d, [rdi+1]
lea eax, [rdi+rdi]
cmp eax, r8d
jl loc_1230
movsxd rax, edi
lea ecx, [rdi-1]
movsxd rdx, r8d
lea rsi, [rax+rcx+2]
mov eax, 1
mov rcx, rsi
sub rcx, rdx
and ecx, 1
jz short loc_11D0
mov rax, rdx
add rdx, 1
cmp rdx, rsi
jz ... | long long func0(int a1)
{
int v1; // r8d
long long v2; // rdx
unsigned long long v3; // rsi
long long result; // rax
long long v5; // rax
long long v6; // rcx
long long v7; // rdx
long long v8; // rcx
long long v9; // rcx
long long v10; // rsi
v1 = a1 + 1;
if ( 2 * a1 < a1 + 1 )
{
result... | func0:
ENDBR64
LEA R8D,[RDI + 0x1]
LEA EAX,[RDI + RDI*0x1]
CMP EAX,R8D
JL 0x00101230
MOVSXD RAX,EDI
LEA ECX,[RDI + -0x1]
MOVSXD RDX,R8D
LEA RSI,[RAX + RCX*0x1 + 0x2]
MOV EAX,0x1
MOV RCX,RSI
SUB RCX,RDX
AND ECX,0x1
JZ 0x001011d0
MOV RAX,RDX
ADD RDX,0x1
CMP RDX,RSI
JZ 0x001011e5
NOP
LAB_001011d0:
IMUL RAX,RDX
LEA RCX,[RD... | /* func0(int) */
long func0(int param_1)
{
long lVar1;
long lVar2;
long lVar3;
ulong uVar4;
uint uVar5;
uVar5 = param_1 + 1;
if (param_1 * 2 < (int)uVar5) {
lVar1 = 1;
}
else {
lVar3 = (long)(int)uVar5;
lVar2 = (long)param_1 + 2 + (ulong)(param_1 - 1);
lVar1 = 1;
if (((int)lVa... |
3,619 | func0 |
#include <cassert>
long long factorial(int start, int end) {
long long res = 1;
for (int i = start; i <= end; i++) {
res *= i;
}
return res;
}
| long long func0(int n) {
return factorial(n + 1, 2 * n) / factorial(1, n);
}
| int main() {
assert(func0(4) == 70);
assert(func0(5) == 252);
assert(func0(2) == 6);
return 0;
}
| O3 | cpp | func0(int):
endbr64
lea (%rdi,%rdi,1),%eax
lea 0x1(%rdi),%edx
cmp %edx,%eax
jl 11f8 <_Z5func0i+0x68>
sub %edi,%eax
movslq %edx,%rdx
lea -0x1(%rax),%ecx
movslq %edi,%rax
lea 0x2(%rcx,%rax,1),%rcx
mov $0x1,%eax
nopl 0x0(%rax,%rax,1)
imul %rdx,%rax
add $0x1,%rdx
cmp %rcx,%rdx
jne 11b8... | _Z5func0i:
endbr64
lea r8d, [rdi+1]
lea eax, [rdi+rdi]
cmp eax, r8d
jl loc_1230
movsxd rax, edi
lea ecx, [rdi-1]
movsxd rdx, r8d
lea rsi, [rax+rcx+2]
mov eax, 1
mov rcx, rsi
sub rcx, rdx
and ecx, 1
jz short loc_11D0
mov rax, rdx
add rdx, 1
cmp rdx, rsi
jz ... | long long func0(int a1)
{
int v1; // r8d
long long v2; // rdx
unsigned long long v3; // rsi
long long result; // rax
long long v5; // rax
long long v6; // rcx
long long v7; // rcx
long long v8; // rdx
long long v9; // rcx
long long v10; // rsi
v1 = a1 + 1;
if ( 2 * a1 < a1 + 1 )
{
result... | func0:
ENDBR64
LEA R8D,[RDI + 0x1]
LEA EAX,[RDI + RDI*0x1]
CMP EAX,R8D
JL 0x00101230
MOVSXD RAX,EDI
LEA ECX,[RDI + -0x1]
MOVSXD RDX,R8D
LEA RSI,[RAX + RCX*0x1 + 0x2]
MOV EAX,0x1
MOV RCX,RSI
SUB RCX,RDX
AND ECX,0x1
JZ 0x001011d0
MOV RAX,RDX
ADD RDX,0x1
CMP RDX,RSI
JZ 0x001011e5
NOP
LAB_001011d0:
IMUL RAX,RDX
LEA RCX,[RD... | /* func0(int) */
long func0(int param_1)
{
long lVar1;
long lVar2;
long lVar3;
ulong uVar4;
uint uVar5;
uVar5 = param_1 + 1;
if (param_1 * 2 < (int)uVar5) {
lVar1 = 1;
}
else {
lVar3 = (long)(int)uVar5;
lVar2 = (long)param_1 + 2 + (ulong)(param_1 - 1);
lVar1 = 1;
if (((int)lVa... |
3,620 | func0 |
#include <iostream>
#include <regex>
#include <string>
#include <vector>
#include <tuple>
#include <cassert>
| std::vector<std::tuple<std::string, std::string, std::string>> func0(const std::string& url) {
std::vector<std::tuple<std::string, std::string, std::string>> dates;
std::regex pattern(R"(/(\d{4})/(\d{1,2})/(\d{1,2})/)");
std::smatch match;
if (std::regex_search(url, match, pattern)) {
dates... | int main() {
std::vector<std::tuple<std::string, std::string, std::string>> expected1 = { {"2016", "09", "02"} };
assert(func0("https://www.washingtonpost.com/news/football-insider/wp/2016/09/02/odell-beckhams-fame-rests-on-one-stupid-little-ball-josh-norman-tells-author/") == expected1);
std::vector<s... | 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 $0xc8,%rsp
mov %rdi,-0xc8(%rbp)
mov %rsi,-0xd0(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0xc8(%rbp),%rax
mov %rax,%rdi
callq ... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 0C8h
mov [rbp+var_C8], rdi
mov [rbp+var_D0], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_C8]
mov rdi, rax
call _ZNSt6vectorISt5tupleIJ... | long long func0(long long a1, long long a2)
{
long long v2; // rax
long long v3; // rax
long long v4; // rax
_BYTE v6[32]; // [rsp+10h] [rbp-C0h] BYREF
_BYTE v7[32]; // [rsp+30h] [rbp-A0h] BYREF
_BYTE v8[32]; // [rsp+50h] [rbp-80h] BYREF
_BYTE v9[32]; // [rsp+70h] [rbp-60h] BYREF
_BYTE v10[40]; // [rsp... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0xc8
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
MOV RAX,qword ptr [RBP + -0xc8]
MOV RDI,RAX
CALL 0x00106528
LEA RAX,[RBP + -0xc0]
MOV EDX,0x10
LEA RCX,[0x135051]
MOV RSI,RCX
... | /* func0(std::string const&) */
string * func0(string *param_1)
{
bool bVar1;
string *in_RSI;
long in_FS_OFFSET;
regex local_c8 [32];
match_results<__normal_iterator<char_const*,std::string>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::string>>>>
local_a8 [32];
string local_88 [32];
... |
3,621 | func0 |
#include <iostream>
#include <regex>
#include <string>
#include <vector>
#include <tuple>
#include <cassert>
| std::vector<std::tuple<std::string, std::string, std::string>> func0(const std::string& url) {
std::vector<std::tuple<std::string, std::string, std::string>> dates;
std::regex pattern(R"(/(\d{4})/(\d{1,2})/(\d{1,2})/)");
std::smatch match;
if (std::regex_search(url, match, pattern)) {
dates... | int main() {
std::vector<std::tuple<std::string, std::string, std::string>> expected1 = { {"2016", "09", "02"} };
assert(func0("https://www.washingtonpost.com/news/football-insider/wp/2016/09/02/odell-beckhams-fame-rests-on-one-stupid-little-ball-josh-norman-tells-author/") == expected1);
std::vector<s... | 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 $0x228,%rsp
mov %rdi,%rbx
mov %rsi,%rbp
mov %fs:0x28,%rax
mov %rax,0x218(%rsp)
xor %eax,%eax
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi)
movq $0x0,0... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r14
push r12
push rbx
sub rsp, 228h
mov rbx, rdi
mov r14, rsi
mov rax, fs:28h
mov [rbp+var_28], rax
xor eax, eax
mov qword ptr [rdi], 0
mov qword ptr [rdi+8], 0
mov qwor... | _QWORD * func0(_QWORD *a1, long long a2)
{
long long v3; // rdx
long long v4; // rax
long long v5; // rdi
char *v6; // rax
char *v7; // rax
char *v8; // rax
long long v9; // rsi
long long v10; // rdx
long long v11; // rsi
long long v12; // rdx
long long v13; // rsi
long long v14; // rdx
int v1... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x228
MOV RBX,RDI
MOV R14,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
XOR EAX,EAX
MOV qword ptr [RDI],0x0
MOV qword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
LEA R12,[RBP + -0x238]
MOV RDI,R12
CALL 0x001046d0
MOV qword p... | /* func0(std::string const&) */
string * func0(string *param_1)
{
_Sp_counted_base<(_Lock_policy)2> *this;
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
bool bVar2;
int8 *puVar3;
int8 *in_RSI;
long in_FS_OFFSET;
int4 local_248 [2];
locale local_240 [2];
int8 local_238;
_Sp_counted_base<(_Lock_policy)... |
3,622 | func0 |
#include <iostream>
#include <regex>
#include <string>
#include <vector>
#include <tuple>
#include <cassert>
| std::vector<std::tuple<std::string, std::string, std::string>> func0(const std::string& url) {
std::vector<std::tuple<std::string, std::string, std::string>> dates;
std::regex pattern(R"(/(\d{4})/(\d{1,2})/(\d{1,2})/)");
std::smatch match;
if (std::regex_search(url, match, pattern)) {
dates... | int main() {
std::vector<std::tuple<std::string, std::string, std::string>> expected1 = { {"2016", "09", "02"} };
assert(func0("https://www.washingtonpost.com/news/football-insider/wp/2016/09/02/odell-beckhams-fame-rests-on-one-stupid-little-ball-josh-norman-tells-author/") == expected1);
std::vector<s... | O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r15
push %r14
mov %rsi,%r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x238,%rsp
mov %fs:0x28,%rax
mov %rax,0x228(%rsp)
xor %eax,%eax
movq $0x0,(%rdi)
lea 0x30... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
pxor xmm0, xmm0
mov rbp, rsp
push r15
push r14
lea r15, [rbp+var_248]
push r13
mov r13, rsi
push r12
lea r12, [rbp+var_1D0]
push rbx
mov rbx, rdi
sub rsp, 248h
mov rax, fs:28h
mov [rbp+v... | long long func0(long long a1, long long *a2)
{
char *v4; // rsi
__m128i v5; // xmm0
volatile signed __int32 *v6; // r14
long long v7; // rdx
volatile signed __int32 *v8; // rcx
signed __int32 v9; // eax
long long v10; // r14
long long v11; // rdx
volatile signed __int32 *v12; // rcx
signed __int32 ... | func0:
ENDBR64
PUSH RBP
PXOR XMM0,XMM0
MOV RBP,RSP
PUSH R15
PUSH R14
LEA R15,[RBP + -0x248]
PUSH R13
MOV R13,RSI
PUSH R12
LEA R12,[RBP + -0x1d0]
PUSH RBX
MOV RBX,RDI
SUB RSP,0x248
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x38],RAX
XOR EAX,EAX
MOV qword ptr [RDI + 0x10],0x0
MOVUPS xmmword ptr [RDI],XMM0
MOV RDI... | /* func0(std::string const&) */
string * func0(string *param_1)
{
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
int8 uVar2;
int8 uVar3;
bool bVar4;
int iVar5;
uint uVar6;
int8 *puVar7;
uint uVar8;
long lVar9;
long lVar10;
int8 *in_RSI;
long *plVar11;
ulong uVar12;
long in_FS_OFFSET;
string ... |
3,623 | func0 |
#include <iostream>
#include <regex>
#include <string>
#include <vector>
#include <tuple>
#include <cassert>
| std::vector<std::tuple<std::string, std::string, std::string>> func0(const std::string& url) {
std::vector<std::tuple<std::string, std::string, std::string>> dates;
std::regex pattern(R"(/(\d{4})/(\d{1,2})/(\d{1,2})/)");
std::smatch match;
if (std::regex_search(url, match, pattern)) {
dates... | int main() {
std::vector<std::tuple<std::string, std::string, std::string>> expected1 = { {"2016", "09", "02"} };
assert(func0("https://www.washingtonpost.com/news/football-insider/wp/2016/09/02/odell-beckhams-fame-rests-on-one-stupid-little-ball-josh-norman-tells-author/") == expected1);
std::vector<s... | O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r15
pxor %xmm0,%xmm0
mov %rsi,%r15
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x258,%rsp
mov %fs:0x28,%rax
mov %rax,0x248(%rsp)
xor %eax,%eax
lea 0x50... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
pxor xmm0, xmm0
mov rbp, rsp
push r15
mov r15, rsi
push r14
lea r14, [rbp+var_248]
push r13
push r12
lea r12, [rbp+var_1D0]
push rbx
mov rbx, rdi
sub rsp, 258h
mov rax, fs:28h
mov [rbp+v... | long long func0(long long a1, long long *a2)
{
__m128i v3; // xmm0
long long v4; // rdi
void *v5; // rdi
void **v6; // r13
unsigned long long v7; // r14
void *v8; // rdi
long long v9; // rdi
long long v10; // rsi
_QWORD **v11; // rsi
char v12; // al
long long v13; // rdx
__int128 v14; // rax
... | func0:
ENDBR64
PUSH RBP
PXOR XMM0,XMM0
MOV RBP,RSP
PUSH R15
MOV R15,RSI
PUSH R14
LEA R14,[RBP + -0x248]
PUSH R13
PUSH R12
LEA R12,[RBP + -0x1d0]
PUSH RBX
MOV RBX,RDI
SUB RSP,0x258
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x38],RAX
XOR EAX,EAX
MOV qword ptr [RDI + 0x10],0x0
MOVUPS xmmword ptr [RDI],XMM0
MOV RDI... | /* func0(std::string const&) */
string * func0(string *param_1)
{
int *puVar1;
int8 this;
int auVar2 [16];
bool bVar3;
long lVar4;
int8 *puVar5;
long lVar6;
long lVar7;
ulong uVar8;
int8 *in_RSI;
string *this_00;
long in_FS_OFFSET;
string *local_278;
string *local_270;
ulong local_260;
... |
3,624 | func0 |
#include <vector>
#include <set>
#include <cassert>
#include <algorithm>
| std::vector<int> func0(int n) {
std::vector<int> List;
for (int i = -1; i <= n*n+9; i+=2) {
List.push_back(i);
}
int i = 2;
while ((int)List.size() > i) {
std::set<int> ListSet(List.begin(), List.end());
std::vector<int> tempList;
for (int index = List[i]... | int main() {
std::vector<int> result10 = func0(10);
std::vector<int> expected10 = {1, 3, 7, 9, 13, 15, 21, 25, 31, 33};
std::vector<int> result5 = func0(5);
std::vector<int> expected5 = {1, 3, 7, 9, 13};
std::vector<int> result8 = func0(8);
std::vector<int> expected8 = {1, 3, 7, 9, 13, 15,... | O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0xc8,%rsp
mov %rdi,-0xc8(%rbp)
mov %esi,-0xcc(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
lea -0x90(%rbp),%rax
mov %rax,%rdi
callq 1c6a <_ZNSt6vectorIiSaIiEEC1Ev>
movl $0xffffffff,-0x50(%rbp)
mov -0xcc(%rbp),%... | _Z5func0i:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 0C8h
mov [rbp+var_C8], rdi
mov [rbp+var_CC], esi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_90]
mov rdi, rax
call _ZNSt6vectorIiSaIiEEC2Ev; std::vector<int>::vector(void)
mov dword ptr [... | long long func0(long long a1, int a2)
{
long long v2; // rbx
long long v3; // rax
long long v4; // rax
_DWORD *v5; // rax
unsigned long long v6; // rbx
long long v7; // rbx
long long v8; // rax
long long v9; // rbx
long long v10; // rax
int v11; // eax
long long v12; // rbx
long long v13; // ra... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0xc8
MOV qword ptr [RBP + -0xc8],RDI
MOV dword ptr [RBP + -0xcc],ESI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x90]
MOV RDI,RAX
CALL 0x00101c8c
MOV dword ptr [RBP + -0x50],0xffffffff
JMP 0x001013ec
LAB_001013cd:
LEA RDX,... | /* func0(int) */
vector<int,std::allocator<int>> * func0(int param_1)
{
bool bVar1;
_Rb_tree_const_iterator _Var2;
_Rb_tree_const_iterator _Var3;
int iVar4;
__normal_iterator _Var5;
__normal_iterator _Var6;
int *piVar7;
ulong uVar8;
ulong uVar9;
int in_ESI;
int4 in_register_0000003c;
long in_F... |
3,625 | func0 |
#include <vector>
#include <set>
#include <cassert>
#include <algorithm>
| std::vector<int> func0(int n) {
std::vector<int> List;
for (int i = -1; i <= n*n+9; i+=2) {
List.push_back(i);
}
int i = 2;
while ((int)List.size() > i) {
std::set<int> ListSet(List.begin(), List.end());
std::vector<int> tempList;
for (int index = List[i]... | int main() {
std::vector<int> result10 = func0(10);
std::vector<int> expected10 = {1, 3, 7, 9, 13, 15, 21, 25, 31, 33};
std::vector<int> result5 = func0(5);
std::vector<int> expected5 = {1, 3, 7, 9, 13};
std::vector<int> result8 = func0(8);
std::vector<int> expected8 = {1, 3, 7, 9, 13, 15,... | O1 | cpp | func0(int):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0xc8,%rsp
mov %rdi,0x20(%rsp)
mov %esi,0x2c(%rsp)
mov %fs:0x28,%rcx
mov %rcx,0xb8(%rsp)
xor %ecx,%ecx
movq $0x0,0x40(%rsp)
movq $0x0,0x48(%rsp)
movq $0x0,0x50(%rsp)
movl $0xffffffff,0x80(%rsp)
mov ... | _Z5func0i:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 0C8h
mov [rsp+0F8h+var_D8], rdi
mov [rsp+0F8h+var_CC], esi
mov rax, fs:28h
mov [rsp+0F8h+var_40], rax
xor eax, eax
mov [rsp+0F8h+src], 0
mov [rsp+0F8h+var_B0], 0
mov [rsp+0F8h+var_A8],... | _QWORD * func0(_QWORD *a1, int a2)
{
int v2; // ebp
int v3; // ebx
int *v4; // rsi
int *v5; // r14
int *v6; // r13
int *v7; // rbp
long long insert_hint_unique_pos; // rax
int *v9; // rdx
int *v10; // rbx
long long v11; // rax
int *v12; // rbp
int v13; // ebx
unsigned long long v14; // rax
c... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0xc8
MOV qword ptr [RSP + 0x20],RDI
MOV dword ptr [RSP + 0x2c],ESI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0xb8],RAX
XOR EAX,EAX
MOV qword ptr [RSP + 0x40],0x0
MOV qword ptr [RSP + 0x48],0x0
MOV qword ptr [RSP + 0x50],0x0
MOV dword pt... | /* func0(int) */
_Vector_base<int,std::allocator<int>> *
func0(int param_1,int param_2,int param_3,int param_4,int param_5,
int param_6,int8 param_7,int8 param_8,int param_9,int8 param_10,
int4 param_11,int1 param_12,int8 param_13,int8 param_14,
int8 param_15,int8 param_16)
{
_Rb_tree_node_base *p_Va... |
3,626 | func0 |
#include <vector>
#include <set>
#include <cassert>
#include <algorithm>
| std::vector<int> func0(int n) {
std::vector<int> List;
for (int i = -1; i <= n*n+9; i+=2) {
List.push_back(i);
}
int i = 2;
while ((int)List.size() > i) {
std::set<int> ListSet(List.begin(), List.end());
std::vector<int> tempList;
for (int index = List[i]... | int main() {
std::vector<int> result10 = func0(10);
std::vector<int> expected10 = {1, 3, 7, 9, 13, 15, 21, 25, 31, 33};
std::vector<int> result5 = func0(5);
std::vector<int> expected5 = {1, 3, 7, 9, 13};
std::vector<int> result8 = func0(8);
std::vector<int> expected8 = {1, 3, 7, 9, 13, 15,... | O2 | cpp | func0(int):
endbr64
push %r15
xor %edx,%edx
mov $0xffffffff,%eax
push %r14
xor %r14d,%r14d
push %r13
push %r12
push %rbp
push %rbx
mov %esi,%ebx
imul %esi,%ebx
sub $0xb8,%rsp
mov %rdi,0x18(%rsp)
add $0x9,%ebx
lea 0x70(%rsp),%rbp
mov %esi,0x2c(%rsp)
mov %fs:0x28,%rcx
mov %r... | _Z5func0i:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
push r12
xor r12d, r12d
push rbp
mov ebp, esi
push rbx
imul ebp, esi
mov ebx, 0FFFFFFFFh
sub rsp, 0D8h
add ebp, 9
mov [rsp+108h+var_BC], esi
lea r13, [rsp+108h+var_78]
xor esi, esi
mov [rsp+108h+var... | long long func0(long long a1, int a2)
{
int *v2; // r12
int v3; // ebx
int v4; // ebp
int *v5; // rsi
int *v6; // r13
long long i; // rax
int *v8; // rbp
bool v9; // r15
long long v10; // rax
int v11; // ecx
long long insert_unique_pos; // rax
int *v13; // rdx
int *v14; // rdx
int *v15; // ... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
PUSH R13
PUSH R12
XOR R12D,R12D
PUSH RBP
MOV EBP,ESI
PUSH RBX
IMUL EBP,ESI
MOV EBX,0xffffffff
SUB RSP,0xd8
ADD EBP,0x9
MOV dword ptr [RSP + 0x4c],ESI
LEA R13,[RSP + 0x90]
XOR ESI,ESI
MOV qword ptr [RSP + 0x40],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0xc8],RAX... | /* func0(int) */
int (*) [16]
func0(int param_1,int param_2,int param_3,int param_4,int param_5,
int param_6,int param_7,int8 param_8,int param_9,int8 param_10,
int8 param_11,int8 param_12,int4 param_13,int8 param_14,
int8 param_15,int8 param_16,int8 param_17)
{
_Rb_tree_node_base *p_Var1;
uint uVa... |
3,627 | func0 |
#include <vector>
#include <set>
#include <cassert>
#include <algorithm>
| std::vector<int> func0(int n) {
std::vector<int> List;
for (int i = -1; i <= n*n+9; i+=2) {
List.push_back(i);
}
int i = 2;
while ((int)List.size() > i) {
std::set<int> ListSet(List.begin(), List.end());
std::vector<int> tempList;
for (int index = List[i]... | int main() {
std::vector<int> result10 = func0(10);
std::vector<int> expected10 = {1, 3, 7, 9, 13, 15, 21, 25, 31, 33};
std::vector<int> result5 = func0(5);
std::vector<int> expected5 = {1, 3, 7, 9, 13};
std::vector<int> result8 = func0(8);
std::vector<int> expected8 = {1, 3, 7, 9, 13, 15,... | O3 | cpp | func0(int):
endbr64
push %r15
pxor %xmm0,%xmm0
xor %edx,%edx
push %r14
xor %r14d,%r14d
push %r13
push %r12
push %rbp
push %rbx
mov %esi,%ebx
imul %esi,%ebx
sub $0xb8,%rsp
mov %rdi,0x18(%rsp)
add $0x9,%ebx
lea 0x70(%rsp),%rbp
mov %esi,0x2c(%rsp)
mov %fs:0x28,%rax
mov %rax,0x... | _Z5func0i:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
push r12
xor r12d, r12d
push rbp
mov ebp, esi
push rbx
imul ebp, esi
mov ebx, 0FFFFFFFFh
sub rsp, 0D8h
add ebp, 9
mov [rsp+108h+var_BC], esi
lea r13, [rsp+108h+var_78]
xor esi, esi
mov [rsp+108h+var... | long long func0(long long a1, int a2)
{
int *v2; // r12
int v3; // ebx
int v4; // ebp
int *v5; // rsi
int *v6; // r14
int *v7; // rbx
int *v8; // r13
long long v9; // r15
int v10; // ecx
int *v11; // rbp
int v12; // edx
int *v13; // rax
bool v14; // r15
long long v15; // rax
int *v16; // ... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
PUSH R13
PUSH R12
XOR R12D,R12D
PUSH RBP
MOV EBP,ESI
PUSH RBX
IMUL EBP,ESI
MOV EBX,0xffffffff
SUB RSP,0xd8
ADD EBP,0x9
MOV dword ptr [RSP + 0x4c],ESI
LEA R13,[RSP + 0x90]
XOR ESI,ESI
MOV qword ptr [RSP + 0x40],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0xc8],RAX... | /* func0(int) */
int (*) [16] func0(int param_1)
{
_Rb_tree_node_base *p_Var1;
int iVar2;
int iVar3;
_Rb_tree_node_base *p_Var4;
uint uVar5;
int *piVar6;
_Rb_tree_node_base *p_Var7;
_Rb_tree_node_base *p_Var8;
void *pvVar9;
long lVar10;
int *piVar11;
int *piVar12;
_Iter_less_iter _Var13;
_... |
3,628 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int arr[], int n) {
for (int i = 0; i < n; i++) {
if (arr[i] == i) {
return i;
}
}
return -1;
}
| int main() {
int arr1[] = {-10, -1, 0, 3, 10, 11, 30, 50, 100};
int arr2[] = {1, 2, 3, 4, 5, 6, 7, 8};
int arr3[] = {0, 2, 5, 8, 17};
assert(func0(arr1, 9) == 3);
assert(func0(arr2, 8) == -1);
assert(func0(arr3, 5) == 0);
return 0;
}
| O0 | cpp | func0(int*, int):
endbr64
push %rbp
mov %rsp,%rbp
mov %rdi,-0x18(%rbp)
mov %esi,-0x1c(%rbp)
movl $0x0,-0x4(%rbp)
mov -0x4(%rbp),%eax
cmp -0x1c(%rbp),%eax
jge 11ed <_Z5func0Pii+0x44>
mov -0x4(%rbp),%eax
cltq
lea 0x0(,%rax,4),%rdx
mov -0x18(%rbp),%rax
add %rdx,%rax
mov (%rax),%eax
cmp... | _Z5func0Pii:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_18], rdi
mov [rbp+var_1C], esi
mov [rbp+var_4], 0
jmp short loc_11A5
loc_1181:
mov eax, [rbp+var_4]
cdqe
lea rdx, ds:0[rax*4]
mov rax, [rbp+var_18]
add rax, rdx
mov eax, [rax]
cmp [rbp+var_4], eax
jnz short loc_11... | long long func0(int *a1, int a2)
{
unsigned int i; // [rsp+18h] [rbp-4h]
for ( i = 0; (int)i < a2; ++i )
{
if ( i == a1[i] )
return i;
}
return 0xFFFFFFFFLL;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x1c],ESI
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001011a5
LAB_00101181:
MOV EAX,dword ptr [RBP + -0x4]
CDQE
LEA RDX,[RAX*0x4]
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,RDX
MOV EAX,dword ptr [RAX]
CMP dword ptr [RBP + -0x4],EAX
JNZ 0x0... | /* func0(int*, int) */
int func0(int *param_1,int param_2)
{
int local_c;
local_c = 0;
while( true ) {
if (param_2 <= local_c) {
return -1;
}
if (local_c == param_1[local_c]) break;
local_c = local_c + 1;
}
return local_c;
} |
3,629 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int arr[], int n) {
for (int i = 0; i < n; i++) {
if (arr[i] == i) {
return i;
}
}
return -1;
}
| int main() {
int arr1[] = {-10, -1, 0, 3, 10, 11, 30, 50, 100};
int arr2[] = {1, 2, 3, 4, 5, 6, 7, 8};
int arr3[] = {0, 2, 5, 8, 17};
assert(func0(arr1, 9) == 3);
assert(func0(arr2, 8) == -1);
assert(func0(arr3, 5) == 0);
return 0;
}
| O1 | cpp | func0(int*, int):
endbr64
test %esi,%esi
jle 11d6 <_Z5func0Pii+0x2d>
lea -0x1(%rsi),%ecx
mov $0x0,%eax
jmp 11be <_Z5func0Pii+0x15>
mov %rdx,%rax
mov %eax,%edx
cmp %eax,(%rdi,%rax,4)
je 11d3 <_Z5func0Pii+0x2a>
lea 0x1(%rax),%rdx
cmp %rcx,%rax
jne 11bb <_Z5func0Pii+0x12>
mov $0xffff... | _Z5func0Pii:
endbr64
test esi, esi
jle short loc_118D
movsxd rsi, esi
mov eax, 0
loc_1179:
cmp [rdi+rax*4], eax
jz short locret_1192
add rax, 1
cmp rax, rsi
jnz short loc_1179
mov eax, 0FFFFFFFFh
retn
loc_118D:
mov eax, 0FFFFFFFFh
locret_1192:
retn | long long func0(int *a1, int a2)
{
long long result; // rax
if ( a2 <= 0 )
return 0xFFFFFFFFLL;
result = 0LL;
while ( a1[result] != (_DWORD)result )
{
if ( ++result == a2 )
return 0xFFFFFFFFLL;
}
return result;
} | func0:
ENDBR64
TEST ESI,ESI
JLE 0x0010118d
MOVSXD RSI,ESI
MOV EAX,0x0
LAB_00101179:
CMP dword ptr [RDI + RAX*0x4],EAX
JZ 0x00101192
ADD RAX,0x1
CMP RAX,RSI
JNZ 0x00101179
MOV EAX,0xffffffff
RET
LAB_0010118d:
MOV EAX,0xffffffff
LAB_00101192:
RET | /* func0(int*, int) */
long func0(int *param_1,int param_2)
{
long lVar1;
if (param_2 < 1) {
lVar1 = 0xffffffff;
}
else {
lVar1 = 0;
while (param_1[lVar1] != (int)lVar1) {
lVar1 = lVar1 + 1;
if (lVar1 == param_2) {
return 0xffffffff;
}
}
}
return lVar1;
} |
3,630 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int arr[], int n) {
for (int i = 0; i < n; i++) {
if (arr[i] == i) {
return i;
}
}
return -1;
}
| int main() {
int arr1[] = {-10, -1, 0, 3, 10, 11, 30, 50, 100};
int arr2[] = {1, 2, 3, 4, 5, 6, 7, 8};
int arr3[] = {0, 2, 5, 8, 17};
assert(func0(arr1, 9) == 3);
assert(func0(arr2, 8) == -1);
assert(func0(arr3, 5) == 0);
return 0;
}
| O2 | cpp | func0(int*, int):
endbr64
test %esi,%esi
jle 1350 <_Z5func0Pii+0x30>
lea -0x1(%rsi),%ecx
xor %eax,%eax
jmp 133c <_Z5func0Pii+0x1c>
lea 0x1(%rax),%rdx
cmp %rcx,%rax
je 1350 <_Z5func0Pii+0x30>
mov %rdx,%rax
mov %eax,%r8d
cmp %eax,(%rdi,%rax,4)
jne 1330 <_Z5func0Pii+0x10>
mov %r8d,%e... | _Z5func0Pii:
endbr64
test esi, esi
jle short loc_1280
movsxd rsi, esi
xor eax, eax
jmp short loc_1279
loc_1270:
add rax, 1
cmp rax, rsi
jz short loc_1280
loc_1279:
cmp [rdi+rax*4], eax
jnz short loc_1270
retn
loc_1280:
mov eax, 0FFFFFFFFh
retn | long long func0(int *a1, int a2)
{
long long result; // rax
if ( a2 <= 0 )
return 0xFFFFFFFFLL;
result = 0LL;
while ( a1[result] != (_DWORD)result )
{
if ( ++result == a2 )
return 0xFFFFFFFFLL;
}
return result;
} | func0:
ENDBR64
TEST ESI,ESI
JLE 0x00101280
MOVSXD RSI,ESI
XOR EAX,EAX
JMP 0x00101279
LAB_00101270:
ADD RAX,0x1
CMP RAX,RSI
JZ 0x00101280
LAB_00101279:
CMP dword ptr [RDI + RAX*0x4],EAX
JNZ 0x00101270
RET
LAB_00101280:
MOV EAX,0xffffffff
RET | /* func0(int*, int) */
long func0(int *param_1,int param_2)
{
long lVar1;
if (0 < param_2) {
lVar1 = 0;
do {
if (param_1[lVar1] == (int)lVar1) {
return lVar1;
}
lVar1 = lVar1 + 1;
} while (lVar1 != param_2);
}
return 0xffffffff;
} |
3,631 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int arr[], int n) {
for (int i = 0; i < n; i++) {
if (arr[i] == i) {
return i;
}
}
return -1;
}
| int main() {
int arr1[] = {-10, -1, 0, 3, 10, 11, 30, 50, 100};
int arr2[] = {1, 2, 3, 4, 5, 6, 7, 8};
int arr3[] = {0, 2, 5, 8, 17};
assert(func0(arr1, 9) == 3);
assert(func0(arr2, 8) == -1);
assert(func0(arr3, 5) == 0);
return 0;
}
| O3 | cpp | func0(int*, int):
endbr64
test %esi,%esi
jle 1310 <_Z5func0Pii+0x30>
lea -0x1(%rsi),%ecx
xor %eax,%eax
jmp 12fc <_Z5func0Pii+0x1c>
lea 0x1(%rax),%rdx
cmp %rcx,%rax
je 1310 <_Z5func0Pii+0x30>
mov %rdx,%rax
mov %eax,%r8d
cmp %eax,(%rdi,%rax,4)
jne 12f0 <_Z5func0Pii+0x10>
mov %r8d,%e... | _Z5func0Pii:
endbr64
test esi, esi
jle short loc_1160
movsxd rsi, esi
xor eax, eax
jmp short loc_1159
loc_1150:
add rax, 1
cmp rax, rsi
jz short loc_1160
loc_1159:
cmp [rdi+rax*4], eax
jnz short loc_1150
retn
loc_1160:
mov eax, 0FFFFFFFFh
retn | long long func0(int *a1, int a2)
{
long long result; // rax
if ( a2 <= 0 )
return 0xFFFFFFFFLL;
result = 0LL;
while ( a1[result] != (_DWORD)result )
{
if ( ++result == a2 )
return 0xFFFFFFFFLL;
}
return result;
} | func0:
ENDBR64
TEST ESI,ESI
JLE 0x00101160
MOVSXD RSI,ESI
XOR EAX,EAX
JMP 0x00101159
LAB_00101150:
ADD RAX,0x1
CMP RAX,RSI
JZ 0x00101160
LAB_00101159:
CMP dword ptr [RDI + RAX*0x4],EAX
JNZ 0x00101150
RET
LAB_00101160:
MOV EAX,0xffffffff
RET | /* func0(int*, int) */
long func0(int *param_1,int param_2)
{
long lVar1;
if (0 < param_2) {
lVar1 = 0;
do {
if (param_1[lVar1] == (int)lVar1) {
return lVar1;
}
lVar1 = lVar1 + 1;
} while (lVar1 != param_2);
}
return 0xffffffff;
} |
3,632 | func0 |
#include <iostream>
#include <string>
#include <cassert>
| int func0(int num) {
for (int x = num - 1; x > 0; x--) {
std::string s = std::to_string(x);
std::string rev_s = std::string(s.rbegin(), s.rend());
if (s == rev_s) {
return x;
}
}
return -1; // In case no palindrome is found, invalid for given problem const... | int main() {
assert(func0(99) == 88);
assert(func0(1221) == 1111);
assert(func0(120) == 111);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
push %r12
push %rbx
add $0xffffffffffffff80,%rsp
mov %edi,-0x84(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x84(%rbp),%eax
sub $0x1,%eax
mov %eax,-0x74(%rbp)
cmpl $0x0,-0x74(%rbp)
jle 258d <_Z5func0i+0x104>
lea -0x... | _Z5func0i:
endbr64
push rbp
mov rbp, rsp
push r12
push rbx
add rsp, 0FFFFFFFFFFFFFF80h
mov [rbp+var_84], edi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov eax, [rbp+var_84]
sub eax, 1
mov [rbp+var_7C], eax
jmp loc_1482
loc_13BE:
lea rax, [rbp+var_60]
mov ... | long long func0(int a1)
{
unsigned int v1; // ebx
int v2; // r12d
char v4; // [rsp+13h] [rbp-7Dh] BYREF
int i; // [rsp+14h] [rbp-7Ch]
_BYTE v6[8]; // [rsp+18h] [rbp-78h] BYREF
_BYTE v7[8]; // [rsp+20h] [rbp-70h] BYREF
char *v8; // [rsp+28h] [rbp-68h]
_BYTE v9[32]; // [rsp+30h] [rbp-60h] BYREF
_BYTE v... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R12
PUSH RBX
ADD RSP,-0x80
MOV dword ptr [RBP + -0x84],EDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV EAX,dword ptr [RBP + -0x84]
SUB EAX,0x1
MOV dword ptr [RBP + -0x7c],EAX
JMP 0x00101482
LAB_001013be:
LEA RAX,[RBP + -0x60]
MOV EDX,dword ptr [RB... | /* func0(int) */
int func0(int param_1)
{
bool bVar1;
int unaff_EBX;
long in_FS_OFFSET;
allocator local_85;
int local_84;
int local_80 [8];
int local_78 [8];
allocator *local_70;
string local_68 [32];
string local_48 [40];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
for (loc... |
3,633 | func0 |
#include <iostream>
#include <string>
#include <cassert>
| int func0(int num) {
for (int x = num - 1; x > 0; x--) {
std::string s = std::to_string(x);
std::string rev_s = std::string(s.rbegin(), s.rend());
if (s == rev_s) {
return x;
}
}
return -1; // In case no palindrome is found, invalid for given problem const... | int main() {
assert(func0(99) == 88);
assert(func0(1221) == 1111);
assert(func0(120) == 111);
return 0;
}
| O1 | cpp | func0(int):
endbr64
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x60,%rsp
mov %fs:0x28,%rax
mov %rax,0x58(%rsp)
xor %eax,%eax
lea -0x1(%rdi),%r12d
test %r12d,%r12d
jle 13e7 <_Z5func0i+0x19e>
lea 0x10(%rsp),%r13
jmpq 1305 <_Z5func0i+0xbc>
lea 0x8(%rsp),%rsi
lea 0x30(%r... | _Z5func0i:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 138h
mov rax, fs:28h
mov [rsp+168h+var_40], rax
xor eax, eax
lea r14d, [rdi-1]
test r14d, r14d
jle loc_187B
mov r12, 3330323031303030h
mov r13, 3730363035303430h
jmp loc_1525
loc_12... | long long func0(int a1)
{
unsigned int v1; // r14d
unsigned int v2; // ebx
_BYTE *v3; // rcx
int v4; // ebp
char v5; // bp
char *v6; // r15
size_t v7; // rbp
char *v8; // rbx
char *v9; // rax
char *v10; // rbx
char *v11; // rbp
unsigned int v12; // ebp
unsigned int v13; // eax
unsigned int ... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x138
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x128],RAX
XOR EAX,EAX
LEA R14D,[RDI + -0x1]
TEST R14D,R14D
JLE 0x0010187b
MOV R12,0x3330323031303030
MOV R13,0x3730363035303430
JMP 0x00101525
LAB_00101277:
MOV EBX,0x1
LAB_0010127c:
LEA ... | /* func0(int) */
uint func0(int param_1)
{
long *plVar1;
ulong *puVar2;
uint uVar3;
int iVar4;
ulong *puVar5;
uint uVar6;
uint uVar7;
ulong uVar8;
uint uVar9;
long *plVar10;
char cVar11;
ulong uVar12;
uint uVar13;
long in_FS_OFFSET;
ulong local_160;
long *local_158;
ulong local_150;
... |
3,634 | func0 |
#include <iostream>
#include <string>
#include <cassert>
| int func0(int num) {
for (int x = num - 1; x > 0; x--) {
std::string s = std::to_string(x);
std::string rev_s = std::string(s.rbegin(), s.rend());
if (s == rev_s) {
return x;
}
}
return -1; // In case no palindrome is found, invalid for given problem const... | int main() {
assert(func0(99) == 88);
assert(func0(1221) == 1111);
assert(func0(120) == 111);
return 0;
}
| O2 | cpp | func0(int):
endbr64
push %r15
push %r14
push %r13
push %r12
lea -0x1(%rdi),%r12d
push %rbp
push %rbx
sub $0x88,%rsp
mov %fs:0x28,%rax
mov %rax,0x78(%rsp)
xor %eax,%eax
test %r12d,%r12d
jle 1467 <_Z5func0i+0x117>
lea 0x50(%rsp),%rax
lea 0x30(%rsp),%r15
mov %rax,0x10(%rsp)
lea ... | _Z5func0i:
endbr64
push r15
push r14
push r13
push r12
push rbp
lea ebp, [rdi-1]
push rbx
sub rsp, 148h
mov rax, fs:28h
mov [rsp+178h+var_40], rax
xor eax, eax
test ebp, ebp
jle loc_15B2
lea rax, [rsp+178h+s1]
lea r15, [rsp+178h+var_148]
mov [rsp+178h+var_178], r... | long long func0(int a1)
{
int v1; // ebp
unsigned int v2; // r12d
unsigned int v3; // ebx
long long v4; // rsi
_BYTE *v5; // rcx
unsigned int v6; // eax
unsigned int v7; // esi
long long v8; // rax
long long v9; // rdi
long long v10; // rdx
__int8 v11; // r12
size_t v12; // r12
_QWORD *v13; /... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
LEA EBP,[RDI + -0x1]
PUSH RBX
SUB RSP,0x148
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x138],RAX
XOR EAX,EAX
TEST EBP,EBP
JLE 0x001015b2
LEA RAX,[RSP + 0x20]
LEA R15,[RSP + 0x30]
MOV qword ptr [RSP],RAX
LEA RAX,[RSP + 0x40]
LEA R13,[RSP + 0x50]
MOV qwor... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(int) */
uint func0(int param_1)
{
uint uVar1;
int uVar2;
long *plVar3;
uint uVar4;
int iVar5;
ulong *puVar6;
ulong *puVar7;
ulong *__s2;
uint uVar8;
uint uVar9;
long *plVar10;
uint uVar11;
char cVar... |
3,635 | func0 |
#include <iostream>
#include <string>
#include <cassert>
| int func0(int num) {
for (int x = num - 1; x > 0; x--) {
std::string s = std::to_string(x);
std::string rev_s = std::string(s.rbegin(), s.rend());
if (s == rev_s) {
return x;
}
}
return -1; // In case no palindrome is found, invalid for given problem const... | int main() {
assert(func0(99) == 88);
assert(func0(1221) == 1111);
assert(func0(120) == 111);
return 0;
}
| O3 | cpp | func0(int):
endbr64
push %r15
push %r14
push %r13
push %r12
lea -0x1(%rdi),%r12d
push %rbp
push %rbx
sub $0x88,%rsp
mov %fs:0x28,%rax
mov %rax,0x78(%rsp)
xor %eax,%eax
test %r12d,%r12d
jle 1628 <_Z5func0i+0x118>
lea 0x50(%rsp),%rax
lea 0x30(%rsp),%r15
mov %rax,0x10(%rsp)
lea ... | _Z5func0i:
endbr64
push r15
push r14
push r13
push r12
push rbp
lea ebp, [rdi-1]
push rbx
sub rsp, 148h
mov rax, fs:28h
mov [rsp+178h+var_40], rax
xor eax, eax
test ebp, ebp
jle loc_15BE
lea rax, [rsp+178h+s1]
lea r15, [rsp+178h+var_148]
mov [rsp+178h+var_178], r... | long long func0(int a1)
{
int v1; // ebp
unsigned int v2; // r12d
unsigned int v3; // ebx
long long v4; // rsi
_BYTE *v5; // rcx
unsigned int v6; // eax
unsigned int v7; // esi
long long v8; // rax
long long v9; // rdi
long long v10; // rdx
__int8 v11; // r12
size_t v12; // r12
_QWORD *v13; /... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
LEA EBP,[RDI + -0x1]
PUSH RBX
SUB RSP,0x148
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x138],RAX
XOR EAX,EAX
TEST EBP,EBP
JLE 0x001015be
LEA RAX,[RSP + 0x20]
LEA R15,[RSP + 0x30]
MOV qword ptr [RSP],RAX
LEA RAX,[RSP + 0x40]
LEA R13,[RSP + 0x50]
MOV qwor... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(int) */
uint func0(int param_1)
{
uint uVar1;
int uVar2;
long *plVar3;
uint uVar4;
int iVar5;
ulong *puVar6;
ulong *puVar7;
ulong *__s2;
uint uVar8;
long *plVar9;
uint uVar10;
char cVar11;
ulong uVa... |
3,636 | func0 |
#include <ctime>
#include <cassert>
| bool func0(int m, int d, int y) {
struct tm timeinfo = {0};
timeinfo.tm_year = y - 1900;
timeinfo.tm_mon = m - 1;
timeinfo.tm_mday = d;
timeinfo.tm_isdst = -1; // Not setting DST
time_t rawtime = mktime(&timeinfo);
return rawtime != -1 && timeinfo.tm_mday == d && timeinfo.tm_mon ==... | int main() {
assert(func0(11, 11, 2002) == true);
assert(func0(13, 11, 2002) == false);
assert(func0(11, 11, 2002) == true); // re-checking with same type of inputs as C++ doesn't support implicit type conversions in this context
return 0;
}
| O0 | cpp | func0(int, int, int):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x60,%rsp
mov %edi,-0x54(%rbp)
mov %esi,-0x58(%rbp)
mov %edx,-0x5c(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x8(%rbp)
xor %eax,%eax
movq $0x0,-0x40(%rbp)
movq $0x0,-0x38(%rbp)
movq $0x0,-0x30(%rbp)
movq $0x0,-0x28(%rbp)
movq $0x0,-0... | _Z5func0iii:
endbr64
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_54], edi
mov [rbp+var_58], esi
mov [rbp+var_5C], edx
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
pxor xmm0, xmm0
movaps xmmword ptr [rbp+tp.tm_sec], xmm0
movaps xmmword ptr [rbp+tp.tm_mon], xmm0
movaps xm... | _BOOL8 func0(int a1, int a2, int a3)
{
tm tp; // [rsp+20h] [rbp-40h] BYREF
unsigned long long v6; // [rsp+58h] [rbp-8h]
v6 = __readfsqword(0x28u);
*(_OWORD *)&tp.tm_sec = 0LL;
memset(&tp.tm_yday, 0, 28);
*(_QWORD *)&tp.tm_year = (unsigned int)(a3 - 1900);
tp.tm_mon = a1 - 1;
tp.tm_mday = a2;
tp.tm_i... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV dword ptr [RBP + -0x54],EDI
MOV dword ptr [RBP + -0x58],ESI
MOV dword ptr [RBP + -0x5c],EDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
PXOR XMM0,XMM0
MOVAPS xmmword ptr [RBP + -0x40],XMM0
MOVAPS xmmword ptr [RBP + -0x30],XMM0
MOVAPS xmmwor... | /* func0(int, int, int) */
int8 func0(int param_1,int param_2,int param_3)
{
time_t tVar1;
int8 uVar2;
long in_FS_OFFSET;
int local_48 [12];
int iStack_3c;
int local_38 [16];
int4 local_28;
int auStack_24 [12];
char *local_18;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_... |
3,637 | func0 |
#include <ctime>
#include <cassert>
| bool func0(int m, int d, int y) {
struct tm timeinfo = {0};
timeinfo.tm_year = y - 1900;
timeinfo.tm_mon = m - 1;
timeinfo.tm_mday = d;
timeinfo.tm_isdst = -1; // Not setting DST
time_t rawtime = mktime(&timeinfo);
return rawtime != -1 && timeinfo.tm_mday == d && timeinfo.tm_mon ==... | int main() {
assert(func0(11, 11, 2002) == true);
assert(func0(13, 11, 2002) == false);
assert(func0(11, 11, 2002) == true); // re-checking with same type of inputs as C++ doesn't support implicit type conversions in this context
return 0;
}
| O1 | cpp | func0(int, int, int):
endbr64
push %r12
push %rbp
push %rbx
sub $0x40,%rsp
mov %esi,%ebx
mov %fs:0x28,%rax
mov %rax,0x38(%rsp)
xor %eax,%eax
movq $0x0,(%rsp)
movq $0x0,0x8(%rsp)
movq $0x0,0x18(%rsp)
movq $0x0,0x20(%rsp)
movq $0x0,0x28(%rsp)
movq $0x0,0x30(%rsp)
lea -0x76c(%rdx),%r12d... | _Z5func0iii:
endbr64
push r12
push rbp
push rbx
sub rsp, 40h
mov ebx, esi
mov rax, fs:28h
mov [rsp+58h+var_20], rax
xor eax, eax
pxor xmm0, xmm0
movaps [rsp+58h+var_58], xmm0
movaps [rsp+58h+var_48], xmm0
movaps [rsp+58h+var_38], xmm0
mov [rsp+58h+var_28], 0
lea r12d, [rdx-76C... | bool func0(int a1, int a2, int a3)
{
int v3; // r12d
time_t v4; // rdx
bool result; // al
struct tm v6; // [rsp+0h] [rbp-58h] BYREF
unsigned long long v7; // [rsp+38h] [rbp-20h]
v7 = __readfsqword(0x28u);
*(_OWORD *)&v6.tm_sec = 0LL;
memset(&v6.tm_yday, 0, 28);
v3 = a3 - 1900;
*(_QWORD *)&v6.tm_ye... | func0:
ENDBR64
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x40
MOV EBX,ESI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
PXOR XMM0,XMM0
MOVAPS xmmword ptr [RSP],XMM0
MOVAPS xmmword ptr [RSP + 0x10],XMM0
MOVAPS xmmword ptr [RSP + 0x20],XMM0
MOV qword ptr [RSP + 0x30],0x0
LEA R12D,[RDX + -0x76c]
MOV dwor... | /* func0(int, int, int) */
bool func0(int param_1,int param_2,int param_3)
{
time_t tVar1;
long in_FS_OFFSET;
bool bVar2;
int local_58 [12];
int iStack_4c;
int local_48 [16];
int4 local_38;
int auStack_34 [12];
char *local_28;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
local_... |
3,638 | func0 |
#include <ctime>
#include <cassert>
| bool func0(int m, int d, int y) {
struct tm timeinfo = {0};
timeinfo.tm_year = y - 1900;
timeinfo.tm_mon = m - 1;
timeinfo.tm_mday = d;
timeinfo.tm_isdst = -1; // Not setting DST
time_t rawtime = mktime(&timeinfo);
return rawtime != -1 && timeinfo.tm_mday == d && timeinfo.tm_mon ==... | int main() {
assert(func0(11, 11, 2002) == true);
assert(func0(13, 11, 2002) == false);
assert(func0(11, 11, 2002) == true); // re-checking with same type of inputs as C++ doesn't support implicit type conversions in this context
return 0;
}
| O2 | cpp | func0(int, int, int):
endbr64
push %r12
pxor %xmm0,%xmm0
lea -0x76c(%rdx),%r12d
push %rbp
lea -0x1(%rdi),%ebp
push %rbx
mov %esi,%ebx
sub $0x40,%rsp
mov %fs:0x28,%rax
mov %rax,0x38(%rsp)
xor %eax,%eax
mov %rsp,%rdi
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
movaps %xmm0,0x20(%rsp)
movq ... | _Z5func0iii:
endbr64
push r12
pxor xmm0, xmm0
lea r12d, [rdx-76Ch]
push rbp
lea ebp, [rdi-1]
push rbx
mov ebx, esi
sub rsp, 40h
mov rax, fs:28h
mov [rsp+58h+var_20], rax
xor eax, eax
mov rdi, rsp; tp
movaps [rsp+58h+var_48], xmm0
movaps [rsp+58h+var_58], xmm0
movaps [rsp+5... | bool func0(int a1, int a2, int a3)
{
int v3; // r12d
time_t v4; // rdx
bool result; // al
struct tm v6; // [rsp+0h] [rbp-58h] BYREF
unsigned long long v7; // [rsp+38h] [rbp-20h]
v3 = a3 - 1900;
v7 = __readfsqword(0x28u);
memset(&v6.tm_yday, 0, 28);
*(_OWORD *)&v6.tm_sec = 0LL;
*(_QWORD *)&v6.tm_ye... | func0:
ENDBR64
PUSH R12
PXOR XMM0,XMM0
LEA R12D,[RDX + -0x76c]
PUSH RBP
LEA EBP,[RDI + -0x1]
PUSH RBX
MOV EBX,ESI
SUB RSP,0x40
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
MOV RDI,RSP
MOVAPS xmmword ptr [RSP + 0x10],XMM0
MOVAPS xmmword ptr [RSP],XMM0
MOVAPS xmmword ptr [RSP + 0x20],XMM0
MOV qw... | /* func0(int, int, int) */
bool func0(int param_1,int param_2,int param_3)
{
time_t tVar1;
long in_FS_OFFSET;
bool bVar2;
int local_58 [12];
int iStack_4c;
int local_48 [16];
int4 local_38;
int auStack_34 [12];
char *local_28;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
local_... |
3,639 | func0 |
#include <ctime>
#include <cassert>
| bool func0(int m, int d, int y) {
struct tm timeinfo = {0};
timeinfo.tm_year = y - 1900;
timeinfo.tm_mon = m - 1;
timeinfo.tm_mday = d;
timeinfo.tm_isdst = -1; // Not setting DST
time_t rawtime = mktime(&timeinfo);
return rawtime != -1 && timeinfo.tm_mday == d && timeinfo.tm_mon ==... | int main() {
assert(func0(11, 11, 2002) == true);
assert(func0(13, 11, 2002) == false);
assert(func0(11, 11, 2002) == true); // re-checking with same type of inputs as C++ doesn't support implicit type conversions in this context
return 0;
}
| O3 | cpp | func0(int, int, int):
endbr64
push %r12
pxor %xmm0,%xmm0
lea -0x76c(%rdx),%r12d
push %rbp
lea -0x1(%rdi),%ebp
push %rbx
mov %esi,%ebx
sub $0x40,%rsp
mov %fs:0x28,%rax
mov %rax,0x38(%rsp)
xor %eax,%eax
mov %rsp,%rdi
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
movaps %xmm0,0x20(%rsp)
movq ... | _Z5func0iii:
endbr64
push r12
pxor xmm0, xmm0
lea r12d, [rdx-76Ch]
push rbp
lea ebp, [rdi-1]
push rbx
mov ebx, esi
sub rsp, 40h
mov rax, fs:28h
mov [rsp+58h+var_20], rax
xor eax, eax
mov rdi, rsp; tp
movaps [rsp+58h+var_48], xmm0
movaps [rsp+58h+var_58], xmm0
movaps [rsp+5... | bool func0(int a1, int a2, int a3)
{
int v3; // r12d
time_t v4; // rdx
bool result; // al
struct tm v6; // [rsp+0h] [rbp-58h] BYREF
unsigned long long v7; // [rsp+38h] [rbp-20h]
v3 = a3 - 1900;
v7 = __readfsqword(0x28u);
memset(&v6.tm_yday, 0, 28);
*(_OWORD *)&v6.tm_sec = 0LL;
*(_QWORD *)&v6.tm_ye... | func0:
ENDBR64
PUSH R12
PXOR XMM0,XMM0
LEA R12D,[RDX + -0x76c]
PUSH RBP
LEA EBP,[RDI + -0x1]
PUSH RBX
MOV EBX,ESI
SUB RSP,0x40
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
MOV RDI,RSP
MOVAPS xmmword ptr [RSP + 0x10],XMM0
MOVAPS xmmword ptr [RSP],XMM0
MOVAPS xmmword ptr [RSP + 0x20],XMM0
MOV qw... | /* func0(int, int, int) */
bool func0(int param_1,int param_2,int param_3)
{
time_t tVar1;
long in_FS_OFFSET;
bool bVar2;
int local_58 [12];
int iStack_4c;
int local_48 [16];
int4 local_38;
int auStack_34 [12];
char *local_28;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
local_... |
3,640 | func0 |
#include <vector>
#include <algorithm>
#include <cassert>
| int func0(std::vector<int> nums) {
std::sort(nums.begin(), nums.end());
int n = nums.size();
return std::max(nums[n - 1] * nums[n - 2] * nums[n - 3], nums[n - 1] * nums[0] * nums[1]);
}
| int main() {
assert(func0({12, 74, 9, 50, 61, 41}) == 225700);
assert(func0({25, 35, 22, 85, 14, 65, 75, 25, 58}) == 414375);
assert(func0({18, 14, 10, 9, 8, 7, 9, 3, 2, 4, 1}) == 2520);
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> >):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x38,%rsp
mov %rdi,-0x38(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x38(%rbp),%rax
mov %rax,%rdi
callq 17ae <_ZNSt6vectorIiSaIiEE3endEv>
mov %rax,%rbx
mov -0x38(%rbp),%r... | _Z5func0St6vectorIiSaIiEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 38h
mov [rbp+var_38], rdi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_38]
mov rdi, rax
call _ZNSt6vectorIiSaIiEE3endEv; std::vector<int>::end(void)
mov rbx, rax
mov rax, [... | long long func0(long long a1)
{
long long v1; // rbx
long long v2; // rax
int v4; // [rsp+1Ch] [rbp-24h] BYREF
int v5; // [rsp+20h] [rbp-20h] BYREF
int v6; // [rsp+24h] [rbp-1Ch]
unsigned long long v7; // [rsp+28h] [rbp-18h]
v7 = __readfsqword(0x28u);
v1 = std::vector<int>::end(a1);
v2 = std::vector... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x38
MOV qword ptr [RBP + -0x38],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RDI,RAX
CALL 0x001017b8
MOV RBX,RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RDI,RAX
CALL 0x0010176c
MOV RSI,RBX
MOV RDI,RAX
CA... | /* func0(std::vector<int, std::allocator<int> >) */
int func0(vector param_1)
{
int iVar1;
int iVar2;
__normal_iterator _Var3;
__normal_iterator _Var4;
int *piVar5;
int4 in_register_0000003c;
vector<int,std::allocator<int>> *this;
long in_FS_OFFSET;
int local_2c;
int local_28;
int local_24;
lo... |
3,641 | func0 |
#include <vector>
#include <algorithm>
#include <cassert>
| int func0(std::vector<int> nums) {
std::sort(nums.begin(), nums.end());
int n = nums.size();
return std::max(nums[n - 1] * nums[n - 2] * nums[n - 3], nums[n - 1] * nums[0] * nums[1]);
}
| int main() {
assert(func0({12, 74, 9, 50, 61, 41}) == 225700);
assert(func0({25, 35, 22, 85, 14, 65, 75, 25, 58}) == 414375);
assert(func0({18, 14, 10, 9, 8, 7, 9, 3, 2, 4, 1}) == 2520);
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> >):
endbr64
push %r13
push %r12
push %rbp
push %rbx
sub $0x8,%rsp
mov %rdi,%rbp
mov 0x8(%rdi),%r12
mov (%rdi),%r13
cmp %r12,%r13
je 12cb <_Z5func0St6vectorIiSaIiEE+0xa2>
mov %r12,%rbx
sub %r13,%rbx
mov %rbx,%rax
sar $0x2,%rax
bsr %rax,... | _Z5func0St6vectorIiSaIiEE:
endbr64
push r13
push r12
push rbp
push rbx
sub rsp, 8
mov rbp, rdi
mov r12, [rdi+8]
mov r13, [rdi]
cmp r13, r12
jz loc_12D1
mov rbx, r12
sub rbx, r13
mov rdx, rbx
sar rdx, 2
mov eax, 40h ; '@'
jz short loc_1265
bsr rax, rdx
xo... | long long func0(char **a1)
{
char *v1; // r12
char *v2; // r13
int v3; // eax
unsigned long long v4; // rax
char *v5; // rbx
int v6; // ecx
char *v7; // rax
int v8; // edx
char *v9; // rsi
long long v10; // rdx
long long result; // rax
int v12; // edx
v1 = a1[1];
v2 = *a1;
if ( *a1 != v1... | func0:
ENDBR64
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV RBP,RDI
MOV R12,qword ptr [RDI + 0x8]
MOV R13,qword ptr [RDI]
CMP R13,R12
JZ 0x001012d1
MOV RBX,R12
SUB RBX,R13
MOV RDX,RBX
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
ADD RDX,RDX... | /* func0(std::vector<int, std::allocator<int> >) */
int func0(vector param_1)
{
int *piVar1;
int *piVar2;
int *piVar3;
int *piVar4;
uint uVar5;
int iVar6;
_Iter_less_iter in_ECX;
_Iter_less_iter extraout_EDX;
int iVar7;
ulong uVar8;
long lVar9;
int *piVar10;
__normal_iterator _Var11;
int4 ... |
3,642 | func0 |
#include <vector>
#include <algorithm>
#include <cassert>
| int func0(std::vector<int> nums) {
std::sort(nums.begin(), nums.end());
int n = nums.size();
return std::max(nums[n - 1] * nums[n - 2] * nums[n - 3], nums[n - 1] * nums[0] * nums[1]);
}
| int main() {
assert(func0({12, 74, 9, 50, 61, 41}) == 225700);
assert(func0({25, 35, 22, 85, 14, 65, 75, 25, 58}) == 414375);
assert(func0({18, 14, 10, 9, 8, 7, 9, 3, 2, 4, 1}) == 2520);
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> >):
endbr64
push %r13
push %r12
push %rbp
push %rbx
sub $0x8,%rsp
mov 0x8(%rdi),%rbp
mov (%rdi),%r13
mov %rbp,%rbx
sub %r13,%rbx
mov %rbx,%rax
sar $0x2,%rax
mov %rax,%rdx
cmp %rbp,%r13
je 14fc <_Z5func0St6vectorIiSaIiEE+0xbc>
bsr %rax,... | _Z5func0St6vectorIiSaIiEE:
endbr64
push r13
push r12
push rbp
push rbx
sub rsp, 8
mov rbx, [rdi+8]
mov r13, [rdi]
mov rsi, rbx
cmp r13, rbx
jz loc_1844
mov rbp, rbx
mov r12, rdi
mov rdx, 0FFFFFFFFFFFFFFFEh
sub rbp, r13
mov rax, rbp
sar rax, 2
jz short lo... | long long func0(int **a1)
{
int *v1; // rbx
int *v2; // r13
int *v3; // rsi
long long v4; // rdx
unsigned long long v5; // rax
int *v6; // rbp
int v7; // ecx
int v8; // edx
int *v9; // rax
int *v10; // rsi
int *v11; // rsi
long long v12; // rdx
int v13; // ecx
long long result; // rax
int... | func0:
ENDBR64
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV RBX,qword ptr [RDI + 0x8]
MOV R13,qword ptr [RDI]
MOV RSI,RBX
CMP R13,RBX
JZ 0x00101844
MOV RBP,RBX
MOV R12,RDI
MOV RDX,-0x2
SUB RBP,R13
MOV RAX,RBP
SAR RAX,0x2
JZ 0x001017b4
BSR RAX,RAX
CDQE
LEA RDX,[RAX + RAX*0x1]
LAB_001017b4:
MOV RSI,RBX
MOV RDI,R13... | /* func0(std::vector<int, std::allocator<int> >) */
int func0(vector param_1)
{
int *piVar1;
int iVar2;
ulong uVar3;
int *piVar4;
_Iter_less_iter in_ECX;
_Iter_less_iter extraout_EDX;
int iVar5;
long lVar6;
int *piVar7;
int *piVar8;
__normal_iterator _Var9;
int4 in_register_0000003c;
int8 *p... |
3,643 | func0 |
#include <vector>
#include <algorithm>
#include <cassert>
| int func0(std::vector<int> nums) {
std::sort(nums.begin(), nums.end());
int n = nums.size();
return std::max(nums[n - 1] * nums[n - 2] * nums[n - 3], nums[n - 1] * nums[0] * nums[1]);
}
| int main() {
assert(func0({12, 74, 9, 50, 61, 41}) == 225700);
assert(func0({25, 35, 22, 85, 14, 65, 75, 25, 58}) == 414375);
assert(func0({18, 14, 10, 9, 8, 7, 9, 3, 2, 4, 1}) == 2520);
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 $0x8,%rsp
mov 0x8(%rdi),%r12
mov (%rdi),%rbx
mov %r12,%r13
sub %rbx,%r13
mov %r13,%rax
sar $0x2,%rax
mov %rax,%rdx
cmp %r12,%rbx
je 1512 <_Z5func0St6vectorIiS... | _Z5func0St6vectorIiSaIiEE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 8
mov r12, [rdi+8]
mov rbx, [rdi]
mov r14, r12
sub r14, rbx
mov rax, r14
sar rax, 2
mov r13, rax
cmp rbx, r12
jz loc_17BC
mov rbp, rdi
lea r15, [rbx+4]
tes... | long long func0(int **a1)
{
int *v1; // r12
int *v2; // rbx
long long v3; // r14
unsigned long long v4; // rax
long long j; // r13
int *v6; // r15
unsigned long long v7; // rdx
int *v8; // r14
int v9; // r13d
int *v10; // rsi
int v11; // edx
int *i; // rax
int v13; // ecx
int v14; // edx
... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV R12,qword ptr [RDI + 0x8]
MOV RBX,qword ptr [RDI]
MOV R14,R12
SUB R14,RBX
MOV RAX,R14
SAR RAX,0x2
MOV R13,RAX
CMP RBX,R12
JZ 0x001017bc
MOV RBP,RDI
LEA R15,[RBX + 0x4]
TEST RAX,RAX
JZ 0x001017ef
BSR RDX,RAX
MOV RSI,R12
MOV RDI,RBX
MOVS... | /* func0(std::vector<int, std::allocator<int> >) */
int func0(vector param_1)
{
int *piVar1;
int iVar2;
ulong uVar3;
int *piVar4;
_Iter_less_iter in_ECX;
int iVar5;
size_t sVar6;
long lVar7;
int *__src;
int4 in_register_0000003c;
int8 *puVar8;
int *piVar9;
int *piVar10;
puVar8 = (int8 *... |
3,644 | func0 |
#include <iostream>
#include <vector>
#include <assert.h>
int binomial_coeff(int n, int k) {
std::vector<std::vector<int>> C(n + 1, std::vector<int>(k + 1, 0));
for (int i = 0; i <= n; i++) {
for (int j = 0; j <= std::min(i, k); j++) {
if (j == 0 || j == i) {
C[... | int func0(int n, int m) {
return ((2 * m + 1) * binomial_coeff(2 * n, m + n)) / (m + n + 1);
}
| int main() {
assert(func0(5, 3) == 35);
assert(func0(3, 2) == 5);
assert(func0(4, 2) == 20);
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
add %eax,%eax
lea 0x1(%rax),%ebx
mov -0x18(%rbp),%edx
mov -0x14(%rbp),%eax
add %eax,%edx
mov -0x14(%rbp),%eax
add %eax,%eax
mov %edx,%esi
mo... | _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]
add eax, eax
lea ebx, [rax+1]
mov edx, [rbp+var_18]
mov eax, [rbp+var_14]
add edx, eax
mov eax, [rbp+var_14]
add eax, eax
mov esi, e... | long long func0(int a1, int a2)
{
return (unsigned int)((int)((2 * a2 + 1) * binomial_coeff(2 * a1, a1 + a2)) / (a2 + a1 + 1));
} | 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]
ADD EAX,EAX
LEA EBX,[RAX + 0x1]
MOV EDX,dword ptr [RBP + -0x18]
MOV EAX,dword ptr [RBP + -0x14]
ADD EDX,EAX
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,EAX
MOV ESI,EDX
MO... | /* func0(int, int) */
int [16] func0(int param_1,int param_2)
{
long lVar1;
long lVar2;
int iVar3;
int auVar4 [16];
iVar3 = binomial_coeff(param_1 * 2,param_2 + param_1);
lVar1 = (long)(param_1 + param_2 + 1);
lVar2 = (long)(iVar3 * (param_2 * 2 + 1));
auVar4._0_8_ = lVar2 / lVar1 & 0xffffffff;
... |
3,645 | func0 |
#include <iostream>
#include <vector>
#include <assert.h>
int binomial_coeff(int n, int k) {
std::vector<std::vector<int>> C(n + 1, std::vector<int>(k + 1, 0));
for (int i = 0; i <= n; i++) {
for (int j = 0; j <= std::min(i, k); j++) {
if (j == 0 || j == i) {
C[... | int func0(int n, int m) {
return ((2 * m + 1) * binomial_coeff(2 * n, m + n)) / (m + n + 1);
}
| int main() {
assert(func0(5, 3) == 35);
assert(func0(3, 2) == 5);
assert(func0(4, 2) == 20);
return 0;
}
| O1 | cpp | func0(int, int):
endbr64
push %rbp
push %rbx
sub $0x8,%rsp
mov %esi,%ebp
lea (%rsi,%rdi,1),%ebx
add %edi,%edi
mov %ebx,%esi
callq 12a9 <_Z14binomial_coeffii>
mov %eax,%edx
lea 0x1(%rbp,%rbp,1),%eax
imul %edx,%eax
add $0x1,%ebx
cltd
idiv %ebx
add $0x8,%rsp
pop %rbx
pop %rbp
retq... | _Z5func0ii:
endbr64
push rbp
push rbx
sub rsp, 8
mov ebp, esi
lea ebx, [rsi+rdi]
add edi, edi; int
mov esi, ebx; int
call _Z14binomial_coeffii; binomial_coeff(int,int)
mov edx, eax
lea eax, [rbp+rbp+1]
imul eax, edx
add ebx, 1
cdq
idiv ebx
add rsp, 8
pop rbx
pop ... | long long func0(int a1, int a2)
{
return (unsigned int)((int)(binomial_coeff(2 * a1, a2 + a1) * (2 * a2 + 1)) / (a2 + a1 + 1));
} | func0:
ENDBR64
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV EBP,ESI
LEA EBX,[RSI + RDI*0x1]
ADD EDI,EDI
MOV ESI,EBX
CALL 0x00101289
MOV EDX,EAX
LEA EAX,[RBP + RBP*0x1 + 0x1]
IMUL EAX,EDX
ADD EBX,0x1
CDQ
IDIV EBX
ADD RSP,0x8
POP RBX
POP RBP
RET | /* func0(int, int) */
int [16] func0(int param_1,int param_2)
{
long lVar1;
long lVar2;
int iVar3;
int auVar4 [16];
iVar3 = binomial_coeff(param_1 * 2,param_2 + param_1);
lVar1 = (long)(param_2 + param_1 + 1);
lVar2 = (long)((param_2 * 2 + 1) * iVar3);
auVar4._0_8_ = lVar2 / lVar1 & 0xffffffff;
... |
3,646 | func0 |
#include <iostream>
#include <vector>
#include <assert.h>
int binomial_coeff(int n, int k) {
std::vector<std::vector<int>> C(n + 1, std::vector<int>(k + 1, 0));
for (int i = 0; i <= n; i++) {
for (int j = 0; j <= std::min(i, k); j++) {
if (j == 0 || j == i) {
C[... | int func0(int n, int m) {
return ((2 * m + 1) * binomial_coeff(2 * n, m + n)) / (m + n + 1);
}
| int main() {
assert(func0(5, 3) == 35);
assert(func0(3, 2) == 5);
assert(func0(4, 2) == 20);
return 0;
}
| O2 | cpp | func0(int, int):
endbr64
push %rbp
mov %esi,%ebp
push %rbx
lea (%rsi,%rdi,1),%ebx
add %edi,%edi
mov %ebx,%esi
add $0x1,%ebx
sub $0x8,%rsp
callq 1420 <_Z14binomial_coeffii>
add $0x8,%rsp
mov %eax,%r8d
lea 0x1(%rbp,%rbp,1),%eax
imul %r8d,%eax
cltd
idiv %ebx
pop %rbx
pop %rbp
retq... | _Z5func0ii:
endbr64
push rbp
mov ebp, esi
push rbx
lea ebx, [rsi+rdi]
add edi, edi; int
mov esi, ebx; int
add ebx, 1
sub rsp, 8
call _Z14binomial_coeffii; binomial_coeff(int,int)
add rsp, 8
mov edx, eax
lea eax, [rbp+rbp+1]
imul eax, edx
cdq
idiv ebx
pop rbx
pop ... | long long func0(int a1, int a2)
{
return (unsigned int)((int)(binomial_coeff(2 * a1, a2 + a1) * (2 * a2 + 1)) / (a2 + a1 + 1));
} | func0:
ENDBR64
PUSH RBP
MOV EBP,ESI
PUSH RBX
LEA EBX,[RSI + RDI*0x1]
ADD EDI,EDI
MOV ESI,EBX
ADD EBX,0x1
SUB RSP,0x8
CALL 0x001013e0
ADD RSP,0x8
MOV EDX,EAX
LEA EAX,[RBP + RBP*0x1 + 0x1]
IMUL EAX,EDX
CDQ
IDIV EBX
POP RBX
POP RBP
RET | /* func0(int, int) */
int [16] func0(int param_1,int param_2)
{
long lVar1;
long lVar2;
int iVar3;
int auVar4 [16];
iVar3 = binomial_coeff(param_1 * 2,param_2 + param_1);
lVar1 = (long)(param_2 + param_1 + 1);
lVar2 = (long)((param_2 * 2 + 1) * iVar3);
auVar4._0_8_ = lVar2 / lVar1 & 0xffffffff;
... |
3,647 | func0 |
#include <iostream>
#include <vector>
#include <assert.h>
int binomial_coeff(int n, int k) {
std::vector<std::vector<int>> C(n + 1, std::vector<int>(k + 1, 0));
for (int i = 0; i <= n; i++) {
for (int j = 0; j <= std::min(i, k); j++) {
if (j == 0 || j == i) {
C[... | int func0(int n, int m) {
return ((2 * m + 1) * binomial_coeff(2 * n, m + n)) / (m + n + 1);
}
| int main() {
assert(func0(5, 3) == 35);
assert(func0(3, 2) == 5);
assert(func0(4, 2) == 20);
return 0;
}
| O3 | cpp | func0(int, int):
endbr64
push %rbp
mov %esi,%ebp
push %rbx
lea (%rsi,%rdi,1),%ebx
add %edi,%edi
mov %ebx,%esi
add $0x1,%ebx
sub $0x8,%rsp
callq 1440 <_Z14binomial_coeffii>
add $0x8,%rsp
mov %eax,%r8d
lea 0x1(%rbp,%rbp,1),%eax
imul %r8d,%eax
cltd
idiv %ebx
pop %rbx
pop %rbp
retq... | _Z5func0ii:
endbr64
push rbp
mov ebp, esi
push rbx
lea ebx, [rsi+rdi]
add edi, edi; int
mov esi, ebx; int
add ebx, 1
sub rsp, 8
call _Z14binomial_coeffii; binomial_coeff(int,int)
add rsp, 8
mov edx, eax
lea eax, [rbp+rbp+1]
imul eax, edx
cdq
idiv ebx
pop rbx
pop ... | long long func0(int a1, int a2)
{
return (unsigned int)((int)(binomial_coeff(2 * a1, a2 + a1) * (2 * a2 + 1)) / (a2 + a1 + 1));
} | func0:
ENDBR64
PUSH RBP
MOV EBP,ESI
PUSH RBX
LEA EBX,[RSI + RDI*0x1]
ADD EDI,EDI
MOV ESI,EBX
ADD EBX,0x1
SUB RSP,0x8
CALL 0x001013e0
ADD RSP,0x8
MOV EDX,EAX
LEA EAX,[RBP + RBP*0x1 + 0x1]
IMUL EAX,EDX
CDQ
IDIV EBX
POP RBX
POP RBP
RET | /* func0(int, int) */
int [16] func0(int param_1,int param_2)
{
long lVar1;
long lVar2;
int iVar3;
int auVar4 [16];
iVar3 = binomial_coeff(param_1 * 2,param_2 + param_1);
lVar1 = (long)(param_2 + param_1 + 1);
lVar2 = (long)((param_2 * 2 + 1) * iVar3);
auVar4._0_8_ = lVar2 / lVar1 & 0xffffffff;
... |
3,648 | func0 |
#include <iostream>
#include <regex>
#include <assert.h>
| bool func0(const std::string& str) {
std::regex reg(".*[0-9]$");
return std::regex_match(str, reg);
}
| int main() {
assert(func0("abcdef") == false);
assert(func0("abcdef7") == true);
assert(func0("abc") == false);
return 0;
}
| O0 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x48,%rsp
mov %rdi,-0x48(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
lea -0x40(%rbp),%rax
mov $0x10,%edx
lea 0x2b3f0(%rip),%rsi
mov ... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 48h
mov [rbp+var_48], rdi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_40]
mov edx, 10h
lea rcx, a09; ".*[0-9]$"
mov rsi, rcx
mov rdi,... | long long func0(long long a1)
{
unsigned int v1; // ebx
_BYTE v3[40]; // [rsp+10h] [rbp-40h] BYREF
unsigned long long v4; // [rsp+38h] [rbp-18h]
v4 = __readfsqword(0x28u);
std::basic_regex<char,std::regex_traits<char>>::basic_regex(v3, ".*[0-9]$", 16LL);
v1 = std::regex_match<std::char_traits<char>,std::a... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RBP + -0x48],RDI
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_00104b3f:
CALL 0x00106074
LEA RCX,[RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x... | /* func0(std::string const&) */
ulong func0(string *param_1)
{
bool bVar1;
int7 extraout_var;
long in_FS_OFFSET;
regex local_48 [40];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
std::regex::basic_regex(local_48,".*[0-9]$",0x10);
/* try { // try from 00104b57 to 00104... |
3,649 | func0 |
#include <iostream>
#include <regex>
#include <assert.h>
| bool func0(const std::string& str) {
std::regex reg(".*[0-9]$");
return std::regex_match(str, reg);
}
| int main() {
assert(func0("abcdef") == false);
assert(func0("abcdef7") == true);
assert(func0("abc") == false);
return 0;
}
| O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r12
push %rbp
push %rbx
sub $0x50,%rsp
mov %rdi,%rbx
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
lea 0x20(%rsp),%r12
mov %r12,%rdi
callq 4730 <_ZNSt6localeC1Ev@plt>
movl $0x... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 50h
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea r14, [rbp+var_60]
lea rdi, [rbp+var_58]; this
call __ZNSt6localeC1Ev; std::locale::... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x50
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA R14,[RBP + -0x60]
LEA RDI,[RBP + -0x58]
CALL 0x001046f0
MOV qword ptr [RBP + -0x50],0x0
MOV qword ptr [RBP + -0x48],0x0
MOV ECX,0x10
LEA RDX,[0x1185e7]
LEA RSI,[RDX ... | /* func0(std::string const&) */
ulong func0(string *param_1)
{
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
_Sp_counted_base<(_Lock_policy)2> *p_Var2;
bool bVar3;
int iVar4;
int7 extraout_var;
long in_FS_OFFSET;
regex local_68 [8];
int local_60 [8];
int8 local_58;
_Sp_counted_base<(_Lock_policy)2> *... | |
3,650 | func0 |
#include <iostream>
#include <regex>
#include <assert.h>
| bool func0(const std::string& str) {
std::regex reg(".*[0-9]$");
return std::regex_match(str, reg);
}
| int main() {
assert(func0("abcdef") == false);
assert(func0("abcdef7") == true);
assert(func0("abc") == false);
return 0;
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r13
push %r12
push %rbp
push %rbx
mov %rdi,%rbx
sub $0x58,%rsp
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
lea 0x20(%rsp),%r12
lea 0x8(%rsp),%rbp
mov %r12,%rdi
callq 4750... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r14
push r12
lea r12, [rbp+var_70]
push rbx
mov rbx, rdi
sub rsp, 58h
mov rax, fs:28h
mov [rbp+var_28], rax
xor eax, eax
lea rax, [rbp+var_68]
mov rdi, rax; this
mov r14... | long long func0(long long *a1)
{
long long v2; // rdi
long long v3; // rsi
long long v4; // rsi
unsigned int v5; // r12d
long long v6; // rbx
long long v7; // rdx
volatile signed __int32 *v8; // rcx
signed __int32 v9; // eax
long long v11; // rax
long long v12; // rdi
_BYTE v13[8]; // [rsp+0h] [r... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH R12
LEA R12,[RBP + -0x70]
PUSH RBX
MOV RBX,RDI
SUB RSP,0x58
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x68]
MOV RDI,RAX
MOV R14,RAX
CALL 0x001036d0
LEA RDX,[0x1185e7]
PXOR XMM0,XMM0
MOV RDI,R12
MOV ECX,0x10
LEA RSI,[RDX + -0... | /* func0(std::string const&) */
ulong func0(string *param_1)
{
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
int8 uVar2;
bool bVar3;
int iVar4;
int7 extraout_var;
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;
... |
3,651 | func0 |
#include <iostream>
#include <regex>
#include <assert.h>
| bool func0(const std::string& str) {
std::regex reg(".*[0-9]$");
return std::regex_match(str, reg);
}
| int main() {
assert(func0("abcdef") == false);
assert(func0("abcdef7") == true);
assert(func0("abc") == false);
return 0;
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r13
push %r12
push %rbp
push %rbx
mov %rdi,%rbx
sub $0x58,%rsp
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
lea 0x20(%rsp),%r12
lea 0x8(%rsp),%rbp
mov %r12,%rdi
callq 47b0... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
push r14
push r13
push r12
mov r12, rdi
push rbp
push rbx
sub rsp, 2E8h
mov rax, fs:28h
mov [rsp+318h+var_40], rax
xor eax, eax
lea rbx, [rsp+318h+var_2A0]
mov rdi, rbx; this
mov [rsp+318h+... | long long func0(long long *a1, double a2, double a3, double a4, __m128 a5)
{
__m128i v6; // xmm0
long long v7; // rdi
void *v8; // rdi
void **v9; // rbx
unsigned long long v10; // rbp
void *v11; // rdi
long long v12; // rax
long long v13; // rbx
long long v14; // rax
long long v15; // rcx
long lo... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
MOV R12,RDI
PUSH RBP
PUSH RBX
SUB RSP,0x2e8
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x2d8],RAX
XOR EAX,EAX
LEA RBX,[RSP + 0x78]
MOV RDI,RBX
MOV qword ptr [RSP + 0x28],RBX
CALL 0x00104730
LEA RDX,[0x11a628]
PXOR XMM0,XMM0
LEA RDI,[RSP + 0x140]
MOV R8D,0x10
MOV ... | /* func0(std::string const&) */
ulong func0(string *param_1)
{
long *plVar1;
ulong uVar2;
void *pvVar3;
int8 uVar4;
int auVar5 [8];
int auVar6 [16];
int8 *puVar7;
int8 *puVar8;
long *plVar9;
long lVar10;
size_t __n;
char cVar11;
long lVar12;
ulong uVar13;
long *plVar14;
long *plVar15;
... |
3,652 | func0 |
#include <string>
#include <assert.h>
| bool func0(const std::string& s) {
for (int i = 0; i < s.length() - 2; i++) {
if (s[i] != s[i + 2]) {
return false;
}
}
if (s[0] == s[1]) {
return false;
}
return true;
}
| int main() {
assert(func0("abab") == true);
assert(func0("aaaa") == false);
assert(func0("xyz") == false);
return 0;
}
| O0 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x28,%rsp
mov %rdi,-0x28(%rbp)
movl $0x0,-0x14(%rbp)
mov -0x14(%rbp),%eax
movslq %eax,%rbx
mov -0x28(%rbp),%rax
mov %rax,%rdi
callq 12a0 <_ZNKSt7__cxx111... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 28h
mov [rbp+var_28], rdi
mov [rbp+var_14], 0
jmp short loc_13AA
loc_1363:
mov eax, [rbp+var_14]
movsxd rdx, eax
mov rax, [rbp+var_28]
mov rsi, rdx
mov rdi, rax
call... | _BOOL8 func0(long long a1)
{
char v1; // bl
char v3; // bl
int i; // [rsp+1Ch] [rbp-14h]
for ( i = 0; i < (unsigned long long)(std::string::length(a1) - 2); ++i )
{
v1 = *(_BYTE *)std::string::operator[](a1, i);
if ( v1 != *(_BYTE *)std::string::operator[](a1, i + 2) )
return 0LL;
}
v3 = *... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x28
MOV qword ptr [RBP + -0x28],RDI
MOV dword ptr [RBP + -0x14],0x0
JMP 0x001013aa
LAB_00101363:
MOV EAX,dword ptr [RBP + -0x14]
MOVSXD RDX,EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RSI,RDX
MOV RDI,RAX
CALL 0x001011e0
MOVZX EBX,byte ptr [RAX]
MOV EAX,dword ptr [RBP + ... | /* func0(std::string const&) */
bool func0(string *param_1)
{
char cVar1;
long lVar2;
char *pcVar3;
int local_1c;
local_1c = 0;
while( true ) {
lVar2 = std::string::length();
if (lVar2 - 2U <= (ulong)(long)local_1c) {
pcVar3 = (char *)std::string::operator[]((ulong)param_1);
cVar1 =... |
3,653 | func0 |
#include <string>
#include <assert.h>
| bool func0(const std::string& s) {
for (int i = 0; i < s.length() - 2; i++) {
if (s[i] != s[i + 2]) {
return false;
}
}
if (s[0] == s[1]) {
return false;
}
return true;
}
| int main() {
assert(func0("abab") == true);
assert(func0("aaaa") == false);
assert(func0("xyz") == false);
return 0;
}
| O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
mov 0x8(%rdi),%rdx
sub $0x2,%rdx
je 120e <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x25>
mov (%rdi),%rax
add %rax,%rdx
movzbl 0x2(%rax),%ecx
cmp %cl,(%rax)
jne 121c <_Z5func... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
mov rax, [rdi+8]
lea rdx, [rax-2]
cmp rax, 2
jz short loc_1232
mov rax, [rdi]
add rdx, rax
loc_1221:
movzx ecx, byte ptr [rax+2]
cmp [rax], cl
jnz short loc_1240
add rax, 1
cmp rax, rdx
jnz short loc_1... | bool func0(_QWORD *a1)
{
long long v1; // rax
long long v2; // rdx
_BYTE *v3; // rax
_BYTE *v4; // rdx
v1 = a1[1];
v2 = v1 - 2;
if ( v1 == 2 )
return *(_BYTE *)*a1 != *(_BYTE *)(*a1 + 1LL);
v3 = (_BYTE *)*a1;
v4 = (_BYTE *)(*a1 + v2);
while ( *v3 == v3[2] )
{
if ( ++v3 == v4 )
retu... | func0:
ENDBR64
MOV RAX,qword ptr [RDI + 0x8]
LEA RDX,[RAX + -0x2]
CMP RAX,0x2
JZ 0x00101232
MOV RAX,qword ptr [RDI]
ADD RDX,RAX
LAB_00101221:
MOVZX ECX,byte ptr [RAX + 0x2]
CMP byte ptr [RAX],CL
JNZ 0x00101240
ADD RAX,0x1
CMP RAX,RDX
JNZ 0x00101221
LAB_00101232:
MOV RAX,qword ptr [RDI]
MOVZX ESI,byte ptr [RAX + 0x1]
CM... | /* func0(std::string const&) */
int8 func0(string *param_1)
{
char *pcVar1;
char *pcVar2;
if (*(long *)(param_1 + 8) != 2) {
pcVar1 = *(char **)param_1;
pcVar2 = pcVar1 + *(long *)(param_1 + 8) + -2;
do {
if (*pcVar1 != pcVar1[2]) {
return 0;
}
pcVar1 = pcVar1 + 1;
}... |
3,654 | func0 |
#include <string>
#include <assert.h>
| bool func0(const std::string& s) {
for (int i = 0; i < s.length() - 2; i++) {
if (s[i] != s[i + 2]) {
return false;
}
}
if (s[0] == s[1]) {
return false;
}
return true;
}
| int main() {
assert(func0("abab") == true);
assert(func0("aaaa") == false);
assert(func0("xyz") == false);
return 0;
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
mov 0x8(%rdi),%rdx
mov (%rdi),%rcx
sub $0x2,%rdx
je 1388 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x38>
mov %rcx,%rax
add %rcx,%rdx
jmp 1379 <_Z5func0RKNSt7__cxx1112basic_s... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
mov r8, [rdi]
mov rsi, [rdi+8]
movzx r9d, byte ptr [r8]
cmp rsi, 2
jz short loc_1380
movzx edx, byte ptr [r8+1]
mov ecx, r9d
lea rax, [r8+2]
lea rdi, [r8+rsi]
jmp short loc_136B
loc_1360:
add rax, 1
mov ... | bool func0(char **a1)
{
char *v1; // r8
char *v2; // rsi
char v3; // r9
char v4; // dl
char v5; // cl
char *v6; // rax
char *v7; // rdi
char v8; // si
v1 = *a1;
v2 = a1[1];
v3 = **a1;
if ( v2 == (_BYTE *)&dword_0 + 2 )
return v3 != v1[1];
v4 = v1[1];
v5 = **a1;
v6 = v1 + 2;
v7 = &v... | func0:
ENDBR64
MOV R8,qword ptr [RDI]
MOV RSI,qword ptr [RDI + 0x8]
MOVZX R9D,byte ptr [R8]
CMP RSI,0x2
JZ 0x00101380
MOVZX EDX,byte ptr [R8 + 0x1]
MOV ECX,R9D
LEA RAX,[R8 + 0x2]
LEA RDI,[R8 + RSI*0x1]
JMP 0x0010136b
LAB_00101360:
ADD RAX,0x1
MOV ECX,ESI
CMP RAX,RDI
JZ 0x00101380
LAB_0010136b:
MOV ESI,EDX
MOVZX EDX,byt... | /* func0(std::string const&) */
bool func0(string *param_1)
{
char cVar1;
char *pcVar2;
char *pcVar3;
char cVar4;
char cVar5;
pcVar2 = *(char **)param_1;
if (*(long *)(param_1 + 8) != 2) {
pcVar3 = pcVar2 + 2;
cVar4 = *pcVar2;
cVar5 = pcVar2[1];
do {
cVar1 = *pcVar3;
if (c... |
3,655 | func0 |
#include <string>
#include <assert.h>
| bool func0(const std::string& s) {
for (int i = 0; i < s.length() - 2; i++) {
if (s[i] != s[i + 2]) {
return false;
}
}
if (s[0] == s[1]) {
return false;
}
return true;
}
| int main() {
assert(func0("abab") == true);
assert(func0("aaaa") == false);
assert(func0("xyz") == false);
return 0;
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
mov %rdi,%rax
mov 0x8(%rdi),%rdi
mov (%rax),%r8
movzbl (%r8),%r9d
cmp $0x2,%rdi
je 13a0 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x50>
movzbl 0x1(%r8),%ecx
mov %r9d,%edx
lea ... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
mov r8, [rdi]
mov rsi, [rdi+8]
movzx r9d, byte ptr [r8]
cmp rsi, 2
jz short loc_1420
movzx edx, byte ptr [r8+1]
mov ecx, r9d
lea rax, [r8+2]
lea rdi, [r8+rsi]
jmp short loc_140B
loc_1400:
add rax, 1
mov ... | bool func0(char **a1)
{
char *v1; // r8
char *v2; // rsi
char v3; // r9
char v4; // dl
char v5; // cl
char *v6; // rax
char *v7; // rdi
char v8; // si
v1 = *a1;
v2 = a1[1];
v3 = **a1;
if ( v2 == (_BYTE *)&dword_0 + 2 )
return v3 != v1[1];
v4 = v1[1];
v5 = **a1;
v6 = v1 + 2;
v7 = &v... | func0:
ENDBR64
MOV R8,qword ptr [RDI]
MOV RSI,qword ptr [RDI + 0x8]
MOVZX R9D,byte ptr [R8]
CMP RSI,0x2
JZ 0x00101420
MOVZX EDX,byte ptr [R8 + 0x1]
MOV ECX,R9D
LEA RAX,[R8 + 0x2]
LEA RDI,[R8 + RSI*0x1]
JMP 0x0010140b
LAB_00101400:
ADD RAX,0x1
MOV ECX,ESI
CMP RAX,RDI
JZ 0x00101420
LAB_0010140b:
MOV ESI,EDX
MOVZX EDX,byt... | /* func0(std::string const&) */
bool func0(string *param_1)
{
char cVar1;
char *pcVar2;
char *pcVar3;
char cVar4;
char cVar5;
pcVar2 = *(char **)param_1;
if (*(long *)(param_1 + 8) != 2) {
pcVar3 = pcVar2 + 2;
cVar4 = *pcVar2;
cVar5 = pcVar2[1];
do {
cVar1 = *pcVar3;
if (c... |
3,656 | func0 | #include <algorithm>
#include <cassert>
#include <vector>
| std::vector<int> func0(const std::vector<int>& array_nums) {
std::vector<int> result = array_nums;
auto key = [](int x) -> double {
return x == 0 ? 0.0 : -1.0 / static_cast<double>(x);
};
std::sort(result.begin(), result.end(), [&](int a, int b) {
return key(a) < key(b);
});
... | int main() {
{
std::vector<int> input = {-1, 2, -3, 5, 7, 8, 9, -10};
std::vector<int> expected = {2, 5, 7, 8, 9, -10, -3, -1};
assert(func0(input) == expected);
}
{
std::vector<int> input = {10, 15, 14, 13, -18, 12, -20};
std::vector<int> expected = {10, 12, ... | O0 | cpp | func0(std::vector<int, std::allocator<int> > const&)::{lambda(int)#1}::operator()(int) const:
push %rbp
mov %rsp,%rbp
mov %rdi,-0x8(%rbp)
mov %esi,-0xc(%rbp)
cmpl $0x0,-0xc(%rbp)
je 126e <_ZZ5func0RKSt6vectorIiSaIiEEENKUliE_clEi+0x24>
cvtsi2sdl -0xc(%rbp),%xmm1
movsd 0x3e48(%rip),%xmm0
divsd %xmm1,%x... | _ZZ5func0RKSt6vectorIiSaIiEEENKUliE_clEi:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
cmp [rbp+var_C], 0
jz short loc_1292
pxor xmm1, xmm1
cvtsi2sd xmm1, [rbp+var_C]
movsd xmm0, cs:qword_5090
divsd xmm0, xmm1
jmp short loc_1296
loc_1292:
pxor xmm0, xmm0
loc_1296... | double func0(std::vector<int> const&)::{lambda(int)#1}::operator()(long long a1, int a2)
{
if ( a2 )
return -1.0 / (double)a2;
else
return 0.0;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R12
PUSH RBX
SUB RSP,0x20
MOV qword ptr [RBP + -0x28],RDI
MOV qword ptr [RBP + -0x30],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RDX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x28]
MOV RSI,RDX
MOV RDI,RAX
LAB_0010131f:
CALL 0x00102ad6... | /* func0(std::vector<int, std::allocator<int> > const&) */
vector * func0(vector *param_1)
{
__normal_iterator _Var1;
__normal_iterator _Var2;
vector *in_RSI;
long in_FS_OFFSET;
int local_21;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
std::vector<int,std::allocator<int>>::vector((vec... |
3,657 | func0 | #include <algorithm>
#include <cassert>
#include <vector>
| std::vector<int> func0(const std::vector<int>& array_nums) {
std::vector<int> result = array_nums;
auto key = [](int x) -> double {
return x == 0 ? 0.0 : -1.0 / static_cast<double>(x);
};
std::sort(result.begin(), result.end(), [&](int a, int b) {
return key(a) < key(b);
});
... | int main() {
{
std::vector<int> input = {-1, 2, -3, 5, 7, 8, 9, -10};
std::vector<int> expected = {2, 5, 7, 8, 9, -10, -3, -1};
assert(func0(input) == expected);
}
{
std::vector<int> input = {10, 15, 14, 13, -18, 12, -20};
std::vector<int> expected = {10, 12, ... | O1 | cpp | void std::__unguarded_linear_insert<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Val_comp_iter<func0(std::vector<int, std::allocator<int> > const&)::{lambda(int, int)#2}> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_... | _ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEENS0_5__ops14_Val_comp_iterIZ5func0RKS5_EUliiE_EEEvT_T0_:
mov ecx, [rdi]
pxor xmm2, xmm2
movsd xmm5, cs:qword_2088
movapd xmm4, xmm5
jmp short loc_12A4
loc_127D:
mov [rdx], ecx
retn
loc_1280:
test eax, eax
jz sh... | long long std::__unguarded_linear_insert<__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__ops::_Val_comp_iter<func0(std::vector<int> const&)::{lambda(int,int)#1}>>(
int *a1)
{
int v1; // ecx
double v2; // xmm1_8
double v3; // xmm0_8
long long result; // rax
v1 = *a1;
while ( 1 )
... | __unguarded_linear_insert<__normal_iterator<int*,std::vector<int,std::allocator<int>>>,__ops::_Val_comp_iter<func0(std::vector<int,std::allocator<int>>const&)::{lambda(int,int)#1}>>:
MOV ECX,dword ptr [RDI]
PXOR XMM2,XMM2
MOVSD XMM5,qword ptr [0x00102088]
MOVAPD XMM4,XMM5
JMP 0x001012a4
LAB_0010127d:
MOV dword ptr [RDX... | /* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* void std::__unguarded_linear_insert<__normal_iterator<int*, std::vector<int, std::allocator<int>
> >, __ops::_Val_comp_iter<func0(std::vector<int, std::allocator<int> > const&)::{lambda(int,
int)#1}> >(__normal_iterator<int*, std::vec... |
3,658 | func0 | #include <algorithm>
#include <cassert>
#include <vector>
| std::vector<int> func0(const std::vector<int>& array_nums) {
std::vector<int> result = array_nums;
auto key = [](int x) -> double {
return x == 0 ? 0.0 : -1.0 / static_cast<double>(x);
};
std::sort(result.begin(), result.end(), [&](int a, int b) {
return key(a) < key(b);
});
... | int main() {
{
std::vector<int> input = {-1, 2, -3, 5, 7, 8, 9, -10};
std::vector<int> expected = {2, 5, 7, 8, 9, -10, -3, -1};
assert(func0(input) == expected);
}
{
std::vector<int> input = {10, 15, 14, 13, -18, 12, -20};
std::vector<int> expected = {10, 12, ... | O2 | cpp | void std::__adjust_heap<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, long, int, __gnu_cxx::__ops::_Iter_comp_iter<func0(std::vector<int, std::allocator<int> > const&)::{lambda(int, int)#2}> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, long, long, int, __... | _ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEliNS0_5__ops15_Iter_comp_iterIZ5func0RKS5_EUliiE_EEEvT_T0_SE_T1_T2__isra_0:
lea rax, [rdx-1]
push r13
mov r13, rdx
mov r8, rsi
push r12
mov r9d, ecx
mov r12, rdx
and r13d, 1
push rbp
mov rbp, rax
shr rbp, 3F... | long long std::__adjust_heap<__gnu_cxx::__normal_iterator<int *,std::vector<int>>,long,int,__gnu_cxx::__ops::_Iter_comp_iter<func0(std::vector<int> const&)::{lambda(int,int)#1}>>(
long long a1,
long long a2,
long long a3,
int a4)
{
long long result; // rax
long long v8; // r13
lon... | __adjust_heap<__normal_iterator<int*,std::vector<int,std::allocator<int>>>,long,int,__ops::_Iter_comp_iter<func0(std::vector<int,std::allocator<int>>const&)::{lambda(int,int)#1}>>:
LEA RAX,[RDX + -0x1]
PUSH R13
MOV R13,RDX
MOV R8,RSI
PUSH R12
MOV R9D,ECX
MOV R12,RDX
AND R13D,0x1
PUSH RBP
MOV RBP,RAX
SHR RBP,0x3f
PUSH R... | /* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* void std::__adjust_heap<__normal_iterator<int*, std::vector<int, std::allocator<int> > >, long,
int, __ops::_Iter_comp_iter<func0(std::vector<int, std::allocator<int> > const&)::{lambda(int,
int)#1}> >(__normal_iterator<int*, std::vec... |
3,659 | func0 | #include <algorithm>
#include <cassert>
#include <vector>
| std::vector<int> func0(const std::vector<int>& array_nums) {
std::vector<int> result = array_nums;
auto key = [](int x) -> double {
return x == 0 ? 0.0 : -1.0 / static_cast<double>(x);
};
std::sort(result.begin(), result.end(), [&](int a, int b) {
return key(a) < key(b);
});
... | int main() {
{
std::vector<int> input = {-1, 2, -3, 5, 7, 8, 9, -10};
std::vector<int> expected = {2, 5, 7, 8, 9, -10, -3, -1};
assert(func0(input) == expected);
}
{
std::vector<int> input = {10, 15, 14, 13, -18, 12, -20};
std::vector<int> expected = {10, 12, ... | O3 | cpp | void std::__adjust_heap<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, long, int, __gnu_cxx::__ops::_Iter_comp_iter<func0(std::vector<int, std::allocator<int> > const&)::{lambda(int, int)#2}> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, long, long, int, __... | _ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEliNS0_5__ops15_Iter_comp_iterIZ5func0RKS5_EUliiE_EEEvT_T0_SE_T1_T2__isra_0:
lea rax, [rdx-1]
push r13
mov r13, rdx
mov r8, rsi
push r12
mov r10d, ecx
mov r12, rdx
and r13d, 1
push rbp
mov rbp, rax
shr rbp, 3... | long long std::__adjust_heap<__gnu_cxx::__normal_iterator<int *,std::vector<int>>,long,int,__gnu_cxx::__ops::_Iter_comp_iter<func0(std::vector<int> const&)::{lambda(int,int)#1}>>(
long long a1,
long long a2,
long long a3,
int a4)
{
long long result; // rax
long long v8; // r13
lon... | __adjust_heap<__normal_iterator<int*,std::vector<int,std::allocator<int>>>,long,int,__ops::_Iter_comp_iter<func0(std::vector<int,std::allocator<int>>const&)::{lambda(int,int)#1}>>:
LEA RAX,[RDX + -0x1]
PUSH R13
MOV R13,RDX
MOV R8,RSI
PUSH R12
MOV R10D,ECX
MOV R12,RDX
AND R13D,0x1
PUSH RBP
MOV RBP,RAX
SHR RBP,0x3f
PUSH ... | /* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* void std::__adjust_heap<__normal_iterator<int*, std::vector<int, std::allocator<int> > >, long,
int, __ops::_Iter_comp_iter<func0(std::vector<int, std::allocator<int> > const&)::{lambda(int,
int)#1}> >(__normal_iterator<int*, std::vec... |
3,660 | func0 |
#include <assert.h>
#include <tuple>
| std::tuple<int, int, int, bool> func0(int A[], int arr_size, int sum) {
for (int i = 0; i < arr_size-2; i++) {
for (int j = i + 1; j < arr_size-1; j++) {
for (int k = j + 1; k < arr_size; k++) {
if (A[i] + A[j] + A[k] == sum) {
return std::make_tuple(A[i], A[j], A[k], true);
}
}
}
}
... | int main() {
int arr1[] = {1, 4, 45, 6, 10, 8};
assert(func0(arr1, 6, 22) == std::make_tuple(4, 10, 8, true));
int arr2[] = {12, 3, 5, 2, 6, 9};
assert(func0(arr2, 6, 24) == std::make_tuple(12, 3, 9, true));
int arr3[] = {1, 2, 3, 4, 5};
assert(func0(arr3, 5, 9) == std::make_tuple(1, 3, 5, true));
r... | O0 | cpp | func0(int*, int, int):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x50,%rsp
mov %rdi,-0x38(%rbp)
mov %rsi,-0x40(%rbp)
mov %edx,-0x44(%rbp)
mov %ecx,-0x48(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x8(%rbp)
xor %eax,%eax
movl $0x0,-0x14(%rbp)
mov -0x44(%rbp),%eax
sub $0x2,%eax
cmp %eax,-0x14(%r... | _Z5func0Piii:
endbr64
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_38], rdi
mov [rbp+var_40], rsi
mov [rbp+var_44], edx
mov [rbp+var_48], ecx
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
mov [rbp+var_14], 0
jmp loc_1282
loc_119E:
mov eax, [rbp+var_14]
add e... | int * func0(int *a1, long long a2, int a3, int a4)
{
char v5; // [rsp+2Fh] [rbp-21h] BYREF
int v6; // [rsp+30h] [rbp-20h] BYREF
int v7; // [rsp+34h] [rbp-1Ch] BYREF
int v8; // [rsp+38h] [rbp-18h] BYREF
int i; // [rsp+3Ch] [rbp-14h]
int j; // [rsp+40h] [rbp-10h]
int k; // [rsp+44h] [rbp-Ch]
unsigned long... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x38],RDI
MOV qword ptr [RBP + -0x40],RSI
MOV dword ptr [RBP + -0x44],EDX
MOV dword ptr [RBP + -0x48],ECX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
MOV dword ptr [RBP + -0x14],0x0
JMP 0x00101282
LAB_0010119e:
MOV EAX,dwo... | /* func0(int*, int, int) */
int * func0(int *param_1,int param_2,int param_3)
{
int iVar1;
int in_ECX;
int4 in_register_00000034;
long lVar2;
long in_FS_OFFSET;
int local_28 [2];
bool local_20 [4];
int local_1c;
int local_18;
int local_14;
long local_10;
lVar2 = CONCAT44(in_register_0000003... |
3,661 | func0 |
#include <assert.h>
#include <tuple>
| std::tuple<int, int, int, bool> func0(int A[], int arr_size, int sum) {
for (int i = 0; i < arr_size-2; i++) {
for (int j = i + 1; j < arr_size-1; j++) {
for (int k = j + 1; k < arr_size; k++) {
if (A[i] + A[j] + A[k] == sum) {
return std::make_tuple(A[i], A[j], A[k], true);
}
}
}
}
... | int main() {
int arr1[] = {1, 4, 45, 6, 10, 8};
assert(func0(arr1, 6, 22) == std::make_tuple(4, 10, 8, true));
int arr2[] = {12, 3, 5, 2, 6, 9};
assert(func0(arr2, 6, 24) == std::make_tuple(12, 3, 9, true));
int arr3[] = {1, 2, 3, 4, 5};
assert(func0(arr3, 5, 9) == std::make_tuple(1, 3, 5, true));
r... | O1 | cpp | func0(int*, int, int):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
cmp $0x2,%edx
jle 1239 <_Z5func0Piii+0xd0>
mov %rsi,%rbx
mov %edx,%esi
lea -0x3(%rdx),%edx
add $0x2,%rdx
mov %rdx,-0x8(%rsp)
mov %rbx,-0x20(%rsp)
mov $0x1,%r12d
lea -0x1(%rsi),%edx
mov ... | _Z5func0Piii:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
cmp edx, 2
jle loc_121F
mov r10, rsi
mov r9d, edx
mov esi, ecx
lea ecx, [rdx-1]
mov r15, r10
mov edx, 1
lea ebx, [r9-1]
lea r13, [r10+8]
mov r8, rdi
mov edi, r9d
loc_11A1:
mov ... | int * func0(int *a1, int *a2, int a3, int a4)
{
long long v7; // rcx
int *v8; // r15
long long v9; // rdx
int v10; // ebx
int v11; // r11d
int *v12; // rbp
long long v13; // r14
int *v14; // rax
if ( a3 <= 2 )
{
LABEL_11:
*(_BYTE *)a1 = 0;
a1[1] = 0;
a1[2] = 0;
a1[3] = 0;
}
else... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
CMP EDX,0x2
JLE 0x0010121f
MOV R10,RSI
MOV R9D,EDX
MOV ESI,ECX
LEA ECX,[RDX + -0x1]
MOV R15,R10
MOV EDX,0x1
LEA EBX,[R9 + -0x1]
LEA R13,[R10 + 0x8]
MOV R8,RDI
MOV EDI,R9D
LAB_001011a1:
MOV R11D,EDX
CMP EBX,EDX
JLE 0x0010120f
MOV R12,R15
LEA RBP,[R15 +... | /* func0(int*, int, int) */
int * func0(int *param_1,int param_2,int param_3)
{
uint uVar1;
int *piVar2;
int in_ECX;
ulong uVar3;
int *piVar4;
int4 in_register_00000034;
int *piVar5;
uint uVar6;
ulong uVar7;
ulong uVar8;
int *piVar9;
piVar5 = (int *)CONCAT44(in_register_00000034,param_2);
... |
3,662 | func0 |
#include <assert.h>
#include <tuple>
| std::tuple<int, int, int, bool> func0(int A[], int arr_size, int sum) {
for (int i = 0; i < arr_size-2; i++) {
for (int j = i + 1; j < arr_size-1; j++) {
for (int k = j + 1; k < arr_size; k++) {
if (A[i] + A[j] + A[k] == sum) {
return std::make_tuple(A[i], A[j], A[k], true);
}
}
}
}
... | int main() {
int arr1[] = {1, 4, 45, 6, 10, 8};
assert(func0(arr1, 6, 22) == std::make_tuple(4, 10, 8, true));
int arr2[] = {12, 3, 5, 2, 6, 9};
assert(func0(arr2, 6, 24) == std::make_tuple(12, 3, 9, true));
int arr3[] = {1, 2, 3, 4, 5};
assert(func0(arr3, 5, 9) == std::make_tuple(1, 3, 5, true));
r... | O2 | cpp | func0(int*, int, int):
endbr64
push %r15
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
cmp $0x2,%edx
jle 1431 <_Z5func0Piii+0xa1>
lea -0x1(%rdx),%r13d
mov %rsi,%rbp
lea -0x2(%rdx),%r15d
xor %ebx,%ebx
add $0x1,%ebx
lea 0x4(%rbp),%r14
mov %r14,%rdi
mov %ebx,%... | _Z5func0Piii:
endbr64
push r15
mov r11, rdi
push r14
push r13
push r12
push rbp
push rbx
cmp edx, 2
jle loc_13D5
mov r8, rsi
mov r9d, ecx
mov esi, edx
xor ebp, ebp
lea r13d, [rdx-1]
mov r12, r8
lea r15d, [rdx-2]
loc_134F:
add ebp, 1
lea r14, [r12+4]
mov ... | int * func0(int *a1, int *a2, int a3, int a4)
{
int v6; // ebp
int v7; // r13d
int *v8; // r12
int v9; // r15d
int *v10; // rbx
int v11; // r10d
long long v12; // rax
int v13; // edx
int v14; // eax
if ( a3 <= 2 )
{
LABEL_12:
*(_BYTE *)a1 = 0;
*(_QWORD *)(a1 + 1) = 0LL;
a1[3] = 0;
}... | func0:
ENDBR64
PUSH R15
MOV R11,RDI
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
CMP EDX,0x2
JLE 0x001013d5
MOV R8,RSI
MOV R9D,ECX
MOV ESI,EDX
XOR EBP,EBP
LEA R13D,[RDX + -0x1]
MOV R12,R8
LEA R15D,[RDX + -0x2]
LAB_0010134f:
ADD EBP,0x1
LEA R14,[R12 + 0x4]
MOV RBX,R14
MOV R10D,EBP
CMP EBP,R13D
JGE 0x001013c9
LAB_0010136... | /* func0(int*, int, int) */
int * func0(int *param_1,int param_2,int param_3)
{
int iVar1;
long lVar2;
int in_ECX;
int *piVar3;
int iVar4;
int4 in_register_00000034;
int iVar5;
int *piVar6;
if (2 < param_3) {
iVar4 = 0;
piVar6 = (int *)CONCAT44(in_register_00000034,param_2);
do {
... |
3,663 | func0 |
#include <assert.h>
#include <tuple>
| std::tuple<int, int, int, bool> func0(int A[], int arr_size, int sum) {
for (int i = 0; i < arr_size-2; i++) {
for (int j = i + 1; j < arr_size-1; j++) {
for (int k = j + 1; k < arr_size; k++) {
if (A[i] + A[j] + A[k] == sum) {
return std::make_tuple(A[i], A[j], A[k], true);
}
}
}
}
... | int main() {
int arr1[] = {1, 4, 45, 6, 10, 8};
assert(func0(arr1, 6, 22) == std::make_tuple(4, 10, 8, true));
int arr2[] = {12, 3, 5, 2, 6, 9};
assert(func0(arr2, 6, 24) == std::make_tuple(12, 3, 9, true));
int arr3[] = {1, 2, 3, 4, 5};
assert(func0(arr3, 5, 9) == std::make_tuple(1, 3, 5, true));
r... | O3 | cpp | func0(int*, int, int):
endbr64
push %r15
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
cmp $0x2,%edx
jle 1401 <_Z5func0Piii+0xa1>
lea -0x1(%rdx),%r13d
mov %rsi,%rbp
lea -0x2(%rdx),%r15d
xor %ebx,%ebx
add $0x1,%ebx
lea 0x4(%rbp),%r14
mov %r14,%rdi
mov %ebx,%... | _Z5func0Piii:
endbr64
push r15
mov r11, rdi
push r14
push r13
push r12
push rbp
push rbx
cmp edx, 2
jle loc_13A5
mov r8, rsi
mov r9d, ecx
mov esi, edx
xor ebp, ebp
lea r13d, [rdx-1]
mov r12, r8
lea r15d, [rdx-2]
loc_131F:
add ebp, 1
lea r14, [r12+4]
mov ... | int * func0(int *a1, int *a2, int a3, int a4)
{
int v6; // ebp
int v7; // r13d
int *v8; // r12
int v9; // r15d
int *v10; // rbx
int v11; // r10d
long long v12; // rax
int v13; // edx
int v14; // eax
if ( a3 <= 2 )
{
LABEL_12:
*(_BYTE *)a1 = 0;
*(_QWORD *)(a1 + 1) = 0LL;
a1[3] = 0;
}... | func0:
ENDBR64
PUSH R15
MOV R11,RDI
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
CMP EDX,0x2
JLE 0x001013a5
MOV R8,RSI
MOV R9D,ECX
MOV ESI,EDX
XOR EBP,EBP
LEA R13D,[RDX + -0x1]
MOV R12,R8
LEA R15D,[RDX + -0x2]
LAB_0010131f:
ADD EBP,0x1
LEA R14,[R12 + 0x4]
MOV RBX,R14
MOV R10D,EBP
CMP EBP,R13D
JGE 0x00101399
LAB_0010133... | /* func0(int*, int, int) */
int * func0(int *param_1,int param_2,int param_3)
{
int iVar1;
long lVar2;
int in_ECX;
int *piVar3;
int iVar4;
int4 in_register_00000034;
int iVar5;
int *piVar6;
if (2 < param_3) {
iVar4 = 0;
piVar6 = (int *)CONCAT44(in_register_00000034,param_2);
do {
... |
3,664 | func0 |
#include <iostream>
#include <regex>
#include <assert.h>
| std::string func0(std::string text) {
std::regex patterns("[A-Z]+[a-z]+$");
if (std::regex_search(text, patterns)) {
return "Found a match!";
} else {
return "Not matched!";
}
}
| int main() {
assert(func0("AaBbGg") == "Found a match!");
assert(func0("aA") == "Not matched!");
assert(func0("PYTHON") == "Not matched!");
return 0;
}
| O0 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x58,%rsp
mov %rdi,-0x58(%rbp)
mov %rsi,-0x60(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
lea -0x40(%rbp),%rax
mov $0x10,%edx
lea 0x2b3e... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 68h
mov [rbp+var_68], rdi
mov [rbp+var_70], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_40]
mov edx, 10h
lea rcx, aAZAZ; "[A-Z]+[a-z]+$... | long long func0(long long a1, long long a2)
{
char v3; // [rsp+1Fh] [rbp-51h] BYREF
char *v4; // [rsp+20h] [rbp-50h]
char *v5; // [rsp+28h] [rbp-48h]
_BYTE v6[40]; // [rsp+30h] [rbp-40h] BYREF
unsigned long long v7; // [rsp+58h] [rbp-18h]
v7 = __readfsqword(0x28u);
std::basic_regex<char,std::regex_trait... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x68
MOV qword ptr [RBP + -0x68],RDI
MOV qword ptr [RBP + -0x70],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x40]
MOV EDX,0x10
LEA RCX,[0x132051]
MOV RSI,RCX
MOV RDI,RAX
LAB_00104b43:
CALL 0x001061ba
LEA RCX,[RBP + -0x... | /* func0(std::string) */
string * func0(string *param_1,string *param_2)
{
bool bVar1;
long in_FS_OFFSET;
allocator local_59;
allocator *local_58;
allocator *local_50;
regex local_48 [40];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
std::regex::basic_regex(local_48,"[A-Z]+[a-z]+$",0... |
3,665 | func0 |
#include <iostream>
#include <regex>
#include <assert.h>
| std::string func0(std::string text) {
std::regex patterns("[A-Z]+[a-z]+$");
if (std::regex_search(text, patterns)) {
return "Found a match!";
} else {
return "Not matched!";
}
}
| int main() {
assert(func0("AaBbGg") == "Found a match!");
assert(func0("aA") == "Not matched!");
assert(func0("PYTHON") == "Not matched!");
return 0;
}
| O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %r13
push %r12
push %rbp
push %rbx
sub $0x58,%rsp
mov %rdi,%rbx
mov %rsi,%rbp
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
lea 0x20(%rsp),%r13
mov %r13,%rdi
callq 4730 <_ZNSt6loca... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r14
push r12
push rbx
sub rsp, 58h
mov rbx, rdi
mov r14, rsi
mov rax, fs:28h
mov [rbp+var_28], rax
xor eax, eax
lea r12, [rbp+var_70]
lea rdi, [rbp+var_68]; this
call __ZNS... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV RBX,RDI
MOV R14,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
XOR EAX,EAX
LEA R12,[RBP + -0x70]
LEA RDI,[RBP + -0x68]
CALL 0x001046f0
MOV qword ptr [RBP + -0x60],0x0
MOV qword ptr [RBP + -0x58],0x0
MOV ECX,0x10
LEA RDX,[0x... | /* func0(std::string) */
long * func0(long *param_1,int8 *param_2)
{
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
_Sp_counted_base<(_Lock_policy)2> *p_Var2;
bool bVar3;
int iVar4;
long in_FS_OFFSET;
regex local_78 [8];
int local_70 [8];
int8 local_68;
_Sp_counted_base<(_Lock_policy)2> *local_60;
voi... | |
3,666 | func0 |
#include <iostream>
#include <regex>
#include <assert.h>
| std::string func0(std::string text) {
std::regex patterns("[A-Z]+[a-z]+$");
if (std::regex_search(text, patterns)) {
return "Found a match!";
} else {
return "Not matched!";
}
}
| int main() {
assert(func0("AaBbGg") == "Found a match!");
assert(func0("aA") == "Not matched!");
assert(func0("PYTHON") == "Not matched!");
return 0;
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
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
mov ... | _Z5func0NSt7__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
x... | 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,[0x118638]
PXOR XMM0,XMM0
MOV RDI,R13
MOV ECX,0x10
LEA RSI,... | /* func0(std::string) */
long * func0(long *param_1,int8 *param_2)
{
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
int8 uVar2;
bool bVar3;
int iVar4;
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;
local_30 = *(lo... |
3,667 | func0 |
#include <iostream>
#include <regex>
#include <assert.h>
| std::string func0(std::string text) {
std::regex patterns("[A-Z]+[a-z]+$");
if (std::regex_search(text, patterns)) {
return "Found a match!";
} else {
return "Not matched!";
}
}
| int main() {
assert(func0("AaBbGg") == "Found a match!");
assert(func0("aA") == "Not matched!");
assert(func0("PYTHON") == "Not matched!");
return 0;
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
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
mov ... | _Z5func0NSt7__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
cal... | 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,[0x11a67d]
PXOR XMM0,XMM0
LEA RDI,[RSP + 0x110]
MOV R8D,0x10
MOV RCX,R14
LEA RSI,[RD... | /* func0(std::string) */
long * func0(long *param_1,ulong *param_2)
{
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;
uint *puVar14;
_Match_mode _Var15;
long ... |
3,668 | func0 |
#include <vector>
#include <cassert>
| int func0(std::vector<int> S, int m, int n) {
std::vector<std::vector<int>> table(n+1, std::vector<int>(m, 0));
for (int i = 0; i < m; i++) {
table[0][i] = 1;
}
for (int i = 1; i <= n; i++) {
for (int j = 0; j < m; j++) {
int x = (i - S[j] >= 0) ? table[i - S[j]][j] : ... | int main() {
assert(func0({1, 2, 3}, 3, 4) == 4);
assert(func0({4, 5, 6, 7, 8, 9}, 6, 9) == 2);
assert(func0({4, 5, 6, 7, 8, 9}, 6, 4) == 1);
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> >, int, int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x78,%rsp
mov %rdi,-0x78(%rbp)
mov %esi,-0x7c(%rbp)
mov %edx,-0x80(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
lea -0x69(%rbp),%rax
mov %rax,%rdi
callq 196c <_ZNSaISt... | _Z5func0St6vectorIiSaIiEEii:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 88h
mov [rbp+var_88], rdi
mov [rbp+var_8C], esi
mov [rbp+var_90], edx
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_79]
mov [rbp+var_58], rax
nop
nop
lea rax, [rbp+var_7A... | long long func0(long long a1, int a2, int a3)
{
long long v3; // rax
_DWORD *v4; // rax
_DWORD *v5; // rax
long long v6; // rax
int v7; // eax
long long v8; // rax
int v9; // eax
int v10; // ebx
long long v11; // rax
long long v12; // rax
unsigned int v13; // ebx
char v16; // [rsp+16h] [rbp-7Ah... | 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 dword ptr [RBP + -0x90],EDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x79]
MOV qword ptr [RBP + -0x58],RAX
NOP
NOP
LEA RAX,[RBP + -0x7a]
MOV qword ... | /* func0(std::vector<int, std::allocator<int> >, int, int) */
int4 func0(vector param_1,int param_2,int param_3)
{
int iVar1;
int4 uVar2;
int *piVar3;
vector<int,std::allocator<int>> *pvVar4;
int4 *puVar5;
int4 in_register_0000003c;
long in_FS_OFFSET;
allocator local_82;
allocator local_81;
int lo... |
3,669 | func0 |
#include <vector>
#include <cassert>
| int func0(std::vector<int> S, int m, int n) {
std::vector<std::vector<int>> table(n+1, std::vector<int>(m, 0));
for (int i = 0; i < m; i++) {
table[0][i] = 1;
}
for (int i = 1; i <= n; i++) {
for (int j = 0; j < m; j++) {
int x = (i - S[j] >= 0) ? table[i - S[j]][j] : ... | int main() {
assert(func0({1, 2, 3}, 3, 4) == 4);
assert(func0({4, 5, 6, 7, 8, 9}, 6, 9) == 2);
assert(func0({4, 5, 6, 7, 8, 9}, 6, 4) == 1);
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> >, int, int):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x38,%rsp
mov %rdi,0x20(%rsp)
mov %edx,0x2c(%rsp)
movslq %esi,%rax
movabs $0x1fffffffffffffff,%rdx
cmp %rdx,%rax
ja 131e <_Z5func0St6vectorIiSaIiEEii+0x95>
mov ... | _Z5func0St6vectorIiSaIiEEii:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 48h
mov [rsp+78h+var_6C], edx
mov rax, fs:28h
mov [rsp+78h+var_40], rax
xor eax, eax
movsxd r13, esi
mov rax, r13
shr rax, 3Dh
jnz short loc_1351
mov rbp, rdi
mov ... | long long func0(_QWORD *a1, int a2, int a3)
{
_DWORD *v5; // rax
void *v6; // r15
_DWORD *v7; // rdx
unsigned long long v8; // r14
_QWORD *v9; // r12
long long v10; // r14
long long v11; // rax
_QWORD *v12; // r9
int v13; // edi
int v14; // esi
int v15; // ecx
long long v16; // rax
int v17; /... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x48
MOV dword ptr [RSP + 0xc],EDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
MOVSXD R13,ESI
MOV RAX,R13
SHR RAX,0x3d
JNZ 0x00101351
MOV RBP,RDI
MOV EBX,ESI
TEST R13,R13
JZ 0x00101536
LEA R14,[R13*0x4]
MOV qword ptr... | /* func0(std::vector<int, std::allocator<int> >, int, int) */
int4 func0(vector param_1,int param_2,int param_3)
{
int4 uVar1;
void *pvVar2;
int4 *puVar3;
vector *pvVar4;
int8 uVar5;
vector *pvVar6;
long lVar7;
int iVar8;
int iVar9;
int4 in_register_0000003c;
int iVar10;
vector *pvVar11;
ulo... |
3,670 | func0 |
#include <vector>
#include <cassert>
| int func0(std::vector<int> S, int m, int n) {
std::vector<std::vector<int>> table(n+1, std::vector<int>(m, 0));
for (int i = 0; i < m; i++) {
table[0][i] = 1;
}
for (int i = 1; i <= n; i++) {
for (int j = 0; j < m; j++) {
int x = (i - S[j] >= 0) ? table[i - S[j]][j] : ... | int main() {
assert(func0({1, 2, 3}, 3, 4) == 4);
assert(func0({4, 5, 6, 7, 8, 9}, 6, 9) == 2);
assert(func0({4, 5, 6, 7, 8, 9}, 6, 4) == 1);
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> >, int, int):
endbr64
push %r15
movslq %esi,%rax
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x38,%rsp
mov %edx,0x1c(%rsp)
movabs $0x1fffffffffffffff,%rdx
mov %rdi,0x20(%rsp)
mov %esi,0x28(%rsp)
cmp %rdx,%rax
ja 176c <_Z5func0St6vector... | _Z5func0St6vectorIiSaIiEEii:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
movsxd rbx, esi
sub rsp, 48h
mov [rsp+78h+var_70], rdi
mov rax, fs:28h
mov [rsp+78h+var_40], rax
mov rax, rbx
shr rax, 3Dh
jnz loc_1758
pxor xmm0, xmm0
mov r14, rbx
mov r1... | long long func0(long long *a1, int a2, int a3)
{
long long v3; // rbx
void *v5; // r15
unsigned long long v6; // r13
_QWORD *v7; // rbp
long long v8; // r13
_DWORD *v9; // rax
long long v10; // rdx
long long *v11; // r9
int v12; // esi
long long v13; // rdi
long long v14; // r8
long long i; // ... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOVSXD RBX,ESI
SUB RSP,0x48
MOV qword ptr [RSP + 0x8],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
MOV RAX,RBX
SHR RAX,0x3d
JNZ 0x00101758
PXOR XMM0,XMM0
MOV R14,RBX
MOV R12D,EDX
MOVUPS xmmword ptr [RSP + 0x28],XMM0
TEST RBX,RBX
JZ 0... | /* func0(std::vector<int, std::allocator<int> >, int, int) */
int4 func0(vector param_1,int param_2,int param_3)
{
int4 uVar1;
int4 *puVar2;
long lVar3;
long lVar4;
void *__s;
vector *pvVar5;
vector *pvVar6;
int4 *puVar7;
int4 *puVar8;
ulong uVar9;
int iVar10;
int iVar11;
ulong uVar12;
voi... |
3,671 | func0 |
#include <vector>
#include <cassert>
| int func0(std::vector<int> S, int m, int n) {
std::vector<std::vector<int>> table(n+1, std::vector<int>(m, 0));
for (int i = 0; i < m; i++) {
table[0][i] = 1;
}
for (int i = 1; i <= n; i++) {
for (int j = 0; j < m; j++) {
int x = (i - S[j] >= 0) ? table[i - S[j]][j] : ... | int main() {
assert(func0({1, 2, 3}, 3, 4) == 4);
assert(func0({4, 5, 6, 7, 8, 9}, 6, 9) == 2);
assert(func0({4, 5, 6, 7, 8, 9}, 6, 4) == 1);
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> >, int, int):
endbr64
push %r15
movslq %esi,%rax
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x28,%rsp
mov %edx,0x14(%rsp)
movabs $0x1fffffffffffffff,%rdx
mov %rdi,0x18(%rsp)
mov %esi,0x10(%rsp)
cmp %rdx,%rax
ja 1852 <_Z5func0St6vector... | _Z5func0St6vectorIiSaIiEEii:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
movsxd rbx, esi
sub rsp, 48h
mov [rsp+78h+var_70], rdi
mov rax, fs:28h
mov [rsp+78h+var_40], rax
mov rax, rbx
shr rax, 3Dh
jnz loc_1805
pxor xmm0, xmm0
mov r14, rbx
mov r1... | long long func0(long long *a1, unsigned int a2, int a3)
{
long long v3; // rbx
void *v5; // r15
unsigned long long v6; // r13
_QWORD *v7; // rbp
long long v8; // r13
int v9; // r9d
__m128i *v10; // rcx
__m128i si128; // xmm0
__m128i *v12; // rax
long long v13; // rdx
__m128i *v14; // rsi
int v1... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOVSXD RBX,ESI
SUB RSP,0x48
MOV qword ptr [RSP + 0x8],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
MOV RAX,RBX
SHR RAX,0x3d
JNZ 0x00101805
PXOR XMM0,XMM0
MOV R14,RBX
MOV R12D,EDX
MOVUPS xmmword ptr [RSP + 0x28],XMM0
TEST RBX,RBX
JZ 0... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(std::vector<int, std::allocator<int> >, int, int) */
int4 func0(vector param_1,int param_2,int param_3)
{
long lVar1;
int8 *puVar2;
int *piVar3;
int8 uVar4;
int8 uVar5;
uint uVar6;
void *__s;
vector *pvVar7;
... |
3,672 | func0 |
#include <vector>
#include <assert.h>
| int func0(const std::vector<int>& items) {
int tot = 1;
for (int x : items) {
tot *= x;
}
return tot;
}
| int main() {
assert(func0({1, -2, 3}) == -6);
assert(func0({1, 2, 3, 4}) == 24);
assert(func0({3, 1, 2, 3}) == 18);
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 $0x1,-0x28(%rbp)
mov -0x38(%rbp),%rax
mov %rax,-0x10(%rbp)
mov -0x10(%rbp),%rax
mov %rax,%rdi
callq 1568 <... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_38], rdi
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
mov [rbp+var_28], 1
mov rax, [rbp+var_38]
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov rdi, rax
call _ZNKSt6vectorIiSaIiEE5... | long long func0(long long a1)
{
unsigned int v2; // [rsp+18h] [rbp-28h]
long long v3; // [rsp+20h] [rbp-20h] BYREF
_QWORD v4[3]; // [rsp+28h] [rbp-18h] BYREF
v4[2] = __readfsqword(0x28u);
v2 = 1;
v4[1] = a1;
v3 = std::vector<int>::begin(a1);
v4[0] = std::vector<int>::end(a1);
while ( (unsigned __int... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x38],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
MOV dword ptr [RBP + -0x28],0x1
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,RAX
CALL 0x001015ec
MOV qword pt... | /* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
bool bVar1;
int *piVar2;
long in_FS_OFFSET;
int local_30;
int8 local_28;
int8 local_20;
vector<int,std::allocator<int>> *local_18;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_30 = 1;
lo... |
3,673 | func0 |
#include <vector>
#include <assert.h>
| int func0(const std::vector<int>& items) {
int tot = 1;
for (int x : items) {
tot *= x;
}
return tot;
}
| int main() {
assert(func0({1, -2, 3}) == -6);
assert(func0({1, 2, 3, 4}) == 24);
assert(func0({3, 1, 2, 3}) == 18);
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
mov (%rdi),%rax
mov 0x8(%rdi),%rcx
cmp %rcx,%rax
je 122d <_Z5func0RKSt6vectorIiSaIiEE+0x24>
mov $0x1,%edx
imul (%rax),%edx
add $0x4,%rax
cmp %rax,%rcx
jne 121e <_Z5func0RKSt6vectorIiSaIiEE+0x15>
mov %edx,%eax
retq
mov $0x1,%e... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
mov rax, [rdi]
mov rcx, [rdi+8]
cmp rcx, rax
jz short loc_122D
mov edx, 1
loc_121E:
imul edx, [rax]
add rax, 4
cmp rax, rcx
jnz short loc_121E
loc_122A:
mov eax, edx
retn
loc_122D:
mov edx, 1
jmp short loc_122A | long long func0(long long a1)
{
_DWORD *v1; // rax
_DWORD *v2; // rcx
unsigned int v3; // edx
v1 = *(_DWORD **)a1;
v2 = *(_DWORD **)(a1 + 8);
if ( v2 == *(_DWORD **)a1 )
{
return 1;
}
else
{
v3 = 1;
do
v3 *= *v1++;
while ( v1 != v2 );
}
return v3;
} | func0:
ENDBR64
MOV RAX,qword ptr [RDI]
MOV RCX,qword ptr [RDI + 0x8]
CMP RCX,RAX
JZ 0x0010122d
MOV EDX,0x1
LAB_0010121e:
IMUL EDX,dword ptr [RAX]
ADD RAX,0x4
CMP RAX,RCX
JNZ 0x0010121e
LAB_0010122a:
MOV EAX,EDX
RET
LAB_0010122d:
MOV EDX,0x1
JMP 0x0010122a | /* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
int *piVar1;
int iVar2;
piVar1 = *(int **)param_1;
if (*(int **)(param_1 + 8) == piVar1) {
iVar2 = 1;
}
else {
iVar2 = 1;
do {
iVar2 = iVar2 * *piVar1;
piVar1 = piVar1 + 1;
} while (piVar... |
3,674 | func0 |
#include <vector>
#include <assert.h>
| int func0(const std::vector<int>& items) {
int tot = 1;
for (int x : items) {
tot *= x;
}
return tot;
}
| int main() {
assert(func0({1, -2, 3}) == -6);
assert(func0({1, 2, 3, 4}) == 24);
assert(func0({3, 1, 2, 3}) == 18);
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
mov (%rdi),%rax
mov 0x8(%rdi),%rdx
mov $0x1,%r8d
cmp %rdx,%rax
je 142d <_Z5func0RKSt6vectorIiSaIiEE+0x2d>
nopw %cs:0x0(%rax,%rax,1)
imul (%rax),%r8d
add $0x4,%rax
cmp %rax,%rdx
jne 1420 <_Z5func0RKSt6vectorIiSaIiEE+0x20>
mov %... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
mov rax, [rdi]
mov rcx, [rdi+8]
mov edx, 1
cmp rcx, rax
jz short loc_1450
mov rsi, rcx
sub rsi, rax
and esi, 4
jz short loc_1440
mov edx, [rax]
add rax, 4
cmp rax, rcx
jz short loc_1450
nop dword ptr [rax+rax+00h]
loc_1440:
... | long long func0(unsigned int **a1)
{
unsigned int *v1; // rax
unsigned int *v2; // rcx
unsigned int v3; // edx
int v4; // edx
v1 = *a1;
v2 = a1[1];
v3 = 1;
if ( v2 != *a1 )
{
if ( (((_BYTE)v2 - (_BYTE)v1) & 4) == 0 || (v3 = *v1, ++v1, v1 != v2) )
{
do
{
v4 = *v1 * v3;
... | func0:
ENDBR64
MOV RAX,qword ptr [RDI]
MOV RCX,qword ptr [RDI + 0x8]
MOV EDX,0x1
CMP RCX,RAX
JZ 0x00101450
MOV RSI,RCX
SUB RSI,RAX
AND ESI,0x4
JZ 0x00101440
MOV EDX,dword ptr [RAX]
ADD RAX,0x4
CMP RAX,RCX
JZ 0x00101450
NOP dword ptr [RAX + RAX*0x1]
LAB_00101440:
IMUL EDX,dword ptr [RAX]
ADD RAX,0x8
IMUL EDX,dword ptr [... | /* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
int *piVar1;
int *piVar2;
int *piVar3;
int iVar4;
piVar2 = *(int **)param_1;
piVar1 = *(int **)(param_1 + 8);
iVar4 = 1;
if (piVar1 != piVar2) {
if (((int)piVar1 - (int)piVar2 & 4U) != 0) {
iVar4 = *pi... |
3,675 | func0 |
#include <vector>
#include <assert.h>
| int func0(const std::vector<int>& items) {
int tot = 1;
for (int x : items) {
tot *= x;
}
return tot;
}
| int main() {
assert(func0({1, -2, 3}) == -6);
assert(func0({1, 2, 3, 4}) == 24);
assert(func0({3, 1, 2, 3}) == 18);
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
mov (%rdi),%rax
mov 0x8(%rdi),%rcx
cmp %rcx,%rax
je 16f8 <_Z5func0RKSt6vectorIiSaIiEE+0xe8>
lea -0x4(%rcx),%rsi
mov %rax,%rdx
sub %rax,%rsi
mov %rsi,%rdi
shr $0x2,%rdi
add $0x1,%rdi
cmp $0x70,%rsi
jbe 1702 <_Z5func0RKSt6v... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
mov rax, [rdi]
mov rsi, [rdi+8]
cmp rsi, rax
jz loc_1760
lea rcx, [rsi-4]
mov rdx, rax
sub rcx, rax
mov rdi, rcx
shr rdi, 2
add rdi, 1
cmp rcx, 68h ; 'h'
jbe loc_1768
mov rcx, rdi
movdqa xmm1, cs:xmmword_20C0
shr rcx, 2
shl ... | long long func0(const __m128i **a1)
{
const __m128i *v1; // rax
const __m128i *v2; // rsi
const __m128i *v3; // rdx
unsigned long long v4; // rdi
__m128i si128; // xmm1
__m128i v6; // xmm2
__m128i v7; // xmm2
__m128i v8; // xmm1
unsigned int v9; // edx
int v10; // edx
v1 = *a1;
v2 = a1[1];
i... | func0:
ENDBR64
MOV RAX,qword ptr [RDI]
MOV RSI,qword ptr [RDI + 0x8]
CMP RSI,RAX
JZ 0x00101760
LEA RCX,[RSI + -0x4]
MOV RDX,RAX
SUB RCX,RAX
MOV RDI,RCX
SHR RDI,0x2
ADD RDI,0x1
CMP RCX,0x68
JBE 0x00101768
MOV RCX,RDI
MOVDQA XMM1,xmmword ptr [0x001020c0]
SHR RCX,0x2
SHL RCX,0x4
ADD RCX,RAX
NOP dword ptr [RAX]
LAB_001016b... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(std::vector<int, std::allocator<int> > const&) */
ulong func0(vector *param_1)
{
ulong *puVar1;
ulong *puVar2;
ulong *puVar3;
ulong *puVar4;
ulong *puVar5;
ulong uVar6;
ulong uVar7;
ulong uVar8;
int auVar9 ... |
3,676 | func0 |
#include <iostream>
#include <vector>
#include <string>
#include <optional>
#include <cassert>
#include <sstream>
| std::string func0(const std::vector<std::pair<std::optional<int>, std::optional<int>>>& test_list) {
std::vector<std::pair<std::optional<int>, std::optional<int>>> res;
for (const auto& sub : test_list) {
bool all_none = true;
if (sub.first.has_value()) {
all_none = false;
... | int main() {
std::vector<std::pair<std::optional<int>, std::optional<int>>> test1 = {
{std::nullopt, 2},
{std::nullopt, std::nullopt},
{3, 4},
{12, 3},
{std::nullopt, std::nullopt}
};
assert(func0(test1) == "[(None, 2), (3, 4), (12, 3)]");
std::vector<s... | O0 | cpp | func0[abi:cxx11](std::vector<std::pair<std::optional<int>, std::optional<int> >, std::allocator<std::pair<std::optional<int>, std::optional<int> > > > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x1e8,%rsp
mov %rdi,-0x1e8(%rbp)
mov %rsi,-0x1f0(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rb... | _Z5func0B5cxx11RKSt6vectorISt4pairISt8optionalIiES2_ESaIS3_EE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 1E8h
mov [rbp+var_1E8], rdi
mov [rbp+var_1F0], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_1B0]
mov rdi, rax
call _ZNSt6vectorISt4pairI... | long long func0[abi:cxx11](long long a1, long long a2)
{
long long v2; // rax
long long v3; // rax
unsigned int *v4; // rax
long long v5; // rax
long long v6; // rax
unsigned int *v7; // rax
long long v8; // rax
unsigned long long v9; // rax
bool v11; // [rsp+17h] [rbp-1D9h]
long long v12; // [rsp+... | func0[abi:cxx11]:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x1e8
MOV qword ptr [RBP + -0x1e8],RDI
MOV qword ptr [RBP + -0x1f0],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x1b0]
MOV RDI,RAX
CALL 0x00101f1a
MOV RAX,qword ptr [RBP + -0x1f0]
MOV qword ptr [RBP + -0x1c0]... | /* func0[abi:cxx11](std::vector<std::pair<std::optional<int>, std::optional<int> >,
std::allocator<std::pair<std::optional<int>, std::optional<int> > > > const&) */
vector * func0_abi_cxx11_(vector *param_1)
{
char cVar1;
bool bVar2;
char cVar3;
optional<int> *poVar4;
int *piVar5;
long lVar6;
ulong u... |
3,677 | func0 |
#include <iostream>
#include <vector>
#include <string>
#include <optional>
#include <cassert>
#include <sstream>
| std::string func0(const std::vector<std::pair<std::optional<int>, std::optional<int>>>& test_list) {
std::vector<std::pair<std::optional<int>, std::optional<int>>> res;
for (const auto& sub : test_list) {
bool all_none = true;
if (sub.first.has_value()) {
all_none = false;
... | int main() {
std::vector<std::pair<std::optional<int>, std::optional<int>>> test1 = {
{std::nullopt, 2},
{std::nullopt, std::nullopt},
{3, 4},
{12, 3},
{std::nullopt, std::nullopt}
};
assert(func0(test1) == "[(None, 2), (3, 4), (12, 3)]");
std::vector<s... | O1 | cpp | func0[abi:cxx11](std::vector<std::pair<std::optional<int>, std::optional<int> >, std::allocator<std::pair<std::optional<int>, std::optional<int> > > > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x1a8,%rsp
mov %rdi,%r12
mov %fs:0x28,%rax
mov %rax,0x198(%rsp)... | _Z5func0B5cxx11RKSt6vectorISt4pairISt8optionalIiES2_ESaIS3_EE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 1B8h
mov [rsp+1E8h+var_1E8], rdi
mov rax, fs:28h
mov [rsp+1E8h+var_40], rax
xor eax, eax
mov [rsp+1E8h+var_1D8], 0
mov [rsp+1E8h+var_1D0], 0... | long long func0[abi:cxx11](long long a1, const __m128i **a2)
{
const __m128i *v2; // rbx
const __m128i *v3; // rbp
__m128i *v4; // rsi
unsigned long long v5; // r13
__m128i *v6; // rbx
unsigned long long v7; // rbp
unsigned long long v8; // r8
__m128i *v10; // [rsp+8h] [rbp-1E0h]
__m128i *v11; // [rs... | func0[abi:cxx11]:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x1b8
MOV qword ptr [RSP],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x1a8],RAX
XOR EAX,EAX
MOV qword ptr [RSP + 0x10],0x0
MOV qword ptr [RSP + 0x18],0x0
MOV qword ptr [RSP + 0x20],0x0
MOV RBX,qword ptr [RSI]
MOV RBP,qword... | /* func0[abi:cxx11](std::vector<std::pair<std::optional<int>, std::optional<int> >,
std::allocator<std::pair<std::optional<int>, std::optional<int> > > > const&) */
vector * func0_abi_cxx11_(vector *param_1)
{
pair *ppVar1;
int8 uVar2;
pair *ppVar3;
int *piVar4;
ulong uVar5;
long *in_RSI;
ulong uVar6... |
3,678 | func0 |
#include <iostream>
#include <vector>
#include <string>
#include <optional>
#include <cassert>
#include <sstream>
| std::string func0(const std::vector<std::pair<std::optional<int>, std::optional<int>>>& test_list) {
std::vector<std::pair<std::optional<int>, std::optional<int>>> res;
for (const auto& sub : test_list) {
bool all_none = true;
if (sub.first.has_value()) {
all_none = false;
... | int main() {
std::vector<std::pair<std::optional<int>, std::optional<int>>> test1 = {
{std::nullopt, 2},
{std::nullopt, std::nullopt},
{3, 4},
{12, 3},
{std::nullopt, std::nullopt}
};
assert(func0(test1) == "[(None, 2), (3, 4), (12, 3)]");
std::vector<s... | O2 | cpp | func0[abi:cxx11](std::vector<std::pair<std::optional<int>, std::optional<int> >, std::allocator<std::pair<std::optional<int>, std::optional<int> > > > const&):
endbr64
push %r15
push %r14
mov %rdi,%r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x1b8,%rsp
mov 0x8(%rsi),%rbp
mov (%rsi),%rbx
mov... | _Z5func0B5cxx11RKSt6vectorISt4pairISt8optionalIiES2_ESaIS3_EE:
endbr64
push r15
push r14
push r13
push r12
push rbp
lea rbp, unk_4C98
push rbx
movq xmm4, rbp
sub rsp, 1E8h
mov r12, [rsi+8]
mov rbx, [rsi]
mov [rsp+218h+var_218], rdi
lea r13, [rsp+218h+var_1D8]
mov rax, fs... | long long func0[abi:cxx11](long long a1, const __m128i **a2)
{
const __m128i *v2; // r12
const __m128i *v3; // rbx
__m128i v4; // xmm1
long long v5; // rsi
_QWORD *v6; // rdi
__m128i si128; // xmm5
unsigned long long v8; // r12
unsigned int *v9; // rbp
unsigned long long v10; // r14
unsigned long l... | func0[abi:cxx11]:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
LEA RBP,[0x104c98]
PUSH RBX
MOVQ XMM4,RBP
SUB RSP,0x1e8
MOV R12,qword ptr [RSI + 0x8]
MOV RBX,qword ptr [RSI]
MOV qword ptr [RSP],RDI
LEA R13,[RSP + 0x40]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x1d8],RAX
LEA RAX,[0x104c30]
MOV qword ptr [... | /* func0[abi:cxx11](std::vector<std::pair<std::optional<int>, std::optional<int> >,
std::allocator<std::pair<std::optional<int>, std::optional<int> > > > const&) */
vector * func0_abi_cxx11_(vector *param_1)
{
pair *ppVar1;
int8 uVar2;
int8 uVar3;
pointer_____offset_0x10___ puVar4;
pair *ppVar5;
int *p... |
3,679 | func0 |
#include <iostream>
#include <vector>
#include <string>
#include <optional>
#include <cassert>
#include <sstream>
| std::string func0(const std::vector<std::pair<std::optional<int>, std::optional<int>>>& test_list) {
std::vector<std::pair<std::optional<int>, std::optional<int>>> res;
for (const auto& sub : test_list) {
bool all_none = true;
if (sub.first.has_value()) {
all_none = false;
... | int main() {
std::vector<std::pair<std::optional<int>, std::optional<int>>> test1 = {
{std::nullopt, 2},
{std::nullopt, std::nullopt},
{3, 4},
{12, 3},
{std::nullopt, std::nullopt}
};
assert(func0(test1) == "[(None, 2), (3, 4), (12, 3)]");
std::vector<s... | O3 | cpp | func0[abi:cxx11](std::vector<std::pair<std::optional<int>, std::optional<int> >, std::allocator<std::pair<std::optional<int>, std::optional<int> > > > const&):
endbr64
push %r15
pxor %xmm0,%xmm0
push %r14
mov %rdi,%r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x1b8,%rsp
mov 0x8(%rsi),%rbp
mov... | _Z5func0B5cxx11RKSt6vectorISt4pairISt8optionalIiES2_ESaIS3_EE:
endbr64
push r15
push r14
push r13
push r12
push rbp
lea rbp, unk_4C98
push rbx
movq xmm4, rbp
sub rsp, 1E8h
mov r12, [rsi+8]
mov rbx, [rsi]
mov [rsp+218h+var_218], rdi
lea r13, [rsp+218h+var_1D8]
mov rax, fs... | long long func0[abi:cxx11](long long a1, const __m128i **a2)
{
const __m128i *v2; // r12
const __m128i *v3; // rbx
__m128i v4; // xmm1
long long v5; // rsi
_QWORD *v6; // rdi
__m128i si128; // xmm5
unsigned long long v8; // r12
unsigned int *v9; // rbp
unsigned long long v10; // r14
unsigned long l... | func0[abi:cxx11]:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
LEA RBP,[0x104c98]
PUSH RBX
MOVQ XMM4,RBP
SUB RSP,0x1e8
MOV R12,qword ptr [RSI + 0x8]
MOV RBX,qword ptr [RSI]
MOV qword ptr [RSP],RDI
LEA R13,[RSP + 0x40]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x1d8],RAX
LEA RAX,[0x104c30]
MOV qword ptr [... | /* func0[abi:cxx11](std::vector<std::pair<std::optional<int>, std::optional<int> >,
std::allocator<std::pair<std::optional<int>, std::optional<int> > > > const&) */
vector * func0_abi_cxx11_(vector *param_1)
{
pair *ppVar1;
int8 uVar2;
int8 uVar3;
pointer_____offset_0x10___ puVar4;
pair *ppVar5;
int *p... |
3,680 | func0 | #include <vector>
#include <cassert>
using namespace std;
| vector<vector<int>> func0(const vector<int>& test_tup, int N) {
vector<vector<int>> res;
for (size_t i = 0; i < test_tup.size(); i += N) {
vector<int> chunk;
for (size_t j = i; j < i + N && j < test_tup.size(); j++) {
chunk.push_back(test_tup[j]);
}
res.push_ba... | int main() {
{
vector<vector<int>> expected = { {10, 4, 5}, {6, 7, 6}, {8, 3, 4} };
assert(func0({10, 4, 5, 6, 7, 6, 8, 3, 4}, 3) == expected);
}
{
vector<vector<int>> expected = { {1, 2}, {3, 4}, {5, 6}, {7, 8}, {9} };
assert(func0({1, 2, 3, 4, 5, 6, 7, 8, 9}, 2) == e... | O0 | cpp | func0(std::vector<int, std::allocator<int> > const&, int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x58,%rsp
mov %rdi,-0x48(%rbp)
mov %rsi,-0x50(%rbp)
mov %edx,-0x54(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x48(%rbp),%rax
mov %rax,%rdi
callq 2246 <_ZNSt6... | _Z5func0RKSt6vectorIiSaIiEEi:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 58h
mov [rbp+var_48], rdi
mov [rbp+var_50], rsi
mov [rbp+var_54], edx
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_48]
mov rdi, rax
call _ZNSt6vectorIS_IiSaIiEESaIS1_EEC... | long long func0(long long a1, long long a2, int a3)
{
long long v3; // rax
unsigned long long i; // [rsp+20h] [rbp-40h]
unsigned long long j; // [rsp+28h] [rbp-38h]
_BYTE v9[24]; // [rsp+30h] [rbp-30h] BYREF
unsigned long long v10; // [rsp+48h] [rbp-18h]
v10 = __readfsqword(0x28u);
std::vector<std::vect... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x58
MOV qword ptr [RBP + -0x48],RDI
MOV qword ptr [RBP + -0x50],RSI
MOV dword ptr [RBP + -0x54],EDX
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 0x001022a6
MOV qword ptr [RBP + -0x40],0x0
JM... | /* func0(std::vector<int, std::allocator<int> > const&, int) */
vector * func0(vector *param_1,int param_2)
{
bool bVar1;
int *piVar2;
ulong uVar3;
int in_EDX;
int4 in_register_00000034;
vector<int,std::allocator<int>> *this;
long in_FS_OFFSET;
ulong local_48;
ulong local_40;
vector<int,std::alloc... |
3,681 | func0 | #include <vector>
#include <cassert>
using namespace std;
| vector<vector<int>> func0(const vector<int>& test_tup, int N) {
vector<vector<int>> res;
for (size_t i = 0; i < test_tup.size(); i += N) {
vector<int> chunk;
for (size_t j = i; j < i + N && j < test_tup.size(); j++) {
chunk.push_back(test_tup[j]);
}
res.push_ba... | int main() {
{
vector<vector<int>> expected = { {10, 4, 5}, {6, 7, 6}, {8, 3, 4} };
assert(func0({10, 4, 5, 6, 7, 6, 8, 3, 4}, 3) == expected);
}
{
vector<vector<int>> expected = { {1, 2}, {3, 4}, {5, 6}, {7, 8}, {9} };
assert(func0({1, 2, 3, 4, 5, 6, 7, 8, 9}, 2) == e... | O1 | cpp | func0(std::vector<int, std::allocator<int> > const&, int):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x38,%rsp
mov %rdi,%r15
mov %fs:0x28,%rax
mov %rax,0x28(%rsp)
xor %eax,%eax
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi)
movq $0x0,0x10(%rdi)
mov (%rsi),%rax
cm... | _Z5func0RKSt6vectorIiSaIiEEi:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 48h
mov r13, rdi
mov rax, fs:28h
mov [rsp+78h+var_40], rax
xor eax, eax
mov qword ptr [rdi], 0
mov qword ptr [rdi+8], 0
mov qword ptr [rdi+10h], 0
mov rax, [rsi+8]
c... | _QWORD * func0(_QWORD *a1, _QWORD *a2, int a3)
{
unsigned long long v4; // rbp
unsigned long long v5; // r12
_DWORD *v6; // rdx
char *v7; // rsi
_QWORD *v8; // r12
char *v9; // r15
signed long long v10; // r14
_DWORD *v11; // rax
struct _Unwind_Exception *v12; // rbx
long long v14; // [rsp+10h] [rbp... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x48
MOV R13,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
MOV qword ptr [RDI],0x0
MOV qword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
MOV RAX,qword ptr [RSI + 0x8]
CMP qword ptr [RSI],RAX
JZ 0x00101518
MO... | /* func0(std::vector<int, std::allocator<int> > const&, int) */
vector * func0(vector *param_1,int param_2)
{
int *piVar1;
int4 *__src;
int4 *__dest;
int8 uVar2;
int in_EDX;
ulong uVar3;
int4 in_register_00000034;
long *plVar4;
ulong uVar5;
int8 *puVar6;
long in_FS_OFFSET;
long local_60;
int... |
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.