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,082 | func0 |
#include <iostream>
#include <deque>
#include <assert.h>
| bool func0(std::string exp) {
if (exp.length() % 2 != 0) {
return false;
}
std::deque<char> stack;
for (char ch : exp) {
if (ch == '(' || ch == '{' || ch == '[') {
stack.push_back(ch);
}
if (ch == ')' || ch == '}' || ch == ']') {
if (stac... | int main() {
assert(func0("{()}[{}]") == true);
assert(func0("{()}[{]") == false);
assert(func0("{()}[{}][]({})") == true);
return 0;
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %r15
push %r14
push %r13
push %r12
xor %r12d,%r12d
push %rbp
push %rbx
sub $0x78,%rsp
mov %fs:0x28,%rax
mov %rax,0x68(%rsp)
xor %eax,%eax
testb $0x1,0x8(%rdi)
je 15d8 <_Z5func0NSt7__cxx11... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
push r14
push r13
push r12
xor r12d, r12d
push rbp
push rbx
sub rsp, 0A8h
mov rax, fs:28h
mov [rsp+0D8h+var_40], rax
xor eax, eax
test byte ptr [rdi+8], 1
jz short loc_15D0
loc_15A1:
mov rax,... | long long func0(long long a1)
{
_BYTE *v1; // r12
unsigned long long v3; // rax
int v4; // edx
char *v5; // rbx
unsigned long long v6; // r13
long long v7; // r15
__m128i v8; // xmm2
char *v9; // r15
char v10; // bp
char v11; // r14
long long v12; // rax
long long v13; // r14
long long v14; /... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
XOR R12D,R12D
PUSH RBP
PUSH RBX
SUB RSP,0xa8
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x98],RAX
XOR EAX,EAX
TEST byte ptr [RDI + 0x8],0x1
JZ 0x001015d0
LAB_001015a1:
MOV RAX,qword ptr [RSP + 0x98]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x00101a8e
ADD RSP,0xa8
MOV EAX,... | /* func0(std::string) */
ulong func0(int8 *param_1)
{
long lVar1;
byte bVar2;
long *plVar3;
int8 __src;
int8 uVar4;
void *pvVar5;
byte *pbVar6;
long lVar7;
long *plVar8;
bool bVar9;
ulong extraout_RDX;
ulong extraout_RDX_00;
size_t sVar10;
byte *pbVar11;
ulong uVar12;
long lVar13;
by... |
3,083 | func0 |
#include <iostream>
#include <deque>
#include <assert.h>
| bool func0(std::string exp) {
if (exp.length() % 2 != 0) {
return false;
}
std::deque<char> stack;
for (char ch : exp) {
if (ch == '(' || ch == '{' || ch == '[') {
stack.push_back(ch);
}
if (ch == ')' || ch == '}' || ch == ']') {
if (stac... | int main() {
assert(func0("{()}[{}]") == true);
assert(func0("{()}[{]") == false);
assert(func0("{()}[{}][]({})") == true);
return 0;
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %r15
push %r14
push %r13
push %r12
xor %r12d,%r12d
push %rbp
push %rbx
sub $0x48,%rsp
testb $0x1,0x8(%rdi)
je 15c0 <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x30>
add $0x48,... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
xor edx, edx
test byte ptr [rdi+8], 1
jz short loc_1550
mov eax, edx
retn
loc_1550:
push r15
push r14
push r13
push r12
push rbp
push rbx
mov rbx, rdi
mov edi, 40h ; '@'; unsigned __int64
sub rsp, 48h
cal... | long long func0(long long a1)
{
char *v3; // r13
_BYTE *v4; // rax
unsigned int v5; // edx
char *v6; // r12
_BYTE *v7; // r14
long long v8; // rdi
_BYTE *v9; // rsi
_BYTE *v10; // rbx
void **v11; // r15
char v12; // bp
char v13; // al
unsigned long long v14; // r13
char v15; // bl
void *v16... | func0:
ENDBR64
XOR EDX,EDX
TEST byte ptr [RDI + 0x8],0x1
JZ 0x00101550
MOV EAX,EDX
RET
LAB_00101550:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV RBX,RDI
MOV EDI,0x40
SUB RSP,0x48
LAB_00101566:
CALL 0x001011d0
MOV EDI,0x200
MOV qword ptr [RSP + 0x20],RAX
MOV R15,RAX
LEA R13,[RAX + 0x18]
LAB_0010157c:
CALL ... | /* func0(std::string) */
ulong func0(int8 *param_1)
{
long *plVar1;
byte bVar2;
byte bVar3;
byte *pbVar4;
byte *pbVar5;
long lVar6;
void *pvVar7;
long lVar8;
bool bVar9;
ulong extraout_RDX;
ulong extraout_RDX_00;
size_t sVar10;
byte *pbVar11;
byte *pbVar12;
byte *pbVar13;
ulong uVar14;... |
3,084 | func0 |
#include <iostream>
#include <string>
#include <sstream>
#include <vector>
#include <assert.h>
| std::string func0(const std::string& test_str, int K) {
std::istringstream iss(test_str);
std::string word;
std::vector<std::string> res;
while (iss >> word) {
if (word.length() != K) {
res.push_back(word);
}
}
std::string result;
for (size_t... | int main() {
assert(func0("The person is most value tet", 3) == "person is most value");
assert(func0("If you told me about this ok", 4) == "If you me about ok");
assert(func0("Forces of darkeness is come into the play", 4) == "Forces of darkeness is the");
return 0;
}
| O0 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x208,%rsp
mov %rdi,-0x1f8(%rbp)
mov %rsi,-0x200(%rbp)
mov %edx,-0x204(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x200(%... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 208h
mov [rbp+var_1F8], rdi
mov [rbp+var_200], rsi
mov [rbp+var_204], edx
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rcx, [rbp+var_200]
lea rax, [rbp... | long long func0(long long a1, long long a2, int a3)
{
_QWORD *v3; // rax
long long v4; // rax
unsigned long long i; // [rsp+28h] [rbp-1E8h]
_BYTE v8[32]; // [rsp+30h] [rbp-1E0h] BYREF
_BYTE v9[32]; // [rsp+50h] [rbp-1C0h] BYREF
_BYTE v10[392]; // [rsp+70h] [rbp-1A0h] BYREF
unsigned long long v11; // [rsp... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x208
MOV qword ptr [RBP + -0x1f8],RDI
MOV qword ptr [RBP + -0x200],RSI
MOV dword ptr [RBP + -0x204],EDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RCX,qword ptr [RBP + -0x200]
LEA RAX,[RBP + -0x1a0]
MOV EDX,0x8
MOV RSI,RCX
MOV RDI,RA... | /* func0(std::string const&, int) */
string * func0(string *param_1,int param_2)
{
bool bVar1;
long lVar2;
istream *piVar3;
string *psVar4;
ulong uVar5;
int in_EDX;
int4 in_register_00000034;
long in_FS_OFFSET;
ulong local_1f0;
vector<std::string,std::allocator<std::string>> local_1e8 [32];
stri... |
3,085 | func0 |
#include <iostream>
#include <string>
#include <sstream>
#include <vector>
#include <assert.h>
| std::string func0(const std::string& test_str, int K) {
std::istringstream iss(test_str);
std::string word;
std::vector<std::string> res;
while (iss >> word) {
if (word.length() != K) {
res.push_back(word);
}
}
std::string result;
for (size_t... | int main() {
assert(func0("The person is most value tet", 3) == "person is most value");
assert(func0("If you told me about this ok", 4) == "If you me about ok");
assert(func0("Forces of darkeness is come into the play", 4) == "Forces of darkeness is the");
return 0;
}
| O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x1e8,%rsp
mov %rdi,%r13
mov %rsi,%rbp
mov %edx,%ebx
mov %fs:0x28,%rax
mov %rax,0x1d8(%rsp)
xor %eax,%eax
lea 0... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 1E8h
mov r12, rdi
mov rbp, rsi
mov ebx, edx
mov rax, fs:28h
mov [rsp+218h+var_40], rax
xor eax, eax
lea r13, [rsp+218h+var_1C8]
lea ... | long long func0(long long a1, long long *a2, int a3)
{
long long v4; // rdx
long long v5; // rsi
char *v6; // r13
_QWORD *v7; // rax
char *v8; // r14
unsigned long long v9; // r15
_QWORD *v10; // rbx
unsigned long long v11; // rbp
void **v12; // rbx
void **v14; // [rsp+8h] [rbp-210h]
void *v15; /... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x1e8
MOV R12,RDI
MOV RBP,RSI
MOV EBX,EDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x1d8],RAX
XOR EAX,EAX
LEA R13,[RSP + 0x50]
LEA RDI,[RSP + 0xc8]
CALL 0x001021c0
LEA RAX,[0x105b70]
MOV qword ptr [RSP + 0xc8],RAX
MOV qword ptr [RSP + ... | /* func0(std::string const&, int) */
string * func0(string *param_1,int param_2)
{
char *pcVar1;
ulong *puVar2;
istream *piVar3;
int8 uVar4;
int in_EDX;
ulong *puVar5;
ulong *puVar6;
ulong uVar7;
int4 in_register_00000034;
long lVar8;
long in_FS_OFFSET;
ulong *local_210;
ulong *local_208;
... |
3,086 | func0 |
#include <iostream>
#include <string>
#include <sstream>
#include <vector>
#include <assert.h>
| std::string func0(const std::string& test_str, int K) {
std::istringstream iss(test_str);
std::string word;
std::vector<std::string> res;
while (iss >> word) {
if (word.length() != K) {
res.push_back(word);
}
}
std::string result;
for (size_t... | int main() {
assert(func0("The person is most value tet", 3) == "person is most value");
assert(func0("If you told me about this ok", 4) == "If you me about ok");
assert(func0("Forces of darkeness is come into the play", 4) == "Forces of darkeness is the");
return 0;
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int):
endbr64
push %r15
mov %rsi,%r15
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
movslq %edx,%rbx
sub $0x1f8,%rsp
mov %fs:0x28,%rax
mov %rax,0x1e8(%rsp)
xor %eax,%eax
lea 0... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi:
endbr64
push r15
push r14
push r13
mov r13, rsi
push r12
push rbp
movsxd rbp, edx
push rbx
mov rbx, rdi
sub rsp, 218h
mov rax, fs:28h
mov [rsp+248h+var_40], rax
xor eax, eax
lea rax, [rsp+248h+var_150]
lea ... | long long func0(long long a1, long long a2, int a3)
{
long long v3; // rbp
char *v5; // r12
_BYTE *v6; // r13
_QWORD *v7; // rax
char *v8; // r13
_QWORD *i; // rax
long long v10; // rdx
char *v11; // rcx
char *v12; // r12
long long v13; // rbp
long long v14; // rcx
_QWORD *v15; // rdi
void **... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
MOV R13,RSI
PUSH R12
PUSH RBP
MOVSXD RBP,EDX
PUSH RBX
MOV RBX,RDI
SUB RSP,0x218
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x208],RAX
XOR EAX,EAX
LEA RAX,[RSP + 0xf8]
LEA R15,[RSP + 0x80]
MOV RDI,RAX
MOV qword ptr [RSP + 0x20],RAX
CALL 0x001021c0
LEA RAX,[0x105b70]
XOR ED... | /* func0(std::string const&, int) */
string * func0(string *param_1,int param_2)
{
int *__src;
istream *piVar1;
long lVar2;
int8 uVar3;
long lVar4;
int in_EDX;
ulong uVar5;
ulong *puVar6;
int4 in_register_00000034;
ulong *puVar7;
ulong *puVar8;
long in_FS_OFFSET;
ulong *local_230;
int loca... |
3,087 | func0 |
#include <iostream>
#include <string>
#include <sstream>
#include <vector>
#include <assert.h>
| std::string func0(const std::string& test_str, int K) {
std::istringstream iss(test_str);
std::string word;
std::vector<std::string> res;
while (iss >> word) {
if (word.length() != K) {
res.push_back(word);
}
}
std::string result;
for (size_t... | int main() {
assert(func0("The person is most value tet", 3) == "person is most value");
assert(func0("If you told me about this ok", 4) == "If you me about ok");
assert(func0("Forces of darkeness is come into the play", 4) == "Forces of darkeness is the");
return 0;
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int):
endbr64
push %r15
push %r14
mov %rsi,%r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
movslq %edx,%rbx
sub $0x218,%rsp
mov %fs:0x28,%rax
mov %rax,0x208(%rsp)
xor %eax,%eax
lea 0... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi:
endbr64
push r15
push r14
push r13
mov r13, rsi
push r12
movsxd r12, edx
push rbp
push rbx
mov rbx, rdi
sub rsp, 228h
mov rax, fs:28h
mov [rsp+258h+var_40], rax
xor eax, eax
lea rax, [rsp+258h+var_150]
lea ... | long long func0(long long a1, long long a2, int a3)
{
long long v3; // r12
char *v5; // rbp
_BYTE *v6; // r13
_QWORD *v7; // rax
long long *v8; // r14
_QWORD *i; // rax
size_t v10; // rbp
long long *v11; // rcx
long long *v12; // r12
long long v13; // rbp
long long v14; // rcx
_QWORD *v15; // r... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
MOV R13,RSI
PUSH R12
MOVSXD R12,EDX
PUSH RBP
PUSH RBX
MOV RBX,RDI
SUB RSP,0x228
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x218],RAX
XOR EAX,EAX
LEA RAX,[RSP + 0x108]
LEA R15,[RSP + 0x90]
MOV RDI,RAX
MOV qword ptr [RSP + 0x20],RAX
CALL 0x001021c0
LEA RAX,[0x105b70]
XOR E... | /* func0(std::string const&, int) */
string * func0(string *param_1,int param_2)
{
int *puVar1;
istream *piVar2;
long lVar3;
ulong *puVar4;
int8 uVar5;
long lVar6;
int in_EDX;
ulong uVar7;
ulong *puVar8;
int4 in_register_00000034;
ulong *puVar9;
long in_FS_OFFSET;
ulong *local_240;
ulong l... |
3,088 | func0 |
#include <iostream>
#include <string>
#include <regex>
#include <cassert>
| std::tuple<std::string, int, int> func0(const std::string& text, const std::string& pattern) {
std::regex reg(pattern);
std::smatch match;
if (std::regex_search(text.begin(), text.end(), match, reg)) {
return std::make_tuple(match.str(0), match.position(0), match.position(0) + match.length(0))... | int main() {
assert(func0("python programming, python language", "python") == std::make_tuple("python", 0, 6));
assert(func0("python programming,programming language", "programming") == std::make_tuple("programming", 7, 18));
assert(func0("python programming,programming language", "language") == std::mak... | O0 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0xe8,%rsp
mov %rdi,-0xd8(%rbp)
mov %rsi,-0xe0(%rbp)
mov %rdx,-0xe8(%rbp... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 0E8h
mov [rbp+var_D8], rdi
mov [rbp+var_E0], rsi
mov [rbp+var_E8], rdx
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rcx, [rbp+var_E8]
lea rax, [rbp+v... | long long func0(long long a1, long long a2, long long a3)
{
long long v3; // rbx
long long v4; // rax
long long v5; // rbx
int v7; // [rsp+24h] [rbp-CCh] BYREF
long long v8; // [rsp+28h] [rbp-C8h] BYREF
_QWORD v9[2]; // [rsp+30h] [rbp-C0h] BYREF
_BYTE v10[32]; // [rsp+40h] [rbp-B0h] BYREF
_BYTE v11[32]... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0xe8
MOV qword ptr [RBP + -0xd8],RDI
MOV qword ptr [RBP + -0xe0],RSI
MOV qword ptr [RBP + -0xe8],RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RCX,qword ptr [RBP + -0xe8]
LEA RAX,[RBP + -0xb0]
MOV EDX,0x10
MOV RSI,RCX
MOV RDI,RAX
LAB... | /* func0(std::string const&, std::string const&) */
string * func0(string *param_1,string *param_2)
{
bool bVar1;
__normal_iterator _Var2;
__normal_iterator _Var3;
long lVar4;
string *in_RDX;
long in_FS_OFFSET;
int local_d4;
long local_d0;
long local_c8 [2];
regex local_b8 [32];
match_results<__... |
3,089 | func0 |
#include <iostream>
#include <string>
#include <regex>
#include <cassert>
| std::tuple<std::string, int, int> func0(const std::string& text, const std::string& pattern) {
std::regex reg(pattern);
std::smatch match;
if (std::regex_search(text.begin(), text.end(), match, reg)) {
return std::make_tuple(match.str(0), match.position(0), match.position(0) + match.length(0))... | int main() {
assert(func0("python programming, python language", "python") == std::make_tuple("python", 0, 6));
assert(func0("python programming,programming language", "programming") == std::make_tuple("programming", 7, 18));
assert(func0("python programming,programming language", "language") == std::mak... | O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x210,%rsp
mov %rdi,%rbx
mov %rsi,%rbp
mov %fs:0x28,... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_:
endbr64
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 218h
mov rbx, rdi
mov r14, rsi
mov r12, rdx
mov rax, fs:28h
mov [rbp+var_38], rax
xor eax, eax
lea r13, [rbp+var_22... | long long func0(long long a1, long long a2, _QWORD *a3)
{
long long v6; // rsi
long long v7; // rdx
long long v8; // rax
long long v9; // rdi
_DWORD *v10; // r12
volatile signed __int32 *v11; // rcx
long long v12; // rdx
signed __int32 v13; // eax
char *v15; // rax
long long v16; // rcx
long long... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x218
MOV RBX,RDI
MOV R14,RSI
MOV R12,RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x38],RAX
XOR EAX,EAX
LEA R13,[RBP + -0x228]
MOV RDI,R13
CALL 0x001046f0
MOV qword ptr [RBP + -0x220],0x0
MOV qword ptr [RBP + -0x218],0x0
... | /* func0(std::string const&, std::string const&) */
string * func0(string *param_1,string *param_2)
{
ulong uVar1;
_Sp_counted_base<(_Lock_policy)2> *p_Var2;
int *__src;
_Sp_counted_base<(_Lock_policy)2> *p_Var3;
bool bVar4;
int iVar5;
uint uVar6;
long *plVar7;
ulong *puVar8;
uint uVar9;
string ... |
3,090 | func0 |
#include <iostream>
#include <string>
#include <regex>
#include <cassert>
| std::tuple<std::string, int, int> func0(const std::string& text, const std::string& pattern) {
std::regex reg(pattern);
std::smatch match;
if (std::regex_search(text.begin(), text.end(), match, reg)) {
return std::make_tuple(match.str(0), match.position(0), match.position(0) + match.length(0))... | int main() {
assert(func0("python programming, python language", "python") == std::make_tuple("python", 0, 6));
assert(func0("python programming,programming language", "programming") == std::make_tuple("programming", 7, 18));
assert(func0("python programming,programming language", "language") == std::mak... | O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
mov %rsi,%rbx
sub $0x228,%rsp
mov ... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_:
endbr64
push rbp
mov rbp, rsp
push r15
push r14
lea r15, [rbp+var_228]
push r13
mov r13, rdx
push r12
mov r12, rsi
push rbx
mov rbx, rdi
mov rdi, r15; this
sub rsp, 238h
mov rax, fs:28h
mov [rbp+var_... | long long func0(long long a1, long long *a2, long long *a3)
{
long long v6; // rsi
long long v7; // rdx
__m128i v8; // xmm0
volatile signed __int32 *v9; // r13
long long v10; // rdx
volatile signed __int32 *v11; // rcx
signed __int32 v12; // eax
long long v13; // r13
long long v14; // rdx
volatile ... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
LEA R15,[RBP + -0x228]
PUSH R13
MOV R13,RDX
PUSH R12
MOV R12,RSI
PUSH RBX
MOV RBX,RDI
MOV RDI,R15
SUB RSP,0x238
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x38],RAX
XOR EAX,EAX
MOV qword ptr [RBP + -0x248],R15
CALL 0x001036d0
MOV RSI,qword ptr [R13]
MOV RDX,q... | /* func0(std::string const&, std::string const&) */
string * func0(string *param_1,string *param_2)
{
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
int *__src;
int8 uVar2;
bool bVar3;
int iVar4;
uint uVar5;
long *plVar6;
string *psVar7;
ulong uVar8;
ulong uVar9;
ulong uVar10;
ulong *puVar11;
in... |
3,091 | func0 |
#include <iostream>
#include <string>
#include <regex>
#include <cassert>
| std::tuple<std::string, int, int> func0(const std::string& text, const std::string& pattern) {
std::regex reg(pattern);
std::smatch match;
if (std::regex_search(text.begin(), text.end(), match, reg)) {
return std::make_tuple(match.str(0), match.position(0), match.position(0) + match.length(0))... | int main() {
assert(func0("python programming, python language", "python") == std::make_tuple("python", 0, 6));
assert(func0("python programming,programming language", "programming") == std::make_tuple("programming", 7, 18));
assert(func0("python programming,programming language", "language") == std::mak... | O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r15
push %r14
mov %rsi,%r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x228,%rsp
mov ... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_:
endbr64
push rbp
mov rbp, rsp
push r15
push r14
lea r15, [rbp+var_228]
mov r14, rsi
push r13
push r12
mov r12, rdx
push rbx
mov rbx, rdi
mov rdi, r15; this
sub rsp, 238h
mov rax, fs:28h
mov [rbp+var_... | long long func0(long long a1, long long *a2, long long *a3)
{
long long v6; // rsi
long long v7; // rdx
__m128i v8; // xmm0
long long v9; // rdi
void *v10; // rdi
void **v11; // r12
unsigned long long v12; // r13
void *v13; // rdi
long long v14; // rdi
long long v15; // rsi
long long v16; // rax
... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
LEA R15,[RBP + -0x228]
MOV R14,RSI
PUSH R13
PUSH R12
MOV R12,RDX
PUSH RBX
MOV RBX,RDI
MOV RDI,R15
SUB RSP,0x238
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x38],RAX
XOR EAX,EAX
MOV qword ptr [RBP + -0x250],R15
CALL 0x00104710
MOV RSI,qword ptr [R12]
PXOR XMM0... | /* func0(std::string const&, std::string const&) */
string * func0(string *param_1,string *param_2)
{
int *__src;
int8 this;
int auVar1 [16];
bool bVar2;
long *plVar3;
ulong __n;
int8 *in_RDX;
long lVar4;
long lVar5;
int8 *puVar6;
long lVar7;
long lVar8;
long in_FS_OFFSET;
string *local_25... |
3,092 | func0 |
#include <iostream>
#include <regex>
#include <cassert>
#include <string>
using namespace std;
| string func0(const string& email) {
string regex_pattern = "^[a-z0-9]+[\\._]?[a-z0-9]+[@]\\w+[.]\\w{2,3}$";
regex rx(regex_pattern);
if (regex_search(email, rx)) {
return "Valid Email";
} else {
return "Invalid Email";
}
}
| int main() {
assert(func0("ankitrai326@gmail.com") == "Valid Email");
assert(func0("my.ownsite@ourearth.org") == "Valid Email");
assert(func0("ankitaoie326.com") == "Invalid Email");
return 0;
}
| O0 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x78,%rsp
mov %rdi,-0x78(%rbp)
mov %rsi,-0x80(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
lea -0x60(%rbp),%rax
mov %rax,%rdi
callq ... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 88h
mov [rbp+var_88], rdi
mov [rbp+var_90], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_60]
mov [rbp+var_78], rax
nop
nop
lea rdx, [r... | long long func0(long long a1, long long a2)
{
char v3; // [rsp+17h] [rbp-79h] BYREF
_BYTE *v4; // [rsp+18h] [rbp-78h]
char *v5; // [rsp+20h] [rbp-70h]
char *v6; // [rsp+28h] [rbp-68h]
_BYTE v7[32]; // [rsp+30h] [rbp-60h] BYREF
_BYTE v8[40]; // [rsp+50h] [rbp-40h] BYREF
unsigned long long v9; // [rsp+78h]... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x88
MOV qword ptr [RBP + -0x88],RDI
MOV qword ptr [RBP + -0x90],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x60]
MOV qword ptr [RBP + -0x78],RAX
NOP
NOP
LEA RDX,[RBP + -0x60]
LEA RAX,[RBP + -0x40]
LEA RCX,[0x132058]
M... | /* func0(std::string const&) */
string * func0(string *param_1)
{
bool bVar1;
string *in_RSI;
long in_FS_OFFSET;
allocator local_81;
allocator *local_80;
allocator *local_78;
allocator *local_70;
allocator local_68 [32];
string local_48 [40];
long local_20;
local_20 = *(long *)(in_FS_OFFSET +... |
3,093 | func0 |
#include <iostream>
#include <regex>
#include <cassert>
#include <string>
using namespace std;
| string func0(const string& email) {
string regex_pattern = "^[a-z0-9]+[\\._]?[a-z0-9]+[@]\\w+[.]\\w{2,3}$";
regex rx(regex_pattern);
if (regex_search(email, rx)) {
return "Valid Email";
} else {
return "Invalid Email";
}
}
| int main() {
assert(func0("ankitrai326@gmail.com") == "Valid Email");
assert(func0("my.ownsite@ourearth.org") == "Valid Email");
assert(func0("ankitaoie326.com") == "Invalid Email");
return 0;
}
| O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x200,%rsp
mov %rdi,%rbx
mov %rsi,%rbp
mov %fs:0x28,%rax
mov %rax,0x1f8(%rsp)
xor %eax,%eax
lea 0x40(%rsp),%rdi
lea 0x50(%rsp),%... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r14
push r12
push rbx
sub rsp, 208h
mov rbx, rdi
mov r14, rsi
mov rax, fs:28h
mov [rbp+var_28], rax
xor eax, eax
lea rdi, [rbp+var_1E0]
lea rax, [rbp+var_1D0]
mov [rbp+v... | _QWORD * func0(_QWORD *a1, long long *a2)
{
long long v3; // rdx
long long v4; // rax
long long v5; // rdi
long long v6; // rdi
long long v7; // rsi
char v8; // r12
int v10; // [rsp+0h] [rbp-220h] BYREF
_BYTE v11[8]; // [rsp+8h] [rbp-218h] BYREF
long long v12; // [rsp+10h] [rbp-210h]
long long v13; ... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x208
MOV RBX,RDI
MOV R14,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
XOR EAX,EAX
LEA RDI,[RBP + -0x1e0]
LEA RAX,[RBP + -0x1d0]
MOV qword ptr [RBP + -0x1e0],RAX
LEA RDX,[0x118492]
LEA RSI,[RDX + -0x2a]
LAB_00104832:
CALL 0x00105b... | /* 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 *in_RSI;
long in_FS_OFFSET;
int4 local_228 [2];
locale local_220 [2];
int8 local_218;
_Sp_counted_base<(_Lock_policy)2> *local_210;
... |
3,094 | func0 |
#include <iostream>
#include <regex>
#include <cassert>
#include <string>
using namespace std;
| string func0(const string& email) {
string regex_pattern = "^[a-z0-9]+[\\._]?[a-z0-9]+[@]\\w+[.]\\w{2,3}$";
regex rx(regex_pattern);
if (regex_search(email, rx)) {
return "Valid Email";
} else {
return "Invalid Email";
}
}
| int main() {
assert(func0("ankitrai326@gmail.com") == "Valid Email");
assert(func0("my.ownsite@ourearth.org") == "Valid Email");
assert(func0("ankitaoie326.com") == "Invalid Email");
return 0;
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r15
lea 0x15b75(%rip),%rdx
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
mov %rsi,%rbx
lea -0x2a(%rdx),%rsi
sub $0x218,%rsp
mov %fs:0x28,%rax
mov %rax,0x208(%rs... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
xor edx, edx
mov rbp, rsp
push r15
push r14
lea r14, [rbp+var_1F0]
lea r15, [rbp+var_228]
push r13
lea r13, [rbp+var_1E0]
push r12
lea r12, [rbp+var_210]
push rbx
mov rbx, rdi
mov rdi, r14
... | long long func0(long long a1, long long *a2)
{
__m128i *v3; // rax
_BYTE *v4; // rdx
void *v5; // rsi
__m128i v6; // xmm0
volatile signed __int32 *v7; // rdi
long long v8; // rdx
volatile signed __int32 *v9; // rcx
signed __int32 v10; // eax
long long v11; // rdi
long long v12; // rdx
volatile si... | func0:
ENDBR64
PUSH RBP
XOR EDX,EDX
MOV RBP,RSP
PUSH R15
PUSH R14
LEA R14,[RBP + -0x1f0]
LEA R15,[RBP + -0x228]
PUSH R13
LEA R13,[RBP + -0x1e0]
PUSH R12
LEA R12,[RBP + -0x210]
PUSH RBX
MOV RBX,RDI
MOV RDI,R14
SUB RSP,0x218
MOV qword ptr [RBP + -0x238],RSI
MOV RSI,R12
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(std::string const&) */
string * func0(string *param_1)
{
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
long lVar2;
int8 uVar3;
int8 uVar4;
bool bVar5;
int iVar6;
int8 *in_RSI;
long in_FS_OFFSET;
int4 local_238... |
3,095 | func0 |
#include <iostream>
#include <regex>
#include <cassert>
#include <string>
using namespace std;
| string func0(const string& email) {
string regex_pattern = "^[a-z0-9]+[\\._]?[a-z0-9]+[@]\\w+[.]\\w{2,3}$";
regex rx(regex_pattern);
if (regex_search(email, rx)) {
return "Valid Email";
} else {
return "Invalid Email";
}
}
| int main() {
assert(func0("ankitrai326@gmail.com") == "Valid Email");
assert(func0("my.ownsite@ourearth.org") == "Valid Email");
assert(func0("ankitaoie326.com") == "Invalid Email");
return 0;
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r15
xor %edx,%edx
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
mov %rsi,%rbx
sub $0x218,%rsp
mov %fs:0x28,%rax
mov %rax,0x208(%rsp)
xor %eax,%eax
lea 0x30(%... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
xor edx, edx
mov rbp, rsp
push r15
push r14
lea r14, [rbp+var_210]
push r13
lea r13, [rbp+var_228]
push r12
mov r12, rsi
mov rsi, r14
push rbx
mov rbx, rdi
lea rdi, [rbp+var_1F0]
sub rs... | long long func0(long long a1, long long *a2)
{
long long v3; // rax
long long *v4; // rdx
__m128i v5; // xmm0
long long v6; // rdi
void *v7; // rdi
void **v8; // r15
void *v9; // rdi
long long v10; // rdi
long long v11; // rsi
long long v12; // rsi
char v13; // r15
unsigned long long v15; // [r... | func0:
ENDBR64
PUSH RBP
XOR EDX,EDX
MOV RBP,RSP
PUSH R15
PUSH R14
LEA R14,[RBP + -0x210]
PUSH R13
LEA R13,[RBP + -0x228]
PUSH R12
MOV R12,RSI
MOV RSI,R14
PUSH RBX
MOV RBX,RDI
LEA RDI,[RBP + -0x1f0]
SUB RSP,0x218
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x38],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x1e0]
MOV qword ptr... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(std::string const&) */
string * func0(string *param_1)
{
long lVar1;
int8 uVar2;
int auVar3 [16];
bool bVar4;
int8 *in_RSI;
int8 *puVar5;
long in_FS_OFFSET;
int4 local_238 [2];
locale local_230 [2];
int l... |
3,096 | func0 |
#include <vector>
#include <cassert>
| bool func0(const std::vector<int>& nums) {
for (size_t i = 0; i < nums.size(); ++i) {
if (nums[i] % 2 != i % 2) {
return false;
}
}
return true;
}
| int main() {
assert(func0({2,1,4,3,6,7,6,3}) == true);
assert(func0({4,1,2}) == true);
assert(func0({1,2,3}) == false);
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x20,%rsp
mov %rdi,-0x18(%rbp)
movq $0x0,-0x8(%rbp)
mov -0x18(%rbp),%rax
mov %rax,%rdi
callq 157a <_ZNKSt6vectorIiSaIiEE4sizeEv>
cmp %rax,-0x8(%rbp)
setb %al
test %al,%al
je 1299 <_Z5func0RKSt6vecto... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_18], rdi
mov [rbp+var_8], 0
jmp short loc_12A9
loc_1263:
mov rdx, [rbp+var_8]
mov rax, [rbp+var_18]
mov rsi, rdx
mov rdi, rax
call _ZNKSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong)... | long long func0(long long a1)
{
unsigned long long i; // rax
unsigned long long v3; // [rsp+18h] [rbp-8h]
v3 = 0LL;
for ( i = std::vector<int>::size(a1); v3 < i; i = std::vector<int>::size(a1) )
{
if ( *(_DWORD *)std::vector<int>::operator[](a1, v3) % 2 != (v3 & 1) )
return 0LL;
++v3;
}
re... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x18],RDI
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001012a9
LAB_00101263:
MOV RDX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,RDX
MOV RDI,RAX
CALL 0x0010160e
MOV EDX,dword ptr [RAX]
MOV EAX,EDX
SAR EAX,0x1f
SHR EAX,0x1f
ADD EDX,EAX
AN... | /* func0(std::vector<int, std::allocator<int> > const&) */
int8 func0(vector *param_1)
{
int *piVar1;
ulong uVar2;
ulong local_10;
local_10 = 0;
while( true ) {
uVar2 = std::vector<int,std::allocator<int>>::size((vector<int,std::allocator<int>> *)param_1);
if (uVar2 <= local_10) {
return 1;... |
3,097 | func0 |
#include <vector>
#include <cassert>
| bool func0(const std::vector<int>& nums) {
for (size_t i = 0; i < nums.size(); ++i) {
if (nums[i] % 2 != i % 2) {
return false;
}
}
return true;
}
| int main() {
assert(func0({2,1,4,3,6,7,6,3}) == true);
assert(func0({4,1,2}) == true);
assert(func0({1,2,3}) == false);
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
mov (%rdi),%rsi
mov 0x8(%rdi),%rax
sub %rsi,%rax
sar $0x2,%rax
mov %rax,%rdi
je 1250 <_Z5func0RKSt6vectorIiSaIiEE+0x47>
mov $0x0,%edx
mov (%rsi,%rdx,4),%eax
mov %eax,%ecx
shr $0x1f,%ecx
add %ecx,%eax
and $0x1,%eax
sub ... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
mov rax, [rdi+8]
mov rsi, [rdi]
mov rdi, rax
sub rdi, rsi
sar rdi, 2
cmp rax, rsi
jz short loc_1253
mov edx, 0
loc_1228:
mov eax, [rsi+rdx*4]
mov ecx, eax
shr ecx, 1Fh
add eax, ecx
and eax, 1
sub eax, ecx
cdqe
mov rcx, rdx... | long long func0(long long *a1)
{
long long v1; // rax
long long v2; // rsi
unsigned long long v3; // rdi
long long v4; // rdx
v1 = a1[1];
v2 = *a1;
v3 = (v1 - *a1) >> 2;
if ( v1 == v2 )
return 1LL;
v4 = 0LL;
while ( *(_DWORD *)(v2 + 4 * v4) % 2 == (unsigned long long)(v4 & 1) )
{
if ( ++... | func0:
ENDBR64
MOV RAX,qword ptr [RDI + 0x8]
MOV RSI,qword ptr [RDI]
MOV RDI,RAX
SUB RDI,RSI
SAR RDI,0x2
CMP RAX,RSI
JZ 0x00101253
MOV EDX,0x0
LAB_00101228:
MOV EAX,dword ptr [RSI + RDX*0x4]
MOV ECX,EAX
SHR ECX,0x1f
ADD EAX,ECX
AND EAX,0x1
SUB EAX,ECX
CDQE
MOV RCX,RDX
AND ECX,0x1
CMP RAX,RCX
JNZ 0x00101259
ADD RDX,0x1
... | /* func0(std::vector<int, std::allocator<int> > const&) */
int8 func0(vector *param_1)
{
long lVar1;
ulong uVar2;
lVar1 = *(long *)param_1;
if (*(long *)(param_1 + 8) == lVar1) {
return 1;
}
uVar2 = 0;
do {
if ((long)(*(int *)(lVar1 + uVar2 * 4) % 2) != (ulong)((uint)uVar2 & 1)) {
retur... |
3,098 | func0 |
#include <vector>
#include <cassert>
| bool func0(const std::vector<int>& nums) {
for (size_t i = 0; i < nums.size(); ++i) {
if (nums[i] % 2 != i % 2) {
return false;
}
}
return true;
}
| int main() {
assert(func0({2,1,4,3,6,7,6,3}) == true);
assert(func0({4,1,2}) == true);
assert(func0({1,2,3}) == false);
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
mov (%rdi),%r8
mov 0x8(%rdi),%rsi
sub %r8,%rsi
sar $0x2,%rsi
je 14b0 <_Z5func0RKSt6vectorIiSaIiEE+0x50>
xor %edx,%edx
jmp 1489 <_Z5func0RKSt6vectorIiSaIiEE+0x29>
nopl 0x0(%rax,%rax,1)
add $0x1,%rdx
cmp %rsi,%rdx
je 14b0 <_Z5... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
mov rax, [rdi+8]
mov rsi, [rdi]
mov rdi, rax
sub rdi, rsi
sar rdi, 2
cmp rax, rsi
jz short loc_13D0
xor edx, edx
jmp short loc_13A9
loc_13A0:
add rdx, 1
cmp rdx, rdi
jnb short loc_13D0
loc_13A9:
mov eax, [rsi+rdx*4]
mov ecx, e... | long long func0(long long *a1)
{
long long v1; // rax
long long v2; // rsi
unsigned long long v3; // rdi
long long v4; // rdx
v1 = a1[1];
v2 = *a1;
v3 = (v1 - *a1) >> 2;
if ( v1 == v2 )
return 1LL;
v4 = 0LL;
while ( *(_DWORD *)(v2 + 4 * v4) % 2 == (unsigned long long)(v4 & 1) )
{
if ( ++... | func0:
ENDBR64
MOV RAX,qword ptr [RDI + 0x8]
MOV RSI,qword ptr [RDI]
MOV RDI,RAX
SUB RDI,RSI
SAR RDI,0x2
CMP RAX,RSI
JZ 0x001013d0
XOR EDX,EDX
JMP 0x001013a9
LAB_001013a0:
ADD RDX,0x1
CMP RDX,RDI
JNC 0x001013d0
LAB_001013a9:
MOV EAX,dword ptr [RSI + RDX*0x4]
MOV ECX,EAX
SHR ECX,0x1f
ADD EAX,ECX
AND EAX,0x1
SUB EAX,ECX
... | /* func0(std::vector<int, std::allocator<int> > const&) */
int8 func0(vector *param_1)
{
long lVar1;
ulong uVar2;
lVar1 = *(long *)param_1;
if (*(long *)(param_1 + 8) != lVar1) {
uVar2 = 0;
do {
if ((long)(*(int *)(lVar1 + uVar2 * 4) % 2) != (ulong)((uint)uVar2 & 1)) {
return 0;
... |
3,099 | func0 |
#include <vector>
#include <cassert>
| bool func0(const std::vector<int>& nums) {
for (size_t i = 0; i < nums.size(); ++i) {
if (nums[i] % 2 != i % 2) {
return false;
}
}
return true;
}
| int main() {
assert(func0({2,1,4,3,6,7,6,3}) == true);
assert(func0({4,1,2}) == true);
assert(func0({1,2,3}) == false);
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
mov (%rdi),%r8
mov 0x8(%rdi),%rsi
sub %r8,%rsi
sar $0x2,%rsi
je 1490 <_Z5func0RKSt6vectorIiSaIiEE+0x50>
xor %edx,%edx
jmp 1469 <_Z5func0RKSt6vectorIiSaIiEE+0x29>
nopl 0x0(%rax,%rax,1)
add $0x1,%rdx
cmp %rsi,%rdx
je 1490 <_Z5... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
mov rax, [rdi+8]
mov rsi, [rdi]
mov rdi, rax
sub rdi, rsi
sar rdi, 2
cmp rax, rsi
jz short loc_1480
xor edx, edx
jmp short loc_1459
loc_1450:
add rdx, 1
cmp rdx, rdi
jnb short loc_1480
loc_1459:
mov eax, [rsi+rdx*4]
mov ecx, e... | long long func0(long long *a1)
{
long long v1; // rax
long long v2; // rsi
unsigned long long v3; // rdi
long long v4; // rdx
v1 = a1[1];
v2 = *a1;
v3 = (v1 - *a1) >> 2;
if ( v1 == v2 )
return 1LL;
v4 = 0LL;
while ( *(_DWORD *)(v2 + 4 * v4) % 2 == (unsigned long long)(v4 & 1) )
{
if ( ++... | func0:
ENDBR64
MOV RAX,qword ptr [RDI + 0x8]
MOV RSI,qword ptr [RDI]
MOV RDI,RAX
SUB RDI,RSI
SAR RDI,0x2
CMP RAX,RSI
JZ 0x00101480
XOR EDX,EDX
JMP 0x00101459
LAB_00101450:
ADD RDX,0x1
CMP RDX,RDI
JNC 0x00101480
LAB_00101459:
MOV EAX,dword ptr [RSI + RDX*0x4]
MOV ECX,EAX
SHR ECX,0x1f
ADD EAX,ECX
AND EAX,0x1
SUB EAX,ECX
... | /* func0(std::vector<int, std::allocator<int> > const&) */
int8 func0(vector *param_1)
{
long lVar1;
ulong uVar2;
lVar1 = *(long *)param_1;
if (*(long *)(param_1 + 8) != lVar1) {
uVar2 = 0;
do {
if ((long)(*(int *)(lVar1 + uVar2 * 4) % 2) != (ulong)((uint)uVar2 & 1)) {
return 0;
... |
3,100 | func0 |
#include <iostream>
#include <string>
#include <assert.h>
| int func0(const std::string& test_str) {
int res = 0;
std::string vow_list = "aeiou";
for (int idx = 1; idx < test_str.length() - 1; ++idx) {
bool current_not_vowel = vow_list.find(test_str[idx]) == std::string::npos;
bool prev_is_vowel = vow_list.find(test_str[idx - 1]) != std::string:... | int main() {
assert(func0("bestinstareels") == 7);
assert(func0("partofthejourneyistheend") == 12);
assert(func0("amazonprime") == 5);
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 $0x68,%rsp
mov %rdi,-0x68(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
movl $0x0,-0x50(%rbp)
lea -0x54(%rbp),%rax
mov %rax,%rdi
callq ... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 68h
mov [rbp+var_68], rdi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov [rbp+var_58], 0
lea rax, [rbp+var_5C]
mov [rbp+var_48], rax
nop
nop
lea rdx, [rbp... | long long func0(long long a1)
{
char *v1; // rax
char *v2; // rax
char *v3; // rax
unsigned long long v4; // rbx
unsigned int v7; // ebx
char v9; // [rsp+14h] [rbp-5Ch] BYREF
bool v10; // [rsp+15h] [rbp-5Bh]
bool v11; // [rsp+16h] [rbp-5Ah]
bool v12; // [rsp+17h] [rbp-59h]
unsigned int v13; // [rsp... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x68
MOV qword ptr [RBP + -0x68],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV dword ptr [RBP + -0x58],0x0
LEA RAX,[RBP + -0x5c]
MOV qword ptr [RBP + -0x48],RAX
NOP
NOP
LEA RDX,[RBP + -0x5c]
LEA RAX,[RBP + -0x40]
LEA RCX,[0x102008]
M... | /* func0(std::string const&) */
int func0(string *param_1)
{
bool bVar1;
int iVar2;
long lVar3;
char *pcVar4;
ulong uVar5;
long in_FS_OFFSET;
allocator local_64;
char local_63;
char local_62;
int local_61;
int local_60;
int local_5c;
long local_58;
allocator *local_50;
string local_48 [4... |
3,101 | func0 |
#include <iostream>
#include <string>
#include <assert.h>
| int func0(const std::string& test_str) {
int res = 0;
std::string vow_list = "aeiou";
for (int idx = 1; idx < test_str.length() - 1; ++idx) {
bool current_not_vowel = vow_list.find(test_str[idx]) == std::string::npos;
bool prev_is_vowel = vow_list.find(test_str[idx - 1]) != std::string:... | int main() {
assert(func0("bestinstareels") == 7);
assert(func0("partofthejourneyistheend") == 12);
assert(func0("amazonprime") == 5);
return 0;
}
| O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x38,%rsp
mov %rdi,%rbp
mov %fs:0x28,%rax
mov %rax,0x28(%rsp)
xor %eax,%eax
mov %rsp,%rdi
lea 0x10(%rsp),%rax
mov %r... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 38h
mov rbp, rdi
mov rax, fs:28h
mov [rsp+68h+var_40], rax
xor eax, eax
mov rdi, rsp
lea rax, [rsp+68h+var_58]
mov [rsp+68h+var_68], ra... | long long func0(unsigned __int8 **a1)
{
unsigned __int8 *v2; // rdx
unsigned __int8 *v3; // rax
unsigned int v4; // r15d
unsigned long long v5; // rbx
long long v6; // r13
long long v7; // r12
long long v8; // rax
long long v9; // rsi
long long v10; // rdi
unsigned long long v11; // rax
long long... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x38
MOV RBP,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x28],RAX
XOR EAX,EAX
MOV RDI,RSP
LEA RAX,[RSP + 0x10]
MOV qword ptr [RSP],RAX
LEA RDX,[0x10208d]
LEA RSI,[RDX + -0x5]
CALL 0x0010159e
MOV RDX,qword ptr [RBP + 0x8]
LEA RAX,[RDX... | /* func0(std::string const&) */
int func0(string *param_1)
{
byte *pbVar1;
long lVar2;
ulong uVar3;
ulong uVar4;
ulong uVar5;
char cVar6;
int iVar7;
long in_FS_OFFSET;
long *local_68 [2];
long local_58 [3];
long local_40;
local_40 = *(long *)(in_FS_OFFSET + 0x28);
local_68[0] = local_58;
... |
3,102 | func0 |
#include <iostream>
#include <string>
#include <assert.h>
| int func0(const std::string& test_str) {
int res = 0;
std::string vow_list = "aeiou";
for (int idx = 1; idx < test_str.length() - 1; ++idx) {
bool current_not_vowel = vow_list.find(test_str[idx]) == std::string::npos;
bool prev_is_vowel = vow_list.find(test_str[idx - 1]) != std::string:... | int main() {
assert(func0("bestinstareels") == 7);
assert(func0("partofthejourneyistheend") == 12);
assert(func0("amazonprime") == 5);
return 0;
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r15
mov %rdi,%r15
push %r14
xor %r14d,%r14d
push %r13
push %r12
push %rbp
push %rbx
sub $0x48,%rsp
mov 0x8(%rdi),%rdx
mov %fs:0x28,%rax
mov %rax,0x38(%rsp)
xor %eax,%eax
lea 0... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
mov r15, rdi
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 48h
mov rdx, [rdi+8]
mov rax, fs:28h
mov [rsp+78h+var_40], rax
xor eax, eax
lea rax, [rsp+78h+var_58]
mov dword ptr [rsp+7... | long long func0(unsigned __int8 **a1)
{
unsigned __int8 *v2; // rdx
unsigned __int8 *v3; // rax
unsigned int v4; // r14d
unsigned long long v5; // rbx
long long v6; // r12
long long v7; // rsi
long long v8; // rbp
long long v9; // rax
_QWORD *v10; // rdi
long long v11; // rsi
long long v12; // r8... | func0:
ENDBR64
PUSH R15
MOV R15,RDI
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x48
MOV RDX,qword ptr [RDI + 0x8]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
LEA RAX,[RSP + 0x20]
MOV dword ptr [RSP + 0x20],0x6f696561
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x10],RAX
LEA R... | /* func0(std::string const&) */
int func0(string *param_1)
{
char *pcVar1;
byte *pbVar2;
long lVar3;
ulong uVar4;
ulong uVar5;
ulong uVar6;
char cVar7;
int iVar8;
long in_FS_OFFSET;
int4 *local_68;
int8 local_60;
int4 local_58;
int uStack_54;
int uStack_53;
int2 uStack_52;
long local_4... |
3,103 | func0 |
#include <iostream>
#include <string>
#include <assert.h>
| int func0(const std::string& test_str) {
int res = 0;
std::string vow_list = "aeiou";
for (int idx = 1; idx < test_str.length() - 1; ++idx) {
bool current_not_vowel = vow_list.find(test_str[idx]) == std::string::npos;
bool prev_is_vowel = vow_list.find(test_str[idx - 1]) != std::string:... | int main() {
assert(func0("bestinstareels") == 7);
assert(func0("partofthejourneyistheend") == 12);
assert(func0("amazonprime") == 5);
return 0;
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r15
mov %rdi,%r15
push %r14
xor %r14d,%r14d
push %r13
push %r12
push %rbp
push %rbx
sub $0x48,%rsp
mov 0x8(%rdi),%rdx
mov %fs:0x28,%rax
mov %rax,0x38(%rsp)
xor %eax,%eax
lea 0... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
mov r15, rdi
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 48h
mov rdx, [rdi+8]
mov rax, fs:28h
mov [rsp+78h+var_40], rax
xor eax, eax
lea rax, [rsp+78h+var_58]
mov dword ptr [rsp+7... | long long func0(unsigned __int8 **a1)
{
unsigned __int8 *v2; // rdx
unsigned __int8 *v3; // rax
unsigned int v4; // r14d
unsigned long long v5; // rbx
long long v6; // r12
long long v7; // rsi
long long v8; // rbp
long long v9; // rax
_QWORD *v10; // rdi
long long v11; // rsi
long long v12; // r8... | func0:
ENDBR64
PUSH R15
MOV R15,RDI
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x48
MOV RDX,qword ptr [RDI + 0x8]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
LEA RAX,[RSP + 0x20]
MOV dword ptr [RSP + 0x20],0x6f696561
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x10],RAX
LEA R... | /* func0(std::string const&) */
int func0(string *param_1)
{
char *pcVar1;
byte *pbVar2;
long lVar3;
ulong uVar4;
ulong uVar5;
ulong uVar6;
char cVar7;
int iVar8;
long in_FS_OFFSET;
int4 *local_68;
int8 local_60;
int4 local_58;
int uStack_54;
int uStack_53;
int2 uStack_52;
long local_4... |
3,104 | func0 |
#include <algorithm>
#include <vector>
#include <assert.h>
| int func0(std::vector<int> arr, int n) {
std::sort(arr.begin(), arr.end());
int sum = arr[0];
for(int i = 0; i < n-1; ++i) {
if (arr[i] != arr[i+1]) {
sum += arr[i+1];
}
}
return sum;
}
| int main() {
assert(func0({1,2,3,1,1,4,5,6}, 8) == 21);
assert(func0({1,10,9,4,2,10,10,45,4}, 9) == 71);
assert(func0({12,10,9,45,2,10,10,45,10}, 9) == 78);
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> >, int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x28,%rsp
mov %rdi,-0x28(%rbp)
mov %esi,-0x2c(%rbp)
mov -0x28(%rbp),%rax
mov %rax,%rdi
callq 1730 <_ZNSt6vectorIiSaIiEE3endEv>
mov %rax,%rbx
mov -0x28(%rbp),%rax
mov %rax,%rdi
callq 16e4 <... | _Z5func0St6vectorIiSaIiEEi:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 28h
mov [rbp+var_28], rdi
mov [rbp+var_2C], esi
mov rax, [rbp+var_28]
mov rdi, rax
call _ZNSt6vectorIiSaIiEE3endEv; std::vector<int>::end(void)
mov rbx, rax
mov rax, [rbp+var_28]
mov rdi, rax
call ... | long long func0(long long a1, int a2)
{
long long v2; // rbx
long long v3; // rax
int v4; // ebx
unsigned int v6; // [rsp+18h] [rbp-18h]
int i; // [rsp+1Ch] [rbp-14h]
v2 = std::vector<int>::end(a1);
v3 = std::vector<int>::begin(a1);
std::sort<__gnu_cxx::__normal_iterator<int *,std::vector<int>>>(v3, v... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x28
MOV qword ptr [RBP + -0x28],RDI
MOV dword ptr [RBP + -0x2c],ESI
MOV RAX,qword ptr [RBP + -0x28]
MOV RDI,RAX
CALL 0x0010173c
MOV RBX,RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RDI,RAX
CALL 0x001016f0
MOV RSI,RBX
MOV RDI,RAX
CALL 0x0010178c
MOV RAX,qword ptr [RBP + -... | /* func0(std::vector<int, std::allocator<int> >, int) */
int func0(vector param_1,int param_2)
{
int iVar1;
__normal_iterator _Var2;
__normal_iterator _Var3;
int *piVar4;
int4 in_register_0000003c;
vector<int,std::allocator<int>> *this;
int4 local_20;
int4 local_1c;
this = (vector<int,std::alloca... |
3,105 | func0 |
#include <algorithm>
#include <vector>
#include <assert.h>
| int func0(std::vector<int> arr, int n) {
std::sort(arr.begin(), arr.end());
int sum = arr[0];
for(int i = 0; i < n-1; ++i) {
if (arr[i] != arr[i+1]) {
sum += arr[i+1];
}
}
return sum;
}
| int main() {
assert(func0({1,2,3,1,1,4,5,6}, 8) == 21);
assert(func0({1,10,9,4,2,10,10,45,4}, 9) == 71);
assert(func0({12,10,9,45,2,10,10,45,10}, 9) == 78);
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> >, int):
endbr64
push %r14
push %r13
push %r12
push %rbp
push %rbx
mov %rdi,%r12
mov %esi,%ebp
mov 0x8(%rdi),%r13
mov (%rdi),%r14
cmp %r13,%r14
je 12cb <_Z5func0St6vectorIiSaIiEEi+0xa2>
mov %r13,%rbx
sub %r14,%rbx
mov %rbx,%rax
sar $0x2... | _Z5func0St6vectorIiSaIiEEi:
endbr64
push r14
push r13
push r12
push rbp
push rbx
mov r13, rdi
mov r12d, esi
mov rbp, [rdi+8]
mov r14, [rdi]
cmp r14, rbp
jz loc_12D2
mov rbx, rbp
sub rbx, r14
mov rdx, rbx
sar rdx, 2
mov eax, 40h ; '@'
jz short loc_1266
bsr... | long long func0(char **a1, int a2)
{
char *v3; // rbp
char *v4; // r14
int v5; // eax
unsigned long long v6; // rax
char *v7; // rbx
int v8; // ecx
char *v9; // rax
int v10; // edx
char *v11; // rsi
unsigned int v12; // ecx
char *v13; // rax
int v14; // edx
v3 = a1[1];
v4 = *a1;
if ( *a1... | func0:
ENDBR64
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV R13,RDI
MOV R12D,ESI
MOV RBP,qword ptr [RDI + 0x8]
MOV R14,qword ptr [RDI]
CMP R14,RBP
JZ 0x001012d2
MOV RBX,RBP
SUB RBX,R14
MOV RDX,RBX
SAR RDX,0x2
MOV EAX,0x40
JZ 0x00101266
BSR RAX,RDX
XOR EAX,0x3f
LAB_00101266:
MOV EDX,0x3f
SUB EDX,EAX
MOVSXD RDX,EDX
A... | /* func0(std::vector<int, std::allocator<int> >, int) */
int func0(vector param_1,int param_2)
{
int iVar1;
int *piVar2;
long lVar3;
int *piVar4;
int *piVar5;
int *piVar6;
uint uVar7;
int *piVar8;
_Iter_less_iter in_ECX;
int iVar9;
_Iter_less_iter extraout_EDX;
ulong uVar10;
__normal_iterato... |
3,106 | func0 |
#include <algorithm>
#include <vector>
#include <assert.h>
| int func0(std::vector<int> arr, int n) {
std::sort(arr.begin(), arr.end());
int sum = arr[0];
for(int i = 0; i < n-1; ++i) {
if (arr[i] != arr[i+1]) {
sum += arr[i+1];
}
}
return sum;
}
| int main() {
assert(func0({1,2,3,1,1,4,5,6}, 8) == 21);
assert(func0({1,10,9,4,2,10,10,45,4}, 9) == 71);
assert(func0({12,10,9,45,2,10,10,45,10}, 9) == 78);
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> >, int):
endbr64
push %r14
push %r13
mov %esi,%r13d
push %r12
push %rbp
push %rbx
mov 0x8(%rdi),%rbp
mov (%rdi),%r14
cmp %rbp,%r14
je 151f <_Z5func0St6vectorIiSaIiEEi+0xcf>
mov %rbp,%rbx
mov $0x3f,%edx
mov %rdi,%r12
mov %rbp,%rsi
sub %r... | _Z5func0St6vectorIiSaIiEEi:
endbr64
push r14
push r13
push r12
push rbp
push rbx
mov r12, [rdi+8]
mov ebx, esi
mov r14, [rdi]
cmp r14, r12
jz loc_1837
mov rbp, r12
mov r13, rdi
mov rdx, 0FFFFFFFFFFFFFFFEh
sub rbp, r14
mov rax, rbp
sar rax, 2
jz short loc_... | long long func0(int **a1, int a2)
{
int *v2; // r12
int *v4; // r14
long long v5; // rdx
unsigned long long v6; // rax
int *v7; // rbp
int v8; // ecx
int v9; // edx
int *v10; // rax
int *v11; // rsi
int *v12; // rsi
long long result; // rax
int *v14; // rdx
unsigned int v15; // ecx
int v16;... | func0:
ENDBR64
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV R12,qword ptr [RDI + 0x8]
MOV EBX,ESI
MOV R14,qword ptr [RDI]
CMP R14,R12
JZ 0x00101837
MOV RBP,R12
MOV R13,RDI
MOV RDX,-0x2
SUB RBP,R14
MOV RAX,RBP
SAR RAX,0x2
JZ 0x001017b1
BSR RAX,RAX
CDQE
LEA RDX,[RAX + RAX*0x1]
LAB_001017b1:
MOV RSI,R12
MOV RDI,R14
CA... | /* func0(std::vector<int, std::allocator<int> >, int) */
int func0(vector param_1,int param_2)
{
int iVar1;
ulong uVar2;
int *piVar3;
_Iter_less_iter in_ECX;
int iVar4;
_Iter_less_iter extraout_EDX;
int iVar5;
long lVar6;
int *piVar7;
int *piVar8;
__normal_iterator _Var9;
int4 in_register_0000... |
3,107 | func0 |
#include <algorithm>
#include <vector>
#include <assert.h>
| int func0(std::vector<int> arr, int n) {
std::sort(arr.begin(), arr.end());
int sum = arr[0];
for(int i = 0; i < n-1; ++i) {
if (arr[i] != arr[i+1]) {
sum += arr[i+1];
}
}
return sum;
}
| int main() {
assert(func0({1,2,3,1,1,4,5,6}, 8) == 21);
assert(func0({1,10,9,4,2,10,10,45,4}, 9) == 71);
assert(func0({12,10,9,45,2,10,10,45,10}, 9) == 78);
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> >, int):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
mov %esi,%ebp
push %rbx
sub $0x18,%rsp
mov 0x8(%rdi),%r13
mov (%rdi),%r15
cmp %r13,%r15
je 1500 <_Z5func0St6vectorIiSaIiEEi+0x120>
mov %r13,%r14
mov $0x3f,%edx
mov %rdi,%... | _Z5func0St6vectorIiSaIiEEi:
endbr64
push r15
push r14
push r13
push r12
push rbp
mov ebp, esi
push rbx
sub rsp, 18h
mov r15, [rdi+8]
mov r12, [rdi]
cmp r12, r15
jz loc_17AC
mov r14, r15
mov r13, rdi
lea rbx, [r12+4]
sub r14, r12
mov rax, r14
sar rax, 2
... | long long func0(char **a1, int a2)
{
char *v3; // r15
char *j; // r12
char *v5; // rbx
unsigned long long v6; // rdx
char *v7; // r14
int v8; // ecx
char *v9; // rsi
int v10; // edx
char *i; // rax
int v12; // ecx
int v13; // edx
char *v14; // rax
char *v15; // rsi
unsigned int v16; // ecx
... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
MOV EBP,ESI
PUSH RBX
SUB RSP,0x18
MOV R15,qword ptr [RDI + 0x8]
MOV R12,qword ptr [RDI]
CMP R12,R15
JZ 0x001017ac
MOV R14,R15
MOV R13,RDI
LEA RBX,[R12 + 0x4]
SUB R14,R12
MOV RAX,R14
SAR RAX,0x2
JZ 0x00101880
BSR RDX,RAX
MOV RSI,R15
MOV RDI,R12
MOVSXD RDX,EDX
A... | /* func0(std::vector<int, std::allocator<int> >, int) */
uint func0(vector param_1,int param_2,int param_3,int param_4,int param_5,
int param_6,int param_7,int param_8,int param_9,int param_10
,int4 param_11)
{
uint uVar1;
uint uVar2;
long lVar3;
uint *puVar4;
uint *puVar5;
uint *puVar... |
3,108 | func0 | #include <vector>
#include <cassert>
#include <iostream>
| std::vector<std::vector<int>> func0(std::vector<int> list1) {
std::vector<std::vector<int>> packed;
if (list1.empty()) return packed;
std::vector<int> current_group;
current_group.push_back(list1[0]);
for (size_t i = 1; i < list1.size(); ++i) {
if (list1[i] == list1[i - 1]) {
... | int main() {
assert(func0({0, 0, 1, 2, 3, 4, 4, 5, 6, 6, 6, 7, 8, 9, 4, 4}) == std::vector<std::vector<int>>({{0, 0}, {1}, {2}, {3}, {4, 4}, {5}, {6, 6, 6}, {7}, {8}, {9}, {4, 4}}));
assert(func0({10, 10, 15, 19, 18, 18, 17, 26, 26, 17, 18, 10}) == std::vector<std::vector<int>>({{10, 10}, {15}, {19}, {18, 18}... | O0 | cpp | func0(std::vector<int, std::allocator<int> >):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x48,%rsp
mov %rdi,-0x48(%rbp)
mov %rsi,-0x50(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x48(%rbp),%rax
mov %rax,%rdi
callq 2bb4 <_ZNSt6vectorIS_IiSaIiEESaIS1_EEC1Ev>
mov ... | _Z5func0St6vectorIiSaIiEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 48h
mov [rbp+var_48], rdi
mov [rbp+var_50], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_48]
mov rdi, rax
call _ZNSt6vectorIS_IiSaIiEESaIS1_EEC2Ev; std::vector<std::vector<... | long long func0(long long a1, long long a2)
{
long long v2; // rax
int v3; // ebx
long long v4; // rax
unsigned long long i; // [rsp+18h] [rbp-38h]
_BYTE v7[24]; // [rsp+20h] [rbp-30h] BYREF
unsigned long long v8; // [rsp+38h] [rbp-18h]
v8 = __readfsqword(0x28u);
std::vector<std::vector<int>>::vector(... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RBP + -0x48],RDI
MOV qword ptr [RBP + -0x50],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x48]
MOV RDI,RAX
CALL 0x0010283a
MOV RAX,qword ptr [RBP + -0x50]
MOV RDI,RAX
CALL 0x001029aa
TEST A... | /* func0(std::vector<int, std::allocator<int> >) */
vector<std::vector<int,std::allocator<int>>,std::allocator<std::vector<int,std::allocator<int>>>> *
func0(vector param_1)
{
int iVar1;
char cVar2;
int *piVar3;
ulong uVar4;
vector<int,std::allocator<int>> *in_RSI;
int4 in_register_0000003c;
vector<std:... |
3,109 | func0 | #include <vector>
#include <cassert>
#include <iostream>
| std::vector<std::vector<int>> func0(std::vector<int> list1) {
std::vector<std::vector<int>> packed;
if (list1.empty()) return packed;
std::vector<int> current_group;
current_group.push_back(list1[0]);
for (size_t i = 1; i < list1.size(); ++i) {
if (list1[i] == list1[i - 1]) {
... | int main() {
assert(func0({0, 0, 1, 2, 3, 4, 4, 5, 6, 6, 6, 7, 8, 9, 4, 4}) == std::vector<std::vector<int>>({{0, 0}, {1}, {2}, {3}, {4, 4}, {5}, {6, 6, 6}, {7}, {8}, {9}, {4, 4}}));
assert(func0({10, 10, 15, 19, 18, 18, 17, 26, 26, 17, 18, 10}) == std::vector<std::vector<int>>({{10, 10}, {15}, {19}, {18, 18}... | O1 | cpp | func0(std::vector<int, std::allocator<int> >):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x38,%rsp
mov %rdi,%r12
mov %fs:0x28,%rax
mov %rax,0x28(%rsp)
xor %eax,%eax
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi)
movq $0x0,0x10(%rdi)
mov (%rsi),%rdx
cmp %rdx,0x... | _Z5func0St6vectorIiSaIiEE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 38h
mov rbp, rdi
mov rax, fs:28h
mov [rsp+68h+var_40], rax
xor eax, eax
mov qword ptr [rdi], 0
mov qword ptr [rdi+8], 0
mov qword ptr [rdi+10h], 0
mov rdx, [rsi]
cmp ... | _QWORD * func0(_QWORD *a1, long long *a2)
{
long long v3; // rdx
unsigned long long v4; // r14
char *v5; // rsi
struct _Unwind_Exception *v6; // rbx
int v7; // eax
_QWORD *v8; // r13
char *v9; // rax
signed long long v10; // r15
_DWORD *v11; // rax
_DWORD *v12; // r12
_QWORD *v13; // r13
signed ... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x38
MOV RBP,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x28],RAX
XOR EAX,EAX
MOV qword ptr [RDI],0x0
MOV qword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
MOV RDX,qword ptr [RSI]
CMP RDX,qword ptr [RSI + 0x8]
JZ 0x001015f9
MO... | /* func0(std::vector<int, std::allocator<int> >) */
vector<std::vector<int,std::allocator<int>>,std::allocator<std::vector<int,std::allocator<int>>>> *
func0(vector param_1)
{
long lVar1;
int iVar2;
int8 *puVar3;
int *piVar4;
int8 uVar5;
int *piVar6;
long lVar7;
long *in_RSI;
int4 in_register_000000... |
3,110 | func0 | #include <vector>
#include <cassert>
#include <iostream>
| std::vector<std::vector<int>> func0(std::vector<int> list1) {
std::vector<std::vector<int>> packed;
if (list1.empty()) return packed;
std::vector<int> current_group;
current_group.push_back(list1[0]);
for (size_t i = 1; i < list1.size(); ++i) {
if (list1[i] == list1[i - 1]) {
... | int main() {
assert(func0({0, 0, 1, 2, 3, 4, 4, 5, 6, 6, 6, 7, 8, 9, 4, 4}) == std::vector<std::vector<int>>({{0, 0}, {1}, {2}, {3}, {4, 4}, {5}, {6, 6, 6}, {7}, {8}, {9}, {4, 4}}));
assert(func0({10, 10, 15, 19, 18, 18, 17, 26, 26, 17, 18, 10}) == std::vector<std::vector<int>>({{10, 10}, {15}, {19}, {18, 18}... | O2 | cpp | func0(std::vector<int, std::allocator<int> >):
endbr64
push %r15
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x48,%rsp
mov (%rsi),%rdx
mov %fs:0x28,%rax
mov %rax,0x38(%rsp)
xor %eax,%eax
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi)
movq $0x0,0x10(%rdi)
cmp %rdx,0x... | _Z5func0St6vectorIiSaIiEE:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
push r12
mov r12, rdi
push rbp
push rbx
sub rsp, 48h
mov rdx, [rsi]
mov rax, fs:28h
mov [rsp+78h+var_40], rax
xor eax, eax
mov qword ptr [rdi+10h], 0
movups xmmword ptr [rdi], xmm0
cmp rdx... | long long func0(long long a1, long long *a2)
{
_BYTE *v2; // r14
long long v4; // rdx
long long *v5; // r15
_DWORD *v6; // rdi
long long v7; // rax
unsigned long long v8; // r13
_BYTE *v9; // rax
_DWORD *v10; // rbp
long long v11; // r13
signed long long v12; // rbx
_DWORD *v13; // rax
long lon... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
PUSH R13
PUSH R12
MOV R12,RDI
PUSH RBP
PUSH RBX
SUB RSP,0x48
MOV RDX,qword ptr [RSI]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
MOV qword ptr [RDI + 0x10],0x0
MOVUPS xmmword ptr [RDI],XMM0
CMP RDX,qword ptr [RSI + 0x8]
JZ 0x00102275
MOV R15,RSI... | /* func0(std::vector<int, std::allocator<int> >) */
vector<std::vector<int,std::allocator<int>>,std::allocator<std::vector<int,std::allocator<int>>>> *
func0(vector param_1)
{
int iVar1;
int *piVar2;
int (*__src) [16];
int4 *puVar3;
long lVar4;
int (*pauVar5) [16];
int4 *__src_00;
long *in_RSI;
ulon... |
3,111 | func0 | #include <vector>
#include <cassert>
#include <iostream>
| std::vector<std::vector<int>> func0(std::vector<int> list1) {
std::vector<std::vector<int>> packed;
if (list1.empty()) return packed;
std::vector<int> current_group;
current_group.push_back(list1[0]);
for (size_t i = 1; i < list1.size(); ++i) {
if (list1[i] == list1[i - 1]) {
... | int main() {
assert(func0({0, 0, 1, 2, 3, 4, 4, 5, 6, 6, 6, 7, 8, 9, 4, 4}) == std::vector<std::vector<int>>({{0, 0}, {1}, {2}, {3}, {4, 4}, {5}, {6, 6, 6}, {7}, {8}, {9}, {4, 4}}));
assert(func0({10, 10, 15, 19, 18, 18, 17, 26, 26, 17, 18, 10}) == std::vector<std::vector<int>>({{10, 10}, {15}, {19}, {18, 18}... | O3 | cpp | func0(std::vector<int, std::allocator<int> >):
endbr64
push %r15
pxor %xmm0,%xmm0
push %r14
mov %rdi,%r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x48,%rsp
mov (%rsi),%rdx
mov %fs:0x28,%rax
mov %rax,0x38(%rsp)
xor %eax,%eax
movq $0x0,0x10(%rdi)
movups %xmm0,(%rdi)
cmp %rdx,0x8(... | _Z5func0St6vectorIiSaIiEE:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
push r12
mov r12, rdi
push rbp
push rbx
sub rsp, 48h
mov rdx, [rsi]
mov rax, fs:28h
mov [rsp+78h+var_40], rax
xor eax, eax
mov qword ptr [rdi+10h], 0
movups xmmword ptr [rdi], xmm0
cmp rdx... | long long func0(long long a1, long long *a2)
{
_BYTE *v2; // r14
long long v4; // rdx
long long *v5; // r15
_DWORD *v6; // rdi
long long v7; // rax
unsigned long long v8; // r13
_BYTE *v9; // rax
_DWORD *v10; // rbp
long long v11; // r13
signed long long v12; // rbx
_DWORD *v13; // rax
long lon... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
PUSH R13
PUSH R12
MOV R12,RDI
PUSH RBP
PUSH RBX
SUB RSP,0x48
MOV RDX,qword ptr [RSI]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
MOV qword ptr [RDI + 0x10],0x0
MOVUPS xmmword ptr [RDI],XMM0
CMP RDX,qword ptr [RSI + 0x8]
JZ 0x001022b5
MOV R15,RSI... | /* func0(std::vector<int, std::allocator<int> >) */
vector<std::vector<int,std::allocator<int>>,std::allocator<std::vector<int,std::allocator<int>>>> *
func0(vector param_1)
{
int iVar1;
int *piVar2;
int (*__src) [16];
int4 *puVar3;
long lVar4;
int (*pauVar5) [16];
int4 *__src_00;
long *in_RSI;
ulon... |
3,112 | func0 |
#include <vector>
#include <map>
#include <cassert>
#include <tuple>
#include <iostream>
| std::map<std::vector<int>, int> func0(std::vector<std::vector<int>>& list1) {
std::map<std::vector<int>, int> result;
for (auto& l : list1) {
result[l]++;
}
return result;
}
| int main() {
std::vector<std::vector<int>> list1 = {{1, 3}, {5, 7}, {1, 3}, {13, 15, 17}, {5, 7}, {9, 11}};
std::vector<std::vector<int>> list2 = {{1, 2}, {3, 4}, {4, 5}, {6, 7}};
std::map<std::vector<int>, int> expected1 = {{std::vector<int>({1, 3}), 2}, {std::vector<int>({5, 7}), 2}, {std::vector<int... | O0 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x48,%rsp
mov %rdi,-0x48(%rbp)
mov %rsi,-0x50(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x48(%rbp),%rax
... | _Z5func0RSt6vectorIS_IiSaIiEESaIS1_EE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 48h
mov [rbp+var_48], rdi
mov [rbp+var_50], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_48]
mov rdi, rax
call _ZNSt3mapISt6vectorIiSaIiEEiSt4lessIS2_ESaISt4pai... | long long func0(long long a1, long long a2)
{
_DWORD *v2; // rax
long long v4; // [rsp+18h] [rbp-38h] BYREF
_QWORD v5[2]; // [rsp+20h] [rbp-30h] BYREF
long long v6; // [rsp+30h] [rbp-20h]
unsigned long long v7; // [rsp+38h] [rbp-18h]
v7 = __readfsqword(0x28u);
std::map<std::vector<int>,int>::map(a1);
... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RBP + -0x48],RDI
MOV qword ptr [RBP + -0x50],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x48]
MOV RDI,RAX
CALL 0x00102614
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x28],RAX
MO... | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > >&) */
vector * func0(vector *param_1)
{
bool bVar1;
int *piVar2;
vector<std::vector<int,std::allocator<int>>,std::allocator<std::vector<int,std::allocator<int>>>>
*in_RSI;
long in_FS_OFFS... |
3,113 | func0 |
#include <vector>
#include <map>
#include <cassert>
#include <tuple>
#include <iostream>
| std::map<std::vector<int>, int> func0(std::vector<std::vector<int>>& list1) {
std::map<std::vector<int>, int> result;
for (auto& l : list1) {
result[l]++;
}
return result;
}
| int main() {
std::vector<std::vector<int>> list1 = {{1, 3}, {5, 7}, {1, 3}, {13, 15, 17}, {5, 7}, {9, 11}};
std::vector<std::vector<int>> list2 = {{1, 2}, {3, 4}, {4, 5}, {6, 7}};
std::map<std::vector<int>, int> expected1 = {{std::vector<int>({1, 3}), 2}, {std::vector<int>({5, 7}), 2}, {std::vector<int... | O1 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >&):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x48,%rsp
mov %rdi,0x8(%rsp)
mov %fs:0x28,%rax
mov %rax,0x38(%rsp)
xor %eax,%eax
movl $0x0,0x8(%rdi... | _Z5func0RSt6vectorIS_IiSaIiEESaIS1_EE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 48h
mov [rsp+78h+var_68], rdi
mov rax, fs:28h
mov [rsp+78h+var_40], rax
xor eax, eax
mov dword ptr [rdi+8], 0
mov qword ptr [rdi+10h], 0
lea rdx, [rdi+8]
mov ... | long long func0(long long a1, _QWORD *a2)
{
_QWORD *v2; // r14
_QWORD *v4; // rbx
long long v5; // rbp
long long v6; // r13
long long v7; // r12
_QWORD *v8; // [rsp+18h] [rbp-60h]
char v9; // [rsp+2Fh] [rbp-49h] BYREF
_QWORD v10[9]; // [rsp+30h] [rbp-48h] BYREF
v10[1] = __readfsqword(0x28u);
*(_DW... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RSP + 0x10],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
MOV dword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
LEA RDX,[RDI + 0x8]
MOV qword ptr [RSP + 0x8],RDX
MOV qword ptr [RDI + 0x18... | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > >&) */
vector * func0(vector *param_1)
{
vector *pvVar1;
int8 *puVar2;
int *piVar3;
int *piVar4;
bool bVar5;
_Rb_tree_iterator _Var6;
int4 extraout_var;
vector *pvVar8;
vector *pvV... |
3,114 | func0 |
#include <vector>
#include <map>
#include <cassert>
#include <tuple>
#include <iostream>
| std::map<std::vector<int>, int> func0(std::vector<std::vector<int>>& list1) {
std::map<std::vector<int>, int> result;
for (auto& l : list1) {
result[l]++;
}
return result;
}
| int main() {
std::vector<std::vector<int>> list1 = {{1, 3}, {5, 7}, {1, 3}, {13, 15, 17}, {5, 7}, {9, 11}};
std::vector<std::vector<int>> list2 = {{1, 2}, {3, 4}, {4, 5}, {6, 7}};
std::map<std::vector<int>, int> expected1 = {{std::vector<int>({1, 3}), 2}, {std::vector<int>({5, 7}), 2}, {std::vector<int... | O2 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >&):
endbr64
push %r15
push %r14
lea 0x8(%rdi),%r14
push %r13
mov %rdi,%r13
push %r12
push %rbp
push %rbx
sub $0x18,%rsp
mov 0x8(%rsi),%rax
mov (%rsi),%rbx
mov %r14,0x18(%rdi)
... | _Z5func0RSt6vectorIS_IiSaIiEESaIS1_EE:
endbr64
push r15
lea r15, [rdi+8]
push r14
push r13
mov r13, rdi
push r12
push rbp
push rbx
sub rsp, 38h
mov rax, [rsi+8]
mov rbp, [rsi]
mov [rdi+18h], r15
mov dword ptr [rdi+8], 0
mov qword ptr [rdi+10h], 0
mov [rdi+20h], r15
... | long long func0(long long a1, long long a2)
{
char *v2; // r15
_QWORD *v4; // rax
_QWORD *v5; // rbp
char *v6; // rsi
_DWORD *v7; // r9
_DWORD *v8; // rdi
char *v9; // rbx
char *v10; // r8
char *v11; // rcx
char *v12; // rax
_DWORD *v13; // rdx
unsigned int *v14; // rax
long long v15; // rdx
... | func0:
ENDBR64
PUSH R15
LEA R15,[RDI + 0x8]
PUSH R14
PUSH R13
MOV R13,RDI
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x38
MOV RAX,qword ptr [RSI + 0x8]
MOV RBP,qword ptr [RSI]
MOV qword ptr [RDI + 0x18],R15
MOV dword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
MOV qword ptr [RDI + 0x20],R15
MOV qword ptr [RDI + 0x28],0x... | /* WARNING: Removing unreachable block (ram,0x00101f68) */
/* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > >&) */
vector * func0(vector *param_1)
{
_Rb_tree_node_base *p_Var1;
uint uVar2;
long *plVar3;
long *plVar4;
uint *puVar5;
_Rb_... |
3,115 | func0 |
#include <vector>
#include <map>
#include <cassert>
#include <tuple>
#include <iostream>
| std::map<std::vector<int>, int> func0(std::vector<std::vector<int>>& list1) {
std::map<std::vector<int>, int> result;
for (auto& l : list1) {
result[l]++;
}
return result;
}
| int main() {
std::vector<std::vector<int>> list1 = {{1, 3}, {5, 7}, {1, 3}, {13, 15, 17}, {5, 7}, {9, 11}};
std::vector<std::vector<int>> list2 = {{1, 2}, {3, 4}, {4, 5}, {6, 7}};
std::map<std::vector<int>, int> expected1 = {{std::vector<int>({1, 3}), 2}, {std::vector<int>({5, 7}), 2}, {std::vector<int... | O3 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >&):
endbr64
push %r15
push %r14
lea 0x8(%rdi),%r14
push %r13
mov %rdi,%r13
push %r12
push %rbp
push %rbx
sub $0x18,%rsp
mov 0x8(%rsi),%rax
mov (%rsi),%rbx
mov %r14,0x18(%rdi)
... | _Z5func0RSt6vectorIS_IiSaIiEESaIS1_EE:
endbr64
push r15
lea r15, [rdi+8]
push r14
push r13
mov r13, rdi
push r12
push rbp
push rbx
sub rsp, 38h
mov rax, [rsi+8]
mov rbp, [rsi]
mov [rdi+18h], r15
mov dword ptr [rdi+8], 0
mov qword ptr [rdi+10h], 0
mov [rdi+20h], r15
... | long long func0(long long a1, long long a2)
{
char *v2; // r15
_QWORD *v4; // rax
_QWORD *v5; // rbp
char *v6; // rsi
_DWORD *v7; // r9
_DWORD *v8; // rdi
char *v9; // rbx
char *v10; // r8
char *v11; // rcx
char *v12; // rax
_DWORD *v13; // rdx
unsigned int *v14; // rax
long long v15; // rdx
... | func0:
ENDBR64
PUSH R15
LEA R15,[RDI + 0x8]
PUSH R14
PUSH R13
MOV R13,RDI
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x38
MOV RAX,qword ptr [RSI + 0x8]
MOV RBP,qword ptr [RSI]
MOV qword ptr [RDI + 0x18],R15
MOV dword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
MOV qword ptr [RDI + 0x20],R15
MOV qword ptr [RDI + 0x28],0x... | /* WARNING: Removing unreachable block (ram,0x001022e8) */
/* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > >&) */
vector * func0(vector *param_1)
{
_Rb_tree_node_base *p_Var1;
uint uVar2;
long *plVar3;
long *plVar4;
uint *puVar5;
_Rb_... |
3,116 | func0 | #include <vector>
#include <utility>
#include <cassert>
using namespace std;
| vector<pair<int, int>> func0(const vector<pair<int, int>>& test_list) {
vector<pair<int, int>> res;
for (size_t i = 0; i < test_list.size(); ++i) {
for (size_t j = i + 1; j < test_list.size(); ++j) {
res.push_back({ test_list[i].first + test_list[j].first,
... | int main() {
{
vector<pair<int, int>> input = { {2, 4}, {6, 7}, {5, 1}, {6, 10} };
vector<pair<int, int>> expected = { {8, 11}, {7, 5}, {8, 14}, {11, 8}, {12, 17}, {11, 11} };
assert(func0(input) == expected);
}
{
vector<pair<int, int>> input = { {3, 5}, {7, 8}, ... | O0 | cpp | func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x48,%rsp
mov %rdi,-0x48(%rbp)
mov %rsi,-0x50(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x48(%rbp),%rax
mov %rax,%rdi
callq 1bf6 <_Z... | _Z5func0RKSt6vectorISt4pairIiiESaIS1_EE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 48h
mov [rbp+var_48], rdi
mov [rbp+var_50], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_48]
mov rdi, rax
call _ZNSt6vectorISt4pairIiiESaIS1_EEC2Ev; std::vect... | long long func0(long long a1, long long a2)
{
int v2; // ebx
int v3; // ebx
unsigned long long v4; // rax
unsigned long long v5; // rax
int v7; // [rsp+18h] [rbp-38h] BYREF
int v8; // [rsp+1Ch] [rbp-34h] BYREF
unsigned long long i; // [rsp+20h] [rbp-30h]
unsigned long long j; // [rsp+28h] [rbp-28h]
_... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RBP + -0x48],RDI
MOV qword ptr [RBP + -0x50],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x48]
MOV RDI,RAX
CALL 0x00101c1a
MOV qword ptr [RBP + -0x30],0x0
JMP 0x00101326
LAB_00101266:
MOV R... | /* func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&) */
vector * func0(vector *param_1)
{
int iVar1;
int *piVar2;
long lVar3;
ulong uVar4;
ulong uVar5;
vector<std::pair<int,int>,std::allocator<std::pair<int,int>>> *in_RSI;
long in_FS_OFFSET;
int local_40;
int loca... |
3,117 | func0 | #include <vector>
#include <utility>
#include <cassert>
using namespace std;
| vector<pair<int, int>> func0(const vector<pair<int, int>>& test_list) {
vector<pair<int, int>> res;
for (size_t i = 0; i < test_list.size(); ++i) {
for (size_t j = i + 1; j < test_list.size(); ++j) {
res.push_back({ test_list[i].first + test_list[j].first,
... | int main() {
{
vector<pair<int, int>> input = { {2, 4}, {6, 7}, {5, 1}, {6, 10} };
vector<pair<int, int>> expected = { {8, 11}, {7, 5}, {8, 14}, {11, 8}, {12, 17}, {11, 11} };
assert(func0(input) == expected);
}
{
vector<pair<int, int>> input = { {3, 5}, {7, 8}, ... | O1 | cpp | func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x18,%rsp
mov %rdi,%rbp
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi)
movq $0x0,0x10(... | _Z5func0RKSt6vectorISt4pairIiiESaIS1_EE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 18h
mov rbp, rdi
mov rax, fs:28h
mov [rsp+48h+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... | _QWORD * func0(_QWORD *a1, long long *a2)
{
unsigned long long v3; // r14
unsigned long long v4; // rbx
long long v5; // rdx
unsigned long long v6; // rax
_QWORD *v7; // rsi
_QWORD v9[9]; // [rsp+0h] [rbp-48h] BYREF
v9[1] = __readfsqword(0x28u);
*a1 = 0LL;
a1[1] = 0LL;
a1[2] = 0LL;
if ( a2[1] != ... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x18
MOV RBP,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
MOV qword ptr [RDI],0x0
MOV qword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
MOV RAX,qword ptr [RSI]
CMP qword ptr [RSI + 0x8],RAX
JZ 0x001012ec
MOV... | /* func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&) */
vector * func0(vector *param_1)
{
int *piVar1;
int *piVar2;
int8 *puVar3;
ulong uVar4;
long lVar5;
ulong uVar6;
long *in_RSI;
ulong uVar7;
long in_FS_OFFSET;
int local_48;
int iStack_44;
long local_40;
... |
3,118 | func0 | #include <vector>
#include <utility>
#include <cassert>
using namespace std;
| vector<pair<int, int>> func0(const vector<pair<int, int>>& test_list) {
vector<pair<int, int>> res;
for (size_t i = 0; i < test_list.size(); ++i) {
for (size_t j = i + 1; j < test_list.size(); ++j) {
res.push_back({ test_list[i].first + test_list[j].first,
... | int main() {
{
vector<pair<int, int>> input = { {2, 4}, {6, 7}, {5, 1}, {6, 10} };
vector<pair<int, int>> expected = { {8, 11}, {7, 5}, {8, 14}, {11, 8}, {12, 17}, {11, 11} };
assert(func0(input) == expected);
}
{
vector<pair<int, int>> input = { {3, 5}, {7, 8}, ... | O2 | cpp | func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x18,%rsp
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi)
movq $0x0,0x10(... | _Z5func0RKSt6vectorISt4pairIiiESaIS1_EE:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
push r12
push rbp
mov rbp, rdi
push rbx
sub rsp, 18h
mov rax, fs:28h
mov [rsp+48h+var_40], rax
xor eax, eax
movups xmmword ptr [rdi], xmm0
mov rcx, [rsi+8]
mov rdx, [rsi]
mov ... | long long func0(long long a1, long long *a2)
{
long long v2; // rcx
long long v3; // rdx
unsigned long long v5; // r14
unsigned long long v6; // rbx
long long v7; // rsi
unsigned long long v8; // rax
long long v9; // rsi
_QWORD v11[9]; // [rsp+0h] [rbp-48h] BYREF
v11[1] = __readfsqword(0x28u);
*(_... | func0:
MOV RDI,RBP
CALL 0x001016f0
MOV RAX,qword ptr [RSP + 0x8]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x00101140
MOV RDI,RBX
LAB_0010113b:
CALL 0x00101110
LAB_00101140:
CALL 0x00101100 | /* func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&) [clone
.cold] */
void func0(vector *param_1,int param_2,int param_3,int param_4,int param_5,
int param_6,long param_7)
{
vector<std::pair<int,int>,std::allocator<std::pair<int,int>>> *unaff_RBP;
long in_FS_OFFSET... |
3,119 | func0 | #include <vector>
#include <utility>
#include <cassert>
using namespace std;
| vector<pair<int, int>> func0(const vector<pair<int, int>>& test_list) {
vector<pair<int, int>> res;
for (size_t i = 0; i < test_list.size(); ++i) {
for (size_t j = i + 1; j < test_list.size(); ++j) {
res.push_back({ test_list[i].first + test_list[j].first,
... | int main() {
{
vector<pair<int, int>> input = { {2, 4}, {6, 7}, {5, 1}, {6, 10} };
vector<pair<int, int>> expected = { {8, 11}, {7, 5}, {8, 14}, {11, 8}, {12, 17}, {11, 11} };
assert(func0(input) == expected);
}
{
vector<pair<int, int>> input = { {3, 5}, {7, 8}, ... | O3 | cpp | func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&):
endbr64
push %r15
pxor %xmm0,%xmm0
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x18,%rsp
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
movq $0x0,0x10(%rdi)
movups %xmm0,(%r... | _Z5func0RKSt6vectorISt4pairIiiESaIS1_EE:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
push r12
push rbp
mov rbp, rdi
push rbx
sub rsp, 18h
mov rax, fs:28h
mov [rsp+48h+var_40], rax
xor eax, eax
movups xmmword ptr [rdi], xmm0
mov rcx, [rsi+8]
mov rdx, [rsi]
mov ... | long long func0(long long a1, long long *a2)
{
long long v2; // rcx
long long v3; // rdx
unsigned long long v5; // r14
unsigned long long v6; // rbx
long long v7; // rsi
unsigned long long v8; // rax
long long v9; // rsi
_QWORD v11[9]; // [rsp+0h] [rbp-48h] BYREF
v11[1] = __readfsqword(0x28u);
*(_... | func0:
MOV RDI,RBP
CALL 0x00101710
MOV RAX,qword ptr [RSP + 0x8]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x00101140
MOV RDI,RBX
LAB_0010113b:
CALL 0x00101110
LAB_00101140:
CALL 0x00101100 | /* func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&) [clone
.cold] */
void func0(vector *param_1,int param_2,int param_3,int param_4,int param_5,
int param_6,long param_7)
{
vector<std::pair<int,int>,std::allocator<std::pair<int,int>>> *unaff_RBP;
long in_FS_OFFSET... |
3,120 | func0 |
#include <cmath>
#include <string>
#include <cassert>
| std::string func0(int n) {
int count = 0;
for(int i = 1; i <= static_cast<int>(sqrt(n)) + 1; i++) {
if(n % i == 0) {
if(n / i == i) {
count += 1;
} else {
count += 2;
}
}
}
if(count % 2 == 0) {
return... | int main() {
assert(func0(10) == "Even");
assert(func0(100) == "Odd");
assert(func0(125) == "Even");
return 0;
}
| O0 | cpp | func0[abi:cxx11](int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x38,%rsp
mov %rdi,-0x38(%rbp)
mov %esi,-0x3c(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
movl $0x0,-0x20(%rbp)
movl $0x1,-0x1c(%rbp)
cvtsi2sdl -0x3c(%rbp),%xmm0
callq 1210 <sqrt@plt>
cvttsd2si %xmm0,%eax
... | _Z5func0B5cxx11i:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 48h
mov [rbp+var_48], rdi
mov [rbp+var_4C], esi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov [rbp+var_30], 0
mov [rbp+var_2C], 1
jmp short loc_13E3
loc_13BC:
mov eax, [rbp+var_4C]
cdq
idiv [r... | long long func0[abi:cxx11](long long a1, int a2)
{
char v3; // [rsp+1Fh] [rbp-31h] BYREF
int v4; // [rsp+20h] [rbp-30h]
int i; // [rsp+24h] [rbp-2Ch]
char *v6; // [rsp+28h] [rbp-28h]
char *v7; // [rsp+30h] [rbp-20h]
unsigned long long v8; // [rsp+38h] [rbp-18h]
v8 = __readfsqword(0x28u);
v4 = 0;
for... | func0[abi:cxx11]:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RBP + -0x48],RDI
MOV dword ptr [RBP + -0x4c],ESI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV dword ptr [RBP + -0x30],0x0
MOV dword ptr [RBP + -0x2c],0x1
JMP 0x001013e3
LAB_001013bc:
MOV EAX,dword ptr [RBP... | /* func0[abi:cxx11](int) */
string * func0_abi_cxx11_(int param_1)
{
int in_ESI;
int4 in_register_0000003c;
string *this;
long in_FS_OFFSET;
double dVar1;
allocator local_39;
uint local_38;
int local_34;
allocator *local_30;
allocator *local_28;
long local_20;
this = (string *)CONCAT44(in_r... |
3,121 | func0 |
#include <cmath>
#include <string>
#include <cassert>
| std::string func0(int n) {
int count = 0;
for(int i = 1; i <= static_cast<int>(sqrt(n)) + 1; i++) {
if(n % i == 0) {
if(n / i == i) {
count += 1;
} else {
count += 2;
}
}
}
if(count % 2 == 0) {
return... | int main() {
assert(func0(10) == "Even");
assert(func0(100) == "Odd");
assert(func0(125) == "Even");
return 0;
}
| O1 | cpp | func0[abi:cxx11](int):
endbr64
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x10,%rsp
mov %rdi,%r14
mov %esi,%ebp
pxor %xmm3,%xmm3
cvtsi2sd %esi,%xmm3
movsd %xmm3,0x8(%rsp)
movapd %xmm3,%xmm0
sqrtsd %xmm0,%xmm0
cvttsd2si %xmm0,%r13d
add $0x1,%r13d
mov $0x1,%ebx
mov $0x0,%r12d
jm... | _Z5func0B5cxx11i:
endbr64
push r13
push r12
push rbp
push rbx
sub rsp, 18h
mov r13, rdi
mov ebp, esi
mov ebx, 1
mov r12d, 0
pxor xmm2, xmm2
cvtsi2sd xmm2, esi
movsd [rsp+38h+x], xmm2
jmp short loc_125A
loc_1257:
add ebx, 1
loc_125A:
pxor xmm0, xmm0
movsd xmm1, [rsp+38h+... | _QWORD * func0[abi:cxx11](_QWORD *a1, int a2)
{
int v2; // ebx
char v3; // r12
double v4; // xmm0_8
double x; // [rsp+8h] [rbp-30h]
v2 = 1;
v3 = 0;
x = (double)a2;
while ( 1 )
{
v4 = x < 0.0 ? sqrt(x) : sqrt(x);
if ( (int)v4 + 1 < v2 )
break;
if ( !(a2 % v2) )
v3 += (a2 / v2 !... | func0[abi:cxx11]:
ENDBR64
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x18
MOV R13,RDI
MOV EBP,ESI
MOV EBX,0x1
MOV R12D,0x0
PXOR XMM2,XMM2
CVTSI2SD XMM2,ESI
MOVSD qword ptr [RSP + 0x8],XMM2
JMP 0x0010125a
LAB_00101257:
ADD EBX,0x1
LAB_0010125a:
PXOR XMM0,XMM0
MOVSD XMM1,qword ptr [RSP + 0x8]
UCOMISD XMM0,XMM1
JA 0x0010... | /* func0[abi:cxx11](int) */
long * func0_abi_cxx11_(int param_1)
{
int iVar1;
int in_ESI;
int4 in_register_0000003c;
long *plVar2;
byte bVar3;
double dVar4;
double __x;
plVar2 = (long *)CONCAT44(in_register_0000003c,param_1);
iVar1 = 1;
bVar3 = 0;
__x = (double)in_ESI;
while( true ) {
i... |
3,122 | func0 |
#include <cmath>
#include <string>
#include <cassert>
| std::string func0(int n) {
int count = 0;
for(int i = 1; i <= static_cast<int>(sqrt(n)) + 1; i++) {
if(n % i == 0) {
if(n / i == i) {
count += 1;
} else {
count += 2;
}
}
}
if(count % 2 == 0) {
return... | int main() {
assert(func0(10) == "Even");
assert(func0(100) == "Odd");
assert(func0(125) == "Even");
return 0;
}
| O2 | cpp | func0[abi:cxx11](int):
endbr64
pxor %xmm1,%xmm1
push %r13
pxor %xmm2,%xmm2
mov %rdi,%r13
cvtsi2sd %esi,%xmm1
push %r12
push %rbp
xor %ebp,%ebp
push %rbx
mov $0x1,%ebx
movapd %xmm1,%xmm0
sqrtsd %xmm0,%xmm0
sub $0x18,%rsp
cvttsd2si %xmm0,%r12d
add $0x1,%r12d
jmp 13ba <_Z5func0B5cxx11i+0x5a>
... | _Z5func0B5cxx11i:
endbr64
push r12
pxor xmm1, xmm1
mov r12, rdi
pxor xmm2, xmm2
push rbp
cvtsi2sd xmm1, esi
xor ebp, ebp
push rbx
mov ebx, 1
sub rsp, 10h
jmp short loc_1442
loc_1428:
mov eax, esi
cdq
idiv ebx
test edx, edx
jnz short loc_143F
mov edx, ebp
xor ebp,... | _QWORD * func0[abi:cxx11](_QWORD *a1, int a2)
{
double v2; // xmm1_8
char v3; // bp
int i; // ebx
double v5; // xmm0_8
v2 = (double)a2;
v3 = 0;
for ( i = 1; ; ++i )
{
v5 = v2 < 0.0 ? sqrt(v2) : sqrt(v2);
if ( (int)v5 + 1 < i )
break;
if ( !(a2 % i) )
v3 += (a2 / i != i) + 1;
}... | func0[abi:cxx11]:
ENDBR64
PUSH R12
PXOR XMM1,XMM1
MOV R12,RDI
PXOR XMM2,XMM2
PUSH RBP
CVTSI2SD XMM1,ESI
XOR EBP,EBP
PUSH RBX
MOV EBX,0x1
SUB RSP,0x10
JMP 0x00101442
LAB_00101428:
MOV EAX,ESI
CDQ
IDIV EBX
TEST EDX,EDX
JNZ 0x0010143f
MOV EDX,EBP
XOR EBP,EBP
CMP EAX,EBX
SETNZ BPL
LEA EBP,[RBP + RDX*0x1 + 0x1]
LAB_0010143f... | /* func0[abi:cxx11](int) */
long * func0_abi_cxx11_(int param_1)
{
int iVar1;
byte bVar2;
int in_ESI;
int4 in_register_0000003c;
long *plVar3;
double dVar4;
double __x;
plVar3 = (long *)CONCAT44(in_register_0000003c,param_1);
__x = (double)in_ESI;
bVar2 = 0;
iVar1 = 1;
while( true ) {
i... |
3,123 | func0 |
#include <cmath>
#include <string>
#include <cassert>
| std::string func0(int n) {
int count = 0;
for(int i = 1; i <= static_cast<int>(sqrt(n)) + 1; i++) {
if(n % i == 0) {
if(n / i == i) {
count += 1;
} else {
count += 2;
}
}
}
if(count % 2 == 0) {
return... | int main() {
assert(func0(10) == "Even");
assert(func0(100) == "Odd");
assert(func0(125) == "Even");
return 0;
}
| O3 | cpp | func0[abi:cxx11](int):
endbr64
pxor %xmm1,%xmm1
push %r13
cvtsi2sd %esi,%xmm1
push %r12
mov %rdi,%r12
push %rbp
push %rbx
movapd %xmm1,%xmm0
sqrtsd %xmm0,%xmm0
sub $0x18,%rsp
cvttsd2si %xmm0,%r8d
pxor %xmm0,%xmm0
ucomisd %xmm1,%xmm0
lea 0x1(%r8),%ebp
ja 13db <_Z5func0B5cxx11i+0xdb>
test %ebp,... | _Z5func0B5cxx11i:
endbr64
pxor xmm1, xmm1
push r13
pxor xmm0, xmm0
cvtsi2sd xmm1, esi
push rbp
push rbx
mov ebx, esi
sub rsp, 10h
ucomisd xmm0, xmm1
ja loc_13CE
sqrtsd xmm1, xmm1
mov ecx, 1
xor ebp, ebp
cvttsd2si esi, xmm1
test esi, esi
jns short loc_1352
jmp short loc_13... | long long func0[abi:cxx11](long long a1, int a2)
{
double v2; // xmm1_8
int v4; // ecx
char v5; // bp
int v6; // esi
long long result; // rax
int v8; // r13d
v2 = (double)a2;
if ( (double)a2 < 0.0 )
{
v8 = 1;
v5 = 0;
while ( v8 <= (int)sqrt(v2) + 1 )
{
if ( !(a2 % v8) )
... | func0[abi:cxx11]:
ENDBR64
PXOR XMM1,XMM1
PUSH R13
PXOR XMM0,XMM0
CVTSI2SD XMM1,ESI
PUSH RBP
PUSH RBX
MOV EBX,ESI
SUB RSP,0x10
UCOMISD XMM0,XMM1
JA 0x001013ce
SQRTSD XMM1,XMM1
MOV ECX,0x1
XOR EBP,EBP
CVTTSD2SI ESI,XMM1
TEST ESI,ESI
JNS 0x00101352
JMP 0x001013a8
LAB_00101350:
MOV ECX,EAX
LAB_00101352:
MOV EAX,EBX
CDQ
IDI... | /* func0[abi:cxx11](int) */
long * func0_abi_cxx11_(int param_1)
{
bool bVar1;
byte bVar2;
int in_ESI;
int4 in_register_0000003c;
long *plVar3;
int iVar4;
double dVar5;
double __x;
plVar3 = (long *)CONCAT44(in_register_0000003c,param_1);
__x = (double)in_ESI;
if (__x < 0.0) {
bVar2 = 0;
... |
3,124 | func0 |
#include <vector>
#include <cassert>
| int func0(const std::vector<int>& arr) {
int Sum = 0;
int l = arr.size();
for (int i = 0; i < l; i++) {
Sum += ((((i + 1) * (l - i) + 1) / 2) * arr[i]);
}
return Sum;
}
| int main() {
assert(func0({1,2,4}) == 14);
assert(func0({1,2,1,2}) == 15);
assert(func0({1,7}) == 8);
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x28,%rsp
mov %rdi,-0x28(%rbp)
movl $0x0,-0x1c(%rbp)
mov -0x28(%rbp),%rax
mov %rax,%rdi
callq 1534 <_ZNKSt6vectorIiSaIiEE4sizeEv>
mov %eax,-0x14(%rbp)
movl $0x0,-0x18(%rbp)
mov -0x18(%rbp),... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 28h
mov [rbp+var_28], rdi
mov [rbp+var_1C], 0
mov rax, [rbp+var_28]
mov rdi, rax
call _ZNKSt6vectorIiSaIiEE4sizeEv; std::vector<int>::size(void)
mov [rbp+var_14], eax
mov [rbp+var_18], 0
jmp short l... | long long func0(long long a1)
{
unsigned int v2; // [rsp+14h] [rbp-1Ch]
int i; // [rsp+18h] [rbp-18h]
int v4; // [rsp+1Ch] [rbp-14h]
v2 = 0;
v4 = std::vector<int>::size(a1);
for ( i = 0; i < v4; ++i )
v2 += ((i + 1) * (v4 - i) + 1) / 2 * *(_DWORD *)std::vector<int>::operator[](a1, i);
return v2;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x28
MOV qword ptr [RBP + -0x28],RDI
MOV dword ptr [RBP + -0x1c],0x0
MOV RAX,qword ptr [RBP + -0x28]
MOV RDI,RAX
CALL 0x001015b6
MOV dword ptr [RBP + -0x14],EAX
MOV dword ptr [RBP + -0x18],0x0
JMP 0x001012b7
LAB_00101279:
MOV EAX,dword ptr [RBP + -0x18]
LEA EDX,[RAX ... | /* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
int iVar1;
int *piVar2;
int4 local_24;
int4 local_20;
local_24 = 0;
iVar1 = std::vector<int,std::allocator<int>>::size((vector<int,std::allocator<int>> *)param_1);
for (local_20 = 0; local_20 < iVar1; local_20 = l... |
3,125 | func0 |
#include <vector>
#include <cassert>
| int func0(const std::vector<int>& arr) {
int Sum = 0;
int l = arr.size();
for (int i = 0; i < l; i++) {
Sum += ((((i + 1) * (l - i) + 1) / 2) * arr[i]);
}
return Sum;
}
| int main() {
assert(func0({1,2,4}) == 14);
assert(func0({1,2,1,2}) == 15);
assert(func0({1,7}) == 8);
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
mov (%rdi),%r9
mov 0x8(%rdi),%rdi
sub %r9,%rdi
sar $0x2,%rdi
test %edi,%edi
jle 125b <_Z5func0RKSt6vectorIiSaIiEE+0x52>
lea -0x1(%rdi),%r8d
add $0x2,%r8
mov $0x1,%ecx
mov $0x0,%esi
add $0x1,%edi
mov %edi,%eax
sub %ecx,%e... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
mov r9, [rdi]
mov rdi, [rdi+8]
sub rdi, r9
sar rdi, 2
test edi, edi
jle short loc_125B
lea r8d, [rdi-1]
add r8, 2
mov ecx, 1
mov esi, 0
add edi, 1
loc_1234:
mov edx, edi
sub edx, ecx
imul edx, ecx
add edx, 1
mov eax, edx
... | long long func0(long long *a1)
{
long long v1; // r9
long long v2; // rdi
long long v3; // r8
long long v4; // rcx
unsigned int v5; // esi
int v6; // edi
v1 = *a1;
v2 = (a1[1] - *a1) >> 2;
if ( (int)v2 <= 0 )
{
return 0;
}
else
{
v3 = (unsigned int)(v2 - 1) + 2LL;
v4 = 1LL;
v... | func0:
ENDBR64
MOV R9,qword ptr [RDI]
MOV RDI,qword ptr [RDI + 0x8]
SUB RDI,R9
SAR RDI,0x2
TEST EDI,EDI
JLE 0x0010125b
LEA R8D,[RDI + -0x1]
ADD R8,0x2
MOV ECX,0x1
MOV ESI,0x0
ADD EDI,0x1
LAB_00101234:
MOV EDX,EDI
SUB EDX,ECX
IMUL EDX,ECX
ADD EDX,0x1
MOV EAX,EDX
SHR EAX,0x1f
ADD EAX,EDX
SAR EAX,0x1
IMUL EAX,dword ptr [R... | /* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
long lVar1;
int iVar2;
int iVar3;
iVar3 = (int)(*(long *)(param_1 + 8) - *(long *)param_1 >> 2);
if (iVar3 < 1) {
iVar2 = 0;
}
else {
lVar1 = 1;
iVar2 = 0;
do {
iVar2 = iVar2 + ((((iVar3 + 1)... |
3,126 | func0 |
#include <vector>
#include <cassert>
| int func0(const std::vector<int>& arr) {
int Sum = 0;
int l = arr.size();
for (int i = 0; i < l; i++) {
Sum += ((((i + 1) * (l - i) + 1) / 2) * arr[i]);
}
return Sum;
}
| int main() {
assert(func0({1,2,4}) == 14);
assert(func0({1,2,1,2}) == 15);
assert(func0({1,7}) == 8);
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
mov (%rdi),%rsi
mov 0x8(%rdi),%rax
sub %rsi,%rax
sar $0x2,%rax
test %eax,%eax
jle 14a8 <_Z5func0RKSt6vectorIiSaIiEE+0x58>
lea -0x1(%rax),%ecx
mov $0x1,%edx
lea 0x1(%rax),%edi
xor %r8d,%r8d
add $0x2,%rcx
nopl 0x0(%rax,%rax,1)... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
mov r8, [rdi]
mov rax, [rdi+8]
sub rax, r8
sar rax, 2
test eax, eax
jle short loc_13D0
lea edi, [rax-1]
mov ecx, 1
lea r9d, [rax+1]
xor esi, esi
add rdi, 2
nop dword ptr [rax+rax+00000000h]
loc_13A0:
mov edx, r9d
sub edx, ecx
im... | long long func0(long long *a1)
{
long long v1; // r8
long long v2; // rax
long long v3; // rcx
int v4; // r9d
unsigned int v5; // esi
long long v6; // rdi
int v7; // eax
v1 = *a1;
v2 = (a1[1] - *a1) >> 2;
if ( (int)v2 <= 0 )
return 0LL;
v3 = 1LL;
v4 = v2 + 1;
v5 = 0;
v6 = (unsigned int... | func0:
ENDBR64
MOV R8,qword ptr [RDI]
MOV RAX,qword ptr [RDI + 0x8]
SUB RAX,R8
SAR RAX,0x2
TEST EAX,EAX
JLE 0x001013d0
LEA EDI,[RAX + -0x1]
MOV ECX,0x1
LEA R9D,[RAX + 0x1]
XOR ESI,ESI
ADD RDI,0x2
NOP dword ptr [RAX + RAX*0x1]
LAB_001013a0:
MOV EDX,R9D
SUB EDX,ECX
IMUL EDX,ECX
ADD EDX,0x1
MOV EAX,EDX
SHR EAX,0x1f
ADD EA... | /* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
long lVar1;
int iVar2;
int iVar3;
long lVar4;
int iVar5;
iVar2 = (int)(*(long *)(param_1 + 8) - *(long *)param_1 >> 2);
if (0 < iVar2) {
lVar4 = 1;
iVar5 = 0;
do {
iVar3 = (int)lVar4;
lVar1... |
3,127 | func0 |
#include <vector>
#include <cassert>
| int func0(const std::vector<int>& arr) {
int Sum = 0;
int l = arr.size();
for (int i = 0; i < l; i++) {
Sum += ((((i + 1) * (l - i) + 1) / 2) * arr[i]);
}
return Sum;
}
| int main() {
assert(func0({1,2,4}) == 14);
assert(func0({1,2,1,2}) == 15);
assert(func0({1,7}) == 8);
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
mov (%rdi),%rsi
mov 0x8(%rdi),%rdx
sub %rsi,%rdx
sar $0x2,%rdx
mov %edx,-0xc(%rsp)
test %edx,%edx
jle 1970 <_Z5func0RKSt6vectorIiSaIiEE+0x180>
lea -0x1(%rdx),%eax
cmp $0x3,%eax
jbe 1979 <_Z5func0RKSt6vectorIiSaIiEE+0x189>
mov ... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
mov rsi, [rdi]
mov rdx, [rdi+8]
sub rdx, rsi
sar rdx, 2
test edx, edx
jle loc_1978
lea eax, [rdx-1]
cmp eax, 2
jbe loc_197B
mov ecx, edx
movd xmm5, edx
pxor xmm2, xmm2
mov rax, rsi
shr ecx, 2
movdqa xmm3, cs:xmmword_20B0
movdqa ... | long long func0(long long *a1)
{
long long v1; // rsi
long long v2; // rdx
__m128i v3; // xmm2
long long v4; // rax
__m128i si128; // xmm3
__m128i v6; // xmm6
__m128i v7; // xmm7
__m128i v8; // xmm4
__m128i v9; // xmm0
__m128i v10; // xmm8
__m128i v11; // xmm0
__m128i v12; // xmm0
__m128i v13... | func0:
ENDBR64
MOV RSI,qword ptr [RDI]
MOV RDX,qword ptr [RDI + 0x8]
SUB RDX,RSI
SAR RDX,0x2
TEST EDX,EDX
JLE 0x00101978
LEA EAX,[RDX + -0x1]
CMP EAX,0x2
JBE 0x0010197b
MOV ECX,EDX
MOVD XMM5,EDX
PXOR XMM2,XMM2
MOV RAX,RSI
SHR ECX,0x2
MOVDQA XMM3,xmmword ptr [0x001020b0]
MOVDQA XMM6,xmmword ptr [0x001020c0]
PSHUFD XMM7,... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
long lVar1;
ulong *puVar2;
ulong *puVar3;
ulong *puVar4;
uint uVar5;
ulong uVar6;
uint uVar7;
int iVar8;
int iVar10;
int iVar... |
3,128 | func0 |
#include <tuple>
#include <algorithm>
#include <cassert>
#include <cmath>
| std::tuple<double, double, double> func0(int r, int g, int b) {
double rd = r / 255.0, gd = g / 255.0, bd = b / 255.0;
double mx = std::max({rd, gd, bd});
double mn = std::min({rd, gd, bd});
double df = mx - mn;
double h;
if (mx == mn)
h = 0.0;
else if (mx == rd)
h =... | int main() {
assert(func0(255, 255, 255) == std::make_tuple(0.0, 0.0, 100.0));
assert(func0(0, 215, 0) == std::make_tuple(120.0, 100.0, 84.31372549019608));
assert(func0(10, 215, 110) == std::make_tuple(149.26829268292684, 95.34883720930233, 84.31372549019608));
}
| O0 | cpp | func0(int, int, int):
endbr64
push %rbp
mov %rsp,%rbp
push %r13
push %r12
push %rbx
sub $0x98,%rsp
mov %rdi,-0x98(%rbp)
mov %esi,-0x9c(%rbp)
mov %edx,-0xa0(%rbp)
mov %ecx,-0xa4(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x28(%rbp)
xor %eax,%eax
cvtsi2sdl -0x9c(%rbp),%xmm0
movsd 0x1f5b(%rip),%... | _Z5func0iii:
endbr64
push rbp
mov rbp, rsp
push r13
push r12
push rbx
sub rsp, 98h
mov [rbp+var_98], rdi
mov [rbp+var_9C], esi
mov [rbp+var_A0], edx
mov [rbp+var_A4], ecx
mov rax, fs:28h
mov [rbp+var_28], rax
xor eax, eax
pxor xmm0, xmm0
cvtsi2sd xmm0, [rbp+var_9C]
mov... | long long func0(long long a1, int a2, int a3, int a4)
{
double v5; // [rsp+28h] [rbp-88h] BYREF
double v6; // [rsp+30h] [rbp-80h] BYREF
double v7; // [rsp+38h] [rbp-78h] BYREF
double v8; // [rsp+40h] [rbp-70h]
double v9; // [rsp+48h] [rbp-68h]
double v10; // [rsp+50h] [rbp-60h]
double v11; // [rsp+58h] [... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x98
MOV qword ptr [RBP + -0x98],RDI
MOV dword ptr [RBP + -0x9c],ESI
MOV dword ptr [RBP + -0xa0],EDX
MOV dword ptr [RBP + -0xa4],ECX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
XOR EAX,EAX
PXOR XMM0,XMM0
CVTSI2SD XMM0,dword ptr [RBP ... | /* func0(int, int, int) */
double * func0(int param_1,int param_2,int param_3)
{
int in_ECX;
int4 in_register_0000003c;
long in_FS_OFFSET;
double local_90;
double local_88;
double local_80;
double local_78;
double local_70;
double local_68;
double local_60;
double local_58;
double local_50;
... |
3,129 | func0 |
#include <tuple>
#include <algorithm>
#include <cassert>
#include <cmath>
| std::tuple<double, double, double> func0(int r, int g, int b) {
double rd = r / 255.0, gd = g / 255.0, bd = b / 255.0;
double mx = std::max({rd, gd, bd});
double mn = std::min({rd, gd, bd});
double df = mx - mn;
double h;
if (mx == mn)
h = 0.0;
else if (mx == rd)
h =... | int main() {
assert(func0(255, 255, 255) == std::make_tuple(0.0, 0.0, 100.0));
assert(func0(0, 215, 0) == std::make_tuple(120.0, 100.0, 84.31372549019608));
assert(func0(10, 215, 110) == std::make_tuple(149.26829268292684, 95.34883720930233, 84.31372549019608));
}
| O1 | cpp | func0(int, int, int):
endbr64
push %rbx
sub $0x30,%rsp
mov %rdi,%rbx
mov %fs:0x28,%rax
mov %rax,0x28(%rsp)
xor %eax,%eax
pxor %xmm0,%xmm0
cvtsi2sd %esi,%xmm0
movsd 0xf9b(%rip),%xmm1
divsd %xmm1,%xmm0
pxor %xmm2,%xmm2
cvtsi2sd %edx,%xmm2
divsd %xmm1,%xmm2
pxor %xmm3,%xmm3
cvtsi2sd %ecx,%xmm3
di... | _Z5func0iii:
endbr64
push rbx
sub rsp, 40h
mov rbx, rdi
mov rax, fs:28h
mov [rsp+48h+var_10], rax
xor eax, eax
pxor xmm0, xmm0
cvtsi2sd xmm0, esi
movsd xmm3, cs:qword_2120
divsd xmm0, xmm3
pxor xmm1, xmm1
cvtsi2sd xmm1, edx
divsd xmm1, xmm3
pxor xmm2, xmm2
cvtsi2sd xmm2, ecx
divsd ... | double * func0(double *a1, int a2, int a3, int a4)
{
double v4; // xmm0_8
double v5; // xmm1_8
double v6; // xmm2_8
double *v7; // rax
double v8; // xmm4_8
double *v9; // rax
double v10; // xmm1_8
long double v12; // fst6
char v14; // c2
long double v15; // fst6
char v17; // c2
long double v18; ... | func0:
ENDBR64
PUSH RBX
SUB RSP,0x40
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
PXOR XMM0,XMM0
CVTSI2SD XMM0,ESI
MOVSD XMM3,qword ptr [0x00102120]
DIVSD XMM0,XMM3
PXOR XMM1,XMM1
CVTSI2SD XMM1,EDX
DIVSD XMM1,XMM3
PXOR XMM2,XMM2
CVTSI2SD XMM2,ECX
DIVSD XMM2,XMM3
MOVSD qword ptr [RS... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(int, int, int) */
double * func0(int param_1,int param_2,int param_3)
{
double dVar1;
double *pdVar2;
double *pdVar3;
int in_ECX;
int4 in_register_0000003c;
long in_FS_OFFSET;
ushort in_FPUStatusWord;
double ... |
3,130 | func0 |
#include <tuple>
#include <algorithm>
#include <cassert>
#include <cmath>
| std::tuple<double, double, double> func0(int r, int g, int b) {
double rd = r / 255.0, gd = g / 255.0, bd = b / 255.0;
double mx = std::max({rd, gd, bd});
double mn = std::min({rd, gd, bd});
double df = mx - mn;
double h;
if (mx == mn)
h = 0.0;
else if (mx == rd)
h =... | int main() {
assert(func0(255, 255, 255) == std::make_tuple(0.0, 0.0, 100.0));
assert(func0(0, 215, 0) == std::make_tuple(120.0, 100.0, 84.31372549019608));
assert(func0(10, 215, 110) == std::make_tuple(149.26829268292684, 95.34883720930233, 84.31372549019608));
}
| O2 | cpp | func0(int, int, int):
endbr64
push %r12
pxor %xmm3,%xmm3
pxor %xmm0,%xmm0
pxor %xmm4,%xmm4
cvtsi2sd %edx,%xmm3
mov %rdi,%r12
cvtsi2sd %esi,%xmm0
sub $0x10,%rsp
movsd 0xdef(%rip),%xmm1
cvtsi2sd %ecx,%xmm4
divsd %xmm1,%xmm3
divsd %xmm1,%xmm0
movapd %xmm3,%xmm2
divsd %xmm1,%xmm4
movapd %xmm3,%xmm1
maxsd ... | _Z5func0iii:
endbr64
pxor xmm1, xmm1
pxor xmm0, xmm0
pxor xmm2, xmm2
sub rsp, 38h
cvtsi2sd xmm1, esi
movsd xmm3, cs:qword_2120
cvtsi2sd xmm0, edx
cvtsi2sd xmm2, ecx
divsd xmm1, xmm3
divsd xmm0, xmm3
divsd xmm2, xmm3
comisd xmm0, xmm1
ja loc_1450
comisd xmm1, xmm0
movapd xmm3, xmm2
movapd x... | __m128d * func0(__m128d *a1, int a2, int a3, int a4)
{
double v4; // xmm1_8
__int128 v5; // xmm0
__int128 v6; // xmm2
double v7; // xmm5_8
__int128 v8; // xmm3
double v9; // xmm5_8
bool v10; // zf
__m128d v11; // xmm4
double v12; // xmm5_8
long double v13; // fst6
char v15; // c2
long double v16... | func0:
ENDBR64
PXOR XMM1,XMM1
PXOR XMM0,XMM0
PXOR XMM2,XMM2
SUB RSP,0x38
CVTSI2SD XMM1,ESI
MOVSD XMM3,qword ptr [0x00102120]
CVTSI2SD XMM0,EDX
CVTSI2SD XMM2,ECX
DIVSD XMM1,XMM3
DIVSD XMM0,XMM3
DIVSD XMM2,XMM3
COMISD XMM0,XMM1
JA 0x00101450
COMISD XMM1,XMM0
MOVAPD XMM3,XMM2
MOVAPD XMM5,XMM0
MAXSD XMM3,XMM1
JBE 0x0010145... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(int, int, int) */
double * func0(int param_1,int param_2,int param_3)
{
double dVar1;
int in_ECX;
int4 in_register_0000003c;
double *pdVar2;
ushort in_FPUStatusWord;
double dVar3;
double dVar4;
double dVar5;
... |
3,131 | func0 |
#include <tuple>
#include <algorithm>
#include <cassert>
#include <cmath>
| std::tuple<double, double, double> func0(int r, int g, int b) {
double rd = r / 255.0, gd = g / 255.0, bd = b / 255.0;
double mx = std::max({rd, gd, bd});
double mn = std::min({rd, gd, bd});
double df = mx - mn;
double h;
if (mx == mn)
h = 0.0;
else if (mx == rd)
h =... | int main() {
assert(func0(255, 255, 255) == std::make_tuple(0.0, 0.0, 100.0));
assert(func0(0, 215, 0) == std::make_tuple(120.0, 100.0, 84.31372549019608));
assert(func0(10, 215, 110) == std::make_tuple(149.26829268292684, 95.34883720930233, 84.31372549019608));
}
| O3 | cpp | func0(int, int, int):
endbr64
push %r12
pxor %xmm3,%xmm3
pxor %xmm0,%xmm0
pxor %xmm4,%xmm4
cvtsi2sd %edx,%xmm3
mov %rdi,%r12
cvtsi2sd %esi,%xmm0
sub $0x10,%rsp
movsd 0xdef(%rip),%xmm1
cvtsi2sd %ecx,%xmm4
divsd %xmm1,%xmm3
divsd %xmm1,%xmm0
movapd %xmm3,%xmm2
divsd %xmm1,%xmm4
movapd %xmm3,%xmm1
maxsd ... | _Z5func0iii:
endbr64
pxor xmm0, xmm0
pxor xmm1, xmm1
pxor xmm2, xmm2
sub rsp, 38h
cvtsi2sd xmm0, esi
movsd xmm3, cs:qword_2128
cvtsi2sd xmm1, edx
cvtsi2sd xmm2, ecx
divsd xmm0, xmm3
divsd xmm1, xmm3
divsd xmm2, xmm3
comisd xmm1, xmm0
ja loc_1450
comisd xmm2, xmm0
jbe loc_1490
comisd xmm... | __m128d * func0(__m128d *a1, int a2, int a3, int a4)
{
__int128 v4; // xmm0
__int128 v5; // xmm1
__int128 v6; // xmm2
double v7; // xmm5_8
__int128 v8; // xmm3
bool v9; // zf
__m128d v10; // xmm4
double v11; // xmm5_8
long double v12; // fst6
char v14; // c2
long double v15; // fst7
__m128d v16;... | func0:
ENDBR64
PXOR XMM0,XMM0
PXOR XMM1,XMM1
PXOR XMM2,XMM2
SUB RSP,0x38
CVTSI2SD XMM0,ESI
MOVSD XMM3,qword ptr [0x00102128]
CVTSI2SD XMM1,EDX
CVTSI2SD XMM2,ECX
DIVSD XMM0,XMM3
DIVSD XMM1,XMM3
DIVSD XMM2,XMM3
COMISD XMM1,XMM0
JA 0x00101450
COMISD XMM2,XMM0
JBE 0x00101490
COMISD XMM0,XMM1
JBE 0x001015b4
MOVAPD XMM5,XMM1... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(int, int, int) */
double * func0(int param_1,int param_2,int param_3)
{
double dVar1;
int in_ECX;
int4 in_register_0000003c;
double *pdVar2;
ushort in_FPUStatusWord;
double dVar3;
double dVar4;
double dVar5;
... |
3,132 | func0 |
#include <vector>
#include <cassert>
| int func0(const std::vector<int>& list1) {
int first_even = -1;
int first_odd = -1;
for (int el : list1) {
if (el % 2 == 0 && first_even == -1) first_even = el;
if (el % 2 != 0 && first_odd == -1) first_odd = el;
if (first_even != -1 && first_odd != -1) break;
}
retur... | int main() {
assert(func0({1,3,5,7,4,1,6,8}) == 4);
assert(func0({1,2,3,4,5,6,7,8,9,10}) == 2);
assert(func0({1,5,7,9,10}) == 10);
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x40,%rsp
mov %rdi,-0x38(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x8(%rbp)
xor %eax,%eax
movl $0xffffffff,-0x2c(%rbp)
movl $0xffffffff,-0x28(%rbp)
mov -0x38(%rbp),%rax
mov %rax,-0x10(%rbp)
mov -0x10(%rb... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_38], rdi
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
mov [rbp+var_2C], 0FFFFFFFFh
mov [rbp+var_28], 0FFFFFFFFh
mov rax, [rbp+var_38]
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov ... | long long func0(long long a1)
{
int v2; // [rsp+14h] [rbp-2Ch]
int v3; // [rsp+18h] [rbp-28h]
int v4; // [rsp+1Ch] [rbp-24h]
long long v5; // [rsp+20h] [rbp-20h] BYREF
_QWORD v6[3]; // [rsp+28h] [rbp-18h] BYREF
v6[2] = __readfsqword(0x28u);
v2 = -1;
v3 = -1;
v6[1] = a1;
v5 = std::vector<int>::begi... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x38],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
MOV dword ptr [RBP + -0x2c],0xffffffff
MOV dword ptr [RBP + -0x28],0xffffffff
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -... | /* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
uint uVar1;
bool bVar2;
uint *puVar3;
long in_FS_OFFSET;
uint local_34;
uint local_30;
int8 local_28;
int8 local_20;
vector<int,std::allocator<int>> *local_18;
long local_10;
local_10 = *(long *)(in_FS_OFF... |
3,133 | func0 |
#include <vector>
#include <cassert>
| int func0(const std::vector<int>& list1) {
int first_even = -1;
int first_odd = -1;
for (int el : list1) {
if (el % 2 == 0 && first_even == -1) first_even = el;
if (el % 2 != 0 && first_odd == -1) first_odd = el;
if (first_even != -1 && first_odd != -1) break;
}
retur... | int main() {
assert(func0({1,3,5,7,4,1,6,8}) == 4);
assert(func0({1,2,3,4,5,6,7,8,9,10}) == 2);
assert(func0({1,5,7,9,10}) == 10);
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
mov (%rdi),%rdx
mov 0x8(%rdi),%r8
cmp %r8,%rdx
je 1256 <_Z5func0RKSt6vectorIiSaIiEE+0x4d>
mov $0xffffffff,%esi
mov $0xffffffff,%eax
jmp 1242 <_Z5func0RKSt6vectorIiSaIiEE+0x39>
cmp $0xffffffff,%esi
jne 122f <_Z5func0RKSt6vectorIiSa... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
mov rdx, [rdi]
mov r8, [rdi+8]
cmp r8, rdx
jz short loc_1256
mov esi, 0FFFFFFFFh
mov eax, 0FFFFFFFFh
jmp short loc_1242
loc_1225:
cmp esi, 0FFFFFFFFh
jnz short loc_122F
test edi, edi
cmovnz esi, ecx
loc_122F:
cmp eax, 0FFFFFFFFh
jz s... | long long func0(int **a1)
{
int *v1; // rdx
int *v2; // r8
int v3; // esi
int v4; // eax
int v5; // edi
v1 = *a1;
v2 = a1[1];
if ( v2 == *a1 )
{
v3 = -1;
v4 = -1;
}
else
{
v3 = -1;
v4 = -1;
do
{
v5 = *v1 & 1;
if ( v4 != -1 || v5 )
{
if ( v3 == ... | func0:
ENDBR64
MOV RDX,qword ptr [RDI]
MOV R8,qword ptr [RDI + 0x8]
CMP R8,RDX
JZ 0x00101256
MOV ESI,0xffffffff
MOV EAX,0xffffffff
JMP 0x00101242
LAB_00101225:
CMP ESI,-0x1
JNZ 0x0010122f
TEST EDI,EDI
CMOVNZ ESI,ECX
LAB_0010122f:
CMP EAX,-0x1
JZ 0x00101239
CMP ESI,-0x1
JNZ 0x00101260
LAB_00101239:
ADD RDX,0x4
CMP R8,RD... | /* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
uint uVar1;
uint uVar2;
uint uVar3;
uint *puVar4;
uint uVar5;
puVar4 = *(uint **)param_1;
if (*(uint **)(param_1 + 8) == puVar4) {
uVar5 = 0xffffffff;
uVar2 = 0xffffffff;
}
else {
uVar5 = 0xfffffff... |
3,134 | func0 |
#include <vector>
#include <cassert>
| int func0(const std::vector<int>& list1) {
int first_even = -1;
int first_odd = -1;
for (int el : list1) {
if (el % 2 == 0 && first_even == -1) first_even = el;
if (el % 2 != 0 && first_odd == -1) first_odd = el;
if (first_even != -1 && first_odd != -1) break;
}
retur... | int main() {
assert(func0({1,3,5,7,4,1,6,8}) == 4);
assert(func0({1,2,3,4,5,6,7,8,9,10}) == 2);
assert(func0({1,5,7,9,10}) == 10);
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
mov (%rdi),%rdx
mov 0x8(%rdi),%rdi
cmp %rdi,%rdx
je 1454 <_Z5func0RKSt6vectorIiSaIiEE+0x54>
mov $0xffffffff,%esi
mov $0xffffffff,%eax
jmp 1439 <_Z5func0RKSt6vectorIiSaIiEE+0x39>
nopl 0x0(%rax)
cmp $0xffffffff,%eax
cmove %ecx,%eax
... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
mov rdx, [rdi]
mov rdi, [rdi+8]
cmp rdi, rdx
jz short loc_13E4
mov eax, 0FFFFFFFFh
mov esi, 0FFFFFFFFh
jmp short loc_13C9
loc_13B0:
cmp eax, 0FFFFFFFFh
cmovz eax, ecx
loc_13B6:
cmp esi, 0FFFFFFFFh
jz short loc_13C0
cmp eax, 0FFFFFFFFh
... | long long func0(int **a1)
{
int *v1; // rdx
int *v2; // rdi
int v3; // eax
int v4; // esi
v1 = *a1;
v2 = a1[1];
if ( v2 == v1 )
return 1LL;
v3 = -1;
v4 = -1;
do
{
if ( (*v1 & 1) != 0 )
{
if ( v3 == -1 )
v3 = *v1;
}
else if ( v4 == -1 )
{
v4 = *v1;
... | func0:
ENDBR64
MOV RDX,qword ptr [RDI]
MOV RDI,qword ptr [RDI + 0x8]
CMP RDI,RDX
JZ 0x001013e4
MOV EAX,0xffffffff
MOV ESI,0xffffffff
JMP 0x001013c9
LAB_001013b0:
CMP EAX,-0x1
CMOVZ EAX,ECX
LAB_001013b6:
CMP ESI,-0x1
JZ 0x001013c0
CMP EAX,-0x1
JNZ 0x001013e0
LAB_001013c0:
ADD RDX,0x4
CMP RDI,RDX
JZ 0x001013e0
LAB_001013... | /* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
uint uVar1;
uint uVar2;
uint *puVar3;
uint uVar4;
puVar3 = *(uint **)param_1;
if (*(uint **)(param_1 + 8) == puVar3) {
return 1;
}
uVar2 = 0xffffffff;
uVar4 = 0xffffffff;
do {
uVar1 = *puVar3;
if... |
3,135 | func0 |
#include <vector>
#include <cassert>
| int func0(const std::vector<int>& list1) {
int first_even = -1;
int first_odd = -1;
for (int el : list1) {
if (el % 2 == 0 && first_even == -1) first_even = el;
if (el % 2 != 0 && first_odd == -1) first_odd = el;
if (first_even != -1 && first_odd != -1) break;
}
retur... | int main() {
assert(func0({1,3,5,7,4,1,6,8}) == 4);
assert(func0({1,2,3,4,5,6,7,8,9,10}) == 2);
assert(func0({1,5,7,9,10}) == 10);
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
mov (%rdi),%rdx
mov 0x8(%rdi),%rdi
cmp %rdi,%rdx
je 1404 <_Z5func0RKSt6vectorIiSaIiEE+0x54>
mov $0xffffffff,%esi
mov $0xffffffff,%eax
jmp 13e9 <_Z5func0RKSt6vectorIiSaIiEE+0x39>
nopl 0x0(%rax)
cmp $0xffffffff,%eax
cmove %ecx,%eax
... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
mov rdx, [rdi]
mov rdi, [rdi+8]
cmp rdi, rdx
jz short loc_13E4
mov eax, 0FFFFFFFFh
mov esi, 0FFFFFFFFh
jmp short loc_13C9
loc_13B0:
cmp eax, 0FFFFFFFFh
cmovz eax, ecx
loc_13B6:
cmp esi, 0FFFFFFFFh
jz short loc_13C0
cmp eax, 0FFFFFFFFh
... | long long func0(int **a1)
{
int *v1; // rdx
int *v2; // rdi
int v3; // eax
int v4; // esi
v1 = *a1;
v2 = a1[1];
if ( v2 == v1 )
return 1LL;
v3 = -1;
v4 = -1;
do
{
if ( (*v1 & 1) != 0 )
{
if ( v3 == -1 )
v3 = *v1;
}
else if ( v4 == -1 )
{
v4 = *v1;
... | func0:
ENDBR64
MOV RDX,qword ptr [RDI]
MOV RDI,qword ptr [RDI + 0x8]
CMP RDI,RDX
JZ 0x001013e4
MOV EAX,0xffffffff
MOV ESI,0xffffffff
JMP 0x001013c9
LAB_001013b0:
CMP EAX,-0x1
CMOVZ EAX,ECX
LAB_001013b6:
CMP ESI,-0x1
JZ 0x001013c0
CMP EAX,-0x1
JNZ 0x001013e0
LAB_001013c0:
ADD RDX,0x4
CMP RDI,RDX
JZ 0x001013e0
LAB_001013... | /* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
uint uVar1;
uint uVar2;
uint *puVar3;
uint uVar4;
puVar3 = *(uint **)param_1;
if (*(uint **)(param_1 + 8) == puVar3) {
return 1;
}
uVar2 = 0xffffffff;
uVar4 = 0xffffffff;
do {
uVar1 = *puVar3;
if... |
3,136 | func0 |
#include <tuple>
#include <string>
#include <cassert>
#include <algorithm>
#include <sstream>
| std::tuple<int, int, int> func0(const std::string& test_str) {
std::string s = test_str;
// Remove '(', ')', and '...'
s.erase(std::remove(s.begin(), s.end(), '('), s.end());
s.erase(std::remove(s.begin(), s.end(), ')'), s.end());
size_t pos = s.find("...");
if (pos != std::string::npos) {... | int main() {
assert(func0("(7, 8, 9)") == std::make_tuple(7, 8, 9));
assert(func0("(1, 2, 3)") == std::make_tuple(1, 2, 3));
assert(func0("(4, 5, 6)") == std::make_tuple(4, 5, 6));
}
| 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 $0x1f8,%rsp
mov %rdi,-0x1f8(%rbp)
mov %rsi,-0x200(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x200(%rbp),%rdx
lea -0x1c0(%rbp),... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 1F8h
mov [rbp+var_1F8], rdi
mov [rbp+var_200], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rdx, [rbp+var_200]
lea rax, [rbp+var_1C0]
mov rsi, rdx
m... | long long func0(long long a1, long long a2)
{
long long v2; // rbx
long long v3; // rax
long long v4; // rbx
long long v5; // rax
long long v6; // rax
long long v7; // rax
long long v8; // rax
long long v9; // rax
char v11; // [rsp+17h] [rbp-1E9h] BYREF
long long v12; // [rsp+18h] [rbp-1E8h] BYREF
... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x1f8
MOV qword ptr [RBP + -0x1f8],RDI
MOV qword ptr [RBP + -0x200],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RDX,qword ptr [RBP + -0x200]
LEA RAX,[RBP + -0x1c0]
MOV RSI,RDX
MOV RDI,RAX
LAB_0010248a:
CALL 0x001021f0
LEA RAX,[RBP ... | /* func0(std::string const&) */
string * func0(string *param_1)
{
__normal_iterator _Var1;
__normal_iterator _Var2;
int4 extraout_var;
int4 extraout_var_00;
istream *piVar3;
string *in_RSI;
long in_FS_OFFSET;
char local_1f1;
int8 local_1f0;
int8 local_1e8;
__normal_iterator local_1e0 [2];
__no... |
3,137 | func0 |
#include <tuple>
#include <string>
#include <cassert>
#include <algorithm>
#include <sstream>
| std::tuple<int, int, int> func0(const std::string& test_str) {
std::string s = test_str;
// Remove '(', ')', and '...'
s.erase(std::remove(s.begin(), s.end(), '('), s.end());
s.erase(std::remove(s.begin(), s.end(), ')'), s.end());
size_t pos = s.find("...");
if (pos != std::string::npos) {... | int main() {
assert(func0("(7, 8, 9)") == std::make_tuple(7, 8, 9));
assert(func0("(1, 2, 3)") == std::make_tuple(1, 2, 3));
assert(func0("(4, 5, 6)") == std::make_tuple(4, 5, 6));
}
| 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 $0x1d8,%rsp
mov %rdi,%rbx
mov %fs:0x28,%rax
mov %rax,0x1c8(%rsp)
xor %eax,%eax
lea 0x30(%rsp),%rax
mov %rax,0x20(%rsp)
mov (%rsi),%r12
mov ... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r13
push r12
push rbp
push rbx
sub rsp, 1D8h
mov rbx, rdi
mov rax, fs:28h
mov [rsp+1F8h+var_30], rax
xor eax, eax
lea rax, [rsp+1F8h+var_1C8]
mov [rsp+1F8h+var_1D8], rax
mov r12, [rsi]
mov rbp, [... | _DWORD * func0(_DWORD *a1, long long a2)
{
_BYTE *v3; // r12
size_t v4; // rbp
char *v5; // rbp
_BYTE *v6; // rax
_QWORD *v7; // rdi
char *v8; // rbp
_BYTE *v9; // rax
unsigned long long v10; // rax
long long v11; // rdx
long long v12; // rax
long long v13; // rax
long long v14; // rax
long lo... | func0:
ENDBR64
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x1d8
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x1c8],RAX
XOR EAX,EAX
LEA RAX,[RSP + 0x30]
MOV qword ptr [RSP + 0x20],RAX
MOV R12,qword ptr [RSI]
MOV RBP,qword ptr [RSI + 0x8]
MOV qword ptr [RSP + 0x18],RBP
CMP RBP,0xf
JA 0x00102478
CMP RBP,... | /* func0(std::string const&) */
string * func0(string *param_1)
{
int *__src;
int8 uVar1;
int8 uVar2;
__normal_iterator _Var3;
int4 extraout_var;
int4 extraout_var_00;
int8 uVar4;
istream *piVar5;
long lVar6;
int8 *in_RSI;
ulong uVar7;
long in_FS_OFFSET;
char local_1e9;
int local_1e8;
in... |
3,138 | func0 |
#include <tuple>
#include <string>
#include <cassert>
#include <algorithm>
#include <sstream>
| std::tuple<int, int, int> func0(const std::string& test_str) {
std::string s = test_str;
// Remove '(', ')', and '...'
s.erase(std::remove(s.begin(), s.end(), '('), s.end());
s.erase(std::remove(s.begin(), s.end(), ')'), s.end());
size_t pos = s.find("...");
if (pos != std::string::npos) {... | int main() {
assert(func0("(7, 8, 9)") == std::make_tuple(7, 8, 9));
assert(func0("(1, 2, 3)") == std::make_tuple(1, 2, 3));
assert(func0("(4, 5, 6)") == std::make_tuple(4, 5, 6));
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x1f8,%rsp
mov (%rsi),%r15
mov 0x8(%rsi),%r13
mov %fs:0x28,%rax
mov %rax,0x1e8(%rsp)
xor %eax,%eax
lea ... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
push r14
push r13
push r12
push rbp
mov rbp, rdi
push rbx
sub rsp, 208h
mov rbx, [rsi+8]
mov r12, [rsi]
mov rax, fs:28h
mov [rsp+238h+var_40], rax
xor eax, eax
lea r13, [rsp+238h+var_1D8]
l... | long long func0(long long a1, long long a2)
{
size_t v3; // rbx
_BYTE *v4; // r12
_QWORD *v5; // rax
char *v6; // rbx
_BYTE *v7; // rax
char *v8; // rbx
_BYTE *v9; // rax
size_t v10; // rax
long long v11; // rdx
void *v12; // rbx
_QWORD *v13; // rax
long long v14; // rax
long long v15; // rax... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
SUB RSP,0x208
MOV RBX,qword ptr [RSI + 0x8]
MOV R12,qword ptr [RSI]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x1f8],RAX
XOR EAX,EAX
LEA R13,[RSP + 0x60]
LEA RAX,[RSP + 0x50]
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x50],... | /* func0(std::string const&) */
string * func0(string *param_1)
{
int *__src;
int8 uVar1;
__normal_iterator _Var2;
int4 extraout_var;
int4 extraout_var_00;
istream *piVar3;
int **ppuVar4;
_Iter_equals_val _Var5;
int *puVar6;
int8 *in_RSI;
int *puVar7;
long in_FS_OFFSET;
char local_1f9;
int... |
3,139 | func0 |
#include <tuple>
#include <string>
#include <cassert>
#include <algorithm>
#include <sstream>
| std::tuple<int, int, int> func0(const std::string& test_str) {
std::string s = test_str;
// Remove '(', ')', and '...'
s.erase(std::remove(s.begin(), s.end(), '('), s.end());
s.erase(std::remove(s.begin(), s.end(), ')'), s.end());
size_t pos = s.find("...");
if (pos != std::string::npos) {... | int main() {
assert(func0("(7, 8, 9)") == std::make_tuple(7, 8, 9));
assert(func0("(1, 2, 3)") == std::make_tuple(1, 2, 3));
assert(func0("(4, 5, 6)") == std::make_tuple(4, 5, 6));
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r15
push %r14
push %r13
mov %rdi,%r13
push %r12
push %rbp
push %rbx
sub $0x1f8,%rsp
mov (%rsi),%r15
mov 0x8(%rsi),%r12
mov %fs:0x28,%rax
mov %rax,0x1e8(%rsp)
xor %eax,%eax
lea ... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
push r14
push r13
push r12
push rbp
mov rbp, rdi
push rbx
sub rsp, 208h
mov rbx, [rsi+8]
mov r12, [rsi]
mov rax, fs:28h
mov [rsp+238h+var_40], rax
xor eax, eax
lea r13, [rsp+238h+var_1D8]
l... | long long func0(long long a1, long long a2)
{
size_t v3; // rbx
_BYTE *v4; // r12
_QWORD *v5; // rax
char *v6; // rbx
_BYTE *v7; // rax
char *v8; // rbx
_BYTE *v9; // rax
size_t v10; // rax
long long v11; // rdx
void *v12; // rbx
_QWORD *v13; // rax
long long v14; // rax
long long v15; // rax... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
SUB RSP,0x208
MOV RBX,qword ptr [RSI + 0x8]
MOV R12,qword ptr [RSI]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x1f8],RAX
XOR EAX,EAX
LEA R13,[RSP + 0x60]
LEA RAX,[RSP + 0x50]
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x50],... | /* func0(std::string const&) */
string * func0(string *param_1)
{
int *__src;
int8 uVar1;
__normal_iterator _Var2;
int4 extraout_var;
int4 extraout_var_00;
istream *piVar3;
int **ppuVar4;
_Iter_equals_val _Var5;
int *puVar6;
int8 *in_RSI;
int *puVar7;
long in_FS_OFFSET;
char local_1f9;
int... |
3,140 | func0 |
#include <vector>
#include <algorithm>
#include <assert.h>
| int func0(const std::vector<int>& a, int x) {
int i = std::upper_bound(a.begin(), a.end(), x) - a.begin();
return i;
}
| int main() {
assert(func0({1,2,4,5}, 6) == 4);
assert(func0({1,2,4,5}, 3) == 2);
assert(func0({1,2,4,5}, 7) == 4);
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> > const&, int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x38,%rsp
mov %rdi,-0x38(%rbp)
mov %esi,-0x3c(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x38(%rbp),%rax
mov %rax,%rdi
callq 15f2 <_ZNKSt6vectorIiSaIiEE5beginEv>... | _Z5func0RKSt6vectorIiSaIiEEi:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 38h
mov [rbp+var_38], rdi
mov [rbp+var_3C], esi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_38]
mov rdi, rax
call _ZNKSt6vectorIiSaIiEE5beginEv; std::vector<int>::begin(voi... | long long func0(long long a1, int a2)
{
long long v2; // rbx
long long v3; // rax
int v5; // [rsp+4h] [rbp-3Ch] BYREF
long long v6; // [rsp+8h] [rbp-38h]
long long v7; // [rsp+18h] [rbp-28h] BYREF
_QWORD v8[3]; // [rsp+20h] [rbp-20h] BYREF
v6 = a1;
v5 = a2;
v8[1] = __readfsqword(0x28u);
v8[0] = st... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x38
MOV qword ptr [RBP + -0x38],RDI
MOV dword ptr [RBP + -0x3c],ESI
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 0x00101640
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x38]
MO... | /* func0(std::vector<int, std::allocator<int> > const&, int) */
difference_type func0(vector *param_1,int param_2)
{
__normal_iterator _Var1;
__normal_iterator _Var2;
int4 extraout_var;
long in_FS_OFFSET;
int local_44;
vector<int,std::allocator<int>> *local_40;
difference_type local_34;
int8 local_30;... |
3,141 | func0 |
#include <vector>
#include <algorithm>
#include <assert.h>
| int func0(const std::vector<int>& a, int x) {
int i = std::upper_bound(a.begin(), a.end(), x) - a.begin();
return i;
}
| int main() {
assert(func0({1,2,4,5}, 6) == 4);
assert(func0({1,2,4,5}, 3) == 2);
assert(func0({1,2,4,5}, 7) == 4);
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> > const&, int):
endbr64
mov (%rdi),%rcx
mov 0x8(%rdi),%rdx
sub %rcx,%rdx
sar $0x2,%rdx
mov %rcx,%rax
jmp 1223 <_Z5func0RKSt6vectorIiSaIiEEi+0x1a>
mov %rdi,%rdx
test %rdx,%rdx
jle 1244 <_Z5func0RKSt6vectorIiSaIiEEi+0x3b>
mov %rdx,%rdi
sar %rdi
le... | _Z5func0RKSt6vectorIiSaIiEEi:
endbr64
mov r8, [rdi]
mov rax, [rdi+8]
sub rax, r8
mov rdx, rax
sar rdx, 2
test rax, rax
jle short loc_124B
mov rax, r8
jmp short loc_1230
loc_1228:
mov rdx, rcx
loc_122B:
test rdx, rdx
jle short loc_124E
loc_1230:
mov rcx, rdx
sar rcx,... | long long func0(_QWORD *a1, int a2)
{
_DWORD *v2; // r8
long long v3; // rdx
_DWORD *v4; // rax
_DWORD *v5; // rdi
v2 = (_DWORD *)*a1;
v3 = (long long)(a1[1] - *a1) >> 2;
if ( (long long)(a1[1] - *a1) <= 0 )
{
v4 = (_DWORD *)*a1;
}
else
{
v4 = (_DWORD *)*a1;
do
{
v5 = &v4[v... | func0:
ENDBR64
MOV R8,qword ptr [RDI]
MOV RAX,qword ptr [RDI + 0x8]
SUB RAX,R8
MOV RDX,RAX
SAR RDX,0x2
TEST RAX,RAX
JLE 0x0010124b
MOV RAX,R8
JMP 0x00101230
LAB_00101228:
MOV RDX,RCX
LAB_0010122b:
TEST RDX,RDX
JLE 0x0010124e
LAB_00101230:
MOV RCX,RDX
SAR RCX,0x1
LEA RDI,[RAX + RCX*0x4]
CMP dword ptr [RDI],ESI
JG 0x0010... | /* func0(std::vector<int, std::allocator<int> > const&, int) */
long func0(vector *param_1,int param_2)
{
int *piVar1;
int *piVar2;
long lVar3;
long lVar4;
long lVar5;
piVar2 = *(int **)param_1;
lVar5 = *(long *)(param_1 + 8) - (long)piVar2;
piVar1 = piVar2;
lVar4 = lVar5 >> 2;
while (lVar3 = l... |
3,142 | func0 |
#include <vector>
#include <algorithm>
#include <assert.h>
| int func0(const std::vector<int>& a, int x) {
int i = std::upper_bound(a.begin(), a.end(), x) - a.begin();
return i;
}
| int main() {
assert(func0({1,2,4,5}, 6) == 4);
assert(func0({1,2,4,5}, 3) == 2);
assert(func0({1,2,4,5}, 7) == 4);
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> > const&, int):
endbr64
mov (%rdi),%r8
mov 0x8(%rdi),%rdx
sub %r8,%rdx
mov %r8,%rax
sar $0x2,%rdx
nopl (%rax)
test %rdx,%rdx
jle 13fb <_Z5func0RKSt6vectorIiSaIiEEi+0x3b>
mov %rdx,%rcx
sar %rcx
lea (%rax,%rcx,4),%rdi
cmp %esi,(%rdi)
jg 1408... | _Z5func0RKSt6vectorIiSaIiEEi:
endbr64
mov r8, [rdi]
mov rax, [rdi+8]
sub rax, r8
mov rdx, rax
sar rdx, 2
test rax, rax
jle short loc_13C0
mov rax, r8
jmp short loc_13A0
loc_1390:
sub rdx, rcx
lea rax, [rdi+4]
sub rdx, 1
test rdx, rdx
jle short loc_13B6
loc_13A0:
mov... | long long func0(_QWORD *a1, int a2)
{
_DWORD *v2; // r8
long long v3; // rdx
_DWORD *v4; // rax
long long v5; // rcx
_DWORD *v6; // rdi
v2 = (_DWORD *)*a1;
v3 = (long long)(a1[1] - *a1) >> 2;
if ( (long long)(a1[1] - *a1) <= 0 )
return 0LL;
v4 = (_DWORD *)*a1;
do
{
while ( 1 )
{
... | func0:
ENDBR64
MOV R8,qword ptr [RDI]
MOV RAX,qword ptr [RDI + 0x8]
SUB RAX,R8
MOV RDX,RAX
SAR RDX,0x2
TEST RAX,RAX
JLE 0x001013c0
MOV RAX,R8
JMP 0x001013a0
LAB_00101390:
SUB RDX,RCX
LEA RAX,[RDI + 0x4]
SUB RDX,0x1
TEST RDX,RDX
JLE 0x001013b6
LAB_001013a0:
MOV RCX,RDX
SAR RCX,0x1
LEA RDI,[RAX + RCX*0x4]
CMP dword ptr [... | /* func0(std::vector<int, std::allocator<int> > const&, int) */
long func0(vector *param_1,int param_2)
{
int *piVar1;
int *piVar2;
long lVar3;
long lVar4;
piVar1 = *(int **)param_1;
lVar4 = *(long *)(param_1 + 8) - (long)piVar1 >> 2;
piVar2 = piVar1;
if (*(long *)(param_1 + 8) - (long)piVar1 < 1) ... |
3,143 | func0 |
#include <vector>
#include <algorithm>
#include <assert.h>
| int func0(const std::vector<int>& a, int x) {
int i = std::upper_bound(a.begin(), a.end(), x) - a.begin();
return i;
}
| int main() {
assert(func0({1,2,4,5}, 6) == 4);
assert(func0({1,2,4,5}, 3) == 2);
assert(func0({1,2,4,5}, 7) == 4);
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> > const&, int):
endbr64
mov (%rdi),%r8
mov 0x8(%rdi),%rdx
sub %r8,%rdx
mov %r8,%rax
sar $0x2,%rdx
nopl (%rax)
test %rdx,%rdx
jle 13cb <_Z5func0RKSt6vectorIiSaIiEEi+0x3b>
mov %rdx,%rcx
sar %rcx
lea (%rax,%rcx,4),%rdi
cmp %esi,(%rdi)
jg 13d8... | _Z5func0RKSt6vectorIiSaIiEEi:
endbr64
mov r8, [rdi]
mov rax, [rdi+8]
sub rax, r8
mov rdx, rax
sar rdx, 2
test rax, rax
jle short loc_13D0
mov rax, r8
nop dword ptr [rax]
loc_1390:
mov rcx, rdx
sar rcx, 1
lea rdi, [rax+rcx*4]
cmp [rdi], esi
jg short loc_13C0
sub ... | long long func0(_QWORD *a1, int a2)
{
_DWORD *v2; // r8
long long v3; // rdx
_DWORD *v4; // rax
long long v5; // rcx
_DWORD *v6; // rdi
v2 = (_DWORD *)*a1;
v3 = (long long)(a1[1] - *a1) >> 2;
if ( (long long)(a1[1] - *a1) <= 0 )
return 0LL;
v4 = (_DWORD *)*a1;
while ( 1 )
{
while ( 1 )
... | func0:
ENDBR64
MOV R8,qword ptr [RDI]
MOV RAX,qword ptr [RDI + 0x8]
SUB RAX,R8
MOV RDX,RAX
SAR RDX,0x2
TEST RAX,RAX
JLE 0x001013d0
MOV RAX,R8
NOP dword ptr [RAX]
LAB_00101390:
MOV RCX,RDX
SAR RCX,0x1
LEA RDI,[RAX + RCX*0x4]
CMP dword ptr [RDI],ESI
JG 0x001013c0
SUB RDX,RCX
LEA RAX,[RDI + 0x4]
SUB RDX,0x1
TEST RDX,RDX
J... | /* func0(std::vector<int, std::allocator<int> > const&, int) */
long func0(vector *param_1,int param_2)
{
int *piVar1;
int *piVar2;
long lVar3;
long lVar4;
piVar1 = *(int **)param_1;
piVar2 = piVar1;
lVar4 = *(long *)(param_1 + 8) - (long)piVar1 >> 2;
if (*(long *)(param_1 + 8) - (long)piVar1 < 1) ... |
3,144 | func0 |
#include <iostream>
#include <regex>
#include <assert.h>
| std::string func0(const std::string& text) {
std::regex pattern("ab{3}?");
if (std::regex_search(text, pattern)) {
return "Found a match!";
}
return "Not matched!";
}
| int main() {
assert(func0("ac") == "Not matched!");
assert(func0("dc") == "Not matched!");
assert(func0("abbbba") == "Found a match!");
return 0;
}
| O0 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x58,%rsp
mov %rdi,-0x58(%rbp)
mov %rsi,-0x60(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
lea -0x40(%rbp),%rax
mov $0x10,%edx
lea ... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 68h
mov [rbp+var_68], rdi
mov [rbp+var_70], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_40]
mov edx, 10h
lea rcx, aAb3; "ab{3}?"
mov ... | 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 const&) */
string * func0(string *param_1)
{
bool bVar1;
string *in_RSI;
long in_FS_OFFSET;
allocator local_59;
allocator *local_58;
allocator *local_50;
regex local_48 [40];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
std::regex::basic_regex(local_48,"ab{3}?"... |
3,145 | func0 |
#include <iostream>
#include <regex>
#include <assert.h>
| std::string func0(const std::string& text) {
std::regex pattern("ab{3}?");
if (std::regex_search(text, pattern)) {
return "Found a match!";
}
return "Not matched!";
}
| int main() {
assert(func0("ac") == "Not matched!");
assert(func0("dc") == "Not matched!");
assert(func0("abbbba") == "Found a match!");
return 0;
}
| O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r13
push %r12
push %rbp
push %rbx
sub $0x58,%rsp
mov %rdi,%rbx
mov %rsi,%rbp
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
lea 0x20(%rsp),%r13
mov %r13,%rdi
callq 4730 <_ZN... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r14
push r12
push rbx
sub rsp, 58h
mov rbx, rdi
mov r14, rsi
mov rax, fs:28h
mov [rbp+var_28], rax
xor eax, eax
lea r12, [rbp+var_70]
lea rdi, [rbp+var_68]; this
call __Z... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV RBX,RDI
MOV R14,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
XOR EAX,EAX
LEA R12,[RBP + -0x70]
LEA RDI,[RBP + -0x68]
CALL 0x001046f0
MOV qword ptr [RBP + -0x60],0x0
MOV qword ptr [RBP + -0x58],0x0
MOV ECX,0x10
LEA RDX,[0x... | /* func0(std::string const&) */
string * func0(string *param_1)
{
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
_Sp_counted_base<(_Lock_policy)2> *p_Var2;
bool bVar3;
int iVar4;
int8 *in_RSI;
long in_FS_OFFSET;
regex local_78 [8];
int local_70 [8];
int8 local_68;
_Sp_counted_base<(_Lock_policy)2> *lo... | |
3,146 | func0 |
#include <iostream>
#include <regex>
#include <assert.h>
| std::string func0(const std::string& text) {
std::regex pattern("ab{3}?");
if (std::regex_search(text, pattern)) {
return "Found a match!";
}
return "Not matched!";
}
| int main() {
assert(func0("ac") == "Not matched!");
assert(func0("dc") == "Not matched!");
assert(func0("abbbba") == "Found a match!");
return 0;
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
mov %rsi,%rbx
sub $0x50,%rsp
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
lea 0x20(%rsp),%r13
lea 0x8(%rsp),%rbp... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r14
mov r14, rsi
push r13
lea r13, [rbp+var_70]
push r12
lea r12, [rbp+var_68]
push rbx
mov rbx, rdi
mov rdi, r12; this
sub rsp, 50h
mov rax, fs:28h
mov [rbp+var_28], rax... | long long func0(long long a1, long long *a2)
{
long long v3; // rdi
long long v4; // rsi
long long v5; // rsi
char v6; // r13
long long v7; // rdi
long long v8; // rdx
volatile signed __int32 *v9; // rcx
signed __int32 v10; // eax
long long v12; // rax
_BYTE v13[8]; // [rsp+0h] [rbp-70h] BYREF
_B... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R14
MOV R14,RSI
PUSH R13
LEA R13,[RBP + -0x70]
PUSH R12
LEA R12,[RBP + -0x68]
PUSH RBX
MOV RBX,RDI
MOV RDI,R12
SUB RSP,0x50
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
XOR EAX,EAX
CALL 0x001036d0
LEA RDX,[0x118609]
PXOR XMM0,XMM0
MOV RDI,R13
MOV ECX,0x10
LEA RSI,... | /* func0(std::string const&) */
string * func0(string *param_1)
{
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
int8 uVar2;
bool bVar3;
int iVar4;
int8 *in_RSI;
long in_FS_OFFSET;
regex local_78 [8];
int local_70 [8];
int local_68 [16];
int local_58 [16];
int local_48 [16];
long local_30;
lo... |
3,147 | func0 |
#include <iostream>
#include <regex>
#include <assert.h>
| std::string func0(const std::string& text) {
std::regex pattern("ab{3}?");
if (std::regex_search(text, pattern)) {
return "Found a match!";
}
return "Not matched!";
}
| int main() {
assert(func0("ac") == "Not matched!");
assert(func0("dc") == "Not matched!");
assert(func0("abbbba") == "Found a match!");
return 0;
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
mov %rsi,%rbx
sub $0x50,%rsp
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
lea 0x20(%rsp),%r13
lea 0x8(%rsp),%rbp... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
mov r15, rsi
push r14
push r13
push r12
push rbp
push rbx
mov rbx, rdi
sub rsp, 2B8h
mov rax, fs:28h
mov [rsp+2E8h+var_40], rax
xor eax, eax
lea r14, [rsp+2E8h+var_2A0]
mov rdi, r14; this
c... | long long func0(long long a1, unsigned long long *a2)
{
__m128i v3; // xmm0
long long v4; // rdi
void *v5; // rdi
void **v6; // rbp
unsigned long long v7; // r12
void *v8; // rdi
unsigned long long v9; // r13
unsigned long long v10; // rbp
long long v11; // rax
long long v12; // rcx
unsigned long... | func0:
ENDBR64
PUSH R15
MOV R15,RSI
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV RBX,RDI
SUB RSP,0x2b8
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x2a8],RAX
XOR EAX,EAX
LEA R14,[RSP + 0x48]
MOV RDI,R14
CALL 0x00104730
LEA RDX,[0x11a64e]
PXOR XMM0,XMM0
LEA RDI,[RSP + 0x110]
MOV R8D,0x10
MOV RCX,R14
LEA RSI,[RD... | /* func0(std::string const&) */
string * func0(string *param_1)
{
ulong uVar1;
int8 uVar2;
ulong uVar3;
int auVar4 [16];
bool bVar5;
char cVar6;
long lVar7;
int8 *puVar8;
int8 *puVar9;
ulong uVar10;
ulong *puVar11;
long lVar12;
ulong uVar13;
ulong *in_RSI;
uint *puVar14;
_Match_mode _V... |
3,148 | func0 |
#include <tuple>
#include <string>
#include <vector>
#include <cassert>
| std::tuple<std::string, std::string, std::string> func0(const std::vector<std::string>& test_list, const std::string& test_str) {
return std::make_tuple(test_list[0], test_list[1], test_str);
}
| int main() {
assert(func0({"WEB", "is"}, "best") == std::make_tuple("WEB", "is", "best"));
assert(func0({"We", "are"}, "Developers") == std::make_tuple("We", "are", "Developers"));
assert(func0({"Part", "is"}, "Wrong") == std::make_tuple("Part", "is", "Wrong"));
return 0;
}
| O0 | cpp | func0(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %rbp
mov ... | _Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERKS5_:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 38h
mov [rbp+var_28], rdi
mov [rbp+var_30], rsi
mov [rbp+var_38], rdx
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_30]
... | long long func0(long long a1, long long a2, long long a3)
{
long long v3; // rbx
long long v4; // rax
v3 = std::vector<std::string>::operator[](a2, 1LL);
v4 = std::vector<std::string>::operator[](a2, 0LL);
std::make_tuple<std::string const&,std::string const&,std::string const&>(a1, v4, v3, a3);
return a1... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x38
MOV qword ptr [RBP + -0x28],RDI
MOV qword ptr [RBP + -0x30],RSI
MOV qword ptr [RBP + -0x38],RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV ESI,0x1
MOV RDI,RAX
CALL 0x00102dea
MOV RBX,RAX
MOV RAX,qw... | /* func0(std::vector<std::string, std::allocator<std::string > > const&, std::string const&) */
vector * func0(vector *param_1,string *param_2)
{
long lVar1;
string *psVar2;
string *psVar3;
long in_FS_OFFSET;
lVar1 = *(long *)(in_FS_OFFSET + 0x28);
psVar2 = (string *)
std::vector<std::string... |
3,149 | func0 |
#include <tuple>
#include <string>
#include <vector>
#include <cassert>
| std::tuple<std::string, std::string, std::string> func0(const std::vector<std::string>& test_list, const std::string& test_str) {
return std::make_tuple(test_list[0], test_list[1], test_str);
}
| int main() {
assert(func0({"WEB", "is"}, "best") == std::make_tuple("WEB", "is", "best"));
assert(func0({"We", "are"}, "Developers") == std::make_tuple("We", "are", "Developers"));
assert(func0({"Part", "is"}, "Wrong") == std::make_tuple("Part", "is", "Wrong"));
return 0;
}
| O1 | cpp | func0(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r13
push ... | _Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERKS5_:
endbr64
push r12
push rbp
push rbx
mov rbx, rdi
mov rbp, [rsi]
lea rax, [rdi+10h]
mov [rdi], rax
mov rsi, [rdx]
mov rax, rsi
add rax, [rdx+8]
mov rdx, rax
call _ZNSt7__cxx1112basic_stringIc... | _QWORD * func0(_QWORD *a1, _QWORD *a2, _QWORD *a3)
{
_QWORD *v3; // rbp
v3 = (_QWORD *)*a2;
*a1 = a1 + 2;
std::string::_M_construct<char *>(a1, *a3, a3[1] + *a3);
a1[4] = a1 + 6;
std::string::_M_construct<char *>(a1 + 4, v3[4], v3[5] + v3[4]);
a1[8] = a1 + 10;
std::string::_M_construct<char *>(a1 + 8, ... | func0:
ENDBR64
PUSH R12
PUSH RBP
PUSH RBX
MOV RBX,RDI
MOV RBP,qword ptr [RSI]
LEA RAX,[RDI + 0x10]
MOV qword ptr [RDI],RAX
MOV RSI,qword ptr [RDX]
MOV RAX,RSI
ADD RAX,qword ptr [RDX + 0x8]
MOV RDX,RAX
LAB_0010132b:
CALL 0x0010197c
LEA R12,[RBX + 0x20]
LEA RAX,[RBX + 0x30]
MOV qword ptr [RBX + 0x20],RAX
MOV RSI,qword pt... | /* func0(std::vector<std::string, std::allocator<std::string > > const&, std::string const&) */
vector * func0(vector *param_1,string *param_2)
{
int8 *puVar1;
int8 *in_RDX;
puVar1 = *(int8 **)param_2;
*(vector **)param_1 = param_1 + 0x10;
std::string::_M_construct<char*>
((char *)param_1,(ch... |
3,150 | func0 |
#include <tuple>
#include <string>
#include <vector>
#include <cassert>
| std::tuple<std::string, std::string, std::string> func0(const std::vector<std::string>& test_list, const std::string& test_str) {
return std::make_tuple(test_list[0], test_list[1], test_str);
}
| int main() {
assert(func0({"WEB", "is"}, "best") == std::make_tuple("WEB", "is", "best"));
assert(func0({"We", "are"}, "Developers") == std::make_tuple("We", "are", "Developers"));
assert(func0({"Part", "is"}, "Wrong") == std::make_tuple("Part", "is", "Wrong"));
return 0;
}
| O2 | cpp | func0(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r13
push ... | _Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERKS5_:
endbr64
lea rax, [rdi+10h]
push r12
push rbp
push rbx
mov rbp, [rsi]
mov rbx, rdi
mov [rdi], rax
mov rax, [rdx+8]
lea r12, [rbx+20h]
mov rsi, [rdx]
add rax, rsi
mov rdx, rax
call _ZNSt7... | _QWORD * func0(_QWORD *a1, _QWORD *a2, _QWORD *a3)
{
_QWORD *v3; // rbp
long long v4; // rdx
long long v5; // rdx
v3 = (_QWORD *)*a2;
*a1 = a1 + 2;
std::string::_M_construct<char *>(a1, *a3, *a3 + a3[1]);
v4 = v3[5];
a1[4] = a1 + 6;
std::string::_M_construct<char *>(a1 + 4, v3[4], v3[4] + v4);
v5 =... | func0:
MOV RDI,RBX
CALL 0x001011d0
MOV RDI,RBP
LAB_0010122b:
CALL 0x00101200 | /* func0(std::vector<std::string, std::allocator<std::string > > const&, std::string const&) [clone
.cold] */
void func0(vector *param_1,string *param_2)
{
std::string::_M_dispose();
/* WARNING: Subroutine does not return */
_Unwind_Resume();
} |
3,151 | func0 |
#include <tuple>
#include <string>
#include <vector>
#include <cassert>
| std::tuple<std::string, std::string, std::string> func0(const std::vector<std::string>& test_list, const std::string& test_str) {
return std::make_tuple(test_list[0], test_list[1], test_str);
}
| int main() {
assert(func0({"WEB", "is"}, "best") == std::make_tuple("WEB", "is", "best"));
assert(func0({"We", "are"}, "Developers") == std::make_tuple("We", "are", "Developers"));
assert(func0({"Part", "is"}, "Wrong") == std::make_tuple("Part", "is", "Wrong"));
return 0;
}
| O3 | cpp | func0(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r14
push ... | _Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERKS5_:
endbr64
push r14
push r13
push r12
push rbp
push rbx
mov rbx, rdi
add rdi, 10h
sub rsp, 10h
mov rbp, [rdx+8]
mov r12, [rsi]
mov rax, fs:28h
mov [rsp+38h+var_30], rax
xor eax, eax
mov ... | long long * func0(long long *a1, long long *a2, long long a3)
{
void *v4; // rdi
size_t v5; // rbp
long long v6; // r12
_BYTE *v7; // r13
size_t v8; // rbp
void *v9; // rdi
_BYTE *v10; // r14
size_t v11; // rbp
void *v12; // rdi
_BYTE *v13; // r14
long long v15; // rax
long long v16; // rax
lo... | func0:
MOV RDI,R13
CALL 0x001011d0
MOV RDI,RBX
CALL 0x001011d0
MOV RAX,qword ptr [RSP + 0x8]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x00101268
MOV RDI,RBP
LAB_00101243:
CALL 0x00101200
LAB_00101268:
CALL 0x001011c0 | /* func0(std::vector<std::string, std::allocator<std::string > > const&, std::string const&) [clone
.cold] */
void func0(vector *param_1,string *param_2,int param_3,int param_4,int param_5,
int param_6,long param_7)
{
long in_FS_OFFSET;
std::string::_M_dispose();
std::string::_M_dispose();
if ... |
3,152 | func0 |
#include <cmath>
#include <cassert>
| double func0(int sides, double length) {
double perimeter = sides * length;
return perimeter;
}
| int main() {
assert(func0(4, 20) == 80);
assert(func0(10, 15) == 150);
assert(func0(9, 7) == 63);
return 0;
}
| O0 | cpp | func0(int, double):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
movsd %xmm0,-0x20(%rbp)
cvtsi2sdl -0x14(%rbp),%xmm0
movsd -0x20(%rbp),%xmm1
mulsd %xmm1,%xmm0
movsd %xmm0,-0x8(%rbp)
movsd -0x8(%rbp),%xmm0
pop %rbp
retq
| _Z5func0id:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_14], edi
movsd [rbp+var_20], xmm0
pxor xmm0, xmm0
cvtsi2sd xmm0, [rbp+var_14]
movsd xmm1, [rbp+var_20]
mulsd xmm0, xmm1
movsd [rbp+var_8], xmm0
movsd xmm0, [rbp+var_8]
pop rbp
retn | double func0(int a1, double a2)
{
return (double)a1 * a2;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x14],EDI
MOVSD qword ptr [RBP + -0x20],XMM0
PXOR XMM0,XMM0
CVTSI2SD XMM0,dword ptr [RBP + -0x14]
MOVSD XMM1,qword ptr [RBP + -0x20]
MULSD XMM0,XMM1
MOVSD qword ptr [RBP + -0x8],XMM0
MOVSD XMM0,qword ptr [RBP + -0x8]
POP RBP
RET | /* func0(int, double) */
double func0(int param_1,double param_2)
{
return (double)param_1 * param_2;
} |
3,153 | func0 |
#include <cmath>
#include <cassert>
| double func0(int sides, double length) {
double perimeter = sides * length;
return perimeter;
}
| int main() {
assert(func0(4, 20) == 80);
assert(func0(10, 15) == 150);
assert(func0(9, 7) == 63);
return 0;
}
| O1 | cpp | func0(int, double):
endbr64
movapd %xmm0,%xmm1
pxor %xmm0,%xmm0
cvtsi2sd %edi,%xmm0
mulsd %xmm1,%xmm0
retq
| _Z5func0id:
endbr64
movapd xmm1, xmm0
pxor xmm0, xmm0
cvtsi2sd xmm0, edi
mulsd xmm0, xmm1
retn | double func0(int a1, double a2)
{
return (double)a1 * a2;
} | func0:
ENDBR64
MOVAPD XMM1,XMM0
PXOR XMM0,XMM0
CVTSI2SD XMM0,EDI
MULSD XMM0,XMM1
RET | /* func0(int, double) */
double func0(int param_1,double param_2)
{
return (double)param_1 * param_2;
} |
3,154 | func0 |
#include <cmath>
#include <cassert>
| double func0(int sides, double length) {
double perimeter = sides * length;
return perimeter;
}
| int main() {
assert(func0(4, 20) == 80);
assert(func0(10, 15) == 150);
assert(func0(9, 7) == 63);
return 0;
}
| O2 | cpp | func0(int, double):
endbr64
movapd %xmm0,%xmm1
pxor %xmm0,%xmm0
cvtsi2sd %edi,%xmm0
mulsd %xmm1,%xmm0
retq
nopw %cs:0x0(%rax,%rax,1)
| _Z5func0id:
endbr64
movapd xmm1, xmm0
pxor xmm0, xmm0
cvtsi2sd xmm0, edi
mulsd xmm0, xmm1
retn | double func0(int a1, double a2)
{
return (double)a1 * a2;
} | func0:
ENDBR64
MOVAPD XMM1,XMM0
PXOR XMM0,XMM0
CVTSI2SD XMM0,EDI
MULSD XMM0,XMM1
RET | /* func0(int, double) */
double func0(int param_1,double param_2)
{
return (double)param_1 * param_2;
} |
3,155 | func0 |
#include <cmath>
#include <cassert>
| double func0(int sides, double length) {
double perimeter = sides * length;
return perimeter;
}
| int main() {
assert(func0(4, 20) == 80);
assert(func0(10, 15) == 150);
assert(func0(9, 7) == 63);
return 0;
}
| O3 | cpp | func0(int, double):
endbr64
movapd %xmm0,%xmm1
pxor %xmm0,%xmm0
cvtsi2sd %edi,%xmm0
mulsd %xmm1,%xmm0
retq
nopw %cs:0x0(%rax,%rax,1)
| _Z5func0id:
endbr64
movapd xmm1, xmm0
pxor xmm0, xmm0
cvtsi2sd xmm0, edi
mulsd xmm0, xmm1
retn | double func0(int a1, double a2)
{
return (double)a1 * a2;
} | func0:
ENDBR64
MOVAPD XMM1,XMM0
PXOR XMM0,XMM0
CVTSI2SD XMM0,EDI
MULSD XMM0,XMM1
RET | /* func0(int, double) */
double func0(int param_1,double param_2)
{
return (double)param_1 * param_2;
} |
3,156 | func0 |
#include <vector>
#include <cassert>
| bool func0(const std::vector<int>& nums) {
for (size_t i = 0; i < nums.size(); ++i) {
if (nums[i] % 2 != i % 2) {
return false;
}
}
return true;
}
| int main() {
assert(func0({3, 2, 1}) == false);
assert(func0({1, 2, 3}) == false);
assert(func0({2, 1, 4}) == true);
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x20,%rsp
mov %rdi,-0x18(%rbp)
movq $0x0,-0x8(%rbp)
mov -0x18(%rbp),%rax
mov %rax,%rdi
callq 1526 <_ZNKSt6vectorIiSaIiEE4sizeEv>
cmp %rax,-0x8(%rbp)
setb %al
test %al,%al
je 1299 <_Z5func0RKSt6vecto... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_18], rdi
mov [rbp+var_8], 0
jmp short loc_12A9
loc_1263:
mov rdx, [rbp+var_8]
mov rax, [rbp+var_18]
mov rsi, rdx
mov rdi, rax
call _ZNKSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong)... | long long func0(long long a1)
{
unsigned long long i; // rax
unsigned long long v3; // [rsp+18h] [rbp-8h]
v3 = 0LL;
for ( i = std::vector<int>::size(a1); v3 < i; i = std::vector<int>::size(a1) )
{
if ( *(_DWORD *)std::vector<int>::operator[](a1, v3) % 2 != (v3 & 1) )
return 0LL;
++v3;
}
re... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x18],RDI
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001012a9
LAB_00101263:
MOV RDX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,RDX
MOV RDI,RAX
CALL 0x001015be
MOV EDX,dword ptr [RAX]
MOV EAX,EDX
SAR EAX,0x1f
SHR EAX,0x1f
ADD EDX,EAX
AN... | /* func0(std::vector<int, std::allocator<int> > const&) */
int8 func0(vector *param_1)
{
int *piVar1;
ulong uVar2;
ulong local_10;
local_10 = 0;
while( true ) {
uVar2 = std::vector<int,std::allocator<int>>::size((vector<int,std::allocator<int>> *)param_1);
if (uVar2 <= local_10) {
return 1;... |
3,157 | func0 |
#include <vector>
#include <cassert>
| bool func0(const std::vector<int>& nums) {
for (size_t i = 0; i < nums.size(); ++i) {
if (nums[i] % 2 != i % 2) {
return false;
}
}
return true;
}
| int main() {
assert(func0({3, 2, 1}) == false);
assert(func0({1, 2, 3}) == false);
assert(func0({2, 1, 4}) == true);
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
mov (%rdi),%rsi
mov 0x8(%rdi),%rax
sub %rsi,%rax
sar $0x2,%rax
mov %rax,%rdi
je 1250 <_Z5func0RKSt6vectorIiSaIiEE+0x47>
mov $0x0,%edx
mov (%rsi,%rdx,4),%eax
mov %eax,%ecx
shr $0x1f,%ecx
add %ecx,%eax
and $0x1,%eax
sub ... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
mov rax, [rdi+8]
mov rsi, [rdi]
mov rdi, rax
sub rdi, rsi
sar rdi, 2
cmp rax, rsi
jz short loc_1253
mov edx, 0
loc_1228:
mov eax, [rsi+rdx*4]
mov ecx, eax
shr ecx, 1Fh
add eax, ecx
and eax, 1
sub eax, ecx
cdqe
mov rcx, rdx... | long long func0(long long *a1)
{
long long v1; // rax
long long v2; // rsi
unsigned long long v3; // rdi
long long v4; // rdx
v1 = a1[1];
v2 = *a1;
v3 = (v1 - *a1) >> 2;
if ( v1 == v2 )
return 1LL;
v4 = 0LL;
while ( *(_DWORD *)(v2 + 4 * v4) % 2 == (unsigned long long)(v4 & 1) )
{
if ( ++... | func0:
ENDBR64
MOV RAX,qword ptr [RDI + 0x8]
MOV RSI,qword ptr [RDI]
MOV RDI,RAX
SUB RDI,RSI
SAR RDI,0x2
CMP RAX,RSI
JZ 0x00101253
MOV EDX,0x0
LAB_00101228:
MOV EAX,dword ptr [RSI + RDX*0x4]
MOV ECX,EAX
SHR ECX,0x1f
ADD EAX,ECX
AND EAX,0x1
SUB EAX,ECX
CDQE
MOV RCX,RDX
AND ECX,0x1
CMP RAX,RCX
JNZ 0x00101259
ADD RDX,0x1
... | /* func0(std::vector<int, std::allocator<int> > const&) */
int8 func0(vector *param_1)
{
long lVar1;
ulong uVar2;
lVar1 = *(long *)param_1;
if (*(long *)(param_1 + 8) == lVar1) {
return 1;
}
uVar2 = 0;
do {
if ((long)(*(int *)(lVar1 + uVar2 * 4) % 2) != (ulong)((uint)uVar2 & 1)) {
retur... |
3,158 | func0 |
#include <vector>
#include <cassert>
| bool func0(const std::vector<int>& nums) {
for (size_t i = 0; i < nums.size(); ++i) {
if (nums[i] % 2 != i % 2) {
return false;
}
}
return true;
}
| int main() {
assert(func0({3, 2, 1}) == false);
assert(func0({1, 2, 3}) == false);
assert(func0({2, 1, 4}) == true);
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
mov (%rdi),%r8
mov 0x8(%rdi),%rsi
sub %r8,%rsi
sar $0x2,%rsi
je 1470 <_Z5func0RKSt6vectorIiSaIiEE+0x50>
xor %edx,%edx
jmp 1449 <_Z5func0RKSt6vectorIiSaIiEE+0x29>
nopl 0x0(%rax,%rax,1)
add $0x1,%rdx
cmp %rsi,%rdx
je 1470 <_Z5... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
mov rax, [rdi+8]
mov rsi, [rdi]
mov rdi, rax
sub rdi, rsi
sar rdi, 2
cmp rax, rsi
jz short loc_13D0
xor edx, edx
jmp short loc_13A9
loc_13A0:
add rdx, 1
cmp rdx, rdi
jnb short loc_13D0
loc_13A9:
mov eax, [rsi+rdx*4]
mov ecx, e... | long long func0(long long *a1)
{
long long v1; // rax
long long v2; // rsi
unsigned long long v3; // rdi
long long v4; // rdx
v1 = a1[1];
v2 = *a1;
v3 = (v1 - *a1) >> 2;
if ( v1 == v2 )
return 1LL;
v4 = 0LL;
while ( *(_DWORD *)(v2 + 4 * v4) % 2 == (unsigned long long)(v4 & 1) )
{
if ( ++... | func0:
ENDBR64
MOV RAX,qword ptr [RDI + 0x8]
MOV RSI,qword ptr [RDI]
MOV RDI,RAX
SUB RDI,RSI
SAR RDI,0x2
CMP RAX,RSI
JZ 0x001013d0
XOR EDX,EDX
JMP 0x001013a9
LAB_001013a0:
ADD RDX,0x1
CMP RDX,RDI
JNC 0x001013d0
LAB_001013a9:
MOV EAX,dword ptr [RSI + RDX*0x4]
MOV ECX,EAX
SHR ECX,0x1f
ADD EAX,ECX
AND EAX,0x1
SUB EAX,ECX
... | /* func0(std::vector<int, std::allocator<int> > const&) */
int8 func0(vector *param_1)
{
long lVar1;
ulong uVar2;
lVar1 = *(long *)param_1;
if (*(long *)(param_1 + 8) != lVar1) {
uVar2 = 0;
do {
if ((long)(*(int *)(lVar1 + uVar2 * 4) % 2) != (ulong)((uint)uVar2 & 1)) {
return 0;
... |
3,159 | func0 |
#include <vector>
#include <cassert>
| bool func0(const std::vector<int>& nums) {
for (size_t i = 0; i < nums.size(); ++i) {
if (nums[i] % 2 != i % 2) {
return false;
}
}
return true;
}
| int main() {
assert(func0({3, 2, 1}) == false);
assert(func0({1, 2, 3}) == false);
assert(func0({2, 1, 4}) == true);
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
mov (%rdi),%r8
mov 0x8(%rdi),%rsi
sub %r8,%rsi
sar $0x2,%rsi
je 1470 <_Z5func0RKSt6vectorIiSaIiEE+0x50>
xor %edx,%edx
jmp 1449 <_Z5func0RKSt6vectorIiSaIiEE+0x29>
nopl 0x0(%rax,%rax,1)
add $0x1,%rdx
cmp %rsi,%rdx
je 1470 <_Z5... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
mov rax, [rdi+8]
mov rsi, [rdi]
mov rdi, rax
sub rdi, rsi
sar rdi, 2
cmp rax, rsi
jz short loc_1480
xor edx, edx
jmp short loc_1459
loc_1450:
add rdx, 1
cmp rdx, rdi
jnb short loc_1480
loc_1459:
mov eax, [rsi+rdx*4]
mov ecx, e... | long long func0(long long *a1)
{
long long v1; // rax
long long v2; // rsi
unsigned long long v3; // rdi
long long v4; // rdx
v1 = a1[1];
v2 = *a1;
v3 = (v1 - *a1) >> 2;
if ( v1 == v2 )
return 1LL;
v4 = 0LL;
while ( *(_DWORD *)(v2 + 4 * v4) % 2 == (unsigned long long)(v4 & 1) )
{
if ( ++... | func0:
ENDBR64
MOV RAX,qword ptr [RDI + 0x8]
MOV RSI,qword ptr [RDI]
MOV RDI,RAX
SUB RDI,RSI
SAR RDI,0x2
CMP RAX,RSI
JZ 0x00101480
XOR EDX,EDX
JMP 0x00101459
LAB_00101450:
ADD RDX,0x1
CMP RDX,RDI
JNC 0x00101480
LAB_00101459:
MOV EAX,dword ptr [RSI + RDX*0x4]
MOV ECX,EAX
SHR ECX,0x1f
ADD EAX,ECX
AND EAX,0x1
SUB EAX,ECX
... | /* func0(std::vector<int, std::allocator<int> > const&) */
int8 func0(vector *param_1)
{
long lVar1;
ulong uVar2;
lVar1 = *(long *)param_1;
if (*(long *)(param_1 + 8) != lVar1) {
uVar2 = 0;
do {
if ((long)(*(int *)(lVar1 + uVar2 * 4) % 2) != (ulong)((uint)uVar2 & 1)) {
return 0;
... |
3,160 | func0 |
#include <vector>
#include <type_traits>
#include <assert.h>
#include <variant>
| std::vector<int> func0(const std::vector<std::variant<int, std::vector<int>>>& test_vec) {
std::vector<int> res;
for (const auto& ele : test_vec) {
if (std::holds_alternative<int>(ele)) {
res.push_back(std::get<int>(ele));
}
}
return res;
}
| int main() {
assert((func0({1, 5, 7, std::vector<int>{4, 6}, 10}) == std::vector<int>{1, 5, 7, 10}));
assert((func0({2, 6, 8, std::vector<int>{5, 7}, 11}) == std::vector<int>{2, 6, 8, 11}));
assert((func0({3, 7, 9, std::vector<int>{6, 8}, 12}) == std::vector<int>{3, 7, 9, 12}));
return 0;
}
| O0 | cpp | func0(std::vector<std::variant<int, std::vector<int, std::allocator<int> > >, std::allocator<std::variant<int, std::vector<int, std::allocator<int> > > > > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x48,%rsp
mov %rdi,-0x48(%rbp)
mov %rsi,-0x50(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%... | _Z5func0RKSt6vectorISt7variantIJiS_IiSaIiEEEESaIS3_EE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 48h
mov [rbp+var_48], rdi
mov [rbp+var_50], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_48]
mov rdi, rax
call _ZNSt6vectorIiSaIiEEC2Ev; std::ve... | long long func0(long long a1, long long a2)
{
long long v2; // rax
long long v4; // [rsp+18h] [rbp-38h] BYREF
_QWORD v5[2]; // [rsp+20h] [rbp-30h] BYREF
long long v6; // [rsp+30h] [rbp-20h]
unsigned long long v7; // [rsp+38h] [rbp-18h]
v7 = __readfsqword(0x28u);
std::vector<int>::vector(a1);
v5[1] = a... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RBP + -0x48],RDI
MOV qword ptr [RBP + -0x50],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x48]
MOV RDI,RAX
CALL 0x001021dc
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x28],RAX
MO... | /* func0(std::vector<std::variant<int, std::vector<int, std::allocator<int> > >,
std::allocator<std::variant<int, std::vector<int, std::allocator<int> > > > > const&) */
vector * func0(vector *param_1)
{
bool bVar1;
int *piVar2;
vector<std::variant<int,std::vector<int,std::allocator<int>>>,std::allocator<std... |
3,161 | func0 |
#include <vector>
#include <type_traits>
#include <assert.h>
#include <variant>
| std::vector<int> func0(const std::vector<std::variant<int, std::vector<int>>>& test_vec) {
std::vector<int> res;
for (const auto& ele : test_vec) {
if (std::holds_alternative<int>(ele)) {
res.push_back(std::get<int>(ele));
}
}
return res;
}
| int main() {
assert((func0({1, 5, 7, std::vector<int>{4, 6}, 10}) == std::vector<int>{1, 5, 7, 10}));
assert((func0({2, 6, 8, std::vector<int>{5, 7}, 11}) == std::vector<int>{2, 6, 8, 11}));
assert((func0({3, 7, 9, std::vector<int>{6, 8}, 12}) == std::vector<int>{3, 7, 9, 12}));
return 0;
}
| O1 | cpp | func0(std::vector<std::variant<int, std::vector<int, std::allocator<int> > >, std::allocator<std::variant<int, std::vector<int, std::allocator<int> > > > > const&):
endbr64
push %r12
push %rbp
push %rbx
mov %rdi,%rbp
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi)
movq $0x0,0x10(%rdi)
mov (%rsi),%rbx
mov 0x8(... | _Z5func0RKSt6vectorISt7variantIJiS_IiSaIiEEEESaIS3_EE:
endbr64
push r12
push rbp
push rbx
mov rbp, rdi
mov qword ptr [rdi], 0
mov qword ptr [rdi+8], 0
mov qword ptr [rdi+10h], 0
mov rbx, [rsi]
mov r12, [rsi+8]
cmp r12, rbx
jnz short loc_1311
loc_12F7:
mov rax, rbp
pop rb... | _QWORD * func0(_QWORD *a1, long long *a2)
{
long long v2; // rbx
long long v3; // r12
_DWORD *v5; // rsi
*a1 = 0LL;
a1[1] = 0LL;
a1[2] = 0LL;
v2 = *a2;
v3 = a2[1];
if ( v3 != *a2 )
{
do
{
if ( !*(_BYTE *)(v2 + 24) )
{
v5 = (_DWORD *)a1[1];
if ( v5 == (_DWORD *)a1... | func0:
ENDBR64
PUSH R12
PUSH RBP
PUSH RBX
MOV RBP,RDI
MOV qword ptr [RDI],0x0
MOV qword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
MOV RBX,qword ptr [RSI]
MOV R12,qword ptr [RSI + 0x8]
CMP R12,RBX
JNZ 0x00101311
LAB_001012f7:
MOV RAX,RBP
POP RBX
POP RBP
POP R12
RET
LAB_001012ff:
MOV EAX,dword ptr [RBX]
MOV dwor... | /* func0(std::vector<std::variant<int, std::vector<int, std::allocator<int> > >,
std::allocator<std::variant<int, std::vector<int, std::allocator<int> > > > > const&) */
vector * func0(vector *param_1)
{
int *piVar1;
int *piVar2;
int *piVar3;
int8 *in_RSI;
*(int8 *)param_1 = 0;
*(int8 *)(param_1 + 8... |
3,162 | func0 |
#include <vector>
#include <type_traits>
#include <assert.h>
#include <variant>
| std::vector<int> func0(const std::vector<std::variant<int, std::vector<int>>>& test_vec) {
std::vector<int> res;
for (const auto& ele : test_vec) {
if (std::holds_alternative<int>(ele)) {
res.push_back(std::get<int>(ele));
}
}
return res;
}
| int main() {
assert((func0({1, 5, 7, std::vector<int>{4, 6}, 10}) == std::vector<int>{1, 5, 7, 10}));
assert((func0({2, 6, 8, std::vector<int>{5, 7}, 11}) == std::vector<int>{2, 6, 8, 11}));
assert((func0({3, 7, 9, std::vector<int>{6, 8}, 12}) == std::vector<int>{3, 7, 9, 12}));
return 0;
}
| O2 | cpp | func0(std::vector<std::variant<int, std::vector<int, std::allocator<int> > >, std::allocator<std::variant<int, std::vector<int, std::allocator<int> > > > > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x28,%rsp
mov 0x8(%rsi),%rbp
mov (%rsi),%rbx... | _Z5func0RKSt6vectorISt7variantIJiS_IiSaIiEEEESaIS3_EE:
endbr64
push r12
pxor xmm0, xmm0
push rbp
mov rbp, rdi
push rbx
mov rbx, [rsi]
mov r12, [rsi+8]
mov qword ptr [rdi+10h], 0
movups xmmword ptr [rdi], xmm0
cmp r12, rbx
jnz short loc_1B39
jmp short loc_1B5F
loc_1B30:
add r... | long long func0(long long a1, int **a2)
{
int *v2; // rbx
int *v3; // r12
long long v4; // rsi
int v5; // eax
long long v6; // rsi
v2 = *a2;
v3 = a2[1];
*(_QWORD *)(a1 + 16) = 0LL;
for ( *(_OWORD *)a1 = 0LL; v3 != v2; *(_QWORD *)(a1 + 8) = v6 )
{
while ( *((_BYTE *)v2 + 24) )
{
LABEL_3:
... | func0:
MOV RDI,RBP
CALL 0x00101b90
MOV RDI,RBX
LAB_00101229:
CALL 0x001011f0 | /* func0(std::vector<std::variant<int, std::vector<int, std::allocator<int> > >,
std::allocator<std::variant<int, std::vector<int, std::allocator<int> > > > > const&) [clone
.cold] */
void func0(vector *param_1)
{
vector<int,std::allocator<int>> *unaff_RBP;
std::vector<int,std::allocator<int>>::~vector(u... |
3,163 | func0 |
#include <vector>
#include <type_traits>
#include <assert.h>
#include <variant>
| std::vector<int> func0(const std::vector<std::variant<int, std::vector<int>>>& test_vec) {
std::vector<int> res;
for (const auto& ele : test_vec) {
if (std::holds_alternative<int>(ele)) {
res.push_back(std::get<int>(ele));
}
}
return res;
}
| int main() {
assert((func0({1, 5, 7, std::vector<int>{4, 6}, 10}) == std::vector<int>{1, 5, 7, 10}));
assert((func0({2, 6, 8, std::vector<int>{5, 7}, 11}) == std::vector<int>{2, 6, 8, 11}));
assert((func0({3, 7, 9, std::vector<int>{6, 8}, 12}) == std::vector<int>{3, 7, 9, 12}));
return 0;
}
| O3 | cpp | func0(std::vector<std::variant<int, std::vector<int, std::allocator<int> > >, std::allocator<std::variant<int, std::vector<int, std::allocator<int> > > > > const&):
endbr64
push %r15
pxor %xmm0,%xmm0
push %r14
push %r13
mov %rdi,%r13
push %r12
push %rbp
push %rbx
sub $0x18,%rsp
mov 0x8(%rsi),%rbp... | _Z5func0RKSt6vectorISt7variantIJiS_IiSaIiEEEESaIS3_EE:
endbr64
push r12
pxor xmm0, xmm0
push rbp
mov rbp, rdi
push rbx
mov rbx, [rsi]
mov r12, [rsi+8]
mov qword ptr [rdi+10h], 0
movups xmmword ptr [rdi], xmm0
cmp r12, rbx
jnz short loc_1D89
jmp short loc_1DAF
loc_1D80:
add r... | long long func0(long long a1, int **a2)
{
int *v2; // rbx
int *v3; // r12
long long v4; // rsi
int v5; // eax
long long v6; // rsi
v2 = *a2;
v3 = a2[1];
*(_QWORD *)(a1 + 16) = 0LL;
for ( *(_OWORD *)a1 = 0LL; v3 != v2; *(_QWORD *)(a1 + 8) = v6 )
{
while ( *((_BYTE *)v2 + 24) )
{
LABEL_3:
... | func0:
MOV RDI,RBP
CALL 0x00101de0
MOV RDI,RBX
LAB_0010120b:
CALL 0x001011f0 | /* func0(std::vector<std::variant<int, std::vector<int, std::allocator<int> > >,
std::allocator<std::variant<int, std::vector<int, std::allocator<int> > > > > const&) [clone
.cold] */
void func0(vector *param_1)
{
vector<int,std::allocator<int>> *unaff_RBP;
std::vector<int,std::allocator<int>>::~vector(u... |
3,164 | func0 | #include <vector>
#include <assert.h>
| int func0(const std::vector<std::vector<int>>& input_list) {
return input_list.size();
}
| int main() {
assert(func0({{1, 3}, {5, 7}, {9, 11}, {13, 15, 17}}) == 4);
assert(func0({{1, 2}, {2, 3}, {4, 5}}) == 3);
assert(func0({{1, 0}, {2, 0}}) == 2);
return 0;
}
| O0 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x10,%rsp
mov %rdi,-0x8(%rbp)
mov -0x8(%rbp),%rax
mov %rax,%rdi
callq 1bc0 <_ZNKSt6vectorIS_IiSaIiEESaIS1_EE4sizeEv>
leaveq
retq
| _Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EE:
endbr64
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov rdi, rax
call _ZNKSt6vectorIS_IiSaIiEESaIS1_EE4sizeEv; std::vector<std::vector<int>>::size(void)
leave
retn | long long func0(long long a1)
{
return std::vector<std::vector<int>>::size(a1);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,RAX
CALL 0x00101bf8
LEAVE
RET | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > > const&) */
void func0(vector *param_1)
{
std::
vector<std::vector<int,std::allocator<int>>,std::allocator<std::vector<int,std::allocator<int>>>>
::size((vector<std::vector<int,std::allocator... |
3,165 | func0 | #include <vector>
#include <assert.h>
| int func0(const std::vector<std::vector<int>>& input_list) {
return input_list.size();
}
| int main() {
assert(func0({{1, 3}, {5, 7}, {9, 11}, {13, 15, 17}}) == 4);
assert(func0({{1, 2}, {2, 3}, {4, 5}}) == 3);
assert(func0({{1, 0}, {2, 0}}) == 2);
return 0;
}
| O1 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&):
endbr64
mov 0x8(%rdi),%rax
sub (%rdi),%rax
sar $0x3,%rax
movabs $0xaaaaaaaaaaaaaaab,%rdx
imul %rdx,%rax
retq
| _Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EE:
endbr64
mov rax, [rdi+8]
sub rax, [rdi]
sar rax, 3
imul eax, 0AAAAAAABh
retn | long long func0(_QWORD *a1)
{
return -1431655765 * (unsigned int)((long long)(a1[1] - *a1) >> 3);
} | func0:
ENDBR64
MOV RAX,qword ptr [RDI + 0x8]
SUB RAX,qword ptr [RDI]
SAR RAX,0x3
IMUL EAX,EAX,-0x55555555
RET | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > > const&) */
int func0(vector *param_1)
{
return (int)(*(long *)(param_1 + 8) - *(long *)param_1 >> 3) * -0x55555555;
} |
3,166 | func0 | #include <vector>
#include <assert.h>
| int func0(const std::vector<std::vector<int>>& input_list) {
return input_list.size();
}
| int main() {
assert(func0({{1, 3}, {5, 7}, {9, 11}, {13, 15, 17}}) == 4);
assert(func0({{1, 2}, {2, 3}, {4, 5}}) == 3);
assert(func0({{1, 0}, {2, 0}}) == 2);
return 0;
}
| O2 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&):
endbr64
movabs $0xaaaaaaaaaaaaaaab,%rdx
mov 0x8(%rdi),%rax
sub (%rdi),%rax
sar $0x3,%rax
imul %rdx,%rax
retq
xchg %ax,%ax
| _Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EE:
endbr64
mov rax, [rdi+8]
sub rax, [rdi]
sar rax, 3
imul eax, 0AAAAAAABh
retn | long long func0(_QWORD *a1)
{
return -1431655765 * (unsigned int)((long long)(a1[1] - *a1) >> 3);
} | func0:
ENDBR64
MOV RAX,qword ptr [RDI + 0x8]
SUB RAX,qword ptr [RDI]
SAR RAX,0x3
IMUL EAX,EAX,-0x55555555
RET | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > > const&) */
int func0(vector *param_1)
{
return (int)(*(long *)(param_1 + 8) - *(long *)param_1 >> 3) * -0x55555555;
} |
3,167 | func0 | #include <vector>
#include <assert.h>
| int func0(const std::vector<std::vector<int>>& input_list) {
return input_list.size();
}
| int main() {
assert(func0({{1, 3}, {5, 7}, {9, 11}, {13, 15, 17}}) == 4);
assert(func0({{1, 2}, {2, 3}, {4, 5}}) == 3);
assert(func0({{1, 0}, {2, 0}}) == 2);
return 0;
}
| O3 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&):
endbr64
movabs $0xaaaaaaaaaaaaaaab,%rdx
mov 0x8(%rdi),%rax
sub (%rdi),%rax
sar $0x3,%rax
imul %rdx,%rax
retq
xchg %ax,%ax
| _Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EE:
endbr64
mov rax, [rdi+8]
sub rax, [rdi]
sar rax, 3
imul eax, 0AAAAAAABh
retn | long long func0(_QWORD *a1)
{
return -1431655765 * (unsigned int)((long long)(a1[1] - *a1) >> 3);
} | func0:
ENDBR64
MOV RAX,qword ptr [RDI + 0x8]
SUB RAX,qword ptr [RDI]
SAR RAX,0x3
IMUL EAX,EAX,-0x55555555
RET | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > > const&) */
int func0(vector *param_1)
{
return (int)(*(long *)(param_1 + 8) - *(long *)param_1 >> 3) * -0x55555555;
} |
3,168 | func0 |
#include <assert.h>
#include <vector>
| int func0(const std::vector<int>& arr, int x, int n) {
int low = 0;
int high = n - 1;
int res = -1;
while (low <= high) {
int mid = (low + high) / 2;
if (arr[mid] > x) {
high = mid - 1;
} else if (arr[mid] < x) {
low = mid + 1;
} else {
... | int main() {
assert(func0({1, 2, 3}, 1, 3) == 0);
assert(func0({1, 1, 1, 2, 3, 4}, 1, 6) == 2);
assert(func0({2, 3, 2, 3, 6, 8, 9}, 3, 7) == 3);
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> > const&, int, int):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x20,%rsp
mov %rdi,-0x18(%rbp)
mov %esi,-0x1c(%rbp)
mov %edx,-0x20(%rbp)
movl $0x0,-0x10(%rbp)
mov -0x20(%rbp),%eax
sub $0x1,%eax
mov %eax,-0xc(%rbp)
movl $0xffffffff,-0x8(%rbp)
mov -0x1... | _Z5func0RKSt6vectorIiSaIiEEii:
endbr64
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_18], rdi
mov [rbp+var_1C], esi
mov [rbp+var_20], edx
mov [rbp+var_10], 0
mov eax, [rbp+var_20]
sub eax, 1
mov [rbp+var_C], eax
mov [rbp+var_8], 0FFFFFFFFh
jmp short loc_12F3
loc_1278:
mo... | long long func0(long long a1, int a2, int a3)
{
int v4; // [rsp+10h] [rbp-10h]
int v5; // [rsp+14h] [rbp-Ch]
unsigned int v6; // [rsp+18h] [rbp-8h]
int v7; // [rsp+1Ch] [rbp-4h]
v4 = 0;
v5 = a3 - 1;
v6 = -1;
while ( v4 <= v5 )
{
v7 = (v4 + v5) / 2;
if ( a2 >= *(_DWORD *)std::vector<int>::ope... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x1c],ESI
MOV dword ptr [RBP + -0x20],EDX
MOV dword ptr [RBP + -0x10],0x0
MOV EAX,dword ptr [RBP + -0x20]
SUB EAX,0x1
MOV dword ptr [RBP + -0xc],EAX
MOV dword ptr [RBP + -0x8],0xffffffff
JMP 0x001012f3
LAB_00101278:
M... | /* func0(std::vector<int, std::allocator<int> > const&, int, int) */
int func0(vector *param_1,int param_2,int param_3)
{
int iVar1;
int *piVar2;
int4 local_18;
int4 local_14;
int4 local_10;
local_18 = 0;
local_14 = param_3 + -1;
local_10 = -1;
while (local_18 <= local_14) {
iVar1 = (local_14... |
3,169 | func0 |
#include <assert.h>
#include <vector>
| int func0(const std::vector<int>& arr, int x, int n) {
int low = 0;
int high = n - 1;
int res = -1;
while (low <= high) {
int mid = (low + high) / 2;
if (arr[mid] > x) {
high = mid - 1;
} else if (arr[mid] < x) {
low = mid + 1;
} else {
... | int main() {
assert(func0({1, 2, 3}, 1, 3) == 0);
assert(func0({1, 1, 1, 2, 3, 4}, 1, 6) == 2);
assert(func0({2, 3, 2, 3, 6, 8, 9}, 3, 7) == 3);
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> > const&, int, int):
endbr64
sub $0x1,%edx
js 124d <_Z5func0RKSt6vectorIiSaIiEEii+0x44>
mov (%rdi),%r8
mov $0xffffffff,%r9d
mov $0x0,%edi
jmp 1231 <_Z5func0RKSt6vectorIiSaIiEEii+0x28>
lea 0x1(%rax),%edi
jl 122d <_Z5func0RKSt6vectorIiSaIiEEii+0x24>
lea... | _Z5func0RKSt6vectorIiSaIiEEii:
endbr64
sub edx, 1
js short loc_124D
mov r8, [rdi]
mov r9d, 0FFFFFFFFh
mov edi, 0
jmp short loc_1231
loc_1222:
lea edi, [rax+1]
jl short loc_122D
lea edi, [rax+1]
mov r9d, eax
loc_122D:
cmp edi, edx
jg short loc_1253
loc_1231:
lea ecx... | long long func0(long long *a1, int a2, int a3)
{
int v3; // edx
long long v4; // r8
unsigned int v5; // r9d
int v6; // edi
int v7; // eax
int v8; // ecx
v3 = a3 - 1;
if ( v3 < 0 )
{
return (unsigned int)-1;
}
else
{
v4 = *a1;
v5 = -1;
v6 = 0;
do
{
v7 = (v6 + v3) /... | func0:
ENDBR64
SUB EDX,0x1
JS 0x0010124d
MOV R8,qword ptr [RDI]
MOV R9D,0xffffffff
MOV EDI,0x0
JMP 0x00101231
LAB_00101222:
LEA EDI,[RAX + 0x1]
JL 0x0010122d
LEA EDI,[RAX + 0x1]
MOV R9D,EAX
LAB_0010122d:
CMP EDI,EDX
JG 0x00101253
LAB_00101231:
LEA ECX,[RDI + RDX*0x1]
MOV EAX,ECX
SHR EAX,0x1f
ADD EAX,ECX
SAR EAX,0x1
MOV... | /* func0(std::vector<int, std::allocator<int> > const&, int, int) */
int func0(vector *param_1,int param_2,int param_3)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
iVar3 = param_3 + -1;
if (iVar3 < 0) {
iVar5 = -1;
}
else {
iVar5 = -1;
iVar4 = 0;
do {
iVar2 = (i... |
3,170 | func0 |
#include <assert.h>
#include <vector>
| int func0(const std::vector<int>& arr, int x, int n) {
int low = 0;
int high = n - 1;
int res = -1;
while (low <= high) {
int mid = (low + high) / 2;
if (arr[mid] > x) {
high = mid - 1;
} else if (arr[mid] < x) {
low = mid + 1;
} else {
... | int main() {
assert(func0({1, 2, 3}, 1, 3) == 0);
assert(func0({1, 1, 1, 2, 3, 4}, 1, 6) == 2);
assert(func0({2, 3, 2, 3, 6, 8, 9}, 3, 7) == 3);
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> > const&, int, int):
endbr64
sub $0x1,%edx
js 14a0 <_Z5func0RKSt6vectorIiSaIiEEii+0x50>
mov (%rdi),%r9
mov $0xffffffff,%r8d
xor %ecx,%ecx
jmp 1477 <_Z5func0RKSt6vectorIiSaIiEEii+0x27>
nopw %cs:0x0(%rax,%rax,1)
lea -0x1(%rax),%edx
cmp %ecx,%edx
jl ... | _Z5func0RKSt6vectorIiSaIiEEii:
endbr64
sub edx, 1
js short loc_1400
mov r9, [rdi]
mov r8d, 0FFFFFFFFh
xor edi, edi
jmp short loc_13D7
loc_13D0:
lea edx, [rax-1]
cmp edi, edx
jg short loc_13F9
loc_13D7:
lea ecx, [rdi+rdx]
mov eax, ecx
shr eax, 1Fh
add eax, ecx
sar ... | long long func0(long long *a1, int a2, int a3)
{
int v3; // edx
long long v4; // r9
unsigned int v5; // r8d
int v6; // edi
int v7; // eax
int v8; // ecx
v3 = a3 - 1;
if ( v3 < 0 )
return 0xFFFFFFFFLL;
v4 = *a1;
v5 = -1;
v6 = 0;
do
{
while ( 1 )
{
v7 = (v6 + v3) / 2;
v... | func0:
ENDBR64
SUB EDX,0x1
JS 0x00101400
MOV R9,qword ptr [RDI]
MOV R8D,0xffffffff
XOR EDI,EDI
JMP 0x001013d7
LAB_001013d0:
LEA EDX,[RAX + -0x1]
CMP EDI,EDX
JG 0x001013f9
LAB_001013d7:
LEA ECX,[RDI + RDX*0x1]
MOV EAX,ECX
SHR EAX,0x1f
ADD EAX,ECX
SAR EAX,0x1
MOVSXD RCX,EAX
MOV ECX,dword ptr [R9 + RCX*0x4]
CMP ESI,ECX
JL... | /* func0(std::vector<int, std::allocator<int> > const&, int, int) */
int func0(vector *param_1,int param_2,int param_3)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
iVar3 = param_3 + -1;
if (iVar3 < 0) {
return -1;
}
iVar5 = -1;
iVar4 = 0;
do {
while( true ) {
iVar2 ... |
3,171 | func0 |
#include <assert.h>
#include <vector>
| int func0(const std::vector<int>& arr, int x, int n) {
int low = 0;
int high = n - 1;
int res = -1;
while (low <= high) {
int mid = (low + high) / 2;
if (arr[mid] > x) {
high = mid - 1;
} else if (arr[mid] < x) {
low = mid + 1;
} else {
... | int main() {
assert(func0({1, 2, 3}, 1, 3) == 0);
assert(func0({1, 1, 1, 2, 3, 4}, 1, 6) == 2);
assert(func0({2, 3, 2, 3, 6, 8, 9}, 3, 7) == 3);
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> > const&, int, int):
endbr64
sub $0x1,%edx
js 1480 <_Z5func0RKSt6vectorIiSaIiEEii+0x50>
mov (%rdi),%r9
mov $0xffffffff,%r8d
xor %ecx,%ecx
jmp 1457 <_Z5func0RKSt6vectorIiSaIiEEii+0x27>
nopw %cs:0x0(%rax,%rax,1)
lea -0x1(%rax),%edx
cmp %edx,%ecx
jg ... | _Z5func0RKSt6vectorIiSaIiEEii:
endbr64
sub edx, 1
js short loc_1490
mov r9, [rdi]
mov r8d, 0FFFFFFFFh
xor edi, edi
jmp short loc_1467
loc_1460:
lea edx, [rax-1]
cmp edi, edx
jg short loc_1489
loc_1467:
lea ecx, [rdx+rdi]
mov eax, ecx
shr eax, 1Fh
add eax, ecx
sar ... | long long func0(long long *a1, int a2, int a3)
{
int v3; // edx
long long v4; // r9
unsigned int v5; // r8d
int v6; // edi
int v7; // eax
int v8; // ecx
v3 = a3 - 1;
if ( v3 < 0 )
return 0xFFFFFFFFLL;
v4 = *a1;
v5 = -1;
v6 = 0;
do
{
while ( 1 )
{
v7 = (v3 + v6) / 2;
v... | func0:
ENDBR64
SUB EDX,0x1
JS 0x00101490
MOV R9,qword ptr [RDI]
MOV R8D,0xffffffff
XOR EDI,EDI
JMP 0x00101467
LAB_00101460:
LEA EDX,[RAX + -0x1]
CMP EDI,EDX
JG 0x00101489
LAB_00101467:
LEA ECX,[RDX + RDI*0x1]
MOV EAX,ECX
SHR EAX,0x1f
ADD EAX,ECX
SAR EAX,0x1
MOVSXD RCX,EAX
MOV ECX,dword ptr [R9 + RCX*0x4]
CMP ESI,ECX
JL... | /* func0(std::vector<int, std::allocator<int> > const&, int, int) */
int func0(vector *param_1,int param_2,int param_3)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
iVar3 = param_3 + -1;
if (iVar3 < 0) {
return -1;
}
iVar5 = -1;
iVar4 = 0;
do {
while( true ) {
iVar2 ... |
3,172 | func0 |
#include <iostream>
#include <regex>
#include <assert.h>
| std::string func0(const std::string& text) {
std::regex patterns("a.*?b$");
if (std::regex_search(text, patterns)) {
return "Found a match!";
} else {
return "Not matched!";
}
}
| int main() {
assert(func0("aabbbb") == "Found a match!");
assert(func0("aabAbbbc") == "Not matched!");
assert(func0("accddbbjjj") == "Not matched!");
return 0;
}
| O0 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x58,%rsp
mov %rdi,-0x58(%rbp)
mov %rsi,-0x60(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
lea -0x40(%rbp),%rax
mov $0x10,%edx
lea ... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 68h
mov [rbp+var_68], rdi
mov [rbp+var_70], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_40]
mov edx, 10h
lea rcx, aAB; "a.*?b$"
mov ... | 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 const&) */
string * func0(string *param_1)
{
bool bVar1;
string *in_RSI;
long in_FS_OFFSET;
allocator local_59;
allocator *local_58;
allocator *local_50;
regex local_48 [40];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
std::regex::basic_regex(local_48,"a.*?b$"... |
3,173 | func0 |
#include <iostream>
#include <regex>
#include <assert.h>
| std::string func0(const std::string& text) {
std::regex patterns("a.*?b$");
if (std::regex_search(text, patterns)) {
return "Found a match!";
} else {
return "Not matched!";
}
}
| int main() {
assert(func0("aabbbb") == "Found a match!");
assert(func0("aabAbbbc") == "Not matched!");
assert(func0("accddbbjjj") == "Not matched!");
return 0;
}
| O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r13
push %r12
push %rbp
push %rbx
sub $0x58,%rsp
mov %rdi,%rbx
mov %rsi,%rbp
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
lea 0x20(%rsp),%r13
mov %r13,%rdi
callq 4730 <_ZN... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r14
push r12
push rbx
sub rsp, 58h
mov rbx, rdi
mov r14, rsi
mov rax, fs:28h
mov [rbp+var_28], rax
xor eax, eax
lea r12, [rbp+var_70]
lea rdi, [rbp+var_68]; this
call __Z... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV RBX,RDI
MOV R14,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
XOR EAX,EAX
LEA R12,[RBP + -0x70]
LEA RDI,[RBP + -0x68]
CALL 0x001046f0
MOV qword ptr [RBP + -0x60],0x0
MOV qword ptr [RBP + -0x58],0x0
MOV ECX,0x10
LEA RDX,[0x... | /* func0(std::string const&) */
string * func0(string *param_1)
{
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
_Sp_counted_base<(_Lock_policy)2> *p_Var2;
bool bVar3;
int iVar4;
int8 *in_RSI;
long in_FS_OFFSET;
regex local_78 [8];
int local_70 [8];
int8 local_68;
_Sp_counted_base<(_Lock_policy)2> *lo... | |
3,174 | func0 |
#include <iostream>
#include <regex>
#include <assert.h>
| std::string func0(const std::string& text) {
std::regex patterns("a.*?b$");
if (std::regex_search(text, patterns)) {
return "Found a match!";
} else {
return "Not matched!";
}
}
| int main() {
assert(func0("aabbbb") == "Found a match!");
assert(func0("aabAbbbc") == "Not matched!");
assert(func0("accddbbjjj") == "Not matched!");
return 0;
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
mov %rsi,%rbx
sub $0x50,%rsp
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
lea 0x20(%rsp),%r13
lea 0x8(%rsp),%rbp... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r14
mov r14, rsi
push r13
lea r13, [rbp+var_70]
push r12
lea r12, [rbp+var_68]
push rbx
mov rbx, rdi
mov rdi, r12; this
sub rsp, 50h
mov rax, fs:28h
mov [rbp+var_28], rax... | long long func0(long long a1, long long *a2)
{
long long v3; // rdi
long long v4; // rsi
long long v5; // rsi
char v6; // r13
long long v7; // rdi
long long v8; // rdx
volatile signed __int32 *v9; // rcx
signed __int32 v10; // eax
long long v12; // rax
_BYTE v13[8]; // [rsp+0h] [rbp-70h] BYREF
_B... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R14
MOV R14,RSI
PUSH R13
LEA R13,[RBP + -0x70]
PUSH R12
LEA R12,[RBP + -0x68]
PUSH RBX
MOV RBX,RDI
MOV RDI,R12
SUB RSP,0x50
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
XOR EAX,EAX
CALL 0x001036d0
LEA RDX,[0x11865d]
PXOR XMM0,XMM0
MOV RDI,R13
MOV ECX,0x10
LEA RSI,... | /* func0(std::string const&) */
string * func0(string *param_1)
{
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
int8 uVar2;
bool bVar3;
int iVar4;
int8 *in_RSI;
long in_FS_OFFSET;
regex local_78 [8];
int local_70 [8];
int local_68 [16];
int local_58 [16];
int local_48 [16];
long local_30;
lo... |
3,175 | func0 |
#include <iostream>
#include <regex>
#include <assert.h>
| std::string func0(const std::string& text) {
std::regex patterns("a.*?b$");
if (std::regex_search(text, patterns)) {
return "Found a match!";
} else {
return "Not matched!";
}
}
| int main() {
assert(func0("aabbbb") == "Found a match!");
assert(func0("aabAbbbc") == "Not matched!");
assert(func0("accddbbjjj") == "Not matched!");
return 0;
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
mov %rsi,%rbx
sub $0x50,%rsp
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
lea 0x20(%rsp),%r13
lea 0x8(%rsp),%rbp... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
mov r15, rsi
push r14
push r13
push r12
push rbp
push rbx
mov rbx, rdi
sub rsp, 2B8h
mov rax, fs:28h
mov [rsp+2E8h+var_40], rax
xor eax, eax
lea r14, [rsp+2E8h+var_2A0]
mov rdi, r14; this
c... | long long func0(long long a1, unsigned long long *a2)
{
__m128i v3; // xmm0
long long v4; // rdi
void *v5; // rdi
void **v6; // rbp
unsigned long long v7; // r12
void *v8; // rdi
unsigned long long v9; // r13
unsigned long long v10; // rbp
long long v11; // rax
long long v12; // rcx
unsigned long... | func0:
ENDBR64
PUSH R15
MOV R15,RSI
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV RBX,RDI
SUB RSP,0x2b8
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x2a8],RAX
XOR EAX,EAX
LEA R14,[RSP + 0x48]
MOV RDI,R14
CALL 0x00104730
LEA RDX,[0x11a6a2]
PXOR XMM0,XMM0
LEA RDI,[RSP + 0x110]
MOV R8D,0x10
MOV RCX,R14
LEA RSI,[RD... | /* func0(std::string const&) */
string * func0(string *param_1)
{
ulong uVar1;
int8 uVar2;
ulong uVar3;
int auVar4 [16];
bool bVar5;
char cVar6;
long lVar7;
int8 *puVar8;
int8 *puVar9;
ulong uVar10;
ulong *puVar11;
long lVar12;
ulong uVar13;
ulong *in_RSI;
uint *puVar14;
_Match_mode _V... |
3,176 | func0 |
#include <vector>
#include <string>
#include <algorithm>
#include <cassert>
struct Item {
std::string name;
double price;
bool operator==(const Item& other) const {
return name == other.name && price == other.price;
}
};
| std::vector<Item> func0(const std::vector<Item>& items, int n) {
std::vector<Item> result = items;
if (n >= result.size()) {
std::sort(result.begin(), result.end(), [](const Item& a, const Item& b) {
return a.price < b.price;
});
return result;
}
std::nth_elem... | int main() {
// Test case 1
std::vector<Item> items1 = { {"Item-1", 101.1}, {"Item-2", 555.22} };
std::vector<Item> expected1 = { {"Item-1", 101.1} };
assert(func0(items1, 1) == expected1);
// Test case 2
std::vector<Item> items2 = { {"Item-1", 101.1}, {"Item-2", 555.22} };
std::vec... | O0 | cpp | func0(std::vector<Item, std::allocator<Item> > const&, int)::{lambda(Item const&, Item const&)#1}::operator()(Item const&, Item const&) const:
push %rbp
mov %rsp,%rbp
mov %rdi,-0x8(%rbp)
mov %rsi,-0x10(%rbp)
mov %rdx,-0x18(%rbp)
mov -0x10(%rbp),%rax
movsd 0x20(%rax),%xmm1
mov -0x18(%rbp),%rax
movsd... | _ZZ5func0RKSt6vectorI4ItemSaIS0_EEiENKUlRKS0_S6_E_clES6_S6_:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_10]
movsd xmm1, qword ptr [rax+20h]
mov rax, [rbp+var_18]
movsd xmm0, qword ptr [rax+20h]
comisd xmm0, xmm1
setnbe al
pop... | bool func0(std::vector<Item> const&,int)::{lambda(Item const&,Item const&)#1}::operator()(
long long a1,
long long a2,
long long a3)
{
return *(double *)(a3 + 32) > *(double *)(a2 + 32);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R12
PUSH RBX
SUB RSP,0x30
MOV qword ptr [RBP + -0x28],RDI
MOV qword ptr [RBP + -0x30],RSI
MOV dword ptr [RBP + -0x34],EDX
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,R... | /* func0(std::vector<Item, std::allocator<Item> > const&, int) */
vector * func0(vector *param_1,int param_2)
{
__normal_iterator _Var1;
__normal_iterator _Var2;
__normal_iterator _Var3;
ulong uVar4;
_lambda_Item_const__Item_const___2_ in_ECX;
int in_EDX;
_lambda_Item_const__Item_const___1_ extraout_EDX... |
3,177 | func0 |
#include <vector>
#include <string>
#include <algorithm>
#include <cassert>
struct Item {
std::string name;
double price;
bool operator==(const Item& other) const {
return name == other.name && price == other.price;
}
};
| std::vector<Item> func0(const std::vector<Item>& items, int n) {
std::vector<Item> result = items;
if (n >= result.size()) {
std::sort(result.begin(), result.end(), [](const Item& a, const Item& b) {
return a.price < b.price;
});
return result;
}
std::nth_elem... | int main() {
// Test case 1
std::vector<Item> items1 = { {"Item-1", 101.1}, {"Item-2", 555.22} };
std::vector<Item> expected1 = { {"Item-1", 101.1} };
assert(func0(items1, 1) == expected1);
// Test case 2
std::vector<Item> items2 = { {"Item-1", 101.1}, {"Item-2", 555.22} };
std::vec... | O1 | cpp | void std::__adjust_heap<__gnu_cxx::__normal_iterator<Item*, std::vector<Item, std::allocator<Item> > >, long, Item, __gnu_cxx::__ops::_Iter_comp_iter<func0(std::vector<Item, std::allocator<Item> > const&, int)::{lambda(Item const&, Item const&)#1}> >(__gnu_cxx::__normal_iterator<Item*, std::vector<Item, std::allocator<... | _ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E1_EEEvT_T0_SH_T1_T2_:
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 38h
mov r9, rsi
mov rbx, rdx
mov rbp, rcx
mov rax, fs:28h
mo... | unsigned long long std::__adjust_heap<__gnu_cxx::__normal_iterator<Item *,std::vector<Item>>,long,Item,__gnu_cxx::__ops::_Iter_comp_iter<func0(std::vector<Item> const&,int)::{lambda(Item const&,Item const&)#3}>>(
long long a1,
long long a2,
long long a3,
long long a4)
{
long long v7; ... | __adjust_heap<__normal_iterator<Item*,std::vector<Item,std::allocator<Item>>>,long,Item,__ops::_Iter_comp_iter<func0(std::vector<Item,std::allocator<Item>>const&,int)::{lambda(Item_const&,Item_const&)#3}>>:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x38
MOV R9,RSI
MOV RBX,RDX
MOV RBP,RCX
MOV RAX,qwo... | /* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* void std::__adjust_heap<__normal_iterator<Item*, std::vector<Item, std::allocator<Item> > >,
long, Item, __ops::_Iter_comp_iter<func0(std::vector<Item, std::allocator<Item> > const&,
int)::{lambda(Item const&, Item const&)#3}> >(__nor... |
3,178 | func0 |
#include <vector>
#include <string>
#include <algorithm>
#include <cassert>
struct Item {
std::string name;
double price;
bool operator==(const Item& other) const {
return name == other.name && price == other.price;
}
};
| std::vector<Item> func0(const std::vector<Item>& items, int n) {
std::vector<Item> result = items;
if (n >= result.size()) {
std::sort(result.begin(), result.end(), [](const Item& a, const Item& b) {
return a.price < b.price;
});
return result;
}
std::nth_elem... | int main() {
// Test case 1
std::vector<Item> items1 = { {"Item-1", 101.1}, {"Item-2", 555.22} };
std::vector<Item> expected1 = { {"Item-1", 101.1} };
assert(func0(items1, 1) == expected1);
// Test case 2
std::vector<Item> items2 = { {"Item-1", 101.1}, {"Item-2", 555.22} };
std::vec... | O2 | cpp | __gnu_cxx::__normal_iterator<Item*, std::vector<Item, std::allocator<Item> > > std::__unguarded_partition<__gnu_cxx::__normal_iterator<Item*, std::vector<Item, std::allocator<Item> > >, __gnu_cxx::__ops::_Iter_comp_iter<func0(std::vector<Item, std::allocator<Item> > const&, int)::{lambda(Item const&, Item const&)#2}> >... | _ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_T0__isra_0:
push r12
push rbp
mov rbp, rdi
push rbx
mov rbx, rdi
add rdi, 10h
sub rsp, 30h
mov rcx, [rbx+8]
mov rax, fs:28h
mov [rsp... | unsigned long long std::__unguarded_linear_insert<__gnu_cxx::__normal_iterator<Item *,std::vector<Item>>,__gnu_cxx::__ops::_Val_comp_iter<func0(std::vector<Item> const&,int)::{lambda(Item const&,Item const&)#1}>>(
long long *a1)
{
long long *v1; // rbp
long long *v3; // rdi
long long v4; // rcx
long lo... | __unguarded_linear_insert<__normal_iterator<Item*,std::vector<Item,std::allocator<Item>>>,__ops::_Val_comp_iter<func0(std::vector<Item,std::allocator<Item>>const&,int)::{lambda(Item_const&,Item_const&)#1}>>:
PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
MOV RBX,RDI
ADD RDI,0x10
SUB RSP,0x30
MOV RCX,qword ptr [RBX + 0x8]
MOV R... | /* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* void std::__unguarded_linear_insert<__normal_iterator<Item*, std::vector<Item,
std::allocator<Item> > >, __ops::_Val_comp_iter<func0(std::vector<Item, std::allocator<Item> >
const&, int)::{lambda(Item const&, Item const&)#1}> >(__norm... |
3,179 | func0 |
#include <vector>
#include <string>
#include <algorithm>
#include <cassert>
struct Item {
std::string name;
double price;
bool operator==(const Item& other) const {
return name == other.name && price == other.price;
}
};
| std::vector<Item> func0(const std::vector<Item>& items, int n) {
std::vector<Item> result = items;
if (n >= result.size()) {
std::sort(result.begin(), result.end(), [](const Item& a, const Item& b) {
return a.price < b.price;
});
return result;
}
std::nth_elem... | int main() {
// Test case 1
std::vector<Item> items1 = { {"Item-1", 101.1}, {"Item-2", 555.22} };
std::vector<Item> expected1 = { {"Item-1", 101.1} };
assert(func0(items1, 1) == expected1);
// Test case 2
std::vector<Item> items2 = { {"Item-1", 101.1}, {"Item-2", 555.22} };
std::vec... | O3 | cpp | void std::__push_heap<__gnu_cxx::__normal_iterator<Item*, std::vector<Item, std::allocator<Item> > >, long, Item, __gnu_cxx::__ops::_Iter_comp_val<func0(std::vector<Item, std::allocator<Item> > const&, int)::{lambda(Item const&, Item const&)#2}> >(__gnu_cxx::__normal_iterator<Item*, std::vector<Item, std::allocator<Ite... | _ZSt16__insertion_sortIN9__gnu_cxx17__normal_iteratorIP4ItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_comp_iterIZ5func0RKS6_iEUlRKS2_SD_E_EEEvT_SG_T0__isra_0:
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 48h
mov rax, fs:28h
mov [rsp+78h+var_40], rax
xor eax, eax
cmp ... | unsigned long long std::__insertion_sort<__gnu_cxx::__normal_iterator<Item *,std::vector<Item>>,__gnu_cxx::__ops::_Iter_comp_iter<func0(std::vector<Item> const&,int)::{lambda(Item const&,Item const&)#1}>>(
long long a1,
long long a2)
{
long long v4; // r13
double *v5; // rdx
long long *v6; // rcx... | __insertion_sort<__normal_iterator<Item*,std::vector<Item,std::allocator<Item>>>,__ops::_Iter_comp_iter<func0(std::vector<Item,std::allocator<Item>>const&,int)::{lambda(Item_const&,Item_const&)#1}>>:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x48
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38... | /* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* void std::__insertion_sort<__normal_iterator<Item*, std::vector<Item, std::allocator<Item> > >,
__ops::_Iter_comp_iter<func0(std::vector<Item, std::allocator<Item> > const&, int)::{lambda(Item
const&, Item const&)#1}> >(__normal_itera... |
3,180 | func0 |
#include <iostream>
#include <unordered_map>
#include <cassert>
| int func0(std::unordered_map<char, int> dict) {
int sum = 0;
for (auto const& pair : dict) {
sum += pair.second;
}
return sum;
}
| int main() {
assert(func0({{'a', 100}, {'b', 200}, {'c', 300}}) == 600);
assert(func0({{'a', 25}, {'b', 18}, {'c', 45}}) == 88);
assert(func0({{'a', 36}, {'b', 39}, {'c', 49}}) == 124);
return 0;
}
| O0 | cpp | func0(std::unordered_map<char, int, std::hash<char>, std::equal_to<char>, std::allocator<std::pair<char const, int> > >):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x40,%rsp
mov %rdi,-0x38(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x8(%rbp)
xor %eax,%eax
movl $0x0,-0x2c(%rbp)
mov -0x38(%rbp),%rax
mov %ra... | _Z5func0St13unordered_mapIciSt4hashIcESt8equal_toIcESaISt4pairIKciEEE:
endbr64
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_38], rdi
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
mov [rbp+var_2C], 0
mov rax, [rbp+var_38]
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
mov ... | long long func0(long long a1)
{
unsigned int v2; // [rsp+14h] [rbp-2Ch]
long long v3; // [rsp+18h] [rbp-28h] BYREF
_QWORD v4[2]; // [rsp+20h] [rbp-20h] BYREF
long long v5; // [rsp+30h] [rbp-10h]
unsigned long long v6; // [rsp+38h] [rbp-8h]
v6 = __readfsqword(0x28u);
v2 = 0;
v4[1] = a1;
v3 = std::uno... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x38],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
MOV dword ptr [RBP + -0x2c],0x0
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,RAX
CALL 0x00101838
MOV qword pt... | /* func0(std::unordered_map<char, int, std::hash<char>, std::equal_to<char>,
std::allocator<std::pair<char const, int> > >) */
int func0(unordered_map param_1)
{
char cVar1;
int4 in_register_0000003c;
long in_FS_OFFSET;
int local_34;
int8 local_30;
int8 local_28;
unordered_map<char,int,std::hash<char... |
3,181 | func0 |
#include <iostream>
#include <unordered_map>
#include <cassert>
| int func0(std::unordered_map<char, int> dict) {
int sum = 0;
for (auto const& pair : dict) {
sum += pair.second;
}
return sum;
}
| int main() {
assert(func0({{'a', 100}, {'b', 200}, {'c', 300}}) == 600);
assert(func0({{'a', 25}, {'b', 18}, {'c', 45}}) == 88);
assert(func0({{'a', 36}, {'b', 39}, {'c', 49}}) == 124);
return 0;
}
| O1 | cpp | func0(std::unordered_map<char, int, std::hash<char>, std::equal_to<char>, std::allocator<std::pair<char const, int> > >):
endbr64
mov 0x10(%rdi),%rax
test %rax,%rax
je 1309 <_Z5func0St13unordered_mapIciSt4hashIcESt8equal_toIcESaISt4pairIKciEEE+0x20>
mov $0x0,%edx
add 0xc(%rax),%edx
mov (%rax),%rax
tes... | _Z5func0St13unordered_mapIciSt4hashIcESt8equal_toIcESaISt4pairIKciEEE:
endbr64
mov rax, [rdi+10h]
test rax, rax
jz short loc_12E9
mov edx, 0
loc_12DB:
add edx, [rax+0Ch]
mov rax, [rax]
test rax, rax
jnz short loc_12DB
loc_12E6:
mov eax, edx
retn
loc_12E9:
mov edx, 0
jmp short ... | long long func0(long long a1)
{
long long *v1; // rax
unsigned int v2; // edx
v1 = *(long long **)(a1 + 16);
if ( v1 )
{
v2 = 0;
do
{
v2 += *((_DWORD *)v1 + 3);
v1 = (long long *)*v1;
}
while ( v1 );
}
else
{
return 0;
}
return v2;
} | func0:
ENDBR64
MOV RAX,qword ptr [RDI + 0x10]
TEST RAX,RAX
JZ 0x001012e9
MOV EDX,0x0
LAB_001012db:
ADD EDX,dword ptr [RAX + 0xc]
MOV RAX,qword ptr [RAX]
TEST RAX,RAX
JNZ 0x001012db
LAB_001012e6:
MOV EAX,EDX
RET
LAB_001012e9:
MOV EDX,0x0
JMP 0x001012e6 | /* func0(std::unordered_map<char, int, std::hash<char>, std::equal_to<char>,
std::allocator<std::pair<char const, int> > >) */
int func0(unordered_map param_1)
{
long *plVar1;
int iVar2;
int4 in_register_0000003c;
plVar1 = *(long **)(CONCAT44(in_register_0000003c,param_1) + 0x10);
if (plVar1 == (long ... |
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.