index int64 0 66.5k | func_name stringlengths 2 5.36k | func_dep stringlengths 16 2.19k | func stringlengths 8 55.3k | test stringlengths 0 7.07k | opt stringclasses 4
values | language stringclasses 2
values | asm stringlengths 0 45.4k | ida_asm stringlengths 0 44.7k | ida_pseudo stringlengths 0 44.3k | ghidra_asm stringlengths 0 49.1k | ghidra_pseudo stringlengths 0 64.7k |
|---|---|---|---|---|---|---|---|---|---|---|---|
1,182 | func0 |
#include <iostream>
#include <cassert>
| int func0(int arr[], int n) {
int inv_count = 0;
for (int i = 0; i < n; i++) {
for (int j = i + 1; j < n; j++) {
if (arr[i] > arr[j]) {
inv_count += 1;
}
}
}
return inv_count;
}
| int main() {
int arr1[] = {1, 20, 6, 4, 5};
assert(func0(arr1, 5) == 5);
int arr2[] = {1, 2, 1};
assert(func0(arr2, 3) == 1);
int arr3[] = {1, 2, 5, 6, 1};
assert(func0(arr3, 5) == 3);
return 0;
}
| O2 | cpp | func0(int*, int):
endbr64
test %esi,%esi
jle 140e <_Z5func0Pii+0x4e>
lea -0x1(%rsi),%r9d
mov $0x1,%ecx
xor %r8d,%r8d
add $0x1,%r9
cmp %r9,%rcx
je 140a <_Z5func0Pii+0x4a>
nopl (%rax)
mov -0x4(%rdi,%rcx,4),%edx
mov %rcx,%rax
nopw 0x0(%rax,%rax,1)
cmp (%rdi,%rax,4),%edx
jle 13f9 <_Z... | _Z5func0Pii:
endbr64
test esi, esi
jle short loc_12CC
mov r9d, esi
mov r8d, 1
xor ecx, ecx
cmp esi, 1
jz short loc_12C9
nop dword ptr [rax+rax+00000000h]
loc_12A0:
mov edx, [rdi+r8*4-4]
mov rax, r8
nop dword ptr [rax+rax+00000000h]
loc_12B0:
cmp edx, [rdi+rax*4]
jle s... | long long func0(int *a1, int a2)
{
long long v2; // r8
unsigned int v3; // ecx
long long v4; // rax
if ( a2 <= 0 )
return 0LL;
v2 = 1LL;
v3 = 0;
if ( a2 != 1 )
{
do
{
v4 = v2;
do
{
if ( a1[v2 - 1] > a1[v4] )
++v3;
++v4;
}
while ( a2 >... | func0:
ENDBR64
TEST ESI,ESI
JLE 0x001012cc
MOV R9D,ESI
MOV R8D,0x1
XOR ECX,ECX
CMP ESI,0x1
JZ 0x001012c9
NOP dword ptr [RAX + RAX*0x1]
LAB_001012a0:
MOV EDX,dword ptr [RDI + R8*0x4 + -0x4]
MOV RAX,R8
NOP dword ptr [RAX + RAX*0x1]
LAB_001012b0:
CMP EDX,dword ptr [RDI + RAX*0x4]
JLE 0x001012b8
ADD ECX,0x1
LAB_001012b8:
A... | /* func0(int*, int) */
int func0(int *param_1,int param_2)
{
ulong uVar1;
int iVar2;
ulong uVar3;
if (param_2 < 1) {
return 0;
}
uVar3 = 1;
iVar2 = 0;
if (param_2 != 1) {
do {
uVar1 = uVar3;
do {
if (param_1[uVar1] < param_1[uVar3 - 1]) {
iVar2 = iVar2 + 1;
... |
1,183 | func0 |
#include <iostream>
#include <cassert>
| int func0(int arr[], int n) {
int inv_count = 0;
for (int i = 0; i < n; i++) {
for (int j = i + 1; j < n; j++) {
if (arr[i] > arr[j]) {
inv_count += 1;
}
}
}
return inv_count;
}
| int main() {
int arr1[] = {1, 20, 6, 4, 5};
assert(func0(arr1, 5) == 5);
int arr2[] = {1, 2, 1};
assert(func0(arr2, 3) == 1);
int arr3[] = {1, 2, 5, 6, 1};
assert(func0(arr3, 5) == 3);
return 0;
}
| O3 | cpp | func0(int*, int):
endbr64
test %esi,%esi
jle 14cd <_Z5func0Pii+0x12d>
cmp $0x1,%esi
je 14cd <_Z5func0Pii+0x12d>
push %rbp
lea 0x4(%rdi),%r10
xor %r9d,%r9d
mov $0x1,%ecx
push %rbx
lea -0x1(%rsi),%ebp
mov $0x1,%ebx
nopl 0x0(%rax,%rax,1)
mov %esi,%r8d
mov %ebp,%eax
mov -0x4(%r10),... | _Z5func0Pii:
endbr64
test esi, esi
jle loc_1248
cmp esi, 1
jz loc_1248
push rbp
mov r11, rdi
lea r8, [rdi+4]
xor r9d, r9d
push rbx
mov ecx, 1
lea ebp, [rsi-1]
mov ebx, 1
xchg ax, ax
loc_1170:
mov edi, esi
mov eax, ebp
mov r10d, [r8-4]
sub edi, ecx
cmp ... | long long func0(int *a1, int a2)
{
int *v3; // r8
unsigned int v4; // r9d
int v5; // ecx
signed int v6; // r10d
unsigned int v7; // edi
__m128i v8; // xmm0
const __m128i *v9; // rax
__m128i v10; // xmm2
__m128i v11; // xmm3
__m128i v12; // xmm0
int v13; // eax
long long v14; // rdi
if ( a2 >... | func0:
ENDBR64
TEST ESI,ESI
JLE 0x00101248
CMP ESI,0x1
JZ 0x00101248
PUSH RBP
MOV R11,RDI
LEA R8,[RDI + 0x4]
XOR R9D,R9D
PUSH RBX
MOV ECX,0x1
LEA EBP,[RSI + -0x1]
MOV EBX,0x1
NOP
LAB_00101170:
MOV EDI,ESI
MOV EAX,EBP
MOV R10D,dword ptr [R8 + -0x4]
SUB EDI,ECX
CMP ESI,ECX
CMOVLE EDI,EBX
SUB EAX,ECX
CMP EAX,0x2
JBE 0x001... | /* func0(int*, int) */
int func0(int *param_1,int param_2)
{
int iVar1;
uint uVar2;
int iVar3;
int *piVar4;
int *piVar5;
int *piVar6;
int *piVar7;
int iVar8;
int *piVar9;
int iVar10;
int iVar11;
int iVar12;
int iVar13;
int iVar14;
if ((param_2 < 1) || (param_2 == 1)) {
return 0;
... |
1,184 | func0 |
#include <vector>
#include <variant>
#include <algorithm>
#include <cassert>
using namespace std;
| vector<int> func0(const vector<variant<int, vector<int>>>& list1) {
vector<int> result_list;
if (list1.empty()) return result_list;
vector<vector<variant<int, vector<int>>>> stack;
stack.emplace_back(list1);
while (!stack.empty()) {
auto current = stack.back();
stack.pop_back(... | int main(){
using var = variant<int, vector<int>>;
vector<var> input1 = {0, 10, vector<int>{20, 30}, 40, 50, vector<int>{60, 70, 80}, vector<int>{90, 100, 110, 120}};
vector<int> expected1 = {0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120};
assert(func0(input1) == expected1);
vect... | O0 | cpp | func0(std::vector<std::variant<int, std::vector<int, std::allocator<int> > >, std::allocator<std::variant<int, std::vector<int, std::allocator<int> > > > > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0xf8,%rsp
mov %rdi,-0xf8(%rbp)
mov %rsi,-0x100(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(... | _Z5func0RKSt6vectorISt7variantIJiS_IiSaIiEEEESaIS3_EE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 0F8h
mov [rbp+var_F8], rdi
mov [rbp+var_100], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_F8]
mov rdi, rax
call _ZNSt6vectorIiSaIiEEC2Ev; std::... | long long func0(long long a1, long long a2)
{
long long v2; // rax
long long v3; // rax
long long v4; // rax
long long v5; // rbx
long long v6; // rax
long long v8; // [rsp+18h] [rbp-E8h] BYREF
long long v9; // [rsp+20h] [rbp-E0h] BYREF
long long v10; // [rsp+28h] [rbp-D8h]
long long v11; // [rsp+30h... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0xf8
MOV qword ptr [RBP + -0xf8],RDI
MOV qword ptr [RBP + -0x100],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0xf8]
MOV RDI,RAX
CALL 0x00102b10
MOV RAX,qword ptr [RBP + -0x100]
MOV RDI,RAX
CALL 0x001030aa
TEST... | /* func0(std::vector<std::variant<int, std::vector<int, std::allocator<int> > >,
std::allocator<std::variant<int, std::vector<int, std::allocator<int> > > > > const&) */
vector * func0(vector *param_1)
{
char cVar1;
bool bVar2;
vector *pvVar3;
variant *pvVar4;
int *piVar5;
int8 uVar6;
int8 uVar7;
v... |
1,185 | func0 |
#include <vector>
#include <variant>
#include <algorithm>
#include <cassert>
using namespace std;
| vector<int> func0(const vector<variant<int, vector<int>>>& list1) {
vector<int> result_list;
if (list1.empty()) return result_list;
vector<vector<variant<int, vector<int>>>> stack;
stack.emplace_back(list1);
while (!stack.empty()) {
auto current = stack.back();
stack.pop_back(... | int main(){
using var = variant<int, vector<int>>;
vector<var> input1 = {0, 10, vector<int>{20, 30}, 40, 50, vector<int>{60, 70, 80}, vector<int>{90, 100, 110, 120}};
vector<int> expected1 = {0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120};
assert(func0(input1) == expected1);
vect... | O1 | cpp | func0(std::vector<std::variant<int, std::vector<int, std::allocator<int> > >, std::allocator<std::variant<int, std::vector<int, std::allocator<int> > > > > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0xd8,%rsp
mov %rdi,0x8(%rsp)
mov %fs:0x28,%rax
mov %rax,0x... | _Z5func0RKSt6vectorISt7variantIJiS_IiSaIiEEEESaIS3_EE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 0E8h
mov [rsp+118h+var_F8], rdi
mov rax, fs:28h
mov [rsp+118h+var_40], rax
xor eax, eax
mov qword ptr [rdi], 0
mov qword ptr [rdi+8], 0
mov qwor... | int ** func0(int **a1, _QWORD *a2)
{
_QWORD *v2; // r13
void *v3; // rdi
int *v4; // rax
int *v5; // rdx
int *k; // rax
int v7; // ecx
struct _Unwind_Exception *v9; // rbx
long long v10; // rax
char *v11; // r12
char *v12; // rbp
long long v13; // r14
long long i; // rbx
void *v15; // rdi
ch... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0xe8
MOV qword ptr [RSP + 0x20],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0xd8],RAX
XOR EAX,EAX
MOV qword ptr [RDI],0x0
MOV qword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
MOV RAX,qword ptr [RSI]
CMP qword ptr [RSI + 0x8],R... | /* func0(std::vector<std::variant<int, std::vector<int, std::allocator<int> > >,
std::allocator<std::variant<int, std::vector<int, std::allocator<int> > > > > const&) */
vector * func0(vector *param_1)
{
variant vVar1;
int4 uVar2;
int8 *puVar3;
void *pvVar4;
int *piVar5;
int4 *puVar6;
variant *pvVar7... |
1,186 | func0 |
#include <vector>
#include <variant>
#include <algorithm>
#include <cassert>
using namespace std;
| vector<int> func0(const vector<variant<int, vector<int>>>& list1) {
vector<int> result_list;
if (list1.empty()) return result_list;
vector<vector<variant<int, vector<int>>>> stack;
stack.emplace_back(list1);
while (!stack.empty()) {
auto current = stack.back();
stack.pop_back(... | int main(){
using var = variant<int, vector<int>>;
vector<var> input1 = {0, 10, vector<int>{20, 30}, 40, 50, vector<int>{60, 70, 80}, vector<int>{90, 100, 110, 120}};
vector<int> expected1 = {0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120};
assert(func0(input1) == expected1);
vect... | O2 | cpp | func0(std::vector<std::variant<int, std::vector<int, std::allocator<int> > >, std::allocator<std::variant<int, std::vector<int, std::allocator<int> > > > > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0xf8,%rsp
mov %rdi,0x18(%rsp)
mov %fs:0x28,%rax
mov %rax,0... | _Z5func0RKSt6vectorISt7variantIJiS_IiSaIiEEEESaIS3_EE:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 0E8h
mov [rsp+118h+var_F8], rdi
mov rax, fs:28h
mov [rsp+118h+var_40], rax
xor eax, eax
mov qword ptr [rdi+10h], 0
mov rax, [rsi]... | long long func0(
long long a1,
long long *a2,
long long a3,
long long a4,
long long a5,
long long a6,
long long a7,
long long a8,
long long a9,
long long a10,
long long a11,
int a12,
int a13,
int a14,
... | func0:
MOV RAX,qword ptr [RSP + 0xd8]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x001012fe
LEA RAX,[RSP + 0xb0]
LEA RDI,[0x104040]
MOV qword ptr [RSP + 0x18],RAX
LAB_001012a5:
CALL 0x0010153d
LAB_001012aa:
ENDBR64
LAB_001012ae:
MOV RBX,RAX
LAB_001012b1:
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x00102a30
LAB_001012bb:
MOV RDI,qword p... | /* func0(std::vector<std::variant<int, std::vector<int, std::allocator<int> > >,
std::allocator<std::variant<int, std::vector<int, std::allocator<int> > > > > const&) [clone
.cold] */
void func0(vector *param_1,int param_2,int param_3,int param_4,int param_5,
int param_6,
vector<std::variant<... |
1,187 | func0 |
#include <vector>
#include <variant>
#include <algorithm>
#include <cassert>
using namespace std;
| vector<int> func0(const vector<variant<int, vector<int>>>& list1) {
vector<int> result_list;
if (list1.empty()) return result_list;
vector<vector<variant<int, vector<int>>>> stack;
stack.emplace_back(list1);
while (!stack.empty()) {
auto current = stack.back();
stack.pop_back(... | int main(){
using var = variant<int, vector<int>>;
vector<var> input1 = {0, 10, vector<int>{20, 30}, 40, 50, vector<int>{60, 70, 80}, vector<int>{90, 100, 110, 120}};
vector<int> expected1 = {0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120};
assert(func0(input1) == expected1);
vect... | O3 | cpp | func0(std::vector<std::variant<int, std::vector<int, std::allocator<int> > >, std::allocator<std::variant<int, std::vector<int, std::allocator<int> > > > > const&):
endbr64
push %r15
pxor %xmm0,%xmm0
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0xf8,%rsp
mov %rdi,0x10(%rsp)
mov %fs:0x28... | _Z5func0RKSt6vectorISt7variantIJiS_IiSaIiEEEESaIS3_EE:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 108h
mov [rsp+138h+var_118], rdi
mov rax, fs:28h
mov [rsp+138h+var_40], rax
xor eax, eax
mov qword ptr [rdi+10h], 0
mov rax, [rsi... | unsigned long long * func0(unsigned long long *a1, long long *a2)
{
char *v2; // rbx
char *v3; // r14
long long v4; // rax
_DWORD *v6; // rsi
__m128i *v7; // r13
__m128i *v8; // r15
__m128i *v9; // r12
__m128i *v10; // rbp
long long v11; // rax
char *v12; // rax
char v13; // al
signed long long ... | func0:
NOP
LAB_0010127d:
ENDBR64
MOV RBX,RAX
CALL 0x00101220
MOV RAX,qword ptr [RSP + 0x48]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RAX + 0x10]
SUB RSI,RDI
TEST RDI,RDI
JNZ 0x0010136d
LAB_001012a1:
LEA RAX,[RSP + 0xb0]
MOV qword ptr [RSP + 0x40],RAX
LAB_001012ae:
MOV RDI,qword ptr [RSP + 0x40]
LEA R15,[RSP + 0x90]
C... | /* func0(std::vector<std::variant<int, std::vector<int, std::allocator<int> > >,
std::allocator<std::variant<int, std::vector<int, std::allocator<int> > > > > const&) [clone
.cold] */
void func0(vector *param_1,int param_2,int param_3,int param_4,int param_5,
int param_6,int param_7,int param_8,int par... |
1,188 | func0 | #include <vector>
#include <string>
#include <cassert>
#include <algorithm>
template <typename T>
| std::vector<std::vector<T>> func0(const std::vector<T>& l1, const std::vector<std::vector<T>>& l2) {
std::vector<std::vector<T>> result;
for (const auto& lst : l2) {
std::vector<T> inner;
for (const auto& n : lst) {
if (std::find(l1.begin(), l1.end(), n) != l1.end()) {
... | int main() {
{
std::vector<int> l1 = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14};
std::vector<std::vector<int>> l2 = {
{12, 18, 23, 25, 45},
{7, 11, 19, 24, 28},
{1, 5, 8, 18, 15, 16}
};
std::vector<std::vector<int>> expected = {
... | O0 | cpp | std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > func0<int>(std::vector<int, std::allocator<int> > const&, std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&):
endbr64
push %rbp
mov %rsp,%... | _Z5func0IiESt6vectorIS0_IT_SaIS1_EESaIS3_EERKS3_RKS5_:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 98h
mov [rbp+var_88], rdi
mov [rbp+var_90], rsi
mov [rbp+var_98], rdx
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_88]
mov rdi, rax
call _ZNSt6v... | long long func0<int>(long long a1, long long a2, long long a3)
{
long long v3; // rbx
long long v4; // rax
long long v7; // [rsp+20h] [rbp-80h] BYREF
long long v8; // [rsp+28h] [rbp-78h] BYREF
long long v9; // [rsp+30h] [rbp-70h] BYREF
long long v10; // [rsp+38h] [rbp-68h] BYREF
long long v11; // [rsp+40... | func0<int>:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x98
MOV qword ptr [RBP + -0x88],RDI
MOV qword ptr [RBP + -0x90],RSI
MOV qword ptr [RBP + -0x98],RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x88]
MOV RDI,RAX
CALL 0x001044bc
MOV RAX,qword ptr [RBP + -0x9... | /* std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > > func0<int>(std::vector<int, std::allocator<int> > const&,
std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > > const&) */
vector func0<int>(... |
1,189 | func0 | #include <vector>
#include <string>
#include <cassert>
#include <algorithm>
template <typename T>
| std::vector<std::vector<T>> func0(const std::vector<T>& l1, const std::vector<std::vector<T>>& l2) {
std::vector<std::vector<T>> result;
for (const auto& lst : l2) {
std::vector<T> inner;
for (const auto& n : lst) {
if (std::find(l1.begin(), l1.end(), n) != l1.end()) {
... | int main() {
{
std::vector<int> l1 = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14};
std::vector<std::vector<int>> l2 = {
{12, 18, 23, 25, 45},
{7, 11, 19, 24, 28},
{1, 5, 8, 18, 15, 16}
};
std::vector<std::vector<int>> expected = {
... | O1 | cpp | std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > func0<int>(std::vector<int, std::allocator<int> > const&, std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&):
endbr64
push %r15
push %r14
p... | _Z5func0IiESt6vectorIS0_IT_SaIS1_EESaIS3_EERKS3_RKS5_:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 38h
mov r13, rdi
mov rbx, rsi
mov rax, fs:28h
mov [rsp+68h+var_40], rax
xor eax, eax
mov qword ptr [rdi], 0
mov qword ptr [rdi+8], 0
mov qwo... | _QWORD * func0<int>(_QWORD *a1, char **a2, int ***a3, char *a4)
{
int **v5; // r12
char *v7; // rax
char *v8; // rsi
int *v9; // rbp
char *v10; // rsi
long long v11; // rcx
int v12; // edx
signed long long v13; // rax
_QWORD *v14; // rbp
char *v15; // r15
signed long long v16; // r14
_DWORD *v17... | func0<int>:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x38
MOV R13,RDI
MOV RBX,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x28],RAX
XOR EAX,EAX
MOV qword ptr [RDI],0x0
MOV qword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
MOV R12,qword ptr [RDX]
MOV RAX,qword ptr [RDX + 0x8]... | /* std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > > func0<int>(std::vector<int, std::allocator<int> > const&,
std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > > const&) */
vector<std::vector... |
1,190 | func0 | #include <vector>
#include <string>
#include <cassert>
#include <algorithm>
template <typename T>
| std::vector<std::vector<T>> func0(const std::vector<T>& l1, const std::vector<std::vector<T>>& l2) {
std::vector<std::vector<T>> result;
for (const auto& lst : l2) {
std::vector<T> inner;
for (const auto& n : lst) {
if (std::find(l1.begin(), l1.end(), n) != l1.end()) {
... | int main() {
{
std::vector<int> l1 = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14};
std::vector<std::vector<int>> l2 = {
{12, 18, 23, 25, 45},
{7, 11, 19, 24, 28},
{1, 5, 8, 18, 15, 16}
};
std::vector<std::vector<int>> expected = {
... | O2 | cpp | std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > func0<int>(std::vector<int, std::allocator<int> > const&, std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&):
endbr64
push %r15
push %r14
p... | _Z5func0IiESt6vectorIS0_IT_SaIS1_EESaIS3_EERKS3_RKS5_:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
mov r13, rdi
push r12
push rbp
push rbx
sub rsp, 48h
mov rax, fs:28h
mov [rsp+78h+var_40], rax
xor eax, eax
mov qword ptr [rdi+10h], 0
movups xmmword ptr [rdi], xmm0
mo... | long long func0<int>(long long a1, long long a2, int ***a3, long long a4)
{
int **v5; // rbp
int *v7; // r12
int *v8; // r14
_DWORD *v9; // rsi
_DWORD *v10; // rax
long long v11; // rdx
long long v12; // rdx
int v13; // edx
char *v14; // rsi
_QWORD *v15; // r12
_QWORD *v16; // rsi
_DWORD *v17; ... | func0<int>:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
PUSH R13
MOV R13,RDI
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x48
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
MOV qword ptr [RDI + 0x10],0x0
MOVUPS xmmword ptr [RDI],XMM0
MOV RAX,qword ptr [RDX + 0x8]
MOV RBP,qword ptr [RDX]
MOV qword ptr [RSP +... | /* std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > > func0<int>(std::vector<int, std::allocator<int> > const&,
std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > > const&) */
vector<std::vector... |
1,191 | func0 | #include <vector>
#include <string>
#include <cassert>
#include <algorithm>
template <typename T>
| std::vector<std::vector<T>> func0(const std::vector<T>& l1, const std::vector<std::vector<T>>& l2) {
std::vector<std::vector<T>> result;
for (const auto& lst : l2) {
std::vector<T> inner;
for (const auto& n : lst) {
if (std::find(l1.begin(), l1.end(), n) != l1.end()) {
... | int main() {
{
std::vector<int> l1 = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14};
std::vector<std::vector<int>> l2 = {
{12, 18, 23, 25, 45},
{7, 11, 19, 24, 28},
{1, 5, 8, 18, 15, 16}
};
std::vector<std::vector<int>> expected = {
... | O3 | cpp | std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > func0<int>(std::vector<int, std::allocator<int> > const&, std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&):
endbr64
push %r15
pxor %xmm0,... | _Z5func0IiESt6vectorIS0_IT_SaIS1_EESaIS3_EERKS3_RKS5_:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
mov r13, rdi
push r12
push rbp
push rbx
mov rbx, rsi
sub rsp, 48h
mov rax, fs:28h
mov [rsp+78h+var_40], rax
xor eax, eax
mov qword ptr [rdi+10h], 0
movups xmmword p... | long long func0<int>(long long a1, long long a2, int ***a3, long long a4)
{
int **v6; // r12
int *v7; // rbp
int *v8; // r14
_DWORD *v9; // rsi
_DWORD *v10; // rax
long long v11; // rdx
long long v12; // rdx
int v13; // edx
char *v14; // rsi
_QWORD *v15; // rbp
_QWORD *v16; // rsi
_DWORD *v17; ... | func0<int>:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
PUSH R13
MOV R13,RDI
PUSH R12
PUSH RBP
PUSH RBX
MOV RBX,RSI
SUB RSP,0x48
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
MOV qword ptr [RDI + 0x10],0x0
MOVUPS xmmword ptr [RDI],XMM0
MOV RAX,qword ptr [RDX + 0x8]
MOV R12,qword ptr [RDX]
MOV qwor... | /* std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > > func0<int>(std::vector<int, std::allocator<int> > const&,
std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > > const&) */
vector<std::vector... |
1,192 | func0 |
#include <cassert>
#include <string>
#include <vector>
#include <unordered_map>
#include <utility>
| std::pair<std::string, int> func0(const std::vector<std::pair<std::string, int>>& stdata) {
std::unordered_map<std::string, int> temp;
for (const auto& pair : stdata) {
temp[pair.first] += pair.second;
}
std::pair<std::string, int> max_item;
bool first = true;
for (const auto& kv ... | int main() {
assert(func0({{"Juan Whelan",90},{"Sabah Colley",88},{"Peter Nichols",7},{"Juan Whelan",122},{"Sabah Colley",84}}) == std::make_pair(std::string("Juan Whelan"), 212));
assert(func0({{"Juan Whelan",50},{"Sabah Colley",48},{"Peter Nichols",37},{"Juan Whelan",22},{"Sabah Colley",14}}) == std::make_p... | 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 $0x98,%rsp
mov %rdi,-0... | _Z5func0RKSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiESaIS7_EE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 98h
mov [rbp+var_98], rdi
mov [rbp+var_A0], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_50]
mov rdi, rax
call... | long long func0(long long a1, long long a2)
{
_DWORD *v2; // rax
char v4; // [rsp+1Fh] [rbp-81h]
long long v5; // [rsp+20h] [rbp-80h] BYREF
_QWORD v6[2]; // [rsp+28h] [rbp-78h] BYREF
_BYTE *v7; // [rsp+38h] [rbp-68h]
long long v8; // [rsp+40h] [rbp-60h]
long long v9; // [rsp+48h] [rbp-58h]
_BYTE v10[56... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x98
MOV qword ptr [RBP + -0x98],RDI
MOV qword ptr [RBP + -0xa0],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x50]
MOV RDI,RAX
CALL 0x001035c8
MOV RAX,qword ptr [RBP + -0xa0]
MOV qword ptr [RBP + -0x70],RAX
MOV RAX,qwor... | /* func0(std::vector<std::pair<std::string, int>, std::allocator<std::pair<std::string, int> > >
const&) */
vector * func0(vector *param_1)
{
bool bVar1;
char cVar2;
int *piVar3;
vector<std::pair<std::string,int>,std::allocator<std::pair<std::string,int>>> *in_RSI;
long in_FS_OFFSET;
int8 local_88;
i... |
1,193 | func0 |
#include <cassert>
#include <string>
#include <vector>
#include <unordered_map>
#include <utility>
| std::pair<std::string, int> func0(const std::vector<std::pair<std::string, int>>& stdata) {
std::unordered_map<std::string, int> temp;
for (const auto& pair : stdata) {
temp[pair.first] += pair.second;
}
std::pair<std::string, int> max_item;
bool first = true;
for (const auto& kv ... | int main() {
assert(func0({{"Juan Whelan",90},{"Sabah Colley",88},{"Peter Nichols",7},{"Juan Whelan",122},{"Sabah Colley",84}}) == std::make_pair(std::string("Juan Whelan"), 212));
assert(func0({{"Juan Whelan",50},{"Sabah Colley",48},{"Peter Nichols",37},{"Juan Whelan",22},{"Sabah Colley",14}}) == std::make_p... | 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 %r13
push %r12
push %rbp
push %rbx
sub $0x48,%rsp
mov ... | _Z5func0RKSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiESaIS7_EE:
endbr64
push r13
push r12
push rbp
push rbx
sub rsp, 48h
mov rbp, rdi
mov rax, fs:28h
mov [rsp+68h+var_30], rax
xor eax, eax
lea rax, [rsp+68h+var_38]
mov [rsp+68h+var_68], rax
mov [rs... | long long func0(long long a1, long long *a2)
{
long long v2; // rbx
long long v3; // r12
_DWORD *v4; // rax
long long *v5; // rbx
char v6; // al
_QWORD v8[2]; // [rsp+0h] [rbp-68h] BYREF
long long *v9; // [rsp+10h] [rbp-58h]
long long v10; // [rsp+18h] [rbp-50h]
int v11; // [rsp+20h] [rbp-48h]
long... | func0:
ENDBR64
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x48
MOV RBP,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
LEA RAX,[RSP + 0x30]
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x8],0x1
MOV qword ptr [RSP + 0x10],0x0
MOV qword ptr [RSP + 0x18],0x0
MOV dword ptr [RSP + 0x20],0x3f80000... | /* func0(std::vector<std::pair<std::string, int>, std::allocator<std::pair<std::string, int> > >
const&) */
vector * func0(vector *param_1)
{
string *psVar1;
bool bVar2;
int *piVar3;
string *psVar4;
long *plVar5;
int8 *in_RSI;
long in_FS_OFFSET;
int8 *local_68;
int8 local_60;
long *local_58;
... |
1,194 | func0 |
#include <cassert>
#include <string>
#include <vector>
#include <unordered_map>
#include <utility>
| std::pair<std::string, int> func0(const std::vector<std::pair<std::string, int>>& stdata) {
std::unordered_map<std::string, int> temp;
for (const auto& pair : stdata) {
temp[pair.first] += pair.second;
}
std::pair<std::string, int> max_item;
bool first = true;
for (const auto& kv ... | int main() {
assert(func0({{"Juan Whelan",90},{"Sabah Colley",88},{"Peter Nichols",7},{"Juan Whelan",122},{"Sabah Colley",84}}) == std::make_pair(std::string("Juan Whelan"), 212));
assert(func0({{"Juan Whelan",50},{"Sabah Colley",48},{"Peter Nichols",37},{"Juan Whelan",22},{"Sabah Colley",14}}) == std::make_p... | 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 %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
s... | _Z5func0RKSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiESaIS7_EE:
endbr64
push r13
push r12
push rbp
mov rbp, rdi
push rbx
sub rsp, 48h
mov rbx, [rsi]
mov r13, [rsi+8]
mov rax, fs:28h
mov [rsp+68h+var_30], rax
xor eax, eax
lea rax, [rsp+68h+var_38]
m... | long long func0(long long a1, long long *a2)
{
long long v2; // rbx
long long v3; // r13
_DWORD *v4; // rax
int v5; // edx
long long *v6; // rbx
int v7; // eax
_QWORD v9[2]; // [rsp+0h] [rbp-68h] BYREF
long long *v10; // [rsp+10h] [rbp-58h]
long long v11; // [rsp+18h] [rbp-50h]
int v12; // [rsp+20h... | func0:
ENDBR64
PUSH R13
PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
SUB RSP,0x48
MOV RBX,qword ptr [RSI]
MOV R13,qword ptr [RSI + 0x8]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
LEA RAX,[RSP + 0x30]
MOV R12,RSP
MOV qword ptr [RSP + 0x8],0x1
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x10],0x0
M... | /* func0(std::vector<std::pair<std::string, int>, std::allocator<std::pair<std::string, int> > >
const&) */
vector * func0(vector *param_1)
{
string *psVar1;
string *psVar2;
int8 *puVar3;
int *piVar4;
string *psVar5;
int8 *puVar6;
long *in_RSI;
long in_FS_OFFSET;
int8 *local_68;
int8 local_60;
... |
1,195 | func0 |
#include <cassert>
#include <string>
#include <vector>
#include <unordered_map>
#include <utility>
| std::pair<std::string, int> func0(const std::vector<std::pair<std::string, int>>& stdata) {
std::unordered_map<std::string, int> temp;
for (const auto& pair : stdata) {
temp[pair.first] += pair.second;
}
std::pair<std::string, int> max_item;
bool first = true;
for (const auto& kv ... | int main() {
assert(func0({{"Juan Whelan",90},{"Sabah Colley",88},{"Peter Nichols",7},{"Juan Whelan",122},{"Sabah Colley",84}}) == std::make_pair(std::string("Juan Whelan"), 212));
assert(func0({{"Juan Whelan",50},{"Sabah Colley",48},{"Peter Nichols",37},{"Juan Whelan",22},{"Sabah Colley",14}}) == std::make_p... | 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 %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
s... | _Z5func0RKSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiESaIS7_EE:
endbr64
push r14
push r13
push r12
push rbp
mov rbp, rdi
push rbx
sub rsp, 40h
mov rbx, [rsi]
mov r13, [rsi+8]
mov rax, fs:28h
mov [rsp+68h+var_30], rax
xor eax, eax
lea r12, [rsp+6... | long long func0(long long a1, long long *a2)
{
long long v3; // rbx
long long v4; // r13
_DWORD *v5; // rax
int v6; // edx
_DWORD *v7; // rbx
int v8; // eax
_QWORD *v9; // rbx
_QWORD *v10; // rdi
_QWORD *v11; // r13
void *s; // [rsp+0h] [rbp-68h] BYREF
long long v14; // [rsp+8h] [rbp-60h]
void ... | func0:
ENDBR64
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
SUB RSP,0x40
MOV RBX,qword ptr [RSI]
MOV R13,qword ptr [RSI + 0x8]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
LEA R12,[RSP + 0x30]
MOV R14,RSP
MOV qword ptr [RSP + 0x8],0x1
MOV qword ptr [RSP],R12
MOV qword ptr [RSP + 0x... | /* func0(std::vector<std::pair<std::string, int>, std::allocator<std::pair<std::string, int> > >
const&) */
vector * func0(vector *param_1)
{
string *psVar1;
string *psVar2;
int8 *puVar3;
int *piVar4;
string *psVar5;
int8 *puVar6;
long *in_RSI;
long in_FS_OFFSET;
int8 *local_68;
long local_60;
... |
1,196 | func0 |
#include <assert.h>
#include <iostream>
| double func0(int n) {
double nCr = 1;
double res = 1;
for (int r = 1; r <= n; ++r) {
nCr = (nCr * (n + 1 - r)) / r;
res += nCr * nCr;
}
return res;
}
| int main() {
assert(func0(1) == 2.0);
assert(func0(2) == 6.0);
assert(func0(3) == 20.0);
std::cout << "All test cases passed." << std::endl;
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x24(%rbp)
movsd 0xecc(%rip),%xmm0
movsd %xmm0,-0x10(%rbp)
movsd 0xebf(%rip),%xmm0
movsd %xmm0,-0x8(%rbp)
movl $0x1,-0x14(%rbp)
mov -0x14(%rbp),%eax
cmp -0x24(%rbp),%eax
jg 123a <_Z5func0i+0x71>
mov -0x24(%rbp),%eax
add $0x1,%eax
sub ... | _Z5func0i:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_24], edi
movsd xmm0, cs:qword_2088
movsd [rbp+var_10], xmm0
movsd xmm0, cs:qword_2088
movsd [rbp+var_8], xmm0
mov [rbp+var_14], 1
jmp short loc_11FA
loc_11B7:
mov eax, [rbp+var_24]
add eax, 1
sub eax, [rbp+var_14]
pxor xmm0,... | double func0(int a1)
{
int i; // [rsp+10h] [rbp-14h]
double v3; // [rsp+14h] [rbp-10h]
double v4; // [rsp+1Ch] [rbp-8h]
v3 = 1.0;
v4 = 1.0;
for ( i = 1; i <= a1; ++i )
{
v3 = (double)(a1 + 1 - i) * v3 / (double)i;
v4 = v3 * v3 + v4;
}
return v4;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x24],EDI
MOVSD XMM0,qword ptr [0x00102088]
MOVSD qword ptr [RBP + -0x10],XMM0
MOVSD XMM0,qword ptr [0x00102088]
MOVSD qword ptr [RBP + -0x8],XMM0
MOV dword ptr [RBP + -0x14],0x1
JMP 0x001011fa
LAB_001011b7:
MOV EAX,dword ptr [RBP + -0x24]
ADD EAX,0x1
SUB EAX,dw... | /* func0(int) */
double func0(int param_1)
{
int4 local_1c;
int8 local_18;
int8 local_10;
local_18 = DAT_00102088;
local_10 = DAT_00102088;
for (local_1c = 1; local_1c <= param_1; local_1c = local_1c + 1) {
local_18 = ((double)((param_1 + 1) - local_1c) * local_18) / (double)local_1c;
local_10 ... |
1,197 | func0 |
#include <assert.h>
#include <iostream>
| double func0(int n) {
double nCr = 1;
double res = 1;
for (int r = 1; r <= n; ++r) {
nCr = (nCr * (n + 1 - r)) / r;
res += nCr * nCr;
}
return res;
}
| int main() {
assert(func0(1) == 2.0);
assert(func0(2) == 6.0);
assert(func0(3) == 20.0);
std::cout << "All test cases passed." << std::endl;
return 0;
}
| O1 | cpp | func0(int):
endbr64
test %edi,%edi
jle 121b <_Z5func0i+0x52>
add $0x1,%edi
mov %edi,%ecx
mov $0x1,%eax
movsd 0xebd(%rip),%xmm2
movapd %xmm2,%xmm0
mov %edi,%edx
sub %eax,%edx
pxor %xmm1,%xmm1
cvtsi2sd %edx,%xmm1
mulsd %xmm1,%xmm0
pxor %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
divsd %xmm1,%xmm0
movapd %x... | _Z5func0i:
endbr64
test edi, edi
jle short loc_11D9
add edi, 1
mov eax, 1
movsd xmm1, cs:qword_2078
movapd xmm0, xmm1
loc_11A5:
mov edx, edi
sub edx, eax
pxor xmm2, xmm2
cvtsi2sd xmm2, edx
mulsd xmm0, xmm2
pxor xmm2, xmm2
cvtsi2sd xmm2, eax
divsd xmm0, xmm2
movapd xmm2, xmm0
mulsd ... | __int128 __usercall func0@<xmm0>(int a1@<edi>)
{
int v1; // edi
int v2; // eax
__int128 v3; // xmm1
double v4; // xmm0_8
if ( a1 <= 0 )
return 0x3FF0000000000000uLL;
v1 = a1 + 1;
v2 = 1;
v3 = 0x3FF0000000000000uLL;
v4 = 1.0;
do
{
v4 = v4 * (double)(v1 - v2) / (double)v2;
*(double *)&v... | func0:
ENDBR64
TEST EDI,EDI
JLE 0x001011d9
ADD EDI,0x1
MOV EAX,0x1
MOVSD XMM1,qword ptr [0x00102078]
MOVAPD XMM0,XMM1
LAB_001011a5:
MOV EDX,EDI
SUB EDX,EAX
PXOR XMM2,XMM2
CVTSI2SD XMM2,EDX
MULSD XMM0,XMM2
PXOR XMM2,XMM2
CVTSI2SD XMM2,EAX
DIVSD XMM0,XMM2
MOVAPD XMM2,XMM0
MULSD XMM2,XMM0
ADDSD XMM1,XMM2
ADD EAX,0x1
CMP E... | /* func0(int) */
double func0(int param_1)
{
int iVar1;
double dVar2;
double dVar3;
dVar3 = DAT_00102078;
if (0 < param_1) {
iVar1 = 1;
dVar2 = DAT_00102078;
do {
dVar2 = (dVar2 * (double)((param_1 + 1) - iVar1)) / (double)iVar1;
dVar3 = dVar3 + dVar2 * dVar2;
iVar1 = iVar1 ... |
1,198 | func0 |
#include <assert.h>
#include <iostream>
| double func0(int n) {
double nCr = 1;
double res = 1;
for (int r = 1; r <= n; ++r) {
nCr = (nCr * (n + 1 - r)) / r;
res += nCr * nCr;
}
return res;
}
| int main() {
assert(func0(1) == 2.0);
assert(func0(2) == 6.0);
assert(func0(3) == 20.0);
std::cout << "All test cases passed." << std::endl;
return 0;
}
| O2 | cpp | func0(int):
endbr64
test %edi,%edi
jle 1288 <_Z5func0i+0x58>
movsd 0xde0(%rip),%xmm2
add $0x1,%edi
mov $0x1,%eax
movapd %xmm2,%xmm0
nopl 0x0(%rax)
mov %edi,%edx
pxor %xmm1,%xmm1
sub %eax,%edx
cvtsi2sd %edx,%xmm1
mulsd %xmm1,%xmm0
pxor %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
add $0x1,%eax
divsd %xmm... | _Z5func0i:
endbr64
test edi, edi
jle short loc_1398
movsd xmm1, cs:qword_2078
add edi, 1
mov eax, 1
movapd xmm0, xmm1
nop dword ptr [rax+00h]
loc_1360:
mov edx, edi
pxor xmm2, xmm2
sub edx, eax
cvtsi2sd xmm2, edx
mulsd xmm0, xmm2
pxor xmm2, xmm2
cvtsi2sd xmm2, eax
add eax, 1
di... | double func0(int a1)
{
double v1; // xmm1_8
int v2; // edi
int v3; // eax
double v4; // xmm0_8
int v5; // edx
double v6; // xmm2_8
if ( a1 <= 0 )
return 1.0;
v1 = 1.0;
v2 = a1 + 1;
v3 = 1;
v4 = 1.0;
do
{
v5 = v2 - v3;
v6 = (double)v3++;
v4 = v4 * (double)v5 / v6;
v1 = v1 ... | func0:
ENDBR64
TEST EDI,EDI
JLE 0x00101398
MOVSD XMM1,qword ptr [0x00102078]
ADD EDI,0x1
MOV EAX,0x1
MOVAPD XMM0,XMM1
NOP dword ptr [RAX]
LAB_00101360:
MOV EDX,EDI
PXOR XMM2,XMM2
SUB EDX,EAX
CVTSI2SD XMM2,EDX
MULSD XMM0,XMM2
PXOR XMM2,XMM2
CVTSI2SD XMM2,EAX
ADD EAX,0x1
DIVSD XMM0,XMM2
MOVAPD XMM2,XMM0
MULSD XMM2,XMM0
A... | /* func0(int) */
double func0(int param_1)
{
int iVar1;
int iVar2;
double dVar3;
double dVar4;
double dVar5;
if (0 < param_1) {
iVar1 = 1;
dVar3 = DAT_00102078;
dVar4 = DAT_00102078;
do {
iVar2 = (param_1 + 1) - iVar1;
dVar5 = (double)iVar1;
iVar1 = iVar1 + 1;
dV... |
1,199 | func0 |
#include <assert.h>
#include <iostream>
| double func0(int n) {
double nCr = 1;
double res = 1;
for (int r = 1; r <= n; ++r) {
nCr = (nCr * (n + 1 - r)) / r;
res += nCr * nCr;
}
return res;
}
| int main() {
assert(func0(1) == 2.0);
assert(func0(2) == 6.0);
assert(func0(3) == 20.0);
std::cout << "All test cases passed." << std::endl;
return 0;
}
| O3 | cpp | func0(int):
endbr64
test %edi,%edi
jle 1288 <_Z5func0i+0x58>
movsd 0xde0(%rip),%xmm2
add $0x1,%edi
mov $0x1,%eax
movapd %xmm2,%xmm0
nopl 0x0(%rax)
mov %edi,%edx
pxor %xmm1,%xmm1
sub %eax,%edx
cvtsi2sd %edx,%xmm1
mulsd %xmm1,%xmm0
pxor %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
add $0x1,%eax
divsd %xmm... | _Z5func0i:
endbr64
test edi, edi
jle short loc_12A8
movsd xmm1, cs:qword_2020
add edi, 1
mov eax, 1
movapd xmm0, xmm1
nop dword ptr [rax+00h]
loc_1270:
mov edx, edi
pxor xmm2, xmm2
sub edx, eax
cvtsi2sd xmm2, edx
mulsd xmm0, xmm2
pxor xmm2, xmm2
cvtsi2sd xmm2, eax
add eax, 1
di... | double func0(int a1)
{
double v1; // xmm1_8
int v2; // edi
int v3; // eax
double v4; // xmm0_8
int v5; // edx
double v6; // xmm2_8
if ( a1 <= 0 )
return 1.0;
v1 = 1.0;
v2 = a1 + 1;
v3 = 1;
v4 = 1.0;
do
{
v5 = v2 - v3;
v6 = (double)v3++;
v4 = v4 * (double)v5 / v6;
v1 = v1 ... | func0:
ENDBR64
TEST EDI,EDI
JLE 0x001012a8
MOVSD XMM1,qword ptr [0x00102020]
ADD EDI,0x1
MOV EAX,0x1
MOVAPD XMM0,XMM1
NOP dword ptr [RAX]
LAB_00101270:
MOV EDX,EDI
PXOR XMM2,XMM2
SUB EDX,EAX
CVTSI2SD XMM2,EDX
MULSD XMM0,XMM2
PXOR XMM2,XMM2
CVTSI2SD XMM2,EAX
ADD EAX,0x1
DIVSD XMM0,XMM2
MOVAPD XMM2,XMM0
MULSD XMM2,XMM0
A... | /* func0(int) */
double func0(int param_1)
{
int iVar1;
int iVar2;
double dVar3;
double dVar4;
double dVar5;
if (0 < param_1) {
iVar1 = 1;
dVar3 = DAT_00102020;
dVar4 = DAT_00102020;
do {
iVar2 = (param_1 + 1) - iVar1;
dVar5 = (double)iVar1;
iVar1 = iVar1 + 1;
dV... |
1,200 | func0 |
#include <cassert>
#include <map>
#include <string>
#include <variant>
#include <algorithm>
#include <memory>
// Forward declaration
struct Dict;
// Define the variant type for values
using Value = std::variant<int, std::string, std::shared_ptr<Dict>>;
// Define the Dict structure
struct Dict {
... | int func0(const Dict& d) {
if (d.data.empty()) {
return 1;
}
int max_depth = 0;
for (const auto& [key, value] : d.data) {
int depth = 0;
if (auto dict_ptr = std::get_if<std::shared_ptr<Dict>>(&value)) {
depth = func0(**dict_ptr);
} else {
... | int main() {
// First test case
Dict d1;
d1.data["a"] = 1;
Dict d1_b;
Dict d1_b_c;
Dict d1_b_c_d;
d1_b_c.data["d"] = std::make_shared<Dict>(d1_b_c_d);
d1_b.data["c"] = std::make_shared<Dict>(d1_b_c);
d1.data["b"] = std::make_shared<Dict>(d1_b);
assert(func0(d1) == 4);
... | O0 | cpp | func0(Dict const&):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x60,%rsp
mov %rdi,-0x58(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x8(%rbp)
xor %eax,%eax
mov -0x58(%rbp),%rax
mov %rax,%rdi
callq 387e <_ZNKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt7variantIJiS5_St10shared_ptrI4DictEEESt4l... | _Z5func0RK4Dict:
endbr64
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_58], rdi
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
mov rax, [rbp+var_58]
mov rdi, rax
call _ZNKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt7variantIJiS5_St10shared_ptrI4DictEEESt4lessI... | long long func0(const Dict *a1)
{
const Dict *v2; // rax
int v3; // [rsp+18h] [rbp-48h]
int v4; // [rsp+1Ch] [rbp-44h]
long long v5; // [rsp+20h] [rbp-40h] BYREF
_QWORD v6[2]; // [rsp+28h] [rbp-38h] BYREF
long long v7; // [rsp+38h] [rbp-28h]
long long v8; // [rsp+40h] [rbp-20h]
long long v9; // [rsp+48... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x58],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x58]
MOV RDI,RAX
CALL 0x001039c2
TEST AL,AL
JZ 0x001025a2
MOV EAX,0x1
JMP 0x0010267f
LAB_001025a2:
MOV dword ptr [RBP + -0x48],0x0
MOV RAX,qw... | /* func0(Dict const&) */
int func0(Dict *param_1)
{
char cVar1;
type tVar2;
int4 extraout_var;
Dict *pDVar3;
long in_FS_OFFSET;
int local_50;
int local_4c;
int8 local_48;
int8 local_40;
map<std::string,std::variant<int,std::string,std::shared_ptr<Dict>>,std::less<std::string>,std::allocator<std::p... |
1,201 | func0 |
#include <cassert>
#include <map>
#include <string>
#include <variant>
#include <algorithm>
#include <memory>
// Forward declaration
struct Dict;
// Define the variant type for values
using Value = std::variant<int, std::string, std::shared_ptr<Dict>>;
// Define the Dict structure
struct Dict {
... | int func0(const Dict& d) {
if (d.data.empty()) {
return 1;
}
int max_depth = 0;
for (const auto& [key, value] : d.data) {
int depth = 0;
if (auto dict_ptr = std::get_if<std::shared_ptr<Dict>>(&value)) {
depth = func0(**dict_ptr);
} else {
... | int main() {
// First test case
Dict d1;
d1.data["a"] = 1;
Dict d1_b;
Dict d1_b_c;
Dict d1_b_c_d;
d1_b_c.data["d"] = std::make_shared<Dict>(d1_b_c_d);
d1_b.data["c"] = std::make_shared<Dict>(d1_b_c);
d1.data["b"] = std::make_shared<Dict>(d1_b);
assert(func0(d1) == 4);
... | O1 | cpp | func0(Dict const&):
endbr64
mov $0x1,%eax
cmpq $0x0,0x28(%rdi)
je 2434 <_Z5func0RK4Dict+0x6b>
push %r13
push %r12
push %rbp
push %rbx
sub $0x8,%rsp
mov 0x18(%rdi),%rbx
lea 0x8(%rdi),%r12
mov $0x0,%ebp
cmp %r12,%rbx
je 2426 <_Z5func0RK4Dict+0x5d>
mov $0x0,%r13d
jmp 2412 <_Z5func... | _Z5func0RK4Dict:
endbr64
mov eax, 1
cmp qword ptr [rdi+28h], 0
jz short locret_2454
push r13
push r12
push rbp
push rbx
sub rsp, 8
mov rbx, [rdi+18h]
lea r12, [rdi+8]
mov ebp, 0
cmp rbx, r12
jz short loc_2446
mov r13d, 0
jmp short loc_2432
loc_241D:
cmp ebp,... | long long func0(long long a1)
{
long long result; // rax
long long v2; // rbx
int i; // ebp
int v4; // eax
result = 1LL;
if ( *(_QWORD *)(a1 + 40) )
{
v2 = *(_QWORD *)(a1 + 24);
for ( i = 0; a1 + 8 != v2; v2 = std::_Rb_tree_increment(v2) )
{
v4 = 0;
if ( *(_BYTE *)(v2 + 96) == 2 ... | func0:
ENDBR64
MOV EAX,0x1
CMP qword ptr [RDI + 0x28],0x0
JZ 0x00102454
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV RBX,qword ptr [RDI + 0x18]
LEA R12,[RDI + 0x8]
MOV EBP,0x0
CMP RBX,R12
JZ 0x00102446
MOV R13D,0x0
JMP 0x00102432
LAB_0010241d:
CMP EBP,EAX
CMOVL EBP,EAX
MOV RDI,RBX
CALL 0x00102270
MOV RBX,RAX
CMP... | /* func0(Dict const&) */
int func0(Dict *param_1)
{
int iVar1;
_Rb_tree_node_base *p_Var2;
int iVar3;
if (*(long *)(param_1 + 0x28) != 0) {
iVar3 = 0;
for (p_Var2 = *(_Rb_tree_node_base **)(param_1 + 0x18);
p_Var2 != (_Rb_tree_node_base *)(param_1 + 8);
p_Var2 = (_Rb_tree_node_base ... |
1,202 | func0 |
#include <cassert>
#include <map>
#include <string>
#include <variant>
#include <algorithm>
#include <memory>
// Forward declaration
struct Dict;
// Define the variant type for values
using Value = std::variant<int, std::string, std::shared_ptr<Dict>>;
// Define the Dict structure
struct Dict {
... | int func0(const Dict& d) {
if (d.data.empty()) {
return 1;
}
int max_depth = 0;
for (const auto& [key, value] : d.data) {
int depth = 0;
if (auto dict_ptr = std::get_if<std::shared_ptr<Dict>>(&value)) {
depth = func0(**dict_ptr);
} else {
... | int main() {
// First test case
Dict d1;
d1.data["a"] = 1;
Dict d1_b;
Dict d1_b_c;
Dict d1_b_c_d;
d1_b_c.data["d"] = std::make_shared<Dict>(d1_b_c_d);
d1_b.data["c"] = std::make_shared<Dict>(d1_b_c);
d1.data["b"] = std::make_shared<Dict>(d1_b);
assert(func0(d1) == 4);
... | O2 | cpp | func0(Dict const&):
endbr64
cmpq $0x0,0x28(%rdi)
je 3170 <_Z5func0RK4Dict+0x10>
jmp 3180 <_Z5func0RK4Dict.part.0>
nopl (%rax)
mov $0x1,%eax
retq
nopw %cs:0x0(%rax,%rax,1)
| _Z5func0RK4Dict_part_0:
push r15
mov eax, 1
push r14
lea r14, [rdi+8]
push r13
push r12
push rbp
push rbx
sub rsp, 58h
mov r13, [rdi+18h]
cmp r13, r14
jz loc_3045
mov rax, r13
xor r15d, r15d
mov r13, r14
mov r14, rax
loc_2E40:
xor r12d, r12d
cmp byte pt... | long long func0(long long a1)
{
long long result; // rax
int v2; // r15d
long long v3; // r13
long long v4; // r14
int v5; // r12d
long long v6; // rax
long long v7; // rbp
long long v8; // r13
int v9; // r15d
int v10; // r12d
long long v11; // rbx
long long v12; // rdi
long long v13; // rbx
... | func0:
PUSH R15
MOV EAX,0x1
PUSH R14
LEA R14,[RDI + 0x8]
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x58
MOV R13,qword ptr [RDI + 0x18]
CMP R13,R14
JZ 0x00103045
MOV RAX,R13
XOR R15D,R15D
MOV R13,R14
MOV R14,RAX
LAB_00102e40:
XOR R12D,R12D
CMP byte ptr [R14 + 0x60],0x2
JNZ 0x00103026
MOV RAX,qword ptr [R14 + 0x40]
MOV... | /* func0(Dict const&) [clone .part.0] */
int func0(Dict *param_1)
{
long lVar1;
long lVar2;
long lVar3;
long lVar4;
int iVar5;
int iVar6;
_Rb_tree_node_base *p_Var7;
_Rb_tree_node_base *p_Var8;
_Rb_tree_node_base *p_Var9;
_Rb_tree_node_base *p_Var10;
Dict *pDVar11;
int iVar12;
int iVar13;
... |
1,203 | func0 |
#include <cassert>
#include <map>
#include <string>
#include <variant>
#include <algorithm>
#include <memory>
// Forward declaration
struct Dict;
// Define the variant type for values
using Value = std::variant<int, std::string, std::shared_ptr<Dict>>;
// Define the Dict structure
struct Dict {
... | int func0(const Dict& d) {
if (d.data.empty()) {
return 1;
}
int max_depth = 0;
for (const auto& [key, value] : d.data) {
int depth = 0;
if (auto dict_ptr = std::get_if<std::shared_ptr<Dict>>(&value)) {
depth = func0(**dict_ptr);
} else {
... | int main() {
// First test case
Dict d1;
d1.data["a"] = 1;
Dict d1_b;
Dict d1_b_c;
Dict d1_b_c_d;
d1_b_c.data["d"] = std::make_shared<Dict>(d1_b_c_d);
d1_b.data["c"] = std::make_shared<Dict>(d1_b_c);
d1.data["b"] = std::make_shared<Dict>(d1_b);
assert(func0(d1) == 4);
... | O3 | cpp | func0(Dict const&) [clone .part.0]:
push %r12
lea 0x8(%rdi),%r12
mov $0x1,%eax
push %rbp
push %rbx
mov 0x18(%rdi),%rbp
cmp %r12,%rbp
je 322d <_Z5func0RK4Dict.part.0+0x4d>
xor %ebx,%ebx
xor %eax,%eax
cmpb $0x2,0x60(%rbp)
jne 3215 <_Z5func0RK4Dict.part.0+0x35>
mov 0x40(%rbp),%rdi
mov ... | _Z5func0RK4Dict_part_0:
push r15
mov eax, 1
push r14
lea r14, [rdi+8]
push r13
push r12
push rbp
push rbx
sub rsp, 58h
mov r13, [rdi+18h]
cmp r13, r14
jz loc_20D5
mov rax, r13
xor r15d, r15d
mov r13, r14
mov r14, rax
loc_1ED0:
xor r12d, r12d
cmp byte pt... | long long func0(long long a1)
{
long long result; // rax
int v2; // r15d
long long v3; // r13
long long v4; // r14
int v5; // r12d
long long v6; // rax
long long v7; // rbp
long long v8; // r13
int v9; // r15d
int v10; // r12d
long long v11; // rbx
long long v12; // rdi
long long v13; // rbx
... | func0:
PUSH R15
MOV EAX,0x1
PUSH R14
LEA R14,[RDI + 0x8]
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x58
MOV R13,qword ptr [RDI + 0x18]
CMP R13,R14
JZ 0x001020d5
MOV RAX,R13
XOR R15D,R15D
MOV R13,R14
MOV R14,RAX
LAB_00101ed0:
XOR R12D,R12D
CMP byte ptr [R14 + 0x60],0x2
JNZ 0x001020b6
MOV RAX,qword ptr [R14 + 0x40]
MOV... | /* func0(Dict const&) [clone .part.0] */
int func0(Dict *param_1)
{
long lVar1;
long lVar2;
long lVar3;
long lVar4;
int iVar5;
int iVar6;
_Rb_tree_node_base *p_Var7;
_Rb_tree_node_base *p_Var8;
_Rb_tree_node_base *p_Var9;
_Rb_tree_node_base *p_Var10;
Dict *pDVar11;
int iVar12;
int iVar13;
... |
1,204 | func0 | #include <assert.h>
| int func0(int n) {
if (n == 0) {
return 0;
}
int msb = 0;
n = n / 2;
while (n > 0) {
n = n / 2;
msb++;
}
return (1 << msb);
}
| int main() {
assert(func0(6) == 4);
assert(func0(10) == 8);
assert(func0(18) == 16);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
cmpl $0x0,-0x14(%rbp)
jne 1161 <_Z5func0i+0x18>
mov $0x0,%eax
jmp 11a0 <_Z5func0i+0x57>
movl $0x0,-0x4(%rbp)
mov -0x14(%rbp),%eax
mov %eax,%edx
shr $0x1f,%edx
add %edx,%eax
sar %eax
mov %eax,-0x14(%rbp)
cmpl $0x0,-... | _Z5func0i:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_14], edi
cmp [rbp+var_14], 0
jnz short loc_1161
mov eax, 0
jmp short loc_11A0
loc_1161:
mov [rbp+var_4], 0
mov eax, [rbp+var_14]
mov edx, eax
shr edx, 1Fh
add eax, edx
sar eax, 1
mov [rbp+var_14], eax
jmp sh... | long long func0(int a1)
{
int i; // [rsp+0h] [rbp-14h]
char v3; // [rsp+10h] [rbp-4h]
if ( !a1 )
return 0LL;
v3 = 0;
for ( i = a1 / 2; i > 0; i /= 2 )
++v3;
return (unsigned int)(1 << v3);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x14],EDI
CMP dword ptr [RBP + -0x14],0x0
JNZ 0x00101161
MOV EAX,0x0
JMP 0x001011a0
LAB_00101161:
MOV dword ptr [RBP + -0x4],0x0
MOV EAX,dword ptr [RBP + -0x14]
MOV EDX,EAX
SHR EDX,0x1f
ADD EAX,EDX
SAR EAX,0x1
MOV dword ptr [RBP + -0x14],EAX
JMP 0x0010118c
LAB_0... | /* func0(int) */
int func0(int param_1)
{
byte bVar1;
int iVar2;
int4 local_1c;
if (param_1 == 0) {
iVar2 = 0;
}
else {
bVar1 = 0;
for (local_1c = param_1 / 2; 0 < local_1c; local_1c = local_1c / 2) {
bVar1 = bVar1 + 1;
}
iVar2 = 1 << (bVar1 & 0x1f);
}
return iVar2;
} |
1,205 | func0 | #include <assert.h>
| int func0(int n) {
if (n == 0) {
return 0;
}
int msb = 0;
n = n / 2;
while (n > 0) {
n = n / 2;
msb++;
}
return (1 << msb);
}
| int main() {
assert(func0(6) == 4);
assert(func0(10) == 8);
assert(func0(18) == 16);
return 0;
}
| O1 | cpp | func0(int):
endbr64
mov %edi,%eax
test %edi,%edi
je 117e <_Z5func0i+0x35>
shr $0x1f,%eax
add %edi,%eax
sar %eax
cmp $0x1,%edi
jle 117f <_Z5func0i+0x36>
mov $0x0,%ecx
mov %eax,%edx
mov %eax,%esi
shr $0x1f,%esi
add %esi,%eax
sar %eax
add $0x1,%ecx
cmp $0x1,%edx
jg 1164 ... | _Z5func0i:
endbr64
mov eax, edi
test edi, edi
jz short locret_117E
shr eax, 1Fh
add eax, edi
sar eax, 1
cmp edi, 1
jle short loc_117F
mov ecx, 0
loc_1164:
mov edx, eax
mov esi, eax
shr esi, 1Fh
add eax, esi
sar eax, 1
add ecx, 1
cmp edx, 1
jg short lo... | long long func0(int a1)
{
long long result; // rax
int v2; // eax
char v3; // cl
int v4; // edx
result = (unsigned int)a1;
if ( a1 )
{
v2 = a1 / 2;
if ( a1 <= 1 )
{
v3 = 0;
}
else
{
v3 = 0;
do
{
v4 = v2;
v2 /= 2;
++v3;
}
... | func0:
ENDBR64
MOV EAX,EDI
TEST EDI,EDI
JZ 0x0010117e
SHR EAX,0x1f
ADD EAX,EDI
SAR EAX,0x1
CMP EDI,0x1
JLE 0x0010117f
MOV ECX,0x0
LAB_00101164:
MOV EDX,EAX
MOV ESI,EAX
SHR ESI,0x1f
ADD EAX,ESI
SAR EAX,0x1
ADD ECX,0x1
CMP EDX,0x1
JG 0x00101164
LAB_00101177:
MOV EAX,0x1
SHL EAX,CL
LAB_0010117e:
RET
LAB_0010117f:
MOV ECX,... | /* func0(int) */
int func0(int param_1)
{
bool bVar1;
int iVar2;
byte bVar3;
if (param_1 != 0) {
if (param_1 < 2) {
bVar3 = 0;
}
else {
bVar3 = 0;
iVar2 = param_1 / 2;
do {
bVar3 = bVar3 + 1;
bVar1 = 1 < iVar2;
iVar2 = iVar2 / 2;
} while (bV... |
1,206 | func0 | #include <assert.h>
| int func0(int n) {
if (n == 0) {
return 0;
}
int msb = 0;
n = n / 2;
while (n > 0) {
n = n / 2;
msb++;
}
return (1 << msb);
}
| int main() {
assert(func0(6) == 4);
assert(func0(10) == 8);
assert(func0(18) == 16);
return 0;
}
| O2 | cpp | func0(int):
endbr64
xor %eax,%eax
test %edi,%edi
je 1175 <_Z5func0i+0x35>
mov %edi,%eax
shr $0x1f,%eax
add %edi,%eax
sar %eax
cmp $0x1,%edi
jle 1170 <_Z5func0i+0x30>
xor %ecx,%ecx
nopw 0x0(%rax,%rax,1)
add $0x1,%ecx
sar %eax
jne 1160 <_Z5func0i+0x20>
mov $0x1,%eax
shl %cl,... | _Z5func0i:
endbr64
xor eax, eax
test edi, edi
jz short locret_1175
mov eax, edi
shr eax, 1Fh
add eax, edi
sar eax, 1
cmp edi, 1
jle short loc_1170
xor ecx, ecx
nop word ptr [rax+rax+00h]
loc_1160:
add ecx, 1
sar eax, 1
jnz short loc_1160
mov eax, 1
shl eax... | long long func0(int a1)
{
long long result; // rax
int v2; // eax
char v3; // cl
result = 0LL;
if ( a1 )
{
v2 = a1 / 2;
if ( a1 <= 1 )
{
return 1LL;
}
else
{
v3 = 0;
do
{
++v3;
v2 >>= 1;
}
while ( v2 );
return (unsigned int)... | func0:
ENDBR64
XOR EAX,EAX
TEST EDI,EDI
JZ 0x00101175
MOV EAX,EDI
SHR EAX,0x1f
ADD EAX,EDI
SAR EAX,0x1
CMP EDI,0x1
JLE 0x00101170
XOR ECX,ECX
NOP word ptr [RAX + RAX*0x1]
LAB_00101160:
ADD ECX,0x1
SAR EAX,0x1
JNZ 0x00101160
MOV EAX,0x1
SHL EAX,CL
RET
LAB_00101170:
MOV EAX,0x1
LAB_00101175:
RET | /* func0(int) */
int func0(int param_1)
{
int iVar1;
byte bVar2;
iVar1 = 0;
if (param_1 != 0) {
iVar1 = param_1 / 2;
if (1 < param_1) {
bVar2 = 0;
do {
bVar2 = bVar2 + 1;
iVar1 = iVar1 >> 1;
} while (iVar1 != 0);
return 1 << (bVar2 & 0x1f);
}
iVar1 = ... |
1,207 | func0 | #include <assert.h>
| int func0(int n) {
if (n == 0) {
return 0;
}
int msb = 0;
n = n / 2;
while (n > 0) {
n = n / 2;
msb++;
}
return (1 << msb);
}
| int main() {
assert(func0(6) == 4);
assert(func0(10) == 8);
assert(func0(18) == 16);
return 0;
}
| O3 | cpp | func0(int):
endbr64
xor %eax,%eax
test %edi,%edi
je 1175 <_Z5func0i+0x35>
mov %edi,%eax
shr $0x1f,%eax
add %edi,%eax
sar %eax
cmp $0x1,%edi
jle 1170 <_Z5func0i+0x30>
xor %ecx,%ecx
nopw 0x0(%rax,%rax,1)
add $0x1,%ecx
sar %eax
jne 1160 <_Z5func0i+0x20>
mov $0x1,%eax
shl %cl,... | _Z5func0i:
endbr64
xor eax, eax
test edi, edi
jz short locret_1175
mov eax, edi
shr eax, 1Fh
add eax, edi
sar eax, 1
cmp edi, 1
jle short loc_1170
xor ecx, ecx
nop word ptr [rax+rax+00h]
loc_1160:
add ecx, 1
sar eax, 1
jnz short loc_1160
mov eax, 1
shl eax... | long long func0(int a1)
{
long long result; // rax
int v2; // eax
char v3; // cl
result = 0LL;
if ( a1 )
{
v2 = a1 / 2;
if ( a1 <= 1 )
{
return 1LL;
}
else
{
v3 = 0;
do
{
++v3;
v2 >>= 1;
}
while ( v2 );
return (unsigned int)... | func0:
ENDBR64
XOR EAX,EAX
TEST EDI,EDI
JZ 0x00101175
MOV EAX,EDI
SHR EAX,0x1f
ADD EAX,EDI
SAR EAX,0x1
CMP EDI,0x1
JLE 0x00101170
XOR ECX,ECX
NOP word ptr [RAX + RAX*0x1]
LAB_00101160:
ADD ECX,0x1
SAR EAX,0x1
JNZ 0x00101160
MOV EAX,0x1
SHL EAX,CL
RET
LAB_00101170:
MOV EAX,0x1
LAB_00101175:
RET | /* func0(int) */
int func0(int param_1)
{
int iVar1;
byte bVar2;
iVar1 = 0;
if (param_1 != 0) {
iVar1 = param_1 / 2;
if (1 < param_1) {
bVar2 = 0;
do {
bVar2 = bVar2 + 1;
iVar1 = iVar1 >> 1;
} while (iVar1 != 0);
return 1 << (bVar2 & 0x1f);
}
iVar1 = ... |
1,208 | func0 |
#include <climits> // for INT_MIN
#include <cassert> // for assert
#include <algorithm>
// Function to check if array elements are sorted until the nth element, non-strictly increasing
| bool func0(int a[], int n) {
int mx = INT_MIN; // Initializing to the smallest int value
for (int j = 1; j < n; ++j) {
if (mx > a[j]) {
return false;
}
mx = std::max(mx, a[j - 1]);
}
return true;
}
| int main() {
int arr1[] = {1, 0, 2};
int arr2[] = {1, 2, 0};
int arr3[] = {1, 2, 1};
assert(func0(arr1, 3) == true);
assert(func0(arr2, 3) == false);
assert(func0(arr3, 3) == true);
return 0;
}
| O0 | cpp | func0(int*, int):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x20,%rsp
mov %rdi,-0x18(%rbp)
mov %esi,-0x1c(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x8(%rbp)
xor %eax,%eax
movl $0x80000000,-0x10(%rbp)
movl $0x1,-0xc(%rbp)
mov -0xc(%rbp),%eax
cmp -0x1c(%rbp),%eax
jge 11f3 <_Z5func0Pii+0x8a>
mov ... | _Z5func0Pii:
endbr64
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_18], rdi
mov [rbp+var_1C], esi
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
mov [rbp+var_10], 80000000h
mov [rbp+var_C], 1
jmp short loc_11EB
loc_119B:
mov eax, [rbp+var_C]
cdqe
lea rdx, ds:0[rax... | long long func0(int *a1, int a2)
{
int v3; // [rsp+10h] [rbp-10h] BYREF
int i; // [rsp+14h] [rbp-Ch]
unsigned long long v5; // [rsp+18h] [rbp-8h]
v5 = __readfsqword(0x28u);
v3 = 0x80000000;
for ( i = 1; i < a2; ++i )
{
if ( a1[i] < v3 )
return 0LL;
v3 = *(_DWORD *)std::max<int>(&v3, &a1[i ... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x1c],ESI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
MOV dword ptr [RBP + -0x10],0x80000000
MOV dword ptr [RBP + -0xc],0x1
JMP 0x001011eb
LAB_0010119b:
MOV EAX,dword ptr [RBP + -0xc]
CDQE
L... | /* func0(int*, int) */
int8 func0(int *param_1,int param_2)
{
int *piVar1;
int8 uVar2;
long in_FS_OFFSET;
int local_18;
int local_14;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_18 = -0x80000000;
local_14 = 1;
do {
if (param_2 <= local_14) {
uVar2 = 1;
LAB_001011f8... |
1,209 | func0 |
#include <climits> // for INT_MIN
#include <cassert> // for assert
#include <algorithm>
// Function to check if array elements are sorted until the nth element, non-strictly increasing
| bool func0(int a[], int n) {
int mx = INT_MIN; // Initializing to the smallest int value
for (int j = 1; j < n; ++j) {
if (mx > a[j]) {
return false;
}
mx = std::max(mx, a[j - 1]);
}
return true;
}
| int main() {
int arr1[] = {1, 0, 2};
int arr2[] = {1, 2, 0};
int arr3[] = {1, 2, 1};
assert(func0(arr1, 3) == true);
assert(func0(arr2, 3) == false);
assert(func0(arr3, 3) == true);
return 0;
}
| O1 | cpp | func0(int*, int):
endbr64
sub $0x18,%rsp
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
movl $0x80000000,0x4(%rsp)
cmp $0x1,%esi
jle 11e3 <_Z5func0Pii+0x7a>
mov %rdi,%rax
lea -0x2(%rsi),%edx
lea (%rdi,%rdx,4),%rdi
mov $0x80000000,%edx
lea 0x4(%rsp),%rsi
mov %rax,%rcx
cmp %ed... | _Z5func0Pii:
endbr64
sub rsp, 18h
mov rax, fs:28h
mov [rsp+18h+var_10], rax
xor eax, eax
mov [rsp+18h+var_14], 80000000h
cmp esi, 1
jle short loc_11C6
mov rax, rdi
lea edx, [rsi-2]
lea rdi, [rdi+rdx*4+4]
lea rsi, [rsp+18h+var_14]
loc_119E:
mov rcx, rax
mov edx, [rsp+1... | long long func0(int *a1, int a2)
{
int *v2; // rax
int *v3; // rdi
signed int *v4; // rcx
signed int v6; // [rsp+4h] [rbp-14h] BYREF
unsigned long long v7; // [rsp+8h] [rbp-10h]
v7 = __readfsqword(0x28u);
v6 = 0x80000000;
if ( a2 <= 1 )
return 1LL;
v2 = a1;
v3 = &a1[a2 - 2 + 1];
while ( 1 )
... | func0:
ENDBR64
SUB RSP,0x18
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
MOV dword ptr [RSP + 0x4],0x80000000
CMP ESI,0x1
JLE 0x001011c6
MOV RAX,RDI
LEA EDX,[RSI + -0x2]
LEA RDI,[RDI + RDX*0x4 + 0x4]
LEA RSI,[RSP + 0x4]
LAB_0010119e:
MOV RCX,RAX
MOV EDX,dword ptr [RSP + 0x4]
CMP dword ptr [RAX ... | /* func0(int*, int) */
int8 func0(int *param_1,int param_2)
{
int *piVar1;
int8 uVar2;
int *piVar3;
long in_FS_OFFSET;
int local_14;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_14 = -0x80000000;
if (param_2 < 2) {
uVar2 = 1;
}
else {
piVar1 = param_1 + (ulong)(para... |
1,210 | func0 |
#include <climits> // for INT_MIN
#include <cassert> // for assert
#include <algorithm>
// Function to check if array elements are sorted until the nth element, non-strictly increasing
| bool func0(int a[], int n) {
int mx = INT_MIN; // Initializing to the smallest int value
for (int j = 1; j < n; ++j) {
if (mx > a[j]) {
return false;
}
mx = std::max(mx, a[j - 1]);
}
return true;
}
| int main() {
int arr1[] = {1, 0, 2};
int arr2[] = {1, 2, 0};
int arr3[] = {1, 2, 1};
assert(func0(arr1, 3) == true);
assert(func0(arr2, 3) == false);
assert(func0(arr3, 3) == true);
return 0;
}
| O2 | cpp | func0(int*, int):
endbr64
cmp $0x1,%esi
jle 1180 <_Z5func0Pii+0x40>
lea -0x2(%rsi),%eax
mov $0x80000000,%ecx
lea (%rdi,%rax,4),%rsi
mov $0x80000000,%eax
jmp 1162 <_Z5func0Pii+0x22>
nopl 0x0(%rax)
mov %eax,%ecx
mov (%rdi),%edx
cmp %ecx,%edx
cmovg %edx,%eax
cmp %rsi,%rdi
je 1180 <_... | _Z5func0Pii:
endbr64
cmp esi, 1
jle short loc_12B0
lea eax, [rsi-2]
lea rcx, [rdi+rax*4+4]
mov eax, 80000000h
jmp short loc_12A0
loc_1290:
mov edx, [rdi]
cmp eax, edx
cmovl eax, edx
add rdi, 4
cmp rdi, rcx
jz short loc_12B0
loc_12A0:
cmp [rdi+4], eax
jge short loc_... | long long func0(int *a1, int a2)
{
int *v2; // rcx
int v3; // eax
if ( a2 <= 1 )
return 1LL;
v2 = &a1[a2 - 2 + 1];
v3 = 0x80000000;
while ( a1[1] >= v3 )
{
if ( v3 < *a1 )
v3 = *a1;
if ( ++a1 == v2 )
return 1LL;
}
return 0LL;
} | func0:
ENDBR64
CMP ESI,0x1
JLE 0x001012b0
LEA EAX,[RSI + -0x2]
LEA RCX,[RDI + RAX*0x4 + 0x4]
MOV EAX,0x80000000
JMP 0x001012a0
LAB_00101290:
MOV EDX,dword ptr [RDI]
CMP EAX,EDX
CMOVL EAX,EDX
ADD RDI,0x4
CMP RDI,RCX
JZ 0x001012b0
LAB_001012a0:
CMP dword ptr [RDI + 0x4],EAX
JGE 0x00101290
XOR EAX,EAX
RET
LAB_001012b0:
MO... | /* func0(int*, int) */
int8 func0(int *param_1,int param_2)
{
int *piVar1;
int iVar2;
if (1 < param_2) {
piVar1 = param_1 + (ulong)(param_2 - 2) + 1;
iVar2 = -0x80000000;
do {
if (param_1[1] < iVar2) {
return 0;
}
if (iVar2 < *param_1) {
iVar2 = *param_1;
}... |
1,211 | func0 |
#include <climits> // for INT_MIN
#include <cassert> // for assert
#include <algorithm>
// Function to check if array elements are sorted until the nth element, non-strictly increasing
| bool func0(int a[], int n) {
int mx = INT_MIN; // Initializing to the smallest int value
for (int j = 1; j < n; ++j) {
if (mx > a[j]) {
return false;
}
mx = std::max(mx, a[j - 1]);
}
return true;
}
| int main() {
int arr1[] = {1, 0, 2};
int arr2[] = {1, 2, 0};
int arr3[] = {1, 2, 1};
assert(func0(arr1, 3) == true);
assert(func0(arr2, 3) == false);
assert(func0(arr3, 3) == true);
return 0;
}
| O3 | cpp | func0(int*, int):
endbr64
cmp $0x1,%esi
jle 1170 <_Z5func0Pii+0x30>
lea -0x2(%rsi),%eax
lea (%rdi,%rax,4),%rcx
mov $0x80000000,%eax
nopl (%rax)
mov (%rdi),%edx
cmp %edx,%eax
cmovl %edx,%eax
cmp %rcx,%rdi
je 1170 <_Z5func0Pii+0x30>
add $0x4,%rdi
cmp %eax,0x4(%rdi)
jge 1158 <_Z5fun... | _Z5func0Pii:
endbr64
cmp esi, 1
jle short loc_1180
lea eax, [rsi-2]
lea rcx, [rdi+rax*4+4]
mov eax, 80000000h
jmp short loc_1170
loc_1160:
mov edx, [rdi]
cmp eax, edx
cmovl eax, edx
add rdi, 4
cmp rdi, rcx
jz short loc_1180
loc_1170:
cmp [rdi+4], eax
jge short loc_... | long long func0(int *a1, int a2)
{
int *v2; // rcx
int v3; // eax
if ( a2 <= 1 )
return 1LL;
v2 = &a1[a2 - 2 + 1];
v3 = 0x80000000;
while ( a1[1] >= v3 )
{
if ( v3 < *a1 )
v3 = *a1;
if ( ++a1 == v2 )
return 1LL;
}
return 0LL;
} | func0:
ENDBR64
CMP ESI,0x1
JLE 0x00101180
LEA EAX,[RSI + -0x2]
LEA RCX,[RDI + RAX*0x4 + 0x4]
MOV EAX,0x80000000
JMP 0x00101170
LAB_00101160:
MOV EDX,dword ptr [RDI]
CMP EAX,EDX
CMOVL EAX,EDX
ADD RDI,0x4
CMP RDI,RCX
JZ 0x00101180
LAB_00101170:
CMP dword ptr [RDI + 0x4],EAX
JGE 0x00101160
XOR EAX,EAX
RET
LAB_00101180:
MO... | /* func0(int*, int) */
int8 func0(int *param_1,int param_2)
{
int *piVar1;
int iVar2;
if (1 < param_2) {
piVar1 = param_1 + (ulong)(param_2 - 2) + 1;
iVar2 = -0x80000000;
do {
if (param_1[1] < iVar2) {
return 0;
}
if (iVar2 < *param_1) {
iVar2 = *param_1;
}... |
1,212 | func0 |
#include <vector>
#include <assert.h>
| int func0(const std::vector<int>& arr, const std::vector<std::vector<int>>& ranges, int rotations, int index) {
for (int i = rotations - 1; i >= 0; --i) {
int left = ranges[i][0];
int right = ranges[i][1];
if (left <= index && right >= index) {
if (index == left) {
... | int main() {
assert(func0({1, 2, 3, 4, 5}, {{0, 2}, {0, 3}}, 2, 1) == 3);
assert(func0({1, 2, 3, 4}, {{0, 1}, {0, 2}}, 1, 2) == 3);
assert(func0({1, 2, 3, 4, 5, 6}, {{0, 1}, {0, 2}}, 1, 1) == 1);
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> > const&, std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, int, int):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x30,%rsp
mov %rdi,-0x18(%rbp)
mov %rsi,-0x20(%rbp)
mov %edx,-0x24(%rbp)
mov %ecx... | _Z5func0RKSt6vectorIiSaIiEERKS_IS1_SaIS1_EEii:
endbr64
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_18], rdi
mov [rbp+var_20], rsi
mov [rbp+var_24], edx
mov [rbp+var_28], ecx
mov eax, [rbp+var_24]
sub eax, 1
mov [rbp+var_C], eax
jmp short loc_1344
loc_12CE:
mov eax, [rb... | long long func0(long long a1, long long a2, int a3, int a4)
{
long long v4; // rax
long long v5; // rax
int i; // [rsp+24h] [rbp-Ch]
int v9; // [rsp+28h] [rbp-8h]
int v10; // [rsp+2Ch] [rbp-4h]
for ( i = a3 - 1; i >= 0; --i )
{
v4 = std::vector<std::vector<int>>::operator[](a2, i);
v9 = *(_DWORD... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x18],RDI
MOV qword ptr [RBP + -0x20],RSI
MOV dword ptr [RBP + -0x24],EDX
MOV dword ptr [RBP + -0x28],ECX
MOV EAX,dword ptr [RBP + -0x24]
SUB EAX,0x1
MOV dword ptr [RBP + -0xc],EAX
JMP 0x00101344
LAB_001012ce:
MOV EAX,dword ptr [RBP + -0xc]
MOVSXD R... | /* func0(std::vector<int, std::allocator<int> > const&, std::vector<std::vector<int,
std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, int,
int) */
int4 func0(vector *param_1,vector *param_2,int param_3,int param_4)
{
int iVar1;
int iVar2;
vector<int,std::allocator<i... |
1,213 | func0 |
#include <vector>
#include <assert.h>
| int func0(const std::vector<int>& arr, const std::vector<std::vector<int>>& ranges, int rotations, int index) {
for (int i = rotations - 1; i >= 0; --i) {
int left = ranges[i][0];
int right = ranges[i][1];
if (left <= index && right >= index) {
if (index == left) {
... | int main() {
assert(func0({1, 2, 3, 4, 5}, {{0, 2}, {0, 3}}, 2, 1) == 3);
assert(func0({1, 2, 3, 4}, {{0, 1}, {0, 2}}, 1, 2) == 3);
assert(func0({1, 2, 3, 4, 5, 6}, {{0, 1}, {0, 2}}, 1, 1) == 1);
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> > const&, std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, int, int):
endbr64
test %edx,%edx
jle 1300 <_Z5func0RKSt6vectorIiSaIiEERKS_IS1_SaIS1_EEii+0x57>
mov (%rsi),%r8
movslq %edx,%rax
lea (%rax,... | _Z5func0RKSt6vectorIiSaIiEERKS_IS1_SaIS1_EEii:
endbr64
mov r9, rdi
test edx, edx
jle short loc_1303
mov rdi, [rsi]
movsxd rax, edx
lea rsi, [rax+rax*2]
shl rsi, 3
lea rax, [rdi+rsi-18h]
lea rdi, [rdi+rsi-30h]
lea edx, [rdx-1]
lea rdx, [rdx+rdx*2]
shl rdx, 3
sub rdi, rdx
j... | long long func0(_QWORD *a1, long long *a2, int a3, int a4)
{
long long v5; // rdi
long long v6; // rsi
int **v7; // rax
long long v8; // rdi
int v9; // r8d
bool v10; // zf
int v11; // esi
if ( a3 > 0 )
{
v5 = *a2;
v6 = 24LL * a3;
v7 = (int **)(v5 + v6 - 24);
v8 = v5 + v6 - 48 - 24LL ... | func0:
ENDBR64
MOV R9,RDI
TEST EDX,EDX
JLE 0x00101303
MOV RDI,qword ptr [RSI]
MOVSXD RAX,EDX
LEA RSI,[RAX + RAX*0x2]
SHL RSI,0x3
LEA RAX,[RDI + RSI*0x1 + -0x18]
LEA RDI,[RDI + RSI*0x1 + -0x30]
LEA EDX,[RDX + -0x1]
LEA RDX,[RDX + RDX*0x2]
SHL RDX,0x3
SUB RDI,RDX
JMP 0x001012f1
LAB_001012dc:
LEA R8D,[RCX + -0x1]
CMP ESI,... | /* func0(std::vector<int, std::allocator<int> > const&, std::vector<std::vector<int,
std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, int,
int) */
int4 func0(vector *param_1,vector *param_2,int param_3,int param_4)
{
int iVar1;
int iVar2;
int8 *puVar3;
int iVar4;
... |
1,214 | func0 |
#include <vector>
#include <assert.h>
| int func0(const std::vector<int>& arr, const std::vector<std::vector<int>>& ranges, int rotations, int index) {
for (int i = rotations - 1; i >= 0; --i) {
int left = ranges[i][0];
int right = ranges[i][1];
if (left <= index && right >= index) {
if (index == left) {
... | int main() {
assert(func0({1, 2, 3, 4, 5}, {{0, 2}, {0, 3}}, 2, 1) == 3);
assert(func0({1, 2, 3, 4}, {{0, 1}, {0, 2}}, 1, 2) == 3);
assert(func0({1, 2, 3, 4, 5, 6}, {{0, 1}, {0, 2}}, 1, 1) == 1);
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> > const&, std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, int, int):
endbr64
sub $0x1,%edx
js 1845 <_Z5func0RKSt6vectorIiSaIiEERKS_IS1_SaIS1_EEii+0x55>
movslq %edx,%rax
mov (%rsi),%r8
mov %edx,%... | _Z5func0RKSt6vectorIiSaIiEERKS_IS1_SaIS1_EEii:
endbr64
mov r9, rdi
test edx, edx
jle short loc_188B
movsxd rax, edx
mov rdi, [rsi]
sub edx, 1
lea rsi, [rax+rax*2]
lea rdx, [rdx+rdx*2]
shl rsi, 3
shl rdx, 3
lea rax, [rdi+rsi-18h]
lea rdi, [rdi+rsi-30h]
sub rdi, rdx
nop ... | long long func0(_QWORD *a1, long long *a2, int a3, int a4)
{
long long v5; // rdi
long long v6; // rsi
int **v7; // rax
long long v8; // rdi
int v9; // esi
bool v10; // zf
int v11; // r8d
if ( a3 > 0 )
{
v5 = *a2;
v6 = 24LL * a3;
v7 = (int **)(v5 + v6 - 24);
v8 = v5 + v6 - 48 - 24LL ... | func0:
ENDBR64
MOV R9,RDI
TEST EDX,EDX
JLE 0x0010188b
MOVSXD RAX,EDX
MOV RDI,qword ptr [RSI]
SUB EDX,0x1
LEA RSI,[RAX + RAX*0x2]
LEA RDX,[RDX + RDX*0x2]
SHL RSI,0x3
SHL RDX,0x3
LEA RAX,[RDI + RSI*0x1 + -0x18]
LEA RDI,[RDI + RSI*0x1 + -0x30]
SUB RDI,RDX
NOP dword ptr [RAX]
LAB_00101868:
MOV RDX,qword ptr [RAX]
MOV ESI,d... | /* func0(std::vector<int, std::allocator<int> > const&, std::vector<std::vector<int,
std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, int,
int) */
int4 func0(vector *param_1,vector *param_2,int param_3,int param_4)
{
int iVar1;
int iVar2;
int8 *puVar3;
bool bVar4;... |
1,215 | func0 |
#include <vector>
#include <assert.h>
| int func0(const std::vector<int>& arr, const std::vector<std::vector<int>>& ranges, int rotations, int index) {
for (int i = rotations - 1; i >= 0; --i) {
int left = ranges[i][0];
int right = ranges[i][1];
if (left <= index && right >= index) {
if (index == left) {
... | int main() {
assert(func0({1, 2, 3, 4, 5}, {{0, 2}, {0, 3}}, 2, 1) == 3);
assert(func0({1, 2, 3, 4}, {{0, 1}, {0, 2}}, 1, 2) == 3);
assert(func0({1, 2, 3, 4, 5, 6}, {{0, 1}, {0, 2}}, 1, 1) == 1);
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> > const&, std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, int, int):
endbr64
sub $0x1,%edx
js 1853 <_Z5func0RKSt6vectorIiSaIiEERKS_IS1_SaIS1_EEii+0x53>
movslq %edx,%rax
mov (%rsi),%r8
mov %edx,%... | _Z5func0RKSt6vectorIiSaIiEERKS_IS1_SaIS1_EEii:
endbr64
mov r9, rdi
test edx, edx
jle short loc_18FB
movsxd rax, edx
mov rdi, [rsi]
sub edx, 1
lea rsi, [rax+rax*2]
lea rdx, [rdx+rdx*2]
shl rsi, 3
shl rdx, 3
lea rax, [rdi+rsi-18h]
lea rdi, [rdi+rsi-30h]
sub rdi, rdx
nop ... | long long func0(_QWORD *a1, long long *a2, int a3, int a4)
{
long long v5; // rdi
long long v6; // rsi
int **v7; // rax
long long v8; // rdi
int v9; // esi
bool v10; // zf
int v11; // r8d
if ( a3 > 0 )
{
v5 = *a2;
v6 = 24LL * a3;
v7 = (int **)(v5 + v6 - 24);
v8 = v5 + v6 - 48 - 24LL ... | func0:
ENDBR64
MOV R9,RDI
TEST EDX,EDX
JLE 0x001018fb
MOVSXD RAX,EDX
MOV RDI,qword ptr [RSI]
SUB EDX,0x1
LEA RSI,[RAX + RAX*0x2]
LEA RDX,[RDX + RDX*0x2]
SHL RSI,0x3
SHL RDX,0x3
LEA RAX,[RDI + RSI*0x1 + -0x18]
LEA RDI,[RDI + RSI*0x1 + -0x30]
SUB RDI,RDX
NOP dword ptr [RAX]
LAB_001018d8:
MOV RDX,qword ptr [RAX]
MOV ESI,d... | /* func0(std::vector<int, std::allocator<int> > const&, std::vector<std::vector<int,
std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, int,
int) */
int4 func0(vector *param_1,vector *param_2,int param_3,int param_4)
{
int iVar1;
int iVar2;
int8 *puVar3;
bool bVar4;... |
1,216 | func0 |
#include <iostream>
#include <regex>
#include <cassert>
#include <tuple>
#include <string>
#include <vector>
| std::tuple<std::string, std::string> func0(const std::vector<std::string>& words) {
std::regex pattern("(P\\w+)\\W(P\\w+)");
std::smatch match;
for (const auto& w : words) {
if (std::regex_search(w, match, pattern)) {
return std::make_tuple(match[1], match[2]);
}
}
... | int main() {
using namespace std;
assert(func0({"Python PHP", "Java JavaScript"}) == make_tuple("Python", "PHP"));
assert(func0({"Python Programming","Java Programming"}) == make_tuple("Python","Programming"));
assert(func0({"Pqrst Pqr","qrstuv"}) == make_tuple("Pqrst","Pqr"));
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
push %rbx
sub $0xb8,%rsp
mov %rdi,-0xb8(%rbp)
mov %rsi,-0xc0(%rbp... | _Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 0B8h
mov [rbp+var_B8], rdi
mov [rbp+var_C0], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_90]
mov edx, 10h
lea rcx, ... | long long func0(long long a1, long long a2)
{
long long v2; // rbx
long long v3; // rax
long long v5; // [rsp+10h] [rbp-B0h] BYREF
_QWORD v6[2]; // [rsp+18h] [rbp-A8h] BYREF
long long v7; // [rsp+28h] [rbp-98h]
_BYTE v8[32]; // [rsp+30h] [rbp-90h] BYREF
_BYTE v9[32]; // [rsp+50h] [rbp-70h] BYREF
_BYTE ... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0xb8
MOV qword ptr [RBP + -0xb8],RDI
MOV qword ptr [RBP + -0xc0],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x90]
MOV EDX,0x10
LEA RCX,[0x134051]
MOV RSI,RCX
MOV RDI,RAX
LAB_00104b6f:
CALL 0x0010646a
LEA RAX,[RBP + -0x... | /* func0(std::vector<std::string, std::allocator<std::string > > const&) */
vector * func0(vector *param_1)
{
bool bVar1;
sub_match *psVar2;
vector<std::string,std::allocator<std::string>> *in_RSI;
long in_FS_OFFSET;
int8 local_b8;
int8 local_b0;
vector<std::string,std::allocator<std::string>> *local_a8... |
1,217 | func0 |
#include <iostream>
#include <regex>
#include <cassert>
#include <tuple>
#include <string>
#include <vector>
| std::tuple<std::string, std::string> func0(const std::vector<std::string>& words) {
std::regex pattern("(P\\w+)\\W(P\\w+)");
std::smatch match;
for (const auto& w : words) {
if (std::regex_search(w, match, pattern)) {
return std::make_tuple(match[1], match[2]);
}
}
... | int main() {
using namespace std;
assert(func0({"Python PHP", "Java JavaScript"}) == make_tuple("Python", "PHP"));
assert(func0({"Python Programming","Java Programming"}) == make_tuple("Python","Programming"));
assert(func0({"Pqrst Pqr","qrstuv"}) == make_tuple("Pqrst","Pqr"));
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
push %r13
push %r12
push %rbp
push %rbx
sub $0x1e8,%rsp
mov %rdi,%rbp
mov %rsi,%rbx
mov ... | _Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE:
endbr64
push rbp
mov rbp, rsp
push r14
push r13
push r12
push rbx
sub rsp, 210h
mov r14, rdi
mov rbx, rsi
mov rax, fs:28h
mov [rbp+var_28], rax
xor eax, eax
lea r12, [rbp+var_228]
mov rdi... | long long func0(long long a1, long long a2)
{
char *v3; // rsi
long long v4; // rdx
long long v5; // rax
long long v6; // r12
volatile signed __int32 *v7; // rcx
long long v8; // rdx
signed __int32 v9; // eax
_QWORD *v10; // r12
_QWORD *v11; // rbx
const __m128i *v13; // rdx
const __m128i *v14; /... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x210
MOV R14,RDI
MOV RBX,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
XOR EAX,EAX
LEA R12,[RBP + -0x228]
MOV RDI,R12
CALL 0x001046d0
MOV qword ptr [RBP + -0x220],0x0
MOV qword ptr [RBP + -0x218],0x0
LEA RDI,[RBP + -0x1c0... | /* func0(std::vector<std::string, std::allocator<std::string > > const&) */
vector * func0(vector *param_1)
{
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
char cVar2;
_Sp_counted_base<(_Lock_policy)2> *p_Var3;
bool bVar4;
int iVar5;
int8 *puVar6;
int8 *puVar7;
int8 *in_RSI;
long in_FS_OFFSET;
int4 l... |
1,218 | func0 |
#include <iostream>
#include <regex>
#include <cassert>
#include <tuple>
#include <string>
#include <vector>
| std::tuple<std::string, std::string> func0(const std::vector<std::string>& words) {
std::regex pattern("(P\\w+)\\W(P\\w+)");
std::smatch match;
for (const auto& w : words) {
if (std::regex_search(w, match, pattern)) {
return std::make_tuple(match[1], match[2]);
}
}
... | int main() {
using namespace std;
assert(func0({"Python PHP", "Java JavaScript"}) == make_tuple("Python", "PHP"));
assert(func0({"Python Programming","Java Programming"}) == make_tuple("Python","Programming"));
assert(func0({"Pqrst Pqr","qrstuv"}) == make_tuple("Pqrst","Pqr"));
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
push %r15
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
mov %rsi,%rbx... | _Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE:
endbr64
push rbp
mov rbp, rsp
push r15
push r14
lea r15, [rbp+var_238]
push r13
push r12
mov r12, rsi
push rbx
sub rsp, 228h
mov [rbp+var_248], rdi
mov rdi, r15; this
mov rax, fs:28h
mov [... | long long func0(long long a1, long long *a2)
{
char *v3; // rsi
__m128i v4; // xmm0
volatile signed __int32 *v5; // rbx
long long v6; // rdx
volatile signed __int32 *v7; // rcx
signed __int32 v8; // eax
long long v9; // rbx
long long v10; // rdx
volatile signed __int32 *v11; // rcx
signed __int32 v... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
LEA R15,[RBP + -0x238]
PUSH R13
PUSH R12
MOV R12,RSI
PUSH RBX
SUB RSP,0x228
MOV qword ptr [RBP + -0x248],RDI
MOV RDI,R15
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x38],RAX
XOR EAX,EAX
CALL 0x001036d0
LEA RDX,[0x1196c9]
PXOR XMM0,XMM0
LEA RDI,[RBP + -0x1d0]
... | /* func0(std::vector<std::string, std::allocator<std::string > > const&) */
vector * func0(vector *param_1)
{
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
char cVar2;
int8 uVar3;
int auVar4 [16];
bool bVar5;
int iVar6;
int8 *puVar7;
int8 *puVar8;
ulong uVar9;
long *in_RSI;
long lVar10;
long in_F... |
1,219 | func0 |
#include <iostream>
#include <regex>
#include <cassert>
#include <tuple>
#include <string>
#include <vector>
| std::tuple<std::string, std::string> func0(const std::vector<std::string>& words) {
std::regex pattern("(P\\w+)\\W(P\\w+)");
std::smatch match;
for (const auto& w : words) {
if (std::regex_search(w, match, pattern)) {
return std::make_tuple(match[1], match[2]);
}
}
... | int main() {
using namespace std;
assert(func0({"Python PHP", "Java JavaScript"}) == make_tuple("Python", "PHP"));
assert(func0({"Python Programming","Java Programming"}) == make_tuple("Python","Programming"));
assert(func0({"Pqrst Pqr","qrstuv"}) == make_tuple("Pqrst","Pqr"));
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
push %r15
mov %rsi,%r15
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx... | _Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE:
endbr64
push r15
push r14
push r13
push r12
mov r12, rsi
push rbp
push rbx
sub rsp, 2F8h
mov [rsp+328h+var_2F8], rdi
lea rbx, [rsp+328h+var_2A0]
mov rdi, rbx; this
mov rax, fs:28h
mov [rsp+328... | long long func0(long long a1, unsigned long long **a2)
{
__m128i v2; // xmm0
long long v3; // rdi
void *v4; // rdi
void **v5; // rbx
unsigned long long v6; // rbp
void *v7; // rdi
unsigned long long *v8; // rax
unsigned long long *v9; // r13
_QWORD *v10; // rcx
unsigned long long v11; // r12
unsi... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
MOV R12,RSI
PUSH RBP
PUSH RBX
SUB RSP,0x2f8
MOV qword ptr [RSP + 0x30],RDI
LEA RBX,[RSP + 0x88]
MOV RDI,RBX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x2e8],RAX
XOR EAX,EAX
MOV qword ptr [RSP + 0x38],RBX
CALL 0x00104710
LEA RDX,[0x11a70e]
PXOR XMM0,XMM0
LEA RDI,... | /* func0(std::vector<std::string, std::allocator<std::string > > const&) */
vector * func0(vector *param_1)
{
int8 uVar1;
void *pvVar2;
int auVar3 [16];
bool bVar4;
int auVar5 [16];
char cVar6;
int8 *puVar7;
long *plVar8;
ulong uVar9;
int (*pauVar10) [16];
int (*pauVar11) [16];
int8 *puVar12;
... |
1,220 | func0 |
#include <vector>
#include <cassert>
| int func0(const std::vector<int>& a, int n, int index, int k) {
std::vector<std::vector<int>> dp(n, std::vector<int>(n, 0));
for (int i = 0; i < n; ++i) {
if (a[i] > a[0]) {
dp[0][i] = a[i] + a[0];
} else {
dp[0][i] = a[i];
}
}
for (int i = 1;... | int main() {
assert(func0({1, 101, 2, 3, 100, 4, 5}, 7, 4, 6) == 11);
assert(func0({1, 101, 2, 3, 100, 4, 5}, 7, 2, 5) == 7);
assert(func0({11, 15, 19, 21, 26, 28, 31}, 7, 2, 4) == 71);
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> > const&, int, int, int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x88,%rsp
mov %rdi,-0x78(%rbp)
mov %esi,-0x7c(%rbp)
mov %edx,-0x80(%rbp)
mov %ecx,-0x84(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
lea -0x61(%rbp),%rax
mo... | _Z5func0RKSt6vectorIiSaIiEEiii:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 98h
mov [rbp+var_88], rdi
mov [rbp+var_8C], esi
mov [rbp+var_90], edx
mov [rbp+var_94], ecx
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_71]
mov [rbp+var_58], rax
nop... | long long func0(long long a1, int a2, int a3, int a4)
{
int v4; // ebx
int v5; // ebx
int v6; // ebx
long long v7; // rax
int v8; // ebx
long long v10; // rax
int v11; // ebx
int v12; // ebx
long long v13; // rax
long long v14; // rax
int v15; // ebx
int v16; // ebx
long long v17; // rax
lo... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x98
MOV qword ptr [RBP + -0x88],RDI
MOV dword ptr [RBP + -0x8c],ESI
MOV dword ptr [RBP + -0x90],EDX
MOV dword ptr [RBP + -0x94],ECX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x71]
MOV qword ptr [RBP + -0x58],RAX
NOP
NOP
... | /* func0(std::vector<int, std::allocator<int> > const&, int, int, int) */
int4 func0(vector *param_1,int param_2,int param_3,int param_4)
{
int iVar1;
int iVar2;
int4 uVar3;
bool bVar4;
int *piVar5;
vector<int,std::allocator<int>> *pvVar6;
int4 *puVar7;
long in_FS_OFFSET;
allocator local_7a;
alloc... |
1,221 | func0 |
#include <vector>
#include <cassert>
| int func0(const std::vector<int>& a, int n, int index, int k) {
std::vector<std::vector<int>> dp(n, std::vector<int>(n, 0));
for (int i = 0; i < n; ++i) {
if (a[i] > a[0]) {
dp[0][i] = a[i] + a[0];
} else {
dp[0][i] = a[i];
}
}
for (int i = 1;... | int main() {
assert(func0({1, 101, 2, 3, 100, 4, 5}, 7, 4, 6) == 11);
assert(func0({1, 101, 2, 3, 100, 4, 5}, 7, 2, 5) == 7);
assert(func0({11, 15, 19, 21, 26, 28, 31}, 7, 2, 4) == 71);
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> > const&, int, int, int):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x28,%rsp
mov %esi,0x14(%rsp)
mov %edx,0x18(%rsp)
mov %ecx,0x1c(%rsp)
movslq %esi,%r12
movabs $0x1fffffffffffffff,%rax
cmp %rax,%r12
ja 12fb <_Z5fu... | _Z5func0RKSt6vectorIiSaIiEEiii:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 48h
mov [rsp+78h+var_70], edx
mov [rsp+78h+var_6C], ecx
mov rax, fs:28h
mov [rsp+78h+var_40], rax
xor eax, eax
movsxd rbp, esi
mov rax, rbp
shr rax, 3Dh
jnz short... | long long func0(int **a1, int a2, int a3, int a4)
{
long long v4; // rbp
_DWORD *v7; // rax
void *v8; // r15
_DWORD *v9; // rdx
long long v10; // r14
long long i; // rax
int v12; // edx
int v13; // ecx
_QWORD *v14; // rdi
long long j; // r9
long long v16; // rax
int v17; // esi
long long v18;... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x48
MOV dword ptr [RSP + 0x8],EDX
MOV dword ptr [RSP + 0xc],ECX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
MOVSXD RBP,ESI
MOV RAX,RBP
SHR RAX,0x3d
JNZ 0x0010133b
MOV RBX,RDI
MOV R13D,ESI
TEST RBP,RBP
JZ 0x001014f1
... | /* func0(std::vector<int, std::allocator<int> > const&, int, int, int) */
int4 func0(vector *param_1,int param_2,int param_3,int param_4)
{
int iVar1;
int4 uVar2;
void *pvVar3;
int4 *puVar4;
int4 *puVar5;
vector *pvVar6;
long lVar7;
ulong uVar8;
vector *pvVar9;
vector *pvVar10;
ulong uVar11;
i... |
1,222 | func0 |
#include <vector>
#include <cassert>
| int func0(const std::vector<int>& a, int n, int index, int k) {
std::vector<std::vector<int>> dp(n, std::vector<int>(n, 0));
for (int i = 0; i < n; ++i) {
if (a[i] > a[0]) {
dp[0][i] = a[i] + a[0];
} else {
dp[0][i] = a[i];
}
}
for (int i = 1;... | int main() {
assert(func0({1, 101, 2, 3, 100, 4, 5}, 7, 4, 6) == 11);
assert(func0({1, 101, 2, 3, 100, 4, 5}, 7, 2, 5) == 7);
assert(func0({11, 15, 19, 21, 26, 28, 31}, 7, 2, 4) == 71);
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> > const&, int, int, int):
endbr64
movabs $0x1fffffffffffffff,%rax
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
movslq %esi,%rbx
sub $0x28,%rsp
mov %rdi,0x10(%rsp)
mov %esi,0xc(%rsp)
mov %edx,0x18(%rsp)
mov %ecx,0x1c(%rsp)
cmp %rax,%... | _Z5func0RKSt6vectorIiSaIiEEiii:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
movsxd rbx, esi
sub rsp, 48h
mov [rsp+78h+var_60], rdi
mov [rsp+78h+var_68], edx
mov [rsp+78h+var_64], ecx
mov rax, fs:28h
mov [rsp+78h+var_40], rax
mov rax, rbx
shr rax, 3Dh
... | long long func0(_DWORD **a1, int a2, int a3, int a4)
{
long long v4; // rbx
unsigned long long v5; // r13
char *v6; // rax
char *v7; // r12
void *v8; // r15
long long *v9; // r14
long long v10; // r12
long long v11; // r8
unsigned long long v12; // rdx
_DWORD *v13; // rdi
int v14; // eax
_DWORD... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOVSXD RBX,ESI
SUB RSP,0x48
MOV qword ptr [RSP + 0x18],RDI
MOV dword ptr [RSP + 0x10],EDX
MOV dword ptr [RSP + 0x14],ECX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
MOV RAX,RBX
SHR RAX,0x3d
JNZ 0x0010173d
LEA RAX,[RBX + RBX*0x2]
PXOR XM... | /* func0(std::vector<int, std::allocator<int> > const&, int, int, int) */
int4 func0(vector *param_1,int param_2,int param_3,int param_4)
{
long lVar1;
long lVar2;
int *piVar3;
long lVar4;
void *pvVar5;
vector *pvVar6;
vector *pvVar7;
int8 uVar8;
vector *pvVar9;
int iVar10;
ulong uVar11;
ulong... |
1,223 | func0 |
#include <vector>
#include <cassert>
| int func0(const std::vector<int>& a, int n, int index, int k) {
std::vector<std::vector<int>> dp(n, std::vector<int>(n, 0));
for (int i = 0; i < n; ++i) {
if (a[i] > a[0]) {
dp[0][i] = a[i] + a[0];
} else {
dp[0][i] = a[i];
}
}
for (int i = 1;... | int main() {
assert(func0({1, 101, 2, 3, 100, 4, 5}, 7, 4, 6) == 11);
assert(func0({1, 101, 2, 3, 100, 4, 5}, 7, 2, 5) == 7);
assert(func0({11, 15, 19, 21, 26, 28, 31}, 7, 2, 4) == 71);
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> > const&, int, int, int):
endbr64
movabs $0x1fffffffffffffff,%rax
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
movslq %esi,%rbx
sub $0x28,%rsp
mov %rdi,0x10(%rsp)
mov %edx,0x18(%rsp)
mov %ecx,0x1c(%rsp)
mov %rbx,0x8(%rsp)
mov %rbx,(... | _Z5func0RKSt6vectorIiSaIiEEiii:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
movsxd rbx, esi
sub rsp, 48h
mov [rsp+78h+var_60], rdi
mov [rsp+78h+var_68], edx
mov [rsp+78h+var_64], ecx
mov rax, fs:28h
mov [rsp+78h+var_40], rax
mov rax, rbx
shr rax, 3Dh
... | long long func0(unsigned int **a1, int a2, int a3, int a4)
{
long long v4; // rbx
unsigned long long v5; // r13
char *v6; // rax
char *v7; // rbp
void *v8; // r15
unsigned long long *v9; // r14
long long v10; // rbp
unsigned long long v11; // rsi
unsigned int *v12; // rdi
signed int *v13; // r8
i... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOVSXD RBX,ESI
SUB RSP,0x48
MOV qword ptr [RSP + 0x18],RDI
MOV dword ptr [RSP + 0x10],EDX
MOV dword ptr [RSP + 0x14],ECX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
MOV RAX,RBX
SHR RAX,0x3d
JNZ 0x00101842
LEA RAX,[RBX + RBX*0x2]
PXOR XM... | /* func0(std::vector<int, std::allocator<int> > const&, int, int, int) */
int4 func0(vector *param_1,int param_2,int param_3,int param_4)
{
vector *pvVar1;
uint *puVar2;
int *piVar3;
uint uVar4;
uint uVar5;
uint uVar6;
void *pvVar7;
long lVar8;
ulong uVar9;
int iVar10;
uint uVar11;
int iVar12;... |
1,224 | func0 |
#include <cassert>
#include <tuple>
#include <vector>
| std::tuple<std::string, int, std::vector<int>, bool> func0(
const std::tuple<std::string, int, std::vector<int>, bool>& tuplex, int m, int n) {
auto tuplex_colon = tuplex;
std::get<2>(tuplex_colon).push_back(n);
return tuplex_colon;
}
| int main() {
assert(func0({"HELLO", 5, {}, true}, 2, 50) == std::make_tuple("HELLO", 5, std::vector<int>{50}, true));
assert(func0({"HELLO", 5, {}, true}, 2, 100) == std::make_tuple("HELLO", 5, std::vector<int>{100}, true));
assert(func0({"HELLO", 5, {}, true}, 2, 500) == std::make_tuple("HELLO", 5, std:... | O0 | cpp | func0(std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::vector<int, std::allocator<int> >, bool> const&, int, int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x38,%rsp
mov %rdi,-0x28(%rbp)
mov %rsi,-0x30(%rbp)
mov %edx,-0x34(%rbp)
mov %ecx,-... | ||||
1,225 | func0 |
#include <cassert>
#include <tuple>
#include <vector>
| std::tuple<std::string, int, std::vector<int>, bool> func0(
const std::tuple<std::string, int, std::vector<int>, bool>& tuplex, int m, int n) {
auto tuplex_colon = tuplex;
std::get<2>(tuplex_colon).push_back(n);
return tuplex_colon;
}
| int main() {
assert(func0({"HELLO", 5, {}, true}, 2, 50) == std::make_tuple("HELLO", 5, std::vector<int>{50}, true));
assert(func0({"HELLO", 5, {}, true}, 2, 100) == std::make_tuple("HELLO", 5, std::vector<int>{100}, true));
assert(func0({"HELLO", 5, {}, true}, 2, 500) == std::make_tuple("HELLO", 5, std:... | O1 | cpp | func0(std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::vector<int, std::allocator<int> >, bool> const&, int, int):
endbr64
push %r13
push %r12
push %rbp
push %rbx
sub $0x18,%rsp
mov %rdi,%rbx
mov %rsi,%rbp
mov %ecx,0xc(%rsp)
movzbl (%rsi),%eax
mov... | ||||
1,226 | func0 |
#include <cassert>
#include <tuple>
#include <vector>
| std::tuple<std::string, int, std::vector<int>, bool> func0(
const std::tuple<std::string, int, std::vector<int>, bool>& tuplex, int m, int n) {
auto tuplex_colon = tuplex;
std::get<2>(tuplex_colon).push_back(n);
return tuplex_colon;
}
| int main() {
assert(func0({"HELLO", 5, {}, true}, 2, 50) == std::make_tuple("HELLO", 5, std::vector<int>{50}, true));
assert(func0({"HELLO", 5, {}, true}, 2, 100) == std::make_tuple("HELLO", 5, std::vector<int>{100}, true));
assert(func0({"HELLO", 5, {}, true}, 2, 500) == std::make_tuple("HELLO", 5, std:... | O2 | cpp | func0(std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::vector<int, std::allocator<int> >, bool> const&, int, int):
endbr64
push %r12
mov %rdi,%r12
push %rbp
push %rbx
mov %rsi,%rbx
sub $0x10,%rsp
movzbl (%rsi),%eax
mov 0x10(%rsi),%rbp
sub 0x8(%rs... | ||||
1,227 | func0 |
#include <cassert>
#include <tuple>
#include <vector>
| std::tuple<std::string, int, std::vector<int>, bool> func0(
const std::tuple<std::string, int, std::vector<int>, bool>& tuplex, int m, int n) {
auto tuplex_colon = tuplex;
std::get<2>(tuplex_colon).push_back(n);
return tuplex_colon;
}
| int main() {
assert(func0({"HELLO", 5, {}, true}, 2, 50) == std::make_tuple("HELLO", 5, std::vector<int>{50}, true));
assert(func0({"HELLO", 5, {}, true}, 2, 100) == std::make_tuple("HELLO", 5, std::vector<int>{100}, true));
assert(func0({"HELLO", 5, {}, true}, 2, 500) == std::make_tuple("HELLO", 5, std:... | O3 | cpp | func0(std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::vector<int, std::allocator<int> >, bool> const&, int, int):
endbr64
push %r13
pxor %xmm0,%xmm0
push %r12
mov %rdi,%r12
push %rbp
push %rbx
mov %rsi,%rbx
sub $0x28,%rsp
mov 0x10(%rsi),%rbp
su... | ||||
1,228 | func0 |
#include <vector>
#include <algorithm>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& nums1, const std::vector<int>& nums2, int N) {
std::vector<int> all_products;
for (int x : nums1) {
for (int y : nums2) {
all_products.push_back(x * y);
}
}
std::sort(all_products.rbegin(), all_products.rend());
retur... | int main() {
assert(func0({1, 2, 3, 4, 5, 6}, {3, 6, 8, 9, 10, 6}, 3) == std::vector<int>({60, 54, 50}));
assert(func0({1, 2, 3, 4, 5, 6}, {3, 6, 8, 9, 10, 6}, 4) == std::vector<int>({60, 54, 50, 48}));
assert(func0({1, 2, 3, 4, 5, 6}, {3, 6, 8, 9, 10, 6}, 5) == std::vector<int>({60, 54, 50, 48, 45}));
... | O0 | cpp | func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&, int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x88,%rsp
mov %rdi,-0x78(%rbp)
mov %rsi,-0x80(%rbp)
mov %rdx,-0x88(%rbp)
mov %ecx,-0x8c(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor ... | _Z5func0RKSt6vectorIiSaIiEES3_i:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 98h
mov [rbp+var_88], rdi
mov [rbp+var_90], rsi
mov [rbp+var_98], rdx
mov [rbp+var_9C], ecx
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_30]
mov rdi, rax
call _ZN... | long long func0(long long a1, long long a2, long long a3, int a4)
{
long long v4; // rbx
long long v5; // rax
int v9; // [rsp+2Ch] [rbp-74h] BYREF
int v10; // [rsp+30h] [rbp-70h]
int v11; // [rsp+34h] [rbp-6Ch]
long long v12; // [rsp+38h] [rbp-68h] BYREF
long long v13; // [rsp+40h] [rbp-60h] BYREF
long... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x98
MOV qword ptr [RBP + -0x88],RDI
MOV qword ptr [RBP + -0x90],RSI
MOV qword ptr [RBP + -0x98],RDX
MOV dword ptr [RBP + -0x9c],ECX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x30]
MOV RDI,RAX
CALL 0x00101e92
MOV RAX,qwor... | /* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> >
const&, int) */
vector * func0(vector *param_1,vector *param_2,int param_3)
{
bool bVar1;
int *piVar2;
int8 uVar3;
int8 uVar4;
int in_ECX;
int4 in_register_00000014;
long in_FS_OFFSET;
int local_7c;
int... |
1,229 | func0 |
#include <vector>
#include <algorithm>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& nums1, const std::vector<int>& nums2, int N) {
std::vector<int> all_products;
for (int x : nums1) {
for (int y : nums2) {
all_products.push_back(x * y);
}
}
std::sort(all_products.rbegin(), all_products.rend());
retur... | int main() {
assert(func0({1, 2, 3, 4, 5, 6}, {3, 6, 8, 9, 10, 6}, 3) == std::vector<int>({60, 54, 50}));
assert(func0({1, 2, 3, 4, 5, 6}, {3, 6, 8, 9, 10, 6}, 4) == std::vector<int>({60, 54, 50, 48}));
assert(func0({1, 2, 3, 4, 5, 6}, {3, 6, 8, 9, 10, 6}, 5) == std::vector<int>({60, 54, 50, 48, 45}));
... | O1 | cpp | func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&, int):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x58,%rsp
mov %rdi,0x10(%rsp)
mov %ecx,0x1c(%rsp)
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
movq $0... | _Z5func0RKSt6vectorIiSaIiEES3_i:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 58h
mov [rsp+88h+var_78], rdi
mov [rsp+88h+var_6C], ecx
mov rax, fs:28h
mov [rsp+88h+var_40], rax
xor eax, eax
mov [rsp+88h+src], 0
mov [rsp+88h+var_50], 0
mov [r... | int ** func0(int **a1, int **a2, long long a3, int a4)
{
int *v4; // r13
int *v5; // r15
_DWORD *v7; // rbx
int v8; // eax
int *v9; // rsi
int v10; // r12d
_DWORD *v11; // rbp
int *v12; // rbp
int *v13; // r12
long long v14; // rbx
int v15; // eax
unsigned long long v16; // rax
int *v17; // rb... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x58
MOV qword ptr [RSP + 0x10],RDI
MOV dword ptr [RSP + 0x1c],ECX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x48],RAX
XOR EAX,EAX
MOV qword ptr [RSP + 0x30],0x0
MOV qword ptr [RSP + 0x38],0x0
MOV qword ptr [RSP + 0x40],0x0
MOV R13,qwor... | /* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> >
const&, int) */
vector * func0(vector *param_1,vector *param_2,int param_3,int param_4,int param_5,
int param_6,int param_7,int8 param_8,int param_9,
int param_10,int4 param_11,int8 param_12,in... |
1,230 | func0 |
#include <vector>
#include <algorithm>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& nums1, const std::vector<int>& nums2, int N) {
std::vector<int> all_products;
for (int x : nums1) {
for (int y : nums2) {
all_products.push_back(x * y);
}
}
std::sort(all_products.rbegin(), all_products.rend());
retur... | int main() {
assert(func0({1, 2, 3, 4, 5, 6}, {3, 6, 8, 9, 10, 6}, 3) == std::vector<int>({60, 54, 50}));
assert(func0({1, 2, 3, 4, 5, 6}, {3, 6, 8, 9, 10, 6}, 4) == std::vector<int>({60, 54, 50, 48}));
assert(func0({1, 2, 3, 4, 5, 6}, {3, 6, 8, 9, 10, 6}, 5) == std::vector<int>({60, 54, 50, 48, 45}));
... | O2 | cpp | func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&, int):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x68,%rsp
mov %rdi,0x30(%rsp)
mov 0x8(%rsi),%rdi
mov %rdx,0x28(%rsp)
mov %ecx,0x3c(%rsp)
mov %fs:0x28,%rax
mov ... | _Z5func0RKSt6vectorIiSaIiEES3_i:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 58h
mov r13, [rsi]
mov [rsp+88h+var_78], rdi
mov [rsp+88h+var_6C], ecx
mov rax, fs:28h
mov [rsp+88h+var_40], rax
xor eax, eax
mov rax, [rsi+8]
mova... | long long func0(long long a1, int **a2, long long a3, int a4)
{
int *v4; // r13
int *v5; // rax
int *v7; // rax
_DWORD *v8; // rbx
_DWORD *v9; // rbp
int v10; // r12d
int v11; // edx
int *v12; // rbx
long long v13; // rbp
unsigned long long v14; // rdx
int *v15; // rax
int *v16; // rbp
int v1... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x58
MOV R13,qword ptr [RSI]
MOV qword ptr [RSP + 0x10],RDI
MOV dword ptr [RSP + 0x1c],ECX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x48],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RSI + 0x8]
MOVAPS xmmword ptr [RSP + 0x30],XMM0... | /* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> >
const&, int) */
vector * func0(vector *param_1,vector *param_2,int param_3,int param_4,int param_5,
int param_6,int param_7,int8 param_8,int param_9,
int param_10,int4 param_11,int1 param_12,in... |
1,231 | func0 |
#include <vector>
#include <algorithm>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& nums1, const std::vector<int>& nums2, int N) {
std::vector<int> all_products;
for (int x : nums1) {
for (int y : nums2) {
all_products.push_back(x * y);
}
}
std::sort(all_products.rbegin(), all_products.rend());
retur... | int main() {
assert(func0({1, 2, 3, 4, 5, 6}, {3, 6, 8, 9, 10, 6}, 3) == std::vector<int>({60, 54, 50}));
assert(func0({1, 2, 3, 4, 5, 6}, {3, 6, 8, 9, 10, 6}, 4) == std::vector<int>({60, 54, 50, 48}));
assert(func0({1, 2, 3, 4, 5, 6}, {3, 6, 8, 9, 10, 6}, 5) == std::vector<int>({60, 54, 50, 48, 45}));
... | O3 | cpp | func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&, int):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x68,%rsp
mov %rdi,0x30(%rsp)
mov %rdx,0x28(%rsp)
mov %ecx,0x3c(%rsp)
mov %fs:0x28,%rax
mov %rax,0x58(%rsp)
xor... | _Z5func0RKSt6vectorIiSaIiEES3_i:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 78h
mov [rsp+0A8h+var_78], rdi
mov rdi, [rsi+8]
mov [rsp+0A8h+var_88], rdx
mov [rsp+0A8h+var_6C], ecx
mov rax, fs:28h
mov [rsp+0A8h+var_40], rax
xor ... | long long func0(long long a1, int **a2, long long a3, int a4)
{
int *v4; // rdi
int *v5; // rax
char *v6; // rcx
char *v7; // r15
int v8; // r14d
_DWORD *v9; // rbx
_DWORD *v10; // r13
char *v11; // r12
int v12; // ebp
unsigned long long v13; // rax
unsigned long long v14; // rdx
char *v15; // ... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x78
MOV qword ptr [RSP + 0x30],RDI
MOV RDI,qword ptr [RSI + 0x8]
MOV qword ptr [RSP + 0x20],RDX
MOV dword ptr [RSP + 0x3c],ECX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x68],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RSI]
MOV q... | /* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> >
const&, int) */
vector * func0(vector *param_1,vector *param_2,int param_3,int param_4,int param_5,
int param_6,int param_7,int param_8,int param_9,
int param_10,int8 param_11,int4 param_12,int... |
1,232 | func0 |
#include <assert.h>
| int func0(int a, int b) {
if (a >= b) {
return a;
} else {
return b;
}
}
| int main() {
assert(func0(5, 10) == 10);
assert(func0(-1, -2) == -1);
assert(func0(9, 7) == 9);
return 0;
}
| O0 | cpp | func0(int, int):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x4(%rbp)
mov %esi,-0x8(%rbp)
mov -0x4(%rbp),%eax
cmp -0x8(%rbp),%eax
jl 1164 <_Z5func0ii+0x1b>
mov -0x4(%rbp),%eax
jmp 1167 <_Z5func0ii+0x1e>
mov -0x8(%rbp),%eax
pop %rbp
retq
| _Z5func0ii:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_4], edi
mov [rbp+var_8], esi
mov eax, [rbp+var_4]
cmp eax, [rbp+var_8]
jl short loc_1164
mov eax, [rbp+var_4]
jmp short loc_1167
loc_1164:
mov eax, [rbp+var_8]
loc_1167:
pop rbp
retn | long long func0(unsigned int a1, unsigned int a2)
{
if ( (int)a1 < (int)a2 )
return a2;
else
return a1;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x4],EDI
MOV dword ptr [RBP + -0x8],ESI
MOV EAX,dword ptr [RBP + -0x4]
CMP EAX,dword ptr [RBP + -0x8]
JL 0x00101164
MOV EAX,dword ptr [RBP + -0x4]
JMP 0x00101167
LAB_00101164:
MOV EAX,dword ptr [RBP + -0x8]
LAB_00101167:
POP RBP
RET | /* func0(int, int) */
int func0(int param_1,int param_2)
{
if (param_2 <= param_1) {
param_2 = param_1;
}
return param_2;
} |
1,233 | func0 |
#include <assert.h>
| int func0(int a, int b) {
if (a >= b) {
return a;
} else {
return b;
}
}
| int main() {
assert(func0(5, 10) == 10);
assert(func0(-1, -2) == -1);
assert(func0(9, 7) == 9);
return 0;
}
| O1 | cpp | func0(int, int):
endbr64
cmp %esi,%edi
mov %esi,%eax
cmovge %edi,%eax
retq
| _Z5func0ii:
endbr64
cmp edi, esi
mov eax, esi
cmovge eax, edi
retn | long long func0(unsigned int a1, unsigned int a2)
{
long long result; // rax
result = a2;
if ( (int)a1 >= (int)a2 )
return a1;
return result;
} | func0:
ENDBR64
CMP EDI,ESI
MOV EAX,ESI
CMOVGE EAX,EDI
RET | /* func0(int, int) */
int func0(int param_1,int param_2)
{
if (param_2 <= param_1) {
param_2 = param_1;
}
return param_2;
} |
1,234 | func0 |
#include <assert.h>
| int func0(int a, int b) {
if (a >= b) {
return a;
} else {
return b;
}
}
| int main() {
assert(func0(5, 10) == 10);
assert(func0(-1, -2) == -1);
assert(func0(9, 7) == 9);
return 0;
}
| O2 | cpp | func0(int, int):
endbr64
cmp %esi,%edi
mov %esi,%eax
cmovge %edi,%eax
retq
nopl 0x0(%rax)
| _Z5func0ii:
endbr64
cmp edi, esi
mov eax, esi
cmovge eax, edi
retn | long long func0(unsigned int a1, unsigned int a2)
{
long long result; // rax
result = a2;
if ( (int)a1 >= (int)a2 )
return a1;
return result;
} | func0:
ENDBR64
CMP EDI,ESI
MOV EAX,ESI
CMOVGE EAX,EDI
RET | /* func0(int, int) */
int func0(int param_1,int param_2)
{
if (param_2 <= param_1) {
param_2 = param_1;
}
return param_2;
} |
1,235 | func0 |
#include <assert.h>
| int func0(int a, int b) {
if (a >= b) {
return a;
} else {
return b;
}
}
| int main() {
assert(func0(5, 10) == 10);
assert(func0(-1, -2) == -1);
assert(func0(9, 7) == 9);
return 0;
}
| O3 | cpp | func0(int, int):
endbr64
cmp %esi,%edi
mov %esi,%eax
cmovge %edi,%eax
retq
nopl 0x0(%rax)
| _Z5func0ii:
endbr64
cmp edi, esi
mov eax, esi
cmovge eax, edi
retn | long long func0(unsigned int a1, unsigned int a2)
{
long long result; // rax
result = a2;
if ( (int)a1 >= (int)a2 )
return a1;
return result;
} | func0:
ENDBR64
CMP EDI,ESI
MOV EAX,ESI
CMOVGE EAX,EDI
RET | /* func0(int, int) */
int func0(int param_1,int param_2)
{
if (param_2 <= param_1) {
param_2 = param_1;
}
return param_2;
} |
1,236 | func0 | #include <cassert>
#include <cctype>
#include <vector>
#include <string>
| std::vector<char> func0(const std::string &str1) {
std::vector<char> result;
for (char c : str1) {
if (!std::isspace(c)) {
result.push_back(c);
}
}
return result;
}
| int main() {
std::vector<char> expected1 = {'p', 'y', 't', 'h', 'o', 'n', '3', '.', '0'};
assert(func0("python 3.0") == expected1);
std::vector<char> expected2 = {'i', 't', 'e', 'm', '1'};
assert(func0("item1") == expected2);
std::vector<char> expected3 = {'1', '5', '.', '1', '0'};
ass... | O0 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x48,%rsp
mov %rdi,-0x48(%rbp)
mov %rsi,-0x50(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x48(%rbp),%rax
mov %rax,%rdi
callq ... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
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 _ZNSt6vectorIcSaIcEEC2Ev... | long long func0(long long a1, long long a2)
{
char v3; // [rsp+1Fh] [rbp-31h] BYREF
long long v4; // [rsp+20h] [rbp-30h] BYREF
_QWORD v5[4]; // [rsp+28h] [rbp-28h] BYREF
v5[2] = __readfsqword(0x28u);
std::vector<char>::vector(a1);
v5[1] = a2;
v4 = std::string::begin(a2);
v5[0] = std::string::end(a2);
... | 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 0x00102b44
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x20],RAX
MO... | /* func0(std::string const&) */
string * func0(string *param_1)
{
bool bVar1;
int iVar2;
char *pcVar3;
long in_FS_OFFSET;
char local_39;
int8 local_38;
int8 local_30 [2];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
std::vector<char,std::allocator<char>>::vector((vector<char,std::a... |
1,237 | func0 | #include <cassert>
#include <cctype>
#include <vector>
#include <string>
| std::vector<char> func0(const std::string &str1) {
std::vector<char> result;
for (char c : str1) {
if (!std::isspace(c)) {
result.push_back(c);
}
}
return result;
}
| int main() {
std::vector<char> expected1 = {'p', 'y', 't', 'h', 'o', 'n', '3', '.', '0'};
assert(func0("python 3.0") == expected1);
std::vector<char> expected2 = {'i', 't', 'e', 'm', '1'};
assert(func0("item1") == expected2);
std::vector<char> expected3 = {'1', '5', '.', '1', '0'};
ass... | O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x10,%rsp
mov %rdi,%r12
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi)
movq $0x0,0x10(%rdi... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r13
push r12
push rbp
push rbx
sub rsp, 18h
mov r12, rdi
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 rbx,... | _QWORD * func0(_QWORD *a1, long long a2)
{
char *v2; // rbx
char *v3; // r13
char v5; // bp
_BYTE *v6; // rsi
char v7; // [rsp+7h] [rbp-31h] BYREF
unsigned long long v8; // [rsp+8h] [rbp-30h]
v8 = __readfsqword(0x28u);
*a1 = 0LL;
a1[1] = 0LL;
a1[2] = 0LL;
v2 = *(char **)a2;
v3 = (char *)(*(_QWO... | func0:
ENDBR64
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x18
MOV R12,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
MOV qword ptr [RDI],0x0
MOV qword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
MOV RBX,qword ptr [RSI]
MOV R13,RBX
ADD R13,qword ptr [RSI + 0x8]
CMP R13,RBX
JNZ 0x00101... | /* func0(std::string const&) */
string * func0(string *param_1)
{
char cVar1;
char *pcVar2;
int iVar3;
char *pcVar4;
int8 *in_RSI;
char *pcVar5;
long in_FS_OFFSET;
char local_31;
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
*(int8 *)param_1 = 0;
*(int8 *)(param_1 + 8) = 0;
*(... |
1,238 | func0 | #include <cassert>
#include <cctype>
#include <vector>
#include <string>
| std::vector<char> func0(const std::string &str1) {
std::vector<char> result;
for (char c : str1) {
if (!std::isspace(c)) {
result.push_back(c);
}
}
return result;
}
| int main() {
std::vector<char> expected1 = {'p', 'y', 't', 'h', 'o', 'n', '3', '.', '0'};
assert(func0("python 3.0") == expected1);
std::vector<char> expected2 = {'i', 't', 'e', 'm', '1'};
assert(func0("item1") == expected2);
std::vector<char> expected3 = {'1', '5', '.', '1', '0'};
ass... | O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x10,%rsp
mov 0x8(%rsi),%r13
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi)... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r13
pxor xmm0, xmm0
push r12
mov r12, rdi
push rbp
push rbx
sub rsp, 18h
mov r13, [rsi+8]
mov rax, fs:28h
mov [rsp+38h+var_30], rax
xor eax, eax
mov qword ptr [rdi+10h], 0
movups xmmword ptr [rdi], x... | long long func0(long long a1, long long a2)
{
long long v2; // r13
char *v3; // rbx
char *v4; // r13
char v5; // bp
_BYTE *v6; // rsi
char v8; // [rsp+1h] [rbp-31h] BYREF
unsigned long long v9; // [rsp+2h] [rbp-30h]
v2 = *(_QWORD *)(a2 + 8);
v9 = __readfsqword(0x28u);
*(_QWORD *)(a1 + 16) = 0LL;
... | func0:
ENDBR64
PUSH R13
PXOR XMM0,XMM0
PUSH R12
MOV R12,RDI
PUSH RBP
PUSH RBX
SUB RSP,0x18
MOV R13,qword ptr [RSI + 0x8]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
MOV qword ptr [RDI + 0x10],0x0
MOVUPS xmmword ptr [RDI],XMM0
MOV RBX,qword ptr [RSI]
ADD R13,RBX
CMP R13,RBX
JNZ 0x001016b1
JMP 0... | /* func0(std::string const&) */
string * func0(string *param_1)
{
char cVar1;
long lVar2;
char *pcVar3;
int iVar4;
char *pcVar5;
int8 *in_RSI;
char *pcVar6;
long in_FS_OFFSET;
char local_31;
long local_30;
lVar2 = in_RSI[1];
local_30 = *(long *)(in_FS_OFFSET + 0x28);
*(int8 *)(param_1 + 0... |
1,239 | func0 | #include <cassert>
#include <cctype>
#include <vector>
#include <string>
| std::vector<char> func0(const std::string &str1) {
std::vector<char> result;
for (char c : str1) {
if (!std::isspace(c)) {
result.push_back(c);
}
}
return result;
}
| int main() {
std::vector<char> expected1 = {'p', 'y', 't', 'h', 'o', 'n', '3', '.', '0'};
assert(func0("python 3.0") == expected1);
std::vector<char> expected2 = {'i', 't', 'e', 'm', '1'};
assert(func0("item1") == expected2);
std::vector<char> expected3 = {'1', '5', '.', '1', '0'};
ass... | O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r14
pxor %xmm0,%xmm0
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x10,%rsp
mov 0x8(%rsi),%r13
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
movq $0x0,0x10(%rdi... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r13
pxor xmm0, xmm0
push r12
mov r12, rdi
push rbp
push rbx
sub rsp, 18h
mov r13, [rsi+8]
mov rax, fs:28h
mov [rsp+38h+var_30], rax
xor eax, eax
mov qword ptr [rdi+10h], 0
movups xmmword ptr [rdi], x... | long long func0(long long a1, long long a2)
{
long long v2; // r13
char *v3; // rbx
char *v4; // r13
char v5; // bp
_BYTE *v6; // rsi
char v8; // [rsp+1h] [rbp-31h] BYREF
unsigned long long v9; // [rsp+2h] [rbp-30h]
v2 = *(_QWORD *)(a2 + 8);
v9 = __readfsqword(0x28u);
*(_QWORD *)(a1 + 16) = 0LL;
... | func0:
ENDBR64
PUSH R13
PXOR XMM0,XMM0
PUSH R12
MOV R12,RDI
PUSH RBP
PUSH RBX
SUB RSP,0x18
MOV R13,qword ptr [RSI + 0x8]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
MOV qword ptr [RDI + 0x10],0x0
MOVUPS xmmword ptr [RDI],XMM0
MOV RBX,qword ptr [RSI]
ADD R13,RBX
CMP R13,RBX
JNZ 0x001016b1
JMP 0... | /* func0(std::string const&) */
string * func0(string *param_1)
{
char cVar1;
long lVar2;
char *pcVar3;
int iVar4;
char *pcVar5;
int8 *in_RSI;
char *pcVar6;
long in_FS_OFFSET;
char local_31;
long local_30;
lVar2 = in_RSI[1];
local_30 = *(long *)(in_FS_OFFSET + 0x28);
*(int8 *)(param_1 + 0... |
1,240 | func0 |
#include <assert.h>
| int func0(int n) {
if (!(n & (n + 1))) {
return n;
}
int pos = 0, temp = n, count = 0;
while (temp) {
if (!(temp & 1)) {
pos = count;
}
count++;
temp >>= 1;
}
return (n | (1 << pos));
}
| int main() {
assert(func0(10) == 14);
assert(func0(12) == 14);
assert(func0(15) == 15);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
mov -0x14(%rbp),%eax
add $0x1,%eax
and -0x14(%rbp),%eax
test %eax,%eax
jne 1166 <_Z5func0i+0x1d>
mov -0x14(%rbp),%eax
jmp 11aa <_Z5func0i+0x61>
movl $0x0,-0xc(%rbp)
mov -0x14(%rbp),%eax
mov %eax,-0x8(%rbp)
movl $0x0,-... | _Z5func0i:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_14], edi
mov eax, [rbp+var_14]
add eax, 1
and eax, [rbp+var_14]
test eax, eax
jnz short loc_1166
mov eax, [rbp+var_14]
jmp short loc_11AA
loc_1166:
mov [rbp+var_C], 0
mov eax, [rbp+var_14]
mov [rbp+var_8], eax
mov ... | long long func0(unsigned int a1)
{
char v2; // [rsp+8h] [rbp-Ch]
int v3; // [rsp+Ch] [rbp-8h]
char v4; // [rsp+10h] [rbp-4h]
if ( (a1 & (a1 + 1)) == 0 )
return a1;
v2 = 0;
v3 = a1;
v4 = 0;
while ( v3 )
{
if ( (v3 & 1) == 0 )
v2 = v4;
++v4;
v3 >>= 1;
}
return a1 | (1 << v2);... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x14],EDI
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,0x1
AND EAX,dword ptr [RBP + -0x14]
TEST EAX,EAX
JNZ 0x00101166
MOV EAX,dword ptr [RBP + -0x14]
JMP 0x001011aa
LAB_00101166:
MOV dword ptr [RBP + -0xc],0x0
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x... | /* func0(int) */
uint func0(int param_1)
{
byte bVar1;
byte bVar2;
int4 local_10;
if ((param_1 + 1U & param_1) != 0) {
bVar1 = 0;
bVar2 = 0;
for (local_10 = param_1; local_10 != 0; local_10 = (int)local_10 >> 1) {
if ((local_10 & 1) == 0) {
bVar1 = bVar2;
}
bVar2 = bVa... |
1,241 | func0 |
#include <assert.h>
| int func0(int n) {
if (!(n & (n + 1))) {
return n;
}
int pos = 0, temp = n, count = 0;
while (temp) {
if (!(temp & 1)) {
pos = count;
}
count++;
temp >>= 1;
}
return (n | (1 << pos));
}
| int main() {
assert(func0(10) == 14);
assert(func0(12) == 14);
assert(func0(15) == 15);
return 0;
}
| O1 | cpp | func0(int):
endbr64
lea 0x1(%rdi),%edx
mov %edi,%eax
test %edi,%edx
je 1171 <_Z5func0i+0x28>
mov $0x0,%edx
mov $0x0,%ecx
test $0x1,%al
cmove %edx,%ecx
add $0x1,%edx
sar %eax
jne 1160 <_Z5func0i+0x17>
mov %edi,%eax
bts %ecx,%eax
retq
| _Z5func0i:
endbr64
lea edx, [rdi+1]
mov eax, edi
test edx, edi
jz short locret_1171
mov edx, 0
mov ecx, 0
loc_1160:
test al, 1
cmovz ecx, edx
add edx, 1
sar eax, 1
jnz short loc_1160
mov eax, edi
bts eax, ecx
locret_1171:
retn | int func0(int a1)
{
int result; // eax
char v2; // dl
char v3; // cl
result = a1;
if ( (a1 & (a1 + 1)) != 0 )
{
v2 = 0;
v3 = 0;
do
{
if ( (result & 1) == 0 )
v3 = v2;
++v2;
result >>= 1;
}
while ( result );
return a1 | (1 << v3);
}
return result;
} | func0:
ENDBR64
LEA EDX,[RDI + 0x1]
MOV EAX,EDI
TEST EDX,EDI
JZ 0x00101171
MOV EDX,0x0
MOV ECX,0x0
LAB_00101160:
TEST AL,0x1
CMOVZ ECX,EDX
ADD EDX,0x1
SAR EAX,0x1
JNZ 0x00101160
MOV EAX,EDI
BTS EAX,ECX
LAB_00101171:
RET | /* func0(int) */
int func0(int param_1)
{
uint uVar1;
uint uVar2;
uint uVar3;
if ((param_1 + 1U & param_1) != 0) {
uVar3 = 0;
uVar2 = 0;
uVar1 = param_1;
do {
if ((uVar1 & 1) == 0) {
uVar2 = uVar3;
}
uVar3 = uVar3 + 1;
uVar1 = (int)uVar1 >> 1;
} while (uV... |
1,242 | func0 |
#include <assert.h>
| int func0(int n) {
if (!(n & (n + 1))) {
return n;
}
int pos = 0, temp = n, count = 0;
while (temp) {
if (!(temp & 1)) {
pos = count;
}
count++;
temp >>= 1;
}
return (n | (1 << pos));
}
| int main() {
assert(func0(10) == 14);
assert(func0(12) == 14);
assert(func0(15) == 15);
return 0;
}
| O2 | cpp | func0(int) [clone .part.0]:
test %edi,%edi
je 11f0 <_Z5func0i.part.0+0x30>
mov %edi,%edx
xor %ecx,%ecx
xor %esi,%esi
nopw 0x0(%rax,%rax,1)
test $0x1,%dl
cmove %esi,%ecx
add $0x1,%esi
sar %edx
jne 11d0 <_Z5func0i.part.0+0x10>
mov $0x1,%eax
shl %cl,%eax
or %edi,%eax
retq
nopw 0x0(... | _Z5func0i:
endbr64
lea edx, [rdi+1]
mov eax, edi
test edx, edi
jz short locret_1229
xor ecx, ecx
xor edx, edx
nop dword ptr [rax+00000000h]
loc_1218:
test al, 1
cmovz ecx, edx
add edx, 1
sar eax, 1
jnz short loc_1218
mov eax, edi
bts eax, ecx
locret_1229:
retn | int func0(int a1)
{
int result; // eax
char v2; // cl
char v3; // dl
result = a1;
if ( (a1 & (a1 + 1)) != 0 )
{
v2 = 0;
v3 = 0;
do
{
if ( (result & 1) == 0 )
v2 = v3;
++v3;
result >>= 1;
}
while ( result );
return a1 | (1 << v2);
}
return result;
} | func0:
ENDBR64
LEA EDX,[RDI + 0x1]
MOV EAX,EDI
TEST EDX,EDI
JZ 0x00101229
XOR ECX,ECX
XOR EDX,EDX
NOP dword ptr [RAX]
LAB_00101218:
TEST AL,0x1
CMOVZ ECX,EDX
ADD EDX,0x1
SAR EAX,0x1
JNZ 0x00101218
MOV EAX,EDI
BTS EAX,ECX
LAB_00101229:
RET | /* func0(int) */
int func0(int param_1)
{
uint uVar1;
uint uVar2;
uint uVar3;
if ((param_1 + 1U & param_1) != 0) {
uVar2 = 0;
uVar3 = 0;
uVar1 = param_1;
do {
if ((uVar1 & 1) == 0) {
uVar2 = uVar3;
}
uVar3 = uVar3 + 1;
uVar1 = (int)uVar1 >> 1;
} while (uV... |
1,243 | func0 |
#include <assert.h>
| int func0(int n) {
if (!(n & (n + 1))) {
return n;
}
int pos = 0, temp = n, count = 0;
while (temp) {
if (!(temp & 1)) {
pos = count;
}
count++;
temp >>= 1;
}
return (n | (1 << pos));
}
| int main() {
assert(func0(10) == 14);
assert(func0(12) == 14);
assert(func0(15) == 15);
return 0;
}
| O3 | cpp | func0(int):
endbr64
lea 0x1(%rdi),%edx
mov %edi,%eax
test %edi,%edx
je 1169 <_Z5func0i+0x29>
xor %ecx,%ecx
xor %edx,%edx
nopl 0x0(%rax)
test $0x1,%al
cmove %edx,%ecx
add $0x1,%edx
sar %eax
jne 1158 <_Z5func0i+0x18>
mov %edi,%eax
bts %ecx,%eax
retq
nopw 0x0(%rax,%rax,1)
| _Z5func0i:
endbr64
lea edx, [rdi+1]
mov eax, edi
test edx, edi
jz short locret_1169
xor ecx, ecx
xor edx, edx
nop dword ptr [rax+00000000h]
loc_1158:
test al, 1
cmovz ecx, edx
add edx, 1
sar eax, 1
jnz short loc_1158
mov eax, edi
bts eax, ecx
locret_1169:
retn | int func0(int a1)
{
int result; // eax
char v2; // cl
char v3; // dl
result = a1;
if ( (a1 & (a1 + 1)) != 0 )
{
v2 = 0;
v3 = 0;
do
{
if ( (result & 1) == 0 )
v2 = v3;
++v3;
result >>= 1;
}
while ( result );
return a1 | (1 << v2);
}
return result;
} | func0:
ENDBR64
LEA EDX,[RDI + 0x1]
MOV EAX,EDI
TEST EDX,EDI
JZ 0x00101169
XOR ECX,ECX
XOR EDX,EDX
NOP dword ptr [RAX]
LAB_00101158:
TEST AL,0x1
CMOVZ ECX,EDX
ADD EDX,0x1
SAR EAX,0x1
JNZ 0x00101158
MOV EAX,EDI
BTS EAX,ECX
LAB_00101169:
RET | /* func0(int) */
int func0(int param_1)
{
uint uVar1;
uint uVar2;
uint uVar3;
if ((param_1 + 1U & param_1) != 0) {
uVar2 = 0;
uVar3 = 0;
uVar1 = param_1;
do {
if ((uVar1 & 1) == 0) {
uVar2 = uVar3;
}
uVar3 = uVar3 + 1;
uVar1 = (int)uVar1 >> 1;
} while (uV... |
1,244 | func0 |
#include <cmath>
#include <cassert>
| double func0(double r, double h) {
double volume = (1.0/3) * M_PI * r * r * h;
return volume;
}
| int main() {
assert(func0(5, 12) == 314.15926535897927);
assert(func0(10, 15) == 1570.7963267948965);
assert(func0(19, 17) == 6426.651371693521);
return 0;
}
| O0 | cpp | func0(double, double):
endbr64
push %rbp
mov %rsp,%rbp
movsd %xmm0,-0x18(%rbp)
movsd %xmm1,-0x20(%rbp)
movsd -0x18(%rbp),%xmm1
movsd 0xf70(%rip),%xmm0
mulsd %xmm1,%xmm0
mulsd -0x18(%rbp),%xmm0
movsd -0x20(%rbp),%xmm1
mulsd %xmm1,%xmm0
movsd %xmm0,-0x8(%rbp)
movsd -0x8(%rbp),%xmm0
pop %rbp
retq
| _Z5func0dd:
endbr64
push rbp
mov rbp, rsp
movsd [rbp+var_18], xmm0
movsd [rbp+var_20], xmm1
movsd xmm1, [rbp+var_18]
movsd xmm0, cs:qword_20B8
mulsd xmm0, xmm1
mulsd xmm0, [rbp+var_18]
movsd xmm1, [rbp+var_20]
mulsd xmm0, xmm1
movsd [rbp+var_8], xmm0
movsd xmm0, [rbp+var_8]
pop rbp
retn | double func0(double a1, double a2)
{
return 1.047197551196598 * a1 * a1 * a2;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOVSD qword ptr [RBP + -0x18],XMM0
MOVSD qword ptr [RBP + -0x20],XMM1
MOVSD XMM1,qword ptr [RBP + -0x18]
MOVSD XMM0,qword ptr [0x001020b8]
MULSD XMM0,XMM1
MULSD XMM0,qword ptr [RBP + -0x18]
MOVSD XMM1,qword ptr [RBP + -0x20]
MULSD XMM0,XMM1
MOVSD qword ptr [RBP + -0x8],XMM0
MOVSD XMM... | /* func0(double, double) */
double func0(double param_1,double param_2)
{
return DAT_001020b8 * param_1 * param_1 * param_2;
} |
1,245 | func0 |
#include <cmath>
#include <cassert>
| double func0(double r, double h) {
double volume = (1.0/3) * M_PI * r * r * h;
return volume;
}
| int main() {
assert(func0(5, 12) == 314.15926535897927);
assert(func0(10, 15) == 1570.7963267948965);
assert(func0(19, 17) == 6426.651371693521);
return 0;
}
| O1 | cpp | func0(double, double):
endbr64
movapd %xmm0,%xmm2
mulsd 0xecf(%rip),%xmm0
mulsd %xmm2,%xmm0
mulsd %xmm1,%xmm0
retq
| _Z5func0dd:
endbr64
movapd xmm2, xmm0
mulsd xmm0, cs:qword_2008
mulsd xmm0, xmm2
mulsd xmm0, xmm1
retn | double func0(double a1, double a2)
{
return a1 * 1.047197551196598 * a1 * a2;
} | func0:
ENDBR64
MOVAPD XMM2,XMM0
MULSD XMM0,qword ptr [0x00102008]
MULSD XMM0,XMM2
MULSD XMM0,XMM1
RET | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(double, double) */
double func0(double param_1,double param_2)
{
return param_1 * _DAT_00102008 * param_1 * param_2;
} |
1,246 | func0 |
#include <cmath>
#include <cassert>
| double func0(double r, double h) {
double volume = (1.0/3) * M_PI * r * r * h;
return volume;
}
| int main() {
assert(func0(5, 12) == 314.15926535897927);
assert(func0(10, 15) == 1570.7963267948965);
assert(func0(19, 17) == 6426.651371693521);
return 0;
}
| O2 | cpp | func0(double, double):
endbr64
movapd %xmm0,%xmm2
movsd 0xeb8(%rip),%xmm0
mulsd %xmm2,%xmm0
mulsd %xmm2,%xmm0
mulsd %xmm1,%xmm0
retq
nopl (%rax)
| _Z5func0dd:
endbr64
movapd xmm2, xmm0
movsd xmm0, cs:qword_2008
mulsd xmm0, xmm2
mulsd xmm0, xmm2
mulsd xmm0, xmm1
retn | double func0(double a1, double a2)
{
return 1.047197551196598 * a1 * a1 * a2;
} | func0:
ENDBR64
MOVAPD XMM2,XMM0
MOVSD XMM0,qword ptr [0x00102008]
MULSD XMM0,XMM2
MULSD XMM0,XMM2
MULSD XMM0,XMM1
RET | /* func0(double, double) */
double func0(double param_1,double param_2)
{
return DAT_00102008 * param_1 * param_1 * param_2;
} |
1,247 | func0 |
#include <cmath>
#include <cassert>
| double func0(double r, double h) {
double volume = (1.0/3) * M_PI * r * r * h;
return volume;
}
| int main() {
assert(func0(5, 12) == 314.15926535897927);
assert(func0(10, 15) == 1570.7963267948965);
assert(func0(19, 17) == 6426.651371693521);
return 0;
}
| O3 | cpp | func0(double, double):
endbr64
movapd %xmm0,%xmm2
movsd 0xeb8(%rip),%xmm0
mulsd %xmm2,%xmm0
mulsd %xmm2,%xmm0
mulsd %xmm1,%xmm0
retq
nopl (%rax)
| _Z5func0dd:
endbr64
movapd xmm2, xmm0
movsd xmm0, cs:qword_2008
mulsd xmm0, xmm2
mulsd xmm0, xmm2
mulsd xmm0, xmm1
retn | double func0(double a1, double a2)
{
return 1.047197551196598 * a1 * a1 * a2;
} | func0:
ENDBR64
MOVAPD XMM2,XMM0
MOVSD XMM0,qword ptr [0x00102008]
MULSD XMM0,XMM2
MULSD XMM0,XMM2
MULSD XMM0,XMM1
RET | /* func0(double, double) */
double func0(double param_1,double param_2)
{
return DAT_00102008 * param_1 * param_1 * param_2;
} |
1,248 | func0 |
#include <vector>
#include <cassert>
| int func0(const std::vector<int>& list1) {
for (int num : list1) {
if (num >= 0) {
return num;
}
}
return -1; // In case no positive number is found
}
| int main() {
assert(func0({-1, -2, 1, 2}) == 1);
assert(func0({3, 4, -5}) == 3);
assert(func0({-2, -3, 1}) == 1);
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x40,%rsp
mov %rdi,-0x38(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x8(%rbp)
xor %eax,%eax
mov -0x38(%rbp),%rax
mov %rax,-0x10(%rbp)
mov -0x10(%rbp),%rax
mov %rax,%rdi
callq 155e <_ZNKSt6vectorIiSaIiEE5be... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_38], rdi
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
mov rax, [rbp+var_38]
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov rdi, rax
call _ZNKSt6vectorIiSaIiEE5beginEv; std::vector<int... | 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);
v4[1] = a1;
v3 = std::vector<int>::begin(a1);
v4[0] = std::vector<int>::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 RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,RAX
CALL 0x001015e2
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qwor... | /* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
bool bVar1;
int iVar2;
int *piVar3;
long in_FS_OFFSET;
int8 local_28;
int8 local_20;
vector<int,std::allocator<int>> *local_18;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_18 = (vector<in... |
1,249 | func0 |
#include <vector>
#include <cassert>
| int func0(const std::vector<int>& list1) {
for (int num : list1) {
if (num >= 0) {
return num;
}
}
return -1; // In case no positive number is found
}
| int main() {
assert(func0({-1, -2, 1, 2}) == 1);
assert(func0({3, 4, -5}) == 3);
assert(func0({-2, -3, 1}) == 1);
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
mov (%rdi),%rax
mov 0x8(%rdi),%rcx
cmp %rcx,%rax
je 1230 <_Z5func0RKSt6vectorIiSaIiEE+0x27>
mov (%rax),%edx
test %edx,%edx
jns 122d <_Z5func0RKSt6vectorIiSaIiEE+0x24>
add $0x4,%rax
cmp %rax,%rcx
jne 1219 <_Z5func0RKSt6vectorIiSa... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
mov rax, [rdi]
mov rcx, [rdi+8]
cmp rcx, rax
jz short loc_1230
loc_1219:
mov edx, [rax]
test edx, edx
jns short loc_122D
add rax, 4
cmp rcx, rax
jnz short loc_1219
mov edx, 0FFFFFFFFh
loc_122D:
mov eax, edx
retn
loc_1230:
mov edx, ... | long long func0(unsigned int **a1)
{
unsigned int *v1; // rax
unsigned int *v2; // rcx
unsigned int v3; // edx
v1 = *a1;
v2 = a1[1];
if ( v2 == *a1 )
{
return (unsigned int)-1;
}
else
{
while ( 1 )
{
v3 = *v1;
if ( (*v1 & 0x80000000) == 0 )
break;
if ( v2 == +... | func0:
ENDBR64
MOV RAX,qword ptr [RDI]
MOV RCX,qword ptr [RDI + 0x8]
CMP RCX,RAX
JZ 0x00101230
LAB_00101219:
MOV EDX,dword ptr [RAX]
TEST EDX,EDX
JNS 0x0010122d
ADD RAX,0x4
CMP RCX,RAX
JNZ 0x00101219
MOV EDX,0xffffffff
LAB_0010122d:
MOV EAX,EDX
RET
LAB_00101230:
MOV EDX,0xffffffff
JMP 0x0010122d | /* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
int *piVar1;
piVar1 = *(int **)param_1;
while( true ) {
if (*(int **)(param_1 + 8) == piVar1) {
return -1;
}
if (-1 < *piVar1) break;
piVar1 = piVar1 + 1;
}
return *piVar1;
} |
1,250 | func0 |
#include <vector>
#include <cassert>
| int func0(const std::vector<int>& list1) {
for (int num : list1) {
if (num >= 0) {
return num;
}
}
return -1; // In case no positive number is found
}
| int main() {
assert(func0({-1, -2, 1, 2}) == 1);
assert(func0({3, 4, -5}) == 3);
assert(func0({-2, -3, 1}) == 1);
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
mov (%rdi),%rax
mov 0x8(%rdi),%rdx
cmp %rdx,%rax
jne 1421 <_Z5func0RKSt6vectorIiSaIiEE+0x21>
jmp 1430 <_Z5func0RKSt6vectorIiSaIiEE+0x30>
nopw 0x0(%rax,%rax,1)
add $0x4,%rax
cmp %rax,%rdx
je 1430 <_Z5func0RKSt6vectorIiSaIiEE+0x30>
m... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
mov rax, [rdi]
mov rcx, [rdi+8]
cmp rcx, rax
jnz short loc_13F1
jmp short loc_1400
loc_13E8:
add rax, 4
cmp rcx, rax
jz short loc_1400
loc_13F1:
mov edx, [rax]
test edx, edx
js short loc_13E8
mov eax, edx
retn
loc_1400:
mov edx, 0... | long long func0(unsigned int **a1)
{
unsigned int *v1; // rax
unsigned int *v2; // rcx
v1 = *a1;
v2 = a1[1];
if ( v2 == *a1 )
return 0xFFFFFFFFLL;
while ( (*v1 & 0x80000000) != 0 )
{
if ( v2 == ++v1 )
return 0xFFFFFFFFLL;
}
return *v1;
} | func0:
ENDBR64
MOV RAX,qword ptr [RDI]
MOV RCX,qword ptr [RDI + 0x8]
CMP RCX,RAX
JNZ 0x001013f1
JMP 0x00101400
LAB_001013e8:
ADD RAX,0x4
CMP RCX,RAX
JZ 0x00101400
LAB_001013f1:
MOV EDX,dword ptr [RAX]
TEST EDX,EDX
JS 0x001013e8
MOV EAX,EDX
RET
LAB_00101400:
MOV EDX,0xffffffff
MOV EAX,EDX
RET | /* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
int *piVar1;
piVar1 = *(int **)param_1;
while( true ) {
if (*(int **)(param_1 + 8) == piVar1) {
return -1;
}
if (-1 < *piVar1) break;
piVar1 = piVar1 + 1;
}
return *piVar1;
} |
1,251 | func0 |
#include <vector>
#include <cassert>
| int func0(const std::vector<int>& list1) {
for (int num : list1) {
if (num >= 0) {
return num;
}
}
return -1; // In case no positive number is found
}
| int main() {
assert(func0({-1, -2, 1, 2}) == 1);
assert(func0({3, 4, -5}) == 3);
assert(func0({-2, -3, 1}) == 1);
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
mov (%rdi),%rax
mov 0x8(%rdi),%rdx
cmp %rdx,%rax
jne 1411 <_Z5func0RKSt6vectorIiSaIiEE+0x21>
jmp 1420 <_Z5func0RKSt6vectorIiSaIiEE+0x30>
nopw 0x0(%rax,%rax,1)
add $0x4,%rax
cmp %rax,%rdx
je 1420 <_Z5func0RKSt6vectorIiSaIiEE+0x30>
m... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
mov rax, [rdi]
mov rcx, [rdi+8]
cmp rcx, rax
jnz short loc_13F1
jmp short loc_1400
loc_13E8:
add rax, 4
cmp rcx, rax
jz short loc_1400
loc_13F1:
mov edx, [rax]
test edx, edx
js short loc_13E8
mov eax, edx
retn
loc_1400:
mov edx, 0... | long long func0(unsigned int **a1)
{
unsigned int *v1; // rax
unsigned int *v2; // rcx
v1 = *a1;
v2 = a1[1];
if ( v2 == *a1 )
return 0xFFFFFFFFLL;
while ( (*v1 & 0x80000000) != 0 )
{
if ( v2 == ++v1 )
return 0xFFFFFFFFLL;
}
return *v1;
} | func0:
ENDBR64
MOV RAX,qword ptr [RDI]
MOV RCX,qword ptr [RDI + 0x8]
CMP RCX,RAX
JNZ 0x001013f1
JMP 0x00101400
LAB_001013e8:
ADD RAX,0x4
CMP RCX,RAX
JZ 0x00101400
LAB_001013f1:
MOV EDX,dword ptr [RAX]
TEST EDX,EDX
JS 0x001013e8
MOV EAX,EDX
RET
LAB_00101400:
MOV EDX,0xffffffff
MOV EAX,EDX
RET | /* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
int *piVar1;
piVar1 = *(int **)param_1;
while( true ) {
if (*(int **)(param_1 + 8) == piVar1) {
return -1;
}
if (-1 < *piVar1) break;
piVar1 = piVar1 + 1;
}
return *piVar1;
} |
1,252 | func0 |
#include <iostream>
#include <vector>
#include <algorithm>
#include <assert.h>
| int func0(std::vector<std::vector<int>> grid, int n) {
int incl = std::max(grid[0][0], grid[1][0]);
int excl = 0;
for (int i = 1; i < n; ++i) {
int excl_new = std::max(excl, incl);
incl = excl + std::max(grid[0][i], grid[1][i]);
excl = excl_new;
}
return std::max(excl... | int main() {
assert(func0({ {1, 4, 5}, {2, 0, 0} }, 3) == 7);
assert(func0({ {1, 2, 3, 4, 5}, {6, 7, 8, 9, 10} }, 5) == 24);
assert(func0({ {7, 9, 11, 15, 19}, {21, 25, 28, 31, 32} }, 5) == 81);
return 0;
}
| O0 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >, int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x38,%rsp
mov %rdi,-0x38(%rbp)
mov %esi,-0x3c(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x38(%rbp),%... | _Z5func0St6vectorIS_IiSaIiEESaIS1_EEi:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 38h
mov [rbp+var_38], rdi
mov [rbp+var_3C], esi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_38]
mov esi, 1
mov rdi, rax
call _ZNSt6vectorIS_IiSaIiEESaIS1_EEixE... | long long func0(long long a1, int a2)
{
long long v2; // rax
long long v3; // rbx
long long v4; // rax
long long v5; // rax
long long v6; // rax
long long v7; // rbx
long long v8; // rax
long long v9; // rax
_DWORD *v10; // rax
int v12; // [rsp+18h] [rbp-28h] BYREF
int v13; // [rsp+1Ch] [rbp-24h]... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x38
MOV qword ptr [RBP + -0x38],RDI
MOV dword ptr [RBP + -0x3c],ESI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x38]
MOV ESI,0x1
MOV RDI,RAX
CALL 0x00101c5a
MOV ESI,0x0
MOV RDI,RAX
CALL 0x00101c88
MOV RBX,RAX
MO... | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > >, int) */
int func0(vector param_1,int param_2)
{
vector<int,std::allocator<int>> *pvVar1;
int *piVar2;
int *piVar3;
int4 in_register_0000003c;
vector<std::vector<int,std::allocator<int>>... |
1,253 | func0 |
#include <iostream>
#include <vector>
#include <algorithm>
#include <assert.h>
| int func0(std::vector<std::vector<int>> grid, int n) {
int incl = std::max(grid[0][0], grid[1][0]);
int excl = 0;
for (int i = 1; i < n; ++i) {
int excl_new = std::max(excl, incl);
incl = excl + std::max(grid[0][i], grid[1][i]);
excl = excl_new;
}
return std::max(excl... | int main() {
assert(func0({ {1, 4, 5}, {2, 0, 0} }, 3) == 7);
assert(func0({ {1, 2, 3, 4, 5}, {6, 7, 8, 9, 10} }, 5) == 24);
assert(func0({ {7, 9, 11, 15, 19}, {21, 25, 28, 31, 32} }, 5) == 81);
return 0;
}
| O1 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >, int):
endbr64
mov (%rdi),%rax
mov 0x18(%rax),%rcx
mov (%rax),%rax
mov (%rax),%edx
cmp %edx,(%rcx)
mov %rcx,%rdx
cmovle %rax,%rdx
mov (%rdx),%edi
cmp $0x1,%esi
jle 1349 <_Z5func... | _Z5func0St6vectorIS_IiSaIiEESaIS1_EEi:
endbr64
mov rax, [rdi]
mov rcx, [rax+18h]
mov rdi, [rax]
mov eax, [rcx]
cmp [rdi], eax
mov rax, rdi
cmovl rax, rcx
mov eax, [rax]
cmp esi, 1
jle short loc_1307
lea rdx, [rdi+4]
add rcx, 4
lea esi, [rsi-2]
lea r8, [rdi+rsi*4+8]
... | long long func0(unsigned int ***a1, int a2)
{
unsigned int *v2; // rcx
unsigned int *v3; // rdi
unsigned int *v4; // rax
long long result; // rax
_DWORD *v6; // rdx
_DWORD *v7; // rcx
long long v8; // r8
int v9; // esi
int v10; // edi
_DWORD *v11; // rax
v2 = (*a1)[3];
v3 = **a1;
v4 = v3;
... | func0:
ENDBR64
MOV RAX,qword ptr [RDI]
MOV RCX,qword ptr [RAX + 0x18]
MOV RDI,qword ptr [RAX]
MOV EAX,dword ptr [RCX]
CMP dword ptr [RDI],EAX
MOV RAX,RDI
CMOVL RAX,RCX
MOV EAX,dword ptr [RAX]
CMP ESI,0x1
JLE 0x00101307
LEA RDX,[RDI + 0x4]
ADD RCX,0x4
LEA ESI,[RSI + -0x2]
LEA R8,[RDI + RSI*0x4 + 0x8]
MOV ESI,0x0
LAB_001... | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > >, int) */
int func0(vector param_1,int param_2)
{
int *piVar1;
int *piVar2;
int *piVar3;
int *piVar4;
int iVar5;
int iVar6;
int iVar7;
int4 in_register_0000003c;
piVar4 = (int ... |
1,254 | func0 |
#include <iostream>
#include <vector>
#include <algorithm>
#include <assert.h>
| int func0(std::vector<std::vector<int>> grid, int n) {
int incl = std::max(grid[0][0], grid[1][0]);
int excl = 0;
for (int i = 1; i < n; ++i) {
int excl_new = std::max(excl, incl);
incl = excl + std::max(grid[0][i], grid[1][i]);
excl = excl_new;
}
return std::max(excl... | int main() {
assert(func0({ {1, 4, 5}, {2, 0, 0} }, 3) == 7);
assert(func0({ {1, 2, 3, 4, 5}, {6, 7, 8, 9, 10} }, 5) == 24);
assert(func0({ {7, 9, 11, 15, 19}, {21, 25, 28, 31, 32} }, 5) == 81);
return 0;
}
| O2 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >, int):
endbr64
mov (%rdi),%rax
mov 0x18(%rax),%rdi
mov (%rax),%r9
mov (%r9),%eax
cmp %eax,(%rdi)
cmovge (%rdi),%eax
cmp $0x1,%esi
jle 1758 <_Z5func0St6vectorIS_IiSaIiEESaIS1_EEi+0x58>... | _Z5func0St6vectorIS_IiSaIiEESaIS1_EEi:
endbr64
mov rax, [rdi]
mov r9, [rax+18h]
mov r10, [rax]
mov edx, [r9]
mov eax, [r10]
cmp eax, edx
cmovl eax, edx
cmp esi, 1
jle short loc_1780
mov esi, esi
mov edx, 1
xor ecx, ecx
nop word ptr [rax+rax+00000000h]
loc_1750:
cmp ... | long long func0(unsigned int ***a1, int a2)
{
unsigned int *v2; // r9
unsigned int *v3; // r10
long long result; // rax
long long v5; // rdx
int v6; // ecx
int v7; // r8d
signed int v8; // eax
v2 = (*a1)[3];
v3 = **a1;
result = *v3;
if ( (int)result < (int)*v2 )
result = *v2;
if ( a2 <= 1 ... | func0:
ENDBR64
MOV RAX,qword ptr [RDI]
MOV R9,qword ptr [RAX + 0x18]
MOV R10,qword ptr [RAX]
MOV EDX,dword ptr [R9]
MOV EAX,dword ptr [R10]
CMP EAX,EDX
CMOVL EAX,EDX
CMP ESI,0x1
JLE 0x00101780
MOV ESI,ESI
MOV EDX,0x1
XOR ECX,ECX
NOP word ptr [RAX + RAX*0x1]
LAB_00101750:
CMP ECX,EAX
MOV EDI,dword ptr [R9 + RDX*0x4]
MOV... | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > >, int) */
int func0(vector param_1,int param_2)
{
int iVar1;
int *piVar2;
int *piVar3;
int iVar4;
int iVar5;
int iVar6;
ulong uVar7;
int4 in_register_0000003c;
piVar2 = (int *)... |
1,255 | func0 |
#include <iostream>
#include <vector>
#include <algorithm>
#include <assert.h>
| int func0(std::vector<std::vector<int>> grid, int n) {
int incl = std::max(grid[0][0], grid[1][0]);
int excl = 0;
for (int i = 1; i < n; ++i) {
int excl_new = std::max(excl, incl);
incl = excl + std::max(grid[0][i], grid[1][i]);
excl = excl_new;
}
return std::max(excl... | int main() {
assert(func0({ {1, 4, 5}, {2, 0, 0} }, 3) == 7);
assert(func0({ {1, 2, 3, 4, 5}, {6, 7, 8, 9, 10} }, 5) == 24);
assert(func0({ {7, 9, 11, 15, 19}, {21, 25, 28, 31, 32} }, 5) == 81);
return 0;
}
| O3 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >, int):
endbr64
mov (%rdi),%rax
mov 0x18(%rax),%r8
mov (%rax),%r10
mov (%r10),%eax
cmp %eax,(%r8)
cmovge (%r8),%eax
cmp $0x1,%esi
jle 1718 <_Z5func0St6vectorIS_IiSaIiEESaIS1_EEi+0x58>
... | _Z5func0St6vectorIS_IiSaIiEESaIS1_EEi:
endbr64
mov rax, [rdi]
mov r9, [rax+18h]
mov r10, [rax]
mov edx, [r9]
mov eax, [r10]
cmp eax, edx
cmovl eax, edx
cmp esi, 1
jle short loc_1780
mov esi, esi
mov edx, 1
xor ecx, ecx
nop word ptr [rax+rax+00000000h]
loc_1750:
cmp ... | long long func0(unsigned int ***a1, int a2)
{
unsigned int *v2; // r9
unsigned int *v3; // r10
long long result; // rax
long long v5; // rdx
int v6; // ecx
int v7; // r8d
signed int v8; // eax
v2 = (*a1)[3];
v3 = **a1;
result = *v3;
if ( (int)result < (int)*v2 )
result = *v2;
if ( a2 <= 1 ... | func0:
ENDBR64
MOV RAX,qword ptr [RDI]
MOV R9,qword ptr [RAX + 0x18]
MOV R10,qword ptr [RAX]
MOV EDX,dword ptr [R9]
MOV EAX,dword ptr [R10]
CMP EAX,EDX
CMOVL EAX,EDX
CMP ESI,0x1
JLE 0x00101780
MOV ESI,ESI
MOV EDX,0x1
XOR ECX,ECX
NOP word ptr [RAX + RAX*0x1]
LAB_00101750:
CMP ECX,EAX
MOV EDI,dword ptr [R10 + RDX*0x4]
MO... | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > >, int) */
int func0(vector param_1,int param_2)
{
int iVar1;
int *piVar2;
int *piVar3;
int iVar4;
int iVar5;
int iVar6;
ulong uVar7;
int4 in_register_0000003c;
piVar2 = (int *)... |
1,256 | func0 |
#include <iostream>
#include <string>
#include <assert.h>
using namespace std;
| string func0(string str) {
int n = str.length();
int i = 0;
int currlen = 0;
int maxlen = 0;
int st = -1;
while (i < n) {
if (str[i] == ' ') {
if (currlen % 2 == 0) {
if (maxlen < currlen) {
maxlen = currlen;
... | int main() {
assert(func0("python language") == "language");
assert(func0("maximum even length") == "length");
assert(func0("eve") == "-1");
return 0;
}
| O0 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x38,%rsp
mov %rdi,-0x38(%rbp)
mov %rsi,-0x40(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x40(%rbp),%rax
mov %rax,%rdi
callq 2300 <_... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
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_50]
mov rdi, rax
call __ZNKSt7__cxx1112basic_str... | long long func0(long long a1, long long a2)
{
char v3; // [rsp+1Bh] [rbp-35h] BYREF
int v4; // [rsp+1Ch] [rbp-34h]
int v5; // [rsp+20h] [rbp-30h]
int v6; // [rsp+24h] [rbp-2Ch]
int v7; // [rsp+28h] [rbp-28h]
int v8; // [rsp+2Ch] [rbp-24h]
char *v9; // [rsp+30h] [rbp-20h]
unsigned long long v10; // [rsp... | 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 + -0x50]
MOV RDI,RAX
CALL 0x00102290
MOV dword ptr [RBP + -0x24],EAX
MOV dword ptr [RBP + -0x34],0x0
MO... | /* func0(std::string) */
string * func0(string *param_1,ulong param_2)
{
char *pcVar1;
long in_FS_OFFSET;
allocator local_3d;
int local_3c;
uint local_38;
uint local_34;
int local_30;
int local_2c;
allocator *local_28;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
local_2c = std... |
1,257 | func0 |
#include <iostream>
#include <string>
#include <assert.h>
using namespace std;
| string func0(string str) {
int n = str.length();
int i = 0;
int currlen = 0;
int maxlen = 0;
int st = -1;
while (i < n) {
if (str[i] == ' ') {
if (currlen % 2 == 0) {
if (maxlen < currlen) {
maxlen = currlen;
... | int main() {
assert(func0("python language") == "language");
assert(func0("maximum even length") == "length");
assert(func0("eve") == "-1");
return 0;
}
| O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %rbx
mov %rdi,%rbx
mov 0x8(%rsi),%r11
test %r11d,%r11d
jle 1347 <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0xbe>
mov (%rsi),%r9
lea -0x1(%r11),%r8d
mov $0x0,%eax
mov $0xffffff... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbx
mov rbx, rdi
mov r11, [rsi+8]
test r11d, r11d
jle loc_1327
mov r9, [rsi]
lea r8d, [r11-1]
mov eax, 0
mov edx, 0FFFFFFFFh
mov r10d, 0
mov ecx, 0
jmp short loc_12B7
loc_129C:
test cl, 1
jnz ... | _QWORD * func0(_QWORD *a1, _QWORD *a2)
{
unsigned long long v2; // r11
long long v3; // rax
int v4; // edx
int v5; // r10d
int v6; // ecx
unsigned long long v7; // rcx
v2 = a2[1];
if ( (int)v2 <= 0 )
goto LABEL_19;
v3 = 0LL;
v4 = -1;
v5 = 0;
v6 = 0;
while ( 1 )
{
if ( *(_BYTE *)(*a2... | func0:
ENDBR64
PUSH RBX
MOV RBX,RDI
MOV R11,qword ptr [RSI + 0x8]
TEST R11D,R11D
JLE 0x00101327
MOV R9,qword ptr [RSI]
LEA R8D,[R11 + -0x1]
MOV EAX,0x0
MOV EDX,0xffffffff
MOV R10D,0x0
MOV ECX,0x0
JMP 0x001012b7
LAB_0010129c:
TEST CL,0x1
JNZ 0x001012a6
CMP ECX,R10D
JG 0x001012c3
LAB_001012a6:
MOV ECX,0x0
LAB_001012ab:
L... | /* func0(std::string) */
long * func0(long *param_1,long *param_2)
{
uint uVar1;
ulong uVar2;
int iVar3;
ulong uVar4;
uint uVar5;
int iVar6;
long in_FS_OFFSET;
bool bVar7;
allocator aStack_71;
string asStack_70 [32];
string asStack_50 [40];
long lStack_28;
long *plStack_18;
uVar2 = para... |
1,258 | func0 |
#include <iostream>
#include <string>
#include <assert.h>
using namespace std;
| string func0(string str) {
int n = str.length();
int i = 0;
int currlen = 0;
int maxlen = 0;
int st = -1;
while (i < n) {
if (str[i] == ' ') {
if (currlen % 2 == 0) {
if (maxlen < currlen) {
maxlen = currlen;
... | int main() {
assert(func0("python language") == "language");
assert(func0("maximum even length") == "length");
assert(func0("eve") == "-1");
return 0;
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %r12
mov 0x8(%rsi),%r10
mov %rdi,%r12
test %r10d,%r10d
jle 15be <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0xce>
mov (%rsi),%rax
lea -0x1(%r10),%r11d
xor %ecx,%ecx
mov $0xffff... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbx
mov rcx, [rsi+8]
mov rbx, rdi
test ecx, ecx
jle loc_15AC
mov r10, [rsi]
lea r9d, [rcx-1]
xor eax, eax
mov edx, 0FFFFFFFFh
xor r11d, r11d
xor edi, edi
jmp short loc_152F
loc_1520:
add edi, 1
l... | _QWORD * func0(_QWORD *a1, _QWORD *a2)
{
unsigned long long v2; // rcx
long long v4; // r9
long long v5; // rax
int v6; // edx
int v7; // r11d
int v8; // edi
long long v9; // r8
v2 = a2[1];
if ( (int)v2 <= 0 )
goto LABEL_17;
v4 = (unsigned int)(v2 - 1);
v5 = 0LL;
v6 = -1;
v7 = 0;
v8 = 0... | func0:
ENDBR64
PUSH RBX
MOV RCX,qword ptr [RSI + 0x8]
MOV RBX,RDI
TEST ECX,ECX
JLE 0x001015ac
MOV R10,qword ptr [RSI]
LEA R9D,[RCX + -0x1]
XOR EAX,EAX
MOV EDX,0xffffffff
XOR R11D,R11D
XOR EDI,EDI
JMP 0x0010152f
LAB_00101520:
ADD EDI,0x1
LAB_00101523:
LEA R8,[RAX + 0x1]
CMP R9,RAX
JZ 0x0010154c
LAB_0010152c:
MOV RAX,R8
... | /* func0(std::string) */
long * func0(long *param_1,long *param_2)
{
ulong uVar1;
int iVar2;
size_t sVar3;
ulong *__dest;
size_t sVar4;
long *plVar5;
int4 extraout_var;
ulong uVar6;
int iVar7;
ulong uVar8;
char *__s;
uint uVar9;
char *pcVar10;
ulong uVar11;
long in_FS_OFFSET;
size_t sS... |
1,259 | func0 |
#include <iostream>
#include <string>
#include <assert.h>
using namespace std;
| string func0(string str) {
int n = str.length();
int i = 0;
int currlen = 0;
int maxlen = 0;
int st = -1;
while (i < n) {
if (str[i] == ' ') {
if (currlen % 2 == 0) {
if (maxlen < currlen) {
maxlen = currlen;
... | int main() {
assert(func0("python language") == "language");
assert(func0("maximum even length") == "length");
assert(func0("eve") == "-1");
return 0;
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %r13
mov %rdi,%r13
push %r12
push %rbp
sub $0x10,%rsp
mov 0x8(%rsi),%r12
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
test %r12d,%r12d
jle 1628 <_Z5func0NSt7__cxx1112basic_stringIcSt11... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r12
push rbp
mov rbp, rdi
push rbx
sub rsp, 10h
mov rcx, [rsi+8]
mov rax, fs:28h
mov [rsp+28h+var_20], rax
xor eax, eax
test ecx, ecx
jle loc_1560
mov r10, [rsi]
lea r9d, [rcx-1]
mov edx, 0FFFF... | long long * func0(long long *a1, _QWORD *a2)
{
unsigned long long v3; // rcx
long long v4; // rax
long long v5; // r9
int v6; // edx
size_t v7; // r11
int v8; // edi
long long v9; // r8
_BYTE *v10; // rdi
size_t v11; // rcx
size_t v12; // rbx
_BYTE *v13; // r12
long long v15; // rax
_QWORD v16... | func0:
ENDBR64
PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
SUB RSP,0x10
MOV RCX,qword ptr [RSI + 0x8]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
TEST ECX,ECX
JLE 0x00101560
MOV R10,qword ptr [RSI]
LEA R9D,[RCX + -0x1]
MOV EDX,0xffffffff
XOR R11D,R11D
XOR EDI,EDI
JMP 0x0010148f
LAB_00101480:
ADD ED... | /* func0(std::string) */
ulong * func0(ulong *param_1,long *param_2)
{
ulong uVar1;
long lVar2;
int iVar3;
ulong *puVar4;
size_t sVar5;
size_t sVar6;
int4 extraout_var;
int iVar7;
ulong uVar8;
char *__s;
uint uVar9;
char *pcVar10;
ulong __n;
long in_FS_OFFSET;
size_t sStack_60;
long lS... |
1,260 | func0 | #include <vector>
#include <assert.h>
| int func0(const std::vector<int>& A, int x) {
int left = 0;
int right = A.size() - 1;
int result = -1;
while (left <= right) {
int mid = left + (right - left) / 2;
if (x == A[mid]) {
result = mid;
left = mid + 1;
} else if (x < A[mid]) {
... | int main() {
assert(func0({2, 5, 5, 5, 6, 6, 8, 9, 9, 9}, 5) == 3);
assert(func0({2, 3, 5, 8, 6, 6, 8, 9, 9, 9}, 9) == 9);
assert(func0({2, 2, 1, 5, 6, 6, 6, 9, 9, 9}, 6) == 6);
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> > const&, int):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x20,%rsp
mov %rdi,-0x18(%rbp)
mov %esi,-0x1c(%rbp)
movl $0x0,-0x10(%rbp)
mov -0x18(%rbp),%rax
mov %rax,%rdi
callq 1646 <_ZNKSt6vectorIiSaIiEE4sizeEv>
sub $0x1,%eax
mov %eax,-0xc(%rbp)
movl $0x... | _Z5func0RKSt6vectorIiSaIiEEi:
endbr64
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_18], rdi
mov [rbp+var_1C], esi
mov [rbp+var_10], 0
mov rax, [rbp+var_18]
mov rdi, rax
call _ZNKSt6vectorIiSaIiEE4sizeEv; std::vector<int>::size(void)
sub eax, 1
mov [rbp+var_C], eax
mov [r... | long long func0(long long a1, int a2)
{
int v3; // [rsp+10h] [rbp-10h]
int v4; // [rsp+14h] [rbp-Ch]
unsigned int v5; // [rsp+18h] [rbp-8h]
int v6; // [rsp+1Ch] [rbp-4h]
v3 = 0;
v4 = std::vector<int>::size(a1) - 1;
v5 = -1;
while ( v3 <= v4 )
{
v6 = (v4 - v3) / 2 + v3;
if ( a2 == *(_DWORD *)... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x1c],ESI
MOV dword ptr [RBP + -0x10],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,RAX
CALL 0x001016a8
SUB EAX,0x1
MOV dword ptr [RBP + -0xc],EAX
MOV dword ptr [RBP + -0x8],0xffffffff
JMP 0x00101301
LAB_00101281:
MOV E... | /* func0(std::vector<int, std::allocator<int> > const&, int) */
int func0(vector *param_1,int param_2)
{
int iVar1;
int *piVar2;
int4 local_18;
int4 local_14;
int4 local_10;
local_18 = 0;
local_14 = std::vector<int,std::allocator<int>>::size((vector<int,std::allocator<int>> *)param_1);
local_14 = l... |
1,261 | func0 | #include <vector>
#include <assert.h>
| int func0(const std::vector<int>& A, int x) {
int left = 0;
int right = A.size() - 1;
int result = -1;
while (left <= right) {
int mid = left + (right - left) / 2;
if (x == A[mid]) {
result = mid;
left = mid + 1;
} else if (x < A[mid]) {
... | int main() {
assert(func0({2, 5, 5, 5, 6, 6, 8, 9, 9, 9}, 5) == 3);
assert(func0({2, 3, 5, 8, 6, 6, 8, 9, 9, 9}, 9) == 9);
assert(func0({2, 2, 1, 5, 6, 6, 6, 9, 9, 9}, 6) == 6);
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> > const&, int):
endbr64
mov (%rdi),%r8
mov 0x8(%rdi),%rcx
sub %r8,%rcx
sar $0x2,%rcx
sub $0x1,%ecx
js 125d <_Z5func0RKSt6vectorIiSaIiEEi+0x54>
mov $0xffffffff,%r9d
mov $0x0,%edx
jmp 1237 <_Z5func0RKSt6vectorIiSaIiEEi+0x2e>
lea 0x1(%rax),%edx
mov ... | _Z5func0RKSt6vectorIiSaIiEEi:
endbr64
mov r8d, esi
mov r9, [rdi]
mov rcx, [rdi+8]
sub rcx, r9
sar rcx, 2
sub ecx, 1
js short loc_125F
mov edi, 0FFFFFFFFh
mov edx, 0
jmp short loc_1238
loc_122F:
lea edx, [rax+1]
mov edi, eax
loc_1234:
cmp ecx, edx
jl short loc_12... | long long func0(long long *a1, int a2)
{
long long v3; // r9
int v4; // ecx
unsigned int v5; // edi
int v6; // edx
signed int v7; // eax
int v8; // esi
v3 = *a1;
v4 = ((a1[1] - *a1) >> 2) - 1;
if ( v4 < 0 )
{
return (unsigned int)-1;
}
else
{
v5 = -1;
v6 = 0;
do
{
v... | func0:
ENDBR64
MOV R8D,ESI
MOV R9,qword ptr [RDI]
MOV RCX,qword ptr [RDI + 0x8]
SUB RCX,R9
SAR RCX,0x2
SUB ECX,0x1
JS 0x0010125f
MOV EDI,0xffffffff
MOV EDX,0x0
JMP 0x00101238
LAB_0010122f:
LEA EDX,[RAX + 0x1]
MOV EDI,EAX
LAB_00101234:
CMP ECX,EDX
JL 0x00101264
LAB_00101238:
MOV ESI,ECX
SUB ESI,EDX
MOV EAX,ESI
SHR EAX,0... | /* func0(std::vector<int, std::allocator<int> > const&, int) */
int func0(vector *param_1,int param_2)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
iVar3 = (int)(*(long *)(param_1 + 8) - *(long *)param_1 >> 2) + -1;
if (iVar3 < 0) {
iVar2 = -1;
}
else {
iVar4 = 0;
iVar5 = ... |
1,262 | func0 | #include <vector>
#include <assert.h>
| int func0(const std::vector<int>& A, int x) {
int left = 0;
int right = A.size() - 1;
int result = -1;
while (left <= right) {
int mid = left + (right - left) / 2;
if (x == A[mid]) {
result = mid;
left = mid + 1;
} else if (x < A[mid]) {
... | int main() {
assert(func0({2, 5, 5, 5, 6, 6, 8, 9, 9, 9}, 5) == 3);
assert(func0({2, 3, 5, 8, 6, 6, 8, 9, 9, 9}, 9) == 9);
assert(func0({2, 2, 1, 5, 6, 6, 6, 9, 9, 9}, 6) == 6);
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> > const&, int):
endbr64
mov (%rdi),%r8
mov 0x8(%rdi),%rcx
mov $0xffffffff,%r9d
sub %r8,%rcx
sar $0x2,%rcx
sub $0x1,%ecx
js 147c <_Z5func0RKSt6vectorIiSaIiEEi+0x4c>
xor %edx,%edx
jmp 1461 <_Z5func0RKSt6vectorIiSaIiEEi+0x31>
nopl 0x0(%rax)
jle 14... | _Z5func0RKSt6vectorIiSaIiEEi:
endbr64
mov r8, [rdi]
mov rcx, [rdi+8]
mov r9d, 0FFFFFFFFh
sub rcx, r8
sar rcx, 2
sub ecx, 1
js short loc_13FC
xor edx, edx
jmp short loc_13E1
loc_13D8:
jge short loc_1400
lea ecx, [rax-1]
loc_13DD:
cmp edx, ecx
jg short loc_13FC
loc_13... | long long func0(long long *a1, int a2)
{
long long v2; // r8
unsigned int v3; // r9d
int v4; // ecx
int v5; // edx
signed int v6; // eax
v2 = *a1;
v3 = -1;
v4 = ((a1[1] - *a1) >> 2) - 1;
if ( v4 >= 0 )
{
v5 = 0;
do
{
while ( 1 )
{
v6 = v5 + ((v4 - v5) >> 1);
... | func0:
ENDBR64
MOV R8,qword ptr [RDI]
MOV RCX,qword ptr [RDI + 0x8]
MOV R9D,0xffffffff
SUB RCX,R8
SAR RCX,0x2
SUB ECX,0x1
JS 0x001013fc
XOR EDX,EDX
JMP 0x001013e1
LAB_001013d8:
JGE 0x00101400
LEA ECX,[RAX + -0x1]
LAB_001013dd:
CMP EDX,ECX
JG 0x001013fc
LAB_001013e1:
MOV EAX,ECX
SUB EAX,EDX
SAR EAX,0x1
ADD EAX,EDX
MOVSX... | /* func0(std::vector<int, std::allocator<int> > const&, int) */
int func0(vector *param_1,int param_2)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
iVar5 = -1;
iVar3 = (int)(*(long *)(param_1 + 8) - *(long *)param_1 >> 2) + -1;
if (-1 < iVar3) {
iVar4 = 0;
do {
while( true... |
1,263 | func0 | #include <vector>
#include <assert.h>
| int func0(const std::vector<int>& A, int x) {
int left = 0;
int right = A.size() - 1;
int result = -1;
while (left <= right) {
int mid = left + (right - left) / 2;
if (x == A[mid]) {
result = mid;
left = mid + 1;
} else if (x < A[mid]) {
... | int main() {
assert(func0({2, 5, 5, 5, 6, 6, 8, 9, 9, 9}, 5) == 3);
assert(func0({2, 3, 5, 8, 6, 6, 8, 9, 9, 9}, 9) == 9);
assert(func0({2, 2, 1, 5, 6, 6, 6, 9, 9, 9}, 6) == 6);
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> > const&, int):
endbr64
mov (%rdi),%r8
mov 0x8(%rdi),%rcx
mov $0xffffffff,%r9d
sub %r8,%rcx
sar $0x2,%rcx
sub $0x1,%ecx
js 142c <_Z5func0RKSt6vectorIiSaIiEEi+0x4c>
xor %edx,%edx
jmp 1411 <_Z5func0RKSt6vectorIiSaIiEEi+0x31>
nopl 0x0(%rax)
jge 14... | _Z5func0RKSt6vectorIiSaIiEEi:
endbr64
mov r8, [rdi]
mov rcx, [rdi+8]
mov r9d, 0FFFFFFFFh
sub rcx, r8
sar rcx, 2
sub ecx, 1
js short loc_13FC
xor edx, edx
jmp short loc_13E1
loc_13D8:
jge short loc_1400
lea ecx, [rax-1]
loc_13DD:
cmp edx, ecx
jg short loc_13FC
loc_13... | long long func0(long long *a1, int a2)
{
long long v2; // r8
unsigned int v3; // r9d
int v4; // ecx
int v5; // edx
signed int v6; // eax
v2 = *a1;
v3 = -1;
v4 = ((a1[1] - *a1) >> 2) - 1;
if ( v4 >= 0 )
{
v5 = 0;
do
{
while ( 1 )
{
v6 = v5 + ((v4 - v5) >> 1);
... | func0:
ENDBR64
MOV R8,qword ptr [RDI]
MOV RCX,qword ptr [RDI + 0x8]
MOV R9D,0xffffffff
SUB RCX,R8
SAR RCX,0x2
SUB ECX,0x1
JS 0x001013fc
XOR EDX,EDX
JMP 0x001013e1
LAB_001013d8:
JGE 0x00101400
LEA ECX,[RAX + -0x1]
LAB_001013dd:
CMP EDX,ECX
JG 0x001013fc
LAB_001013e1:
MOV EAX,ECX
SUB EAX,EDX
SAR EAX,0x1
ADD EAX,EDX
MOVSX... | /* func0(std::vector<int, std::allocator<int> > const&, int) */
int func0(vector *param_1,int param_2)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
iVar5 = -1;
iVar3 = (int)(*(long *)(param_1 + 8) - *(long *)param_1 >> 2) + -1;
if (-1 < iVar3) {
iVar4 = 0;
do {
while( true... |
1,264 | func0 |
#include <cassert>
#include <vector>
#include <variant>
#include <string>
#include <algorithm>
using namespace std;
using EncodedInt = variant<int, vector<int>>;
using EncodedChar = variant<char, vector<char>>;
vector<EncodedInt> modified_encode(const vector<int>& alist) {
vector<EncodedInt> result... | vector<EncodedChar> func0(const string& alist) {
vector<EncodedChar> result;
if (alist.empty()) return result;
auto it = alist.begin();
char current = *it;
int count = 1;
++it;
for (; it != alist.end(); ++it) {
if (*it == current) {
count++;
} else {
... | int main() {
// Test with integers
vector<EncodedInt> expected_int = {vector<int>{2, 1}, 2, 3, vector<int>{2, 4}, 5, 1};
assert(modified_encode(vector<int>{1,1,2,3,4,4,5,1}) == expected_int);
// Test with strings
vector<EncodedChar> expected_str1 = {'a', 'u', 't', 'o', 'm', 'a', 't', 'i', 'c'... | O0 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %r15
push %r14
push %r13
push %r12
push %rbx
sub $0x58,%rsp
mov %rdi,-0x78(%rbp)
mov %rsi,-0x80(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x38(%rbp)
xor %eax,%eax
... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov [rbp+var_88], rdi
mov [rbp+var_90], rsi
mov rax, fs:28h
mov [rbp+var_38], rax
xor eax, eax
mov rax, [rbp+var_88]
m... | long long func0(long long a1, long long a2)
{
_BYTE *v2; // rax
char v4; // [rsp+12h] [rbp-7Eh] BYREF
char v5; // [rsp+13h] [rbp-7Dh] BYREF
int v6; // [rsp+14h] [rbp-7Ch]
_QWORD v7[3]; // [rsp+18h] [rbp-78h] BYREF
_QWORD v8[4]; // [rsp+30h] [rbp-60h] BYREF
char v9; // [rsp+56h] [rbp-3Ah] BYREF
char v10... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV qword ptr [RBP + -0x88],RDI
MOV qword ptr [RBP + -0x90],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x38],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x88]
MOV RDI,RAX
CALL 0x001038ca
MOV RAX,qword ptr [RBP + -0x90... | /* func0(std::string const&) */
string * func0(string *param_1)
{
char cVar1;
bool bVar2;
char *pcVar3;
long in_FS_OFFSET;
char local_86;
__new_allocator<char> local_85;
int local_84;
int8 local_80;
__new_allocator<char> *local_78;
__new_allocator<char> *local_70;
int8 local_68 [4];
allocator ... |
1,265 | func0 |
#include <cassert>
#include <vector>
#include <variant>
#include <string>
#include <algorithm>
using namespace std;
using EncodedInt = variant<int, vector<int>>;
using EncodedChar = variant<char, vector<char>>;
vector<EncodedInt> modified_encode(const vector<int>& alist) {
vector<EncodedInt> result... | vector<EncodedChar> func0(const string& alist) {
vector<EncodedChar> result;
if (alist.empty()) return result;
auto it = alist.begin();
char current = *it;
int count = 1;
++it;
for (; it != alist.end(); ++it) {
if (*it == current) {
count++;
} else {
... | int main() {
// Test with integers
vector<EncodedInt> expected_int = {vector<int>{2, 1}, 2, 3, vector<int>{2, 4}, 5, 1};
assert(modified_encode(vector<int>{1,1,2,3,4,4,5,1}) == expected_int);
// Test with strings
vector<EncodedChar> expected_str1 = {'a', 'u', 't', 'o', 'm', 'a', 't', 'i', 'c'... | O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x38,%rsp
mov %rdi,%r12
mov %fs:0x28,%rax
mov %rax,0x28(%rsp)
xor %eax,%eax
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi)
movq $... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 38h
mov r12, rdi
mov rax, fs:28h
mov [rsp+68h+var_40], rax
xor eax, eax
mov qword ptr [rdi], 0
mov qword ptr [rdi+8], 0
mov qword ptr [... | _QWORD * func0(_QWORD *a1, char **a2)
{
int v2; // r13d
char *v3; // rdx
char *v4; // rax
char *v5; // rbx
int v6; // edx
int v7; // ecx
char *v8; // rax
__int16 v9; // bx
char *v10; // rax
char v12; // [rsp+Fh] [rbp-59h] BYREF
void *v13; // [rsp+10h] [rbp-58h] BYREF
_WORD *v14; // [rsp+18h] [rb... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x38
MOV R12,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x28],RAX
XOR EAX,EAX
MOV qword ptr [RDI],0x0
MOV qword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
MOV RDX,qword ptr [RSI + 0x8]
TEST RDX,RDX
JZ 0x001017ff
MOV RBP,RSI
M... | /* func0(std::string const&) */
string * func0(string *param_1)
{
char *pcVar1;
int2 uVar2;
int iVar3;
char *pcVar4;
long *in_RSI;
long in_FS_OFFSET;
char local_59;
int2 *local_58;
int2 *local_50;
int2 *local_48;
long local_40;
local_40 = *(long *)(in_FS_OFFSET + 0x28);
*(int8 *)param_1 =... |
1,266 | func0 |
#include <cassert>
#include <vector>
#include <variant>
#include <string>
#include <algorithm>
using namespace std;
using EncodedInt = variant<int, vector<int>>;
using EncodedChar = variant<char, vector<char>>;
vector<EncodedInt> modified_encode(const vector<int>& alist) {
vector<EncodedInt> result... | vector<EncodedChar> func0(const string& alist) {
vector<EncodedChar> result;
if (alist.empty()) return result;
auto it = alist.begin();
char current = *it;
int count = 1;
++it;
for (; it != alist.end(); ++it) {
if (*it == current) {
count++;
} else {
... | int main() {
// Test with integers
vector<EncodedInt> expected_int = {vector<int>{2, 1}, 2, 3, vector<int>{2, 4}, 5, 1};
assert(modified_encode(vector<int>{1,1,2,3,4,4,5,1}) == expected_int);
// Test with strings
vector<EncodedChar> expected_str1 = {'a', 'u', 't', 'o', 'm', 'a', 't', 'i', 'c'... | O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x30,%rsp
mov 0x8(%rsi),%rcx
mov %fs:0x28,%rax
mov %rax,0x28(%rsp)
xor %eax,%eax
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r14
pxor xmm0, xmm0
push r13
push r12
push rbp
mov rbp, rdi
push rbx
sub rsp, 30h
mov rcx, [rsi+8]
mov rax, fs:28h
mov [rsp+58h+var_30], rax
xor eax, eax
mov qword ptr [rdi+10h], 0
movups xmmword ... | long long func0(long long a1, long long a2)
{
int v2; // r13d
long long v3; // rcx
char *v5; // rsi
char v6; // al
char *v7; // rbx
int v8; // edx
int v9; // ecx
_WORD *v10; // rax
_WORD *v11; // rdx
long long v12; // rsi
char v13; // al
__int16 v14; // bx
_WORD *v15; // rax
_WORD *v16; // ... | func0:
ENDBR64
PUSH R14
PXOR XMM0,XMM0
PUSH R13
PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
SUB RSP,0x30
MOV RCX,qword ptr [RSI + 0x8]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x28],RAX
XOR EAX,EAX
MOV qword ptr [RDI + 0x10],0x0
MOVUPS xmmword ptr [RDI],XMM0
TEST RCX,RCX
JZ 0x001020d0
MOV R12,RSI
MOV RSI,qword ptr [... | /* func0(std::string const&) */
string * func0(string *param_1)
{
int8 *puVar1;
int2 uVar2;
long lVar3;
int iVar4;
char *pcVar5;
int8 *in_RSI;
char *pcVar6;
long in_FS_OFFSET;
char local_49;
int local_48 [16];
int2 *local_38;
long local_30;
lVar3 = in_RSI[1];
local_30 = *(long *)(in_FS_... |
1,267 | func0 |
#include <cassert>
#include <vector>
#include <variant>
#include <string>
#include <algorithm>
using namespace std;
using EncodedInt = variant<int, vector<int>>;
using EncodedChar = variant<char, vector<char>>;
vector<EncodedInt> modified_encode(const vector<int>& alist) {
vector<EncodedInt> result... | vector<EncodedChar> func0(const string& alist) {
vector<EncodedChar> result;
if (alist.empty()) return result;
auto it = alist.begin();
char current = *it;
int count = 1;
++it;
for (; it != alist.end(); ++it) {
if (*it == current) {
count++;
} else {
... | int main() {
// Test with integers
vector<EncodedInt> expected_int = {vector<int>{2, 1}, 2, 3, vector<int>{2, 4}, 5, 1};
assert(modified_encode(vector<int>{1,1,2,3,4,4,5,1}) == expected_int);
// Test with strings
vector<EncodedChar> expected_str1 = {'a', 'u', 't', 'o', 'm', 'a', 't', 'i', 'c'... | O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r14
pxor %xmm0,%xmm0
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x30,%rsp
mov 0x8(%rsi),%rcx
mov %fs:0x28,%rax
mov %rax,0x28(%rsp)
xor %eax,%eax
movq $0x0,0x10(%rd... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r14
pxor xmm0, xmm0
push r13
push r12
push rbp
mov rbp, rdi
push rbx
sub rsp, 30h
mov rax, fs:28h
mov [rsp+58h+var_30], rax
xor eax, eax
mov rax, [rsi+8]
mov qword ptr [rdi+10h], 0
movups xmmword ... | long long func0(long long a1, char **a2)
{
int v2; // r13d
char *v3; // rax
char v5; // dl
char *v6; // rbx
char *v7; // rax
int v8; // ecx
int v9; // eax
_WORD *v10; // rax
_WORD *v11; // rdx
long long v12; // rsi
__int16 v13; // bx
_WORD *v14; // rax
_WORD *v15; // rdx
long long v16; // r... | func0:
ENDBR64
PUSH R14
PXOR XMM0,XMM0
PUSH R13
PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
SUB RSP,0x30
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x28],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RSI + 0x8]
MOV qword ptr [RDI + 0x10],0x0
MOVUPS xmmword ptr [RDI],XMM0
TEST RAX,RAX
JZ 0x00102440
MOV RCX,qword ptr [RSI]
MOV R12... | /* func0(std::string const&) */
string * func0(string *param_1)
{
long lVar1;
int8 *puVar2;
char *pcVar3;
int iVar4;
char cVar5;
char *pcVar6;
long *in_RSI;
long in_FS_OFFSET;
char local_49;
int2 *local_48;
int local_40 [16];
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
lVa... |
1,268 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int s) {
int maxvalue = 0;
for (int i = 1; i < s; ++i) {
for (int j = 1; j < s; ++j) {
int k = s - i - j;
maxvalue = std::max(maxvalue, i * j * k);
}
}
return maxvalue;
}
| int main() {
assert(func0(8) == 18);
assert(func0(4) == 2);
assert(func0(1) == 0);
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
movl $0x0,-0x1c(%rbp)
movl $0x1,-0x14(%rbp)
mov -0x14(%rbp),%eax
cmp -0x24(%rbp),%eax
jge 122a <_Z5func0i+0x81>
movl $0x1,-0x10(%rbp)
mov -0x10(%rbp),... | _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 [rbp+var_1C], 0
mov [rbp+var_14], 1
jmp short loc_11E2
loc_1197:
mov [rbp+var_10], 1
jmp short loc_11D6
loc_11A0:
mov eax, [rbp+var_24]
sub... | long long func0(int a1)
{
unsigned int v2; // [rsp+14h] [rbp-1Ch] BYREF
int v3; // [rsp+18h] [rbp-18h] BYREF
int i; // [rsp+1Ch] [rbp-14h]
int j; // [rsp+20h] [rbp-10h]
int v6; // [rsp+24h] [rbp-Ch]
unsigned long long v7; // [rsp+28h] [rbp-8h]
v7 = __readfsqword(0x28u);
v2 = 0;
for ( i = 1; i < a1; ... | 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 dword ptr [RBP + -0x1c],0x0
MOV dword ptr [RBP + -0x14],0x1
JMP 0x001011e2
LAB_00101197:
MOV dword ptr [RBP + -0x10],0x1
JMP 0x001011d6
LAB_001011a0:
MOV EAX,dword ... | /* func0(int) */
int func0(int param_1)
{
int *piVar1;
long in_FS_OFFSET;
int local_24;
int local_20;
int local_1c;
int local_18;
int local_14;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_24 = 0;
for (local_1c = 1; local_1c < param_1; local_1c = local_1c + 1) {
for (lo... |
1,269 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int s) {
int maxvalue = 0;
for (int i = 1; i < s; ++i) {
for (int j = 1; j < s; ++j) {
int k = s - i - j;
maxvalue = std::max(maxvalue, i * j * k);
}
}
return maxvalue;
}
| int main() {
assert(func0(8) == 18);
assert(func0(4) == 2);
assert(func0(1) == 0);
return 0;
}
| O1 | cpp | func0(int):
endbr64
cmp $0x1,%edi
jle 11d9 <_Z5func0i+0x50>
mov $0xffffffff,%r8d
mov $0x0,%ecx
mov $0x1,%r10d
lea -0x1(%rdi),%r11d
jmp 11b6 <_Z5func0i+0x2d>
add $0x1,%r10d
sub $0x1,%r8d
cmp %r10d,%edi
je 11de <_Z5func0i+0x55>
mov %r10d,%r9d
mov %r11d,%eax
sub %r10d,%eax
mov ... | _Z5func0i:
endbr64
mov r8d, 0FFFFFFFFh
mov ecx, 0
mov r10d, 1
lea r11d, [rdi-1]
cmp edi, 1
jle short loc_1195
loc_1167:
mov r9d, r10d
mov eax, r11d
sub eax, r10d
mov edx, r10d
loc_1173:
mov esi, edx
imul esi, eax
cmp ecx, esi
cmovl ecx, esi
add edx, r9d
sub e... | long long func0(int a1)
{
int v1; // r8d
int v2; // ecx
int v3; // r10d
int v4; // eax
int v5; // edx
v1 = -1;
v2 = 0;
v3 = 1;
if ( a1 > 1 )
{
do
{
v4 = a1 - 1 - v3;
v5 = v3;
do
{
if ( v2 < v4 * v5 )
v2 = v4 * v5;
v5 += v3;
--v4;
... | func0:
ENDBR64
MOV R8D,0xffffffff
MOV ECX,0x0
MOV R10D,0x1
LEA R11D,[RDI + -0x1]
CMP EDI,0x1
JLE 0x00101195
LAB_00101167:
MOV R9D,R10D
MOV EAX,R11D
SUB EAX,R10D
MOV EDX,R10D
LAB_00101173:
MOV ESI,EDX
IMUL ESI,EAX
CMP ECX,ESI
CMOVL ECX,ESI
ADD EDX,R9D
SUB EAX,0x1
CMP EAX,R8D
JNZ 0x00101173
ADD R10D,0x1
SUB R8D,0x1
CMP E... | /* func0(int) */
int func0(int param_1)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
iVar4 = -1;
iVar2 = 0;
iVar5 = 1;
if (1 < param_1) {
do {
iVar1 = (param_1 + -1) - iVar5;
iVar3 = iVar5;
do {
if (iVar2 < iVar3 * iVar1) {
iVar2 = iVar3 * iVar1... |
1,270 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int s) {
int maxvalue = 0;
for (int i = 1; i < s; ++i) {
for (int j = 1; j < s; ++j) {
int k = s - i - j;
maxvalue = std::max(maxvalue, i * j * k);
}
}
return maxvalue;
}
| int main() {
assert(func0(8) == 18);
assert(func0(4) == 2);
assert(func0(1) == 0);
return 0;
}
| O2 | cpp | func0(int):
endbr64
cmp $0x1,%edi
jle 12c5 <_Z5func0i+0x55>
mov $0xffffffff,%r9d
xor %r8d,%r8d
lea -0x1(%rdi),%r10d
mov $0x1,%esi
nopl 0x0(%rax,%rax,1)
mov %r10d,%eax
mov %esi,%edx
sub %esi,%eax
nopw 0x0(%rax,%rax,1)
mov %edx,%ecx
imul %eax,%ecx
cmp %ecx,%r8d
cmovl %ecx,%r8d
sub ... | _Z5func0i:
endbr64
xor ecx, ecx
cmp edi, 1
jle short loc_1242
mov r9d, 0FFFFFFFFh
xor ecx, ecx
lea r10d, [rdi-1]
mov r8d, 1
nop dword ptr [rax]
loc_1210:
mov eax, r10d
mov edx, r8d
sub eax, r8d
nop dword ptr [rax+00000000h]
loc_1220:
mov esi, edx
imul esi, eax
cmp ... | long long func0(int a1)
{
int v1; // ecx
int v2; // r9d
int i; // r8d
int v4; // edx
int v5; // eax
v1 = 0;
if ( a1 > 1 )
{
v2 = -1;
v1 = 0;
for ( i = 1; i != a1; ++i )
{
v4 = i;
v5 = a1 - 1 - i;
do
{
if ( v1 < v5 * v4 )
v1 = v5 * v4;
-... | func0:
ENDBR64
XOR ECX,ECX
CMP EDI,0x1
JLE 0x00101242
MOV R9D,0xffffffff
XOR ECX,ECX
LEA R10D,[RDI + -0x1]
MOV R8D,0x1
NOP dword ptr [RAX]
LAB_00101210:
MOV EAX,R10D
MOV EDX,R8D
SUB EAX,R8D
NOP dword ptr [RAX]
LAB_00101220:
MOV ESI,EDX
IMUL ESI,EAX
CMP ECX,ESI
CMOVL ECX,ESI
SUB EAX,0x1
ADD EDX,R8D
CMP EAX,R9D
JNZ 0x001... | /* func0(int) */
int func0(int param_1)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
iVar2 = 0;
if (1 < param_1) {
iVar5 = -1;
iVar2 = 0;
iVar4 = 1;
do {
iVar1 = (param_1 + -1) - iVar4;
iVar3 = iVar4;
do {
if (iVar2 < iVar3 * iVar1) {
iV... |
1,271 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int s) {
int maxvalue = 0;
for (int i = 1; i < s; ++i) {
for (int j = 1; j < s; ++j) {
int k = s - i - j;
maxvalue = std::max(maxvalue, i * j * k);
}
}
return maxvalue;
}
| int main() {
assert(func0(8) == 18);
assert(func0(4) == 2);
assert(func0(1) == 0);
return 0;
}
| O3 | cpp | func0(int):
endbr64
cmp $0x1,%edi
jle 1405 <_Z5func0i+0x195>
lea -0x2(%rdi),%eax
lea -0x1(%rdi),%r10d
cmp $0x2,%eax
jbe 140c <_Z5func0i+0x19c>
movd %edi,%xmm7
mov %r10d,%ecx
pxor %xmm2,%xmm2
xor %edx,%edx
pshufd $0x0,%xmm7,%xmm9
movdqa 0xdf8(%rip),%xmm4
movdqa 0xde0(%rip),%xmm7
shr $0x2,%... | _Z5func0i:
endbr64
cmp edi, 1
jle loc_1385
lea eax, [rdi-2]
lea r10d, [rdi-1]
cmp eax, 2
jbe loc_138A
movd xmm7, edi
mov ecx, r10d
pxor xmm2, xmm2
xor edx, edx
pshufd xmm9, xmm7, 0
movdqa xmm4, cs:xmmword_2070
movdqa xmm7, cs:xmmword_2080
shr ecx, 2
movdqa xmm8, cs:xmmword_... | long long func0(signed int a1)
{
unsigned int v1; // r10d
__m128i v2; // xmm2
int v3; // edx
__m128i v4; // xmm9
__m128i si128; // xmm4
__m128i v6; // xmm7
__m128i v7; // xmm8
__m128i v8; // xmm3
int v9; // eax
__m128i v10; // xmm6
__m128i v11; // xmm1
__m128i v12; // xmm5
__m128i v13; // xmm... | func0:
ENDBR64
CMP EDI,0x1
JLE 0x00101385
LEA EAX,[RDI + -0x2]
LEA R10D,[RDI + -0x1]
CMP EAX,0x2
JBE 0x0010138a
MOVD XMM7,EDI
MOV ECX,R10D
PXOR XMM2,XMM2
XOR EDX,EDX
PSHUFD XMM9,XMM7,0x0
MOVDQA XMM4,xmmword ptr [0x00102070]
MOVDQA XMM7,xmmword ptr [0x00102080]
SHR ECX,0x2
MOVDQA XMM8,xmmword ptr [0x00102090]
NOP dword ... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(int) */
uint func0(int param_1)
{
int iVar1;
int iVar2;
int iVar3;
uint uVar4;
int iVar5;
uint uVar6;
uint uVar7;
uint uVar8;
int auVar9 [16];
int auVar10 [16];
uint uVar11;
uint uVar12;
uint uVar13... |
1,272 | func0 |
#include <iostream>
#include <string>
#include <vector>
#include <regex>
#include <assert.h>
| std::vector<std::string> func0(const std::string &text) {
std::regex word_regex("\\b\\w{5}\\b");
std::sregex_iterator words_begin = std::sregex_iterator(text.begin(), text.end(), word_regex);
std::sregex_iterator words_end = std::sregex_iterator();
std::vector<std::string> matches;
for (std::... | int main() {
std::vector<std::string> result1 = func0("Please move back to strem");
std::vector<std::string> result2 = func0("4K Ultra HD streaming player");
std::vector<std::string> result3 = func0("Streaming Media Player");
assert((result1.size() == 1) && (result1[0] == "strem"));
asser... | 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 $0x148,%rsp
mov %rdi,-0x148(%rbp)
mov %rsi,-0x150(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
lea -0x140(%rbp),%rax
mov $0x10,%edx
le... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 148h
mov [rbp+var_148], rdi
mov [rbp+var_150], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_140]
mov edx, 10h
lea rcx, aBW5B; "\\b\\w{... | 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-140h] BYREF
_BYTE v7[32]; // [rsp+30h] [rbp-120h] BYREF
_BYTE v8[64]; // [rsp+50h] [rbp-100h] BYREF
_OWORD v9[4]; // [rsp+90h] [rbp-C0h] BYREF
_BYTE v10[64]; // [... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x148
MOV qword ptr [RBP + -0x148],RDI
MOV qword ptr [RBP + -0x150],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x140]
MOV EDX,0x10
LEA RCX,[0x133051]
MOV RSI,RCX
MOV RDI,RAX
LAB_00104b6f:
CALL 0x00106580
MOV RAX,qword ... | /* func0(std::string const&) */
string * func0(string *param_1)
{
char cVar1;
__normal_iterator _Var2;
__normal_iterator _Var3;
match_results *pmVar4;
long in_FS_OFFSET;
regex local_148 [32];
match_results<__normal_iterator<char_const*,std::string>,std::allocator<std::sub_match<__normal_iterator<char_co... |
1,273 | func0 |
#include <iostream>
#include <string>
#include <vector>
#include <regex>
#include <assert.h>
| std::vector<std::string> func0(const std::string &text) {
std::regex word_regex("\\b\\w{5}\\b");
std::sregex_iterator words_begin = std::sregex_iterator(text.begin(), text.end(), word_regex);
std::sregex_iterator words_end = std::sregex_iterator();
std::vector<std::string> matches;
for (std::... | int main() {
std::vector<std::string> result1 = func0("Please move back to strem");
std::vector<std::string> result2 = func0("4K Ultra HD streaming player");
std::vector<std::string> result3 = func0("Streaming Media Player");
assert((result1.size() == 1) && (result1[0] == "strem"));
asser... | 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 $0x298,%rsp
mov %rdi,%rbp
mov %rsi,%rbx
mov %fs:0x28,%rax
mov %rax,0x288(%rsp)
xor %eax,%eax
lea 0xb0(%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, 2C8h
mov r12, rdi
mov rbx, rsi
mov rax, fs:28h
mov [rbp+var_38], rax
xor eax, eax
lea rax, [rbp+var_2C8]
mov r14, rax
... | _QWORD * func0(_QWORD *a1, long long *a2)
{
long long v4; // rdx
long long v5; // rax
long long v6; // rdi
long long v7; // rsi
unsigned long long v8; // rbx
char *v9; // rdx
struct _Unwind_Exception *v10; // rbx
char *v11; // rbx
long long v12; // rax
char *v13; // rdx
void **v14; // rsi
_QWORD... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x2c8
MOV R12,RDI
MOV RBX,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x38],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x2c8]
MOV R14,RAX
MOV RDI,RAX
CALL 0x001046d0
MOV qword ptr [RBP + -0x2c0],0x0
MOV qword ptr [RBP + -0x2b8],0x0
... | /* func0(std::string const&) */
string * func0(string *param_1)
{
long *plVar1;
int *__src;
_Sp_counted_base<(_Lock_policy)2> *this;
_Sp_counted_base<(_Lock_policy)2> *p_Var2;
bool bVar3;
char cVar4;
uint uVar5;
ulong uVar6;
int8 uVar7;
ulong uVar8;
uint uVar9;
sub_match *psVar10;
sub_match ... |
1,274 | func0 |
#include <iostream>
#include <string>
#include <vector>
#include <regex>
#include <assert.h>
| std::vector<std::string> func0(const std::string &text) {
std::regex word_regex("\\b\\w{5}\\b");
std::sregex_iterator words_begin = std::sregex_iterator(text.begin(), text.end(), word_regex);
std::sregex_iterator words_end = std::sregex_iterator();
std::vector<std::string> matches;
for (std::... | int main() {
std::vector<std::string> result1 = func0("Please move back to strem");
std::vector<std::string> result2 = func0("4K Ultra HD streaming player");
std::vector<std::string> result3 = func0("Streaming Media Player");
assert((result1.size() == 1) && (result1[0] == "strem"));
asser... | O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
mov %rsi,%rbx
sub $0x288,%rsp
mov %fs:0x28,%rax
mov %rax,0x278(%rsp)
xor %eax,%eax
lea 0xa0(%rsp),%r14
lea ... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r15
push r14
lea r15, [rbp+var_2C8]
push r13
push r12
push rbx
mov rbx, rsi
sub rsp, 2E8h
mov [rbp+var_2E8], rdi
mov rdi, r15; this
mov rax, fs:28h
mov [rbp+var_38], rax
x... | long long func0(long long a1, unsigned long long *a2)
{
__m128i v3; // rdi
__m128i v4; // xmm0
volatile signed __int32 *v5; // r12
long long v6; // rdx
volatile signed __int32 *v7; // rcx
signed __int32 v8; // eax
long long v9; // r12
long long v10; // rdx
volatile signed __int32 *v11; // rcx
signe... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
LEA R15,[RBP + -0x2c8]
PUSH R13
PUSH R12
PUSH RBX
MOV RBX,RSI
SUB RSP,0x2e8
MOV qword ptr [RBP + -0x2e8],RDI
MOV RDI,R15
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x38],RAX
XOR EAX,EAX
MOV qword ptr [RBP + -0x300],R15
CALL 0x001036d0
LEA RDX,[0x119684]
PXOR ... | /* func0(std::string const&) */
string * func0(string *param_1)
{
int *__src;
int auVar1 [16];
int auVar2 [16];
bool bVar3;
int iVar4;
long *plVar5;
long *plVar6;
long *plVar7;
uint uVar8;
regex *prVar9;
uint uVar10;
long *plVar11;
long *plVar12;
long lVar13;
long *in_RSI;
_Sp_counted_... |
1,275 | func0 |
#include <iostream>
#include <string>
#include <vector>
#include <regex>
#include <assert.h>
| std::vector<std::string> func0(const std::string &text) {
std::regex word_regex("\\b\\w{5}\\b");
std::sregex_iterator words_begin = std::sregex_iterator(text.begin(), text.end(), word_regex);
std::sregex_iterator words_end = std::sregex_iterator();
std::vector<std::string> matches;
for (std::... | int main() {
std::vector<std::string> result1 = func0("Please move back to strem");
std::vector<std::string> result2 = func0("4K Ultra HD streaming player");
std::vector<std::string> result3 = func0("Streaming Media Player");
assert((result1.size() == 1) && (result1[0] == "strem"));
asser... | 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 $0x288,%rsp
mov %fs:0x28,%rax
mov %rax,0x278(%rsp)
xor %eax,%eax
lea 0xa0(%rsp),%r14
lea ... | _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_2C8]
sub rsp, 2E8h
mov [rbp+var_2E8], 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)
{
void **v2; // r12
long long v3; // r15
signed long long v4; // r13
__m128i v5; // xmm0
long long v6; // rdi
void *v7; // rdi
void **v8; // rbx
void *v9; // rdi
unsigned long long v10; // rax
unsigned long long v11; // rdx
__m128i v12; // rdi... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
MOV R13,RSI
PUSH R12
PUSH RBX
LEA RBX,[RBP + -0x2c8]
SUB RSP,0x2e8
MOV qword ptr [RBP + -0x2e8],RDI
MOV RDI,RBX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x38],RAX
XOR EAX,EAX
MOV qword ptr [RBP + -0x308],RBX
CALL 0x00104710
LEA RDX,[0x11b6c9]
PXOR ... | /* func0(std::string const&) */
string * func0(string *param_1)
{
int8 uVar1;
int auVar2 [16];
int auVar3 [16];
bool bVar4;
int8 *puVar5;
ulong uVar6;
int auVar7 [8];
vector<std::sub_match<__normal_iterator<char_const*,std::string>>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::stri... |
1,276 | func0 |
#include <cassert>
| int func0(int n) {
int sumofsquares = 0;
int squareofsum = 0;
for (int num = 1; num <= n; num++) {
sumofsquares += num * num;
squareofsum += num;
}
squareofsum = squareofsum * squareofsum;
return squareofsum - sumofsquares;
}
| int main() {
assert(func0(12) == 5434);
assert(func0(20) == 41230);
assert(func0(54) == 2151270);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
movl $0x0,-0xc(%rbp)
movl $0x0,-0x8(%rbp)
movl $0x1,-0x4(%rbp)
mov -0x4(%rbp),%eax
cmp -0x14(%rbp),%eax
jg 1186 <_Z5func0i+0x3d>
mov -0x4(%rbp),%eax
imul %eax,%eax
add %eax,-0xc(%rbp)
mov -0x4(%rbp),%eax
add %eax,-0x8... | _Z5func0i:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_14], edi
mov [rbp+var_C], 0
mov [rbp+var_8], 0
mov [rbp+var_4], 1
jmp short loc_117E
loc_116B:
mov eax, [rbp+var_4]
imul eax, eax
add [rbp+var_C], eax
mov eax, [rbp+var_4]
add [rbp+var_8], eax
add [rbp+var_4], 1
loc_... | long long func0(int a1)
{
int v2; // [rsp+8h] [rbp-Ch]
int v3; // [rsp+Ch] [rbp-8h]
int i; // [rsp+10h] [rbp-4h]
v2 = 0;
v3 = 0;
for ( i = 1; i <= a1; ++i )
{
v2 += i * i;
v3 += i;
}
return (unsigned int)(v3 * v3 - v2);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x14],EDI
MOV dword ptr [RBP + -0xc],0x0
MOV dword ptr [RBP + -0x8],0x0
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0010117e
LAB_0010116b:
MOV EAX,dword ptr [RBP + -0x4]
IMUL EAX,EAX
ADD dword ptr [RBP + -0xc],EAX
MOV EAX,dword ptr [RBP + -0x4]
ADD dword ptr [RBP + -0x... | /* func0(int) */
int func0(int param_1)
{
int4 local_14;
int4 local_10;
int4 local_c;
local_14 = 0;
local_10 = 0;
for (local_c = 1; local_c <= param_1; local_c = local_c + 1) {
local_14 = local_14 + local_c * local_c;
local_10 = local_10 + local_c;
}
return local_10 * local_10 - local_14;
} |
1,277 | func0 |
#include <cassert>
| int func0(int n) {
int sumofsquares = 0;
int squareofsum = 0;
for (int num = 1; num <= n; num++) {
sumofsquares += num * num;
squareofsum += num;
}
squareofsum = squareofsum * squareofsum;
return squareofsum - sumofsquares;
}
| int main() {
assert(func0(12) == 5434);
assert(func0(20) == 41230);
assert(func0(54) == 2151270);
return 0;
}
| O1 | cpp | func0(int):
endbr64
test %edi,%edi
jle 1179 <_Z5func0i+0x30>
add $0x1,%edi
mov $0x1,%edx
mov $0x0,%eax
mov $0x0,%ecx
mov %edx,%esi
imul %edx,%esi
add %esi,%ecx
add %edx,%eax
add $0x1,%edx
cmp %edi,%edx
jne 1163 <_Z5func0i+0x1a>
imul %eax,%eax
sub %ecx,%eax
retq
mov $0x0,%eax... | _Z5func0i:
endbr64
test edi, edi
jle short loc_1179
add edi, 1
mov edx, 1
mov eax, 0
mov ecx, 0
loc_1163:
mov esi, edx
imul esi, edx
add ecx, esi
add eax, edx
add edx, 1
cmp edx, edi
jnz short loc_1163
loc_1173:
imul eax, eax
sub eax, ecx
retn
loc_1179:
mov e... | long long func0(int a1)
{
int v1; // edi
int v2; // edx
int v3; // eax
int v4; // ecx
if ( a1 <= 0 )
{
v3 = 0;
v4 = 0;
}
else
{
v1 = a1 + 1;
v2 = 1;
v3 = 0;
v4 = 0;
do
{
v4 += v2 * v2;
v3 += v2++;
}
while ( v2 != v1 );
}
return (unsigned int)(v... | func0:
ENDBR64
TEST EDI,EDI
JLE 0x00101179
ADD EDI,0x1
MOV EDX,0x1
MOV EAX,0x0
MOV ECX,0x0
LAB_00101163:
MOV ESI,EDX
IMUL ESI,EDX
ADD ECX,ESI
ADD EAX,EDX
ADD EDX,0x1
CMP EDX,EDI
JNZ 0x00101163
LAB_00101173:
IMUL EAX,EAX
SUB EAX,ECX
RET
LAB_00101179:
MOV EAX,0x0
MOV ECX,0x0
JMP 0x00101173 | /* func0(int) */
int func0(int param_1)
{
int iVar1;
int iVar2;
int iVar3;
if (param_1 < 1) {
iVar1 = 0;
iVar2 = 0;
}
else {
iVar3 = 1;
iVar1 = 0;
iVar2 = 0;
do {
iVar2 = iVar2 + iVar3 * iVar3;
iVar1 = iVar1 + iVar3;
iVar3 = iVar3 + 1;
} while (iVar3 != par... |
1,278 | func0 |
#include <cassert>
| int func0(int n) {
int sumofsquares = 0;
int squareofsum = 0;
for (int num = 1; num <= n; num++) {
sumofsquares += num * num;
squareofsum += num;
}
squareofsum = squareofsum * squareofsum;
return squareofsum - sumofsquares;
}
| int main() {
assert(func0(12) == 5434);
assert(func0(20) == 41230);
assert(func0(54) == 2151270);
return 0;
}
| O2 | cpp | func0(int):
endbr64
test %edi,%edi
jle 1170 <_Z5func0i+0x30>
add $0x1,%edi
mov $0x1,%edx
xor %eax,%eax
xor %ecx,%ecx
nopl 0x0(%rax)
mov %edx,%esi
add %edx,%eax
imul %edx,%esi
add $0x1,%edx
add %esi,%ecx
cmp %edx,%edi
jne 1158 <_Z5func0i+0x18>
imul %eax,%eax
sub %ecx,%eax
retq... | _Z5func0i:
endbr64
test edi, edi
jle short loc_1170
add edi, 1
mov edx, 1
xor eax, eax
xor ecx, ecx
nop dword ptr [rax+00h]
loc_1158:
mov esi, edx
add eax, edx
imul esi, edx
add edx, 1
add ecx, esi
cmp edi, edx
jnz short loc_1158
imul eax, eax
sub eax, ecx
re... | long long func0(int a1)
{
int v1; // edi
int v2; // edx
int v3; // eax
int v4; // ecx
int v5; // esi
if ( a1 <= 0 )
return 0LL;
v1 = a1 + 1;
v2 = 1;
v3 = 0;
v4 = 0;
do
{
v3 += v2;
v5 = v2 * v2;
++v2;
v4 += v5;
}
while ( v1 != v2 );
return (unsigned int)(v3 * v3 - v4);... | func0:
ENDBR64
TEST EDI,EDI
JLE 0x00101170
ADD EDI,0x1
MOV EDX,0x1
XOR EAX,EAX
XOR ECX,ECX
NOP dword ptr [RAX]
LAB_00101158:
MOV ESI,EDX
ADD EAX,EDX
IMUL ESI,EDX
ADD EDX,0x1
ADD ECX,ESI
CMP EDI,EDX
JNZ 0x00101158
IMUL EAX,EAX
SUB EAX,ECX
RET
LAB_00101170:
XOR EAX,EAX
RET | /* func0(int) */
int func0(int param_1)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
if (0 < param_1) {
iVar3 = 1;
iVar1 = 0;
iVar2 = 0;
do {
iVar1 = iVar1 + iVar3;
iVar4 = iVar3 * iVar3;
iVar3 = iVar3 + 1;
iVar2 = iVar2 + iVar4;
} while (param_1 + 1 != iVar3)... |
1,279 | func0 |
#include <cassert>
| int func0(int n) {
int sumofsquares = 0;
int squareofsum = 0;
for (int num = 1; num <= n; num++) {
sumofsquares += num * num;
squareofsum += num;
}
squareofsum = squareofsum * squareofsum;
return squareofsum - sumofsquares;
}
| int main() {
assert(func0(12) == 5434);
assert(func0(20) == 41230);
assert(func0(54) == 2151270);
return 0;
}
| O3 | cpp | func0(int):
endbr64
test %edi,%edi
jle 1350 <_Z5func0i+0x210>
lea -0x1(%rdi),%eax
cmp $0xf,%eax
jbe 1353 <_Z5func0i+0x213>
mov %edi,%edx
pxor %xmm4,%xmm4
movdqa 0xeaa(%rip),%xmm5
xor %eax,%eax
movdqa 0xeb0(%rip),%xmm6
shr $0x2,%edx
movdqa %xmm4,%xmm3
nopw 0x0(%rax,%rax,1)
movdqa %xmm5,%xmm2
a... | _Z5func0i:
endbr64
mov ecx, edi
test edi, edi
jle loc_12F8
lea eax, [rdi-1]
cmp eax, 0Bh
jbe loc_12FB
mov edx, edi
pxor xmm4, xmm4
movdqa xmm5, cs:xmmword_2010
xor eax, eax
movdqa xmm6, cs:xmmword_2020
shr edx, 2
movdqa xmm3, xmm4
nop dword ptr [rax+00000000h]
loc_1180:
movd... | long long func0(int a1)
{
__m128i v2; // xmm4
__m128i si128; // xmm5
int v4; // eax
__m128i v5; // xmm6
__m128i v6; // xmm3
__m128i v7; // xmm2
__m128i v8; // xmm0
__m128i v9; // xmm4
unsigned int v10; // esi
int v11; // eax
__m128i v12; // xmm3
int v13; // edx
unsigned int v14; // edi
int ... | func0:
ENDBR64
MOV ECX,EDI
TEST EDI,EDI
JLE 0x001012f8
LEA EAX,[RDI + -0x1]
CMP EAX,0xb
JBE 0x001012fb
MOV EDX,EDI
PXOR XMM4,XMM4
MOVDQA XMM5,xmmword ptr [0x00102010]
XOR EAX,EAX
MOVDQA XMM6,xmmword ptr [0x00102020]
SHR EDX,0x2
MOVDQA XMM3,XMM4
NOP dword ptr [RAX]
LAB_00101180:
MOVDQA XMM2,XMM5
ADD EAX,0x1
PADDD XMM5,X... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(int) */
int func0(int param_1)
{
uint uVar1;
int iVar2;
ulong uVar3;
int iVar4;
int iVar5;
int iVar6;
int iVar7;
int iVar8;
int iVar9;
int iVar10;
int iVar11;
int auVar12 [16];
int auVar13 [16];
i... |
1,280 | func0 |
#include <string>
#include <assert.h>
| std::string func0(std::string s) {
int l = s.length();
std::string res = "";
for (int i = 1; i <= l; i++) {
res += std::to_string(i);
}
for (int i = l - 1; i > 0; i--) {
res += std::to_string(i);
}
return res;
}
| int main() {
assert(func0("111111") == "12345654321");
assert(func0("1111") == "1234321");
assert(func0("13333122222") == "123456789101110987654321");
return 0;
}
| O0 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x58,%rsp
mov %rdi,-0x58(%rbp)
mov %rsi,-0x60(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x60(%rbp),%rax
mov %rax,%rdi
callq 22e0 <_... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 68h
mov [rbp+var_68], rdi
mov [rbp+var_70], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_70]
mov rdi, rax
call __ZNKSt7__cxx1112basic_str... | long long func0(long long a1, long long a2)
{
char v3; // [rsp+1Bh] [rbp-55h] BYREF
int i; // [rsp+1Ch] [rbp-54h]
int j; // [rsp+20h] [rbp-50h]
int v6; // [rsp+24h] [rbp-4Ch]
char *v7; // [rsp+28h] [rbp-48h]
_BYTE v8[40]; // [rsp+30h] [rbp-40h] BYREF
unsigned long long v9; // [rsp+58h] [rbp-18h]
v9 = ... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x68
MOV qword ptr [RBP + -0x68],RDI
MOV qword ptr [RBP + -0x70],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x70]
MOV RDI,RAX
CALL 0x001022b0
MOV dword ptr [RBP + -0x4c],EAX
LEA RAX,[RBP + -0x55]
MOV qword pt... | /* func0(std::string) */
string * func0(string *param_1)
{
long in_FS_OFFSET;
allocator local_5d;
int local_5c;
int local_58;
int local_54;
allocator *local_50;
string local_48 [40];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
local_54 = std::string::length();
local_50 = &local_... |
1,281 | func0 |
#include <string>
#include <assert.h>
| std::string func0(std::string s) {
int l = s.length();
std::string res = "";
for (int i = 1; i <= l; i++) {
res += std::to_string(i);
}
for (int i = l - 1; i > 0; i--) {
res += std::to_string(i);
}
return res;
}
| int main() {
assert(func0("111111") == "12345654321");
assert(func0("1111") == "1234321");
assert(func0("13333122222") == "123456789101110987654321");
return 0;
}
| O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x38,%rsp
mov %rdi,%r12
mov %fs:0x28,%rax
mov %rax,0x28(%rsp)
xor %eax,%eax
mov 0x8(%rsi),%rbx
lea 0x10(%rdi),%r13
mov %r13... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 58h
mov r15, rdi
mov rax, fs:28h
mov [rsp+88h+var_40], rax
xor eax, eax
mov rbx, [rsi+8]
mov [rsp+88h+var_70], rbx
mov [rsp+88h+var_7C], ... | _QWORD * func0(_QWORD *a1, long long a2)
{
long long v2; // rbx
int v3; // r13d
unsigned int v4; // ebx
unsigned int v5; // ebp
unsigned int v6; // eax
unsigned int v7; // edx
unsigned int v8; // r12d
unsigned int v9; // ebx
unsigned int v10; // eax
int v12; // [rsp+Ch] [rbp-7Ch]
int v13; // [rsp+... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x58
MOV R15,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x48],RAX
XOR EAX,EAX
MOV RBX,qword ptr [RSI + 0x8]
MOV qword ptr [RSP + 0x18],RBX
MOV dword ptr [RSP + 0xc],EBX
LEA RAX,[RDI + 0x10]
MOV qword ptr [RDI],RAX
LEA RSI,[0x102110]
... | /* func0(std::string) */
long * func0(long *param_1,long param_2)
{
int8 uVar1;
uint uVar2;
ulong uVar3;
int iVar4;
uint uVar5;
uint uVar6;
uint uVar7;
long in_FS_OFFSET;
long *local_68;
ulong local_60;
long local_58 [3];
long local_40;
local_40 = *(long *)(in_FS_OFFSET + 0x28);
iVar4 =... |
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.