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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
282 | func0 |
#include <vector>
#include <cassert>
| std::vector<int> func0(std::vector<int>& nums) {
float shrink_fact = 1.3;
int gaps = nums.size();
bool swapped = true;
int i = 0;
while (gaps > 1 || swapped) {
gaps = int(gaps / shrink_fact);
swapped = false;
i = 0;
while (gaps + i < nums.size()) {
... | int main() {
std::vector<int> sorted;
std::vector<int> vec1 = std::vector<int>{5, 15, 37, 25, 79};
std::vector<int> vec2 = std::vector<int>{41, 32, 15, 19, 22};
std::vector<int> vec3 = std::vector<int>{99, 15, 13, 47};
sorted = func0(vec1);
assert((sorted == std::vector<int>{5, 15, 25, 37,... | O2 | cpp | func0(std::vector<int, std::allocator<int> >&):
endbr64
push %r12
movss 0x9da(%rip),%xmm1
mov %rdi,%r12
push %rbp
push %rbx
mov %rsi,%rbx
mov (%rsi),%rsi
mov 0x8(%rbx),%rbp
sub %rsi,%rbp
mov %rbp,%r11
lea (%rsi,%rbp,1),%r8
sar $0x2,%r11
mov %r11d,%r9d
xchg %ax,%ax
pxor %xmm0,%xmm0
... | _Z5func0RSt6vectorIiSaIiEE:
endbr64
push r12
movss xmm1, cs:dword_2004
push rbp
mov rbp, rsi
push rbx
mov r10, [rsi]
mov rbx, rdi
mov r12, [rsi+8]
sub r12, r10
mov r11, r12
lea rdi, [r10+r12]
sar r11, 2
mov r9d, r11d
xchg ax, ax
loc_1670:
pxor xmm0, xmm0
cvtsi2ss xmm... | long long func0(long long a1, _QWORD *a2)
{
_DWORD *v3; // r10
signed long long v5; // r12
_DWORD *v6; // rdi
int v7; // r9d
char v8; // r8
_DWORD *v9; // rax
int v10; // edx
_DWORD *v11; // rcx
_DWORD *v12; // rsi
signed long long v13; // rbp
long long result; // rax
v3 = (_DWORD *)*a2;
v5 ... | func0:
ENDBR64
PUSH R12
MOVSS XMM1,dword ptr [0x00102004]
PUSH RBP
MOV RBP,RSI
PUSH RBX
MOV R10,qword ptr [RSI]
MOV RBX,RDI
MOV R12,qword ptr [RSI + 0x8]
SUB R12,R10
MOV R11,R12
LEA RDI,[R10 + R12*0x1]
SAR R11,0x2
MOV R9D,R11D
NOP
LAB_00101670:
PXOR XMM0,XMM0
CVTSI2SS XMM0,R9D
DIVSS XMM0,XMM1
CVTTSS2SI R9D,XMM0
MOVSXD ... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(std::vector<int, std::allocator<int> >&) */
vector * func0(vector *param_1)
{
int iVar1;
long lVar2;
int4 *__src;
int8 uVar3;
bool bVar4;
float fVar5;
int *piVar6;
int4 *__dest;
size_t __n;
long *in_RSI;
... |
283 | func0 |
#include <vector>
#include <cassert>
| std::vector<int> func0(std::vector<int>& nums) {
float shrink_fact = 1.3;
int gaps = nums.size();
bool swapped = true;
int i = 0;
while (gaps > 1 || swapped) {
gaps = int(gaps / shrink_fact);
swapped = false;
i = 0;
while (gaps + i < nums.size()) {
... | int main() {
std::vector<int> sorted;
std::vector<int> vec1 = std::vector<int>{5, 15, 37, 25, 79};
std::vector<int> vec2 = std::vector<int>{41, 32, 15, 19, 22};
std::vector<int> vec3 = std::vector<int>{99, 15, 13, 47};
sorted = func0(vec1);
assert((sorted == std::vector<int>{5, 15, 25, 37,... | O3 | cpp | func0(std::vector<int, std::allocator<int> >&):
endbr64
push %r12
movss 0xa6a(%rip),%xmm1
mov %rdi,%r12
push %rbp
push %rbx
mov %rsi,%rbx
mov (%rsi),%rsi
mov 0x8(%rbx),%rbp
sub %rsi,%rbp
mov %rbp,%r11
lea (%rsi,%rbp,1),%r8
sar $0x2,%r11
mov %r11d,%r9d
xchg %ax,%ax
pxor %xmm0,%xmm0
... | _Z5func0RSt6vectorIiSaIiEE:
endbr64
push r12
movss xmm1, cs:dword_2004
push rbp
mov rbp, rsi
push rbx
mov r10, [rsi]
mov rbx, rdi
mov r12, [rsi+8]
sub r12, r10
mov r11, r12
lea rdi, [r10+r12]
sar r11, 2
mov r9d, r11d
xchg ax, ax
loc_1670:
pxor xmm0, xmm0
cvtsi2ss xmm... | long long func0(long long a1, _QWORD *a2)
{
_DWORD *v3; // r10
signed long long v5; // r12
_DWORD *v6; // rdi
int v7; // r9d
char v8; // r8
_DWORD *v9; // rax
int v10; // edx
_DWORD *v11; // rcx
_DWORD *v12; // rsi
signed long long v13; // rbp
long long result; // rax
v3 = (_DWORD *)*a2;
v5 ... | func0:
ENDBR64
PUSH R12
MOVSS XMM1,dword ptr [0x00102004]
PUSH RBP
MOV RBP,RSI
PUSH RBX
MOV R10,qword ptr [RSI]
MOV RBX,RDI
MOV R12,qword ptr [RSI + 0x8]
SUB R12,R10
MOV R11,R12
LEA RDI,[R10 + R12*0x1]
SAR R11,0x2
MOV R9D,R11D
NOP
LAB_00101670:
PXOR XMM0,XMM0
CVTSI2SS XMM0,R9D
DIVSS XMM0,XMM1
CVTTSS2SI R9D,XMM0
MOVSXD ... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(std::vector<int, std::allocator<int> >&) */
vector * func0(vector *param_1)
{
int iVar1;
long lVar2;
int4 *__src;
int8 uVar3;
bool bVar4;
float fVar5;
int *piVar6;
int4 *__dest;
size_t __n;
long *in_RSI;
... |
284 | func0 |
#include <assert.h>
| bool func0(int n) {
if (n % 4 != 2) {
return true;
}
return false;
}
| int main() {
assert(func0(5) == true);
assert(func0(10) == false);
assert(func0(15) == true);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x4(%rbp)
mov -0x4(%rbp),%eax
cltd
shr $0x1e,%edx
add %edx,%eax
and $0x3,%eax
sub %edx,%eax
cmp $0x2,%eax
je 116e <_Z5func0i+0x25>
mov $0x1,%eax
jmp 1173 <_Z5func0i+0x2a>
mov $0x0,%eax
pop %rbp
retq
| _Z5func0i:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_4], edi
mov edx, [rbp+var_4]
mov eax, edx
sar eax, 1Fh
shr eax, 1Eh
add edx, eax
and edx, 3
sub edx, eax
mov eax, edx
cmp eax, 2
jz short loc_1174
mov eax, 1
jmp short loc_1179
loc_1174:
mov eax, 0
loc_... | _BOOL8 func0(int a1)
{
return a1 % 4 != 2;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x4],EDI
MOV EDX,dword ptr [RBP + -0x4]
MOV EAX,EDX
SAR EAX,0x1f
SHR EAX,0x1e
ADD EDX,EAX
AND EDX,0x3
SUB EDX,EAX
MOV EAX,EDX
CMP EAX,0x2
JZ 0x00101174
MOV EAX,0x1
JMP 0x00101179
LAB_00101174:
MOV EAX,0x0
LAB_00101179:
POP RBP
RET | /* func0(int) */
bool func0(int param_1)
{
return param_1 % 4 != 2;
} |
285 | func0 |
#include <assert.h>
| bool func0(int n) {
if (n % 4 != 2) {
return true;
}
return false;
}
| int main() {
assert(func0(5) == true);
assert(func0(10) == false);
assert(func0(15) == true);
return 0;
}
| O1 | cpp | func0(int):
endbr64
mov %edi,%eax
sar $0x1f,%eax
shr $0x1e,%eax
add %eax,%edi
and $0x3,%edi
sub %eax,%edi
cmp $0x2,%edi
setne %al
retq
| _Z5func0i:
endbr64
mov eax, edi
sar eax, 1Fh
shr eax, 1Eh
add edi, eax
and edi, 3
sub edi, eax
cmp edi, 2
setnz al
retn | bool func0(int a1)
{
return a1 % 4 != 2;
} | func0:
ENDBR64
MOV EAX,EDI
SAR EAX,0x1f
SHR EAX,0x1e
ADD EDI,EAX
AND EDI,0x3
SUB EDI,EAX
CMP EDI,0x2
SETNZ AL
RET | /* func0(int) */
bool func0(int param_1)
{
return param_1 % 4 != 2;
} |
286 | func0 |
#include <assert.h>
| bool func0(int n) {
if (n % 4 != 2) {
return true;
}
return false;
}
| int main() {
assert(func0(5) == true);
assert(func0(10) == false);
assert(func0(15) == true);
return 0;
}
| O2 | cpp | func0(int):
endbr64
and $0x80000003,%edi
cmp $0x2,%edi
setne %al
retq
nopw %cs:0x0(%rax,%rax,1)
nopl 0x0(%rax,%rax,1)
| _Z5func0i:
endbr64
and edi, 80000003h
cmp edi, 2
setnz al
retn | bool func0(int a1)
{
return (a1 & 0x80000003) != 2;
} | func0:
ENDBR64
AND EDI,0x80000003
CMP EDI,0x2
SETNZ AL
RET | /* func0(int) */
bool func0(int param_1)
{
return (param_1 & 0x80000003U) != 2;
} |
287 | func0 |
#include <assert.h>
| bool func0(int n) {
if (n % 4 != 2) {
return true;
}
return false;
}
| int main() {
assert(func0(5) == true);
assert(func0(10) == false);
assert(func0(15) == true);
return 0;
}
| O3 | cpp | func0(int):
endbr64
and $0x80000003,%edi
cmp $0x2,%edi
setne %al
retq
nopw %cs:0x0(%rax,%rax,1)
nopl 0x0(%rax,%rax,1)
| _Z5func0i:
endbr64
and edi, 80000003h
cmp edi, 2
setnz al
retn | bool func0(int a1)
{
return (a1 & 0x80000003) != 2;
} | func0:
ENDBR64
AND EDI,0x80000003
CMP EDI,0x2
SETNZ AL
RET | /* func0(int) */
bool func0(int param_1)
{
return (param_1 & 0x80000003U) != 2;
} |
288 | func0 |
#include <iostream>
#include <string>
#include <sstream>
#include <vector>
#include <regex>
#include <assert.h>
| std::vector<std::string> func0(const std::string& text) {
std::regex pattern("; |, |\\*|\\n");
std::sregex_token_iterator iter(text.begin(), text.end(), pattern, -1);
std::sregex_token_iterator end;
std::vector<std::string> results;
while (iter != end) {
results.push_back(*iter++);
... | int main() {
// Test cases
std::vector<std::string> result1 = func0("Forces of the \ndarkness*are coming into the play.");
std::vector<std::string> expected1 = {"Forces of the ", "darkness", "are coming into the play."};
assert(result1 == expected1);
std::vector<std::string> result2 = func0("... | 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 $0x218,%rsp
mov %rdi,-0x218(%rbp)
mov %rsi,-0x220(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
lea -0x210(%rbp),%rax
mov $0x10,%edx
le... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 218h
mov [rbp+var_218], rdi
mov [rbp+var_220], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_210]
mov edx, 10h
lea rcx, aN; "; |, |\\*|... | long long func0(long long a1, long long a2)
{
long long v2; // rbx
long long v3; // rax
long long v4; // rax
_BYTE v6[32]; // [rsp+10h] [rbp-210h] BYREF
_BYTE v7[144]; // [rsp+30h] [rbp-1F0h] BYREF
_BYTE v8[144]; // [rsp+C0h] [rbp-160h] BYREF
_BYTE v9[144]; // [rsp+150h] [rbp-D0h] BYREF
_BYTE v10[40]; ... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x218
MOV qword ptr [RBP + -0x218],RDI
MOV qword ptr [RBP + -0x220],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x210]
MOV EDX,0x10
LEA RCX,[0x136051]
MOV RSI,RCX
MOV RDI,RAX
LAB_00104b6f:
CALL 0x001065c6
MOV RAX,qword ... | /* func0(std::string const&) */
string * func0(string *param_1)
{
char cVar1;
__normal_iterator _Var2;
__normal_iterator _Var3;
int8 uVar4;
long in_FS_OFFSET;
regex local_218 [32];
regex_token_iterator<__normal_iterator<char_const*,std::string>,char,std::regex_traits<char>>
local_1f8 [144];
regex_to... |
289 | func0 |
#include <iostream>
#include <string>
#include <sstream>
#include <vector>
#include <regex>
#include <assert.h>
| std::vector<std::string> func0(const std::string& text) {
std::regex pattern("; |, |\\*|\\n");
std::sregex_token_iterator iter(text.begin(), text.end(), pattern, -1);
std::sregex_token_iterator end;
std::vector<std::string> results;
while (iter != end) {
results.push_back(*iter++);
... | int main() {
// Test cases
std::vector<std::string> result1 = func0("Forces of the \ndarkness*are coming into the play.");
std::vector<std::string> expected1 = {"Forces of the ", "darkness", "are coming into the play."};
assert(result1 == expected1);
std::vector<std::string> result2 = func0("... | 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 $0x3b8,%rsp
mov %rdi,%rbp
mov %rsi,%r12
mov %fs:0x28,%rax
mov %rax,0x3a8(%rsp)
xor %eax,%eax
lea 0x180(%rsp),%r13
mov ... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 3C8h
mov [rbp+var_3E8], rdi
mov r12, rsi
mov rax, fs:28h
mov [rbp+var_38], rax
xor eax, eax
lea rbx, [rbp+var_3D8]
mov ... | _QWORD * func0(_QWORD *a1, long long *a2)
{
long long v2; // rdx
long long v3; // rax
long long v4; // rdi
long long v5; // rbx
long long v6; // r12
_DWORD *v7; // rax
_DWORD *v8; // rdx
__m128i *v9; // rax
struct _Unwind_Exception *v10; // rbx
unsigned long long v11; // r13
char *v12; // rdx
_D... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x3c8
MOV qword ptr [RBP + -0x3e8],RDI
MOV R12,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x38],RAX
XOR EAX,EAX
LEA RBX,[RBP + -0x3d8]
MOV RDI,RBX
CALL 0x001046f0
MOV qword ptr [RBP + -0x3d0],0x0
MOV qword ptr [RBP + -0x... | /* func0(std::string const&) */
string * func0(string *param_1)
{
int iVar1;
long *plVar2;
int *__src;
_Sp_counted_base<(_Lock_policy)2> *this;
_Sp_counted_base<(_Lock_policy)2> *p_Var3;
bool bVar4;
char cVar5;
char cVar6;
uint uVar7;
long lVar8;
ulong uVar9;
int *piVar10;
int8 uVar11;
uin... |
290 | func0 |
#include <iostream>
#include <string>
#include <sstream>
#include <vector>
#include <regex>
#include <assert.h>
| std::vector<std::string> func0(const std::string& text) {
std::regex pattern("; |, |\\*|\\n");
std::sregex_token_iterator iter(text.begin(), text.end(), pattern, -1);
std::sregex_token_iterator end;
std::vector<std::string> results;
while (iter != end) {
results.push_back(*iter++);
... | int main() {
// Test cases
std::vector<std::string> result1 = func0("Forces of the \ndarkness*are coming into the play.");
std::vector<std::string> expected1 = {"Forces of the ", "darkness", "are coming into the play."};
assert(result1 == expected1);
std::vector<std::string> result2 = func0("... | 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
mov %rsi,%rbp
push %rbx
sub $0x3e8,%rsp
mov %fs:0x28,%rax
mov %rax,0x3d8(%rsp)
xor %eax,%eax
lea 0x1b0(%rsp),%r14
lea ... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r15
push r14
lea r14, [rbp+var_468]
push r13
push r12
push rbx
mov rbx, rsi
sub rsp, 498h
mov [rbp+var_478], rdi
mov rdi, r14; this
mov rax, fs:28h
mov [rbp+var_38], rax
x... | long long func0(long long a1, signed long long a2)
{
long long v3; // rsi
__m128i v4; // xmm0
volatile signed __int32 *v5; // r12
long long v6; // rdx
volatile signed __int32 *v7; // rcx
signed __int32 v8; // eax
long long v9; // rdx
volatile signed __int32 *v10; // rcx
signed __int32 v11; // eax
u... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
LEA R14,[RBP + -0x468]
PUSH R13
PUSH R12
PUSH RBX
MOV RBX,RSI
SUB RSP,0x498
MOV qword ptr [RBP + -0x478],RDI
MOV RDI,R14
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x38],RAX
XOR EAX,EAX
MOV qword ptr [RBP + -0x4a0],R14
CALL 0x001036d0
LEA RDX,[0x11a716]
PXOR ... | /* func0(std::string const&) */
string * func0(string *param_1)
{
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
int *__src;
byte bVar2;
int auVar3 [16];
bool bVar4;
char cVar5;
int iVar6;
int4 *puVar7;
long *plVar8;
long *plVar9;
long *plVar10;
long *plVar11;
uint uVar12;
vector *pvVar13;
u... |
291 | func0 |
#include <iostream>
#include <string>
#include <sstream>
#include <vector>
#include <regex>
#include <assert.h>
| std::vector<std::string> func0(const std::string& text) {
std::regex pattern("; |, |\\*|\\n");
std::sregex_token_iterator iter(text.begin(), text.end(), pattern, -1);
std::sregex_token_iterator end;
std::vector<std::string> results;
while (iter != end) {
results.push_back(*iter++);
... | int main() {
// Test cases
std::vector<std::string> result1 = func0("Forces of the \ndarkness*are coming into the play.");
std::vector<std::string> expected1 = {"Forces of the ", "darkness", "are coming into the play."};
assert(result1 == expected1);
std::vector<std::string> result2 = func0("... | O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
mov %rsi,%rbp
push %rbx
sub $0x3c8,%rsp
mov %fs:0x28,%rax
mov %rax,0x3b8(%rsp)
xor %eax,%eax
lea 0x190(%rsp),%rbx
mov ... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r15
push r14
push r13
mov r13, rsi
push r12
push rbx
lea rbx, [rbp+var_4A8]
sub rsp, 4D8h
mov [rbp+var_4B8], rdi
mov rdi, rbx; this
mov rax, fs:28h
mov [rbp+var_38], rax
x... | long long func0(long long a1, unsigned long long *a2)
{
unsigned long long v2; // r12
unsigned long long v3; // r13
__m128i v4; // xmm0
long long v5; // rdi
void *v6; // rdi
void **v7; // rbx
void *v8; // rdi
__m128i v9; // xmm4
__m128i v10; // xmm6
long long v11; // rdx
long long v12; // rcx
c... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
MOV R13,RSI
PUSH R12
PUSH RBX
LEA RBX,[RBP + -0x4a8]
SUB RSP,0x4d8
MOV qword ptr [RBP + -0x4b8],RDI
MOV RDI,RBX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x38],RAX
XOR EAX,EAX
MOV qword ptr [RBP + -0x4e0],RBX
CALL 0x00104710
LEA RDX,[0x11c753]
PXOR ... | /* func0(std::string const&) */
string * func0(string *param_1)
{
int iVar1;
ulong *puVar2;
int8 uVar3;
byte bVar4;
bool bVar5;
char cVar6;
long *plVar7;
int4 *__dest;
long *plVar8;
vector<std::sub_match<__normal_iterator<char_const*,std::string>>,std::allocator<std::sub_match<__normal_iterator<ch... |
292 | func0 |
#include <iostream>
#include <vector>
#include <unordered_map>
#include <unordered_set>
#include <cassert>
| bool func0(std::vector<std::string> colors, std::vector<std::string> patterns) {
if (colors.size() != patterns.size()) {
return false;
}
std::unordered_map<std::string, std::vector<std::string>> sdict;
std::unordered_set<std::string> pset;
std::unordered_set<std::string> sset;
... | int main() {
assert(func0({"red", "green", "green"}, {"a", "b", "b"}) == true);
assert(func0({"red", "green", "greenn"}, {"a", "b", "b"}) == false);
assert(func0({"red", "green", "greenn"}, {"a", "b"}) == false);
std::cout << "All test cases passed!" << std::endl;
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> > > >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11:... | _Z5func0St6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EES7_:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 128h
mov [rbp+var_128], rdi
mov [rbp+var_130], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_128]
mov rdi, rax
call _... | long long func0(long long a1, long long a2)
{
long long v2; // rbx
unsigned int v3; // ebx
long long v4; // rax
long long v5; // rax
long long v6; // rax
long long v7; // rax
long long v8; // rax
long long v9; // rax
long long v10; // rbx
long long v11; // rax
long long v12; // rbx
long long v1... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x128
MOV qword ptr [RBP + -0x128],RDI
MOV qword ptr [RBP + -0x130],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x128]
MOV RDI,RAX
CALL 0x00103588
MOV RBX,RAX
MOV RAX,qword ptr [RBP + -0x130]
MOV RDI,RAX
CALL ... | /* func0(std::vector<std::string, std::allocator<std::string > >, std::vector<std::string,
std::allocator<std::string > >) */
int8 func0(vector param_1,vector param_2)
{
bool bVar1;
char cVar2;
int iVar3;
long lVar4;
long lVar5;
vector<std::string,std::allocator<std::string>> *pvVar6;
ulong uVar7;
... |
293 | func0 |
#include <iostream>
#include <vector>
#include <unordered_map>
#include <unordered_set>
#include <cassert>
| bool func0(std::vector<std::string> colors, std::vector<std::string> patterns) {
if (colors.size() != patterns.size()) {
return false;
}
std::unordered_map<std::string, std::vector<std::string>> sdict;
std::unordered_set<std::string> pset;
std::unordered_set<std::string> sset;
... | int main() {
assert(func0({"red", "green", "green"}, {"a", "b", "b"}) == true);
assert(func0({"red", "green", "greenn"}, {"a", "b", "b"}) == false);
assert(func0({"red", "green", "greenn"}, {"a", "b"}) == false);
std::cout << "All test cases passed!" << std::endl;
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> > > >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11:... | _Z5func0St6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EES7_:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 108h
mov [rsp+138h+var_138], rdi
mov r13, rsi
mov rax, fs:28h
mov [rsp+138h+var_40], rax
xor eax, eax
mov rcx, [rsi+8]
m... | long long func0(_QWORD *a1, long long *a2)
{
long long v3; // rcx
long long v4; // rax
unsigned long long v5; // r15
long long v6; // rsi
long long v7; // r14
_QWORD *v8; // rbx
size_t v9; // rbp
unsigned long long v10; // rax
_QWORD *v11; // rax
long long v12; // rax
void **v13; // r14
void **... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x108
MOV qword ptr [RSP],RDI
MOV R13,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0xf8],RAX
XOR EAX,EAX
MOV RCX,qword ptr [RSI + 0x8]
MOV RAX,qword ptr [RSI]
MOV RDX,qword ptr [RDI + 0x8]
SUB RDX,qword ptr [RDI]
MOV RSI,RCX
SUB RSI,RA... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(std::vector<std::string, std::allocator<std::string > >, std::vector<std::string,
std::allocator<std::string > >) */
int8 func0(vector param_1,vector param_2)
{
size_t sVar1;
int8 *puVar2;
int iVar3;
int iVar4;
... |
294 | func0 |
#include <iostream>
#include <vector>
#include <unordered_map>
#include <unordered_set>
#include <cassert>
| bool func0(std::vector<std::string> colors, std::vector<std::string> patterns) {
if (colors.size() != patterns.size()) {
return false;
}
std::unordered_map<std::string, std::vector<std::string>> sdict;
std::unordered_set<std::string> pset;
std::unordered_set<std::string> sset;
... | int main() {
assert(func0({"red", "green", "green"}, {"a", "b", "b"}) == true);
assert(func0({"red", "green", "greenn"}, {"a", "b", "b"}) == false);
assert(func0({"red", "green", "greenn"}, {"a", "b"}) == false);
std::cout << "All test cases passed!" << std::endl;
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> > > >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11:... | _Z5func0St6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EES7_:
endbr64
push r15
push r14
push r13
push r12
mov r12, rsi
push rbp
push rbx
sub rsp, 128h
mov rdx, [rsi+8]
mov rsi, [rsi]
mov rax, fs:28h
mov [rsp+158h+var_40], rax
xor eax, eax
mov rax, [... | long long func0(_QWORD *a1, _QWORD *a2)
{
_QWORD *v2; // r12
long long v3; // rdx
long long v4; // rsi
unsigned long long v6; // r13
long long v7; // rbx
long long v8; // r15
_QWORD *v9; // rbp
size_t v10; // rdx
_QWORD *v11; // rax
const void **v12; // r12
_QWORD *v13; // r15
size_t v14; // rb... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
MOV R12,RSI
PUSH RBP
PUSH RBX
SUB RSP,0x128
MOV RDX,qword ptr [RSI + 0x8]
MOV RSI,qword ptr [RSI]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x118],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RDI + 0x8]
SUB RAX,qword ptr [RDI]
MOV RCX,RDX
SUB RCX,RSI
CMP RAX,RCX
JNZ 0x001... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(std::vector<std::string, std::allocator<std::string > >, std::vector<std::string,
std::allocator<std::string > >) */
int8 func0(vector param_1,vector param_2)
{
size_t sVar1;
long lVar2;
int8 *puVar3;
int iVar4;
... |
295 | func0 |
#include <iostream>
#include <vector>
#include <unordered_map>
#include <unordered_set>
#include <cassert>
| bool func0(std::vector<std::string> colors, std::vector<std::string> patterns) {
if (colors.size() != patterns.size()) {
return false;
}
std::unordered_map<std::string, std::vector<std::string>> sdict;
std::unordered_set<std::string> pset;
std::unordered_set<std::string> sset;
... | int main() {
assert(func0({"red", "green", "green"}, {"a", "b", "b"}) == true);
assert(func0({"red", "green", "greenn"}, {"a", "b", "b"}) == false);
assert(func0({"red", "green", "greenn"}, {"a", "b"}) == false);
std::cout << "All test cases passed!" << std::endl;
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> > > >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11:... | _Z5func0St6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EES7_:
endbr64
push r15
push r14
push r13
push r12
mov r12, rsi
push rbp
push rbx
sub rsp, 138h
mov rdx, [rsi+8]
mov rsi, [rsi]
mov [rsp+168h+var_168], rdi
mov rcx, rdx
sub rcx, rsi
mov rax, fs:... | long long func0(_QWORD *a1, _QWORD *a2)
{
_QWORD *v2; // r12
long long v3; // rdx
long long v4; // rsi
unsigned long long v5; // r14
long long v6; // rbp
long long v7; // r15
_QWORD *v8; // rbx
size_t v9; // r13
long long v10; // rbx
long long v11; // rdx
long long *v12; // rbp
size_t v13; // r... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
MOV R12,RSI
PUSH RBP
PUSH RBX
SUB RSP,0x138
MOV RDX,qword ptr [RSI + 0x8]
MOV RSI,qword ptr [RSI]
MOV qword ptr [RSP],RDI
MOV RCX,RDX
SUB RCX,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x128],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RDI + 0x8]
SUB RAX,qword ptr [RD... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(std::vector<std::string, std::allocator<std::string > >, std::vector<std::string,
std::allocator<std::string > >) */
int8 func0(vector param_1,vector param_2)
{
size_t sVar1;
ulong *puVar2;
int *__src;
long *plVar... |
296 | func0 |
#include <vector>
#include <tuple>
#include <string>
#include <sstream>
#include <assert.h>
| std::string func0(const std::vector<std::tuple<int, int, int>>& test_list, int K) {
std::vector<std::tuple<int, int, int>> res;
for (const auto& sub : test_list) {
bool valid = true;
int a, b, c;
std::tie(a, b, c) = sub;
std::vector<int> elements {a, b, c};
... | int main() {
assert(func0({std::make_tuple(6, 24, 12), std::make_tuple(7, 9, 6), std::make_tuple(12, 18, 21)}, 6) == "[(6, 24, 12)]");
assert(func0({std::make_tuple(5, 25, 30), std::make_tuple(4, 2, 3), std::make_tuple(7, 8, 9)}, 5) == "[(5, 25, 30)]");
assert(func0({std::make_tuple(7, 9, 16), std::make_... | O0 | cpp | func0[abi:cxx11](std::vector<std::tuple<int, int, int>, std::allocator<std::tuple<int, int, int> > > const&, int):
endbr64
push %rbp
mov %rsp,%rbp
push %r13
push %r12
push %rbx
sub $0x248,%rsp
mov %rdi,-0x248(%rbp)
mov %rsi,-0x250(%rbp)
mov %edx,-0x254(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x28... | _Z5func0B5cxx11RKSt6vectorISt5tupleIJiiiEESaIS1_EEi:
endbr64
push rbp
mov rbp, rsp
push r13
push r12
push rbx
sub rsp, 248h
mov [rbp+var_248], rdi
mov [rbp+var_250], rsi
mov [rbp+var_254], edx
mov rax, fs:28h
mov [rbp+var_28], rax
xor eax, eax
lea rax, [rbp+var_1E0]
mov ... | long long func0[abi:cxx11](long long a1, long long a2, int a3)
{
long long v3; // rbx
long long v4; // rax
long long v5; // rax
long long v6; // rax
long long v7; // rax
long long v8; // rax
long long v9; // rax
unsigned long long v10; // rax
char v13; // [rsp+27h] [rbp-239h]
int v14; // [rsp+28h] ... | func0[abi:cxx11]:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x248
MOV qword ptr [RBP + -0x248],RDI
MOV qword ptr [RBP + -0x250],RSI
MOV dword ptr [RBP + -0x254],EDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x1e0]
MOV RDI,RAX
CALL 0x00101e78
MOV RAX,qw... | /* func0[abi:cxx11](std::vector<std::tuple<int, int, int>, std::allocator<std::tuple<int, int, int>
> > const&, int) */
vector * func0_abi_cxx11_(vector *param_1,int param_2)
{
bool bVar1;
bool bVar2;
int *piVar3;
tuple *ptVar4;
ostream *poVar5;
ulong uVar6;
int in_EDX;
int4 in_register_00000034;
... |
297 | func0 |
#include <vector>
#include <tuple>
#include <string>
#include <sstream>
#include <assert.h>
| std::string func0(const std::vector<std::tuple<int, int, int>>& test_list, int K) {
std::vector<std::tuple<int, int, int>> res;
for (const auto& sub : test_list) {
bool valid = true;
int a, b, c;
std::tie(a, b, c) = sub;
std::vector<int> elements {a, b, c};
... | int main() {
assert(func0({std::make_tuple(6, 24, 12), std::make_tuple(7, 9, 6), std::make_tuple(12, 18, 21)}, 6) == "[(6, 24, 12)]");
assert(func0({std::make_tuple(5, 25, 30), std::make_tuple(4, 2, 3), std::make_tuple(7, 8, 9)}, 5) == "[(5, 25, 30)]");
assert(func0({std::make_tuple(7, 9, 16), std::make_... | O1 | cpp | func0[abi:cxx11](std::vector<std::tuple<int, int, int>, std::allocator<std::tuple<int, int, int> > > const&, int):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x1b8,%rsp
mov %rdi,0x8(%rsp)
mov %fs:0x28,%rax
mov %rax,0x1a8(%rsp)
xor %eax,%eax
movq $0x0,0x10(%rsp)... | _Z5func0B5cxx11RKSt6vectorISt5tupleIJiiiEESaIS1_EEi:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 1C8h
mov [rsp+1F8h+var_1E8], rdi
mov ebx, edx
mov rax, fs:28h
mov [rsp+1F8h+var_40], rax
xor eax, eax
mov [rsp+1F8h+var_1D8], 0
mov [rsp+1F8h+var_... | long long func0[abi:cxx11](long long a1, int **a2, int a3)
{
int *v4; // r12
int *v5; // r14
_DWORD *v6; // rbp
_DWORD *v7; // rcx
_QWORD *v8; // rsi
int v9; // edx
int v10; // eax
unsigned int *v11; // rbx
unsigned long long v12; // r12
unsigned int v13; // ebp
unsigned int v14; // r15d
long l... | func0[abi:cxx11]:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x1c8
MOV qword ptr [RSP + 0x10],RDI
MOV EBX,EDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x1b8],RAX
XOR EAX,EAX
MOV qword ptr [RSP + 0x20],0x0
MOV qword ptr [RSP + 0x28],0x0
MOV qword ptr [RSP + 0x30],0x0
MOV R12,qword ptr ... | /* func0[abi:cxx11](std::vector<std::tuple<int, int, int>, std::allocator<std::tuple<int, int, int>
> > const&, int) */
vector * func0_abi_cxx11_(vector *param_1,int param_2)
{
int iVar1;
int iVar2;
int iVar3;
tuple *ptVar4;
int *piVar5;
long lVar6;
ostream *poVar7;
int *piVar8;
int in_EDX;
int... |
298 | func0 |
#include <vector>
#include <tuple>
#include <string>
#include <sstream>
#include <assert.h>
| std::string func0(const std::vector<std::tuple<int, int, int>>& test_list, int K) {
std::vector<std::tuple<int, int, int>> res;
for (const auto& sub : test_list) {
bool valid = true;
int a, b, c;
std::tie(a, b, c) = sub;
std::vector<int> elements {a, b, c};
... | int main() {
assert(func0({std::make_tuple(6, 24, 12), std::make_tuple(7, 9, 6), std::make_tuple(12, 18, 21)}, 6) == "[(6, 24, 12)]");
assert(func0({std::make_tuple(5, 25, 30), std::make_tuple(4, 2, 3), std::make_tuple(7, 8, 9)}, 5) == "[(5, 25, 30)]");
assert(func0({std::make_tuple(7, 9, 16), std::make_... | O2 | cpp | func0[abi:cxx11](std::vector<std::tuple<int, int, int>, std::allocator<std::tuple<int, int, int> > > const&, int):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
mov %edx,%ebx
sub $0x1c8,%rsp
mov (%rsi),%r12
mov 0x8(%rsi),%r14
mov %rdi,(%rsp)
lea 0x20(%rsp),%r15
mov ... | _Z5func0B5cxx11RKSt6vectorISt5tupleIJiiiEESaIS1_EEi:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 1E8h
mov r13, [rsi]
mov r14, [rsi+8]
mov [rsp+218h+var_200], rdi
lea r12, [rsp+218h+var_1B8]
mov rax, fs:28h
mov [rsp+218h+var_40],... | long long func0[abi:cxx11](long long a1, long long a2, int a3)
{
_DWORD *v3; // r13
_DWORD *v4; // r14
unsigned long long v6; // xmm0_8
_DWORD *v7; // rbp
_DWORD *v8; // rcx
_QWORD *v9; // rdi
__m128i si128; // xmm2
__int32 *v11; // rbx
unsigned long long v12; // r13
unsigned __int32 v13; // ebp
... | func0[abi:cxx11]:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x1e8
MOV R13,qword ptr [RSI]
MOV R14,qword ptr [RSI + 0x8]
MOV qword ptr [RSP + 0x18],RDI
LEA R12,[RSP + 0x60]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x1d8],RAX
XOR EAX,EAX
MOVAPS xmmword ptr [RSP + 0x40],X... | /* func0[abi:cxx11](std::vector<std::tuple<int, int, int>, std::allocator<std::tuple<int, int, int>
> > const&, int) */
vector * func0_abi_cxx11_(vector *param_1,int param_2)
{
int iVar1;
int iVar2;
int iVar3;
tuple *ptVar4;
pointer_____offset_0x10___ puVar5;
pointer_____offset_0x18___ puVar6;
int8 u... |
299 | func0 |
#include <vector>
#include <tuple>
#include <string>
#include <sstream>
#include <assert.h>
| std::string func0(const std::vector<std::tuple<int, int, int>>& test_list, int K) {
std::vector<std::tuple<int, int, int>> res;
for (const auto& sub : test_list) {
bool valid = true;
int a, b, c;
std::tie(a, b, c) = sub;
std::vector<int> elements {a, b, c};
... | int main() {
assert(func0({std::make_tuple(6, 24, 12), std::make_tuple(7, 9, 6), std::make_tuple(12, 18, 21)}, 6) == "[(6, 24, 12)]");
assert(func0({std::make_tuple(5, 25, 30), std::make_tuple(4, 2, 3), std::make_tuple(7, 8, 9)}, 5) == "[(5, 25, 30)]");
assert(func0({std::make_tuple(7, 9, 16), std::make_... | O3 | cpp | func0[abi:cxx11](std::vector<std::tuple<int, int, int>, std::allocator<std::tuple<int, int, int> > > const&, int):
endbr64
push %r15
pxor %xmm0,%xmm0
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x1c8,%rsp
mov (%rsi),%rbx
mov %rdi,0x10(%rsp)
lea 0x20(%rsp),%rcx
mov %edx,0x8(%rsp)
... | _Z5func0B5cxx11RKSt6vectorISt5tupleIJiiiEESaIS1_EEi:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
push r12
push rbp
mov ebp, edx
push rbx
sub rsp, 1E8h
mov rbx, [rsi]
mov [rsp+218h+var_200], rdi
mov rax, fs:28h
mov [rsp+218h+var_40], rax
xor eax, eax
mov rax, [... | long long func0[abi:cxx11](long long a1, int **a2, int a3)
{
int *v4; // rbx
long long v5; // rax
long long v6; // rsi
signed int v7; // r13d
signed int v8; // r14d
int v9; // r15d
_DWORD *v10; // r12
_QWORD *v11; // rdi
__m128i si128; // xmm2
unsigned int *v13; // rbx
unsigned long long v14; // ... | func0[abi:cxx11]:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
MOV EBP,EDX
PUSH RBX
SUB RSP,0x1e8
MOV RBX,qword ptr [RSI]
MOV qword ptr [RSP + 0x18],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x1d8],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RSI + 0x8]
MOVAPS xmmword ptr [RSP + 0x40],XMM0
MOV q... | /* func0[abi:cxx11](std::vector<std::tuple<int, int, int>, std::allocator<std::tuple<int, int, int>
> > const&, int) */
vector * func0_abi_cxx11_(vector *param_1,int param_2)
{
int iVar1;
int iVar2;
int iVar3;
tuple *ptVar4;
pointer_____offset_0x10___ puVar5;
pointer_____offset_0x18___ puVar6;
int8 u... |
300 | func0 |
#include <assert.h>
| double func0(int m, int n) {
if (n < m) {
int temp = m;
m = n;
n = temp;
}
return ((m * (m + 1) * (2 * m + 1) / 6) + (n - m) * m * (m + 1) / 2);
}
| int main() {
assert(func0(4, 3) == 20);
assert(func0(2, 2) == 5);
assert(func0(1, 1) == 1);
return 0;
}
| O0 | cpp | func0(int, int):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
mov %esi,-0x18(%rbp)
mov -0x18(%rbp),%eax
cmp -0x14(%rbp),%eax
jge 1171 <_Z5func0ii+0x28>
mov -0x14(%rbp),%eax
mov %eax,-0x4(%rbp)
mov -0x18(%rbp),%eax
mov %eax,-0x14(%rbp)
mov -0x4(%rbp),%eax
mov %eax,-0x18(%rbp... | _Z5func0ii:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_14], edi
mov [rbp+var_18], esi
mov eax, [rbp+var_18]
cmp eax, [rbp+var_14]
jge short loc_1171
mov eax, [rbp+var_14]
mov [rbp+var_4], eax
mov eax, [rbp+var_18]
mov [rbp+var_14], eax
mov eax, [rbp+var_4]
mov [rbp+var... | double func0(int a1, int a2)
{
int v3; // [rsp+0h] [rbp-18h]
int v4; // [rsp+4h] [rbp-14h]
v4 = a1;
v3 = a2;
if ( a2 < a1 )
{
v4 = a2;
v3 = a1;
}
return (double)((2 * v4 + 1) * v4 * (v4 + 1) / 6 + (v4 + 1) * v4 * (v3 - v4) / 2);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x14],EDI
MOV dword ptr [RBP + -0x18],ESI
MOV EAX,dword ptr [RBP + -0x18]
CMP EAX,dword ptr [RBP + -0x14]
JGE 0x00101171
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x4],EAX
MOV EAX,dword ptr [RBP + -0x18]
MOV dword ptr [RBP + -0x14],EAX
MOV EAX,dword ... | /* func0(int, int) */
double func0(int param_1,int param_2)
{
int4 local_20;
int4 local_1c;
local_20 = param_2;
local_1c = param_1;
if (param_2 < param_1) {
local_20 = param_1;
local_1c = param_2;
}
return (double)(((local_20 - local_1c) * local_1c * (local_1c + 1)) / 2 +
((l... |
301 | func0 |
#include <assert.h>
| double func0(int m, int n) {
if (n < m) {
int temp = m;
m = n;
n = temp;
}
return ((m * (m + 1) * (2 * m + 1) / 6) + (n - m) * m * (m + 1) / 2);
}
| int main() {
assert(func0(4, 3) == 20);
assert(func0(2, 2) == 5);
assert(func0(1, 1) == 1);
return 0;
}
| O1 | cpp | func0(int, int):
endbr64
cmp %edi,%esi
jge 1157 <_Z5func0ii+0xe>
mov %edi,%eax
mov %esi,%edi
mov %eax,%esi
lea 0x1(%rdi),%ecx
lea 0x1(%rdi,%rdi,1),%edx
mov %ecx,%eax
imul %edi,%eax
imul %eax,%edx
movslq %edx,%rax
imul $0x2aaaaaab,%rax,%rax
shr $0x20,%rax
sar $0x1f,%edx
sub %edx,%e... | _Z5func0ii:
endbr64
cmp esi, edi
jl short loc_1157
mov eax, esi
mov esi, edi
mov edi, eax
loc_1157:
lea ecx, [rsi+1]
lea edx, [rsi+rsi+1]
mov eax, ecx
imul eax, esi
imul edx, eax
movsxd rax, edx
imul rax, 2AAAAAABh
shr rax, 20h
sar edx, 1Fh
sub eax, edx
sub edi... | double func0(int a1, int a2)
{
int v2; // eax
if ( a2 >= a1 )
{
v2 = a2;
a2 = a1;
a1 = v2;
}
return (double)((a2 + 1) * a2 * (a1 - a2) / 2 + a2 * (a2 + 1) * (2 * a2 + 1) / 6);
} | func0:
ENDBR64
CMP ESI,EDI
JL 0x00101157
MOV EAX,ESI
MOV ESI,EDI
MOV EDI,EAX
LAB_00101157:
LEA ECX,[RSI + 0x1]
LEA EDX,[RSI + RSI*0x1 + 0x1]
MOV EAX,ECX
IMUL EAX,ESI
IMUL EDX,EAX
MOVSXD RAX,EDX
IMUL RAX,RAX,0x2aaaaaab
SHR RAX,0x20
SAR EDX,0x1f
SUB EAX,EDX
SUB EDI,ESI
IMUL EDI,ESI
IMUL EDI,ECX
MOV EDX,EDI
SHR EDX,0x1f
A... | /* func0(int, int) */
double func0(int param_1,int param_2)
{
int iVar1;
iVar1 = param_1;
if (param_1 <= param_2) {
iVar1 = param_2;
param_2 = param_1;
}
return (double)(((param_2 * 2 + 1) * (param_2 + 1) * param_2) / 6 +
((iVar1 - param_2) * param_2 * (param_2 + 1)) / 2);
} |
302 | func0 |
#include <assert.h>
| double func0(int m, int n) {
if (n < m) {
int temp = m;
m = n;
n = temp;
}
return ((m * (m + 1) * (2 * m + 1) / 6) + (n - m) * m * (m + 1) / 2);
}
| int main() {
assert(func0(4, 3) == 20);
assert(func0(2, 2) == 5);
assert(func0(1, 1) == 1);
return 0;
}
| O2 | cpp | func0(int, int):
endbr64
cmp %edi,%esi
jge 114e <_Z5func0ii+0xe>
mov %edi,%eax
mov %esi,%edi
mov %eax,%esi
lea 0x1(%rdi),%ecx
lea 0x1(%rdi,%rdi,1),%edx
pxor %xmm0,%xmm0
sub %edi,%esi
mov %ecx,%eax
imul %edi,%esi
imul %edi,%eax
imul %ecx,%esi
imul %eax,%edx
movslq %edx,%rax
sar $0... | _Z5func0ii:
endbr64
cmp esi, edi
jl short loc_121E
mov eax, esi
mov esi, edi
mov edi, eax
loc_121E:
lea ecx, [rsi+1]
lea edx, [rsi+rsi+1]
pxor xmm0, xmm0
sub edi, esi
mov eax, ecx
imul edi, esi
imul eax, esi
imul edi, ecx
imul edx, eax
movsxd rax, edx
sar edx, 1F... | double func0(int a1, int a2)
{
int v2; // eax
if ( a2 >= a1 )
{
v2 = a2;
a2 = a1;
a1 = v2;
}
return (double)((a2 + 1) * a2 * (a1 - a2) / 2 + a2 * (a2 + 1) * (2 * a2 + 1) / 6);
} | func0:
ENDBR64
CMP ESI,EDI
JL 0x0010121e
MOV EAX,ESI
MOV ESI,EDI
MOV EDI,EAX
LAB_0010121e:
LEA ECX,[RSI + 0x1]
LEA EDX,[RSI + RSI*0x1 + 0x1]
PXOR XMM0,XMM0
SUB EDI,ESI
MOV EAX,ECX
IMUL EDI,ESI
IMUL EAX,ESI
IMUL EDI,ECX
IMUL EDX,EAX
MOVSXD RAX,EDX
SAR EDX,0x1f
IMUL RAX,RAX,0x2aaaaaab
SHR RAX,0x20
SUB EAX,EDX
MOV EDX,EDI... | /* func0(int, int) */
double func0(int param_1,int param_2)
{
int iVar1;
iVar1 = param_1;
if (param_1 <= param_2) {
iVar1 = param_2;
param_2 = param_1;
}
return (double)(((param_2 * 2 + 1) * (param_2 + 1) * param_2) / 6 +
((iVar1 - param_2) * param_2 * (param_2 + 1)) / 2);
} |
303 | func0 |
#include <assert.h>
| double func0(int m, int n) {
if (n < m) {
int temp = m;
m = n;
n = temp;
}
return ((m * (m + 1) * (2 * m + 1) / 6) + (n - m) * m * (m + 1) / 2);
}
| int main() {
assert(func0(4, 3) == 20);
assert(func0(2, 2) == 5);
assert(func0(1, 1) == 1);
return 0;
}
| O3 | cpp | func0(int, int):
endbr64
cmp %edi,%esi
jge 114e <_Z5func0ii+0xe>
mov %edi,%eax
mov %esi,%edi
mov %eax,%esi
lea 0x1(%rdi),%ecx
lea 0x1(%rdi,%rdi,1),%edx
pxor %xmm0,%xmm0
sub %edi,%esi
mov %ecx,%eax
imul %edi,%esi
imul %edi,%eax
imul %ecx,%esi
imul %eax,%edx
movslq %edx,%rax
sar $0... | _Z5func0ii:
endbr64
cmp esi, edi
jl short loc_114E
mov eax, esi
mov esi, edi
mov edi, eax
loc_114E:
lea ecx, [rsi+1]
lea edx, [rsi+rsi+1]
pxor xmm0, xmm0
sub edi, esi
mov eax, ecx
imul edi, esi
imul eax, esi
imul edi, ecx
imul edx, eax
movsxd rax, edx
sar edx, 1F... | double func0(int a1, int a2)
{
int v2; // eax
if ( a2 >= a1 )
{
v2 = a2;
a2 = a1;
a1 = v2;
}
return (double)((a2 + 1) * a2 * (a1 - a2) / 2 + a2 * (a2 + 1) * (2 * a2 + 1) / 6);
} | func0:
ENDBR64
CMP ESI,EDI
JL 0x0010114e
MOV EAX,ESI
MOV ESI,EDI
MOV EDI,EAX
LAB_0010114e:
LEA ECX,[RSI + 0x1]
LEA EDX,[RSI + RSI*0x1 + 0x1]
PXOR XMM0,XMM0
SUB EDI,ESI
MOV EAX,ECX
IMUL EDI,ESI
IMUL EAX,ESI
IMUL EDI,ECX
IMUL EDX,EAX
MOVSXD RAX,EDX
SAR EDX,0x1f
IMUL RAX,RAX,0x2aaaaaab
SHR RAX,0x20
SUB EAX,EDX
MOV EDX,EDI... | /* func0(int, int) */
double func0(int param_1,int param_2)
{
int iVar1;
iVar1 = param_1;
if (param_1 <= param_2) {
iVar1 = param_2;
param_2 = param_1;
}
return (double)(((param_2 * 2 + 1) * (param_2 + 1) * param_2) / 6 +
((iVar1 - param_2) * param_2 * (param_2 + 1)) / 2);
} |
304 | func0 |
#include <assert.h>
| bool func0(int n) {
return (n % 11 == 0);
}
| int main() {
assert(func0(12345) == false);
assert(func0(1212112) == true);
assert(func0(1212) == false);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x4(%rbp)
mov -0x4(%rbp),%ecx
movslq %ecx,%rax
imul $0x2e8ba2e9,%rax,%rax
shr $0x20,%rax
mov %eax,%edx
sar %edx
mov %ecx,%eax
sar $0x1f,%eax
sub %eax,%edx
mov %edx,%eax
shl $0x2,%eax
add %edx,%eax
add %eax,%eax
add %edx,... | _Z5func0i:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_4], edi
mov ecx, [rbp+var_4]
movsxd rax, ecx
imul rax, 2E8BA2E9h
shr rax, 20h
mov edx, eax
sar edx, 1
mov eax, ecx
sar eax, 1Fh
sub edx, eax
mov eax, edx
shl eax, 2
add eax, edx
add eax, eax
add eax, edx... | bool func0(int a1)
{
return a1 % 11 == 0;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x4],EDI
MOV ECX,dword ptr [RBP + -0x4]
MOVSXD RAX,ECX
IMUL RAX,RAX,0x2e8ba2e9
SHR RAX,0x20
MOV EDX,EAX
SAR EDX,0x1
MOV EAX,ECX
SAR EAX,0x1f
SUB EDX,EAX
MOV EAX,EDX
SHL EAX,0x2
ADD EAX,EDX
ADD EAX,EAX
ADD EAX,EDX
SUB ECX,EAX
MOV EDX,ECX
TEST EDX,EDX
SETZ AL
POP ... | /* func0(int) */
int4 func0(int param_1)
{
return CONCAT31((int3)((uint)((param_1 / 0xb) * 0xb) >> 8),param_1 % 0xb == 0);
} |
305 | func0 |
#include <assert.h>
| bool func0(int n) {
return (n % 11 == 0);
}
| int main() {
assert(func0(12345) == false);
assert(func0(1212112) == true);
assert(func0(1212) == false);
return 0;
}
| O1 | cpp | func0(int):
endbr64
movslq %edi,%rax
imul $0x2e8ba2e9,%rax,%rax
sar $0x21,%rax
mov %edi,%edx
sar $0x1f,%edx
sub %edx,%eax
lea (%rax,%rax,4),%edx
lea (%rax,%rdx,2),%eax
cmp %eax,%edi
sete %al
retq
| _Z5func0i:
endbr64
movsxd rax, edi
imul rax, 2E8BA2E9h
sar rax, 21h
mov edx, edi
sar edx, 1Fh
sub eax, edx
lea edx, [rax+rax*4]
lea eax, [rax+rdx*2]
cmp edi, eax
setz al
retn | bool func0(int a1)
{
return a1 == 11 * (a1 / 11);
} | func0:
ENDBR64
MOVSXD RAX,EDI
IMUL RAX,RAX,0x2e8ba2e9
SAR RAX,0x21
MOV EDX,EDI
SAR EDX,0x1f
SUB EAX,EDX
LEA EDX,[RAX + RAX*0x4]
LEA EAX,[RAX + RDX*0x2]
CMP EDI,EAX
SETZ AL
RET | /* func0(int) */
int4 func0(int param_1)
{
int iVar1;
iVar1 = (param_1 / 0xb) * 0xb;
return CONCAT31((int3)((uint)iVar1 >> 8),param_1 == iVar1);
} |
306 | func0 |
#include <assert.h>
| bool func0(int n) {
return (n % 11 == 0);
}
| int main() {
assert(func0(12345) == false);
assert(func0(1212112) == true);
assert(func0(1212) == false);
return 0;
}
| O2 | cpp | func0(int):
endbr64
imul $0xba2e8ba3,%edi,%edi
add $0xba2e8ba,%edi
cmp $0x1745d174,%edi
setbe %al
retq
nopw 0x0(%rax,%rax,1)
| _Z5func0i:
endbr64
imul edi, 0BA2E8BA3h
add edi, 0BA2E8BAh
cmp edi, 1745D174h
setbe al
retn | bool func0(int a1)
{
return (unsigned int)(-1171354717 * a1 + 195225786) <= 0x1745D174;
} | func0:
ENDBR64
IMUL EDI,EDI,-0x45d1745d
ADD EDI,0xba2e8ba
CMP EDI,0x1745d174
SETBE AL
RET | /* func0(int) */
bool func0(int param_1)
{
return param_1 * -0x45d1745d + 0xba2e8baU < 0x1745d175;
} |
307 | func0 |
#include <assert.h>
| bool func0(int n) {
return (n % 11 == 0);
}
| int main() {
assert(func0(12345) == false);
assert(func0(1212112) == true);
assert(func0(1212) == false);
return 0;
}
| O3 | cpp | func0(int):
endbr64
imul $0xba2e8ba3,%edi,%edi
add $0xba2e8ba,%edi
cmp $0x1745d174,%edi
setbe %al
retq
nopw 0x0(%rax,%rax,1)
| _Z5func0i:
endbr64
imul edi, 0BA2E8BA3h
add edi, 0BA2E8BAh
cmp edi, 1745D174h
setbe al
retn | bool func0(int a1)
{
return (unsigned int)(-1171354717 * a1 + 195225786) <= 0x1745D174;
} | func0:
ENDBR64
IMUL EDI,EDI,-0x45d1745d
ADD EDI,0xba2e8ba
CMP EDI,0x1745d174
SETBE AL
RET | /* func0(int) */
bool func0(int param_1)
{
return param_1 * -0x45d1745d + 0xba2e8baU < 0x1745d175;
} |
308 | func0 |
#include <iostream>
#include <assert.h>
#include <bitset>
| int func0(int n) {
if (n % 2 != 0) {
return (n + 1) / 2;
}
int count = std::bitset<32>(n).count();
int ans = n / 2;
if (count % 2 != 0) {
ans += 1;
}
return ans;
}
| int main() {
assert(func0(5) == 3);
assert(func0(10) == 5);
assert(func0(15) == 8);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x30,%rsp
mov %edi,-0x24(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x8(%rbp)
xor %eax,%eax
mov -0x24(%rbp),%eax
and $0x1,%eax
test %eax,%eax
je 1202 <_Z5func0i+0x39>
mov -0x24(%rbp),%eax
add $0x1,%eax
mov %eax,%edx
shr $0x1f,%edx
add ... | _Z5func0i:
endbr64
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_24], edi
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
mov eax, [rbp+var_24]
and eax, 1
test eax, eax
jz short loc_11C2
mov eax, [rbp+var_24]
add eax, 1
mov edx, eax
shr edx, 1Fh
add eax... | long long func0(int a1)
{
unsigned int v2; // [rsp+18h] [rbp-18h]
_BYTE v3[8]; // [rsp+20h] [rbp-10h] BYREF
unsigned long long v4; // [rsp+28h] [rbp-8h]
v4 = __readfsqword(0x28u);
if ( (a1 & 1) != 0 )
return (unsigned int)((a1 + 1) / 2);
std::bitset<32ul>::bitset(v3, a1);
v2 = a1 / 2;
if ( (std::b... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV dword ptr [RBP + -0x24],EDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
MOV EAX,dword ptr [RBP + -0x24]
AND EAX,0x1
TEST EAX,EAX
JZ 0x001011c2
MOV EAX,dword ptr [RBP + -0x24]
ADD EAX,0x1
MOV EDX,EAX
SHR EDX,0x1f
ADD EAX,EDX
SAR EAX,0x1
JMP ... | /* func0(int) */
int func0(int param_1)
{
int iVar1;
uint uVar2;
long in_FS_OFFSET;
bitset<32ul> local_18 [8];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
if ((param_1 & 1U) == 0) {
std::bitset<32ul>::bitset(local_18,(long)param_1);
uVar2 = std::bitset<32ul>::count(local_18);
... |
309 | func0 |
#include <iostream>
#include <assert.h>
#include <bitset>
| int func0(int n) {
if (n % 2 != 0) {
return (n + 1) / 2;
}
int count = std::bitset<32>(n).count();
int ans = n / 2;
if (count % 2 != 0) {
ans += 1;
}
return ans;
}
| int main() {
assert(func0(5) == 3);
assert(func0(10) == 5);
assert(func0(15) == 8);
return 0;
}
| O1 | cpp | func0(int):
endbr64
push %rbx
mov %edi,%ebx
test $0x1,%dil
jne 11b3 <_Z5func0i+0x2a>
mov %edi,%edi
callq 1080 <__popcountdi2@plt>
mov %eax,%edx
mov %ebx,%eax
shr $0x1f,%eax
add %ebx,%eax
sar %eax
and $0x1,%edx
cmp $0x1,%edx
sbb $0xffffffff,%eax
pop %rbx
retq
add $0x1,%ebx
mov... | _Z5func0i:
endbr64
test dil, 1
jnz short loc_114E
mov eax, edi
shr eax, 1Fh
add eax, edi
sar eax, 1
mov edx, edi
shr edx, 10h
xor edx, edi
xor dl, dh
setnp dl
movzx edx, dl
add eax, edx
retn
loc_114E:
add edi, 1
mov eax, edi
shr eax, 1Fh
add eax, edi
sar ... | long long func0(int a1)
{
if ( (a1 & 1) != 0 )
return (unsigned int)((a1 + 1) / 2);
else
return (unsigned int)!__SETP__(((unsigned __int16)(a1 ^ HIWORD(a1)) >> 8) ^ a1 ^ BYTE2(a1), 0) + a1 / 2;
} | func0:
ENDBR64
TEST DIL,0x1
JNZ 0x0010114e
MOV EAX,EDI
SHR EAX,0x1f
ADD EAX,EDI
SAR EAX,0x1
MOV EDX,EDI
SHR EDX,0x10
XOR EDX,EDI
XOR DL,DH
SETNP DL
MOVZX EDX,DL
ADD EAX,EDX
RET
LAB_0010114e:
ADD EDI,0x1
MOV EAX,EDI
SHR EAX,0x1f
ADD EAX,EDI
SAR EAX,0x1
RET | /* func0(int) */
int func0(int param_1)
{
uint uVar1;
if ((param_1 & 1U) == 0) {
uVar1 = (uint)param_1 >> 0x10 ^ param_1;
return param_1 / 2 + (uint)((POPCOUNT((byte)uVar1 ^ (byte)(uVar1 >> 8)) & 1U) != 0);
}
return (param_1 + 1) / 2;
} |
310 | func0 |
#include <iostream>
#include <assert.h>
#include <bitset>
| int func0(int n) {
if (n % 2 != 0) {
return (n + 1) / 2;
}
int count = std::bitset<32>(n).count();
int ans = n / 2;
if (count % 2 != 0) {
ans += 1;
}
return ans;
}
| int main() {
assert(func0(5) == 3);
assert(func0(10) == 5);
assert(func0(15) == 8);
return 0;
}
| O2 | cpp | func0(int):
endbr64
push %rbx
mov %edi,%ebx
and $0x1,%edi
jne 1210 <_Z5func0i+0x30>
mov %ebx,%edi
callq 1080 <__popcountdi2@plt>
mov %eax,%edx
mov %ebx,%eax
shr $0x1f,%eax
and $0x1,%edx
add %ebx,%eax
pop %rbx
sar %eax
cmp $0x1,%edx
sbb $0xffffffff,%eax
retq
nopl 0x0(%rax)
add... | _Z5func0i:
endbr64
test dil, 1
jnz short loc_1168
mov eax, edi
mov edx, edi
shr eax, 1Fh
shr edx, 10h
add eax, edi
xor edx, edi
sar eax, 1
xor dl, dh
setnp dl
movzx edx, dl
add eax, edx
retn
loc_1168:
add edi, 1
mov eax, edi
shr eax, 1Fh
add eax, edi
sar ... | long long func0(int a1)
{
if ( (a1 & 1) != 0 )
return (unsigned int)((a1 + 1) / 2);
else
return (unsigned int)!__SETP__(((unsigned __int16)(a1 ^ HIWORD(a1)) >> 8) ^ a1 ^ BYTE2(a1), 0) + a1 / 2;
} | func0:
ENDBR64
TEST DIL,0x1
JNZ 0x00101168
MOV EAX,EDI
MOV EDX,EDI
SHR EAX,0x1f
SHR EDX,0x10
ADD EAX,EDI
XOR EDX,EDI
SAR EAX,0x1
XOR DL,DH
SETNP DL
MOVZX EDX,DL
ADD EAX,EDX
RET
LAB_00101168:
ADD EDI,0x1
MOV EAX,EDI
SHR EAX,0x1f
ADD EAX,EDI
SAR EAX,0x1
RET | /* func0(int) */
int func0(int param_1)
{
uint uVar1;
if ((param_1 & 1U) == 0) {
uVar1 = (uint)param_1 >> 0x10 ^ param_1;
return param_1 / 2 + (uint)((POPCOUNT((byte)uVar1 ^ (byte)(uVar1 >> 8)) & 1U) != 0);
}
return (param_1 + 1) / 2;
} |
311 | func0 |
#include <iostream>
#include <assert.h>
#include <bitset>
| int func0(int n) {
if (n % 2 != 0) {
return (n + 1) / 2;
}
int count = std::bitset<32>(n).count();
int ans = n / 2;
if (count % 2 != 0) {
ans += 1;
}
return ans;
}
| int main() {
assert(func0(5) == 3);
assert(func0(10) == 5);
assert(func0(15) == 8);
return 0;
}
| O3 | cpp | func0(int):
endbr64
push %rbx
mov %edi,%ebx
and $0x1,%edi
jne 1210 <_Z5func0i+0x30>
mov %ebx,%edi
callq 1080 <__popcountdi2@plt>
mov %eax,%edx
mov %ebx,%eax
shr $0x1f,%eax
and $0x1,%edx
add %ebx,%eax
pop %rbx
sar %eax
cmp $0x1,%edx
sbb $0xffffffff,%eax
retq
nopl 0x0(%rax)
add... | _Z5func0i:
endbr64
test dil, 1
jnz short loc_1168
mov eax, edi
mov edx, edi
shr eax, 1Fh
shr edx, 10h
add eax, edi
xor edx, edi
sar eax, 1
xor dl, dh
setnp dl
movzx edx, dl
add eax, edx
retn
loc_1168:
add edi, 1
mov eax, edi
shr eax, 1Fh
add eax, edi
sar ... | long long func0(int a1)
{
if ( (a1 & 1) != 0 )
return (unsigned int)((a1 + 1) / 2);
else
return (unsigned int)!__SETP__(((unsigned __int16)(a1 ^ HIWORD(a1)) >> 8) ^ a1 ^ BYTE2(a1), 0) + a1 / 2;
} | func0:
ENDBR64
TEST DIL,0x1
JNZ 0x00101168
MOV EAX,EDI
MOV EDX,EDI
SHR EAX,0x1f
SHR EDX,0x10
ADD EAX,EDI
XOR EDX,EDI
SAR EAX,0x1
XOR DL,DH
SETNP DL
MOVZX EDX,DL
ADD EAX,EDX
RET
LAB_00101168:
ADD EDI,0x1
MOV EAX,EDI
SHR EAX,0x1f
ADD EAX,EDI
SAR EAX,0x1
RET | /* func0(int) */
int func0(int param_1)
{
uint uVar1;
if ((param_1 & 1U) == 0) {
uVar1 = (uint)param_1 >> 0x10 ^ param_1;
return param_1 / 2 + (uint)((POPCOUNT((byte)uVar1 ^ (byte)(uVar1 >> 8)) & 1U) != 0);
}
return (param_1 + 1) / 2;
} |
312 | func0 |
#include <iostream>
#include <string>
#include <assert.h>
| bool func0(std::string s) {
int spacePos = s.find(' ');
if (spacePos == std::string::npos) { // No space found
return s.length() % 2 != 0;
}
while (spacePos != std::string::npos) {
std::string word = s.substr(0, spacePos);
if (word.length() % 2 != 0) {
return... | int main() {
assert(func0("Hadoop") == false);
assert(func0("great") == true);
assert(func0("structure") == true);
return 0;
}
| O0 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %rbp
mov %rsp,%rbp
push %r12
push %rbx
sub $0x70,%rsp
mov %rdi,-0x78(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x78(%rbp),%rax
mov $0x0,%edx
mov $0x20,%esi
mov %... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r12
push rbx
sub rsp, 70h
mov [rbp+var_78], rdi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_78]
mov edx, 0
mov esi, 20h ; ' '
mov rdi, rax
call __... | long long func0(long long a1)
{
unsigned int v1; // ebx
int v2; // r12d
int v4; // [rsp+1Ch] [rbp-64h]
_BYTE v5[32]; // [rsp+20h] [rbp-60h] BYREF
_BYTE v6[40]; // [rsp+40h] [rbp-40h] BYREF
unsigned long long v7; // [rsp+68h] [rbp-18h]
v7 = __readfsqword(0x28u);
v4 = std::string::find(a1, 32LL, 0LL);
... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R12
PUSH RBX
SUB RSP,0x70
MOV qword ptr [RBP + -0x78],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x78]
MOV EDX,0x0
MOV ESI,0x20
MOV RDI,RAX
CALL 0x00101250
MOV dword ptr [RBP + -0x64],EAX
MOV EAX,dword ptr [RBP + -0x64]
... | /* func0(std::string) */
ulong func0(string *param_1)
{
uint uVar1;
ulong unaff_RBX;
long in_FS_OFFSET;
bool bVar2;
int local_6c;
string local_68 [32];
string local_48 [40];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
local_6c = std::string::find((char)param_1,0x20);
if (local_6... |
313 | func0 |
#include <iostream>
#include <string>
#include <assert.h>
| bool func0(std::string s) {
int spacePos = s.find(' ');
if (spacePos == std::string::npos) { // No space found
return s.length() % 2 != 0;
}
while (spacePos != std::string::npos) {
std::string word = s.substr(0, spacePos);
if (word.length() % 2 != 0) {
return... | int main() {
assert(func0("Hadoop") == false);
assert(func0("great") == true);
assert(func0("structure") == true);
return 0;
}
| O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %r13
push %r12
push %rbp
push %rbx
sub $0x58,%rsp
mov %rdi,%rbx
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
mov $0x0,%edx
mov $0x20,%esi
callq 1150 <_ZNKSt7__cxx1112basic_stringIcSt... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r13
push r12
push rbp
push rbx
sub rsp, 58h
mov rbx, rdi
mov rax, fs:28h
mov [rsp+78h+var_30], rax
xor eax, eax
mov edx, 0
mov esi, 20h ; ' '
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE... | long long func0(void **a1)
{
int v2; // ebp
unsigned long long v3; // rdx
_BYTE *v5; // rax
void *v6; // rcx
int v7; // r13d
unsigned long long v8; // rbp
char *v9; // rdx
char *v10; // rdx
unsigned long long v11; // rdi
_BYTE *v12; // rax
char *v13; // rsi
unsigned int v14; // ecx
unsigned i... | func0:
ENDBR64
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x58
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x48],RAX
XOR EAX,EAX
MOV EDX,0x0
MOV ESI,0x20
CALL 0x00101160
MOV EBP,EAX
MOVSXD RDX,EAX
MOV R12,RSP
CMP EAX,-0x1
JNZ 0x0010142b
MOV RAX,qword ptr [RBX + 0x8]
AND EAX,0x1
LAB_001012d1:
MOV RDX,q... | /* func0(std::string) */
uint func0(long *param_1)
{
long *plVar1;
int iVar2;
uint uVar3;
uint uVar4;
int8 uVar5;
long lVar6;
ulong uVar7;
ulong uVar8;
long in_FS_OFFSET;
long *local_78;
byte local_70;
long local_68 [2];
long *local_58;
int8 local_50;
long local_48 [5];
local_48[3] ... |
314 | func0 |
#include <iostream>
#include <string>
#include <assert.h>
| bool func0(std::string s) {
int spacePos = s.find(' ');
if (spacePos == std::string::npos) { // No space found
return s.length() % 2 != 0;
}
while (spacePos != std::string::npos) {
std::string word = s.substr(0, spacePos);
if (word.length() % 2 != 0) {
return... | int main() {
assert(func0("Hadoop") == false);
assert(func0("great") == true);
assert(func0("structure") == true);
return 0;
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %r15
xor %edx,%edx
mov $0x20,%esi
push %r14
push %r13
push %r12
push %rbp
push %rbx
mov %rdi,%rbx
sub $0x58,%rsp
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
callq 1170 <_ZNKSt7_... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
xor edx, edx
mov esi, 20h ; ' '
push r14
push r13
push r12
push rbp
push rbx
mov rbx, rdi
sub rsp, 58h
mov rax, fs:28h
mov [rsp+88h+var_40], rax
xor eax, eax
call __ZNKSt7__cxx1112basic_string... | long long func0(void **a1)
{
int v2; // eax
int v3; // ebp
unsigned long long v4; // rdx
double v5; // rcx
int v6; // r15d
void *v7; // rax
double *v8; // rsi
char *v9; // rdx
unsigned long long v10; // rbp
void *v11; // rsi
double *v12; // rdi
size_t v13; // rdx
size_t v15; // rdx
double *... | func0:
ENDBR64
PUSH R15
XOR EDX,EDX
MOV ESI,0x20
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV RBX,RDI
SUB RSP,0x58
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x48],RAX
XOR EAX,EAX
CALL 0x00101160
CMP EAX,-0x1
JZ 0x00101680
MOV EBP,EAX
MOVSXD RDX,EAX
LEA R12,[RSP + 0x10]
MOV R13,RSP
LEA R14,[RSP + 0x20]
JMP 0x... | /* func0(std::string) */
uint func0(long *param_1)
{
long lVar1;
int iVar2;
uint uVar3;
ulong uVar4;
ulong uVar5;
long *__dest;
long in_FS_OFFSET;
long *local_88;
byte local_80;
long local_78 [2];
long *local_68;
size_t local_60;
long local_58 [3];
long local_40;
local_40 = *(long *)(... |
315 | func0 |
#include <iostream>
#include <string>
#include <assert.h>
| bool func0(std::string s) {
int spacePos = s.find(' ');
if (spacePos == std::string::npos) { // No space found
return s.length() % 2 != 0;
}
while (spacePos != std::string::npos) {
std::string word = s.substr(0, spacePos);
if (word.length() % 2 != 0) {
return... | int main() {
assert(func0("Hadoop") == false);
assert(func0("great") == true);
assert(func0("structure") == true);
return 0;
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %r15
xor %edx,%edx
mov $0x20,%esi
push %r14
push %r13
push %r12
push %rbp
push %rbx
mov %rdi,%rbx
sub $0x68,%rsp
mov %fs:0x28,%rax
mov %rax,0x58(%rsp)
xor %eax,%eax
callq 1170 <_ZNKSt7_... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
xor edx, edx
mov esi, 20h ; ' '
push r14
push r13
push r12
push rbp
push rbx
mov rbx, rdi
sub rsp, 78h
mov rax, fs:28h
mov [rsp+0A8h+var_40], rax
xor eax, eax
lea r13, [rsp+0A8h+var_78]
lea ... | long long func0(long long a1)
{
int v2; // r12d
size_t v3; // rbp
size_t v4; // rax
long long *v5; // r14
unsigned long long v6; // rbp
unsigned long long v7; // rdx
long long *v8; // r14
size_t v9; // rbp
__int8 *v10; // r14
long long *v11; // rax
long long *v12; // rax
long long *v13; // rcx
... | func0:
ENDBR64
PUSH R15
XOR EDX,EDX
MOV ESI,0x20
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV RBX,RDI
SUB RSP,0x78
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x68],RAX
XOR EAX,EAX
LEA R13,[RSP + 0x30]
LEA R15,[RSP + 0x18]
CALL 0x00101160
LEA RCX,[RSP + 0x20]
MOV qword ptr [RSP + 0x8],RCX
MOV R12D,EAX
MOVSXD R... | /* func0(std::string) */
uint func0(long *param_1)
{
int *__src;
ulong uVar1;
int iVar2;
uint uVar3;
ulong *puVar4;
long lVar5;
uint uVar6;
ulong uVar7;
ulong uVar8;
long in_FS_OFFSET;
ulong local_90;
ulong *local_88;
ulong local_80;
ulong local_78 [2];
ulong *local_68;
int8 local_60;
... |
316 | func0 |
#include <cassert>
| double func0(int n) {
return (n * (n + 1) * (n + 2)) / 6;
}
| int main() {
assert(func0(5) == 35.0);
assert(func0(6) == 56.0);
assert(func0(7) == 84.0);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x4(%rbp)
mov -0x4(%rbp),%eax
add $0x1,%eax
imul -0x4(%rbp),%eax
mov -0x4(%rbp),%edx
add $0x2,%edx
imul %edx,%eax
movslq %eax,%rdx
imul $0x2aaaaaab,%rdx,%rdx
shr $0x20,%rdx
sar $0x1f,%eax
mov %edx,%ecx
sub %eax,%ecx
mov %ecx,... | _Z5func0i:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_4], edi
mov eax, [rbp+var_4]
add eax, 1
imul eax, [rbp+var_4]
mov edx, [rbp+var_4]
add edx, 2
imul eax, edx
movsxd rdx, eax
imul rdx, 2AAAAAABh
shr rdx, 20h
sar eax, 1Fh
sub edx, eax
pxor xmm0, xmm0
cvtsi2sd xmm0, ... | double func0(int a1)
{
return (double)((a1 + 2) * a1 * (a1 + 1) / 6);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x4],EDI
MOV EAX,dword ptr [RBP + -0x4]
ADD EAX,0x1
IMUL EAX,dword ptr [RBP + -0x4]
MOV EDX,dword ptr [RBP + -0x4]
ADD EDX,0x2
IMUL EAX,EDX
MOVSXD RDX,EAX
IMUL RDX,RDX,0x2aaaaaab
SHR RDX,0x20
SAR EAX,0x1f
SUB EDX,EAX
PXOR XMM0,XMM0
CVTSI2SD XMM0,EDX
POP RBP
RET | /* func0(int) */
double func0(int param_1)
{
return (double)(((param_1 + 1) * param_1 * (param_1 + 2)) / 6);
} |
317 | func0 |
#include <cassert>
| double func0(int n) {
return (n * (n + 1) * (n + 2)) / 6;
}
| int main() {
assert(func0(5) == 35.0);
assert(func0(6) == 56.0);
assert(func0(7) == 84.0);
return 0;
}
| O1 | cpp | func0(int):
endbr64
mov %edi,%eax
lea 0x1(%rdi),%edi
imul %eax,%edi
add $0x2,%eax
imul %eax,%edi
movslq %edi,%rax
imul $0x2aaaaaab,%rax,%rax
shr $0x20,%rax
sar $0x1f,%edi
sub %edi,%eax
pxor %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
retq
| _Z5func0i:
endbr64
mov eax, edi
lea edi, [rdi+1]
imul edi, eax
add eax, 2
imul edi, eax
movsxd rax, edi
imul rax, 2AAAAAABh
shr rax, 20h
sar edi, 1Fh
sub eax, edi
pxor xmm0, xmm0
cvtsi2sd xmm0, eax
retn | double func0(int a1)
{
return (double)((a1 + 2) * a1 * (a1 + 1) / 6);
} | func0:
ENDBR64
MOV EAX,EDI
LEA EDI,[RDI + 0x1]
IMUL EDI,EAX
ADD EAX,0x2
IMUL EDI,EAX
MOVSXD RAX,EDI
IMUL RAX,RAX,0x2aaaaaab
SHR RAX,0x20
SAR EDI,0x1f
SUB EAX,EDI
PXOR XMM0,XMM0
CVTSI2SD XMM0,EAX
RET | /* func0(int) */
double func0(int param_1)
{
return (double)(((param_1 + 1) * param_1 * (param_1 + 2)) / 6);
} |
318 | func0 |
#include <cassert>
| double func0(int n) {
return (n * (n + 1) * (n + 2)) / 6;
}
| int main() {
assert(func0(5) == 35.0);
assert(func0(6) == 56.0);
assert(func0(7) == 84.0);
return 0;
}
| O2 | cpp | func0(int):
endbr64
mov %edi,%eax
lea 0x1(%rdi),%edi
pxor %xmm0,%xmm0
imul %eax,%edi
add $0x2,%eax
imul %eax,%edi
movslq %edi,%rax
sar $0x1f,%edi
imul $0x2aaaaaab,%rax,%rax
shr $0x20,%rax
sub %edi,%eax
cvtsi2sd %eax,%xmm0
retq
xchg %ax,%ax
| _Z5func0i:
endbr64
mov eax, edi
lea edi, [rdi+1]
pxor xmm0, xmm0
imul edi, eax
add eax, 2
imul edi, eax
movsxd rax, edi
sar edi, 1Fh
imul rax, 2AAAAAABh
shr rax, 20h
sub eax, edi
cvtsi2sd xmm0, eax
retn | double func0(int a1)
{
return (double)((a1 + 2) * a1 * (a1 + 1) / 6);
} | func0:
ENDBR64
MOV EAX,EDI
LEA EDI,[RDI + 0x1]
PXOR XMM0,XMM0
IMUL EDI,EAX
ADD EAX,0x2
IMUL EDI,EAX
MOVSXD RAX,EDI
SAR EDI,0x1f
IMUL RAX,RAX,0x2aaaaaab
SHR RAX,0x20
SUB EAX,EDI
CVTSI2SD XMM0,EAX
RET | /* func0(int) */
double func0(int param_1)
{
return (double)(((param_1 + 1) * param_1 * (param_1 + 2)) / 6);
} |
319 | func0 |
#include <cassert>
| double func0(int n) {
return (n * (n + 1) * (n + 2)) / 6;
}
| int main() {
assert(func0(5) == 35.0);
assert(func0(6) == 56.0);
assert(func0(7) == 84.0);
return 0;
}
| O3 | cpp | func0(int):
endbr64
mov %edi,%eax
lea 0x1(%rdi),%edi
pxor %xmm0,%xmm0
imul %eax,%edi
add $0x2,%eax
imul %eax,%edi
movslq %edi,%rax
sar $0x1f,%edi
imul $0x2aaaaaab,%rax,%rax
shr $0x20,%rax
sub %edi,%eax
cvtsi2sd %eax,%xmm0
retq
xchg %ax,%ax
| _Z5func0i:
endbr64
mov eax, edi
lea edi, [rdi+1]
pxor xmm0, xmm0
imul edi, eax
add eax, 2
imul edi, eax
movsxd rax, edi
sar edi, 1Fh
imul rax, 2AAAAAABh
shr rax, 20h
sub eax, edi
cvtsi2sd xmm0, eax
retn | double func0(int a1)
{
return (double)((a1 + 2) * a1 * (a1 + 1) / 6);
} | func0:
ENDBR64
MOV EAX,EDI
LEA EDI,[RDI + 0x1]
PXOR XMM0,XMM0
IMUL EDI,EAX
ADD EAX,0x2
IMUL EDI,EAX
MOVSXD RAX,EDI
SAR EDI,0x1f
IMUL RAX,RAX,0x2aaaaaab
SHR RAX,0x20
SUB EAX,EDI
CVTSI2SD XMM0,EAX
RET | /* func0(int) */
double func0(int param_1)
{
return (double)(((param_1 + 1) * param_1 * (param_1 + 2)) / 6);
} |
320 | func0 |
#include <vector>
#include <cassert>
#include <utility>
| std::vector<std::pair<int, int>> func0(const std::vector<int>& test_tup1, const std::vector<int>& test_tup2) {
std::vector<std::pair<int, int>> res;
for (size_t i = 0; i < test_tup1.size(); ++i) {
res.push_back({test_tup1[i], test_tup2[i % test_tup2.size()]});
}
return res;
}
| int main() {
assert((func0({7, 8, 4, 5, 9, 10}, {1, 5, 6}) == std::vector<std::pair<int, int>>{{7, 1}, {8, 5}, {4, 6}, {5, 1}, {9, 5}, {10, 6}}));
assert((func0({8, 9, 5, 6, 10, 11}, {2, 6, 7}) == std::vector<std::pair<int, int>>{{8, 2}, {9, 6}, {5, 7}, {6, 2}, {10, 6}, {11, 7}}));
assert((func0({9, 10, ... | O0 | cpp | func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x48,%rsp
mov %rdi,-0x38(%rbp)
mov %rsi,-0x40(%rbp)
mov %rdx,-0x48(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x38(%rbp)... | _Z5func0RKSt6vectorIiSaIiEES3_:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 48h
mov [rbp+var_38], rdi
mov [rbp+var_40], rsi
mov [rbp+var_48], rdx
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_38]
mov rdi, rax
call _ZNSt6vectorISt4pairIiiESaIS1_... | long long func0(long long a1, long long a2, long long a3)
{
long long v3; // rbx
unsigned long long v4; // rax
long long v5; // rax
unsigned long long i; // [rsp+28h] [rbp-28h]
_BYTE v9[8]; // [rsp+30h] [rbp-20h] BYREF
unsigned long long v10; // [rsp+38h] [rbp-18h]
v10 = __readfsqword(0x28u);
std::vec... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RBP + -0x38],RDI
MOV qword ptr [RBP + -0x40],RSI
MOV qword ptr [RBP + -0x48],RDX
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 0x00101dda
MOV qword ptr [RBP + -0x28],0x0
JM... | /* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> >
const&) */
vector * func0(vector *param_1,vector *param_2)
{
int *piVar1;
int *piVar2;
ulong uVar3;
vector<int,std::allocator<int>> *in_RDX;
long in_FS_OFFSET;
ulong local_30;
pair<int,int> local_28 [8];
... |
321 | func0 |
#include <vector>
#include <cassert>
#include <utility>
| std::vector<std::pair<int, int>> func0(const std::vector<int>& test_tup1, const std::vector<int>& test_tup2) {
std::vector<std::pair<int, int>> res;
for (size_t i = 0; i < test_tup1.size(); ++i) {
res.push_back({test_tup1[i], test_tup2[i % test_tup2.size()]});
}
return res;
}
| int main() {
assert((func0({7, 8, 4, 5, 9, 10}, {1, 5, 6}) == std::vector<std::pair<int, int>>{{7, 1}, {8, 5}, {4, 6}, {5, 1}, {9, 5}, {10, 6}}));
assert((func0({8, 9, 5, 6, 10, 11}, {2, 6, 7}) == std::vector<std::pair<int, int>>{{8, 2}, {9, 6}, {5, 7}, {6, 2}, {10, 6}, {11, 7}}));
assert((func0({9, 10, ... | O1 | cpp | func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&):
endbr64
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x10,%rsp
mov %rdi,%rbp
mov %rsi,%r12
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi... | _Z5func0RKSt6vectorIiSaIiEES3_:
endbr64
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 10h
mov rbp, rdi
mov r12, rsi
mov rax, fs:28h
mov [rsp+38h+var_30], rax
xor eax, eax
mov qword ptr [rdi], 0
mov qword ptr [rdi+8], 0
mov qword ptr [rdi+10h], 0
mov rsi, [r... | _QWORD * func0(_QWORD *a1, long long *a2, long long *a3)
{
long long v5; // rsi
unsigned long long v7; // rbx
long long v8; // rdi
unsigned long long v9; // rcx
_QWORD *v10; // rsi
_QWORD v12[7]; // [rsp+0h] [rbp-38h] BYREF
v12[1] = __readfsqword(0x28u);
*a1 = 0LL;
a1[1] = 0LL;
a1[2] = 0LL;
v5 = ... | func0:
ENDBR64
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x10
MOV RBP,RDI
MOV R12,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
MOV qword ptr [RDI],0x0
MOV qword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
MOV RSI,qword ptr [RSI]
CMP qword ptr [R12 + 0x8],RSI
JZ 0x001012f0
... | /* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> >
const&) */
vector * func0(vector *param_1,vector *param_2)
{
int8 *puVar1;
long *in_RDX;
ulong uVar2;
long lVar3;
long in_FS_OFFSET;
int4 local_38;
int4 uStack_34;
long local_30;
local_30 = *(long *)... |
322 | func0 |
#include <vector>
#include <cassert>
#include <utility>
| std::vector<std::pair<int, int>> func0(const std::vector<int>& test_tup1, const std::vector<int>& test_tup2) {
std::vector<std::pair<int, int>> res;
for (size_t i = 0; i < test_tup1.size(); ++i) {
res.push_back({test_tup1[i], test_tup2[i % test_tup2.size()]});
}
return res;
}
| int main() {
assert((func0({7, 8, 4, 5, 9, 10}, {1, 5, 6}) == std::vector<std::pair<int, int>>{{7, 1}, {8, 5}, {4, 6}, {5, 1}, {9, 5}, {10, 6}}));
assert((func0({8, 9, 5, 6, 10, 11}, {2, 6, 7}) == std::vector<std::pair<int, int>>{{8, 2}, {9, 6}, {5, 7}, {6, 2}, {10, 6}, {11, 7}}));
assert((func0({9, 10, ... | O2 | cpp | func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&):
endbr64
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x10,%rsp
mov (%rsi),%r8
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
movq $0x0,(%rdi)
movq $0x0,0x8(%rd... | _Z5func0RKSt6vectorIiSaIiEES3_:
endbr64
push r14
pxor xmm0, xmm0
push r13
push r12
push rbp
mov rbp, rdi
push rbx
sub rsp, 10h
mov r8, [rsi]
mov rax, fs:28h
mov [rsp+38h+var_30], rax
xor eax, eax
mov qword ptr [rdi+10h], 0
movups xmmword ptr [rdi], xmm0
cmp [rsi+8], r8... | long long func0(long long a1, long long *a2, _QWORD *a3)
{
long long v3; // r8
long long v6; // r9
long long v7; // rsi
unsigned long long v8; // rbx
long long v9; // rsi
_QWORD v11[7]; // [rsp+0h] [rbp-38h] BYREF
v3 = *a2;
v11[1] = __readfsqword(0x28u);
*(_QWORD *)(a1 + 16) = 0LL;
*(_OWORD *)a1 =... | func0:
ENDBR64
PUSH R14
PXOR XMM0,XMM0
PUSH R13
PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
SUB RSP,0x10
MOV R8,qword ptr [RSI]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
MOV qword ptr [RDI + 0x10],0x0
MOVUPS xmmword ptr [RDI],XMM0
CMP qword ptr [RSI + 0x8],R8
JZ 0x00101810
MOV R13,RSI
MOV R12,RDX... | /* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> >
const&) */
vector * func0(vector *param_1,vector *param_2)
{
long *in_RDX;
ulong uVar1;
int8 *puVar2;
long lVar3;
int8 *puVar4;
long in_FS_OFFSET;
int8 local_38;
long local_30;
lVar3 = *(long *)param... |
323 | func0 |
#include <vector>
#include <cassert>
#include <utility>
| std::vector<std::pair<int, int>> func0(const std::vector<int>& test_tup1, const std::vector<int>& test_tup2) {
std::vector<std::pair<int, int>> res;
for (size_t i = 0; i < test_tup1.size(); ++i) {
res.push_back({test_tup1[i], test_tup2[i % test_tup2.size()]});
}
return res;
}
| int main() {
assert((func0({7, 8, 4, 5, 9, 10}, {1, 5, 6}) == std::vector<std::pair<int, int>>{{7, 1}, {8, 5}, {4, 6}, {5, 1}, {9, 5}, {10, 6}}));
assert((func0({8, 9, 5, 6, 10, 11}, {2, 6, 7}) == std::vector<std::pair<int, int>>{{8, 2}, {9, 6}, {5, 7}, {6, 2}, {10, 6}, {11, 7}}));
assert((func0({9, 10, ... | O3 | cpp | func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&):
endbr64
push %r14
pxor %xmm0,%xmm0
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x10,%rsp
mov (%rsi),%r8
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
movq $0x0,0x10(%r... | _Z5func0RKSt6vectorIiSaIiEES3_:
endbr64
push r14
pxor xmm0, xmm0
push r13
push r12
push rbp
mov rbp, rdi
push rbx
sub rsp, 10h
mov r9, [rsi+8]
mov r8, [rsi]
mov rax, fs:28h
mov [rsp+38h+var_30], rax
xor eax, eax
mov qword ptr [rdi+10h], 0
movups xmmword ptr [rdi], xmm0... | long long func0(long long a1, long long *a2, _QWORD *a3)
{
long long v3; // r9
long long v4; // r8
long long v7; // r10
long long v8; // rsi
unsigned long long v9; // rbx
long long v10; // rsi
_QWORD v12[7]; // [rsp+0h] [rbp-38h] BYREF
v3 = a2[1];
v4 = *a2;
v12[1] = __readfsqword(0x28u);
*(_QWOR... | func0:
ENDBR64
PUSH R14
PXOR XMM0,XMM0
PUSH R13
PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
SUB RSP,0x10
MOV R9,qword ptr [RSI + 0x8]
MOV R8,qword ptr [RSI]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
MOV qword ptr [RDI + 0x10],0x0
MOVUPS xmmword ptr [RDI],XMM0
CMP R9,R8
JZ 0x00101830
MOV R13,RSI
M... | /* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> >
const&) */
vector * func0(vector *param_1,vector *param_2)
{
long *in_RDX;
ulong uVar1;
int8 *puVar2;
long lVar3;
long lVar4;
int8 *puVar5;
long in_FS_OFFSET;
int8 local_38;
long local_30;
lVar4 = ... |
324 | func0 |
#include <iostream>
#include <cmath>
#include <cassert>
| double func0(double r) {
double volume = (4.0/3.0) * M_PI * r * r * r;
return volume;
}
| int main() {
assert(abs(func0(10) - 4188.790204786391) < 0.0001);
assert(abs(func0(25) - 65449.84694978735) < 0.0001);
assert(abs(func0(20) - 33510.32163829113) < 0.0001);
return 0;
}
| O0 | cpp | func0(double):
endbr64
push %rbp
mov %rsp,%rbp
movsd %xmm0,-0x18(%rbp)
movsd -0x18(%rbp),%xmm1
movsd 0xf4d(%rip),%xmm0
mulsd %xmm1,%xmm0
mulsd -0x18(%rbp),%xmm0
movsd -0x18(%rbp),%xmm1
mulsd %xmm1,%xmm0
movsd %xmm0,-0x8(%rbp)
movsd -0x8(%rbp),%xmm0
pop %rbp
retq
| _Z5func0d:
endbr64
push rbp
mov rbp, rsp
movsd [rbp+var_18], xmm0
movsd xmm1, [rbp+var_18]
movsd xmm0, cs:qword_20D0
mulsd xmm0, xmm1
mulsd xmm0, [rbp+var_18]
movsd xmm1, [rbp+var_18]
mulsd xmm0, xmm1
movsd [rbp+var_8], xmm0
movsd xmm0, [rbp+var_8]
pop rbp
retn | double func0(double a1)
{
return 4.188790204786391 * a1 * a1 * a1;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOVSD qword ptr [RBP + -0x18],XMM0
MOVSD XMM1,qword ptr [RBP + -0x18]
MOVSD XMM0,qword ptr [0x001020d0]
MULSD XMM0,XMM1
MULSD XMM0,qword ptr [RBP + -0x18]
MOVSD XMM1,qword ptr [RBP + -0x18]
MULSD XMM0,XMM1
MOVSD qword ptr [RBP + -0x8],XMM0
MOVSD XMM0,qword ptr [RBP + -0x8]
POP RBP
RE... | /* func0(double) */
double func0(double param_1)
{
return DAT_001020d0 * param_1 * param_1 * param_1;
} |
325 | func0 |
#include <iostream>
#include <cmath>
#include <cassert>
| double func0(double r) {
double volume = (4.0/3.0) * M_PI * r * r * r;
return volume;
}
| int main() {
assert(abs(func0(10) - 4188.790204786391) < 0.0001);
assert(abs(func0(25) - 65449.84694978735) < 0.0001);
assert(abs(func0(20) - 33510.32163829113) < 0.0001);
return 0;
}
| O1 | cpp | func0(double):
endbr64
movapd %xmm0,%xmm1
mulsd 0xe8f(%rip),%xmm0
mulsd %xmm1,%xmm0
mulsd %xmm1,%xmm0
retq
| _Z5func0d:
endbr64
movapd xmm1, xmm0
mulsd xmm0, cs:qword_2008
mulsd xmm0, xmm1
mulsd xmm0, xmm1
retn | double func0(double a1)
{
return a1 * 4.188790204786391 * a1 * a1;
} | func0:
ENDBR64
MOVAPD XMM1,XMM0
MULSD XMM0,qword ptr [0x00102008]
MULSD XMM0,XMM1
MULSD XMM0,XMM1
RET | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(double) */
double func0(double param_1)
{
return param_1 * _DAT_00102008 * param_1 * param_1;
} |
326 | func0 |
#include <iostream>
#include <cmath>
#include <cassert>
| double func0(double r) {
double volume = (4.0/3.0) * M_PI * r * r * r;
return volume;
}
| int main() {
assert(abs(func0(10) - 4188.790204786391) < 0.0001);
assert(abs(func0(25) - 65449.84694978735) < 0.0001);
assert(abs(func0(20) - 33510.32163829113) < 0.0001);
return 0;
}
| O2 | cpp | func0(double):
endbr64
movapd %xmm0,%xmm1
movsd 0xe38(%rip),%xmm0
mulsd %xmm1,%xmm0
mulsd %xmm1,%xmm0
mulsd %xmm1,%xmm0
retq
nopl (%rax)
| _Z5func0d:
endbr64
movapd xmm1, xmm0
movsd xmm0, cs:qword_2008
mulsd xmm0, xmm1
mulsd xmm0, xmm1
mulsd xmm0, xmm1
retn | double func0(double a1)
{
return 4.188790204786391 * a1 * a1 * a1;
} | func0:
ENDBR64
MOVAPD XMM1,XMM0
MOVSD XMM0,qword ptr [0x00102008]
MULSD XMM0,XMM1
MULSD XMM0,XMM1
MULSD XMM0,XMM1
RET | /* func0(double) */
double func0(double param_1)
{
return DAT_00102008 * param_1 * param_1 * param_1;
} |
327 | func0 |
#include <iostream>
#include <cmath>
#include <cassert>
| double func0(double r) {
double volume = (4.0/3.0) * M_PI * r * r * r;
return volume;
}
| int main() {
assert(abs(func0(10) - 4188.790204786391) < 0.0001);
assert(abs(func0(25) - 65449.84694978735) < 0.0001);
assert(abs(func0(20) - 33510.32163829113) < 0.0001);
return 0;
}
| O3 | cpp | func0(double):
endbr64
movapd %xmm0,%xmm1
movsd 0xe38(%rip),%xmm0
mulsd %xmm1,%xmm0
mulsd %xmm1,%xmm0
mulsd %xmm1,%xmm0
retq
nopl (%rax)
| _Z5func0d:
endbr64
movapd xmm1, xmm0
movsd xmm0, cs:qword_2008
mulsd xmm0, xmm1
mulsd xmm0, xmm1
mulsd xmm0, xmm1
retn | double func0(double a1)
{
return 4.188790204786391 * a1 * a1 * a1;
} | func0:
ENDBR64
MOVAPD XMM1,XMM0
MOVSD XMM0,qword ptr [0x00102008]
MULSD XMM0,XMM1
MULSD XMM0,XMM1
MULSD XMM0,XMM1
RET | /* func0(double) */
double func0(double param_1)
{
return DAT_00102008 * param_1 * param_1 * param_1;
} |
328 | func0 |
#include <string>
#include <cassert>
| int func0(const std::string& strr) {
int sum = 0;
for (char c : strr) {
sum += (c - 'a' + 1);
}
if (sum % 26 == 0) {
return 'z';
} else {
sum = sum % 26;
return 'a' + sum - 1;
}
}
| int main() {
assert(func0("abc") == 'f');
assert(func0("gfg") == 't');
assert(func0("ab") == 'c');
return 0;
}
| O0 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > 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 $0x0,-0x24(%rbp)
mov -0x38(%rbp),%rax
mov %rax,-0x10(%rbp)
mov -0x10(... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
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_24], 0
mov rax, [rbp+var_38]
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov rdi,... | long long func0(long long a1)
{
int v2; // [rsp+1Ch] [rbp-24h]
long long v3; // [rsp+20h] [rbp-20h] BYREF
_QWORD v4[3]; // [rsp+28h] [rbp-18h] BYREF
v4[2] = __readfsqword(0x28u);
v2 = 0;
v4[1] = a1;
v3 = std::string::begin(a1);
v4[0] = std::string::end(a1);
while ( (unsigned __int8)__gnu_cxx::operat... | 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 + -0x24],0x0
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,RAX
CALL 0x001011c0
MOV qword pt... | /* func0(std::string const&) */
int func0(string *param_1)
{
bool bVar1;
int iVar2;
char *pcVar3;
long in_FS_OFFSET;
int local_2c;
int8 local_28;
int8 local_20;
string *local_18;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_2c = 0;
local_18 = param_1;
local_28 = std::st... |
329 | func0 |
#include <string>
#include <cassert>
| int func0(const std::string& strr) {
int sum = 0;
for (char c : strr) {
sum += (c - 'a' + 1);
}
if (sum % 26 == 0) {
return 'z';
} else {
sum = sum % 26;
return 'a' + sum - 1;
}
}
| int main() {
assert(func0("abc") == 'f');
assert(func0("gfg") == 't');
assert(func0("ab") == 'c');
return 0;
}
| O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
mov (%rdi),%rax
mov %rax,%rsi
add 0x8(%rdi),%rsi
cmp %rax,%rsi
je 1237 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x4e>
mov $0x0,%edx
movsbl (%rax),%ecx
lea -0x60(%rdx,%rcx,1... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
mov rax, [rdi]
mov rsi, rax
add rsi, [rdi+8]
cmp rsi, rax
jz short loc_1257
mov edx, 0
loc_1221:
movsx ecx, byte ptr [rax]
lea edx, [rdx+rcx-60h]
add rax, 1
cmp rsi, rax
jnz short loc_1221
movsxd rcx, edx... | long long func0(char **a1)
{
char *v1; // rax
char *v2; // rsi
int v3; // edx
int v4; // edx
long long result; // rax
v1 = *a1;
v2 = &(*a1)[(_QWORD)a1[1]];
if ( v2 == *a1 )
return 122LL;
v3 = 0;
do
v3 = v3 + *v1++ - 96;
while ( v2 != v1 );
v4 = v3 % 26;
result = (unsigned int)(v4 + 9... | func0:
ENDBR64
MOV RAX,qword ptr [RDI]
MOV RSI,RAX
ADD RSI,qword ptr [RDI + 0x8]
CMP RSI,RAX
JZ 0x00101257
MOV EDX,0x0
LAB_00101221:
MOVSX ECX,byte ptr [RAX]
LEA EDX,[RDX + RCX*0x1 + -0x60]
ADD RAX,0x1
CMP RSI,RAX
JNZ 0x00101221
MOVSXD RCX,EDX
IMUL RCX,RCX,0x4ec4ec4f
SAR RCX,0x23
MOV EAX,EDX
SAR EAX,0x1f
SUB ECX,EAX
IM... | /* func0(std::string const&) */
int func0(string *param_1)
{
int iVar1;
char *pcVar2;
int iVar3;
char *pcVar4;
pcVar2 = *(char **)param_1;
pcVar4 = pcVar2 + *(long *)(param_1 + 8);
if (pcVar4 != pcVar2) {
iVar3 = 0;
do {
iVar3 = iVar3 + -0x60 + (int)*pcVar2;
pcVar2 = pcVar2 + 1;
... |
330 | func0 |
#include <string>
#include <cassert>
| int func0(const std::string& strr) {
int sum = 0;
for (char c : strr) {
sum += (c - 'a' + 1);
}
if (sum % 26 == 0) {
return 'z';
} else {
sum = sum % 26;
return 'a' + sum - 1;
}
}
| int main() {
assert(func0("abc") == 'f');
assert(func0("gfg") == 't');
assert(func0("ab") == 'c');
return 0;
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
mov (%rdi),%rax
mov 0x8(%rdi),%rsi
add %rax,%rsi
cmp %rax,%rsi
je 1430 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x50>
xor %edx,%edx
nopl (%rax)
movsbl (%rax),%ecx
add $0x... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
mov rax, [rdi]
mov rsi, [rdi+8]
add rsi, rax
cmp rsi, rax
jz short loc_1370
xor edx, edx
nop dword ptr [rax]
loc_1338:
movsx ecx, byte ptr [rax]
add rax, 1
lea edx, [rdx+rcx-60h]
cmp rsi, rax
jnz short... | long long func0(char **a1)
{
char *v1; // rax
char *v2; // rsi
int v3; // edx
int v4; // ecx
int v5; // edx
long long result; // rax
v1 = *a1;
v2 = &a1[1][(_QWORD)*a1];
if ( v2 == *a1 )
return 122LL;
v3 = 0;
do
{
v4 = *v1++;
v3 = v3 + v4 - 96;
}
while ( v2 != v1 );
v5 = v3 % ... | func0:
ENDBR64
MOV RAX,qword ptr [RDI]
MOV RSI,qword ptr [RDI + 0x8]
ADD RSI,RAX
CMP RSI,RAX
JZ 0x00101370
XOR EDX,EDX
NOP dword ptr [RAX]
LAB_00101338:
MOVSX ECX,byte ptr [RAX]
ADD RAX,0x1
LEA EDX,[RDX + RCX*0x1 + -0x60]
CMP RSI,RAX
JNZ 0x00101338
MOVSXD RCX,EDX
MOV EAX,EDX
IMUL RCX,RCX,0x4ec4ec4f
SAR EAX,0x1f
SAR RCX... | /* func0(std::string const&) */
int func0(string *param_1)
{
char cVar1;
int iVar2;
char *pcVar3;
int iVar4;
char *pcVar5;
pcVar3 = *(char **)param_1;
pcVar5 = pcVar3 + *(long *)(param_1 + 8);
if (pcVar5 != pcVar3) {
iVar4 = 0;
do {
cVar1 = *pcVar3;
pcVar3 = pcVar3 + 1;
iV... |
331 | func0 |
#include <string>
#include <cassert>
| int func0(const std::string& strr) {
int sum = 0;
for (char c : strr) {
sum += (c - 'a' + 1);
}
if (sum % 26 == 0) {
return 'z';
} else {
sum = sum % 26;
return 'a' + sum - 1;
}
}
| int main() {
assert(func0("abc") == 'f');
assert(func0("gfg") == 't');
assert(func0("ab") == 'c');
return 0;
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
mov (%rdi),%rdx
mov 0x8(%rdi),%rdi
lea (%rdx,%rdi,1),%rcx
cmp %rdx,%rcx
je 1b48 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x218>
lea -0x1(%rdi),%rsi
mov %rdx,%rax
cmp $0x... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
mov rdx, [rdi]
mov rdi, [rdi+8]
lea rsi, [rdx+rdi]
cmp rsi, rdx
jz loc_1B70
lea rax, [rdi-1]
cmp rax, 0Eh
jbe loc_1B76
mov r8, rdi
pxor xmm3, xmm3
pxor xmm6, xmm6
mov rax, rdx
and r8, 0FFFFFFFFFFFF... | long long func0(__m128i **a1)
{
__m128i *v1; // rdx
__m128i *v2; // rdi
char *v3; // rsi
__m128i v4; // xmm3
const __m128i *v5; // rax
unsigned long long v6; // r8
__m128i si128; // xmm5
char *v8; // rcx
__m128i v9; // xmm0
__m128i v10; // xmm1
__m128i v11; // xmm2
__m128i v12; // xmm0
__m128... | func0:
ENDBR64
MOV RDX,qword ptr [RDI]
MOV RDI,qword ptr [RDI + 0x8]
LEA RSI,[RDX + RDI*0x1]
CMP RSI,RDX
JZ 0x00101b70
LEA RAX,[RDI + -0x1]
CMP RAX,0xe
JBE 0x00101b76
MOV R8,RDI
PXOR XMM3,XMM3
PXOR XMM6,XMM6
MOV RAX,RDX
AND R8,-0x10
MOVDQA XMM5,xmmword ptr [0x001020c0]
PXOR XMM4,XMM4
LEA RCX,[RDX + R8*0x1]
NOP dword pt... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(std::string const&) */
int func0(string *param_1)
{
int (*pauVar1) [16];
int (*pauVar2) [16];
int auVar3 [14];
int auVar4 [12];
unkbyte10 Var5;
int auVar6 [12];
int auVar7 [12];
int auVar8 [14];
int auVar9 ... |
332 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int n) {
if (n == 1 || n == 2) {
return 1;
} else {
return func0(func0(n-1)) + func0(n - func0(n-1));
}
}
| int main() {
assert(func0(10) == 6);
assert(func0(2) == 1);
assert(func0(3) == 2);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x18,%rsp
mov %edi,-0x14(%rbp)
cmpl $0x1,-0x14(%rbp)
je 11a5 <_Z5func0i+0x1c>
cmpl $0x2,-0x14(%rbp)
jne 11ac <_Z5func0i+0x23>
mov $0x1,%eax
jmp 11df <_Z5func0i+0x56>
mov -0x14(%rbp),%eax
sub $0x1,%eax
mov %eax,%edi
callq ... | _Z5func0i:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 18h
mov [rbp+var_14], edi
cmp [rbp+var_14], 1
jz short loc_1165
cmp [rbp+var_14], 2
jnz short loc_116C
loc_1165:
mov eax, 1
jmp short loc_119D
loc_116C:
mov eax, [rbp+var_14]
sub eax, 1
mov edi, eax; int
ca... | long long func0(int a1)
{
int v2; // eax
int v3; // ebx
int v4; // eax
if ( a1 == 1 || a1 == 2 )
return 1LL;
v2 = func0(a1 - 1);
v3 = func0(v2);
v4 = func0(a1 - 1);
return v3 + (unsigned int)func0(a1 - v4);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x18
MOV dword ptr [RBP + -0x14],EDI
CMP dword ptr [RBP + -0x14],0x1
JZ 0x00101165
CMP dword ptr [RBP + -0x14],0x2
JNZ 0x0010116c
LAB_00101165:
MOV EAX,0x1
JMP 0x0010119d
LAB_0010116c:
MOV EAX,dword ptr [RBP + -0x14]
SUB EAX,0x1
MOV EDI,EAX
CALL 0x00101149
MOV EDI,EA... | /* func0(int) */
int func0(int param_1)
{
int iVar1;
int iVar2;
if ((param_1 == 1) || (param_1 == 2)) {
iVar2 = 1;
}
else {
iVar1 = func0(param_1 + -1);
iVar1 = func0(iVar1);
iVar2 = func0(param_1 + -1);
iVar2 = func0(param_1 - iVar2);
iVar2 = iVar2 + iVar1;
}
return iVar2;
} |
333 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int n) {
if (n == 1 || n == 2) {
return 1;
} else {
return func0(func0(n-1)) + func0(n - func0(n-1));
}
}
| int main() {
assert(func0(10) == 6);
assert(func0(2) == 1);
assert(func0(3) == 2);
return 0;
}
| O1 | cpp | func0(int):
endbr64
lea -0x1(%rdi),%edx
mov $0x1,%eax
cmp $0x1,%edx
jbe 11c4 <_Z5func0i+0x3b>
push %r12
push %rbp
push %rbx
mov %edi,%ebx
mov %edx,%edi
callq 1189 <_Z5func0i>
mov %eax,%r12d
mov %eax,%edi
callq 1189 <_Z5func0i>
mov %eax,%ebp
sub %r12d,%ebx
mov %ebx,%edi
callq 11... | _Z5func0i:
endbr64
lea edx, [rdi-1]
mov eax, 1
cmp edx, 1
jbe short locret_1184
push r12
push rbp
push rbx
mov ebx, edi
mov edi, edx; int
call _Z5func0i; func0(int)
mov r12d, eax
mov edi, eax; int
call _Z5func0i; func0(int)
mov ebp, eax
sub ebx, r12d
mov edi, e... | long long func0(int a1)
{
long long result; // rax
int v2; // r12d
int v3; // ebp
result = 1LL;
if ( (unsigned int)(a1 - 1) > 1 )
{
v2 = func0(a1 - 1);
v3 = func0(v2);
return v3 + (unsigned int)func0(a1 - v2);
}
return result;
} | func0:
ENDBR64
LEA EDX,[RDI + -0x1]
MOV EAX,0x1
CMP EDX,0x1
JBE 0x00101184
PUSH R12
PUSH RBP
PUSH RBX
MOV EBX,EDI
MOV EDI,EDX
CALL 0x00101149
MOV R12D,EAX
MOV EDI,EAX
CALL 0x00101149
MOV EBP,EAX
SUB EBX,R12D
MOV EDI,EBX
CALL 0x00101149
ADD EAX,EBP
POP RBX
POP RBP
POP R12
RET
LAB_00101184:
RET | /* func0(int) */
int func0(int param_1)
{
int iVar1;
int iVar2;
if (1 < param_1 - 1U) {
iVar1 = func0(param_1 - 1U);
iVar2 = func0(iVar1);
iVar1 = func0(param_1 - iVar1);
return iVar1 + iVar2;
}
return 1;
} |
334 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int n) {
if (n == 1 || n == 2) {
return 1;
} else {
return func0(func0(n-1)) + func0(n - func0(n-1));
}
}
| int main() {
assert(func0(10) == 6);
assert(func0(2) == 1);
assert(func0(3) == 2);
return 0;
}
| O2 | cpp | func0(int):
endbr64
push %r12
mov $0x1,%eax
push %rbp
mov %edi,%ebp
sub $0x1,%edi
push %rbx
cmp $0x1,%edi
jbe 12aa <_Z5func0i+0x3a>
xor %r12d,%r12d
callq 1270 <_Z5func0i>
mov %eax,%ebx
mov %eax,%edi
callq 1270 <_Z5func0i>
sub %ebx,%ebp
lea -0x1(%rbp),%edi
add %eax,%r12d
cmp $... | _Z5func0i:
endbr64
push r15
mov eax, 1
push r14
push r13
push r12
lea r12d, [rdi-1]
push rbp
push rbx
sub rsp, 38h
cmp r12d, 1
jbe loc_19DC
xor ebp, ebp
mov [rsp+68h+var_44], edi
mov r14d, r12d
mov [rsp+68h+var_3C], ebp
loc_1222:
mov eax, [rsp+68h+var_44]
mov ... | long long func0(int a1)
{
long long result; // rax
int v2; // r14d
int v3; // ebx
int v4; // r14d
unsigned int v5; // r12d
int v6; // ebx
int v7; // ebp
int v8; // r13d
int v9; // eax
int v10; // edi
int v11; // ebx
int v12; // r15d
int v13; // r13d
int v14; // r15d
int v15; // edi
int ... | func0:
ENDBR64
PUSH R15
MOV EAX,0x1
PUSH R14
PUSH R13
PUSH R12
LEA R12D,[RDI + -0x1]
PUSH RBP
PUSH RBX
SUB RSP,0x38
CMP R12D,0x1
JBE 0x001019dc
XOR EBP,EBP
MOV dword ptr [RSP + 0x24],EDI
MOV R14D,R12D
MOV dword ptr [RSP + 0x2c],EBP
LAB_00101222:
MOV EAX,dword ptr [RSP + 0x24]
MOV dword ptr [RSP + 0x18],R14D
CMP EAX,0x3... | /* func0(int) */
int func0(int param_1)
{
uint uVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
int iVar6;
int iVar7;
uint uVar8;
uint uVar9;
uint uVar10;
int iVar11;
uint uVar12;
uint local_5c;
uint local_58;
uint local_54;
uint local_50;
uint local_4c;
uint local_48;
int loca... |
335 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int n) {
if (n == 1 || n == 2) {
return 1;
} else {
return func0(func0(n-1)) + func0(n - func0(n-1));
}
}
| int main() {
assert(func0(10) == 6);
assert(func0(2) == 1);
assert(func0(3) == 2);
return 0;
}
| O3 | cpp | func0(int):
endbr64
push %r12
mov $0x1,%eax
push %rbp
mov %edi,%ebp
sub $0x1,%edi
push %rbx
cmp $0x1,%edi
jbe 12aa <_Z5func0i+0x3a>
xor %r12d,%r12d
callq 1270 <_Z5func0i>
mov %eax,%ebx
mov %eax,%edi
callq 1270 <_Z5func0i>
sub %ebx,%ebp
lea -0x1(%rbp),%edi
add %eax,%r12d
cmp $... | _Z5func0i:
endbr64
push r15
mov eax, 1
push r14
push r13
push r12
lea r12d, [rdi-1]
push rbp
push rbx
sub rsp, 38h
cmp r12d, 1
jbe loc_19DC
xor ebp, ebp
mov [rsp+68h+var_44], edi
mov r14d, r12d
mov [rsp+68h+var_3C], ebp
loc_1222:
mov eax, [rsp+68h+var_44]
mov ... | long long func0(int a1)
{
long long result; // rax
int v2; // r14d
int v3; // ebx
int v4; // r14d
unsigned int v5; // r12d
int v6; // ebx
int v7; // ebp
int v8; // r13d
int v9; // eax
int v10; // edi
int v11; // ebx
int v12; // r15d
int v13; // r13d
int v14; // r15d
int v15; // edi
int ... | func0:
ENDBR64
PUSH R15
MOV EAX,0x1
PUSH R14
PUSH R13
PUSH R12
LEA R12D,[RDI + -0x1]
PUSH RBP
PUSH RBX
SUB RSP,0x38
CMP R12D,0x1
JBE 0x001019dc
XOR EBP,EBP
MOV dword ptr [RSP + 0x24],EDI
MOV R14D,R12D
MOV dword ptr [RSP + 0x2c],EBP
LAB_00101222:
MOV EAX,dword ptr [RSP + 0x24]
MOV dword ptr [RSP + 0x18],R14D
CMP EAX,0x3... | /* func0(int) */
int func0(int param_1)
{
uint uVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
int iVar6;
int iVar7;
uint uVar8;
uint uVar9;
uint uVar10;
int iVar11;
uint uVar12;
uint local_5c;
uint local_58;
uint local_54;
uint local_50;
uint local_4c;
uint local_48;
int loca... |
336 | func0 |
#include <cmath>
#include <cassert>
| double func0(double r) {
double surfacearea = 4 * M_PI * r * r;
return surfacearea;
}
| int main() {
assert(func0(10) == 1256.6370614359173);
assert(func0(15) == 2827.4333882308138);
assert(func0(20) == 5026.548245743669);
return 0;
}
| O0 | cpp | func0(double):
endbr64
push %rbp
mov %rsp,%rbp
movsd %xmm0,-0x18(%rbp)
movsd -0x18(%rbp),%xmm1
movsd 0xf5d(%rip),%xmm0
mulsd %xmm1,%xmm0
movsd -0x18(%rbp),%xmm1
mulsd %xmm1,%xmm0
movsd %xmm0,-0x8(%rbp)
movsd -0x8(%rbp),%xmm0
pop %rbp
retq
| _Z5func0d:
endbr64
push rbp
mov rbp, rsp
movsd [rbp+var_18], xmm0
movsd xmm1, [rbp+var_18]
movsd xmm0, cs:qword_20A0
mulsd xmm0, xmm1
movsd xmm1, [rbp+var_18]
mulsd xmm0, xmm1
movsd [rbp+var_8], xmm0
movsd xmm0, [rbp+var_8]
pop rbp
retn | double func0(double a1)
{
return 12.56637061435917 * a1 * a1;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOVSD qword ptr [RBP + -0x18],XMM0
MOVSD XMM1,qword ptr [RBP + -0x18]
MOVSD XMM0,qword ptr [0x001020a0]
MULSD XMM0,XMM1
MOVSD XMM1,qword ptr [RBP + -0x18]
MULSD XMM0,XMM1
MOVSD qword ptr [RBP + -0x8],XMM0
MOVSD XMM0,qword ptr [RBP + -0x8]
POP RBP
RET | /* func0(double) */
double func0(double param_1)
{
return DAT_001020a0 * param_1 * param_1;
} |
337 | func0 |
#include <cmath>
#include <cassert>
| double func0(double r) {
double surfacearea = 4 * M_PI * r * r;
return surfacearea;
}
| int main() {
assert(func0(10) == 1256.6370614359173);
assert(func0(15) == 2827.4333882308138);
assert(func0(20) == 5026.548245743669);
return 0;
}
| O1 | cpp | func0(double):
endbr64
movapd %xmm0,%xmm1
mulsd 0xecf(%rip),%xmm0
mulsd %xmm1,%xmm0
retq
| _Z5func0d:
endbr64
movapd xmm1, xmm0
mulsd xmm0, cs:qword_2008
mulsd xmm0, xmm1
retn | double func0(double a1)
{
return a1 * 12.56637061435917 * a1;
} | func0:
ENDBR64
MOVAPD XMM1,XMM0
MULSD XMM0,qword ptr [0x00102008]
MULSD XMM0,XMM1
RET | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(double) */
double func0(double param_1)
{
return param_1 * _DAT_00102008 * param_1;
} |
338 | func0 |
#include <cmath>
#include <cassert>
| double func0(double r) {
double surfacearea = 4 * M_PI * r * r;
return surfacearea;
}
| int main() {
assert(func0(10) == 1256.6370614359173);
assert(func0(15) == 2827.4333882308138);
assert(func0(20) == 5026.548245743669);
return 0;
}
| O2 | cpp | func0(double):
endbr64
movapd %xmm0,%xmm1
movsd 0xeb8(%rip),%xmm0
mulsd %xmm1,%xmm0
mulsd %xmm1,%xmm0
retq
nopl 0x0(%rax)
| _Z5func0d:
endbr64
movapd xmm1, xmm0
movsd xmm0, cs:qword_2008
mulsd xmm0, xmm1
mulsd xmm0, xmm1
retn | double func0(double a1)
{
return 12.56637061435917 * a1 * a1;
} | func0:
ENDBR64
MOVAPD XMM1,XMM0
MOVSD XMM0,qword ptr [0x00102008]
MULSD XMM0,XMM1
MULSD XMM0,XMM1
RET | /* func0(double) */
double func0(double param_1)
{
return DAT_00102008 * param_1 * param_1;
} |
339 | func0 |
#include <cmath>
#include <cassert>
| double func0(double r) {
double surfacearea = 4 * M_PI * r * r;
return surfacearea;
}
| int main() {
assert(func0(10) == 1256.6370614359173);
assert(func0(15) == 2827.4333882308138);
assert(func0(20) == 5026.548245743669);
return 0;
}
| O3 | cpp | func0(double):
endbr64
movapd %xmm0,%xmm1
movsd 0xeb8(%rip),%xmm0
mulsd %xmm1,%xmm0
mulsd %xmm1,%xmm0
retq
nopl 0x0(%rax)
| _Z5func0d:
endbr64
movapd xmm1, xmm0
movsd xmm0, cs:qword_2008
mulsd xmm0, xmm1
mulsd xmm0, xmm1
retn | double func0(double a1)
{
return 12.56637061435917 * a1 * a1;
} | func0:
ENDBR64
MOVAPD XMM1,XMM0
MOVSD XMM0,qword ptr [0x00102008]
MULSD XMM0,XMM1
MULSD XMM0,XMM1
RET | /* func0(double) */
double func0(double param_1)
{
return DAT_00102008 * param_1 * param_1;
} |
340 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int n) {
return 3 * n * (n - 1) + 1;
}
| int main() {
assert(func0(10) == 271);
assert(func0(2) == 7);
assert(func0(9) == 217);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x4(%rbp)
mov -0x4(%rbp),%eax
sub $0x1,%eax
imul -0x4(%rbp),%eax
mov %eax,%edx
mov %edx,%eax
add %eax,%eax
add %edx,%eax
add $0x1,%eax
pop %rbp
retq
| _Z5func0i:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_4], edi
mov eax, [rbp+var_4]
sub eax, 1
imul eax, [rbp+var_4]
mov edx, eax
mov eax, edx
add eax, eax
add eax, edx
add eax, 1
pop rbp
retn | long long func0(int a1)
{
return (unsigned int)(3 * a1 * (a1 - 1) + 1);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x4],EDI
MOV EAX,dword ptr [RBP + -0x4]
SUB EAX,0x1
IMUL EAX,dword ptr [RBP + -0x4]
MOV EDX,EAX
MOV EAX,EDX
ADD EAX,EAX
ADD EAX,EDX
ADD EAX,0x1
POP RBP
RET | /* func0(int) */
int func0(int param_1)
{
return (param_1 + -1) * param_1 * 3 + 1;
} |
341 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int n) {
return 3 * n * (n - 1) + 1;
}
| int main() {
assert(func0(10) == 271);
assert(func0(2) == 7);
assert(func0(9) == 217);
return 0;
}
| O1 | cpp | func0(int):
endbr64
mov %edi,%eax
lea -0x1(%rdi),%edi
imul %eax,%edi
lea 0x1(%rdi,%rdi,2),%eax
retq
| _Z5func0i:
endbr64
lea eax, [rdi-1]
imul eax, edi
lea eax, [rax+rax*2+1]
retn | long long func0(int a1)
{
return (unsigned int)(3 * a1 * (a1 - 1) + 1);
} | func0:
ENDBR64
LEA EAX,[RDI + -0x1]
IMUL EAX,EDI
LEA EAX,[RAX + RAX*0x2 + 0x1]
RET | /* func0(int) */
int func0(int param_1)
{
return (param_1 + -1) * param_1 * 3 + 1;
} |
342 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int n) {
return 3 * n * (n - 1) + 1;
}
| int main() {
assert(func0(10) == 271);
assert(func0(2) == 7);
assert(func0(9) == 217);
return 0;
}
| O2 | cpp | func0(int):
endbr64
mov %edi,%r8d
lea -0x1(%rdi),%edi
imul %r8d,%edi
lea 0x1(%rdi,%rdi,2),%eax
retq
nopw %cs:0x0(%rax,%rax,1)
nopl (%rax)
| _Z5func0i:
endbr64
lea eax, [rdi-1]
imul eax, edi
lea eax, [rax+rax*2+1]
retn | long long func0(int a1)
{
return (unsigned int)(3 * a1 * (a1 - 1) + 1);
} | func0:
ENDBR64
LEA EAX,[RDI + -0x1]
IMUL EAX,EDI
LEA EAX,[RAX + RAX*0x2 + 0x1]
RET | /* func0(int) */
int func0(int param_1)
{
return (param_1 + -1) * param_1 * 3 + 1;
} |
343 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int n) {
return 3 * n * (n - 1) + 1;
}
| int main() {
assert(func0(10) == 271);
assert(func0(2) == 7);
assert(func0(9) == 217);
return 0;
}
| O3 | cpp | func0(int):
endbr64
mov %edi,%r8d
lea -0x1(%rdi),%edi
imul %r8d,%edi
lea 0x1(%rdi,%rdi,2),%eax
retq
nopw %cs:0x0(%rax,%rax,1)
nopl (%rax)
| _Z5func0i:
endbr64
lea eax, [rdi-1]
imul eax, edi
lea eax, [rax+rax*2+1]
retn | long long func0(int a1)
{
return (unsigned int)(3 * a1 * (a1 - 1) + 1);
} | func0:
ENDBR64
LEA EAX,[RDI + -0x1]
IMUL EAX,EDI
LEA EAX,[RAX + RAX*0x2 + 0x1]
RET | /* func0(int) */
int func0(int param_1)
{
return (param_1 + -1) * param_1 * 3 + 1;
} |
344 | func0 | #include <cassert>
#include <map>
#include <string>
| std::map<std::string, std::string> func0(const std::map<std::string, std::string>& dict1,
const std::map<std::string, std::string>& dict2,
const std::map<std::string, std::string>& dict3) {
... | int main() {
{
std::map<std::string, std::string> expected = {
{"B", "Black"},
{"R", "Red"},
{"P", "Pink"},
{"G", "Green"},
{"W", "White"},
{"O", "Orange"}
};
auto result = func0(
{ {"R", "Red"}, {... | O0 | cpp | func0(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_strin... | _Z5func0RKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEESE_SE_:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 88h
mov [rbp+var_78], rdi
mov [rbp+var_80], rsi
mov [rbp+var_88], rdx
mov [rbp+var_90], rcx
mov rax, fs:28h
mov [rbp+var_... | long long func0(long long a1, long long a2, long long a3, long long a4)
{
long long v7; // [rsp+28h] [rbp-68h] BYREF
long long v8; // [rsp+30h] [rbp-60h] BYREF
long long v9; // [rsp+38h] [rbp-58h] BYREF
_QWORD v10[2]; // [rsp+40h] [rbp-50h] BYREF
long long v11; // [rsp+50h] [rbp-40h]
long long v12; // [rsp... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x88
MOV qword ptr [RBP + -0x78],RDI
MOV qword ptr [RBP + -0x80],RSI
MOV qword ptr [RBP + -0x88],RDX
MOV qword ptr [RBP + -0x90],RCX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x78]
MOV RDI,RAX
CALL 0x00104180
MO... | /* func0(std::map<std::string, std::string, std::less<std::string >,
std::allocator<std::pair<std::string const, std::string > > > const&, std::map<std::string,
std::string, std::less<std::string >, std::allocator<std::pair<std::string const, std::string > >
> const&, std::map<std::string, std::string, std::le... |
345 | func0 | #include <cassert>
#include <map>
#include <string>
| std::map<std::string, std::string> func0(const std::map<std::string, std::string>& dict1,
const std::map<std::string, std::string>& dict2,
const std::map<std::string, std::string>& dict3) {
... | int main() {
{
std::map<std::string, std::string> expected = {
{"B", "Black"},
{"R", "Red"},
{"P", "Pink"},
{"G", "Green"},
{"W", "White"},
{"O", "Orange"}
};
auto result = func0(
{ {"R", "Red"}, {... | O1 | cpp | func0(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_strin... | _Z5func0RKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEESE_SE_:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 8
mov rbp, rdi
mov r15, rdx
mov r13, rcx
mov dword ptr [rdi+8], 0
mov qword ptr [rdi+10h], 0
l... | long long func0(long long a1, long long a2, long long a3, long long a4)
{
long long v6; // r12
long long i; // rbx
long long v8; // rbx
long long j; // r15
long long k; // rbx
*(_DWORD *)(a1 + 8) = 0;
*(_QWORD *)(a1 + 16) = 0LL;
v6 = a1 + 8;
*(_QWORD *)(a1 + 24) = a1 + 8;
*(_QWORD *)(a1 + 32) = a1... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV RBP,RDI
MOV R15,RDX
MOV R13,RCX
MOV dword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
LEA R12,[RDI + 0x8]
MOV qword ptr [RDI + 0x18],R12
MOV qword ptr [RDI + 0x20],R12
MOV qword ptr [RDI + 0x28],0x0
MOV RBX,qword ptr [RSI + 0x18... | /* func0(std::map<std::string, std::string, std::less<std::string >,
std::allocator<std::pair<std::string const, std::string > > > const&, std::map<std::string,
std::string, std::less<std::string >, std::allocator<std::pair<std::string const, std::string > >
> const&, std::map<std::string, std::string, std::le... |
346 | func0 | #include <cassert>
#include <map>
#include <string>
| std::map<std::string, std::string> func0(const std::map<std::string, std::string>& dict1,
const std::map<std::string, std::string>& dict2,
const std::map<std::string, std::string>& dict3) {
... | int main() {
{
std::map<std::string, std::string> expected = {
{"B", "Black"},
{"R", "Red"},
{"P", "Pink"},
{"G", "Green"},
{"W", "White"},
{"O", "Orange"}
};
auto result = func0(
{ {"R", "Red"}, {... | O2 | cpp | func0(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_strin... | _Z5func0RKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEESE_SE_:
endbr64
push r15
mov r15, rdx
push r14
lea r14, [rsi+8]
push r13
mov r13, rcx
push r12
lea r12, [rdi+8]
push rbp
mov rbp, rdi
push rbx
sub rsp, 8
mov [rdi+18h], ... | long long func0(long long a1, long long a2, long long a3, long long a4)
{
long long v6; // r12
long long v7; // rbx
long long v8; // rbx
long long i; // r15
long long v10; // rbx
long long j; // r14
v6 = a1 + 8;
*(_QWORD *)(a1 + 24) = a1 + 8;
v7 = *(_QWORD *)(a2 + 24);
*(_DWORD *)(a1 + 8) = 0;
*... | func0:
ENDBR64
PUSH R15
MOV R15,RDX
PUSH R14
LEA R14,[RSI + 0x8]
PUSH R13
MOV R13,RCX
PUSH R12
LEA R12,[RDI + 0x8]
PUSH RBP
MOV RBP,RDI
PUSH RBX
SUB RSP,0x8
MOV qword ptr [RDI + 0x18],R12
MOV RBX,qword ptr [RSI + 0x18]
MOV dword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
MOV qword ptr [RDI + 0x20],R12
MOV qword... | /* func0(std::map<std::string, std::string, std::less<std::string >,
std::allocator<std::pair<std::string const, std::string > > > const&, std::map<std::string,
std::string, std::less<std::string >, std::allocator<std::pair<std::string const, std::string > >
> const&, std::map<std::string, std::string, std::le... |
347 | func0 | #include <cassert>
#include <map>
#include <string>
| std::map<std::string, std::string> func0(const std::map<std::string, std::string>& dict1,
const std::map<std::string, std::string>& dict2,
const std::map<std::string, std::string>& dict3) {
... | int main() {
{
std::map<std::string, std::string> expected = {
{"B", "Black"},
{"R", "Red"},
{"P", "Pink"},
{"G", "Green"},
{"W", "White"},
{"O", "Orange"}
};
auto result = func0(
{ {"R", "Red"}, {... | O3 | cpp | func0(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_strin... | _Z5func0RKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEESE_SE_:
endbr64
push r15
lea rax, [rdi+8]
push r14
push r13
push r12
mov r12, rdx
push rbp
lea rbp, [rsi+8]
push rbx
sub rsp, 38h
mov [rdi+18h], rax
mov rbx, [rsi+18h]
mov ... | long long func0(long long a1, long long a2, long long a3, long long a4)
{
long long v5; // rbx
long long insert_unique_pos; // rax
long long v7; // rdx
const void *v8; // r12
size_t v9; // r13
long long v10; // r15
long long v11; // rbx
size_t v12; // rbp
size_t v13; // rdx
int v14; // eax
const ... | func0:
ENDBR64
PUSH R15
LEA RAX,[RDI + 0x8]
PUSH R14
PUSH R13
PUSH R12
MOV R12,RDX
PUSH RBP
LEA RBP,[RSI + 0x8]
PUSH RBX
SUB RSP,0x38
MOV qword ptr [RDI + 0x18],RAX
MOV RBX,qword ptr [RSI + 0x18]
MOV qword ptr [RSP + 0x8],RDI
MOV qword ptr [RSP + 0x28],RCX
MOV dword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
MO... | /* func0(std::map<std::string, std::string, std::less<std::string >,
std::allocator<std::pair<std::string const, std::string > > > const&, std::map<std::string,
std::string, std::less<std::string >, std::allocator<std::pair<std::string const, std::string > >
> const&, std::map<std::string, std::string, std::le... |
348 | func0 |
#include <iostream>
#include <unordered_map>
#include <vector>
#include <assert.h>
| std::unordered_map<int, int> func0(const std::vector<int>& list1) {
std::unordered_map<int, int> freq_count_map;
for (int element : list1) {
freq_count_map[element]++;
}
return freq_count_map;
}
| int main() {
assert((func0({10, 10, 10, 10, 20, 20, 20, 20, 40, 40, 50, 50, 30}) == std::unordered_map<int, int>{{10, 4}, {20, 4}, {40, 2}, {50, 2}, {30, 1}}));
assert((func0({1, 2, 3, 4, 3, 2, 4, 1, 3, 1, 4}) == std::unordered_map<int, int>{{1, 3}, {2, 2}, {3, 3}, {4, 3}}));
assert((func0({5, 6, 7, 4, 9... | O0 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x48,%rsp
mov %rdi,-0x48(%rbp)
mov %rsi,-0x50(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x48(%rbp),%rax
mov %rax,%rdi
callq 1fec <_ZNSt13unordered_mapIiiSt4hashIiESt... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 48h
mov [rbp+var_48], rdi
mov [rbp+var_50], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_48]
mov rdi, rax
call _ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIK... | long long func0(long long a1, long long a2)
{
_DWORD *v2; // rax
int v4; // [rsp+1Ch] [rbp-34h] BYREF
long long v5; // [rsp+20h] [rbp-30h] BYREF
_QWORD v6[4]; // [rsp+28h] [rbp-28h] BYREF
v6[2] = __readfsqword(0x28u);
std::unordered_map<int,int>::unordered_map(a1);
v6[1] = a2;
v5 = std::vector<int>::b... | 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 0x00101ef0
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x20],RAX
MO... | /* func0(std::vector<int, std::allocator<int> > const&) */
vector * func0(vector *param_1)
{
bool bVar1;
int *piVar2;
vector<int,std::allocator<int>> *in_RSI;
long in_FS_OFFSET;
int local_3c;
int8 local_38;
int8 local_30;
vector<int,std::allocator<int>> *local_28;
long local_20;
local_20 = *(lo... |
349 | func0 |
#include <iostream>
#include <unordered_map>
#include <vector>
#include <assert.h>
| std::unordered_map<int, int> func0(const std::vector<int>& list1) {
std::unordered_map<int, int> freq_count_map;
for (int element : list1) {
freq_count_map[element]++;
}
return freq_count_map;
}
| int main() {
assert((func0({10, 10, 10, 10, 20, 20, 20, 20, 40, 40, 50, 50, 30}) == std::unordered_map<int, int>{{10, 4}, {20, 4}, {40, 2}, {50, 2}, {30, 1}}));
assert((func0({1, 2, 3, 4, 3, 2, 4, 1, 3, 1, 4}) == std::unordered_map<int, int>{{1, 3}, {2, 2}, {3, 3}, {4, 3}}));
assert((func0({5, 6, 7, 4, 9... | O1 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x28,%rsp
mov %rdi,%r12
mov %fs:0x28,%rax
mov %rax,0x18(%rsp)
xor %eax,%eax
lea 0x30(%rdi),%rax
mov %rax,(%rdi)
movq $0x1,0x8(%rdi)
movq $0x0,0x10(%rdi)
mov... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push r13
push r12
push rbp
push rbx
sub rsp, 18h
mov rbp, rdi
mov rax, fs:28h
mov [rsp+38h+var_30], rax
xor eax, eax
lea rax, [rdi+30h]
mov [rdi], rax
mov qword ptr [rdi+8], 1
mov qword ptr [rdi+10h], 0
mov qword ptr [rdi+18h], 0
m... | long long func0(long long a1, int **a2)
{
int *v2; // rbx
int *v3; // r12
_DWORD *v4; // rax
int v6; // [rsp+4h] [rbp-34h] BYREF
unsigned long long v7; // [rsp+8h] [rbp-30h]
v7 = __readfsqword(0x28u);
*(_QWORD *)a1 = a1 + 48;
*(_QWORD *)(a1 + 8) = 1LL;
*(_QWORD *)(a1 + 16) = 0LL;
*(_QWORD *)(a1 + ... | func0:
ENDBR64
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
LEA RAX,[RDI + 0x30]
MOV qword ptr [RDI],RAX
MOV qword ptr [RDI + 0x8],0x1
MOV qword ptr [RDI + 0x10],0x0
MOV qword ptr [RDI + 0x18],0x0
MOV dword ptr [RDI + 0x20],0x3f800000... | /* func0(std::vector<int, std::allocator<int> > const&) */
vector * func0(vector *param_1)
{
int *piVar1;
int *piVar2;
int *piVar3;
int8 *in_RSI;
long in_FS_OFFSET;
int local_34;
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
*(vector **)param_1 = param_1 + 0x30;
*(int8 *)(param_1 + ... |
350 | func0 |
#include <iostream>
#include <unordered_map>
#include <vector>
#include <assert.h>
| std::unordered_map<int, int> func0(const std::vector<int>& list1) {
std::unordered_map<int, int> freq_count_map;
for (int element : list1) {
freq_count_map[element]++;
}
return freq_count_map;
}
| int main() {
assert((func0({10, 10, 10, 10, 20, 20, 20, 20, 40, 40, 50, 50, 30}) == std::unordered_map<int, int>{{10, 4}, {20, 4}, {40, 2}, {50, 2}, {30, 1}}));
assert((func0({1, 2, 3, 4, 3, 2, 4, 1, 3, 1, 4}) == std::unordered_map<int, int>{{1, 3}, {2, 2}, {3, 3}, {4, 3}}));
assert((func0({5, 6, 7, 4, 9... | O2 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
mov %rdi,%r12
add $0x30,%rdi
push %rbp
push %rbx
sub $0x8,%rsp
mov (%rsi),%rbx
mov 0x8(%rsi),%r14
mov %rdi,(%r12)
movq $0x1,0x8(%r12)
movq $0x0,0x10(%r12)
movq $0x0,0x18(%r12)
movl ... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push r13
push r12
push rbp
mov rbp, rdi
push rbx
sub rsp, 18h
mov rbx, [rsi]
mov r12, [rsi+8]
mov rax, fs:28h
mov [rsp+38h+var_30], rax
xor eax, eax
lea rax, [rdi+30h]
mov qword ptr [rdi+8], 1
mov [rdi], rax
mov qword ptr [rdi+... | long long func0(long long a1, int **a2)
{
int *v2; // rbx
int *v3; // r12
_DWORD *v4; // rax
int v6; // [rsp+4h] [rbp-34h] BYREF
unsigned long long v7; // [rsp+8h] [rbp-30h]
v2 = *a2;
v3 = a2[1];
v7 = __readfsqword(0x28u);
*(_QWORD *)(a1 + 8) = 1LL;
*(_QWORD *)a1 = a1 + 48;
*(_QWORD *)(a1 + 16) ... | func0:
ENDBR64
PUSH R13
PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
SUB RSP,0x18
MOV RBX,qword ptr [RSI]
MOV R12,qword ptr [RSI + 0x8]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
LEA RAX,[RDI + 0x30]
MOV qword ptr [RDI + 0x8],0x1
MOV qword ptr [RDI],RAX
MOV qword ptr [RDI + 0x10],0x0
MOV qword ptr ... | /* func0(std::vector<int, std::allocator<int> > const&) */
vector * func0(vector *param_1)
{
int *piVar1;
int *piVar2;
int *piVar3;
int8 *in_RSI;
long in_FS_OFFSET;
int local_34;
long local_30;
piVar3 = (int *)*in_RSI;
piVar1 = (int *)in_RSI[1];
local_30 = *(long *)(in_FS_OFFSET + 0x28);
*(in... |
351 | func0 |
#include <iostream>
#include <unordered_map>
#include <vector>
#include <assert.h>
| std::unordered_map<int, int> func0(const std::vector<int>& list1) {
std::unordered_map<int, int> freq_count_map;
for (int element : list1) {
freq_count_map[element]++;
}
return freq_count_map;
}
| int main() {
assert((func0({10, 10, 10, 10, 20, 20, 20, 20, 40, 40, 50, 50, 30}) == std::unordered_map<int, int>{{10, 4}, {20, 4}, {40, 2}, {50, 2}, {30, 1}}));
assert((func0({1, 2, 3, 4, 3, 2, 4, 1, 3, 1, 4}) == std::unordered_map<int, int>{{1, 3}, {2, 2}, {3, 3}, {4, 3}}));
assert((func0({5, 6, 7, 4, 9... | O3 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %r15
lea 0x30(%rdi),%rcx
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x8,%rsp
mov (%rsi),%rbx
mov 0x8(%rsi),%r15
mov %rcx,(%rdi)
movq $0x1,0x8(%rdi)
movq $0x0,0x10(%rdi)
movq $0x0,0x18(%rdi)
m... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push r15
lea rcx, [rdi+30h]
push r14
push r13
push r12
mov r12, rdi
push rbp
push rbx
sub rsp, 18h
mov rax, [rsi+8]
mov rbp, [rsi]
mov [rdi], rcx
mov qword ptr [rdi+8], 1
mov qword ptr [rdi+10h], 0
mov qword ptr [rdi+18h], 0
mov ... | long long * func0(long long *a1, int **a2)
{
long long *v2; // rcx
int *v4; // rax
int *v5; // rbp
unsigned long long v6; // rdi
unsigned long long v7; // r14
int v8; // ebx
long long **v9; // r8
unsigned long long v10; // r13
long long *v11; // rax
int v12; // ecx
long long v13; // rax
long lon... | func0:
ENDBR64
PUSH R15
LEA RCX,[RDI + 0x30]
PUSH R14
PUSH R13
PUSH R12
MOV R12,RDI
PUSH RBP
PUSH RBX
SUB RSP,0x18
MOV RAX,qword ptr [RSI + 0x8]
MOV RBP,qword ptr [RSI]
MOV qword ptr [RDI],RCX
MOV qword ptr [RDI + 0x8],0x1
MOV qword ptr [RDI + 0x10],0x0
MOV qword ptr [RDI + 0x18],0x0
MOV dword ptr [RDI + 0x20],0x3f8000... | /* func0(std::vector<int, std::allocator<int> > const&) */
vector * func0(vector *param_1)
{
int *piVar1;
int iVar2;
int iVar3;
int *piVar4;
long *plVar5;
long *plVar6;
long *plVar7;
int8 *puVar8;
long lVar9;
vector *pvVar10;
ulong uVar11;
int *piVar12;
int8 *in_RSI;
ulong uVar13;
pvV... |
352 | func0 |
#include <assert.h>
| int func0(int N) {
return N - 1;
}
| int main() {
assert(func0(11) == 10);
assert(func0(7) == 6);
assert(func0(12) == 11);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x4(%rbp)
mov -0x4(%rbp),%eax
sub $0x1,%eax
pop %rbp
retq
| _Z5func0i:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_4], edi
mov eax, [rbp+var_4]
sub eax, 1
pop rbp
retn | long long func0(int a1)
{
return (unsigned int)(a1 - 1);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x4],EDI
MOV EAX,dword ptr [RBP + -0x4]
SUB EAX,0x1
POP RBP
RET | /* func0(int) */
int func0(int param_1)
{
return param_1 + -1;
} |
353 | func0 |
#include <assert.h>
| int func0(int N) {
return N - 1;
}
| int main() {
assert(func0(11) == 10);
assert(func0(7) == 6);
assert(func0(12) == 11);
return 0;
}
| O1 | cpp | func0(int):
endbr64
lea -0x1(%rdi),%eax
retq
| _Z5func0i:
endbr64
lea eax, [rdi-1]
retn | long long func0(int a1)
{
return (unsigned int)(a1 - 1);
} | func0:
ENDBR64
LEA EAX,[RDI + -0x1]
RET | /* func0(int) */
int func0(int param_1)
{
return param_1 + -1;
} |
354 | func0 |
#include <assert.h>
| int func0(int N) {
return N - 1;
}
| int main() {
assert(func0(11) == 10);
assert(func0(7) == 6);
assert(func0(12) == 11);
return 0;
}
| O2 | cpp | func0(int):
endbr64
lea -0x1(%rdi),%eax
retq
nopl 0x0(%rax,%rax,1)
| _Z5func0i:
endbr64
lea eax, [rdi-1]
retn | long long func0(int a1)
{
return (unsigned int)(a1 - 1);
} | func0:
ENDBR64
LEA EAX,[RDI + -0x1]
RET | /* func0(int) */
int func0(int param_1)
{
return param_1 + -1;
} |
355 | func0 |
#include <assert.h>
| int func0(int N) {
return N - 1;
}
| int main() {
assert(func0(11) == 10);
assert(func0(7) == 6);
assert(func0(12) == 11);
return 0;
}
| O3 | cpp | func0(int):
endbr64
lea -0x1(%rdi),%eax
retq
nopl 0x0(%rax,%rax,1)
| _Z5func0i:
endbr64
lea eax, [rdi-1]
retn | long long func0(int a1)
{
return (unsigned int)(a1 - 1);
} | func0:
ENDBR64
LEA EAX,[RDI + -0x1]
RET | /* func0(int) */
int func0(int param_1)
{
return param_1 + -1;
} |
356 | func0 |
#include <iostream>
#include <string>
#include <vector>
#include <assert.h>
| int func0(const std::vector<std::string>& list1) {
size_t max = list1[0].size();
for (const auto& i : list1) {
if (i.size() > max) {
max = i.size();
}
}
return max;
}
| int main() {
assert(func0({"python","PHP","bigdata"}) == 7);
assert(func0({"a","ab","abc"}) == 3);
assert(func0({"small","big","tall"}) == 5);
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&):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x40,%rsp
mov %rdi,-0x38(%rbp)
mov %fs:0x28,%rax
mov %rax,-... | _Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE:
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 rax, [rbp+var_38]
mov esi, 0
mov rdi, rax
call _ZNKSt6vectorINSt7__cxx1112bas... | unsigned long long func0(long long a1)
{
long long v1; // rax
unsigned long long v2; // rax
long long v4; // [rsp+10h] [rbp-30h] BYREF
long long v5; // [rsp+18h] [rbp-28h] BYREF
unsigned long long v6; // [rsp+20h] [rbp-20h]
long long v7; // [rsp+28h] [rbp-18h]
long long v8; // [rsp+30h] [rbp-10h]
unsig... | 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 RAX,qword ptr [RBP + -0x38]
MOV ESI,0x0
MOV RDI,RAX
CALL 0x001028b8
MOV RDI,RAX
CALL 0x00102230
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV ... | /* func0(std::vector<std::string, std::allocator<std::string > > const&) */
ulong func0(vector *param_1)
{
bool bVar1;
ulong uVar2;
long in_FS_OFFSET;
int8 local_38;
int8 local_30;
ulong local_28;
vector<std::string,std::allocator<std::string>> *local_20;
int8 local_18;
long local_10;
local_10 ... |
357 | func0 |
#include <iostream>
#include <string>
#include <vector>
#include <assert.h>
| int func0(const std::vector<std::string>& list1) {
size_t max = list1[0].size();
for (const auto& i : list1) {
if (i.size() > max) {
max = i.size();
}
}
return max;
}
| int main() {
assert(func0({"python","PHP","bigdata"}) == 7);
assert(func0({"a","ab","abc"}) == 3);
assert(func0({"small","big","tall"}) == 5);
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&):
endbr64
mov (%rdi),%rdx
mov 0x8(%rdx),%rax
mov 0x8(%rdi),%rsi
cmp %rsi,%rdx
je 1311 <_Z5func0RKSt... | _Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE:
endbr64
mov rdx, [rdi]
mov rax, [rdx+8]
mov rsi, [rdi+8]
cmp rsi, rdx
jz short locret_1311
loc_12FD:
mov rcx, [rdx+8]
cmp rax, rcx
cmovb rax, rcx
add rdx, 20h ; ' '
cmp rsi, rdx
jnz short loc_12F... | unsigned long long func0(_QWORD *a1)
{
long long v1; // rdx
unsigned long long result; // rax
long long v3; // rsi
v1 = *a1;
result = *(_QWORD *)(*a1 + 8LL);
v3 = a1[1];
if ( v3 != *a1 )
{
do
{
if ( result < *(_QWORD *)(v1 + 8) )
result = *(_QWORD *)(v1 + 8);
v1 += 32LL;
... | func0:
ENDBR64
MOV RDX,qword ptr [RDI]
MOV RAX,qword ptr [RDX + 0x8]
MOV RSI,qword ptr [RDI + 0x8]
CMP RSI,RDX
JZ 0x00101311
LAB_001012fd:
MOV RCX,qword ptr [RDX + 0x8]
CMP RAX,RCX
CMOVC RAX,RCX
ADD RDX,0x20
CMP RSI,RDX
JNZ 0x001012fd
LAB_00101311:
RET | /* func0(std::vector<std::string, std::allocator<std::string > > const&) */
void func0(vector *param_1)
{
ulong uVar1;
long lVar2;
lVar2 = *(long *)param_1;
uVar1 = *(ulong *)(lVar2 + 8);
for (; *(long *)(param_1 + 8) != lVar2; lVar2 = lVar2 + 0x20) {
if (uVar1 < *(ulong *)(lVar2 + 8)) {
uVar1 ... |
358 | func0 |
#include <iostream>
#include <string>
#include <vector>
#include <assert.h>
| int func0(const std::vector<std::string>& list1) {
size_t max = list1[0].size();
for (const auto& i : list1) {
if (i.size() > max) {
max = i.size();
}
}
return max;
}
| int main() {
assert(func0({"python","PHP","bigdata"}) == 7);
assert(func0({"a","ab","abc"}) == 3);
assert(func0({"small","big","tall"}) == 5);
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&):
endbr64
mov (%rdi),%rdx
mov 0x8(%rdi),%rsi
mov 0x8(%rdx),%rax
cmp %rsi,%rdx
je 1724 <_Z5func0RKSt... | _Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE:
endbr64
mov rdx, [rdi]
mov rsi, [rdi+8]
mov rax, [rdx+8]
cmp rsi, rdx
jz short locret_15D7
mov rcx, rsi
sub rcx, rdx
and ecx, 20h
jz short loc_15B8
mov rcx, [rdx+8]
cmp rax, rcx
cmovb rax, r... | unsigned long long func0(_QWORD *a1)
{
long long v1; // rdx
long long v2; // rsi
unsigned long long result; // rax
v1 = *a1;
v2 = a1[1];
result = *(_QWORD *)(*a1 + 8LL);
if ( v2 != *a1 )
{
if ( (((_BYTE)v2 - (_BYTE)v1) & 0x20) == 0 )
goto LABEL_13;
if ( result < *(_QWORD *)(v1 + 8) )
... | func0:
ENDBR64
MOV RDX,qword ptr [RDI]
MOV RSI,qword ptr [RDI + 0x8]
MOV RAX,qword ptr [RDX + 0x8]
CMP RSI,RDX
JZ 0x001015d7
MOV RCX,RSI
SUB RCX,RDX
AND ECX,0x20
JZ 0x001015b8
MOV RCX,qword ptr [RDX + 0x8]
CMP RAX,RCX
CMOVC RAX,RCX
ADD RDX,0x20
CMP RSI,RDX
JZ 0x001015d8
NOP dword ptr [RAX + RAX*0x1]
LAB_001015b8:
MOV R... | /* func0(std::vector<std::string, std::allocator<std::string > > const&) */
void func0(vector *param_1)
{
long lVar1;
ulong uVar2;
long lVar3;
lVar3 = *(long *)param_1;
lVar1 = *(long *)(param_1 + 8);
uVar2 = *(ulong *)(lVar3 + 8);
if (lVar1 != lVar3) {
if (((int)lVar1 - (int)lVar3 & 0x20U) != 0)... |
359 | func0 |
#include <iostream>
#include <string>
#include <vector>
#include <assert.h>
| int func0(const std::vector<std::string>& list1) {
size_t max = list1[0].size();
for (const auto& i : list1) {
if (i.size() > max) {
max = i.size();
}
}
return max;
}
| int main() {
assert(func0({"python","PHP","bigdata"}) == 7);
assert(func0({"a","ab","abc"}) == 3);
assert(func0({"small","big","tall"}) == 5);
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&):
endbr64
mov (%rdi),%rdx
mov 0x8(%rdi),%rsi
mov 0x8(%rdx),%rax
cmp %rsi,%rdx
je 17cc <_Z5func0RKSt... | _Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE:
endbr64
mov rdx, [rdi]
mov rsi, [rdi+8]
mov rax, [rdx+8]
cmp rsi, rdx
jz short locret_15D7
mov rcx, rsi
sub rcx, rdx
and ecx, 20h
jz short loc_15B8
mov rcx, [rdx+8]
cmp rax, rcx
cmovb rax, r... | unsigned long long func0(_QWORD *a1)
{
long long v1; // rdx
long long v2; // rsi
unsigned long long result; // rax
v1 = *a1;
v2 = a1[1];
result = *(_QWORD *)(*a1 + 8LL);
if ( v2 != *a1 )
{
if ( (((_BYTE)v2 - (_BYTE)v1) & 0x20) == 0 )
goto LABEL_13;
if ( result < *(_QWORD *)(v1 + 8) )
... | func0:
ENDBR64
MOV RDX,qword ptr [RDI]
MOV RSI,qword ptr [RDI + 0x8]
MOV RAX,qword ptr [RDX + 0x8]
CMP RSI,RDX
JZ 0x001015d7
MOV RCX,RSI
SUB RCX,RDX
AND ECX,0x20
JZ 0x001015b8
MOV RCX,qword ptr [RDX + 0x8]
CMP RAX,RCX
CMOVC RAX,RCX
ADD RDX,0x20
CMP RSI,RDX
JZ 0x001015d8
NOP dword ptr [RAX + RAX*0x1]
LAB_001015b8:
MOV R... | /* func0(std::vector<std::string, std::allocator<std::string > > const&) */
void func0(vector *param_1)
{
long lVar1;
ulong uVar2;
long lVar3;
lVar3 = *(long *)param_1;
lVar1 = *(long *)(param_1 + 8);
uVar2 = *(ulong *)(lVar3 + 8);
if (lVar1 != lVar3) {
if (((int)lVar1 - (int)lVar3 & 0x20U) != 0)... |
360 | func0 |
#include <iostream>
#include <vector>
#include <string>
#include <assert.h>
| bool func0(const std::vector<std::string>& str1, const std::string& sub_str) {
for (const auto& s : str1) {
if (s.find(sub_str) != std::string::npos) {
return true;
}
}
return false;
}
| int main() {
assert(func0({"red", "black", "white", "green", "orange"}, "ack") == true);
assert(func0({"red", "black", "white", "green", "orange"}, "abc") == false);
assert(func0({"red", "black", "white", "green", "orange"}, "ange") == true);
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
sub rsp, 40h
mov [rbp+var_38], rdi
mov [rbp+var_40], rsi
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
mov rax, [rbp+var_38]
mov [rbp+var_18], rax
mov rax, ... | long long func0(long long a1, long long a2)
{
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);
v4[1] = a1;
v3 = std::vector<std::string>::begin(a1);
v4[0] =... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x38],RDI
MOV qword ptr [RBP + -0x40],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,RAX
CALL 0x00102a7c
MOV qword pt... | /* func0(std::vector<std::string, std::allocator<std::string > > const&, std::string const&) */
int8 func0(vector *param_1,string *param_2)
{
bool bVar1;
long lVar2;
int8 uVar3;
long in_FS_OFFSET;
int8 local_30;
int8 local_28;
vector<std::string,std::allocator<std::string>> *local_20;
string *local_18... |
361 | func0 |
#include <iostream>
#include <vector>
#include <string>
#include <assert.h>
| bool func0(const std::vector<std::string>& str1, const std::string& sub_str) {
for (const auto& s : str1) {
if (s.find(sub_str) != std::string::npos) {
return true;
}
}
return false;
}
| int main() {
assert(func0({"red", "black", "white", "green", "orange"}, "ack") == true);
assert(func0({"red", "black", "white", "green", "orange"}, "abc") == false);
assert(func0({"red", "black", "white", "green", "orange"}, "ange") == true);
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 %r12
push ... | _Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERKS5_:
endbr64
push r12
push rbp
push rbx
mov rbp, rsi
mov rbx, [rdi]
mov r12, [rdi+8]
cmp r12, rbx
jz short loc_134B
loc_1320:
mov rcx, [rbp+8]
mov rsi, [rbp+0]
mov edx, 0
mov rdi, rbx
call ... | long long func0(long long *a1, _QWORD *a2)
{
long long v2; // rbx
long long v3; // r12
v2 = *a1;
v3 = a1[1];
if ( v3 == *a1 )
return 0LL;
while ( std::string::find(v2, *a2, 0LL, a2[1]) == -1 )
{
v2 += 32LL;
if ( v3 == v2 )
return 0LL;
}
return 1LL;
} | func0:
ENDBR64
PUSH R12
PUSH RBP
PUSH RBX
MOV RBP,RSI
MOV RBX,qword ptr [RDI]
MOV R12,qword ptr [RDI + 0x8]
CMP R12,RBX
JZ 0x0010134b
LAB_00101320:
MOV RCX,qword ptr [RBP + 0x8]
MOV RSI,qword ptr [RBP]
MOV EDX,0x0
MOV RDI,RBX
CALL 0x001011f0
CMP RAX,-0x1
JNZ 0x00101352
ADD RBX,0x20
CMP R12,RBX
JNZ 0x00101320
MOV EAX,0x... | /* func0(std::vector<std::string, std::allocator<std::string > > const&, std::string const&) */
int8 func0(vector *param_1,string *param_2)
{
char *pcVar1;
long lVar2;
char *pcVar3;
pcVar3 = *(char **)param_1;
pcVar1 = *(char **)(param_1 + 8);
while( true ) {
if (pcVar1 == pcVar3) {
return 0;... |
362 | func0 |
#include <iostream>
#include <vector>
#include <string>
#include <assert.h>
| bool func0(const std::vector<std::string>& str1, const std::string& sub_str) {
for (const auto& s : str1) {
if (s.find(sub_str) != std::string::npos) {
return true;
}
}
return false;
}
| int main() {
assert(func0({"red", "black", "white", "green", "orange"}, "ack") == true);
assert(func0({"red", "black", "white", "green", "orange"}, "abc") == false);
assert(func0({"red", "black", "white", "green", "orange"}, "ange") == true);
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 %r12
push ... | _Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERKS5_:
endbr64
push r12
push rbp
push rbx
mov rbx, [rdi]
mov r12, [rdi+8]
cmp r12, rbx
jz short loc_1610
mov rbp, rsi
jmp short loc_15E9
loc_15E0:
add rbx, 20h ; ' '
cmp r12, rbx
jz short loc_1... | long long func0(long long *a1, _QWORD *a2)
{
long long v2; // rbx
long long v3; // r12
v2 = *a1;
v3 = a1[1];
if ( v3 == *a1 )
return 0LL;
while ( std::string::find(v2, *a2, 0LL, a2[1]) == -1 )
{
v2 += 32LL;
if ( v3 == v2 )
return 0LL;
}
return 1LL;
} | func0:
ENDBR64
PUSH R12
PUSH RBP
PUSH RBX
MOV RBX,qword ptr [RDI]
MOV R12,qword ptr [RDI + 0x8]
CMP R12,RBX
JZ 0x00101610
MOV RBP,RSI
JMP 0x001015e9
LAB_001015e0:
ADD RBX,0x20
CMP R12,RBX
JZ 0x00101610
LAB_001015e9:
MOV RCX,qword ptr [RBP + 0x8]
MOV RSI,qword ptr [RBP]
XOR EDX,EDX
MOV RDI,RBX
CALL 0x001011f0
CMP RAX,-0... | /* func0(std::vector<std::string, std::allocator<std::string > > const&, std::string const&) */
int8 func0(vector *param_1,string *param_2)
{
char *pcVar1;
long lVar2;
char *pcVar3;
pcVar3 = *(char **)param_1;
pcVar1 = *(char **)(param_1 + 8);
while( true ) {
if (pcVar1 == pcVar3) {
return 0;... |
363 | func0 |
#include <iostream>
#include <vector>
#include <string>
#include <assert.h>
| bool func0(const std::vector<std::string>& str1, const std::string& sub_str) {
for (const auto& s : str1) {
if (s.find(sub_str) != std::string::npos) {
return true;
}
}
return false;
}
| int main() {
assert(func0({"red", "black", "white", "green", "orange"}, "ack") == true);
assert(func0({"red", "black", "white", "green", "orange"}, "abc") == false);
assert(func0({"red", "black", "white", "green", "orange"}, "ange") == true);
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 %r12
push ... | _Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERKS5_:
endbr64
push r12
push rbp
push rbx
mov rbx, [rdi]
mov r12, [rdi+8]
cmp r12, rbx
jz short loc_16C0
mov rbp, rsi
jmp short loc_1699
loc_1690:
add rbx, 20h ; ' '
cmp r12, rbx
jz short loc_1... | long long func0(long long *a1, _QWORD *a2)
{
long long v2; // rbx
long long v3; // r12
v2 = *a1;
v3 = a1[1];
if ( v3 == *a1 )
return 0LL;
while ( std::string::find(v2, *a2, 0LL, a2[1]) == -1 )
{
v2 += 32LL;
if ( v3 == v2 )
return 0LL;
}
return 1LL;
} | func0:
ENDBR64
PUSH R12
PUSH RBP
PUSH RBX
MOV RBX,qword ptr [RDI]
MOV R12,qword ptr [RDI + 0x8]
CMP R12,RBX
JZ 0x001016c0
MOV RBP,RSI
JMP 0x00101699
LAB_00101690:
ADD RBX,0x20
CMP R12,RBX
JZ 0x001016c0
LAB_00101699:
MOV RCX,qword ptr [RBP + 0x8]
MOV RSI,qword ptr [RBP]
XOR EDX,EDX
MOV RDI,RBX
CALL 0x001011f0
CMP RAX,-0... | /* func0(std::vector<std::string, std::allocator<std::string > > const&, std::string const&) */
int8 func0(vector *param_1,string *param_2)
{
char *pcVar1;
long lVar2;
char *pcVar3;
pcVar3 = *(char **)param_1;
pcVar1 = *(char **)(param_1 + 8);
while( true ) {
if (pcVar1 == pcVar3) {
return 0;... |
364 | func0 |
#include <string>
#include <assert.h>
| bool func0(const std::string& n) {
if (n.length() <= 2) {
return false;
}
for (size_t i = 2; i < n.length(); i++) {
if (n[i - 2] != n[i]) {
return false;
}
}
return true;
}
| int main() {
assert(func0("1212121") == true);
assert(func0("1991") == false);
assert(func0("121") == true);
return 0;
}
| O0 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x28,%rsp
mov %rdi,-0x28(%rbp)
mov -0x28(%rbp),%rax
mov %rax,%rdi
callq 12a0 <_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv@plt>
cmp $0x2... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 28h
mov [rbp+var_28], rdi
mov rax, [rbp+var_28]
mov rdi, rax
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv; std::string::length(void)
cmp rax, 2
setbe ... | long long func0(long long a1)
{
char v2; // bl
unsigned long long i; // [rsp+18h] [rbp-18h]
if ( (unsigned long long)std::string::length(a1) <= 2 )
return 0LL;
for ( i = 2LL; i < std::string::length(a1); ++i )
{
v2 = *(_BYTE *)std::string::operator[](a1, i - 2);
if ( v2 != *(_BYTE *)std::string:... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x28
MOV qword ptr [RBP + -0x28],RDI
MOV RAX,qword ptr [RBP + -0x28]
MOV RDI,RAX
CALL 0x00101220
CMP RAX,0x2
SETBE AL
TEST AL,AL
JZ 0x00101378
MOV EAX,0x0
JMP 0x001013e3
LAB_00101378:
MOV qword ptr [RBP + -0x18],0x2
JMP 0x001013c7
LAB_00101382:
MOV RAX,qword ptr [RBP... | /* func0(std::string const&) */
int8 func0(string *param_1)
{
char cVar1;
ulong uVar2;
int8 uVar3;
char *pcVar4;
ulong local_20;
uVar2 = std::string::length();
if (uVar2 < 3) {
uVar3 = 0;
}
else {
for (local_20 = 2; uVar2 = std::string::length(), local_20 < uVar2; local_20 = local_20 + 1)... |
365 | func0 |
#include <string>
#include <assert.h>
| bool func0(const std::string& n) {
if (n.length() <= 2) {
return false;
}
for (size_t i = 2; i < n.length(); i++) {
if (n[i - 2] != n[i]) {
return false;
}
}
return true;
}
| int main() {
assert(func0("1212121") == true);
assert(func0("1991") == false);
assert(func0("121") == true);
return 0;
}
| O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
mov 0x8(%rdi),%rdx
mov $0x0,%eax
cmp $0x2,%rdx
jbe 1220 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x37>
mov (%rdi),%rax
lea -0x2(%rax,%rdx,1),%rdx
movzbl 0x2(%rax),%ecx
cmp %... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
mov rdx, [rdi+8]
mov eax, 0
cmp rdx, 2
jbe short locret_1240
mov rax, [rdi]
lea rdx, [rax+rdx-2]
loc_1224:
movzx ecx, byte ptr [rax+2]
cmp [rax], cl
jnz short loc_123B
add rax, 1
cmp rax, rdx
jnz short ... | long long func0(long long a1)
{
unsigned long long v1; // rdx
long long result; // rax
_BYTE *v3; // rax
long long v4; // rdx
v1 = *(_QWORD *)(a1 + 8);
result = 0LL;
if ( v1 > 2 )
{
v3 = *(_BYTE **)a1;
v4 = *(_QWORD *)a1 + v1 - 2;
while ( *v3 == v3[2] )
{
if ( ++v3 == (_BYTE *)v4... | func0:
ENDBR64
MOV RDX,qword ptr [RDI + 0x8]
MOV EAX,0x0
CMP RDX,0x2
JBE 0x00101240
MOV RAX,qword ptr [RDI]
LEA RDX,[RAX + RDX*0x1 + -0x2]
LAB_00101224:
MOVZX ECX,byte ptr [RAX + 0x2]
CMP byte ptr [RAX],CL
JNZ 0x0010123b
ADD RAX,0x1
CMP RAX,RDX
JNZ 0x00101224
MOV EAX,0x1
RET
LAB_0010123b:
MOV EAX,0x0
LAB_00101240:
RET | /* func0(std::string const&) */
int8 func0(string *param_1)
{
char *pcVar1;
char *pcVar2;
if (2 < *(ulong *)(param_1 + 8)) {
pcVar2 = *(char **)param_1;
pcVar1 = pcVar2 + (*(ulong *)(param_1 + 8) - 2);
while (*pcVar2 == pcVar2[2]) {
pcVar2 = pcVar2 + 1;
if (pcVar2 == pcVar1) {
... |
366 | func0 |
#include <string>
#include <assert.h>
| bool func0(const std::string& n) {
if (n.length() <= 2) {
return false;
}
for (size_t i = 2; i < n.length(); i++) {
if (n[i - 2] != n[i]) {
return false;
}
}
return true;
}
| int main() {
assert(func0("1212121") == true);
assert(func0("1991") == false);
assert(func0("121") == true);
return 0;
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
mov 0x8(%rdi),%rdx
xor %eax,%eax
cmp $0x2,%rdx
jbe 13f2 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x42>
mov (%rdi),%rax
lea -0x2(%rdx,%rax,1),%rdx
nopl 0x0(%rax,%rax,1)
movzbl... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
mov rsi, [rdi+8]
xor eax, eax
cmp rsi, 2
jbe short locret_136E
mov rdi, [rdi]
movzx ecx, byte ptr [rdi]
movzx edx, byte ptr [rdi+1]
lea rax, [rdi+2]
add rdi, rsi
jmp short loc_1363
loc_1358:
add rax, 1
mov ... | long long func0(long long a1)
{
unsigned long long v1; // rsi
long long result; // rax
char *v3; // rdi
char v4; // cl
char v5; // dl
char *v6; // rax
char *v7; // rdi
char v8; // si
v1 = *(_QWORD *)(a1 + 8);
result = 0LL;
if ( v1 > 2 )
{
v3 = *(char **)a1;
v4 = *v3;
v5 = v3[1];
... | func0:
ENDBR64
MOV RSI,qword ptr [RDI + 0x8]
XOR EAX,EAX
CMP RSI,0x2
JBE 0x0010136e
MOV RDI,qword ptr [RDI]
MOVZX ECX,byte ptr [RDI]
MOVZX EDX,byte ptr [RDI + 0x1]
LEA RAX,[RDI + 0x2]
ADD RDI,RSI
JMP 0x00101363
LAB_00101358:
ADD RAX,0x1
MOV ECX,ESI
CMP RAX,RDI
JZ 0x00101370
LAB_00101363:
MOV ESI,EDX
MOVZX EDX,byte ptr ... | /* func0(std::string const&) */
int8 func0(string *param_1)
{
char cVar1;
char *pcVar2;
char *pcVar3;
char cVar4;
char cVar5;
if (2 < *(ulong *)(param_1 + 8)) {
pcVar2 = *(char **)param_1;
pcVar3 = pcVar2 + 2;
cVar4 = *pcVar2;
cVar5 = pcVar2[1];
while (cVar1 = *pcVar3, cVar1 == cVar... |
367 | func0 |
#include <string>
#include <assert.h>
| bool func0(const std::string& n) {
if (n.length() <= 2) {
return false;
}
for (size_t i = 2; i < n.length(); i++) {
if (n[i - 2] != n[i]) {
return false;
}
}
return true;
}
| int main() {
assert(func0("1212121") == true);
assert(func0("1991") == false);
assert(func0("121") == true);
return 0;
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
mov 0x8(%rdi),%rsi
xor %eax,%eax
cmp $0x2,%rsi
jbe 141a <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x4a>
mov (%rdi),%rdi
movzbl (%rdi),%edx
movzbl 0x1(%rdi),%ecx
lea 0x2(%rdi),%r... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
mov rsi, [rdi+8]
xor eax, eax
cmp rsi, 2
jbe short locret_13EE
mov rdi, [rdi]
movzx ecx, byte ptr [rdi]
movzx edx, byte ptr [rdi+1]
lea rax, [rdi+2]
add rdi, rsi
jmp short loc_13E3
loc_13D8:
add rax, 1
mov ... | long long func0(long long a1)
{
unsigned long long v1; // rsi
long long result; // rax
char *v3; // rdi
char v4; // cl
char v5; // dl
char *v6; // rax
char *v7; // rdi
char v8; // si
v1 = *(_QWORD *)(a1 + 8);
result = 0LL;
if ( v1 > 2 )
{
v3 = *(char **)a1;
v4 = *v3;
v5 = v3[1];
... | func0:
ENDBR64
MOV RSI,qword ptr [RDI + 0x8]
XOR EAX,EAX
CMP RSI,0x2
JBE 0x001013ee
MOV RDI,qword ptr [RDI]
MOVZX ECX,byte ptr [RDI]
MOVZX EDX,byte ptr [RDI + 0x1]
LEA RAX,[RDI + 0x2]
ADD RDI,RSI
JMP 0x001013e3
LAB_001013d8:
ADD RAX,0x1
MOV ECX,ESI
CMP RAX,RDI
JZ 0x001013f0
LAB_001013e3:
MOV ESI,EDX
MOVZX EDX,byte ptr ... | /* func0(std::string const&) */
int8 func0(string *param_1)
{
char cVar1;
char *pcVar2;
char *pcVar3;
char cVar4;
char cVar5;
if (2 < *(ulong *)(param_1 + 8)) {
pcVar2 = *(char **)param_1;
pcVar3 = pcVar2 + 2;
cVar4 = *pcVar2;
cVar5 = pcVar2[1];
while (cVar1 = *pcVar3, cVar1 == cVar... |
368 | func0 |
#include <assert.h>
| int func0(int a, int b) {
if (b == 0) {
return 1;
} else if (a == 0) {
return 0;
} else if (b == 1) {
return a;
} else {
return a * func0(a, b - 1);
}
}
| int main() {
assert(func0(3, 4) == 81);
assert(func0(2, 3) == 8);
assert(func0(5, 5) == 3125);
return 0;
}
| O0 | cpp | func0(int, int):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x10,%rsp
mov %edi,-0x4(%rbp)
mov %esi,-0x8(%rbp)
cmpl $0x0,-0x8(%rbp)
jne 1168 <_Z5func0ii+0x1f>
mov $0x1,%eax
jmp 1196 <_Z5func0ii+0x4d>
cmpl $0x0,-0x4(%rbp)
jne 1175 <_Z5func0ii+0x2c>
mov $0x0,%eax
jmp 1196 <_Z5func0ii+0x4d>
cm... | _Z5func0ii:
endbr64
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_4], edi
mov [rbp+var_8], esi
cmp [rbp+var_8], 0
jnz short loc_1168
mov eax, 1
jmp short locret_1196
loc_1168:
cmp [rbp+var_4], 0
jnz short loc_1175
mov eax, 0
jmp short locret_1196
loc_1175:
cmp [r... | long long func0(unsigned int a1, int a2)
{
if ( !a2 )
return 1LL;
if ( !a1 )
return 0LL;
if ( a2 == 1 )
return a1;
return a1 * (unsigned int)func0(a1, a2 - 1);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV dword ptr [RBP + -0x4],EDI
MOV dword ptr [RBP + -0x8],ESI
CMP dword ptr [RBP + -0x8],0x0
JNZ 0x00101168
MOV EAX,0x1
JMP 0x00101196
LAB_00101168:
CMP dword ptr [RBP + -0x4],0x0
JNZ 0x00101175
MOV EAX,0x0
JMP 0x00101196
LAB_00101175:
CMP dword ptr [RBP + -0x8],0x1
JNZ ... | /* func0(int, int) */
int func0(int param_1,int param_2)
{
int iVar1;
if (param_2 == 0) {
param_1 = 1;
}
else if (param_1 == 0) {
param_1 = 0;
}
else if (param_2 != 1) {
iVar1 = func0(param_1,param_2 + -1);
param_1 = iVar1 * param_1;
}
return param_1;
} |
369 | func0 |
#include <assert.h>
| int func0(int a, int b) {
if (b == 0) {
return 1;
} else if (a == 0) {
return 0;
} else if (b == 1) {
return a;
} else {
return a * func0(a, b - 1);
}
}
| int main() {
assert(func0(3, 4) == 81);
assert(func0(2, 3) == 8);
assert(func0(5, 5) == 3125);
return 0;
}
| O1 | cpp | func0(int, int):
endbr64
mov $0x1,%eax
test %esi,%esi
je 1171 <_Z5func0ii+0x28>
push %rbx
mov %edi,%ebx
mov %edi,%eax
test %edi,%edi
je 116f <_Z5func0ii+0x26>
cmp $0x1,%esi
je 116f <_Z5func0ii+0x26>
sub $0x1,%esi
callq 1149 <_Z5func0ii>
imul %ebx,%eax
pop %rbx
retq
retq
| _Z5func0ii:
endbr64
mov eax, 1
test esi, esi
jz short locret_1171
push rbx
mov ebx, edi
mov eax, edi
test edi, edi
jz short loc_116F
cmp esi, 1
jz short loc_116F
sub esi, 1; int
call _Z5func0ii; func0(int,int)
imul eax, ebx
loc_116F:
pop rbx
retn
locret_1171:
retn | long long func0(unsigned int a1, int a2)
{
long long result; // rax
result = 1LL;
if ( a2 )
{
result = a1;
if ( a1 )
{
if ( a2 != 1 )
return a1 * (unsigned int)func0(a1, a2 - 1);
}
}
return result;
} | func0:
ENDBR64
MOV EAX,0x1
TEST ESI,ESI
JZ 0x00101171
PUSH RBX
MOV EBX,EDI
MOV EAX,EDI
TEST EDI,EDI
JZ 0x0010116f
CMP ESI,0x1
JZ 0x0010116f
SUB ESI,0x1
CALL 0x00101149
IMUL EAX,EBX
LAB_0010116f:
POP RBX
RET
LAB_00101171:
RET | /* func0(int, int) */
int func0(int param_1,int param_2)
{
int iVar1;
if (param_2 != 0) {
if ((param_1 != 0) && (param_2 != 1)) {
iVar1 = func0(param_1,param_2 + -1);
param_1 = iVar1 * param_1;
}
return param_1;
}
return 1;
} |
370 | func0 |
#include <assert.h>
| int func0(int a, int b) {
if (b == 0) {
return 1;
} else if (a == 0) {
return 0;
} else if (b == 1) {
return a;
} else {
return a * func0(a, b - 1);
}
}
| int main() {
assert(func0(3, 4) == 81);
assert(func0(2, 3) == 8);
assert(func0(5, 5) == 3125);
return 0;
}
| O2 | cpp | func0(int, int):
endbr64
test %esi,%esi
je 1174 <_Z5func0ii+0x34>
test %edi,%edi
je 117a <_Z5func0ii+0x3a>
cmp $0x1,%esi
je 117d <_Z5func0ii+0x3d>
mov $0x1,%eax
jmp 1165 <_Z5func0ii+0x25>
nopl 0x0(%rax,%rax,1)
cmp $0x1,%esi
je 1170 <_Z5func0ii+0x30>
imul %edi,%eax
sub $0x1,%esi
jn... | _Z5func0ii:
endbr64
test esi, esi
jz short loc_1184
test edi, edi
jz short loc_118A
cmp esi, 1
jz short loc_118D
mov edx, 1
lea eax, [rsi-1]
test sil, 1
jnz short loc_1170
mov esi, eax
mov edx, edi
cmp eax, 1
jz short loc_117E
nop dword ptr [rax+rax+00000000h... | long long func0(unsigned int a1, int a2)
{
int v2; // edx
int v3; // eax
if ( !a2 )
return 1LL;
if ( !a1 )
return 0LL;
if ( a2 == 1 )
return a1;
v2 = 1;
v3 = a2 - 1;
if ( (a2 & 1) != 0 || (--a2, v2 = a1, v3 != 1) )
{
do
{
a2 -= 2;
v2 *= a1 * a1;
}
while ( a2 !... | func0:
ENDBR64
TEST ESI,ESI
JZ 0x00101184
TEST EDI,EDI
JZ 0x0010118a
CMP ESI,0x1
JZ 0x0010118d
MOV EDX,0x1
LEA EAX,[RSI + -0x1]
TEST SIL,0x1
JNZ 0x00101170
MOV ESI,EAX
MOV EDX,EDI
CMP EAX,0x1
JZ 0x0010117e
NOP dword ptr [RAX + RAX*0x1]
LAB_00101170:
IMUL EDX,EDI
SUB ESI,0x2
IMUL EDX,EDI
CMP ESI,0x1
JNZ 0x00101170
LAB_0... | /* func0(int, int) */
int func0(int param_1,int param_2)
{
int iVar1;
int iVar2;
int iVar3;
if (param_2 == 0) {
return 1;
}
if (param_1 != 0) {
if (param_2 != 1) {
iVar3 = 1;
iVar1 = param_2 + -1;
iVar2 = param_1;
if ((param_2 & 1U) != 0) goto LAB_00101170;
while (... |
371 | func0 |
#include <assert.h>
| int func0(int a, int b) {
if (b == 0) {
return 1;
} else if (a == 0) {
return 0;
} else if (b == 1) {
return a;
} else {
return a * func0(a, b - 1);
}
}
| int main() {
assert(func0(3, 4) == 81);
assert(func0(2, 3) == 8);
assert(func0(5, 5) == 3125);
return 0;
}
| O3 | cpp | func0(int, int):
endbr64
test %esi,%esi
je 1174 <_Z5func0ii+0x34>
test %edi,%edi
je 117a <_Z5func0ii+0x3a>
cmp $0x1,%esi
je 117d <_Z5func0ii+0x3d>
mov $0x1,%eax
jmp 1165 <_Z5func0ii+0x25>
nopl 0x0(%rax,%rax,1)
cmp $0x1,%esi
je 1170 <_Z5func0ii+0x30>
imul %edi,%eax
sub $0x1,%esi
jn... | _Z5func0ii:
endbr64
test esi, esi
jz short loc_1184
test edi, edi
jz short loc_118A
cmp esi, 1
jz short loc_118D
mov edx, 1
lea eax, [rsi-1]
test sil, 1
jnz short loc_1170
mov esi, eax
mov edx, edi
cmp eax, 1
jz short loc_117E
nop dword ptr [rax+rax+00000000h... | long long func0(unsigned int a1, int a2)
{
int v2; // edx
int v3; // eax
if ( !a2 )
return 1LL;
if ( !a1 )
return 0LL;
if ( a2 == 1 )
return a1;
v2 = 1;
v3 = a2 - 1;
if ( (a2 & 1) != 0 || (--a2, v2 = a1, v3 != 1) )
{
do
{
a2 -= 2;
v2 *= a1 * a1;
}
while ( a2 !... | func0:
ENDBR64
TEST ESI,ESI
JZ 0x00101184
TEST EDI,EDI
JZ 0x0010118a
CMP ESI,0x1
JZ 0x0010118d
MOV EDX,0x1
LEA EAX,[RSI + -0x1]
TEST SIL,0x1
JNZ 0x00101170
MOV ESI,EAX
MOV EDX,EDI
CMP EAX,0x1
JZ 0x0010117e
NOP dword ptr [RAX + RAX*0x1]
LAB_00101170:
IMUL EDX,EDI
SUB ESI,0x2
IMUL EDX,EDI
CMP ESI,0x1
JNZ 0x00101170
LAB_0... | /* func0(int, int) */
int func0(int param_1,int param_2)
{
int iVar1;
int iVar2;
int iVar3;
if (param_2 == 0) {
return 1;
}
if (param_1 != 0) {
if (param_2 != 1) {
iVar3 = 1;
iVar1 = param_2 + -1;
iVar2 = param_1;
if ((param_2 & 1U) != 0) goto LAB_00101170;
while (... |
372 | func0 | #include <vector>
#include <string>
#include <utility>
#include <cassert>
#include <climits>
using namespace std;
| string func0(const vector<pair<string, int>>& test_list) {
string res;
int min_value = INT_MAX;
for (const auto& element : test_list) {
if (element.second < min_value) {
min_value = element.second;
res = element.first;
}
}
return res;
}
| int main() {
assert(func0({{"Rash", 143}, {"Manjeet", 200}, {"Varsha", 100}}) == "Varsha");
assert(func0({{"Yash", 185}, {"Dawood", 125}, {"Sanya", 175}}) == "Dawood");
assert(func0({{"Sai", 345}, {"Salman", 145}, {"Ayesha", 96}}) == "Ayesha");
return 0;
}
| O0 | cpp | func0(std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int> > > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x48,%rsp
mov %rdi,-0... | _Z5func0RKSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiESaIS7_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... | long long func0(long long a1, long long a2)
{
int v3; // [rsp+14h] [rbp-3Ch]
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::string::basic_string(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 0x00102380
MOV dword ptr [RBP + -0x3c],0x7fffffff
MOV RAX,qword ptr [RBP + -0... | /* func0(std::vector<std::pair<std::string, int>, std::allocator<std::pair<std::string, int> > >
const&) */
vector * func0(vector *param_1)
{
bool bVar1;
vector<std::pair<std::string,int>,std::allocator<std::pair<std::string,int>>> *in_RSI;
long in_FS_OFFSET;
int local_44;
int8 local_40;
int8 local_38;... |
373 | func0 | #include <vector>
#include <string>
#include <utility>
#include <cassert>
#include <climits>
using namespace std;
| string func0(const vector<pair<string, int>>& test_list) {
string res;
int min_value = INT_MAX;
for (const auto& element : test_list) {
if (element.second < min_value) {
min_value = element.second;
res = element.first;
}
}
return res;
}
| int main() {
assert(func0({{"Rash", 143}, {"Manjeet", 200}, {"Varsha", 100}}) == "Varsha");
assert(func0({{"Yash", 185}, {"Dawood", 125}, {"Sanya", 175}}) == "Dawood");
assert(func0({{"Sai", 345}, {"Salman", 145}, {"Ayesha", 96}}) == "Ayesha");
return 0;
}
| O1 | cpp | func0(std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int> > > const&):
endbr64
push %r14
push %r13
push %r12
push %rbp
push %rbx
mov %rdi,%... | _Z5func0RKSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiESaIS7_EE:
endbr64
push r13
push r12
push rbp
push rbx
sub rsp, 8
mov r12, rdi
lea rax, [rdi+10h]
mov [rdi], rax
mov qword ptr [rdi+8], 0
mov byte ptr [rdi+10h], 0
mov rbx, [rsi]
mov r13, [rsi+8]... | long long func0(long long a1, long long *a2)
{
long long v2; // rbx
long long v3; // r13
int v4; // eax
int v5; // ebp
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
v2 = *a2;
v3 = a2[1];
if ( v3 != *a2 )
{
v4 = 0x7FFFFFFF;
do
{
v5 = *(_DWORD *)(v2... | func0:
ENDBR64
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV R12,RDI
LEA RAX,[RDI + 0x10]
MOV qword ptr [RDI],RAX
MOV qword ptr [RDI + 0x8],0x0
MOV byte ptr [RDI + 0x10],0x0
MOV RBX,qword ptr [RSI]
MOV R13,qword ptr [RSI + 0x8]
CMP R13,RBX
JZ 0x00101396
MOV EAX,0x7fffffff
JMP 0x0010136b
LAB_00101360:
MOV EAX,EBP
... | /* func0(std::vector<std::pair<std::string, int>, std::allocator<std::pair<std::string, int> > >
const&) */
vector * func0(vector *param_1)
{
int iVar1;
long lVar2;
int iVar3;
long lVar4;
long *in_RSI;
*(vector **)param_1 = param_1 + 0x10;
*(int8 *)(param_1 + 8) = 0;
param_1[0x10] = (vector)0x0;... |
374 | func0 | #include <vector>
#include <string>
#include <utility>
#include <cassert>
#include <climits>
using namespace std;
| string func0(const vector<pair<string, int>>& test_list) {
string res;
int min_value = INT_MAX;
for (const auto& element : test_list) {
if (element.second < min_value) {
min_value = element.second;
res = element.first;
}
}
return res;
}
| int main() {
assert(func0({{"Rash", 143}, {"Manjeet", 200}, {"Varsha", 100}}) == "Varsha");
assert(func0({{"Yash", 185}, {"Dawood", 125}, {"Sanya", 175}}) == "Dawood");
assert(func0({{"Sai", 345}, {"Salman", 145}, {"Ayesha", 96}}) == "Ayesha");
return 0;
}
| O2 | cpp | func0(std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int> > > const&):
endbr64
push %r14
lea 0x10(%rdi),%r14
push %r13
push %r12
mov %rdi,%r... | _Z5func0RKSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiESaIS7_EE:
endbr64
push r13
lea rax, [rdi+10h]
push r12
mov r12, rdi
push rbp
push rbx
sub rsp, 8
mov byte ptr [rdi+10h], 0
mov rbx, [rsi]
mov r13, [rsi+8]
mov [rdi], rax
mov qword ptr [rdi+8], 0... | long long func0(long long a1, long long *a2)
{
long long v2; // rbx
long long v3; // r13
int v4; // eax
int v5; // ebp
*(_BYTE *)(a1 + 16) = 0;
v2 = *a2;
v3 = a2[1];
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
if ( v3 != v2 )
{
v4 = 0x7FFFFFFF;
do
{
while ( 1 )
{
... | func0:
ENDBR64
PUSH R13
LEA RAX,[RDI + 0x10]
PUSH R12
MOV R12,RDI
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV byte ptr [RDI + 0x10],0x0
MOV RBX,qword ptr [RSI]
MOV R13,qword ptr [RSI + 0x8]
MOV qword ptr [RDI],RAX
MOV qword ptr [RDI + 0x8],0x0
CMP R13,RBX
JZ 0x001018c6
MOV EAX,0x7fffffff
JMP 0x001018a9
LAB_001018a0:
ADD RBX,0x28... | /* func0(std::vector<std::pair<std::string, int>, std::allocator<std::pair<std::string, int> > >
const&) */
vector * func0(vector *param_1)
{
int iVar1;
long lVar2;
int iVar3;
long lVar4;
long *in_RSI;
param_1[0x10] = (vector)0x0;
lVar4 = *in_RSI;
lVar2 = in_RSI[1];
*(vector **)param_1 = param... |
375 | func0 | #include <vector>
#include <string>
#include <utility>
#include <cassert>
#include <climits>
using namespace std;
| string func0(const vector<pair<string, int>>& test_list) {
string res;
int min_value = INT_MAX;
for (const auto& element : test_list) {
if (element.second < min_value) {
min_value = element.second;
res = element.first;
}
}
return res;
}
| int main() {
assert(func0({{"Rash", 143}, {"Manjeet", 200}, {"Varsha", 100}}) == "Varsha");
assert(func0({{"Yash", 185}, {"Dawood", 125}, {"Sanya", 175}}) == "Dawood");
assert(func0({{"Sai", 345}, {"Salman", 145}, {"Ayesha", 96}}) == "Ayesha");
return 0;
}
| O3 | cpp | func0(std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int> > > const&):
endbr64
push %r14
lea 0x10(%rdi),%r14
push %r13
push %r12
mov %rdi,%r... | _Z5func0RKSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiESaIS7_EE:
endbr64
push r13
lea rax, [rdi+10h]
push r12
mov r12, rdi
push rbp
push rbx
sub rsp, 8
mov byte ptr [rdi+10h], 0
mov rbx, [rsi]
mov r13, [rsi+8]
mov [rdi], rax
mov qword ptr [rdi+8], 0... | long long func0(long long a1, long long *a2)
{
long long v2; // rbx
long long v3; // r13
int v4; // eax
int v5; // ebp
*(_BYTE *)(a1 + 16) = 0;
v2 = *a2;
v3 = a2[1];
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
if ( v3 != v2 )
{
v4 = 0x7FFFFFFF;
do
{
while ( 1 )
{
... | func0:
ENDBR64
PUSH R13
LEA RAX,[RDI + 0x10]
PUSH R12
MOV R12,RDI
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV byte ptr [RDI + 0x10],0x0
MOV RBX,qword ptr [RSI]
MOV R13,qword ptr [RSI + 0x8]
MOV qword ptr [RDI],RAX
MOV qword ptr [RDI + 0x8],0x0
CMP R13,RBX
JZ 0x00101996
MOV EAX,0x7fffffff
JMP 0x00101979
LAB_00101970:
ADD RBX,0x28... | /* func0(std::vector<std::pair<std::string, int>, std::allocator<std::pair<std::string, int> > >
const&) */
vector * func0(vector *param_1)
{
int iVar1;
long lVar2;
int iVar3;
long lVar4;
long *in_RSI;
param_1[0x10] = (vector)0x0;
lVar4 = *in_RSI;
lVar2 = in_RSI[1];
*(vector **)param_1 = param... |
376 | func0 |
#include <vector>
#include <string>
#include <algorithm>
#include <assert.h>
#include <climits>
| int func0(const std::vector<std::vector<int>>& lst) {
int minLength = INT_MAX;
for (const auto& x : lst) {
minLength = std::min(minLength, static_cast<int>(x.size()));
}
return minLength;
}
| int main() {
assert(func0({{1},{1,2}}) == 1);
assert(func0({{1,2},{1,2,3},{1,2,3,4}}) == 2);
assert(func0({{3,3,3},{4,4,4,4}}) == 3);
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 $0x40,%rsp
mov %rdi,-0x38(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x8(%rbp)
xor %eax,%eax
movl $0x7fffffff,-0x30(%rbp)
mov -0x38(%rbp),%rax
... | _Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EE:
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_30], 7FFFFFFFh
mov rax, [rbp+var_38]
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
mov rdi, rax
call _ZN... | long long func0(long long a1)
{
unsigned int v2; // [rsp+10h] [rbp-30h] BYREF
int v3; // [rsp+14h] [rbp-2Ch] BYREF
long long v4; // [rsp+18h] [rbp-28h] BYREF
_QWORD v5[2]; // [rsp+20h] [rbp-20h] BYREF
long long v6; // [rsp+30h] [rbp-10h]
unsigned long long v7; // [rsp+38h] [rbp-8h]
v7 = __readfsqword(0x... | 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 + -0x30],0x7fffffff
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,RAX
CALL 0x00101bb2
MOV q... | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > > const&) */
int func0(vector *param_1)
{
bool bVar1;
int *piVar2;
long in_FS_OFFSET;
int local_38;
int local_34;
int8 local_30;
int8 local_28;
vector<std::vector<int,std::allocator<... |
377 | func0 |
#include <vector>
#include <string>
#include <algorithm>
#include <assert.h>
#include <climits>
| int func0(const std::vector<std::vector<int>>& lst) {
int minLength = INT_MAX;
for (const auto& x : lst) {
minLength = std::min(minLength, static_cast<int>(x.size()));
}
return minLength;
}
| int main() {
assert(func0({{1},{1,2}}) == 1);
assert(func0({{1,2},{1,2,3},{1,2,3,4}}) == 2);
assert(func0({{3,3,3},{4,4,4,4}}) == 3);
return 0;
}
| O1 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&):
endbr64
mov (%rdi),%rdx
mov 0x8(%rdi),%rsi
cmp %rsi,%rdx
je 12da <_Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EE+0x31>
mov $0x7fffffff,%ecx
mov 0x8(%rdx),%rax
sub (%rdx),%rax
sar ... | _Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EE:
endbr64
mov rdx, [rdi]
mov rsi, [rdi+8]
cmp rsi, rdx
jz short loc_12DA
mov ecx, 7FFFFFFFh
loc_12BE:
mov rax, [rdx+8]
sub rax, [rdx]
sar rax, 2
cmp ecx, eax
cmovg ecx, eax
add rdx, 18h
cmp rsi, rdx
jnz short loc_12BE
loc_12D7:
mov... | long long func0(long long a1)
{
_QWORD *v1; // rdx
_QWORD *v2; // rsi
int v3; // ecx
v1 = *(_QWORD **)a1;
v2 = *(_QWORD **)(a1 + 8);
if ( v2 == *(_QWORD **)a1 )
{
return 0x7FFFFFFF;
}
else
{
v3 = 0x7FFFFFFF;
do
{
if ( v3 > (int)((long long)(v1[1] - *v1) >> 2) )
v3 = (... | func0:
ENDBR64
MOV RDX,qword ptr [RDI]
MOV RSI,qword ptr [RDI + 0x8]
CMP RSI,RDX
JZ 0x001012da
MOV ECX,0x7fffffff
LAB_001012be:
MOV RAX,qword ptr [RDX + 0x8]
SUB RAX,qword ptr [RDX]
SAR RAX,0x2
CMP ECX,EAX
CMOVG ECX,EAX
ADD RDX,0x18
CMP RSI,RDX
JNZ 0x001012be
LAB_001012d7:
MOV EAX,ECX
RET
LAB_001012da:
MOV ECX,0x7fffff... | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > > const&) */
int func0(vector *param_1)
{
int iVar1;
int iVar2;
long *plVar3;
plVar3 = *(long **)param_1;
if (*(long **)(param_1 + 8) == plVar3) {
iVar2 = 0x7fffffff;
}
else {
... |
378 | func0 |
#include <vector>
#include <string>
#include <algorithm>
#include <assert.h>
#include <climits>
| int func0(const std::vector<std::vector<int>>& lst) {
int minLength = INT_MAX;
for (const auto& x : lst) {
minLength = std::min(minLength, static_cast<int>(x.size()));
}
return minLength;
}
| int main() {
assert(func0({{1},{1,2}}) == 1);
assert(func0({{1,2},{1,2,3},{1,2,3,4}}) == 2);
assert(func0({{3,3,3},{4,4,4,4}}) == 3);
return 0;
}
| O2 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&):
endbr64
mov (%rdi),%rdx
mov 0x8(%rdi),%rcx
mov $0x7fffffff,%r8d
cmp %rcx,%rdx
je 171b <_Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EE+0x3b>
nopw %cs:0x0(%rax,%rax,1)
mov 0x8(%rdx),%r... | _Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EE:
endbr64
mov rdx, [rdi]
mov rsi, [rdi+8]
mov ecx, 7FFFFFFFh
cmp rsi, rdx
jz short loc_1751
nop dword ptr [rax]
loc_1738:
mov rax, [rdx+8]
sub rax, [rdx]
sar rax, 2
cmp ecx, eax
cmovg ecx, eax
add rdx, 18h
cmp rsi, rdx
jnz shor... | long long func0(long long a1)
{
_QWORD *v1; // rdx
_QWORD *v2; // rsi
int v3; // ecx
v1 = *(_QWORD **)a1;
v2 = *(_QWORD **)(a1 + 8);
v3 = 0x7FFFFFFF;
if ( v2 != *(_QWORD **)a1 )
{
do
{
if ( v3 > (int)((long long)(v1[1] - *v1) >> 2) )
v3 = (long long)(v1[1] - *v1) >> 2;
v1 +... | func0:
ENDBR64
MOV RDX,qword ptr [RDI]
MOV RSI,qword ptr [RDI + 0x8]
MOV ECX,0x7fffffff
CMP RSI,RDX
JZ 0x00101751
NOP dword ptr [RAX]
LAB_00101738:
MOV RAX,qword ptr [RDX + 0x8]
SUB RAX,qword ptr [RDX]
SAR RAX,0x2
CMP ECX,EAX
CMOVG ECX,EAX
ADD RDX,0x18
CMP RSI,RDX
JNZ 0x00101738
LAB_00101751:
MOV EAX,ECX
RET | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > > const&) */
int func0(vector *param_1)
{
int iVar1;
int iVar2;
long *plVar3;
iVar2 = 0x7fffffff;
for (plVar3 = *(long **)param_1; *(long **)(param_1 + 8) != plVar3; plVar3 = plVar3 + 3... |
379 | func0 |
#include <vector>
#include <string>
#include <algorithm>
#include <assert.h>
#include <climits>
| int func0(const std::vector<std::vector<int>>& lst) {
int minLength = INT_MAX;
for (const auto& x : lst) {
minLength = std::min(minLength, static_cast<int>(x.size()));
}
return minLength;
}
| int main() {
assert(func0({{1},{1,2}}) == 1);
assert(func0({{1,2},{1,2,3},{1,2,3,4}}) == 2);
assert(func0({{3,3,3},{4,4,4,4}}) == 3);
return 0;
}
| O3 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&):
endbr64
mov (%rdi),%rdx
mov 0x8(%rdi),%rcx
mov $0x7fffffff,%r8d
cmp %rcx,%rdx
je 170b <_Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EE+0x3b>
nopw %cs:0x0(%rax,%rax,1)
mov 0x8(%rdx),%r... | _Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EE:
endbr64
mov rdx, [rdi]
mov rsi, [rdi+8]
mov ecx, 7FFFFFFFh
cmp rsi, rdx
jz short loc_17F1
nop dword ptr [rax]
loc_17D8:
mov rax, [rdx+8]
sub rax, [rdx]
sar rax, 2
cmp ecx, eax
cmovg ecx, eax
add rdx, 18h
cmp rsi, rdx
jnz shor... | long long func0(long long a1)
{
_QWORD *v1; // rdx
_QWORD *v2; // rsi
int v3; // ecx
v1 = *(_QWORD **)a1;
v2 = *(_QWORD **)(a1 + 8);
v3 = 0x7FFFFFFF;
if ( v2 != *(_QWORD **)a1 )
{
do
{
if ( v3 > (int)((long long)(v1[1] - *v1) >> 2) )
v3 = (long long)(v1[1] - *v1) >> 2;
v1 +... | func0:
ENDBR64
MOV RDX,qword ptr [RDI]
MOV RSI,qword ptr [RDI + 0x8]
MOV ECX,0x7fffffff
CMP RSI,RDX
JZ 0x001017f1
NOP dword ptr [RAX]
LAB_001017d8:
MOV RAX,qword ptr [RDX + 0x8]
SUB RAX,qword ptr [RDX]
SAR RAX,0x2
CMP ECX,EAX
CMOVG ECX,EAX
ADD RDX,0x18
CMP RSI,RDX
JNZ 0x001017d8
LAB_001017f1:
MOV EAX,ECX
RET | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > > const&) */
int func0(vector *param_1)
{
int iVar1;
int iVar2;
long *plVar3;
iVar2 = 0x7fffffff;
for (plVar3 = *(long **)param_1; *(long **)(param_1 + 8) != plVar3; plVar3 = plVar3 + 3... |
380 | func0 |
#include <iostream>
#include <vector>
#include <assert.h>
| int func0(int n) {
int x = 0;
for(int i = 1; i <= n; i++){
if (n % i == 0) {
x++;
}
}
return x;
}
| int main() {
assert(func0(15) == 4);
assert(func0(12) == 6);
assert(func0(9) == 3);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
movl $0x0,-0x8(%rbp)
movl $0x1,-0x4(%rbp)
mov -0x4(%rbp),%eax
cmp -0x14(%rbp),%eax
jg 11c1 <_Z5func0i+0x38>
mov -0x14(%rbp),%eax
cltd
idivl -0x4(%rbp)
mov %edx,%eax
test %eax,%eax
jne 11bb <_Z5func0i+0x32>
addl $0x1,-0x... | _Z5func0i:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_14], edi
mov [rbp+var_8], 0
mov [rbp+var_4], 1
jmp short loc_1179
loc_1164:
mov eax, [rbp+var_14]
cdq
idiv [rbp+var_4]
mov eax, edx
test eax, eax
jnz short loc_1175
add [rbp+var_8], 1
loc_1175:
add [rbp+var_4], 1
loc_... | long long func0(int a1)
{
unsigned int v2; // [rsp+Ch] [rbp-8h]
int i; // [rsp+10h] [rbp-4h]
v2 = 0;
for ( i = 1; i <= a1; ++i )
{
if ( !(a1 % i) )
++v2;
}
return v2;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x14],EDI
MOV dword ptr [RBP + -0x8],0x0
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00101179
LAB_00101164:
MOV EAX,dword ptr [RBP + -0x14]
CDQ
IDIV dword ptr [RBP + -0x4]
MOV EAX,EDX
TEST EAX,EAX
JNZ 0x00101175
ADD dword ptr [RBP + -0x8],0x1
LAB_00101175:
ADD dword pt... | /* func0(int) */
int func0(int param_1)
{
int4 local_10;
int4 local_c;
local_10 = 0;
for (local_c = 1; local_c <= param_1; local_c = local_c + 1) {
if (param_1 % local_c == 0) {
local_10 = local_10 + 1;
}
}
return local_10;
} |
381 | func0 |
#include <iostream>
#include <vector>
#include <assert.h>
| int func0(int n) {
int x = 0;
for(int i = 1; i <= n; i++){
if (n % i == 0) {
x++;
}
}
return x;
}
| int main() {
assert(func0(15) == 4);
assert(func0(12) == 6);
assert(func0(9) == 3);
return 0;
}
| O1 | cpp | func0(int):
endbr64
test %edi,%edi
jle 11b5 <_Z5func0i+0x2c>
lea 0x1(%rdi),%r8d
mov $0x1,%ecx
mov $0x0,%esi
mov %edi,%eax
cltd
idiv %ecx
cmp $0x1,%edx
adc $0x0,%esi
add $0x1,%ecx
cmp %r8d,%ecx
jne 119f <_Z5func0i+0x16>
mov %esi,%eax
retq
mov $0x0,%esi
jmp 11b2 <_Z5func0i+0x29>... | _Z5func0i:
endbr64
test edi, edi
jle short loc_1175
lea r8d, [rdi+1]
mov ecx, 1
mov esi, 0
loc_115F:
mov eax, edi
cdq
idiv ecx
cmp edx, 1
adc esi, 0
add ecx, 1
cmp ecx, r8d
jnz short loc_115F
loc_1172:
mov eax, esi
retn
loc_1175:
mov esi, 0
jmp short loc_1172 | long long func0(int a1)
{
int v1; // ecx
unsigned int v2; // esi
if ( a1 <= 0 )
{
return 0;
}
else
{
v1 = 1;
v2 = 0;
do
v2 += a1 % v1++ == 0;
while ( v1 != a1 + 1 );
}
return v2;
} | func0:
ENDBR64
TEST EDI,EDI
JLE 0x00101175
LEA R8D,[RDI + 0x1]
MOV ECX,0x1
MOV ESI,0x0
LAB_0010115f:
MOV EAX,EDI
CDQ
IDIV ECX
CMP EDX,0x1
ADC ESI,0x0
ADD ECX,0x1
CMP ECX,R8D
JNZ 0x0010115f
LAB_00101172:
MOV EAX,ESI
RET
LAB_00101175:
MOV ESI,0x0
JMP 0x00101172 | /* func0(int) */
int func0(int param_1)
{
int iVar1;
int iVar2;
if (param_1 < 1) {
iVar2 = 0;
}
else {
iVar1 = 1;
iVar2 = 0;
do {
iVar2 = iVar2 + (uint)(param_1 % iVar1 == 0);
iVar1 = iVar1 + 1;
} while (iVar1 != param_1 + 1);
}
return iVar2;
} |
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.