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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
782 | func0 |
#include <iostream>
#include <vector>
#include <tuple>
#include <assert.h>
| std::vector<std::vector<int>> func0(const std::vector<std::vector<int>>& test_list, int K) {
std::vector<std::vector<int>> res;
for (const auto& ele : test_list) {
if (ele.size() != K) {
res.push_back(ele);
}
}
return res;
}
| int main() {
// Test cases
assert((func0({{4, 5}, {4}, {8, 6, 7}, {1}, {3, 4, 6, 7}}, 1) == std::vector<std::vector<int>>{{4, 5}, {8, 6, 7}, {3, 4, 6, 7}}));
assert((func0({{4, 5}, {4, 5}, {6, 7}, {1, 2, 3}, {3, 4, 6, 7}}, 2) == std::vector<std::vector<int>>{{1, 2, 3}, {3, 4, 6, 7}}));
assert((func0... | O2 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, int):
endbr64
push %r15
push %r14
push %r13
mov %rdi,%r13
push %r12
push %rbp
push %rbx
sub $0x18,%rsp
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi)
movq $0x0,0x10(%rdi)
mov 0x8(... | _Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EEi:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
mov r13, rdi
push r12
push rbp
push rbx
sub rsp, 8
mov qword ptr [rdi+10h], 0
movups xmmword ptr [rdi], xmm0
mov r15, [rsi+8]
mov rbx, [rsi]
cmp r15, rbx
jz loc_2037
movsxd r14... | long long func0(long long a1, long long a2, int a3)
{
_QWORD *v3; // r15
_QWORD *v4; // rbx
long long v5; // r14
_DWORD *v6; // rcx
_DWORD *v7; // rsi
long long v8; // rbp
signed long long v9; // rbp
long long v10; // r12
*(_QWORD *)(a1 + 16) = 0LL;
*(_OWORD *)a1 = 0LL;
v3 = *(_QWORD **)(a2 + 8)... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
PUSH R13
MOV R13,RDI
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV qword ptr [RDI + 0x10],0x0
MOVUPS xmmword ptr [RDI],XMM0
MOV R15,qword ptr [RSI + 0x8]
MOV RBX,qword ptr [RSI]
CMP R15,RBX
JZ 0x00102037
MOVSXD R14,EDX
JMP 0x00101fdc
LAB_00101f70:
MOV RAX,0x7ffffffffffffffc
... | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > > const&, int) */
vector * func0(vector *param_1,int param_2)
{
vector *__dest;
vector *pvVar1;
int in_EDX;
vector *pvVar2;
size_t __n;
vector *pvVar3;
int iVar4;
int4 in_register_00... |
783 | func0 |
#include <iostream>
#include <vector>
#include <tuple>
#include <assert.h>
| std::vector<std::vector<int>> func0(const std::vector<std::vector<int>>& test_list, int K) {
std::vector<std::vector<int>> res;
for (const auto& ele : test_list) {
if (ele.size() != K) {
res.push_back(ele);
}
}
return res;
}
| int main() {
// Test cases
assert((func0({{4, 5}, {4}, {8, 6, 7}, {1}, {3, 4, 6, 7}}, 1) == std::vector<std::vector<int>>{{4, 5}, {8, 6, 7}, {3, 4, 6, 7}}));
assert((func0({{4, 5}, {4, 5}, {6, 7}, {1, 2, 3}, {3, 4, 6, 7}}, 2) == std::vector<std::vector<int>>{{1, 2, 3}, {3, 4, 6, 7}}));
assert((func0... | O3 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, int):
endbr64
push %r15
pxor %xmm0,%xmm0
push %r14
push %r13
mov %rdi,%r13
push %r12
push %rbp
push %rbx
sub $0x18,%rsp
movq $0x0,0x10(%rdi)
movups %xmm0,(%rdi)
mov 0x8(%r... | _Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EEi:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
mov r13, rdi
push r12
push rbp
push rbx
sub rsp, 8
mov qword ptr [rdi+10h], 0
movups xmmword ptr [rdi], xmm0
mov r15, [rsi+8]
mov rbx, [rsi]
cmp r15, rbx
jz loc_2097
movsxd r14... | long long func0(long long a1, long long a2, int a3)
{
_QWORD *v3; // r15
_QWORD *v4; // rbx
long long v5; // r14
_DWORD *v6; // rcx
_DWORD *v7; // rsi
long long v8; // rbp
signed long long v9; // rbp
long long v10; // r12
*(_QWORD *)(a1 + 16) = 0LL;
*(_OWORD *)a1 = 0LL;
v3 = *(_QWORD **)(a2 + 8)... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
PUSH R13
MOV R13,RDI
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV qword ptr [RDI + 0x10],0x0
MOVUPS xmmword ptr [RDI],XMM0
MOV R15,qword ptr [RSI + 0x8]
MOV RBX,qword ptr [RSI]
CMP R15,RBX
JZ 0x00102097
MOVSXD R14,EDX
JMP 0x0010203c
LAB_00101fd0:
MOV RAX,0x7ffffffffffffffc
... | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > > const&, int) */
vector * func0(vector *param_1,int param_2)
{
vector *__dest;
vector *pvVar1;
int in_EDX;
vector *pvVar2;
size_t __n;
vector *pvVar3;
int iVar4;
int4 in_register_00... |
784 | func0 |
#include <tuple>
#include <cmath>
#include <cassert>
| std::tuple<int, int, int, int> func0(const std::tuple<int, int, int, int>& test_tup1, const std::tuple<int, int, int, int>& test_tup2) {
int ele1 = std::get<0>(test_tup1);
int ele2 = std::get<0>(test_tup2);
int r1 = pow(ele1, ele2);
ele1 = std::get<1>(test_tup1);
ele2 = std::get<1>(test_t... | int main() {
assert(func0(std::make_tuple(10, 4, 5, 6), std::make_tuple(5, 6, 7, 5)) == std::make_tuple(100000, 4096, 78125, 7776));
assert(func0(std::make_tuple(11, 5, 6, 7), std::make_tuple(6, 7, 8, 6)) == std::make_tuple(1771561, 78125, 1679616, 117649));
assert(func0(std::make_tuple(12, 6, 7, 8), std... | O0 | cpp | func0(std::tuple<int, int, int, int> const&, std::tuple<int, int, int, int> const&):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x40,%rsp
mov %rdi,-0x28(%rbp)
mov %rsi,-0x30(%rbp)
mov %rdx,-0x38(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x8(%rbp)
xor %eax,%eax
mov -0x30(%rbp),%rax
mov %rax,%rdi
callq ... | _Z5func0RKSt5tupleIJiiiiEES2_:
endbr64
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_28], rdi
mov [rbp+var_30], rsi
mov [rbp+var_38], rdx
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
mov rax, [rbp+var_30]
mov rdi, rax
call _ZSt3getILm0EJiiiiEERKNSt13tuple_elementIXT_... | long long func0(long long a1, long long a2, long long a3)
{
int v5; // [rsp+20h] [rbp-20h] BYREF
int v6; // [rsp+24h] [rbp-1Ch] BYREF
int v7; // [rsp+28h] [rbp-18h] BYREF
int v8; // [rsp+2Ch] [rbp-14h] BYREF
int v9; // [rsp+30h] [rbp-10h]
int v10; // [rsp+34h] [rbp-Ch]
unsigned long long v11; // [rsp+38h... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x28],RDI
MOV qword ptr [RBP + -0x30],RSI
MOV qword ptr [RBP + -0x38],RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV RDI,RAX
CALL 0x0010166c
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP +... | /* func0(std::tuple<int, int, int, int> const&, std::tuple<int, int, int, int> const&) */
tuple * func0(tuple *param_1,tuple *param_2)
{
type *ptVar1;
type *ptVar2;
type *ptVar3;
type *ptVar4;
tuple *in_RDX;
long in_FS_OFFSET;
double dVar5;
int local_28;
int local_24;
int local_20;
int local_1c;... |
785 | func0 |
#include <tuple>
#include <cmath>
#include <cassert>
| std::tuple<int, int, int, int> func0(const std::tuple<int, int, int, int>& test_tup1, const std::tuple<int, int, int, int>& test_tup2) {
int ele1 = std::get<0>(test_tup1);
int ele2 = std::get<0>(test_tup2);
int r1 = pow(ele1, ele2);
ele1 = std::get<1>(test_tup1);
ele2 = std::get<1>(test_t... | int main() {
assert(func0(std::make_tuple(10, 4, 5, 6), std::make_tuple(5, 6, 7, 5)) == std::make_tuple(100000, 4096, 78125, 7776));
assert(func0(std::make_tuple(11, 5, 6, 7), std::make_tuple(6, 7, 8, 6)) == std::make_tuple(1771561, 78125, 1679616, 117649));
assert(func0(std::make_tuple(12, 6, 7, 8), std... | O1 | cpp | func0(std::tuple<int, int, int, int> const&, std::tuple<int, int, int, int> const&):
endbr64
push %r12
push %rbp
push %rbx
sub $0x20,%rsp
mov %rdi,%rbx
mov %rsi,%r12
mov %rdx,%rbp
pxor %xmm0,%xmm0
cvtsi2sdl 0xc(%rsi),%xmm0
pxor %xmm1,%xmm1
cvtsi2sdl 0xc(%rdx),%xmm1
callq 1070 <pow@plt>
movsd %xm... | _Z5func0RKSt5tupleIJiiiiEES2_:
endbr64
push r12
push rbp
push rbx
sub rsp, 20h
mov rbx, rdi
mov r12, rsi
mov rbp, rdx
pxor xmm0, xmm0
cvtsi2sd xmm0, dword ptr [rsi+0Ch]; x
pxor xmm1, xmm1
cvtsi2sd xmm1, dword ptr [rdx+0Ch]; y
call _pow
movsd [rsp+38h+var_30], xmm0
pxor xmm0, xmm0
... | _DWORD * func0(_DWORD *a1, int *a2, int *a3)
{
double v5; // [rsp+8h] [rbp-30h]
double v6; // [rsp+10h] [rbp-28h]
double v7; // [rsp+18h] [rbp-20h]
v5 = pow((double)a2[3], (double)a3[3]);
v6 = pow((double)a2[2], (double)a3[2]);
v7 = pow((double)a2[1], (double)a3[1]);
*a1 = (int)pow((double)*a2, (double)*... | func0:
ENDBR64
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x20
MOV RBX,RDI
MOV R12,RSI
MOV RBP,RDX
PXOR XMM0,XMM0
CVTSI2SD XMM0,dword ptr [RSI + 0xc]
PXOR XMM1,XMM1
CVTSI2SD XMM1,dword ptr [RDX + 0xc]
CALL 0x00101070
MOVSD qword ptr [RSP + 0x8],XMM0
PXOR XMM0,XMM0
CVTSI2SD XMM0,dword ptr [R12 + 0x8]
PXOR XMM1,XMM1
CVTSI2SD XMM... | /* func0(std::tuple<int, int, int, int> const&, std::tuple<int, int, int, int> const&) */
tuple * func0(tuple *param_1,tuple *param_2)
{
int *in_RDX;
double dVar1;
double dVar2;
double dVar3;
double dVar4;
dVar1 = pow((double)*(int *)(param_2 + 0xc),(double)in_RDX[3]);
dVar2 = pow((double)*(int *)(pa... |
786 | func0 |
#include <tuple>
#include <cmath>
#include <cassert>
| std::tuple<int, int, int, int> func0(const std::tuple<int, int, int, int>& test_tup1, const std::tuple<int, int, int, int>& test_tup2) {
int ele1 = std::get<0>(test_tup1);
int ele2 = std::get<0>(test_tup2);
int r1 = pow(ele1, ele2);
ele1 = std::get<1>(test_tup1);
ele2 = std::get<1>(test_t... | int main() {
assert(func0(std::make_tuple(10, 4, 5, 6), std::make_tuple(5, 6, 7, 5)) == std::make_tuple(100000, 4096, 78125, 7776));
assert(func0(std::make_tuple(11, 5, 6, 7), std::make_tuple(6, 7, 8, 6)) == std::make_tuple(1771561, 78125, 1679616, 117649));
assert(func0(std::make_tuple(12, 6, 7, 8), std... | O2 | cpp | func0(std::tuple<int, int, int, int> const&, std::tuple<int, int, int, int> const&):
endbr64
push %r12
pxor %xmm0,%xmm0
pxor %xmm1,%xmm1
mov %rdi,%r12
push %rbp
mov %rsi,%rbp
push %rbx
mov %rdx,%rbx
sub $0x20,%rsp
cvtsi2sdl 0xc(%rdx),%xmm1
cvtsi2sdl 0xc(%rsi),%xmm0
callq 1070 <pow@plt>
pxor %xm... | _Z5func0RKSt5tupleIJiiiiEES2_:
endbr64
push r12
pxor xmm0, xmm0
pxor xmm1, xmm1
mov r12, rdi
push rbp
mov rbp, rsi
push rbx
mov rbx, rdx
sub rsp, 20h
cvtsi2sd xmm1, dword ptr [rdx+0Ch]; y
cvtsi2sd xmm0, dword ptr [rsi+0Ch]; x
call _pow
pxor xmm1, xmm1
movsd [rsp+38h+var_20], xmm0
... | __m128i * func0(__m128i *a1, int *a2, int *a3)
{
__m128d v4; // xmm0
__m128i *result; // rax
double v6; // [rsp+0h] [rbp-30h]
double v7; // [rsp+8h] [rbp-28h]
double v8; // [rsp+10h] [rbp-20h]
v8 = pow((double)a2[3], (double)a3[3]);
v7 = pow((double)a2[2], (double)a3[2]);
v6 = pow((double)a2[1], (doubl... | func0:
ENDBR64
PUSH R12
PXOR XMM0,XMM0
PXOR XMM1,XMM1
MOV R12,RDI
PUSH RBP
MOV RBP,RSI
PUSH RBX
MOV RBX,RDX
SUB RSP,0x20
CVTSI2SD XMM1,dword ptr [RDX + 0xc]
CVTSI2SD XMM0,dword ptr [RSI + 0xc]
CALL 0x00101070
PXOR XMM1,XMM1
MOVSD qword ptr [RSP + 0x18],XMM0
PXOR XMM0,XMM0
CVTSI2SD XMM1,dword ptr [RBX + 0x8]
CVTSI2SD XM... | /* func0(std::tuple<int, int, int, int> const&, std::tuple<int, int, int, int> const&) */
tuple * func0(tuple *param_1,tuple *param_2)
{
int *in_RDX;
double dVar1;
double dVar2;
double dVar3;
double dVar4;
dVar1 = pow((double)*(int *)(param_2 + 0xc),(double)in_RDX[3]);
dVar2 = pow((double)*(int *)(pa... |
787 | func0 |
#include <tuple>
#include <cmath>
#include <cassert>
| std::tuple<int, int, int, int> func0(const std::tuple<int, int, int, int>& test_tup1, const std::tuple<int, int, int, int>& test_tup2) {
int ele1 = std::get<0>(test_tup1);
int ele2 = std::get<0>(test_tup2);
int r1 = pow(ele1, ele2);
ele1 = std::get<1>(test_tup1);
ele2 = std::get<1>(test_t... | int main() {
assert(func0(std::make_tuple(10, 4, 5, 6), std::make_tuple(5, 6, 7, 5)) == std::make_tuple(100000, 4096, 78125, 7776));
assert(func0(std::make_tuple(11, 5, 6, 7), std::make_tuple(6, 7, 8, 6)) == std::make_tuple(1771561, 78125, 1679616, 117649));
assert(func0(std::make_tuple(12, 6, 7, 8), std... | O3 | cpp | func0(std::tuple<int, int, int, int> const&, std::tuple<int, int, int, int> const&):
endbr64
push %r12
pxor %xmm0,%xmm0
pxor %xmm1,%xmm1
mov %rdi,%r12
push %rbp
mov %rsi,%rbp
push %rbx
mov %rdx,%rbx
sub $0x20,%rsp
cvtsi2sdl 0xc(%rdx),%xmm1
cvtsi2sdl 0xc(%rsi),%xmm0
callq 1070 <pow@plt>
pxor %xm... | _Z5func0RKSt5tupleIJiiiiEES2_:
endbr64
push r12
pxor xmm0, xmm0
pxor xmm1, xmm1
mov r12, rdi
push rbp
mov rbp, rsi
push rbx
mov rbx, rdx
sub rsp, 20h
cvtsi2sd xmm1, dword ptr [rdx+0Ch]; y
cvtsi2sd xmm0, dword ptr [rsi+0Ch]; x
call _pow
pxor xmm1, xmm1
movsd [rsp+38h+var_20], xmm0
... | __m128i * func0(__m128i *a1, int *a2, int *a3)
{
__m128d v4; // xmm0
__m128i *result; // rax
double v6; // [rsp+0h] [rbp-30h]
double v7; // [rsp+8h] [rbp-28h]
double v8; // [rsp+10h] [rbp-20h]
v8 = pow((double)a2[3], (double)a3[3]);
v7 = pow((double)a2[2], (double)a3[2]);
v6 = pow((double)a2[1], (doubl... | func0:
ENDBR64
PUSH R12
PXOR XMM0,XMM0
PXOR XMM1,XMM1
MOV R12,RDI
PUSH RBP
MOV RBP,RSI
PUSH RBX
MOV RBX,RDX
SUB RSP,0x20
CVTSI2SD XMM1,dword ptr [RDX + 0xc]
CVTSI2SD XMM0,dword ptr [RSI + 0xc]
CALL 0x00101070
PXOR XMM1,XMM1
MOVSD qword ptr [RSP + 0x18],XMM0
PXOR XMM0,XMM0
CVTSI2SD XMM1,dword ptr [RBX + 0x8]
CVTSI2SD XM... | /* func0(std::tuple<int, int, int, int> const&, std::tuple<int, int, int, int> const&) */
tuple * func0(tuple *param_1,tuple *param_2)
{
int *in_RDX;
double dVar1;
double dVar2;
double dVar3;
double dVar4;
dVar1 = pow((double)*(int *)(param_2 + 0xc),(double)in_RDX[3]);
dVar2 = pow((double)*(int *)(pa... |
788 | func0 | #include <iostream>
#include <cmath>
#include <assert.h>
| double func0(double a, double b) {
if (a < 0 || b < 0) {
return -1;
}
double area = (3 * std::sqrt(3) * std::pow(a, 2)) / (4 * b);
return area;
}
| int main() {
assert(func0(4, 2) == 10.392304845413264);
assert(func0(5, 7) == 4.639421805988064);
assert(func0(9, 1) == 105.2220865598093);
return 0;
}
| O0 | cpp | func0(double, double):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x30,%rsp
movsd %xmm0,-0x18(%rbp)
movsd %xmm1,-0x20(%rbp)
pxor %xmm0,%xmm0
comisd -0x18(%rbp),%xmm0
ja 11f5 <_Z5func0dd+0x2c>
pxor %xmm0,%xmm0
comisd -0x20(%rbp),%xmm0
jbe 11ff <_Z5func0dd+0x36>
movsd 0xedb(%rip),%xmm0
jmp 1251 <_Z5fun... | _Z5func0dd:
endbr64
push rbp
mov rbp, rsp
sub rsp, 30h
movsd [rbp+var_18], xmm0
movsd [rbp+var_20], xmm1
pxor xmm0, xmm0
comisd xmm0, [rbp+var_18]
ja short loc_11B5
pxor xmm0, xmm0
comisd xmm0, [rbp+var_20]
jbe short loc_11BF
loc_11B5:
movsd xmm0, cs:qword_20B8
jmp short locret_121... | double func0(double a1, double a2)
{
double v3; // [rsp+8h] [rbp-28h]
if ( a1 < 0.0 || a2 < 0.0 )
return -1.0;
v3 = std::sqrt<int>(3LL) * 3.0;
return std::pow<double,int>(2LL, a1) * v3 / (4.0 * a2);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOVSD qword ptr [RBP + -0x18],XMM0
MOVSD qword ptr [RBP + -0x20],XMM1
PXOR XMM0,XMM0
COMISD XMM0,qword ptr [RBP + -0x18]
JA 0x001011b5
PXOR XMM0,XMM0
COMISD XMM0,qword ptr [RBP + -0x20]
JBE 0x001011bf
LAB_001011b5:
MOVSD XMM0,qword ptr [0x001020b8]
JMP 0x00101211
LAB_001... | /* func0(double, double) */
void func0(double param_1,double param_2)
{
if ((0.0 <= param_1) && (0.0 <= param_2)) {
std::sqrt<int>(3);
std::pow<double,int>(param_1,2);
}
return;
} |
789 | func0 | #include <iostream>
#include <cmath>
#include <assert.h>
| double func0(double a, double b) {
if (a < 0 || b < 0) {
return -1;
}
double area = (3 * std::sqrt(3) * std::pow(a, 2)) / (4 * b);
return area;
}
| int main() {
assert(func0(4, 2) == 10.392304845413264);
assert(func0(5, 7) == 4.639421805988064);
assert(func0(9, 1) == 105.2220865598093);
return 0;
}
| O1 | cpp | func0(double, double):
endbr64
pxor %xmm2,%xmm2
comisd %xmm0,%xmm2
ja 11aa <_Z5func0dd+0x41>
movsd 0xe89(%rip),%xmm2
pxor %xmm3,%xmm3
comisd %xmm1,%xmm3
ja 11a5 <_Z5func0dd+0x3c>
mulsd %xmm0,%xmm0
mulsd 0xe7b(%rip),%xmm0
mulsd 0xe7b(%rip),%xmm1
movapd %xmm0,%xmm2
divsd %xmm1,%xmm2
movapd %xmm2,%xmm0
re... | _Z5func0dd:
endbr64
pxor xmm2, xmm2
comisd xmm2, xmm0
ja short loc_116A
movsd xmm2, cs:qword_2008
pxor xmm3, xmm3
comisd xmm3, xmm1
ja short loc_1165
mulsd xmm0, xmm0
mulsd xmm0, cs:qword_2010
mulsd xmm1, cs:qword_2018
movapd xmm2, xmm0
divsd xmm2, xmm1
loc_1165:
movapd xmm0, xmm2
retn
loc... | __int128 __usercall func0@<xmm0>(__m128 a1@<xmm0>, double a2@<xmm1>)
{
__int128 v2; // xmm2
if ( *(double *)a1.m128_u64 < 0.0 )
return 0xBFF0000000000000LL;
v2 = 0xBFF0000000000000LL;
if ( a2 >= 0.0 )
{
*((_QWORD *)&v2 + 1) = a1.m128_u64[1];
*(double *)&v2 = *(double *)a1.m128_u64 * *(double *)a1... | func0:
ENDBR64
PXOR XMM2,XMM2
COMISD XMM2,XMM0
JA 0x0010116a
MOVSD XMM2,qword ptr [0x00102008]
PXOR XMM3,XMM3
COMISD XMM3,XMM1
JA 0x00101165
MULSD XMM0,XMM0
MULSD XMM0,qword ptr [0x00102010]
MULSD XMM1,qword ptr [0x00102018]
MOVAPD XMM2,XMM0
DIVSD XMM2,XMM1
LAB_00101165:
MOVAPD XMM0,XMM2
RET
LAB_0010116a:
MOVSD XMM2,qw... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(double, double) */
double func0(double param_1,double param_2)
{
double dVar1;
dVar1 = DAT_00102008;
if ((0.0 <= param_1) && (0.0 <= param_2)) {
dVar1 = (param_1 * param_1 * _DAT_00102010) / (param_2 * _DAT_0010... |
790 | func0 | #include <iostream>
#include <cmath>
#include <assert.h>
| double func0(double a, double b) {
if (a < 0 || b < 0) {
return -1;
}
double area = (3 * std::sqrt(3) * std::pow(a, 2)) / (4 * b);
return area;
}
| int main() {
assert(func0(4, 2) == 10.392304845413264);
assert(func0(5, 7) == 4.639421805988064);
assert(func0(9, 1) == 105.2220865598093);
return 0;
}
| O2 | cpp | func0(double, double):
endbr64
pxor %xmm2,%xmm2
movsd 0xe38(%rip),%xmm3
comisd %xmm0,%xmm2
ja 11f8 <_Z5func0dd+0x38>
comisd %xmm1,%xmm2
ja 11f8 <_Z5func0dd+0x38>
mulsd %xmm0,%xmm0
mulsd 0xe28(%rip),%xmm0
mulsd 0xe28(%rip),%xmm1
movapd %xmm0,%xmm3
divsd %xmm1,%xmm3
movapd %xmm3,%xmm0
retq
nopl (%rax)
| _Z5func0dd:
endbr64
pxor xmm2, xmm2
movsd xmm3, cs:qword_2008
comisd xmm2, xmm0
ja short loc_1178
comisd xmm2, xmm1
ja short loc_1178
mulsd xmm0, xmm0
mulsd xmm0, cs:qword_2010
mulsd xmm1, cs:qword_2018
movapd xmm3, xmm0
divsd xmm3, xmm1
loc_1178:
movapd xmm0, xmm3
retn | __int128 __usercall func0@<xmm0>(__m128 a1@<xmm0>, double a2@<xmm1>)
{
__int128 v2; // xmm3
v2 = 0xBFF0000000000000LL;
if ( *(double *)a1.m128_u64 >= 0.0 && a2 >= 0.0 )
{
*((_QWORD *)&v2 + 1) = a1.m128_u64[1];
*(double *)&v2 = *(double *)a1.m128_u64 * *(double *)a1.m128_u64 * 5.196152422706632 / (a2 * ... | func0:
ENDBR64
PXOR XMM2,XMM2
MOVSD XMM3,qword ptr [0x00102008]
COMISD XMM2,XMM0
JA 0x00101178
COMISD XMM2,XMM1
JA 0x00101178
MULSD XMM0,XMM0
MULSD XMM0,qword ptr [0x00102010]
MULSD XMM1,qword ptr [0x00102018]
MOVAPD XMM3,XMM0
DIVSD XMM3,XMM1
LAB_00101178:
MOVAPD XMM0,XMM3
RET | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(double, double) */
double func0(double param_1,double param_2)
{
double dVar1;
dVar1 = DAT_00102008;
if ((0.0 <= param_1) && (0.0 <= param_2)) {
dVar1 = (param_1 * param_1 * _DAT_00102010) / (param_2 * _DAT_0010... |
791 | func0 | #include <iostream>
#include <cmath>
#include <assert.h>
| double func0(double a, double b) {
if (a < 0 || b < 0) {
return -1;
}
double area = (3 * std::sqrt(3) * std::pow(a, 2)) / (4 * b);
return area;
}
| int main() {
assert(func0(4, 2) == 10.392304845413264);
assert(func0(5, 7) == 4.639421805988064);
assert(func0(9, 1) == 105.2220865598093);
return 0;
}
| O3 | cpp | func0(double, double):
endbr64
pxor %xmm2,%xmm2
movsd 0xe38(%rip),%xmm3
comisd %xmm0,%xmm2
ja 11f8 <_Z5func0dd+0x38>
comisd %xmm1,%xmm2
ja 11f8 <_Z5func0dd+0x38>
mulsd %xmm0,%xmm0
mulsd 0xe28(%rip),%xmm0
mulsd 0xe28(%rip),%xmm1
movapd %xmm0,%xmm3
divsd %xmm1,%xmm3
movapd %xmm3,%xmm0
retq
nopl (%rax)
| _Z5func0dd:
endbr64
pxor xmm2, xmm2
movsd xmm3, cs:qword_2008
comisd xmm2, xmm0
ja short loc_1178
comisd xmm2, xmm1
ja short loc_1178
mulsd xmm0, xmm0
mulsd xmm0, cs:qword_2010
mulsd xmm1, cs:qword_2018
movapd xmm3, xmm0
divsd xmm3, xmm1
loc_1178:
movapd xmm0, xmm3
retn | __int128 __usercall func0@<xmm0>(__m128 a1@<xmm0>, double a2@<xmm1>)
{
__int128 v2; // xmm3
v2 = 0xBFF0000000000000LL;
if ( *(double *)a1.m128_u64 >= 0.0 && a2 >= 0.0 )
{
*((_QWORD *)&v2 + 1) = a1.m128_u64[1];
*(double *)&v2 = *(double *)a1.m128_u64 * *(double *)a1.m128_u64 * 5.196152422706632 / (a2 * ... | func0:
ENDBR64
PXOR XMM2,XMM2
MOVSD XMM3,qword ptr [0x00102008]
COMISD XMM2,XMM0
JA 0x00101178
COMISD XMM2,XMM1
JA 0x00101178
MULSD XMM0,XMM0
MULSD XMM0,qword ptr [0x00102010]
MULSD XMM1,qword ptr [0x00102018]
MOVAPD XMM3,XMM0
DIVSD XMM3,XMM1
LAB_00101178:
MOVAPD XMM0,XMM3
RET | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(double, double) */
double func0(double param_1,double param_2)
{
double dVar1;
dVar1 = DAT_00102008;
if ((0.0 <= param_1) && (0.0 <= param_2)) {
dVar1 = (param_1 * param_1 * _DAT_00102010) / (param_2 * _DAT_0010... |
792 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int n) {
int res = 0;
for (int i = n; i > 0; i--) {
if ((i & (i - 1)) == 0) {
res = i;
break;
}
}
return res;
}
| int main() {
assert(func0(10) == 8);
assert(func0(19) == 16);
assert(func0(32) == 32);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
movl $0x0,-0x8(%rbp)
mov -0x14(%rbp),%eax
mov %eax,-0x4(%rbp)
cmpl $0x0,-0x4(%rbp)
jle 11c2 <_Z5func0i+0x39>
mov -0x4(%rbp),%eax
sub $0x1,%eax
and -0x4(%rbp),%eax
test %eax,%eax
jne 11bc <_Z5func0i+0x33>
mov -0x4(%rbp... | _Z5func0i:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_14], edi
mov [rbp+var_8], 0
mov eax, [rbp+var_14]
mov [rbp+var_4], eax
jmp short loc_117C
loc_1163:
mov eax, [rbp+var_4]
sub eax, 1
and eax, [rbp+var_4]
test eax, eax
jnz short loc_1178
mov eax, [rbp+var_4]
mov [... | long long func0(int a1)
{
unsigned int v2; // [rsp+Ch] [rbp-8h]
v2 = 0;
while ( a1 > 0 )
{
if ( (a1 & (a1 - 1)) == 0 )
return (unsigned int)a1;
--a1;
}
return v2;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x14],EDI
MOV dword ptr [RBP + -0x8],0x0
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0010117c
LAB_00101163:
MOV EAX,dword ptr [RBP + -0x4]
SUB EAX,0x1
AND EAX,dword ptr [RBP + -0x4]
TEST EAX,EAX
JNZ 0x00101178
MOV EAX,dword ptr [RBP + -0... | /* func0(int) */
uint func0(int param_1)
{
uint local_c;
local_c = param_1;
while( true ) {
if ((int)local_c < 1) {
return 0;
}
if ((local_c - 1 & local_c) == 0) break;
local_c = local_c - 1;
}
return local_c;
} |
793 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int n) {
int res = 0;
for (int i = n; i > 0; i--) {
if ((i & (i - 1)) == 0) {
res = i;
break;
}
}
return res;
}
| int main() {
assert(func0(10) == 8);
assert(func0(19) == 16);
assert(func0(32) == 32);
return 0;
}
| O1 | cpp | func0(int):
endbr64
jmp 1191 <_Z5func0i+0x8>
mov %eax,%edi
test %edi,%edi
jle 119f <_Z5func0i+0x16>
lea -0x1(%rdi),%eax
test %edi,%eax
jne 118f <_Z5func0i+0x6>
mov %edi,%eax
retq
mov $0x0,%eax
retq
| _Z5func0i:
endbr64
loc_114D:
test edi, edi
jle short loc_115C
lea eax, [rdi-1]
test eax, edi
jz short loc_1162
mov edi, eax
jmp short loc_114D
loc_115C:
mov eax, 0
retn
loc_1162:
mov eax, edi
retn | long long func0(int a1)
{
while ( 1 )
{
if ( a1 <= 0 )
return 0LL;
if ( (a1 & (a1 - 1)) == 0 )
break;
--a1;
}
return (unsigned int)a1;
} | func0:
ENDBR64
LAB_0010114d:
TEST EDI,EDI
JLE 0x0010115c
LEA EAX,[RDI + -0x1]
TEST EAX,EDI
JZ 0x00101162
MOV EDI,EAX
JMP 0x0010114d
LAB_0010115c:
MOV EAX,0x0
RET
LAB_00101162:
MOV EAX,EDI
RET | /* func0(int) */
uint func0(int param_1)
{
uint uVar1;
do {
uVar1 = param_1;
if ((int)uVar1 < 1) {
return 0;
}
param_1 = uVar1 - 1;
} while ((uVar1 - 1 & uVar1) != 0);
return uVar1;
} |
794 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int n) {
int res = 0;
for (int i = n; i > 0; i--) {
if ((i & (i - 1)) == 0) {
res = i;
break;
}
}
return res;
}
| int main() {
assert(func0(10) == 8);
assert(func0(19) == 16);
assert(func0(32) == 32);
return 0;
}
| O2 | cpp | func0(int):
endbr64
jmp 1269 <_Z5func0i+0x19>
nopw %cs:0x0(%rax,%rax,1)
lea -0x1(%rdi),%eax
test %edi,%eax
je 1270 <_Z5func0i+0x20>
mov %eax,%edi
test %edi,%edi
jg 1260 <_Z5func0i+0x10>
xor %eax,%eax
retq
mov %edi,%eax
retq
nopw %cs:0x0(%rax,%rax,1)
nopl (%rax)
| _Z5func0i:
endbr64
test edi, edi
jle short loc_11F0
nop dword ptr [rax+rax+00000000h]
loc_11E0:
mov eax, edi
sub edi, 1
test edi, eax
jnz short loc_11E0
retn
loc_11F0:
xor eax, eax
retn | long long func0(int a1)
{
long long result; // rax
if ( a1 <= 0 )
return 0LL;
do
result = (unsigned int)a1--;
while ( ((unsigned int)result & a1) != 0 );
return result;
} | func0:
ENDBR64
TEST EDI,EDI
JLE 0x001011f0
NOP dword ptr [RAX + RAX*0x1]
LAB_001011e0:
MOV EAX,EDI
SUB EDI,0x1
TEST EDI,EAX
JNZ 0x001011e0
RET
LAB_001011f0:
XOR EAX,EAX
RET | /* func0(int) */
uint func0(int param_1)
{
uint uVar1;
uint uVar2;
if (param_1 < 1) {
return 0;
}
do {
uVar2 = param_1;
uVar1 = param_1 - 1U & param_1;
param_1 = param_1 - 1U;
} while (uVar1 != 0);
return uVar2;
} |
795 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int n) {
int res = 0;
for (int i = n; i > 0; i--) {
if ((i & (i - 1)) == 0) {
res = i;
break;
}
}
return res;
}
| int main() {
assert(func0(10) == 8);
assert(func0(19) == 16);
assert(func0(32) == 32);
return 0;
}
| O3 | cpp | func0(int):
endbr64
jmp 1239 <_Z5func0i+0x19>
nopw %cs:0x0(%rax,%rax,1)
lea -0x1(%rdi),%eax
test %edi,%eax
je 1240 <_Z5func0i+0x20>
mov %eax,%edi
test %edi,%edi
jg 1230 <_Z5func0i+0x10>
xor %eax,%eax
retq
mov %edi,%eax
retq
nopw %cs:0x0(%rax,%rax,1)
nopl (%rax)
| _Z5func0i:
endbr64
test edi, edi
jle short loc_11C0
nop dword ptr [rax+rax+00000000h]
loc_11B0:
mov eax, edi
sub edi, 1
test edi, eax
jnz short loc_11B0
retn
loc_11C0:
xor eax, eax
retn | long long func0(int a1)
{
long long result; // rax
if ( a1 <= 0 )
return 0LL;
do
result = (unsigned int)a1--;
while ( ((unsigned int)result & a1) != 0 );
return result;
} | func0:
ENDBR64
TEST EDI,EDI
JLE 0x001011c0
NOP dword ptr [RAX + RAX*0x1]
LAB_001011b0:
MOV EAX,EDI
SUB EDI,0x1
TEST EDI,EAX
JNZ 0x001011b0
RET
LAB_001011c0:
XOR EAX,EAX
RET | /* func0(int) */
uint func0(int param_1)
{
uint uVar1;
uint uVar2;
if (param_1 < 1) {
return 0;
}
do {
uVar2 = param_1;
uVar1 = param_1 - 1U & param_1;
param_1 = param_1 - 1U;
} while (uVar1 != 0);
return uVar2;
} |
796 | func0 |
#include <vector>
#include <iostream>
#include <assert.h>
#include <algorithm>
| std::vector<int> func0(const std::vector<int>& list1) {
int max_val = *std::max_element(list1.begin(), list1.end());
std::vector<int> max_result;
for (int i = 0; i < list1.size(); i++) {
if (list1[i] == max_val) {
max_result.push_back(i);
}
}
return max_result;
}... | int main() {
assert(func0({12, 33, 23, 10, 67, 89, 45, 667, 23, 12, 11, 10, 54}) == std::vector<int>({7}));
assert(func0({1, 2, 2, 2, 4, 4, 4, 5, 5, 5, 5}) == std::vector<int>({7, 8, 9, 10}));
assert(func0({2, 1, 5, 6, 8, 3, 4, 9, 10, 11, 8, 12}) == std::vector<int>({11}));
std::cout << "All tests... | O0 | cpp | func0(std::vector<int, std::allocator<int> > const&):
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 1c4e <_ZNKSt6vectorIiSaIiEE3endEv>
mov ... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 38h
mov [rbp+var_38], rdi
mov [rbp+var_40], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_40]
mov rdi, rax
call _ZNKSt6vectorIiSaIiEE3endEv; std::vector<int>::end(void)
mo... | long long func0(long long a1, long long a2)
{
long long v2; // rbx
long long v3; // rax
unsigned long long v4; // rbx
int v6; // [rsp+1Ch] [rbp-24h]
_QWORD v7[3]; // [rsp+20h] [rbp-20h] BYREF
v7[1] = __readfsqword(0x28u);
v2 = std::vector<int>::end(a2);
v3 = std::vector<int>::begin(a2);
v7[0] = std:... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x38
MOV qword ptr [RBP + -0x38],RDI
MOV qword ptr [RBP + -0x40],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x40]
MOV RDI,RAX
CALL 0x00101bc8
MOV RBX,RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV RDI,RAX
CALL 0x001... | /* func0(std::vector<int, std::allocator<int> > const&) */
vector * func0(vector *param_1)
{
int iVar1;
__normal_iterator _Var2;
__normal_iterator _Var3;
uint extraout_var;
int *piVar4;
ulong uVar5;
ulong uVar6;
vector<int,std::allocator<int>> *in_RSI;
long in_FS_OFFSET;
int8 local_28;
long loca... |
797 | func0 |
#include <vector>
#include <iostream>
#include <assert.h>
#include <algorithm>
| std::vector<int> func0(const std::vector<int>& list1) {
int max_val = *std::max_element(list1.begin(), list1.end());
std::vector<int> max_result;
for (int i = 0; i < list1.size(); i++) {
if (list1[i] == max_val) {
max_result.push_back(i);
}
}
return max_result;
}... | int main() {
assert(func0({12, 33, 23, 10, 67, 89, 45, 667, 23, 12, 11, 10, 54}) == std::vector<int>({7}));
assert(func0({1, 2, 2, 2, 4, 4, 4, 5, 5, 5, 5}) == std::vector<int>({7, 8, 9, 10}));
assert(func0({2, 1, 5, 6, 8, 3, 4, 9, 10, 11, 8, 12}) == std::vector<int>({11}));
std::cout << "All tests... | O1 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %r13
push %r12
push %rbp
push %rbx
sub $0x18,%rsp
mov %rdi,%rbp
mov %rsi,%rbx
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
mov 0x8(%rsi),%rcx
mov (%rsi),%rdx
cmp %rcx,%rdx
je 1350 <_Z5func0RKSt6vectorIiSaIiEE... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 10h
mov r12, rdi
mov rbp, rsi
mov rax, fs:28h
mov [rsp+38h+var_30], rax
xor eax, eax
mov rcx, [rsi+8]
mov rdx, [rsi]
cmp rdx, rcx
jz short loc_130F
lea rax, [rdx+4]
cmp ... | _QWORD * func0(_QWORD *a1, int **a2)
{
int *v3; // rcx
int *v4; // rdx
int *i; // rax
int v6; // r13d
int *v7; // rdx
unsigned long long v8; // rbx
_DWORD *v9; // rsi
int v11; // [rsp+4h] [rbp-34h] BYREF
unsigned long long v12; // [rsp+8h] [rbp-30h]
v12 = __readfsqword(0x28u);
v3 = a2[1];
v4 = ... | func0:
ENDBR64
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x10
MOV R12,RDI
MOV RBP,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
MOV RCX,qword ptr [RSI + 0x8]
MOV RDX,qword ptr [RSI]
CMP RDX,RCX
JZ 0x0010130f
LEA RAX,[RDX + 0x4]
CMP RCX,RAX
JZ 0x001012d5
LAB_001012c4:
MOV EDI,dword... | /* func0(std::vector<int, std::allocator<int> > const&) */
vector * func0(vector *param_1)
{
int iVar1;
int *piVar2;
int *piVar3;
int *piVar4;
int *piVar5;
long lVar6;
ulong uVar7;
long *in_RSI;
long in_FS_OFFSET;
int local_34;
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
piV... |
798 | func0 |
#include <vector>
#include <iostream>
#include <assert.h>
#include <algorithm>
| std::vector<int> func0(const std::vector<int>& list1) {
int max_val = *std::max_element(list1.begin(), list1.end());
std::vector<int> max_result;
for (int i = 0; i < list1.size(); i++) {
if (list1[i] == max_val) {
max_result.push_back(i);
}
}
return max_result;
}... | int main() {
assert(func0({12, 33, 23, 10, 67, 89, 45, 667, 23, 12, 11, 10, 54}) == std::vector<int>({7}));
assert(func0({1, 2, 2, 2, 4, 4, 4, 5, 5, 5, 5}) == std::vector<int>({7, 8, 9, 10}));
assert(func0({2, 1, 5, 6, 8, 3, 4, 9, 10, 11, 8, 12}) == std::vector<int>({11}));
std::cout << "All tests... | O2 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %r13
push %r12
mov %rdi,%r12
push %rbp
mov %rsi,%rbp
push %rbx
sub $0x18,%rsp
mov 0x8(%rsi),%rcx
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
mov (%rsi),%rax
mov (%rax),%ebx
cmp %rax,%rcx
jne 17cf <_Z5func0... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push r14
push r13
mov r13, rdi
push r12
mov r12, rsi
push rbp
push rbx
sub rsp, 10h
mov rcx, [rsi+8]
mov rdx, [rsi]
mov rax, fs:28h
mov [rsp+38h+var_30], rax
xor eax, eax
cmp rdx, rcx
jz loc_1860
lea rax, [rdx+4]
mov eb... | long long func0(long long a1, int **a2)
{
int *v3; // rcx
int *v4; // rdx
int *v5; // rax
int v6; // ebp
int v7; // eax
unsigned long long v8; // rbx
int *v9; // rdx
int *v10; // rax
int v11; // r14d
_DWORD *v12; // rsi
int v14; // [rsp+4h] [rbp-34h] BYREF
unsigned long long v15; // [rsp+8h] [r... | func0:
ENDBR64
PUSH R14
PUSH R13
MOV R13,RDI
PUSH R12
MOV R12,RSI
PUSH RBP
PUSH RBX
SUB RSP,0x10
MOV RCX,qword ptr [RSI + 0x8]
MOV RDX,qword ptr [RSI]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
CMP RDX,RCX
JZ 0x00101860
LEA RAX,[RDX + 0x4]
MOV EBP,dword ptr [RDX]
CMP RCX,RAX
JZ 0x001017d8
MOV... | /* func0(std::vector<int, std::allocator<int> > const&) */
vector * func0(vector *param_1)
{
int *piVar1;
int *piVar2;
int *piVar3;
long lVar4;
ulong uVar5;
int iVar6;
long *in_RSI;
long in_FS_OFFSET;
int local_34;
long local_30;
piVar1 = (int *)in_RSI[1];
piVar2 = (int *)*in_RSI;
local_3... |
799 | func0 |
#include <vector>
#include <iostream>
#include <assert.h>
#include <algorithm>
| std::vector<int> func0(const std::vector<int>& list1) {
int max_val = *std::max_element(list1.begin(), list1.end());
std::vector<int> max_result;
for (int i = 0; i < list1.size(); i++) {
if (list1[i] == max_val) {
max_result.push_back(i);
}
}
return max_result;
}... | int main() {
assert(func0({12, 33, 23, 10, 67, 89, 45, 667, 23, 12, 11, 10, 54}) == std::vector<int>({7}));
assert(func0({1, 2, 2, 2, 4, 4, 4, 5, 5, 5, 5}) == std::vector<int>({7, 8, 9, 10}));
assert(func0({2, 1, 5, 6, 8, 3, 4, 9, 10, 11, 8, 12}) == std::vector<int>({11}));
std::cout << "All tests... | O3 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %r13
push %r12
mov %rdi,%r12
push %rbp
mov %rsi,%rbp
push %rbx
sub $0x18,%rsp
mov 0x8(%rsi),%rsi
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
mov 0x0(%rbp),%rax
mov (%rax),%ebx
cmp %rax,%rsi
je 17fd <_Z5fu... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push r14
push r13
mov r13, rsi
push r12
mov r12, rdi
push rbp
push rbx
sub rsp, 10h
mov rdi, [rsi+8]
mov rax, fs:28h
mov [rsp+38h+var_30], rax
xor eax, eax
mov rax, [rsi]
cmp rax, rdi
jz loc_1920
lea rcx, [rax+4]
mov eb... | long long func0(long long a1, signed int **a2)
{
signed int *v4; // rdi
signed int *v5; // rax
signed int *v6; // rcx
signed int v7; // ebp
unsigned long long v8; // rsi
__m128i v9; // xmm2
signed int *v10; // rdx
__m128i v11; // xmm0
__m128i v12; // xmm1
__m128i v13; // xmm1
__m128i v14; // xmm0... | func0:
ENDBR64
PUSH R14
PUSH R13
MOV R13,RSI
PUSH R12
MOV R12,RDI
PUSH RBP
PUSH RBX
SUB RSP,0x10
MOV RDI,qword ptr [RSI + 0x8]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RSI]
CMP RAX,RDI
JZ 0x00101920
LEA RCX,[RAX + 0x4]
MOV EBP,dword ptr [RAX]
CMP RDI,RCX
JZ 0x0010187b
LEA... | /* func0(std::vector<int, std::allocator<int> > const&) */
vector * func0(vector *param_1)
{
uint *puVar1;
uint *puVar2;
int *piVar3;
uint *puVar4;
uint *puVar5;
uint *puVar6;
uint *puVar7;
uint *puVar8;
long lVar9;
ulong uVar10;
uint *puVar11;
long lVar12;
uint uVar13;
long *in_RSI;
ulo... |
800 | func0 | #include <iostream>
#include <vector>
#include <set>
#include <assert.h>
| bool func0(const std::vector<std::string>& lst) {
return std::set<std::string>(lst.begin(), lst.end()).size() == 1;
}
| int main() {
assert(func0({"one", "one", "one"}) == true);
assert(func0({"one", "Two", "Three"}) == false);
assert(func0({"bigdata", "python", "Django"}) == false);
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 $0x58,%rsp
mov %rdi,-0x58(%rbp)
mov %fs:0x28,%rax
m... | _Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 58h
mov [rbp+var_58], rdi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_58]
mov rdi, rax
call _ZNKSt6vectorINSt7__cxx1112basic... | long long func0(long long a1)
{
long long v1; // rbx
long long v2; // rax
_BYTE v4[56]; // [rsp+10h] [rbp-50h] BYREF
unsigned long long v5; // [rsp+48h] [rbp-18h]
v5 = __readfsqword(0x28u);
v1 = std::vector<std::string>::end(a1);
v2 = std::vector<std::string>::begin(a1);
std::set<std::string>::set<__g... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x58
MOV qword ptr [RBP + -0x58],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x58]
MOV RDI,RAX
CALL 0x00102a06
MOV RBX,RAX
MOV RAX,qword ptr [RBP + -0x58]
MOV RDI,RAX
CALL 0x001029ba
MOV RCX,RAX
LEA RAX,[RBP +... | /* func0(std::vector<std::string, std::allocator<std::string > > const&) */
ulong func0(vector *param_1)
{
__normal_iterator _Var1;
int8 uVar2;
long lVar3;
long in_FS_OFFSET;
set<std::string,std::less<std::string>,std::allocator<std::string>> local_58 [56];
long local_20;
local_20 = *(long *)(in_FS_O... |
801 | func0 | #include <iostream>
#include <vector>
#include <set>
#include <assert.h>
| bool func0(const std::vector<std::string>& lst) {
return std::set<std::string>(lst.begin(), lst.end()).size() == 1;
}
| int main() {
assert(func0({"one", "one", "one"}) == true);
assert(func0({"one", "Two", "Three"}) == false);
assert(func0({"bigdata", "python", "Django"}) == false);
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 %r12
push %rbp
push %rbx
sub $0x50,%rsp
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor ... | _Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE:
endbr64
push r12
push rbp
push rbx
sub rsp, 50h
mov rax, fs:28h
mov [rsp+68h+var_20], rax
xor eax, eax
mov r12, [rdi+8]
mov rbx, [rdi]
mov [rsp+68h+var_50], 0
mov [rsp+68h+var_48], 0
lea rdx, [... | long long func0(long long *a1)
{
long long v1; // r12
long long v2; // rbx
long long insert_hint_unique_pos; // rax
long long v4; // rdx
_BYTE *i; // [rsp+8h] [rbp-60h] BYREF
_BYTE v7[8]; // [rsp+10h] [rbp-58h] BYREF
int v8; // [rsp+18h] [rbp-50h] BYREF
long long v9; // [rsp+20h] [rbp-48h]
int *v10; ... | func0:
ENDBR64
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x50
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x48],RAX
XOR EAX,EAX
MOV R12,qword ptr [RDI + 0x8]
MOV RBX,qword ptr [RDI]
MOV dword ptr [RSP + 0x18],0x0
MOV qword ptr [RSP + 0x20],0x0
LEA RDX,[RSP + 0x10]
LEA RAX,[RSP + 0x18]
MOV qword ptr [RSP + 0x28],RAX
MOV q... | /* func0(std::vector<std::string, std::allocator<std::string > > const&) */
ulong func0(vector *param_1)
{
string *psVar1;
string *psVar2;
long in_FS_OFFSET;
bool bVar3;
int auVar4 [16];
_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>>
loca... |
802 | func0 | #include <iostream>
#include <vector>
#include <set>
#include <assert.h>
| bool func0(const std::vector<std::string>& lst) {
return std::set<std::string>(lst.begin(), lst.end()).size() == 1;
}
| int main() {
assert(func0({"one", "one", "one"}) == true);
assert(func0({"one", "Two", "Three"}) == false);
assert(func0({"bigdata", "python", "Django"}) == false);
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
push %rbp
push %rbx
sub $0x58,%rsp
mov 0x8(%rdi... | _Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 78h
mov r15, [rdi+8]
mov rbx, [rdi]
mov rax, fs:28h
mov [rsp+0A8h+var_40], rax
xor eax, eax
lea r14, [rsp+0A8h+var_70]
mo... | long long func0(long long *a1)
{
long long v1; // r15
long long v2; // rbx
long long i; // rax
int *v4; // rdx
const void **v5; // rbp
_QWORD *v6; // r12
size_t v7; // r13
_BYTE *v8; // rdi
_BYTE *v9; // rcx
long long v10; // rax
size_t v11; // r12
size_t v12; // r13
size_t v13; // rdx
unsi... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x78
MOV R15,qword ptr [RDI + 0x8]
MOV RBX,qword ptr [RDI]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x68],RAX
XOR EAX,EAX
LEA R14,[RSP + 0x38]
MOV dword ptr [RSP + 0x38],0x0
MOV qword ptr [RSP + 0x40],0x0
MOV qword ptr [RSP + 0x48],R14... | /* func0(std::vector<std::string, std::allocator<std::string > > const&) */
ulong func0(vector *param_1)
{
_Rb_tree_node_base *p_Var1;
string *psVar2;
_Rb_tree_node_base *__src;
ulong uVar3;
int iVar4;
_Rb_tree_node_base *p_Var5;
_Rb_tree_node_base *__dest;
_Rb_tree_node_base *p_Var6;
ulong __n;
s... |
803 | func0 | #include <iostream>
#include <vector>
#include <set>
#include <assert.h>
| bool func0(const std::vector<std::string>& lst) {
return std::set<std::string>(lst.begin(), lst.end()).size() == 1;
}
| int main() {
assert(func0({"one", "one", "one"}) == true);
assert(func0({"one", "Two", "Three"}) == false);
assert(func0({"bigdata", "python", "Django"}) == false);
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
push %r14
push %r13
xor %r13d,%r13d
push %r12
push %rbp
push %rbx
sub $0x78,%... | _Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 78h
mov r15, [rdi+8]
mov rbx, [rdi]
mov rax, fs:28h
mov [rsp+0A8h+var_40], rax
xor eax, eax
lea r14, [rsp+0A8h+var_70]
mo... | long long func0(long long *a1)
{
long long v1; // r15
long long v2; // rbx
long long v3; // r12
int *v4; // rbp
size_t v5; // r13
size_t v6; // rcx
size_t v7; // rdx
signed long long v8; // rax
long long insert_unique_pos; // rax
int *v10; // rdx
_QWORD *v11; // r12
size_t v12; // r13
void *v... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x78
MOV R15,qword ptr [RDI + 0x8]
MOV RBX,qword ptr [RDI]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x68],RAX
XOR EAX,EAX
LEA R14,[RSP + 0x38]
MOV dword ptr [RSP + 0x38],0x0
MOV qword ptr [RSP + 0x40],0x0
MOV qword ptr [RSP + 0x48],R14... | /* func0(std::vector<std::string, std::allocator<std::string > > const&) */
ulong func0(vector *param_1)
{
_Rb_tree_node_base *p_Var1;
string *psVar2;
_Rb_tree_node_base *__src;
void *pvVar3;
void *pvVar4;
uint uVar5;
int iVar6;
ulong uVar7;
_Rb_tree_node_base *p_Var8;
_Rb_tree_node_base *__dest;
... |
804 | func0 |
#include <iostream>
#include <string>
#include <assert.h>
| std::string func0(const std::string& str1) {
std::string str2 = "";
for (int i = 1; i <= str1.length(); i++) {
if (i % 2 != 0) {
str2 += str1[i - 1];
}
}
return str2;
}
| int main() {
assert(func0("python") == "pto");
assert(func0("program") == "porm");
assert(func0("language") == "lnug");
return 0;
}
| O0 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x28,%rsp
mov %rdi,-0x28(%rbp)
mov %rsi,-0x30(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
lea -0x1d(%rbp),%rax
mov %rax,%rdi
callq ... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 38h
mov [rbp+var_38], rdi
mov [rbp+var_40], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_25]
mov [rbp+var_20], rax
nop
nop
lea rdx, [r... | long long func0(long long a1, long long a2)
{
char *v2; // rax
unsigned long long v3; // rbx
char v5; // [rsp+1Bh] [rbp-25h] BYREF
int i; // [rsp+1Ch] [rbp-24h]
char *v7; // [rsp+20h] [rbp-20h]
unsigned long long v8; // [rsp+28h] [rbp-18h]
v8 = __readfsqword(0x28u);
v7 = &v5;
std::string::basic_stri... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x38
MOV qword ptr [RBP + -0x38],RDI
MOV qword ptr [RBP + -0x40],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x25]
MOV qword ptr [RBP + -0x20],RAX
NOP
NOP
LEA RDX,[RBP + -0x25]
MOV RAX,qword ptr [RBP + -0x38]
LEA RCX,[0... | /* func0(std::string const&) */
string * func0(string *param_1)
{
char *pcVar1;
ulong uVar2;
ulong uVar3;
ulong in_RSI;
long in_FS_OFFSET;
allocator local_2d;
uint local_2c;
allocator *local_28;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
local_28 = &local_2d;
... |
805 | func0 |
#include <iostream>
#include <string>
#include <assert.h>
| std::string func0(const std::string& str1) {
std::string str2 = "";
for (int i = 1; i <= str1.length(); i++) {
if (i % 2 != 0) {
str2 += str1[i - 1];
}
}
return str2;
}
| int main() {
assert(func0("python") == "pto");
assert(func0("program") == "porm");
assert(func0("language") == "lnug");
return 0;
}
| O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x18,%rsp
mov %rdi,%rbp
mov %rsi,%r12
lea 0x10(%rdi),%rax
mov %rax,0x8(%rsp)
mov %rax,(%rdi)
lea 0xdfe(%rip),%rdx
mov ... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 18h
mov rbp, rdi
mov r12, rsi
lea rax, [rdi+10h]
mov [rsp+48h+var_40], rax
mov [rdi], rax
lea rsi, aFunc0LanguageL+1Bh; ""
mov rdx, rsi... | _QWORD * func0(_QWORD *a1, _QWORD *a2)
{
long long i; // rbx
unsigned long long v3; // rax
char v4; // r15
long long v5; // r13
unsigned long long v6; // r14
*a1 = a1 + 2;
std::string::_M_construct<char const*>(a1, "", "");
if ( a2[1] )
{
for ( i = 0LL; ; ++i )
{
if ( (i & 1) == 0 )
... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x18
MOV RBP,RDI
MOV R12,RSI
LEA RAX,[RDI + 0x10]
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RDI],RAX
LEA RSI,[0x1020e0]
MOV RDX,RSI
LAB_00101297:
CALL 0x001015ac
CMP qword ptr [R12 + 0x8],0x0
JZ 0x0010133c
MOV EBX,0x0
JMP 0x001012de
LAB_001... | /* func0(std::string const&) */
string * func0(string *param_1)
{
int uVar1;
ulong uVar2;
ulong uVar3;
ulong uVar4;
long *in_RSI;
*(string **)param_1 = param_1 + 0x10;
std::string::_M_construct<char_const*>((char *)param_1,"",0x1020e0);
if (in_RSI[1] != 0) {
uVar4 = 0;
do {
if ((uVar4... |
806 | func0 |
#include <iostream>
#include <string>
#include <assert.h>
| std::string func0(const std::string& str1) {
std::string str2 = "";
for (int i = 1; i <= str1.length(); i++) {
if (i % 2 != 0) {
str2 += str1[i - 1];
}
}
return str2;
}
| int main() {
assert(func0("python") == "pto");
assert(func0("program") == "porm");
assert(func0("language") == "lnug");
return 0;
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r15
lea 0x10(%rdi),%rax
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
mov %rsi,%rbp
push %rbx
xor %ebx,%ebx
sub $0x18,%rsp
movq $0x0,0x8(%rdi)
movb $0x0,0x10(%rdi)
cmpq $... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
lea rax, [rdi+10h]
push r14
push r13
push r12
mov r12, rsi
push rbp
mov rbp, rdi
push rbx
xor ebx, ebx
sub rsp, 18h
mov qword ptr [rdi+8], 0
mov byte ptr [rdi+10h], 0
cmp qword ptr [rsi+8],... | _QWORD * func0(_QWORD *a1, _QWORD *a2)
{
long long v2; // rbx
bool v3; // zf
long long v4; // rax
long long v5; // r13
char v6; // r15
unsigned long long v7; // r14
long long v8; // rax
unsigned long long v9; // rdx
long long v10; // rax
v2 = 0LL;
a1[1] = 0LL;
*((_BYTE *)a1 + 16) = 0;
v3 = a2... | func0:
ENDBR64
PUSH R15
LEA RAX,[RDI + 0x10]
PUSH R14
PUSH R13
PUSH R12
MOV R12,RSI
PUSH RBP
MOV RBP,RDI
PUSH RBX
XOR EBX,EBX
SUB RSP,0x18
MOV qword ptr [RDI + 0x8],0x0
MOV byte ptr [RDI + 0x10],0x0
CMP qword ptr [RSI + 0x8],0x0
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RDI],RAX
JNZ 0x001014a2
JMP 0x001014ed
LAB_001... | /* func0(std::string const&) */
string * func0(string *param_1)
{
string sVar1;
ulong uVar2;
long lVar3;
string *psVar4;
ulong uVar5;
ulong uVar6;
long *in_RSI;
uVar5 = 0;
*(int8 *)(param_1 + 8) = 0;
param_1[0x10] = (string)0x0;
lVar3 = in_RSI[1];
*(string **)param_1 = param_1 + 0x10;
if ... |
807 | func0 |
#include <iostream>
#include <string>
#include <assert.h>
| std::string func0(const std::string& str1) {
std::string str2 = "";
for (int i = 1; i <= str1.length(); i++) {
if (i % 2 != 0) {
str2 += str1[i - 1];
}
}
return str2;
}
| int main() {
assert(func0("python") == "pto");
assert(func0("program") == "porm");
assert(func0("language") == "lnug");
return 0;
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r15
lea 0x10(%rdi),%rax
push %r14
push %r13
mov %rsi,%r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
xor %ebx,%ebx
sub $0x18,%rsp
movq $0x0,0x8(%rdi)
movb $0x0,0x10(%rdi)
mov 0... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
lea rax, [rdi+10h]
push r14
push r13
mov r13, rsi
push r12
push rbp
mov rbp, rdi
push rbx
xor ebx, ebx
sub rsp, 18h
mov qword ptr [rdi+8], 0
mov byte ptr [rdi+10h], 0
mov rdx, [rsi+8]
mov ... | _QWORD * func0(_QWORD *a1, _QWORD *a2)
{
long long v2; // rbx
unsigned long long v3; // rdx
long long v4; // rax
long long v5; // r12
char v6; // r15
unsigned long long v7; // r14
long long v8; // rax
unsigned long long v9; // rdx
long long v10; // rax
v2 = 0LL;
a1[1] = 0LL;
*((_BYTE *)a1 + 16)... | func0:
ENDBR64
PUSH R15
LEA RAX,[RDI + 0x10]
PUSH R14
PUSH R13
MOV R13,RSI
PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
XOR EBX,EBX
SUB RSP,0x18
MOV qword ptr [RDI + 0x8],0x0
MOV byte ptr [RDI + 0x10],0x0
MOV RDX,qword ptr [RSI + 0x8]
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RDI],RAX
TEST RDX,RDX
JNZ 0x001014a0
JMP 0x001... | /* func0(std::string const&) */
string * func0(string *param_1)
{
string sVar1;
string *psVar2;
ulong uVar3;
ulong uVar4;
ulong uVar5;
long *in_RSI;
uVar3 = 0;
*(int8 *)(param_1 + 8) = 0;
param_1[0x10] = (string)0x0;
uVar4 = in_RSI[1];
*(string **)param_1 = param_1 + 0x10;
if (uVar4 == 0) {... |
808 | func0 |
#include <assert.h>
| int func0(int n1, int n2) {
int x = n1 ^ n2;
int setBits = 0;
while (x > 0) {
setBits += x & 1;
x >>= 1;
}
return setBits;
}
| int main() {
assert(func0(4, 8) == 2);
assert(func0(2, 4) == 2);
assert(func0(1, 2) == 2);
return 0;
}
| O0 | cpp | func0(int, int):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
mov %esi,-0x18(%rbp)
mov -0x14(%rbp),%eax
xor -0x18(%rbp),%eax
mov %eax,-0x8(%rbp)
movl $0x0,-0x4(%rbp)
cmpl $0x0,-0x8(%rbp)
jle 117b <_Z5func0ii+0x32>
mov -0x8(%rbp),%eax
and $0x1,%eax
add %eax,-0x4(%rbp)
sarl -... | _Z5func0ii:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_14], edi
mov [rbp+var_18], esi
mov eax, [rbp+var_14]
xor eax, [rbp+var_18]
mov [rbp+var_8], eax
mov [rbp+var_4], 0
jmp short loc_1175
loc_1169:
mov eax, [rbp+var_8]
and eax, 1
add [rbp+var_4], eax
sar [rbp+var_8], ... | long long func0(int a1, int a2)
{
int v3; // [rsp+10h] [rbp-8h]
unsigned int v4; // [rsp+14h] [rbp-4h]
v3 = a2 ^ a1;
v4 = 0;
while ( v3 > 0 )
{
v4 += v3 & 1;
v3 >>= 1;
}
return v4;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x14],EDI
MOV dword ptr [RBP + -0x18],ESI
MOV EAX,dword ptr [RBP + -0x14]
XOR EAX,dword ptr [RBP + -0x18]
MOV dword ptr [RBP + -0x8],EAX
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00101175
LAB_00101169:
MOV EAX,dword ptr [RBP + -0x8]
AND EAX,0x1
ADD dword ptr [RBP + -... | /* func0(int, int) */
int func0(int param_1,int param_2)
{
int4 local_10;
int4 local_c;
local_c = 0;
for (local_10 = param_1 ^ param_2; 0 < (int)local_10; local_10 = (int)local_10 >> 1) {
local_c = local_c + (local_10 & 1);
}
return local_c;
} |
809 | func0 |
#include <assert.h>
| int func0(int n1, int n2) {
int x = n1 ^ n2;
int setBits = 0;
while (x > 0) {
setBits += x & 1;
x >>= 1;
}
return setBits;
}
| int main() {
assert(func0(4, 8) == 2);
assert(func0(2, 4) == 2);
assert(func0(1, 2) == 2);
return 0;
}
| O1 | cpp | func0(int, int):
endbr64
xor %edi,%esi
jle 1164 <_Z5func0ii+0x1b>
mov $0x0,%eax
mov %esi,%edx
and $0x1,%edx
add %edx,%eax
sar %esi
test %esi,%esi
jg 1156 <_Z5func0ii+0xd>
retq
mov $0x0,%eax
retq
| _Z5func0ii:
endbr64
xor edi, esi
jle short loc_1164
mov eax, 0
loc_1156:
mov edx, edi
and edx, 1
add eax, edx
sar edi, 1
test edi, edi
jg short loc_1156
retn
loc_1164:
mov eax, 0
retn | long long func0(int a1, int a2)
{
int v2; // edi
long long result; // rax
v2 = a2 ^ a1;
if ( v2 <= 0 )
return 0LL;
LODWORD(result) = 0;
do
{
result = (v2 & 1) + (unsigned int)result;
v2 >>= 1;
}
while ( v2 > 0 );
return result;
} | func0:
ENDBR64
XOR EDI,ESI
JLE 0x00101164
MOV EAX,0x0
LAB_00101156:
MOV EDX,EDI
AND EDX,0x1
ADD EAX,EDX
SAR EDI,0x1
TEST EDI,EDI
JG 0x00101156
RET
LAB_00101164:
MOV EAX,0x0
RET | /* func0(int, int) */
int func0(int param_1,int param_2)
{
int iVar1;
uint uVar2;
uVar2 = param_1 ^ param_2;
if (0 < (int)uVar2) {
iVar1 = 0;
do {
iVar1 = iVar1 + (uVar2 & 1);
uVar2 = (int)uVar2 >> 1;
} while (0 < (int)uVar2);
return iVar1;
}
return 0;
} |
810 | func0 |
#include <assert.h>
| int func0(int n1, int n2) {
int x = n1 ^ n2;
int setBits = 0;
while (x > 0) {
setBits += x & 1;
x >>= 1;
}
return setBits;
}
| int main() {
assert(func0(4, 8) == 2);
assert(func0(2, 4) == 2);
assert(func0(1, 2) == 2);
return 0;
}
| O2 | cpp | func0(int, int):
endbr64
xor %eax,%eax
xor %edi,%esi
jle 11c0 <_Z5func0ii+0x20>
nopw 0x0(%rax,%rax,1)
mov %esi,%edx
and $0x1,%edx
add %edx,%eax
sar %esi
jne 11b0 <_Z5func0ii+0x10>
retq
nopl 0x0(%rax)
retq
nopw %cs:0x0(%rax,%rax,1)
nopl 0x0(%rax,%rax,1)
| _Z5func0ii:
endbr64
xor eax, eax
xor edi, esi
jle short locret_11C0
nop word ptr [rax+rax+00h]
loc_11B0:
mov edx, edi
and edx, 1
add eax, edx
sar edi, 1
jnz short loc_11B0
retn
locret_11C0:
retn | long long func0(int a1, int a2)
{
long long result; // rax
int v3; // edi
result = 0LL;
v3 = a2 ^ a1;
if ( v3 > 0 )
{
do
{
result = (v3 & 1) + (unsigned int)result;
v3 >>= 1;
}
while ( v3 );
}
return result;
} | func0:
ENDBR64
XOR EAX,EAX
XOR EDI,ESI
JLE 0x001011c0
NOP word ptr [RAX + RAX*0x1]
LAB_001011b0:
MOV EDX,EDI
AND EDX,0x1
ADD EAX,EDX
SAR EDI,0x1
JNZ 0x001011b0
RET
LAB_001011c0:
RET | /* func0(int, int) */
int func0(int param_1,int param_2)
{
int iVar1;
uint uVar2;
iVar1 = 0;
uVar2 = param_1 ^ param_2;
if ((int)uVar2 < 1) {
return 0;
}
do {
iVar1 = iVar1 + (uVar2 & 1);
uVar2 = (int)uVar2 >> 1;
} while (uVar2 != 0);
return iVar1;
} |
811 | func0 |
#include <assert.h>
| int func0(int n1, int n2) {
int x = n1 ^ n2;
int setBits = 0;
while (x > 0) {
setBits += x & 1;
x >>= 1;
}
return setBits;
}
| int main() {
assert(func0(4, 8) == 2);
assert(func0(2, 4) == 2);
assert(func0(1, 2) == 2);
return 0;
}
| O3 | cpp | func0(int, int):
endbr64
xor %eax,%eax
xor %edi,%esi
jle 1160 <_Z5func0ii+0x20>
nopw 0x0(%rax,%rax,1)
mov %esi,%edx
and $0x1,%edx
add %edx,%eax
sar %esi
jne 1150 <_Z5func0ii+0x10>
retq
nopl 0x0(%rax)
retq
nopw %cs:0x0(%rax,%rax,1)
nopl 0x0(%rax,%rax,1)
| _Z5func0ii:
endbr64
xor eax, eax
xor edi, esi
jle short locret_1160
nop word ptr [rax+rax+00h]
loc_1150:
mov edx, edi
and edx, 1
add eax, edx
sar edi, 1
jnz short loc_1150
retn
locret_1160:
retn | long long func0(int a1, int a2)
{
long long result; // rax
int v3; // edi
result = 0LL;
v3 = a2 ^ a1;
if ( v3 > 0 )
{
do
{
result = (v3 & 1) + (unsigned int)result;
v3 >>= 1;
}
while ( v3 );
}
return result;
} | func0:
ENDBR64
XOR EAX,EAX
XOR EDI,ESI
JLE 0x00101160
NOP word ptr [RAX + RAX*0x1]
LAB_00101150:
MOV EDX,EDI
AND EDX,0x1
ADD EAX,EDX
SAR EDI,0x1
JNZ 0x00101150
RET
LAB_00101160:
RET | /* func0(int, int) */
int func0(int param_1,int param_2)
{
int iVar1;
uint uVar2;
iVar1 = 0;
uVar2 = param_1 ^ param_2;
if ((int)uVar2 < 1) {
return 0;
}
do {
iVar1 = iVar1 + (uVar2 & 1);
uVar2 = (int)uVar2 >> 1;
} while (uVar2 != 0);
return iVar1;
} |
812 | func0 |
#include <iostream>
#include <string>
#include <assert.h>
| int func0(std::string s, char c) {
int res = 0;
for (int i = 0; i < s.length(); i++) {
if (s[i] == c) {
res += 1;
}
}
return res;
}
| int main() {
assert(func0("abcc", 'c') == 2);
assert(func0("ababca", 'a') == 3);
assert(func0("mnmm0pm", 'm') == 4);
return 0;
}
| O0 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x28,%rsp
mov %rdi,-0x28(%rbp)
mov %esi,%eax
mov %al,-0x2c(%rbp)
movl $0x0,-0x18(%rbp)
movl $0x0,-0x14(%rbp)
mov -0x14(%rbp),%eax
movslq %eax,%rbx
mov ... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEc:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 28h
mov [rbp+var_28], rdi
mov eax, esi
mov [rbp+var_2C], al
mov [rbp+var_18], 0
mov [rbp+var_14], 0
jmp short loc_1399
loc_136F:
mov eax, [rbp+var_14]
movsxd rdx, eax... | long long func0(long long a1, char a2)
{
unsigned int v3; // [rsp+18h] [rbp-18h]
int i; // [rsp+1Ch] [rbp-14h]
v3 = 0;
for ( i = 0; i < (unsigned long long)std::string::length(a1); ++i )
{
if ( a2 == *(_BYTE *)std::string::operator[](a1, i) )
++v3;
}
return v3;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x28
MOV qword ptr [RBP + -0x28],RDI
MOV EAX,ESI
MOV byte ptr [RBP + -0x2c],AL
MOV dword ptr [RBP + -0x18],0x0
MOV dword ptr [RBP + -0x14],0x0
JMP 0x00101399
LAB_0010136f:
MOV EAX,dword ptr [RBP + -0x14]
MOVSXD RDX,EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RSI,RDX
MOV ... | /* func0(std::string, char) */
int func0(ulong param_1,char param_2)
{
char *pcVar1;
ulong uVar2;
int4 local_20;
int4 local_1c;
local_20 = 0;
local_1c = 0;
while( true ) {
uVar2 = std::string::length();
if (uVar2 <= (ulong)(long)local_1c) break;
pcVar1 = (char *)std::string::operator[](pa... |
813 | func0 |
#include <iostream>
#include <string>
#include <assert.h>
| int func0(std::string s, char c) {
int res = 0;
for (int i = 0; i < s.length(); i++) {
if (s[i] == c) {
res += 1;
}
}
return res;
}
| int main() {
assert(func0("abcc", 'c') == 2);
assert(func0("ababca", 'a') == 3);
assert(func0("mnmm0pm", 'm') == 4);
return 0;
}
| O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char):
endbr64
mov %rdi,%rax
mov 0x8(%rdi),%rdi
test %rdi,%rdi
je 125b <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEc+0x32>
mov (%rax),%rax
add %rax,%rdi
mov $0x0,%edx
cmp %sil,(%rax)
sete %c... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEc:
endbr64
mov rdx, [rdi+8]
test rdx, rdx
jz short loc_1239
mov rax, [rdi]
lea rdi, [rax+rdx]
mov edx, 0
loc_1222:
cmp [rax], sil
setz cl
movzx ecx, cl
add edx, ecx
add rax, 1
cmp rdi, rax
jnz short loc_1222
loc... | long long func0(_QWORD *a1, unsigned __int8 a2)
{
long long v2; // rdx
_BYTE *v3; // rax
_BYTE *v4; // rdi
unsigned int v5; // edx
v2 = a1[1];
if ( v2 )
{
v3 = (_BYTE *)*a1;
v4 = (_BYTE *)(*a1 + v2);
v5 = 0;
do
v5 += *v3++ == a2;
while ( v4 != v3 );
}
else
{
return 0;... | func0:
ENDBR64
MOV RDX,qword ptr [RDI + 0x8]
TEST RDX,RDX
JZ 0x00101239
MOV RAX,qword ptr [RDI]
LEA RDI,[RAX + RDX*0x1]
MOV EDX,0x0
LAB_00101222:
CMP byte ptr [RAX],SIL
SETZ CL
MOVZX ECX,CL
ADD EDX,ECX
ADD RAX,0x1
CMP RDI,RAX
JNZ 0x00101222
LAB_00101236:
MOV EAX,EDX
RET
LAB_00101239:
MOV EDX,0x0
JMP 0x00101236 | /* func0(std::string, char) */
int func0(int8 *param_1,char param_2)
{
char *pcVar1;
char *pcVar2;
int iVar3;
if (param_1[1] == 0) {
iVar3 = 0;
}
else {
pcVar2 = (char *)*param_1;
pcVar1 = pcVar2 + param_1[1];
iVar3 = 0;
do {
iVar3 = iVar3 + (uint)(*pcVar2 == param_2);
p... |
814 | func0 |
#include <iostream>
#include <string>
#include <assert.h>
| int func0(std::string s, char c) {
int res = 0;
for (int i = 0; i < s.length(); i++) {
if (s[i] == c) {
res += 1;
}
}
return res;
}
| int main() {
assert(func0("abcc", 'c') == 2);
assert(func0("ababca", 'a') == 3);
assert(func0("mnmm0pm", 'm') == 4);
return 0;
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char):
endbr64
mov 0x8(%rdi),%rcx
test %rcx,%rcx
je 1470 <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEc+0x40>
mov (%rdi),%rax
xor %r8d,%r8d
add %rax,%rcx
nopw %cs:0x0(%rax,%rax,1)
xor %edx,%edx
... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEc:
endbr64
mov rdx, [rdi+8]
test rdx, rdx
jz short loc_13E0
mov rax, [rdi]
lea rdi, [rdx+rax]
xor edx, edx
nop word ptr [rax+rax+00000000h]
loc_13C0:
xor ecx, ecx
cmp sil, [rax]
setz cl
add rax, 1
add edx, ecx
cmp... | long long func0(_QWORD *a1, char a2)
{
long long v2; // rdx
_BYTE *v3; // rax
_BYTE *v4; // rdi
unsigned int v5; // edx
int v6; // ecx
v2 = a1[1];
if ( !v2 )
return 0LL;
v3 = (_BYTE *)*a1;
v4 = (_BYTE *)(v2 + *a1);
v5 = 0;
do
{
v6 = a2 == *v3++;
v5 += v6;
}
while ( v4 != v3 );
... | func0:
ENDBR64
MOV RDX,qword ptr [RDI + 0x8]
TEST RDX,RDX
JZ 0x001013e0
MOV RAX,qword ptr [RDI]
LEA RDI,[RDX + RAX*0x1]
XOR EDX,EDX
NOP word ptr CS:[RAX + RAX*0x1]
LAB_001013c0:
XOR ECX,ECX
CMP SIL,byte ptr [RAX]
SETZ CL
ADD RAX,0x1
ADD EDX,ECX
CMP RDI,RAX
JNZ 0x001013c0
MOV EAX,EDX
RET
LAB_001013e0:
XOR EDX,EDX
MOV EA... | /* func0(std::string, char) */
int func0(int8 *param_1,char param_2)
{
char *pcVar1;
char cVar2;
char *pcVar3;
int iVar4;
if (param_1[1] != 0) {
pcVar3 = (char *)*param_1;
pcVar1 = pcVar3 + param_1[1];
iVar4 = 0;
do {
cVar2 = *pcVar3;
pcVar3 = pcVar3 + 1;
iVar4 = iVar4 +... |
815 | func0 |
#include <iostream>
#include <string>
#include <assert.h>
| int func0(std::string s, char c) {
int res = 0;
for (int i = 0; i < s.length(); i++) {
if (s[i] == c) {
res += 1;
}
}
return res;
}
| int main() {
assert(func0("abcc", 'c') == 2);
assert(func0("ababca", 'a') == 3);
assert(func0("mnmm0pm", 'm') == 4);
return 0;
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char):
endbr64
mov 0x8(%rdi),%rdx
test %rdx,%rdx
je 1dc0 <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEc+0x2a0>
lea -0x1(%rdx),%rax
mov (%rdi),%rcx
cmp $0xe,%rax
jbe 1dc3 <_Z5func0NSt7__cxx1112basi... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEc:
endbr64
mov ecx, esi
mov rsi, [rdi+8]
test rsi, rsi
jz loc_1C28
lea rax, [rsi-1]
mov rdi, [rdi]
cmp rax, 0Eh
jbe loc_1C2B
movd xmm4, ecx
mov rdx, rsi
pxor xmm1, xmm1
mov rax, rdi
punpcklbw xmm4, xmm4
pxor xmm... | long long func0(const __m128i **a1, unsigned int a2)
{
const __m128i *v3; // rsi
const __m128i *v4; // rdi
__m128i v5; // xmm4
__m128i v6; // xmm1
const __m128i *v7; // rax
__m128i v8; // xmm4
unsigned long long v9; // rdx
__m128i v10; // xmm4
__m128i v11; // xmm0
__m128i v12; // xmm0
__m128i v13... | func0:
ENDBR64
MOV ECX,ESI
MOV RSI,qword ptr [RDI + 0x8]
TEST RSI,RSI
JZ 0x00101c28
LEA RAX,[RSI + -0x1]
MOV RDI,qword ptr [RDI]
CMP RAX,0xe
JBE 0x00101c2b
MOVD XMM4,ECX
MOV RDX,RSI
PXOR XMM1,XMM1
MOV RAX,RDI
PUNPCKLBW XMM4,XMM4
PXOR XMM6,XMM6
PXOR XMM5,XMM5
AND RDX,-0x10
PUNPCKLWD XMM4,XMM4
LEA R8,[RDX + RDI*0x1]
PSHU... | /* func0(std::string, char) */
int func0(long *param_1,char param_2)
{
ulong uVar1;
char *pcVar2;
bool bVar3;
bool bVar4;
bool bVar5;
bool bVar6;
bool bVar7;
bool bVar8;
bool bVar9;
bool bVar10;
char *pcVar11;
char *pcVar12;
char *pcVar13;
char *pcVar14;
char *pcVar15;
char *pcVar16;
... |
816 | func0 |
#include <tuple>
#include <vector>
#include <cassert>
#include <iostream>
| std::tuple<int, int, int, int, int, int> func0(const std::tuple<int, int, int, int, int, int>& test_tup) {
std::vector<int> temp;
temp.push_back(~std::get<0>(test_tup));
temp.push_back(~std::get<1>(test_tup));
temp.push_back(~std::get<2>(test_tup));
temp.push_back(~std::get<3>(test_tup));
... | int main() {
assert(func0(std::make_tuple(7, 8, 9, 1, 10, 7)) == std::make_tuple(-8, -9, -10, -2, -11, -8));
assert(func0(std::make_tuple(2, 4, 5, 6, 1, 7)) == std::make_tuple(-3, -5, -6, -7, -2, -8));
assert(func0(std::make_tuple(8, 9, 11, 14, 12, 13)) == std::make_tuple(-9, -10, -12, -15, -13, -14));
... | O0 | cpp | func0(std::tuple<int, int, int, int, int, int> const&):
endbr64
push %rbp
mov %rsp,%rbp
push %r15
push %r14
push %r13
push %r12
push %rbx
sub $0x48,%rsp
mov %rdi,-0x68(%rbp)
mov %rsi,-0x70(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x38(%rbp)
xor %eax,%eax
lea -0x50(%rbp),%rax
mov %rax,%rd... | _Z5func0RKSt5tupleIJiiiiiiEE:
endbr64
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov [rbp+var_68], rdi
mov [rbp+var_70], rsi
mov rax, fs:28h
mov [rbp+var_38], rax
xor eax, eax
lea rax, [rbp+var_50]
mov rdi, rax
call _ZNSt6vect... | long long func0(long long a1, long long a2)
{
long long v2; // rbx
int v3; // r15d
int v4; // r14d
int v5; // r13d
int v6; // r12d
int v7; // esi
int v9; // [rsp+1Ch] [rbp-54h] BYREF
_BYTE v10[24]; // [rsp+20h] [rbp-50h] BYREF
unsigned long long v11; // [rsp+38h] [rbp-38h]
v11 = __readfsqword(0x28... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RBP + -0x68],RDI
MOV qword ptr [RBP + -0x70],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x38],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x50]
MOV RDI,RAX
CALL 0x00101846
MOV RAX,qword ptr [RBP + -0x70]
MOV RDI,... | /* func0(std::tuple<int, int, int, int, int, int> const&) */
tuple * func0(tuple *param_1)
{
type *ptVar1;
type *ptVar2;
type *ptVar3;
type *ptVar4;
type *ptVar5;
type *ptVar6;
int8 uVar7;
int8 uVar8;
int8 uVar9;
int8 uVar10;
int8 uVar11;
int8 uVar12;
tuple *in_RSI;
long in_FS_OFFSET;
ui... |
817 | func0 |
#include <tuple>
#include <vector>
#include <cassert>
#include <iostream>
| std::tuple<int, int, int, int, int, int> func0(const std::tuple<int, int, int, int, int, int>& test_tup) {
std::vector<int> temp;
temp.push_back(~std::get<0>(test_tup));
temp.push_back(~std::get<1>(test_tup));
temp.push_back(~std::get<2>(test_tup));
temp.push_back(~std::get<3>(test_tup));
... | int main() {
assert(func0(std::make_tuple(7, 8, 9, 1, 10, 7)) == std::make_tuple(-8, -9, -10, -2, -11, -8));
assert(func0(std::make_tuple(2, 4, 5, 6, 1, 7)) == std::make_tuple(-3, -5, -6, -7, -2, -8));
assert(func0(std::make_tuple(8, 9, 11, 14, 12, 13)) == std::make_tuple(-9, -10, -12, -15, -13, -14));
... | O1 | cpp | func0(std::tuple<int, int, int, int, int, int> const&):
endbr64
push %rbp
push %rbx
sub $0x38,%rsp
mov %rdi,%rbx
mov %rsi,%rbp
mov %fs:0x28,%rax
mov %rax,0x28(%rsp)
xor %eax,%eax
movq $0x0,0x10(%rsp)
movq $0x0,0x18(%rsp)
movq $0x0,0x20(%rsp)
mov 0x14(%rsi),%eax
not %eax
mov %eax,0xc... | _Z5func0RKSt5tupleIJiiiiiiEE:
endbr64
push rbp
push rbx
sub rsp, 38h
mov rbx, rdi
mov rbp, rsi
mov rax, fs:28h
mov [rsp+48h+var_20], rax
xor eax, eax
mov [rsp+48h+var_38], 0
mov [rsp+48h+var_30], 0
mov [rsp+48h+var_28], 0
mov eax, [rsi+14h]
not eax
mov [rsp+48h+var_... | _DWORD * func0(_DWORD *a1, _DWORD *a2)
{
_DWORD *v3; // rdi
int v5; // [rsp+Ch] [rbp-3Ch] BYREF
void *v6[2]; // [rsp+10h] [rbp-38h] BYREF
long long v7; // [rsp+20h] [rbp-28h]
unsigned long long v8; // [rsp+28h] [rbp-20h]
v8 = __readfsqword(0x28u);
v6[0] = 0LL;
v6[1] = 0LL;
v7 = 0LL;
v5 = ~a2[5];
... | func0:
ENDBR64
PUSH RBP
PUSH RBX
SUB RSP,0x38
MOV RBX,RDI
MOV RBP,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x28],RAX
XOR EAX,EAX
MOV qword ptr [RSP + 0x10],0x0
MOV qword ptr [RSP + 0x18],0x0
MOV qword ptr [RSP + 0x20],0x0
MOV EAX,dword ptr [RSI + 0x14]
NOT EAX
MOV dword ptr [RSP + 0xc],EAX
LEA RSI,[RSP + 0x... | /* func0(std::tuple<int, int, int, int, int, int> const&) */
tuple * func0(tuple *param_1)
{
uint *in_RSI;
long in_FS_OFFSET;
uint local_3c;
int4 *local_38;
int8 local_30;
long local_28;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
local_38 = (int4 *)0x0;
local_30 = 0;
local_28 =... |
818 | func0 |
#include <tuple>
#include <vector>
#include <cassert>
#include <iostream>
| std::tuple<int, int, int, int, int, int> func0(const std::tuple<int, int, int, int, int, int>& test_tup) {
std::vector<int> temp;
temp.push_back(~std::get<0>(test_tup));
temp.push_back(~std::get<1>(test_tup));
temp.push_back(~std::get<2>(test_tup));
temp.push_back(~std::get<3>(test_tup));
... | int main() {
assert(func0(std::make_tuple(7, 8, 9, 1, 10, 7)) == std::make_tuple(-8, -9, -10, -2, -11, -8));
assert(func0(std::make_tuple(2, 4, 5, 6, 1, 7)) == std::make_tuple(-3, -5, -6, -7, -2, -8));
assert(func0(std::make_tuple(8, 9, 11, 14, 12, 13)) == std::make_tuple(-9, -10, -12, -15, -13, -14));
... | O2 | cpp | func0(std::tuple<int, int, int, int, int, int> const&):
endbr64
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
mov %rsi,%rbx
sub $0x38,%rsp
mov %fs:0x28,%rax
mov %rax,0x28(%rsp)
xor %eax,%eax
mov 0x14(%rsi),%eax
lea 0xc(%rsp),%r13
lea 0x10(%rsp),%rbp
movq $0x0,0x10(%rsp)
mov ... | _Z5func0RKSt5tupleIJiiiiiiEE:
endbr64
push r13
pxor xmm0, xmm0
push r12
push rbp
mov rbp, rsi
push rbx
mov rbx, rdi
sub rsp, 38h
mov rax, fs:28h
mov [rsp+58h+var_30], rax
xor eax, eax
mov eax, [rsi+14h]
lea r13, [rsp+58h+var_4C]
lea r12, [rsp+58h+var_48]
mov rdx, r... | _DWORD * func0(_DWORD *a1, int *a2)
{
int v4; // eax
char *v5; // rsi
int *v6; // rax
int v7; // edx
int v8; // edx
int *v9; // rsi
int v10; // edx
int v11; // edx
int *v12; // rsi
int v13; // edx
int v14; // edx
int *v15; // rsi
int v16; // edx
int v17; // edx
int *v18; // rsi
int v19; ... | func0:
ENDBR64
PUSH R13
PXOR XMM0,XMM0
PUSH R12
PUSH RBP
MOV RBP,RSI
PUSH RBX
MOV RBX,RDI
SUB RSP,0x38
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x28],RAX
XOR EAX,EAX
MOV EAX,dword ptr [RSI + 0x14]
LEA R13,[RSP + 0xc]
LEA R12,[RSP + 0x10]
MOV RDX,R13
XOR ESI,ESI
MOV RDI,R12
MOVAPS xmmword ptr [RSP + 0x10],XMM0
M... | /* func0(std::tuple<int, int, int, int, int, int> const&) */
tuple * func0(tuple *param_1)
{
uint *in_RSI;
long in_FS_OFFSET;
uint local_4c;
int4 *local_48;
uint *puStack_40;
uint *local_38;
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
local_48 = (int4 *)0x0;
puStack_40 = (uint *)0... |
819 | func0 |
#include <tuple>
#include <vector>
#include <cassert>
#include <iostream>
| std::tuple<int, int, int, int, int, int> func0(const std::tuple<int, int, int, int, int, int>& test_tup) {
std::vector<int> temp;
temp.push_back(~std::get<0>(test_tup));
temp.push_back(~std::get<1>(test_tup));
temp.push_back(~std::get<2>(test_tup));
temp.push_back(~std::get<3>(test_tup));
... | int main() {
assert(func0(std::make_tuple(7, 8, 9, 1, 10, 7)) == std::make_tuple(-8, -9, -10, -2, -11, -8));
assert(func0(std::make_tuple(2, 4, 5, 6, 1, 7)) == std::make_tuple(-3, -5, -6, -7, -2, -8));
assert(func0(std::make_tuple(8, 9, 11, 14, 12, 13)) == std::make_tuple(-9, -10, -12, -15, -13, -14));
... | O3 | cpp | func0(std::tuple<int, int, int, int, int, int> const&):
endbr64
push %r13
pxor %xmm0,%xmm0
push %r12
mov %rdi,%r12
push %rbp
push %rbx
mov %rsi,%rbx
sub $0x38,%rsp
mov %fs:0x28,%rax
mov %rax,0x28(%rsp)
xor %eax,%eax
mov 0x14(%rsi),%eax
lea 0xc(%rsp),%r13
lea 0x10(%rsp),%rbp
mov %... | _Z5func0RKSt5tupleIJiiiiiiEE:
endbr64
push r13
pxor xmm0, xmm0
push r12
push rbp
mov rbp, rsi
push rbx
mov rbx, rdi
sub rsp, 38h
mov rax, fs:28h
mov [rsp+58h+var_30], rax
xor eax, eax
mov eax, [rsi+14h]
lea r13, [rsp+58h+var_4C]
lea r12, [rsp+58h+var_48]
mov rdx, r... | _DWORD * func0(_DWORD *a1, int *a2)
{
int v4; // eax
char *v5; // rsi
int *v6; // rcx
int v7; // eax
int v8; // eax
int *v9; // rsi
int v10; // eax
int v11; // eax
int *v12; // rsi
int v13; // eax
int v14; // eax
int *v15; // rsi
int v16; // eax
int v17; // edx
int *v18; // rax
int v19; ... | func0:
ENDBR64
PUSH R13
PXOR XMM0,XMM0
PUSH R12
PUSH RBP
MOV RBP,RSI
PUSH RBX
MOV RBX,RDI
SUB RSP,0x38
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x28],RAX
XOR EAX,EAX
MOV EAX,dword ptr [RSI + 0x14]
LEA R13,[RSP + 0xc]
LEA R12,[RSP + 0x10]
MOV RDX,R13
XOR ESI,ESI
MOV RDI,R12
MOVAPS xmmword ptr [RSP + 0x10],XMM0
M... | /* func0(std::tuple<int, int, int, int, int, int> const&) */
tuple * func0(tuple *param_1)
{
uint *in_RSI;
long in_FS_OFFSET;
uint local_4c;
int4 *local_48;
uint *puStack_40;
uint *local_38;
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
local_48 = (int4 *)0x0;
puStack_40 = (uint *)0... |
820 | func0 |
#include <tuple>
#include <vector>
#include <string>
#include <cassert>
| std::vector<std::string> func0(const std::vector<std::string>& test_vec) {
std::vector<std::string> res;
for (int i = 0; i < test_vec.size() - 1; i++) {
res.push_back(test_vec[i] + test_vec[i + 1]);
}
return res;
}
| int main() {
assert(
(func0({"DSP ", "IS ", "BEST ", "FOR ", "ALL ", "UTS"}) ==
std::vector<std::string>{"DSP IS ", "IS BEST ", "BEST FOR ", "FOR ALL ", "ALL UTS"})
);
assert(
(func0({"RES ", "IS ", "BEST ", "FOR ", "ALL ", "QESR"}) ==
std::vector<std::string>{"RES IS ... | 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 $0x58,%rsp
mov %rdi,-0x58(%rbp)
mov %rsi,-0x60(%rbp... | _Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 58h
mov [rbp+var_58], rdi
mov [rbp+var_60], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_58]
mov rdi, rax
call _ZNSt6... | long long func0(long long a1, long long a2)
{
long long v2; // rbx
long long v3; // rax
int i; // [rsp+1Ch] [rbp-44h]
_BYTE v6[40]; // [rsp+20h] [rbp-40h] BYREF
unsigned long long v7; // [rsp+48h] [rbp-18h]
v7 = __readfsqword(0x28u);
std::vector<std::string>::vector(a1);
for ( i = 0; i < (unsigned lon... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x58
MOV qword ptr [RBP + -0x58],RDI
MOV qword ptr [RBP + -0x60],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x58]
MOV RDI,RAX
CALL 0x00103338
MOV dword ptr [RBP + -0x44],0x0
JMP 0x001025ea
LAB_00102582:
MOV E... | /* func0(std::vector<std::string, std::allocator<std::string > > const&) */
vector * func0(vector *param_1)
{
int8 uVar1;
int8 uVar2;
long lVar3;
vector<std::string,std::allocator<std::string>> *in_RSI;
long in_FS_OFFSET;
int local_4c;
string local_48 [40];
long local_20;
local_20 = *(long *)(in_... |
821 | func0 |
#include <tuple>
#include <vector>
#include <string>
#include <cassert>
| std::vector<std::string> func0(const std::vector<std::string>& test_vec) {
std::vector<std::string> res;
for (int i = 0; i < test_vec.size() - 1; i++) {
res.push_back(test_vec[i] + test_vec[i + 1]);
}
return res;
}
| int main() {
assert(
(func0({"DSP ", "IS ", "BEST ", "FOR ", "ALL ", "UTS"}) ==
std::vector<std::string>{"DSP IS ", "IS BEST ", "BEST FOR ", "FOR ALL ", "ALL UTS"})
);
assert(
(func0({"RES ", "IS ", "BEST ", "FOR ", "ALL ", "QESR"}) ==
std::vector<std::string>{"RES IS ... | 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 %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x30,%rsp
mov %rdi,%rbx
mov %fs... | _Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 48h
mov rbx, rdi
mov rax, fs:28h
mov [rsp+78h+var_40], rax
xor eax, eax
mov qword ptr [rdi], 0
mov qword ptr [rdi+8], 0
m... | _QWORD * func0(_QWORD *a1, long long *a2)
{
long long v2; // rdx
unsigned long long v4; // rbp
void **v5; // rsi
_QWORD *v6; // rdx
unsigned int v7; // eax
unsigned long long v8; // r8
char *v9; // rdx
char *v10; // rcx
unsigned int v11; // eax
unsigned int v12; // eax
unsigned int v13; // edx
l... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x48
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
MOV qword ptr [RDI],0x0
MOV qword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
MOV RDX,qword ptr [RSI]
MOV RAX,qword ptr [RSI + 0x8]
SUB RAX,RDX
CMP ... | /* func0(std::vector<std::string, std::allocator<std::string > > const&) */
vector * func0(vector *param_1)
{
ulong *puVar1;
ulong *puVar2;
long *plVar3;
ulong uVar4;
ulong uVar5;
ulong uVar6;
uint uVar7;
int8 uVar8;
ulong uVar9;
uint uVar10;
long lVar11;
ulong uVar12;
long *in_RSI;
long i... |
822 | func0 |
#include <tuple>
#include <vector>
#include <string>
#include <cassert>
| std::vector<std::string> func0(const std::vector<std::string>& test_vec) {
std::vector<std::string> res;
for (int i = 0; i < test_vec.size() - 1; i++) {
res.push_back(test_vec[i] + test_vec[i + 1]);
}
return res;
}
| int main() {
assert(
(func0({"DSP ", "IS ", "BEST ", "FOR ", "ALL ", "UTS"}) ==
std::vector<std::string>{"DSP IS ", "IS BEST ", "BEST FOR ", "FOR ALL ", "ALL UTS"})
);
assert(
(func0({"RES ", "IS ", "BEST ", "FOR ", "ALL ", "QESR"}) ==
std::vector<std::string>{"RES IS ... | O2 | cpp | func0(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x38,%rs... | _Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
push r12
push rbp
push rbx
mov rbx, rdi
sub rsp, 58h
mov rax, fs:28h
mov [rsp+88h+var_40], rax
xor eax, eax
movups xmmword ptr [rdi], xmm0
mov ... | long long func0(long long a1, long long *a2)
{
long long v3; // rdx
long long v4; // rax
unsigned long long v6; // rbp
_QWORD *v7; // rdx
void *v8; // rax
long long *v9; // rax
long long v10; // rdi
unsigned long long v11; // r12
unsigned long long v12; // r13
long long v13; // rcx
void **v14; //... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV RBX,RDI
SUB RSP,0x58
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x48],RAX
XOR EAX,EAX
MOVUPS xmmword ptr [RDI],XMM0
MOV RDX,qword ptr [RSI]
MOV RAX,qword ptr [RSI + 0x8]
LEA RCX,[RSP + 0x20]
MOV qword ptr [RDI + 0x10],0x0
SUB ... | /* func0(std::vector<std::string, std::allocator<std::string > > const&) */
vector * func0(vector *param_1)
{
ulong *puVar1;
ulong *puVar2;
long lVar3;
ulong uVar4;
ulong uVar5;
ulong uVar6;
long *plVar7;
uint uVar8;
uint uVar9;
long lVar10;
ulong uVar11;
long *in_RSI;
ulong uVar12;
long i... |
823 | func0 |
#include <tuple>
#include <vector>
#include <string>
#include <cassert>
| std::vector<std::string> func0(const std::vector<std::string>& test_vec) {
std::vector<std::string> res;
for (int i = 0; i < test_vec.size() - 1; i++) {
res.push_back(test_vec[i] + test_vec[i + 1]);
}
return res;
}
| int main() {
assert(
(func0({"DSP ", "IS ", "BEST ", "FOR ", "ALL ", "UTS"}) ==
std::vector<std::string>{"DSP IS ", "IS BEST ", "BEST FOR ", "FOR ALL ", "ALL UTS"})
);
assert(
(func0({"RES ", "IS ", "BEST ", "FOR ", "ALL ", "QESR"}) ==
std::vector<std::string>{"RES IS ... | O3 | cpp | func0(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&):
endbr64
push %r15
pxor %xmm0,%xmm0
push %r14
push %r13
mov %rdi,%r13
push %r12
push %rbp
push %r... | _Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
push r12
push rbp
push rbx
mov rbx, rdi
sub rsp, 58h
mov rax, fs:28h
mov [rsp+88h+var_40], rax
xor eax, eax
movups xmmword ptr [rdi], xmm0
mov ... | long long func0(long long a1, long long *a2)
{
long long v3; // rdx
long long v4; // rax
unsigned long long v6; // rbp
_QWORD *v7; // rdx
void *v8; // rax
long long *v9; // rcx
long long *v10; // rax
unsigned long long v11; // r13
unsigned long long v12; // r12
long long v13; // rcx
long long v14... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV RBX,RDI
SUB RSP,0x58
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x48],RAX
XOR EAX,EAX
MOVUPS xmmword ptr [RDI],XMM0
MOV RDX,qword ptr [RSI]
MOV RAX,qword ptr [RSI + 0x8]
LEA RCX,[RSP + 0x20]
MOV qword ptr [RDI + 0x10],0x0
SUB ... | /* func0(std::vector<std::string, std::allocator<std::string > > const&) */
vector * func0(vector *param_1)
{
ulong *puVar1;
ulong *puVar2;
long lVar3;
ulong uVar4;
ulong uVar5;
ulong uVar6;
long *plVar7;
uint uVar8;
uint uVar9;
long lVar10;
ulong uVar11;
long *in_RSI;
ulong uVar12;
long i... |
824 | func0 |
#include <iostream>
#include <vector>
#include <assert.h>
| int func0(const std::string& str) {
int n = str.length();
std::vector<std::vector<int>> dp(n+1, std::vector<int>(n+1, 0));
for (int i = 1; i <= n; ++i) {
for (int j = 1; j <= n; ++j) {
if (str[i-1] == str[j-1] && i != j) {
dp[i][j] = 1 + dp[i-1][j-1];
... | int main() {
assert(func0("AABEBCDD") == 3);
assert(func0("aabb") == 2);
assert(func0("aab") == 1);
return 0;
}
| O0 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x78,%rsp
mov %rdi,-0x78(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x78(%rbp),%rax
mov %rax,%rdi
callq 2360 <_ZNKSt7__cxx1112ba... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 88h
mov [rbp+var_88], rdi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_88]
mov rdi, rax
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcES... | long long func0(long long a1)
{
char v1; // bl
long long v3; // rax
int v4; // ebx
long long v5; // rax
long long v6; // rax
long long v7; // rbx
long long v8; // rax
long long v9; // rax
long long v10; // rax
unsigned int v11; // ebx
char v13; // [rsp+1Eh] [rbp-72h] BYREF
char v14; // [rsp+1Fh... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x88
MOV qword ptr [RBP + -0x88],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x88]
MOV RDI,RAX
CALL 0x00102320
MOV dword ptr [RBP + -0x64],EAX
LEA RAX,[RBP + -0x71]
MOV qword ptr [RBP + -0x58],RAX
NOP
NOP
LEA ... | /* func0(std::string const&) */
int4 func0(string *param_1)
{
char cVar1;
int iVar2;
int4 uVar3;
bool bVar4;
char *pcVar5;
int *piVar6;
int *piVar7;
vector<int,std::allocator<int>> *pvVar8;
int4 *puVar9;
long in_FS_OFFSET;
allocator local_7a;
allocator local_79;
int local_78;
int local_74;... |
825 | func0 |
#include <iostream>
#include <vector>
#include <assert.h>
| int func0(const std::string& str) {
int n = str.length();
std::vector<std::vector<int>> dp(n+1, std::vector<int>(n+1, 0));
for (int i = 1; i <= n; ++i) {
for (int j = 1; j <= n; ++j) {
if (str[i-1] == str[j-1] && i != j) {
dp[i][j] = 1 + dp[i-1][j-1];
... | int main() {
assert(func0("AABEBCDD") == 3);
assert(func0("aabb") == 2);
assert(func0("aab") == 1);
return 0;
}
| O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x28,%rsp
mov 0x8(%rdi),%rax
mov %rax,0x18(%rsp)
lea 0x1(%rax),%r12d
movslq %r12d,%r12
movabs $0x1fffffffffffffff,%rax
cmp %r... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 38h
mov rax, fs:28h
mov [rsp+68h+var_40], rax
xor eax, eax
mov r13, [rdi+8]
lea ebp, [r13+1]
movsxd rbp, ebp
mov rax, rbp
shr rax, 3Dh... | long long func0(_QWORD *a1)
{
long long v1; // r13
unsigned long long v2; // rbp
_DWORD *v4; // rax
void *v5; // r14
_DWORD *v6; // rdx
long long v7; // rbp
_QWORD *v8; // rdi
long long v9; // r10
int v10; // r11d
_DWORD *v11; // rsi
long long v12; // r9
long long v13; // rax
long long v14; /... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x38
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x28],RAX
XOR EAX,EAX
MOV R13,qword ptr [RDI + 0x8]
LEA EBP,[R13 + 0x1]
MOVSXD RBP,EBP
MOV RAX,RBP
SHR RAX,0x3d
JNZ 0x001013b7
MOV RBX,RDI
TEST RBP,RBP
JZ 0x00101551
LEA R15,[RBP*0x4]
MOV q... | /* func0(std::string const&) */
int4 func0(string *param_1)
{
int *piVar1;
int4 uVar2;
ulong uVar3;
void *pvVar4;
int iVar5;
int4 *puVar6;
int4 *puVar7;
vector *pvVar8;
ulong uVar9;
vector *pvVar10;
long lVar11;
ulong uVar12;
int *piVar13;
vector *pvVar14;
long lVar15;
long lVar16;
i... |
826 | func0 |
#include <iostream>
#include <vector>
#include <assert.h>
| int func0(const std::string& str) {
int n = str.length();
std::vector<std::vector<int>> dp(n+1, std::vector<int>(n+1, 0));
for (int i = 1; i <= n; ++i) {
for (int j = 1; j <= n; ++j) {
if (str[i-1] == str[j-1] && i != j) {
dp[i][j] = 1 + dp[i-1][j-1];
... | int main() {
assert(func0("AABEBCDD") == 3);
assert(func0("aabb") == 2);
assert(func0("aab") == 1);
return 0;
}
| 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
push %rbp
push %rbx
sub $0x38,%rsp
mov 0x8(%rdi),%rax
mov %rdi,0x20(%rsp)
mov %rax,0x10(%rsp)
add $0x1,%eax
mov %eax,0xc(%rsp)
movslq %eax,%rbp
mov... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 48h
mov r14, [rdi+8]
mov rax, fs:28h
mov [rsp+78h+var_40], rax
xor eax, eax
lea ebx, [r14+1]
movsxd rbp, ebx
mov rax, rbp
shr rax, 3Dh... | long long func0(_QWORD *a1)
{
long long v1; // r14
int v2; // ebx
long long *v3; // r15
long long v4; // rbp
_BYTE *v5; // r11
long long *v6; // rsi
int v7; // r13d
long long v8; // r12
_BYTE *v9; // r9
long long v10; // r10
long long v11; // r14
long long v12; // rax
long long v13; // rdx
... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x48
MOV R14,qword ptr [RDI + 0x8]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
LEA EBX,[R14 + 0x1]
MOVSXD RBP,EBX
MOV RAX,RBP
SHR RAX,0x3d
JNZ 0x00101715
LEA RAX,[RBP + RBP*0x2]
PXOR XMM0,XMM0
SHL RAX,0x3
MOVUPS xmmw... | /* func0(std::string const&) */
int4 func0(string *param_1)
{
long lVar1;
int *piVar2;
ulong __n;
int iVar3;
int iVar4;
int4 uVar5;
char *pcVar6;
long lVar7;
long lVar8;
int iVar9;
ulong uVar10;
void *pvVar11;
vector *pvVar12;
vector *pvVar13;
long lVar14;
ulong uVar15;
vector *pvVar... |
827 | func0 |
#include <iostream>
#include <vector>
#include <assert.h>
| int func0(const std::string& str) {
int n = str.length();
std::vector<std::vector<int>> dp(n+1, std::vector<int>(n+1, 0));
for (int i = 1; i <= n; ++i) {
for (int j = 1; j <= n; ++j) {
if (str[i-1] == str[j-1] && i != j) {
dp[i][j] = 1 + dp[i-1][j-1];
... | int main() {
assert(func0("AABEBCDD") == 3);
assert(func0("aabb") == 2);
assert(func0("aab") == 1);
return 0;
}
| 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
push %rbp
push %rbx
sub $0x28,%rsp
mov 0x8(%rdi),%rax
mov %rdi,0x10(%rsp)
lea 0x1(%rax),%r13d
mov %rax,0x8(%rsp)
movabs $0x1fffffffffffffff,%rax
movsl... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 48h
mov r13, [rdi+8]
mov rax, fs:28h
mov [rsp+78h+var_40], rax
xor eax, eax
lea ebp, [r13+1]
movsxd rbx, ebp
mov rax, rbx
shr rax, 3Dh... | long long func0(_QWORD *a1)
{
long long v1; // r13
int v2; // ebp
unsigned long long v3; // r14
long long *v4; // r12
long long v5; // rbx
_BYTE *v6; // r8
long long *v7; // r11
int v8; // r10d
long long v9; // r9
_BYTE *v10; // rsi
long long v11; // rcx
long long v12; // rdi
long long v13; /... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x48
MOV R13,qword ptr [RDI + 0x8]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
LEA EBP,[R13 + 0x1]
MOVSXD RBX,EBP
MOV RAX,RBX
SHR RAX,0x3d
JNZ 0x0010170c
PXOR XMM0,XMM0
LEA R14,[RBX + RBX*0x2]
MOVUPS xmmword ptr [RSP... | /* func0(std::string const&) */
int4 func0(string *param_1)
{
ulong __n;
int iVar1;
int4 uVar2;
char *pcVar3;
long lVar4;
long lVar5;
int iVar6;
void *pvVar7;
vector *pvVar8;
vector *pvVar9;
int iVar10;
ulong uVar11;
char *pcVar12;
int iVar13;
vector *pvVar14;
ulong uVar15;
long in_F... |
828 | func0 |
#include <iostream>
#include <regex>
#include <cassert>
| bool func0(const std::string& num) {
std::regex num_fetch(R"(^[0-9]+(\.[0-9]{1,2})?$)");
return std::regex_search(num, num_fetch);
}
| int main() {
assert(func0("123.11") == true);
assert(func0("0.21") == true);
assert(func0("123.1214") == false);
return 0;
}
| O0 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x48,%rsp
mov %rdi,-0x48(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
lea -0x40(%rbp),%rax
mov $0x10,%edx
lea 0x2b3f0(%rip),%rsi
mov ... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 48h
mov [rbp+var_48], rdi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_40]
mov edx, 10h
lea rcx, a090912; "^[0-9]+(\\.[0-9]{1,2})?$"
mov r... | long long func0(long long a1)
{
unsigned int v1; // ebx
_BYTE v3[40]; // [rsp+10h] [rbp-40h] BYREF
unsigned long long v4; // [rsp+38h] [rbp-18h]
v4 = __readfsqword(0x28u);
std::basic_regex<char,std::regex_traits<char>>::basic_regex(v3, "^[0-9]+(\\.[0-9]{1,2})?$", 16LL);
v1 = std::regex_search<std::char_tr... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RBP + -0x48],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x40]
MOV EDX,0x10
LEA RCX,[0x132051]
MOV RSI,RCX
MOV RDI,RAX
LAB_00104b3f:
CALL 0x00106074
LEA RCX,[RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x... | /* func0(std::string const&) */
ulong func0(string *param_1)
{
bool bVar1;
int7 extraout_var;
long in_FS_OFFSET;
regex local_48 [40];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
std::regex::basic_regex(local_48,"^[0-9]+(\\.[0-9]{1,2})?$",0x10);
/* try { // try from 0... |
829 | func0 |
#include <iostream>
#include <regex>
#include <cassert>
| bool func0(const std::string& num) {
std::regex num_fetch(R"(^[0-9]+(\.[0-9]{1,2})?$)");
return std::regex_search(num, num_fetch);
}
| int main() {
assert(func0("123.11") == true);
assert(func0("0.21") == true);
assert(func0("123.1214") == false);
return 0;
}
| O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r12
push %rbp
push %rbx
sub $0x50,%rsp
mov %rdi,%rbx
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
lea 0x20(%rsp),%r12
mov %r12,%rdi
callq 4730 <_ZNSt6localeC1Ev@plt>
movl $0x... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 50h
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea r14, [rbp+var_60]
lea rdi, [rbp+var_58]; this
call __ZNSt6localeC1Ev; std::locale::... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x50
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA R14,[RBP + -0x60]
LEA RDI,[RBP + -0x58]
CALL 0x001046f0
MOV qword ptr [RBP + -0x50],0x0
MOV qword ptr [RBP + -0x48],0x0
MOV ECX,0x10
LEA RDX,[0x1185f6]
LEA RSI,[RDX ... | /* func0(std::string const&) */
ulong func0(string *param_1)
{
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
_Sp_counted_base<(_Lock_policy)2> *p_Var2;
bool bVar3;
int iVar4;
int7 extraout_var;
long in_FS_OFFSET;
regex local_68 [8];
int local_60 [8];
int8 local_58;
_Sp_counted_base<(_Lock_policy)2> *... | |
830 | func0 |
#include <iostream>
#include <regex>
#include <cassert>
| bool func0(const std::string& num) {
std::regex num_fetch(R"(^[0-9]+(\.[0-9]{1,2})?$)");
return std::regex_search(num, num_fetch);
}
| int main() {
assert(func0("123.11") == true);
assert(func0("0.21") == true);
assert(func0("123.1214") == false);
return 0;
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r13
push %r12
push %rbp
push %rbx
mov %rdi,%rbx
sub $0x58,%rsp
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
lea 0x20(%rsp),%r12
lea 0x8(%rsp),%rbp
mov %r12,%rdi
callq 4750... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r14
push r12
lea r12, [rbp+var_70]
push rbx
mov rbx, rdi
sub rsp, 58h
mov rax, fs:28h
mov [rbp+var_28], rax
xor eax, eax
lea rax, [rbp+var_68]
mov rdi, rax; this
mov r14... | long long func0(long long *a1)
{
long long v2; // rdi
long long v3; // rsi
long long v4; // rsi
unsigned int v5; // r12d
long long v6; // rbx
long long v7; // rdx
volatile signed __int32 *v8; // rcx
signed __int32 v9; // eax
long long v11; // rax
long long v12; // rdi
_BYTE v13[8]; // [rsp+0h] [r... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH R12
LEA R12,[RBP + -0x70]
PUSH RBX
MOV RBX,RDI
SUB RSP,0x58
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x68]
MOV RDI,RAX
MOV R14,RAX
CALL 0x001036d0
LEA RDX,[0x1185f6]
PXOR XMM0,XMM0
MOV RDI,R12
MOV ECX,0x10
LEA RSI,[RDX + -0... | /* func0(std::string const&) */
ulong func0(string *param_1)
{
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
int8 uVar2;
bool bVar3;
int iVar4;
int7 extraout_var;
long in_FS_OFFSET;
regex local_78 [8];
int local_70 [8];
int local_68 [16];
int local_58 [16];
int local_48 [16];
long local_30;
... |
831 | func0 |
#include <iostream>
#include <regex>
#include <cassert>
| bool func0(const std::string& num) {
std::regex num_fetch(R"(^[0-9]+(\.[0-9]{1,2})?$)");
return std::regex_search(num, num_fetch);
}
| int main() {
assert(func0("123.11") == true);
assert(func0("0.21") == true);
assert(func0("123.1214") == false);
return 0;
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r13
push %r12
push %rbp
push %rbx
mov %rdi,%rbx
sub $0x58,%rsp
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
lea 0x20(%rsp),%r12
lea 0x8(%rsp),%rbp
mov %r12,%rdi
callq 47b0... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
push r14
mov r14, rdi
push r13
push r12
push rbp
push rbx
sub rsp, 2A8h
mov rax, fs:28h
mov [rsp+2D8h+var_40], rax
xor eax, eax
lea r12, [rsp+2D8h+var_2A0]
mov rdi, r12; this
call __ZNSt6loc... | long long func0(unsigned long long *a1)
{
__m128i v2; // xmm0
long long v3; // rdi
void *v4; // rdi
void **v5; // rbx
unsigned long long v6; // rbp
void *v7; // rdi
unsigned long long v8; // r13
unsigned long long v9; // rbx
long long v10; // rax
long long v11; // rcx
unsigned long long v12; // r... | func0:
ENDBR64
PUSH R15
PUSH R14
MOV R14,RDI
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x2a8
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x298],RAX
XOR EAX,EAX
LEA R12,[RSP + 0x38]
MOV RDI,R12
CALL 0x00104730
LEA RDX,[0x11a637]
PXOR XMM0,XMM0
LEA RDI,[RSP + 0x100]
MOV R8D,0x10
MOV RCX,R12
LEA RSI,[RDX + -0x17]
M... | /* func0(std::string const&) */
int8 func0(string *param_1)
{
ulong uVar1;
ulong uVar2;
int auVar3 [16];
bool bVar4;
char cVar5;
long lVar6;
int8 *puVar7;
int8 *puVar8;
ulong uVar9;
ulong *puVar10;
long lVar11;
ulong uVar12;
int8 uVar13;
int8 uVar14;
_Match_mode _Var15;
long in_FS_OFFS... |
832 | func0 | #include <cassert>
#include <vector>
#include <algorithm>
using namespace std;
void sift_down(vector<int>& heap, int start, int n) {
int i = start;
while (true) {
int left = 2 * i + 1;
int right = 2 * i + 2;
int smallest = i;
if (left < n && heap[left] < heap[smalle... | vector<int> func0(vector<int> heap, int a) {
int n = heap.size();
// Heapify: build a min-heap.
for (int i = n / 2 - 1; i >= 0; i--) {
sift_down(heap, i, n);
}
// Replace the smallest element (at index 0) with a and re-heapify.
heap[0] = a;
sift_down(heap, 0, n);
return ... | int main(){
{
vector<int> res = func0(vector<int>{25, 44, 68, 21, 39, 23, 89}, 21);
vector<int> expected = {21, 25, 23, 44, 39, 68, 89};
assert(res == expected);
}
{
vector<int> res = func0(vector<int>{25, 44, 68, 21, 39, 23, 89}, 110);
vector<int> expected = ... | O0 | cpp | func0(std::vector<int, std::allocator<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 -0x30(%rbp),%rax
mov %rax,%rdi
callq 1bbe <_ZNKSt6vectorIiSaIiEE4sizeEv>
mov %eax,-0x14(%rbp)
mov -0x14(%rbp),%e... | _Z5func0St6vectorIiSaIiEEi:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 38h
mov [rbp+var_28], rdi
mov [rbp+var_30], rsi
mov [rbp+var_34], edx
mov rax, [rbp+var_30]
mov rdi, rax
call _ZNKSt6vectorIiSaIiEE4sizeEv; std::vector<int>::size(void)
mov [rbp+var_14], eax
mov eax,... | long long func0(long long a1, long long a2, int a3)
{
int i; // [rsp+28h] [rbp-18h]
unsigned int v6; // [rsp+2Ch] [rbp-14h]
v6 = std::vector<int>::size(a2);
for ( i = (int)v6 / 2 - 1; i >= 0; --i )
sift_down(a2, (unsigned int)i, v6);
*(_DWORD *)std::vector<int>::operator[](a2, 0LL) = a3;
sift_down(a2,... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x38
MOV qword ptr [RBP + -0x28],RDI
MOV qword ptr [RBP + -0x30],RSI
MOV dword ptr [RBP + -0x34],EDX
MOV RAX,qword ptr [RBP + -0x30]
MOV RDI,RAX
CALL 0x00101c28
MOV dword ptr [RBP + -0x14],EAX
MOV EAX,dword ptr [RBP + -0x14]
MOV EDX,EAX
SHR EDX,0x1f
ADD EAX,EDX
SAR E... | /* func0(std::vector<int, std::allocator<int> >, int) */
vector<int,std::allocator<int>> *
func0(vector<int,std::allocator<int>> *param_1,vector<int,std::allocator<int>> *param_2,
int4 param_3)
{
int iVar1;
int4 *puVar2;
int4 local_20;
iVar1 = std::vector<int,std::allocator<int>>::size(param_2);
loc... |
833 | func0 | #include <cassert>
#include <vector>
#include <algorithm>
using namespace std;
void sift_down(vector<int>& heap, int start, int n) {
int i = start;
while (true) {
int left = 2 * i + 1;
int right = 2 * i + 2;
int smallest = i;
if (left < n && heap[left] < heap[smalle... | vector<int> func0(vector<int> heap, int a) {
int n = heap.size();
// Heapify: build a min-heap.
for (int i = n / 2 - 1; i >= 0; i--) {
sift_down(heap, i, n);
}
// Replace the smallest element (at index 0) with a and re-heapify.
heap[0] = a;
sift_down(heap, 0, n);
return ... | int main(){
{
vector<int> res = func0(vector<int>{25, 44, 68, 21, 39, 23, 89}, 21);
vector<int> expected = {21, 25, 23, 44, 39, 68, 89};
assert(res == expected);
}
{
vector<int> res = func0(vector<int>{25, 44, 68, 21, 39, 23, 89}, 110);
vector<int> expected = ... | O1 | cpp | func0(std::vector<int, std::allocator<int> >, int):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
mov %rdi,%r14
mov %rsi,%rbp
mov %edx,%r15d
mov 0x8(%rsi),%r13
sub (%rsi),%r13
sar $0x2,%r13
mov %r13d,%r12d
mov %r13d,%ebx
shr $0x1f,%ebx
add %r13d,%ebx
sar ... | _Z5func0St6vectorIiSaIiEEi:
endbr64
push r14
push r13
push r12
push rbp
push rbx
mov r13, rdi
mov rbp, rsi
mov r14d, edx
mov rax, [rsi+8]
sub rax, [rsi]
sar rax, 2
mov r12d, eax
mov ebx, eax
shr ebx, 1Fh
add ebx, eax
sar ebx, 1
sub ebx, 1
js short loc_... | _QWORD * func0(_QWORD *a1, _QWORD *a2, int a3)
{
unsigned int v4; // r12d
int v5; // ebx
v4 = (long long)(a2[1] - *a2) >> 2;
v5 = (int)v4 / 2 - 1;
if ( v5 >= 0 )
{
do
sift_down(a2, (unsigned int)v5--, v4);
while ( v5 != -1 );
}
*(_DWORD *)*a2 = a3;
sift_down(a2, 0LL, v4);
*a1 = *a2;
... | func0:
ENDBR64
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV R13,RDI
MOV RBP,RSI
MOV R14D,EDX
MOV RAX,qword ptr [RSI + 0x8]
SUB RAX,qword ptr [RSI]
SAR RAX,0x2
MOV R12D,EAX
MOV EBX,EAX
SHR EBX,0x1f
ADD EBX,EAX
SAR EBX,0x1
SUB EBX,0x1
JS 0x001012f3
LAB_001012de:
MOV EDX,R12D
MOV ESI,EBX
MOV RDI,RBP
CALL 0x00101229
SU... | /* func0(std::vector<int, std::allocator<int> >, int) */
int8 * func0(int8 *param_1,vector *param_2,int4 param_3)
{
int iVar1;
ulong uVar2;
int iVar3;
uVar2 = *(long *)(param_2 + 8) - *(long *)param_2 >> 2;
iVar1 = (int)uVar2;
iVar3 = ((int)(((uint)(uVar2 >> 0x1f) & 1) + iVar1) >> 1) + -1;
if (-1 < i... |
834 | func0 | #include <cassert>
#include <vector>
#include <algorithm>
using namespace std;
void sift_down(vector<int>& heap, int start, int n) {
int i = start;
while (true) {
int left = 2 * i + 1;
int right = 2 * i + 2;
int smallest = i;
if (left < n && heap[left] < heap[smalle... | vector<int> func0(vector<int> heap, int a) {
int n = heap.size();
// Heapify: build a min-heap.
for (int i = n / 2 - 1; i >= 0; i--) {
sift_down(heap, i, n);
}
// Replace the smallest element (at index 0) with a and re-heapify.
heap[0] = a;
sift_down(heap, 0, n);
return ... | int main(){
{
vector<int> res = func0(vector<int>{25, 44, 68, 21, 39, 23, 89}, 21);
vector<int> expected = {21, 25, 23, 44, 39, 68, 89};
assert(res == expected);
}
{
vector<int> res = func0(vector<int>{25, 44, 68, 21, 39, 23, 89}, 110);
vector<int> expected = ... | O2 | cpp | func0(std::vector<int, std::allocator<int> >, int):
endbr64
push %r13
mov %edx,%r13d
push %r12
mov %rdi,%r12
mov %rsi,%rdi
push %rbp
push %rbx
mov (%rsi),%rax
mov 0x8(%rsi),%rbp
sub %rax,%rbp
sar $0x2,%rbp
mov %ebp,%ebx
shr $0x1f,%ebx
add %ebp,%ebx
sar %ebx
sub $0x1,%ebx
js ... | _Z5func0St6vectorIiSaIiEEi:
endbr64
push r15
push r14
mov r14d, edx
push r13
mov r13, rdi
push r12
push rbp
mov rbp, rsi
push rbx
sub rsp, 8
movdqu xmm0, xmmword ptr [rsi]
movhlps xmm1, xmm0
movq r15, xmm0
movq rax, xmm1
sub rax, r15
sar rax, 2
mov ebx, eax
mov r... | __m128 * func0(__m128 *a1, const __m128i *a2, int a3, double a4, __m128 a5)
{
__m128 v6; // xmm0
unsigned int v7; // r12d
int v8; // ebx
long long v10; // rax
__m128 *result; // rax
v6 = (__m128)_mm_loadu_si128(a2);
v7 = (long long)(_mm_movehl_ps(a5, v6).m128_u64[0] - v6.m128_u64[0]) >> 2;
v8 = (int)v7... | func0:
ENDBR64
PUSH R15
PUSH R14
MOV R14D,EDX
PUSH R13
MOV R13,RDI
PUSH R12
PUSH RBP
MOV RBP,RSI
PUSH RBX
SUB RSP,0x8
MOVDQU XMM0,xmmword ptr [RSI]
MOVHLPS XMM1,XMM0
MOVQ R15,XMM0
MOVQ RAX,XMM1
SUB RAX,R15
SAR RAX,0x2
MOV EBX,EAX
MOV R12D,EAX
SHR EBX,0x1f
ADD EBX,EAX
SAR EBX,0x1
SUB EBX,0x1
JS 0x0010165a
NOP dword ptr ... | /* func0(std::vector<int, std::allocator<int> >, int) */
int8 * func0(int8 *param_1,vector *param_2,int4 param_3)
{
int8 uVar1;
int4 *puVar2;
int iVar3;
ulong uVar4;
int iVar5;
bool bVar6;
int8 uVar7;
int8 extraout_XMM0_Qb;
puVar2 = *(int4 **)param_2;
uVar4 = *(long *)(param_2 + 8) - (long)puVa... |
835 | func0 | #include <cassert>
#include <vector>
#include <algorithm>
using namespace std;
void sift_down(vector<int>& heap, int start, int n) {
int i = start;
while (true) {
int left = 2 * i + 1;
int right = 2 * i + 2;
int smallest = i;
if (left < n && heap[left] < heap[smalle... | vector<int> func0(vector<int> heap, int a) {
int n = heap.size();
// Heapify: build a min-heap.
for (int i = n / 2 - 1; i >= 0; i--) {
sift_down(heap, i, n);
}
// Replace the smallest element (at index 0) with a and re-heapify.
heap[0] = a;
sift_down(heap, 0, n);
return ... | int main(){
{
vector<int> res = func0(vector<int>{25, 44, 68, 21, 39, 23, 89}, 21);
vector<int> expected = {21, 25, 23, 44, 39, 68, 89};
assert(res == expected);
}
{
vector<int> res = func0(vector<int>{25, 44, 68, 21, 39, 23, 89}, 110);
vector<int> expected = ... | O3 | cpp | func0(std::vector<int, std::allocator<int> >, int):
endbr64
push %r13
mov %edx,%r13d
push %r12
mov %rdi,%r12
mov %rsi,%rdi
push %rbp
push %rbx
sub $0x8,%rsp
mov (%rsi),%rax
mov 0x8(%rsi),%rbp
sub %rax,%rbp
sar $0x2,%rbp
mov %ebp,%ebx
shr $0x1f,%ebx
add %ebp,%ebx
sar %ebx
sub ... | _Z5func0St6vectorIiSaIiEEi:
endbr64
push r15
push r14
mov r14d, edx
push r13
mov r13, rdi
push r12
push rbp
mov rbp, rsi
push rbx
sub rsp, 8
movdqu xmm0, xmmword ptr [rsi]
movhlps xmm1, xmm0
movq r15, xmm0
movq rax, xmm1
sub rax, r15
sar rax, 2
mov ebx, eax
mov r... | __m128 * func0(__m128 *a1, const __m128i *a2, int a3, double a4, __m128 a5)
{
__m128 v6; // xmm0
unsigned int v7; // r12d
int v8; // ebx
long long v10; // rax
__m128 *result; // rax
v6 = (__m128)_mm_loadu_si128(a2);
v7 = (long long)(_mm_movehl_ps(a5, v6).m128_u64[0] - v6.m128_u64[0]) >> 2;
v8 = (int)v7... | func0:
ENDBR64
PUSH R15
PUSH R14
MOV R14D,EDX
PUSH R13
MOV R13,RDI
PUSH R12
PUSH RBP
MOV RBP,RSI
PUSH RBX
SUB RSP,0x8
MOVDQU XMM0,xmmword ptr [RSI]
MOVHLPS XMM1,XMM0
MOVQ R15,XMM0
MOVQ RAX,XMM1
SUB RAX,R15
SAR RAX,0x2
MOV EBX,EAX
MOV R12D,EAX
SHR EBX,0x1f
ADD EBX,EAX
SAR EBX,0x1
SUB EBX,0x1
JS 0x0010167a
NOP dword ptr ... | /* func0(std::vector<int, std::allocator<int> >, int) */
int8 * func0(int8 *param_1,vector *param_2,int4 param_3)
{
int8 uVar1;
int4 *puVar2;
int iVar3;
ulong uVar4;
int iVar5;
bool bVar6;
int8 uVar7;
int8 extraout_XMM0_Qb;
puVar2 = *(int4 **)param_2;
uVar4 = *(long *)(param_2 + 8) - (long)puVa... |
836 | func0 |
#include <iostream>
#include <regex>
#include <assert.h>
| bool func0(std::string string) {
std::regex get_char("[^a-zA-Z0-9.]");
return !std::regex_search(string, get_char);
}
| int main() {
assert(func0("ABCDEFabcdef123450") == true);
assert(func0("*&%@#!}{") == false);
assert(func0("HELLOhowareyou98765") == true);
return 0;
}
| O0 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x48,%rsp
mov %rdi,-0x48(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
lea -0x40(%rbp),%rax
mov $0x10,%edx
lea 0x2b3f0(%rip),%rsi
mov %rax... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 48h
mov [rbp+var_48], rdi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_40]
mov edx, 10h
lea rcx, aAZaZ09; "[^a-zA-Z0-9.]"
mov rsi, rcx
mov ... | long long func0(long long a1)
{
unsigned int v1; // ebx
_BYTE v3[40]; // [rsp+10h] [rbp-40h] BYREF
unsigned long long v4; // [rsp+38h] [rbp-18h]
v4 = __readfsqword(0x28u);
std::basic_regex<char,std::regex_traits<char>>::basic_regex(v3, "[^a-zA-Z0-9.]", 16LL);
v1 = std::regex_search<std::char_traits<char>,... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RBP + -0x48],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x40]
MOV EDX,0x10
LEA RCX,[0x132051]
MOV RSI,RCX
MOV RDI,RAX
LAB_00104b3f:
CALL 0x00106076
LEA RCX,[RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x... | /* func0(std::string) */
uint func0(string *param_1)
{
bool bVar1;
int7 extraout_var;
long in_FS_OFFSET;
regex local_48 [40];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
std::regex::basic_regex(local_48,"[^a-zA-Z0-9.]",0x10);
/* try { // try from 00104b57 to 00104b5b... |
837 | func0 |
#include <iostream>
#include <regex>
#include <assert.h>
| bool func0(std::string string) {
std::regex get_char("[^a-zA-Z0-9.]");
return !std::regex_search(string, get_char);
}
| int main() {
assert(func0("ABCDEFabcdef123450") == true);
assert(func0("*&%@#!}{") == false);
assert(func0("HELLOhowareyou98765") == true);
return 0;
}
| O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %r12
push %rbp
push %rbx
sub $0x50,%rsp
mov %rdi,%rbx
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
lea 0x20(%rsp),%r12
mov %r12,%rdi
callq 4730 <_ZNSt6localeC1Ev@plt>
movl $0x10,(%rs... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 50h
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea r14, [rbp+var_60]
lea rdi, [rbp+var_58]; this
call __ZNSt6localeC1Ev; std::locale::lo... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x50
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA R14,[RBP + -0x60]
LEA RDI,[RBP + -0x58]
CALL 0x001046f0
MOV qword ptr [RBP + -0x50],0x0
MOV qword ptr [RBP + -0x48],0x0
MOV ECX,0x10
LEA RDX,[0x11863c]
LEA RSI,[RDX ... | /* func0(std::string) */
uint func0(int8 *param_1)
{
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
_Sp_counted_base<(_Lock_policy)2> *p_Var2;
bool bVar3;
int iVar4;
int7 extraout_var;
long in_FS_OFFSET;
regex local_68 [8];
int local_60 [8];
int8 local_58;
_Sp_counted_base<(_Lock_policy)2> *local_50;
... | |
838 | func0 |
#include <iostream>
#include <regex>
#include <assert.h>
| bool func0(std::string string) {
std::regex get_char("[^a-zA-Z0-9.]");
return !std::regex_search(string, get_char);
}
| int main() {
assert(func0("ABCDEFabcdef123450") == true);
assert(func0("*&%@#!}{") == false);
assert(func0("HELLOhowareyou98765") == true);
return 0;
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %r13
push %r12
push %rbp
push %rbx
mov %rdi,%rbx
sub $0x58,%rsp
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
lea 0x20(%rsp),%r13
lea 0x8(%rsp),%r12
mov %r13,%rdi
callq 4750 <_ZNSt... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r14
push r12
lea r12, [rbp+var_68]
lea r14, [rbp+var_70]
push rbx
mov rbx, rdi
mov rdi, r12; this
sub rsp, 58h
mov rax, fs:28h
mov [rbp+var_28], rax
xor eax, eax
call __ZNS... | long long func0(long long *a1)
{
long long v2; // rdi
long long v3; // rsi
long long v4; // rsi
int v5; // ebx
int v6; // eax
long long v7; // rbx
unsigned int v8; // r14d
long long v9; // rdx
volatile signed __int32 *v10; // rcx
signed __int32 v11; // eax
long long v13; // rax
long long v14; /... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH R12
LEA R12,[RBP + -0x68]
LEA R14,[RBP + -0x70]
PUSH RBX
MOV RBX,RDI
MOV RDI,R12
SUB RSP,0x58
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
XOR EAX,EAX
CALL 0x001036d0
LEA RDX,[0x11863c]
PXOR XMM0,XMM0
MOV RDI,R14
MOV ECX,0x10
LEA RSI,[RDX + -0xd]
MOVAPS x... | /* func0(std::string) */
uint func0(int8 *param_1)
{
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
int8 uVar2;
bool bVar3;
int iVar4;
int7 extraout_var;
long in_FS_OFFSET;
regex local_78 [8];
int local_70 [8];
int local_68 [16];
int local_58 [16];
int local_48 [16];
long local_30;
local_30 =... |
839 | func0 |
#include <iostream>
#include <regex>
#include <assert.h>
| bool func0(std::string string) {
std::regex get_char("[^a-zA-Z0-9.]");
return !std::regex_search(string, get_char);
}
| int main() {
assert(func0("ABCDEFabcdef123450") == true);
assert(func0("*&%@#!}{") == false);
assert(func0("HELLOhowareyou98765") == true);
return 0;
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %r13
push %r12
push %rbp
push %rbx
mov %rdi,%rbx
sub $0x58,%rsp
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
lea 0x20(%rsp),%r13
lea 0x8(%rsp),%r12
mov %r13,%rdi
callq 47b0 <_ZNSt... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
push r14
mov r14, rdi
push r13
push r12
push rbp
push rbx
sub rsp, 2A8h
mov rax, fs:28h
mov [rsp+2D8h+var_40], rax
xor eax, eax
lea r12, [rsp+2D8h+var_2A0]
mov rdi, r12; this
call __ZNSt6local... | long long func0(unsigned long long *a1)
{
__m128i v2; // xmm0
long long v3; // rdi
void *v4; // rdi
void **v5; // rbx
unsigned long long v6; // rbp
void *v7; // rdi
unsigned long long v8; // r13
unsigned long long v9; // rbx
long long v10; // rax
long long v11; // rcx
unsigned long long v12; // r... | func0:
ENDBR64
PUSH R15
PUSH R14
MOV R14,RDI
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x2a8
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x298],RAX
XOR EAX,EAX
LEA R12,[RSP + 0x38]
MOV RDI,R12
CALL 0x00104730
LEA RDX,[0x11a681]
PXOR XMM0,XMM0
LEA RDI,[RSP + 0x100]
MOV R8D,0x10
MOV RCX,R12
LEA RSI,[RDX + -0xd]
MO... | /* func0(std::string) */
int8 func0(ulong *param_1)
{
ulong uVar1;
ulong uVar2;
int auVar3 [16];
bool bVar4;
char cVar5;
long lVar6;
int8 *puVar7;
int8 *puVar8;
ulong uVar9;
ulong *puVar10;
long lVar11;
ulong uVar12;
int8 uVar13;
int8 uVar14;
_Match_mode _Var15;
long in_FS_OFFSET;
ul... |
840 | func0 |
#include <iostream>
#include <cmath>
#include <assert.h>
| int func0(int n) {
if (n == 1) {
return 1;
}
int count = pow(2, n - 2);
return count;
}
| int main() {
assert(func0(2) == 1);
assert(func0(3) == 2);
assert(func0(1) == 1);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x20,%rsp
mov %edi,-0x14(%rbp)
cmpl $0x1,-0x14(%rbp)
jne 11c5 <_Z5func0i+0x1c>
mov $0x1,%eax
jmp 11ee <_Z5func0i+0x45>
mov -0x14(%rbp),%eax
sub $0x2,%eax
cvtsi2sd %eax,%xmm0
mov 0xeb2(%rip),%rax
movapd %xmm0,%xmm1
movq %rax,%xmm0
callq 1... | _Z5func0i:
endbr64
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_14], edi
cmp [rbp+var_14], 1
jnz short loc_1185
mov eax, 1
jmp short locret_11B2
loc_1185:
mov eax, [rbp+var_14]
sub eax, 2
pxor xmm0, xmm0
cvtsi2sd xmm0, eax
mov rax, cs:x
movapd xmm1, xmm0; y
movq xmm0... | long long func0(int a1)
{
if ( a1 == 1 )
return 1LL;
else
return (unsigned int)(int)pow(2.0, (double)(a1 - 2));
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0x14],EDI
CMP dword ptr [RBP + -0x14],0x1
JNZ 0x00101185
MOV EAX,0x1
JMP 0x001011b2
LAB_00101185:
MOV EAX,dword ptr [RBP + -0x14]
SUB EAX,0x2
PXOR XMM0,XMM0
CVTSI2SD XMM0,EAX
MOV RAX,qword ptr [0x00102068]
MOVAPD XMM1,XMM0
MOVQ XMM0,RAX
CALL 0x00101... | /* func0(int) */
int func0(int param_1)
{
int iVar1;
double dVar2;
if (param_1 == 1) {
iVar1 = 1;
}
else {
dVar2 = pow(DAT_00102068,(double)(param_1 + -2));
iVar1 = (int)dVar2;
}
return iVar1;
} |
841 | func0 |
#include <iostream>
#include <cmath>
#include <assert.h>
| int func0(int n) {
if (n == 1) {
return 1;
}
int count = pow(2, n - 2);
return count;
}
| int main() {
assert(func0(2) == 1);
assert(func0(3) == 2);
assert(func0(1) == 1);
return 0;
}
| O1 | cpp | func0(int):
endbr64
mov %edi,%eax
cmp $0x1,%edi
je 11d9 <_Z5func0i+0x30>
sub $0x8,%rsp
sub $0x2,%edi
pxor %xmm1,%xmm1
cvtsi2sd %edi,%xmm1
movsd 0xebd(%rip),%xmm0
callq 10b0 <pow@plt>
cvttsd2si %xmm0,%eax
add $0x8,%rsp
retq
retq
| _Z5func0i:
endbr64
mov eax, edi
cmp edi, 1
jz short locret_1199
sub rsp, 8
sub edi, 2
pxor xmm1, xmm1
cvtsi2sd xmm1, edi; y
movsd xmm0, cs:x; x
call _pow
cvttsd2si eax, xmm0
add rsp, 8
retn
locret_1199:
retn | long long func0(unsigned int a1)
{
long long result; // rax
result = a1;
if ( a1 != 1 )
return (unsigned int)(int)pow(2.0, (double)(int)(a1 - 2));
return result;
} | func0:
ENDBR64
MOV EAX,EDI
CMP EDI,0x1
JZ 0x00101199
SUB RSP,0x8
SUB EDI,0x2
PXOR XMM1,XMM1
CVTSI2SD XMM1,EDI
MOVSD XMM0,qword ptr [0x00102060]
CALL 0x00101070
CVTTSD2SI EAX,XMM0
ADD RSP,0x8
RET
LAB_00101199:
RET | /* func0(int) */
int func0(int param_1)
{
double dVar1;
if (param_1 != 1) {
dVar1 = pow(DAT_00102060,(double)(param_1 + -2));
return (int)dVar1;
}
return param_1;
} |
842 | func0 |
#include <iostream>
#include <cmath>
#include <assert.h>
| int func0(int n) {
if (n == 1) {
return 1;
}
int count = pow(2, n - 2);
return count;
}
| int main() {
assert(func0(2) == 1);
assert(func0(3) == 2);
assert(func0(1) == 1);
return 0;
}
| O2 | cpp | func0(int):
endbr64
cmp $0x1,%edi
je 1210 <_Z5func0i+0x30>
sub $0x2,%edi
pxor %xmm1,%xmm1
sub $0x8,%rsp
movsd 0xe0c(%rip),%xmm0
cvtsi2sd %edi,%xmm1
callq 1090 <pow@plt>
add $0x8,%rsp
cvttsd2si %xmm0,%eax
retq
xchg %ax,%ax
mov $0x1,%eax
retq
nopw %cs:0x0(%rax,%rax,1)
| _Z5func0i:
endbr64
cmp edi, 1
jz short loc_1190
sub edi, 2
pxor xmm1, xmm1
sub rsp, 8
movsd xmm0, cs:x; x
cvtsi2sd xmm1, edi; y
call _pow
add rsp, 8
cvttsd2si eax, xmm0
retn
loc_1190:
mov eax, 1
retn | long long func0(int a1)
{
if ( a1 == 1 )
return 1LL;
else
return (unsigned int)(int)pow(2.0, (double)(a1 - 2));
} | func0:
ENDBR64
CMP EDI,0x1
JZ 0x00101190
SUB EDI,0x2
PXOR XMM1,XMM1
SUB RSP,0x8
MOVSD XMM0,qword ptr [0x00102008]
CVTSI2SD XMM1,EDI
CALL 0x00101050
ADD RSP,0x8
CVTTSD2SI EAX,XMM0
RET
LAB_00101190:
MOV EAX,0x1
RET | /* func0(int) */
int func0(int param_1)
{
double dVar1;
if (param_1 != 1) {
dVar1 = pow(DAT_00102008,(double)(param_1 + -2));
return (int)dVar1;
}
return 1;
} |
843 | func0 |
#include <iostream>
#include <cmath>
#include <assert.h>
| int func0(int n) {
if (n == 1) {
return 1;
}
int count = pow(2, n - 2);
return count;
}
| int main() {
assert(func0(2) == 1);
assert(func0(3) == 2);
assert(func0(1) == 1);
return 0;
}
| O3 | cpp | func0(int):
endbr64
cmp $0x1,%edi
je 1210 <_Z5func0i+0x30>
sub $0x2,%edi
pxor %xmm1,%xmm1
sub $0x8,%rsp
movsd 0xe0c(%rip),%xmm0
cvtsi2sd %edi,%xmm1
callq 1090 <pow@plt>
add $0x8,%rsp
cvttsd2si %xmm0,%eax
retq
xchg %ax,%ax
mov $0x1,%eax
retq
nopw %cs:0x0(%rax,%rax,1)
| _Z5func0i:
endbr64
cmp edi, 1
jz short loc_1190
sub edi, 2
pxor xmm1, xmm1
sub rsp, 8
movsd xmm0, cs:x; x
cvtsi2sd xmm1, edi; y
call _pow
add rsp, 8
cvttsd2si eax, xmm0
retn
loc_1190:
mov eax, 1
retn | long long func0(int a1)
{
if ( a1 == 1 )
return 1LL;
else
return (unsigned int)(int)pow(2.0, (double)(a1 - 2));
} | func0:
ENDBR64
CMP EDI,0x1
JZ 0x00101190
SUB EDI,0x2
PXOR XMM1,XMM1
SUB RSP,0x8
MOVSD XMM0,qword ptr [0x00102008]
CVTSI2SD XMM1,EDI
CALL 0x00101050
ADD RSP,0x8
CVTTSD2SI EAX,XMM0
RET
LAB_00101190:
MOV EAX,0x1
RET | /* func0(int) */
int func0(int param_1)
{
double dVar1;
if (param_1 != 1) {
dVar1 = pow(DAT_00102008,(double)(param_1 + -2));
return (int)dVar1;
}
return 1;
} |
844 | func0 |
#include <iostream>
#include <cassert>
| int func0(int n) {
int sum = 0;
for (int i = 1; i <= n; i++) {
sum += (i*i*i*i);
}
return sum;
}
| int main() {
assert(func0(2) == 17);
assert(func0(4) == 354);
assert(func0(6) == 2275);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
movl $0x0,-0x8(%rbp)
movl $0x1,-0x4(%rbp)
mov -0x4(%rbp),%eax
cmp -0x14(%rbp),%eax
jg 11c1 <_Z5func0i+0x38>
mov -0x4(%rbp),%eax
imul %eax,%eax
imul -0x4(%rbp),%eax
imul -0x4(%rbp),%eax
add %eax,-0x8(%rbp)
addl $0x1,-0x4... | _Z5func0i:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_14], edi
mov [rbp+var_8], 0
mov [rbp+var_4], 1
jmp short loc_1179
loc_1164:
mov eax, [rbp+var_4]
imul eax, eax
imul eax, [rbp+var_4]
imul eax, [rbp+var_4]
add [rbp+var_8], eax
add [rbp+var_4], 1
loc_1179:
mov eax, [rbp... | long long func0(int a1)
{
unsigned int v2; // [rsp+Ch] [rbp-8h]
int i; // [rsp+10h] [rbp-4h]
v2 = 0;
for ( i = 1; i <= a1; ++i )
v2 += i * i * i * i;
return v2;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x14],EDI
MOV dword ptr [RBP + -0x8],0x0
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00101179
LAB_00101164:
MOV EAX,dword ptr [RBP + -0x4]
IMUL EAX,EAX
IMUL EAX,dword ptr [RBP + -0x4]
IMUL EAX,dword ptr [RBP + -0x4]
ADD dword ptr [RBP + -0x8],EAX
ADD dword ptr [RBP + -... | /* func0(int) */
int func0(int param_1)
{
int4 local_10;
int4 local_c;
local_10 = 0;
for (local_c = 1; local_c <= param_1; local_c = local_c + 1) {
local_10 = local_10 + local_c * local_c * local_c * local_c;
}
return local_10;
} |
845 | func0 |
#include <iostream>
#include <cassert>
| int func0(int n) {
int sum = 0;
for (int i = 1; i <= n; i++) {
sum += (i*i*i*i);
}
return sum;
}
| int main() {
assert(func0(2) == 17);
assert(func0(4) == 354);
assert(func0(6) == 2275);
return 0;
}
| O1 | cpp | func0(int):
endbr64
test %edi,%edi
jle 11b2 <_Z5func0i+0x29>
add $0x1,%edi
mov $0x1,%eax
mov $0x0,%ecx
mov %eax,%edx
imul %eax,%edx
imul %edx,%edx
add %edx,%ecx
add $0x1,%eax
cmp %edi,%eax
jne 119e <_Z5func0i+0x15>
mov %ecx,%eax
retq
mov $0x0,%ecx
jmp 11af <_Z5func0i+0x26>
| _Z5func0i:
endbr64
test edi, edi
jle short loc_1172
add edi, 1
mov eax, 1
mov ecx, 0
loc_115E:
mov edx, eax
imul edx, eax
imul edx, edx
add ecx, edx
add eax, 1
cmp eax, edi
jnz short loc_115E
loc_116F:
mov eax, ecx
retn
loc_1172:
mov ecx, 0
jmp short loc_116F | long long func0(int a1)
{
int v1; // edi
int v2; // eax
unsigned int v3; // ecx
if ( a1 <= 0 )
{
return 0;
}
else
{
v1 = a1 + 1;
v2 = 1;
v3 = 0;
do
{
v3 += v2 * v2 * v2 * v2;
++v2;
}
while ( v2 != v1 );
}
return v3;
} | func0:
ENDBR64
TEST EDI,EDI
JLE 0x00101172
ADD EDI,0x1
MOV EAX,0x1
MOV ECX,0x0
LAB_0010115e:
MOV EDX,EAX
IMUL EDX,EAX
IMUL EDX,EDX
ADD ECX,EDX
ADD EAX,0x1
CMP EAX,EDI
JNZ 0x0010115e
LAB_0010116f:
MOV EAX,ECX
RET
LAB_00101172:
MOV ECX,0x0
JMP 0x0010116f | /* func0(int) */
int func0(int param_1)
{
int iVar1;
int iVar2;
if (param_1 < 1) {
iVar2 = 0;
}
else {
iVar1 = 1;
iVar2 = 0;
do {
iVar2 = iVar2 + iVar1 * iVar1 * iVar1 * iVar1;
iVar1 = iVar1 + 1;
} while (iVar1 != param_1 + 1);
}
return iVar2;
} |
846 | func0 |
#include <iostream>
#include <cassert>
| int func0(int n) {
int sum = 0;
for (int i = 1; i <= n; i++) {
sum += (i*i*i*i);
}
return sum;
}
| int main() {
assert(func0(2) == 17);
assert(func0(4) == 354);
assert(func0(6) == 2275);
return 0;
}
| O2 | cpp | func0(int):
endbr64
test %edi,%edi
jle 11f0 <_Z5func0i+0x30>
add $0x1,%edi
mov $0x1,%eax
xor %r8d,%r8d
nopl 0x0(%rax,%rax,1)
mov %eax,%edx
imul %eax,%edx
add $0x1,%eax
imul %edx,%edx
add %edx,%r8d
cmp %edi,%eax
jne 11d8 <_Z5func0i+0x18>
mov %r8d,%eax
retq
xchg %ax,%ax
xor %r8d... | _Z5func0i:
endbr64
test edi, edi
jle short loc_1170
add edi, 1
mov eax, 1
xor ecx, ecx
nop word ptr [rax+rax+00h]
loc_1158:
mov edx, eax
imul edx, eax
add eax, 1
imul edx, edx
add ecx, edx
cmp eax, edi
jnz short loc_1158
mov eax, ecx
retn
loc_1170:
xor ecx, ecx
m... | long long func0(int a1)
{
int v1; // edi
int v2; // eax
unsigned int v3; // ecx
int v4; // edx
if ( a1 <= 0 )
return 0LL;
v1 = a1 + 1;
v2 = 1;
v3 = 0;
do
{
v4 = v2 * v2;
++v2;
v3 += v4 * v4;
}
while ( v2 != v1 );
return v3;
} | func0:
ENDBR64
TEST EDI,EDI
JLE 0x00101170
ADD EDI,0x1
MOV EAX,0x1
XOR ECX,ECX
NOP word ptr [RAX + RAX*0x1]
LAB_00101158:
MOV EDX,EAX
IMUL EDX,EAX
ADD EAX,0x1
IMUL EDX,EDX
ADD ECX,EDX
CMP EAX,EDI
JNZ 0x00101158
MOV EAX,ECX
RET
LAB_00101170:
XOR ECX,ECX
MOV EAX,ECX
RET | /* func0(int) */
int func0(int param_1)
{
int iVar1;
int iVar2;
int iVar3;
if (0 < param_1) {
iVar1 = 1;
iVar2 = 0;
do {
iVar3 = iVar1 * iVar1;
iVar1 = iVar1 + 1;
iVar2 = iVar2 + iVar3 * iVar3;
} while (iVar1 != param_1 + 1);
return iVar2;
}
return 0;
} |
847 | func0 |
#include <iostream>
#include <cassert>
| int func0(int n) {
int sum = 0;
for (int i = 1; i <= n; i++) {
sum += (i*i*i*i);
}
return sum;
}
| int main() {
assert(func0(2) == 17);
assert(func0(4) == 354);
assert(func0(6) == 2275);
return 0;
}
| O3 | cpp | func0(int):
endbr64
test %edi,%edi
jle 11f0 <_Z5func0i+0x30>
add $0x1,%edi
mov $0x1,%eax
xor %r8d,%r8d
nopl 0x0(%rax,%rax,1)
mov %eax,%edx
imul %eax,%edx
add $0x1,%eax
imul %edx,%edx
add %edx,%r8d
cmp %edi,%eax
jne 11d8 <_Z5func0i+0x18>
mov %r8d,%eax
retq
xchg %ax,%ax
xor %r8d... | _Z5func0i:
endbr64
test edi, edi
jle short loc_1170
add edi, 1
mov eax, 1
xor ecx, ecx
nop word ptr [rax+rax+00h]
loc_1158:
mov edx, eax
imul edx, eax
add eax, 1
imul edx, edx
add ecx, edx
cmp eax, edi
jnz short loc_1158
mov eax, ecx
retn
loc_1170:
xor ecx, ecx
m... | long long func0(int a1)
{
int v1; // edi
int v2; // eax
unsigned int v3; // ecx
int v4; // edx
if ( a1 <= 0 )
return 0LL;
v1 = a1 + 1;
v2 = 1;
v3 = 0;
do
{
v4 = v2 * v2;
++v2;
v3 += v4 * v4;
}
while ( v2 != v1 );
return v3;
} | func0:
ENDBR64
TEST EDI,EDI
JLE 0x00101170
ADD EDI,0x1
MOV EAX,0x1
XOR ECX,ECX
NOP word ptr [RAX + RAX*0x1]
LAB_00101158:
MOV EDX,EAX
IMUL EDX,EAX
ADD EAX,0x1
IMUL EDX,EDX
ADD ECX,EDX
CMP EAX,EDI
JNZ 0x00101158
MOV EAX,ECX
RET
LAB_00101170:
XOR ECX,ECX
MOV EAX,ECX
RET | /* func0(int) */
int func0(int param_1)
{
int iVar1;
int iVar2;
int iVar3;
if (0 < param_1) {
iVar1 = 1;
iVar2 = 0;
do {
iVar3 = iVar1 * iVar1;
iVar1 = iVar1 + 1;
iVar2 = iVar2 + iVar3 * iVar3;
} while (iVar1 != param_1 + 1);
return iVar2;
}
return 0;
} |
848 | func0 |
#include <tuple>
#include <string>
#include <cassert>
| std::tuple<std::string, std::string, std::string> func0(std::tuple<std::string, std::string, std::string> test_tup1, std::tuple<std::string, std::string, std::string> test_tup2) {
std::string res1 = std::get<0>(test_tup1) + std::get<0>(test_tup2);
std::string res2 = std::get<1>(test_tup1) + std::get<1>(test_t... | int main() {
assert(func0(std::make_tuple("Manjeet", "Nikhil", "Akshat"), std::make_tuple(" Singh", " Meherwal", " Garg")) == std::make_tuple("Manjeet Singh", "Nikhil Meherwal", "Akshat Garg"));
assert(func0(std::make_tuple("Shaik", "Ayesha", "Sanya"), std::make_tuple(" Dawood", " Begum", " Singh")) == std::m... | O0 | cpp | func0(std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::tuple<std::__cxx11::basic_string<char, std::char_trai... | _Z5func0St5tupleIJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_S5_EES6_:
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_98]
mov ... | long long func0(long long a1, long long a2, long long a3)
{
long long v3; // rbx
long long v4; // rax
long long v5; // rbx
long long v6; // rax
long long v7; // rbx
long long v8; // rax
_BYTE v11[32]; // [rsp+20h] [rbp-80h] BYREF
_BYTE v12[32]; // [rsp+40h] [rbp-60h] BYREF
_BYTE v13[40]; // [rsp+60h]... | 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 RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x98]
MOV RDI,RAX
CALL 0x00102d82
MOV RBX,RAX
MOV RAX,qword ptr [RBP... | /* func0(std::tuple<std::string, std::string, std::string >, std::tuple<std::string, std::string,
std::string >) */
string * func0(tuple param_1,tuple param_2)
{
type *ptVar1;
type *ptVar2;
type *ptVar3;
type *ptVar4;
type *ptVar5;
type *ptVar6;
tuple *in_RDX;
int4 in_register_00000034;
tuple *pt... |
849 | func0 |
#include <tuple>
#include <string>
#include <cassert>
| std::tuple<std::string, std::string, std::string> func0(std::tuple<std::string, std::string, std::string> test_tup1, std::tuple<std::string, std::string, std::string> test_tup2) {
std::string res1 = std::get<0>(test_tup1) + std::get<0>(test_tup2);
std::string res2 = std::get<1>(test_tup1) + std::get<1>(test_t... | int main() {
assert(func0(std::make_tuple("Manjeet", "Nikhil", "Akshat"), std::make_tuple(" Singh", " Meherwal", " Garg")) == std::make_tuple("Manjeet Singh", "Nikhil Meherwal", "Akshat Garg"));
assert(func0(std::make_tuple("Shaik", "Ayesha", "Sanya"), std::make_tuple(" Dawood", " Begum", " Singh")) == std::m... | O1 | cpp | func0(std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::tuple<std::__cxx11::basic_string<char, std::char_trai... | _Z5func0St5tupleIJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_S5_EES6_:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 88h
mov rbx, rdi
mov rbp, rsi
mov r12, rdx
mov rax, fs:28h
mov [rsp+0B8h+var_40], rax
xor eax, eax
mov r14, [rdx+48h... | _QWORD * func0(_QWORD *a1, long long *a2, long long *a3)
{
unsigned long long v4; // r14
unsigned long long v5; // r13
long long v6; // r15
unsigned long long v7; // r14
unsigned long long v8; // r13
long long v9; // r15
unsigned long long v10; // r13
long long v11; // r12
unsigned long long v12; // r... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x88
MOV RBX,RDI
MOV RBP,RSI
MOV R12,RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x78],RAX
XOR EAX,EAX
MOV R14,qword ptr [RDX + 0x48]
MOV RAX,qword ptr [RDX + 0x40]
MOV qword ptr [RSP + 0x8],RAX
MOV R13,qword ptr [RSI + 0x48]
MOV R15,... | /* func0(std::tuple<std::string, std::string, std::string >, std::tuple<std::string, std::string,
std::string >) */
long * func0(tuple param_1,tuple param_2)
{
ulong uVar1;
ulong uVar2;
ulong uVar3;
ulong uVar4;
int8 uVar5;
ulong *in_RDX;
int4 in_register_00000034;
ulong *puVar6;
int4 in_register... |
850 | func0 |
#include <tuple>
#include <string>
#include <cassert>
| std::tuple<std::string, std::string, std::string> func0(std::tuple<std::string, std::string, std::string> test_tup1, std::tuple<std::string, std::string, std::string> test_tup2) {
std::string res1 = std::get<0>(test_tup1) + std::get<0>(test_tup2);
std::string res2 = std::get<1>(test_tup1) + std::get<1>(test_t... | int main() {
assert(func0(std::make_tuple("Manjeet", "Nikhil", "Akshat"), std::make_tuple(" Singh", " Meherwal", " Garg")) == std::make_tuple("Manjeet Singh", "Nikhil Meherwal", "Akshat Garg"));
assert(func0(std::make_tuple("Shaik", "Ayesha", "Sanya"), std::make_tuple(" Dawood", " Begum", " Singh")) == std::m... | O2 | cpp | func0(std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::tuple<std::__cxx11::basic_string<char, std::char_trai... | _Z5func0St5tupleIJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_S5_EES6_:
endbr64
push r15
push r14
push r13
push r12
mov r12, rsi
push rbp
mov rbp, rdx
push rbx
mov rbx, rdi
sub rsp, 0A8h
mov r14, [rsi+48h]
mov r15, [rdx+48h]
mov rax, fs:28h
mov [rsp+0D8h+var_... | _QWORD * func0(_QWORD *a1, long long *a2, long long *a3)
{
unsigned long long v4; // r14
unsigned long long v5; // r15
long long v6; // rax
long long v7; // rax
unsigned long long v8; // r14
unsigned long long v9; // r15
long long v10; // rax
long long v11; // rax
unsigned long long v12; // r12
long... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
MOV R12,RSI
PUSH RBP
MOV RBP,RDX
PUSH RBX
MOV RBX,RDI
SUB RSP,0xa8
MOV R14,qword ptr [RSI + 0x48]
MOV R15,qword ptr [RDX + 0x48]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x98],RAX
MOV RAX,qword ptr [RSI + 0x40]
LEA R13,[RSP + 0x30]
MOV byte ptr [RSP + 0x40],0x0... | /* func0(std::tuple<std::string, std::string, std::string >, std::tuple<std::string, std::string,
std::string >) */
long * func0(tuple param_1,tuple param_2)
{
ulong uVar1;
ulong uVar2;
ulong uVar3;
ulong uVar4;
int8 uVar5;
ulong *in_RDX;
int4 in_register_00000034;
ulong *puVar6;
int4 in_register... |
851 | func0 |
#include <tuple>
#include <string>
#include <cassert>
| std::tuple<std::string, std::string, std::string> func0(std::tuple<std::string, std::string, std::string> test_tup1, std::tuple<std::string, std::string, std::string> test_tup2) {
std::string res1 = std::get<0>(test_tup1) + std::get<0>(test_tup2);
std::string res2 = std::get<1>(test_tup1) + std::get<1>(test_t... | int main() {
assert(func0(std::make_tuple("Manjeet", "Nikhil", "Akshat"), std::make_tuple(" Singh", " Meherwal", " Garg")) == std::make_tuple("Manjeet Singh", "Nikhil Meherwal", "Akshat Garg"));
assert(func0(std::make_tuple("Shaik", "Ayesha", "Sanya"), std::make_tuple(" Dawood", " Begum", " Singh")) == std::m... | O3 | cpp | func0(std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::tuple<std::__cxx11::basic_string<char, std::char_trai... | _Z5func0St5tupleIJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_S5_EES6_:
endbr64
push r15
push r14
push r13
push r12
mov r12, rdx
push rbp
mov rbp, rsi
push rbx
mov rbx, rdi
sub rsp, 0B8h
mov r15, [rdx+48h]
mov r14, [rsi+48h]
mov rax, fs:28h
mov [rsp+0E8h+var_... | long long * func0(long long *a1, long long *a2, long long *a3)
{
size_t v5; // r15
size_t v6; // r14
long long v7; // rax
long long v8; // rax
size_t v9; // r15
size_t v10; // r14
long long v11; // rax
long long v12; // rax
size_t v13; // r14
size_t v14; // r12
long long v15; // rbp
size_t v16; ... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
MOV R12,RDX
PUSH RBP
MOV RBP,RSI
PUSH RBX
MOV RBX,RDI
SUB RSP,0xb8
MOV R15,qword ptr [RDX + 0x48]
MOV R14,qword ptr [RSI + 0x48]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0xa8],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RDX + 0x40]
LEA R13,[RSP + 0x40]
MOV byte ptr [RSP... | /* func0(std::tuple<std::string, std::string, std::string >, std::tuple<std::string, std::string,
std::string >) */
ulong * func0(tuple param_1,tuple param_2)
{
ulong uVar1;
ulong uVar2;
ulong uVar3;
ulong uVar4;
int *puVar5;
ulong *puVar6;
int8 uVar7;
ulong *in_RDX;
int4 in_register_00000034;
... |
852 | func0 |
#include <cmath>
#include <cassert>
| double func0(double radian) {
double degree = radian * (180 / M_PI);
return degree;
}
| int main() {
assert(func0(90) == 5156.620156177409);
assert(func0(60) == 3437.746770784939);
assert(func0(120) == 6875.493541569878);
return 0;
}
| O0 | cpp | func0(double):
endbr64
push %rbp
mov %rsp,%rbp
movsd %xmm0,-0x18(%rbp)
movsd -0x18(%rbp),%xmm1
movsd 0xf5d(%rip),%xmm0
mulsd %xmm1,%xmm0
movsd %xmm0,-0x8(%rbp)
movsd -0x8(%rbp),%xmm0
pop %rbp
retq
| _Z5func0d:
endbr64
push rbp
mov rbp, rsp
movsd [rbp+var_18], xmm0
movsd xmm1, [rbp+var_18]
movsd xmm0, cs:qword_20A0
mulsd xmm0, xmm1
movsd [rbp+var_8], xmm0
movsd xmm0, [rbp+var_8]
pop rbp
retn | double func0(double a1)
{
return 57.29577951308232 * a1;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOVSD qword ptr [RBP + -0x18],XMM0
MOVSD XMM1,qword ptr [RBP + -0x18]
MOVSD XMM0,qword ptr [0x001020a0]
MULSD XMM0,XMM1
MOVSD qword ptr [RBP + -0x8],XMM0
MOVSD XMM0,qword ptr [RBP + -0x8]
POP RBP
RET | /* func0(double) */
double func0(double param_1)
{
return DAT_001020a0 * param_1;
} |
853 | func0 |
#include <cmath>
#include <cassert>
| double func0(double radian) {
double degree = radian * (180 / M_PI);
return degree;
}
| int main() {
assert(func0(90) == 5156.620156177409);
assert(func0(60) == 3437.746770784939);
assert(func0(120) == 6875.493541569878);
return 0;
}
| O1 | cpp | func0(double):
endbr64
mulsd 0xed3(%rip),%xmm0
retq
| _Z5func0d:
endbr64
mulsd xmm0, cs:qword_2008
retn | double func0(double a1)
{
return a1 * 57.29577951308232;
} | func0:
ENDBR64
MULSD XMM0,qword ptr [0x00102008]
RET | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(double) */
double func0(double param_1)
{
return param_1 * _DAT_00102008;
} |
854 | func0 |
#include <cmath>
#include <cassert>
| double func0(double radian) {
double degree = radian * (180 / M_PI);
return degree;
}
| int main() {
assert(func0(90) == 5156.620156177409);
assert(func0(60) == 3437.746770784939);
assert(func0(120) == 6875.493541569878);
return 0;
}
| O2 | cpp | func0(double):
endbr64
mulsd 0xebc(%rip),%xmm0
retq
nopl (%rax)
| _Z5func0d:
endbr64
mulsd xmm0, cs:qword_2008
retn | double func0(double a1)
{
return a1 * 57.29577951308232;
} | func0:
ENDBR64
MULSD XMM0,qword ptr [0x00102008]
RET | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(double) */
double func0(double param_1)
{
return param_1 * _DAT_00102008;
} |
855 | func0 |
#include <cmath>
#include <cassert>
| double func0(double radian) {
double degree = radian * (180 / M_PI);
return degree;
}
| int main() {
assert(func0(90) == 5156.620156177409);
assert(func0(60) == 3437.746770784939);
assert(func0(120) == 6875.493541569878);
return 0;
}
| O3 | cpp | func0(double):
endbr64
mulsd 0xebc(%rip),%xmm0
retq
nopl (%rax)
| _Z5func0d:
endbr64
mulsd xmm0, cs:qword_2008
retn | double func0(double a1)
{
return a1 * 57.29577951308232;
} | func0:
ENDBR64
MULSD XMM0,qword ptr [0x00102008]
RET | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(double) */
double func0(double param_1)
{
return param_1 * _DAT_00102008;
} |
856 | func0 |
#include <iostream>
#include <vector>
#include <variant>
#include <cassert>
// Function to decode list
template<typename T>
| std::vector<T> func0(const std::vector<std::variant<T, std::pair<int, T>>>& alist) {
std::vector<T> result;
for(const auto& g : alist){
if(std::holds_alternative<std::pair<int, T>>(g)){
auto [n, x] = std::get<std::pair<int, T>>(g);
for(int i = 0; i < n; ++i){
... | int main(){
// Test case 1
std::vector<std::variant<int, std::pair<int, int>>> input1 = { std::make_pair(2, 1), 2, 3, std::make_pair(2, 4), 5, 1 };
std::vector<int> expected1 = {1, 1, 2, 3, 4, 4, 5, 1};
assert(func0<int>(input1) == expected1);
// Test case 2
std::vector<std::variant<char... | O0 | cpp | std::vector<int, std::allocator<int> > func0<int>(std::vector<std::variant<int, std::pair<int, int> >, std::allocator<std::variant<int, std::pair<int, int> > > > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x68,%rsp
mov %rdi,-0x68(%rbp)
mov %rsi,-0x70(%rbp)
mov %fs:0x28,%rax
mov %rax,-... | _Z5func0IiESt6vectorIT_SaIS1_EERKS0_ISt7variantIJS1_St4pairIiS1_EEESaIS7_EE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 68h
mov [rbp+var_68], rdi
mov [rbp+var_70], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_68]
mov rdi, rax
call _ZNSt6vecto... | long long func0<int>(long long a1, long long a2)
{
long long v2; // rax
int i; // [rsp+1Ch] [rbp-54h]
long long v5; // [rsp+20h] [rbp-50h] BYREF
_QWORD v6[2]; // [rsp+28h] [rbp-48h] BYREF
long long v7; // [rsp+38h] [rbp-38h]
_DWORD *v8; // [rsp+40h] [rbp-30h]
long long v9; // [rsp+48h] [rbp-28h]
_QWORD... | func0<int>:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x68
MOV qword ptr [RBP + -0x68],RDI
MOV qword ptr [RBP + -0x70],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x68]
MOV RDI,RAX
CALL 0x00101fa8
MOV RAX,qword ptr [RBP + -0x70]
MOV qword ptr [RBP + -0x40],R... | /* std::vector<int, std::allocator<int> > func0<int>(std::vector<std::variant<int, std::pair<int,
int> >, std::allocator<std::variant<int, std::pair<int, int> > > > const&) */
vector func0<int>(vector_conflict *param_1)
{
bool bVar1;
pair *ppVar2;
int *piVar3;
vector<std::variant<int,std::pair<int,int>>,st... |
857 | func0 |
#include <iostream>
#include <vector>
#include <variant>
#include <cassert>
// Function to decode list
template<typename T>
| std::vector<T> func0(const std::vector<std::variant<T, std::pair<int, T>>>& alist) {
std::vector<T> result;
for(const auto& g : alist){
if(std::holds_alternative<std::pair<int, T>>(g)){
auto [n, x] = std::get<std::pair<int, T>>(g);
for(int i = 0; i < n; ++i){
... | int main(){
// Test case 1
std::vector<std::variant<int, std::pair<int, int>>> input1 = { std::make_pair(2, 1), 2, 3, std::make_pair(2, 4), 5, 1 };
std::vector<int> expected1 = {1, 1, 2, 3, 4, 4, 5, 1};
assert(func0<int>(input1) == expected1);
// Test case 2
std::vector<std::variant<char... | O1 | cpp | std::vector<int, std::allocator<int> > func0<int>(std::vector<std::variant<int, std::pair<int, int> >, std::allocator<std::variant<int, std::pair<int, int> > > > const&):
endbr64
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x10,%rsp
mov %rdi,%rbx
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor... | _Z5func0IiESt6vectorIT_SaIS1_EERKS0_ISt7variantIJS1_St4pairIiS1_EEESaIS7_EE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 18h
mov rbx, rdi
mov rax, fs:28h
mov [rsp+48h+var_40], rax
xor eax, eax
mov qword ptr [rdi], 0
mov qword ptr [rdi+8], 0
mov ... | _QWORD * func0<int>(_QWORD *a1, long long *a2)
{
long long v2; // rbp
long long v3; // r14
int v4; // r13d
int v5; // r12d
_DWORD *v6; // rsi
char v7; // al
_DWORD *v8; // rsi
_QWORD v10[9]; // [rsp+0h] [rbp-48h] BYREF
v10[1] = __readfsqword(0x28u);
*a1 = 0LL;
a1[1] = 0LL;
a1[2] = 0LL;
v2 = *... | func0<int>:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x18
MOV RBX,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 RBP,qword ptr [RSI]
MOV R14,qword ptr [RSI + 0x8]
CMP R14,RBP
... | /* std::vector<int, std::allocator<int> > func0<int>(std::vector<std::variant<int, std::pair<int,
int> >, std::allocator<std::variant<int, std::pair<int, int> > > > const&) */
vector<int,std::allocator<int>> * func0<int>(vector<int,std::allocator<int>> *param_1,long *param_2)
{
char cVar1;
int *piVar2;
int4 ... |
858 | func0 |
#include <iostream>
#include <vector>
#include <variant>
#include <cassert>
// Function to decode list
template<typename T>
| std::vector<T> func0(const std::vector<std::variant<T, std::pair<int, T>>>& alist) {
std::vector<T> result;
for(const auto& g : alist){
if(std::holds_alternative<std::pair<int, T>>(g)){
auto [n, x] = std::get<std::pair<int, T>>(g);
for(int i = 0; i < n; ++i){
... | int main(){
// Test case 1
std::vector<std::variant<int, std::pair<int, int>>> input1 = { std::make_pair(2, 1), 2, 3, std::make_pair(2, 4), 5, 1 };
std::vector<int> expected1 = {1, 1, 2, 3, 4, 4, 5, 1};
assert(func0<int>(input1) == expected1);
// Test case 2
std::vector<std::variant<char... | O2 | cpp | std::vector<int, std::allocator<int> > func0<int>(std::vector<std::variant<int, std::pair<int, int> >, std::allocator<std::variant<int, std::pair<int, int> > > > const&):
endbr64
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x10,%rsp
mov (%rsi),%rbx
mov 0x8(%rsi),%r13
mov ... | _Z5func0IiESt6vectorIT_SaIS1_EERKS0_ISt7variantIJS1_St4pairIiS1_EEESaIS7_EE:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
push r12
push rbp
push rbx
mov rbx, rdi
sub rsp, 18h
mov rbp, [rsi]
mov r14, [rsi+8]
mov rax, fs:28h
mov [rsp+48h+var_40], rax
xor eax, eax
mov... | long long func0<int>(long long a1, long long *a2)
{
long long v2; // rbp
long long v3; // r14
long long v4; // rsi
long long v5; // rsi
char v6; // al
int v7; // r12d
long long v8; // rsi
long long v9; // rsi
_QWORD v11[9]; // [rsp+0h] [rbp-48h] BYREF
v2 = *a2;
v3 = a2[1];
v11[1] = __readfsqwo... | func0<int>:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV RBX,RDI
SUB RSP,0x18
MOV RBP,qword ptr [RSI]
MOV R14,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
CMP R14,RBP
JZ 0x0010... | /* std::vector<int, std::allocator<int> > func0<int>(std::vector<std::variant<int, std::pair<int,
int> >, std::allocator<std::variant<int, std::pair<int, int> > > > const&) */
vector<int,std::allocator<int>> * func0<int>(vector<int,std::allocator<int>> *param_1,long *param_2)
{
char cVar1;
int *piVar2;
int *... |
859 | func0 |
#include <iostream>
#include <vector>
#include <variant>
#include <cassert>
// Function to decode list
template<typename T>
| std::vector<T> func0(const std::vector<std::variant<T, std::pair<int, T>>>& alist) {
std::vector<T> result;
for(const auto& g : alist){
if(std::holds_alternative<std::pair<int, T>>(g)){
auto [n, x] = std::get<std::pair<int, T>>(g);
for(int i = 0; i < n; ++i){
... | int main(){
// Test case 1
std::vector<std::variant<int, std::pair<int, int>>> input1 = { std::make_pair(2, 1), 2, 3, std::make_pair(2, 4), 5, 1 };
std::vector<int> expected1 = {1, 1, 2, 3, 4, 4, 5, 1};
assert(func0<int>(input1) == expected1);
// Test case 2
std::vector<std::variant<char... | O3 | cpp | std::vector<int, std::allocator<int> > func0<int>(std::vector<std::variant<int, std::pair<int, int> >, std::allocator<std::variant<int, std::pair<int, int> > > > const&):
endbr64
push %r14
pxor %xmm0,%xmm0
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x10,%rsp
mov (%rsi),%rbx
mov 0... | _Z5func0IiESt6vectorIT_SaIS1_EERKS0_ISt7variantIJS1_St4pairIiS1_EEESaIS7_EE:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
push r12
push rbp
push rbx
mov rbx, rdi
sub rsp, 18h
mov rbp, [rsi]
mov r14, [rsi+8]
mov rax, fs:28h
mov [rsp+48h+var_40], rax
xor eax, eax
mov... | long long func0<int>(long long a1, long long *a2)
{
long long v2; // rbp
long long v3; // r14
long long v4; // rsi
long long v5; // rsi
char v6; // al
int v7; // r12d
long long v8; // rsi
long long v9; // rsi
_QWORD v11[9]; // [rsp+0h] [rbp-48h] BYREF
v2 = *a2;
v3 = a2[1];
v11[1] = __readfsqwo... | func0<int>:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV RBX,RDI
SUB RSP,0x18
MOV RBP,qword ptr [RSI]
MOV R14,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
CMP R14,RBP
JZ 0x0010... | /* std::vector<int, std::allocator<int> > func0<int>(std::vector<std::variant<int, std::pair<int,
int> >, std::allocator<std::variant<int, std::pair<int, int> > > > const&) */
vector<int,std::allocator<int>> * func0<int>(vector<int,std::allocator<int>> *param_1,long *param_2)
{
char cVar1;
int *piVar2;
int *... |
860 | func0 |
#include <iostream>
#include <vector>
#include <assert.h>
using namespace std;
template<typename T>
| bool func0(vector<T> list1, vector<T> list2) {
bool exist = true;
for (T sublist2 : list2) {
bool found = false;
for (T sublist1 : list1) {
if (sublist1 == sublist2) {
found = true;
break;
}
}
if (!found) {
... | int main() {
assert(func0<vector<int>>({{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14}}, {{12, 18, 23, 25, 45}, {7, 11, 19, 24, 28}, {1, 5, 8, 18, 15, 16}}) == false);
assert(func0<vector<int>>({{2, 3, 1}, {4, 5}, {6, 8}}, {{4, 5}, {6, 8}}) == true);
assert(func0<vector<char>>({{'a', 'b'}, {'e'}, {'c', ... | O0 | cpp | bool func0<std::vector<int, std::allocator<int> > >(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >, std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >):
endbr64
push %rbp
mov %rsp,%rbp
push %... | _Z5func0ISt6vectorIiSaIiEEEbS0_IT_SaIS3_EES5_:
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
mov [rbp+var_82], 1
mov rax, [rbp+var_A0]
mov [rbp+var_60], rax
mov rax, [rb... | long long func0<std::vector<int>>(long long a1, long long a2)
{
long long v2; // rax
long long v3; // rax
int v4; // ebx
int v5; // ebx
unsigned __int8 v7; // [rsp+1Eh] [rbp-82h]
char v8; // [rsp+1Fh] [rbp-81h]
long long v9; // [rsp+20h] [rbp-80h] BYREF
long long v10; // [rsp+28h] [rbp-78h] BYREF
lon... | func0<std::vector<int,std::allocator<int>>>:
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
MOV byte ptr [RBP + -0x82],0x1
MOV RAX,qword ptr [RBP + -0xa0]
MOV qword ptr [RBP + -0x6... | /* bool func0<std::vector<int, std::allocator<int> > >(std::vector<std::vector<int,
std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >,
std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > >) */
bool func0<std::vector<int,std... |
861 | func0 |
#include <iostream>
#include <vector>
#include <assert.h>
using namespace std;
template<typename T>
| bool func0(vector<T> list1, vector<T> list2) {
bool exist = true;
for (T sublist2 : list2) {
bool found = false;
for (T sublist1 : list1) {
if (sublist1 == sublist2) {
found = true;
break;
}
}
if (!found) {
... | int main() {
assert(func0<vector<int>>({{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14}}, {{12, 18, 23, 25, 45}, {7, 11, 19, 24, 28}, {1, 5, 8, 18, 15, 16}}) == false);
assert(func0<vector<int>>({{2, 3, 1}, {4, 5}, {6, 8}}, {{4, 5}, {6, 8}}) == true);
assert(func0<vector<char>>({{'a', 'b'}, {'e'}, {'c', ... | O1 | cpp | bool func0<std::vector<int, std::allocator<int> > >(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >, std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >):
endbr64
push %r15
push %r14
push %r13
p... | _Z5func0ISt6vectorIiSaIiEEEbS0_IT_SaIS3_EES5_:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 58h
mov [rsp+88h+var_68], rdi
mov rax, fs:28h
mov [rsp+88h+var_40], rax
xor eax, eax
mov rax, [rsi]
mov rdx, [rsi+8]
mov [rsp+88h+var_60], rdx
cmp r... | long long func0<std::vector<int>>(long long a1, _QWORD *a2)
{
unsigned long long v2; // rcx
_DWORD *v3; // rsi
long long v4; // r14
_QWORD *v5; // rbx
_QWORD *v6; // r15
struct _Unwind_Exception *v8; // rbx
_DWORD *v9; // r13
_DWORD *v10; // rsi
signed long long v11; // rbp
size_t v12; // rdx
uns... | func0<std::vector<int,std::allocator<int>>>:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x58
MOV qword ptr [RSP + 0x20],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x48],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RSI]
MOV RDX,qword ptr [RSI + 0x8]
MOV qword ptr [RSP + 0x28],RDX
CMP RDX,RAX
J... | /* bool func0<std::vector<int, std::allocator<int> > >(std::vector<std::vector<int,
std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >,
std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > >) */
bool func0<std::vector<int,std... |
862 | func0 |
#include <iostream>
#include <vector>
#include <assert.h>
using namespace std;
template<typename T>
| bool func0(vector<T> list1, vector<T> list2) {
bool exist = true;
for (T sublist2 : list2) {
bool found = false;
for (T sublist1 : list1) {
if (sublist1 == sublist2) {
found = true;
break;
}
}
if (!found) {
... | int main() {
assert(func0<vector<int>>({{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14}}, {{12, 18, 23, 25, 45}, {7, 11, 19, 24, 28}, {1, 5, 8, 18, 15, 16}}) == false);
assert(func0<vector<int>>({{2, 3, 1}, {4, 5}, {6, 8}}, {{4, 5}, {6, 8}}) == true);
assert(func0<vector<char>>({{'a', 'b'}, {'e'}, {'c', ... | O2 | cpp | bool func0<std::vector<int, std::allocator<int> > >(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >, std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >):
endbr64
push %r15
push %r14
push %r13
m... | _Z5func0ISt6vectorIiSaIiEEEbS0_IT_SaIS3_EES5_:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 58h
mov r15, [rsi]
mov [rsp+88h+var_68], rdi
mov rax, fs:28h
mov [rsp+88h+var_40], rax
mov rax, [rsi+8]
mov [rsp+88h+var_60], rax
cmp rax, r15
jz l... | long long func0<std::vector<int>>(long long a1, long long a2)
{
_QWORD *v2; // r15
signed long long v3; // r12
_DWORD *v4; // rax
_DWORD *v5; // rsi
_QWORD *v6; // rbx
_DWORD *v7; // rax
_DWORD *v8; // rsi
void *v9; // r14
signed long long v10; // rdx
size_t v11; // r13
signed long long v12; // r... | func0<std::vector<int,std::allocator<int>>>:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x58
MOV R15,qword ptr [RSI]
MOV qword ptr [RSP + 0x20],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x48],RAX
MOV RAX,qword ptr [RSI + 0x8]
MOV qword ptr [RSP + 0x28],RAX
CMP RAX,R15
JZ 0x00101fcd... | /* bool func0<std::vector<int, std::allocator<int> > >(std::vector<std::vector<int,
std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >,
std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > >) */
bool func0<std::vector<int,std... |
863 | func0 |
#include <iostream>
#include <vector>
#include <assert.h>
using namespace std;
template<typename T>
| bool func0(vector<T> list1, vector<T> list2) {
bool exist = true;
for (T sublist2 : list2) {
bool found = false;
for (T sublist1 : list1) {
if (sublist1 == sublist2) {
found = true;
break;
}
}
if (!found) {
... | int main() {
assert(func0<vector<int>>({{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14}}, {{12, 18, 23, 25, 45}, {7, 11, 19, 24, 28}, {1, 5, 8, 18, 15, 16}}) == false);
assert(func0<vector<int>>({{2, 3, 1}, {4, 5}, {6, 8}}, {{4, 5}, {6, 8}}) == true);
assert(func0<vector<char>>({{'a', 'b'}, {'e'}, {'c', ... | O3 | cpp | bool func0<std::vector<int, std::allocator<int> > >(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >, std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >):
endbr64
push %r15
push %r14
push %r13
m... | _Z5func0ISt6vectorIiSaIiEEEbS0_IT_SaIS3_EES5_:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 58h
mov r15, [rsi]
mov [rsp+88h+var_68], rdi
mov rax, fs:28h
mov [rsp+88h+var_40], rax
mov rax, [rsi+8]
mov [rsp+88h+var_60], rax
cmp rax, r15
jz l... | long long func0<std::vector<int>>(long long a1, long long a2)
{
_QWORD *v2; // r15
signed long long v3; // r12
_DWORD *v4; // rax
_DWORD *v5; // rsi
_QWORD *v6; // rbx
_DWORD *v7; // rax
_DWORD *v8; // rsi
void *v9; // r14
signed long long v10; // rdx
size_t v11; // r13
signed long long v12; // r... | func0<std::vector<int,std::allocator<int>>>:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x58
MOV R15,qword ptr [RSI]
MOV qword ptr [RSP + 0x20],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x48],RAX
MOV RAX,qword ptr [RSI + 0x8]
MOV qword ptr [RSP + 0x28],RAX
CMP RAX,R15
JZ 0x0010201d... | /* bool func0<std::vector<int, std::allocator<int> > >(std::vector<std::vector<int,
std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >,
std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > >) */
bool func0<std::vector<int,std... |
864 | func0 |
#include <iostream>
#include <unordered_map>
#include <assert.h>
| char func0(std::string str) {
std::unordered_map<char, int> h;
for (char ch : str) {
if (h.find(ch) != h.end()) {
return ch;
} else {
h[ch] = 0;
}
}
return '\0';
}
| int main() {
assert(func0("Google") == 'o');
assert(func0("data") == 'a');
assert(func0("python") == '\0');
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 $0x88,%rsp
mov %rdi,-0x88(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
lea -0x50(%rbp),%rax
mov %rax,%rdi
callq 2ac8 <_ZNSt13unordered_mapIciSt... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 88h
mov [rbp+var_88], rdi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_50]
mov rdi, rax
call _ZNSt13unordered_mapIciSt4hashIcESt8equal_toIcESaISt... | long long func0(long long a1)
{
unsigned int v1; // ebx
unsigned __int8 v3; // [rsp+17h] [rbp-79h] BYREF
long long v4; // [rsp+18h] [rbp-78h] BYREF
long long v5; // [rsp+20h] [rbp-70h] BYREF
long long v6; // [rsp+28h] [rbp-68h] BYREF
_QWORD v7[2]; // [rsp+30h] [rbp-60h] BYREF
_BYTE v8[56]; // [rsp+40h] [... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x88
MOV qword ptr [RBP + -0x88],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x50]
MOV RDI,RAX
CALL 0x00102aa0
MOV RAX,qword ptr [RBP + -0x88]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x58]
MOV RDI,RAX
... | /* func0(std::string) */
char func0(int8 param_1)
{
char cVar1;
bool bVar2;
char *pcVar3;
int4 *puVar4;
char cVar5;
long in_FS_OFFSET;
char local_81;
int8 local_80;
int8 local_78;
int8 local_70;
int8 local_68;
int8 local_60;
unordered_map<char,int,std::hash<char>,std::equal_to<char>,std::all... |
865 | func0 |
#include <iostream>
#include <unordered_map>
#include <assert.h>
| char func0(std::string str) {
std::unordered_map<char, int> h;
for (char ch : str) {
if (h.find(ch) != h.end()) {
return ch;
} else {
h[ch] = 0;
}
}
return '\0';
}
| int main() {
assert(func0("Google") == 'o');
assert(func0("data") == 'a');
assert(func0("python") == '\0');
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 $0x58,%rsp
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
lea 0x40(%rsp),%rax
mov %rax,0x10(%rsp)
movq $0x1,0x18(%rsp)
movq... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 50h
mov rax, fs:28h
mov [rsp+78h+var_30], rax
xor eax, eax
lea rax, [rsp+78h+var_38]
mov [rsp+78h+var_68], rax
mov [rsp+78h+var_60], 1
mov [rsp+78h+v... | long long func0(unsigned __int8 **a1)
{
unsigned __int8 *v1; // r12
unsigned __int8 *v2; // r14
_QWORD *v3; // rax
unsigned int v4; // ebp
long long **v5; // rax
unsigned int v6; // ebx
char v8; // [rsp+Fh] [rbp-69h] BYREF
_QWORD *v9; // [rsp+10h] [rbp-68h] BYREF
unsigned long long v10; // [rsp+18h] ... | func0:
ENDBR64
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x50
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x48],RAX
XOR EAX,EAX
LEA RAX,[RSP + 0x40]
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x18],0x1
MOV qword ptr [RSP + 0x20],0x0
MOV qword ptr [RSP + 0x28],0x0
MOV dword ptr [RSP + 0x30],0x3f... | /* func0(std::string) */
char func0(int8 *param_1)
{
char cVar1;
int8 *puVar2;
long *plVar3;
int4 *puVar4;
char cVar5;
char *pcVar6;
char *pcVar7;
long in_FS_OFFSET;
char local_69;
int8 *local_68;
ulong local_60;
int8 *local_58;
long local_50;
int4 local_48;
int8 local_40;
int8 local_3... |
866 | func0 |
#include <iostream>
#include <unordered_map>
#include <assert.h>
| char func0(std::string str) {
std::unordered_map<char, int> h;
for (char ch : str) {
if (h.find(ch) != h.end()) {
return ch;
} else {
h[ch] = 0;
}
}
return '\0';
}
| int main() {
assert(func0("Google") == 'o');
assert(func0("data") == 'a');
assert(func0("python") == '\0');
return 0;
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x68,%rsp
mov (%rdi),%rbx
mov 0x8(%rdi),%r14
mov %fs:0x28,%rax
mov %rax,0x58(%rsp)
xor %eax,%eax
lea 0x50(%rsp),%rsi
movl $0... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 68h
mov r12, [rdi]
mov r15, [rdi+8]
mov rax, fs:28h
mov [rsp+98h+var_40], rax
xor eax, eax
lea rax, [rsp+98h+var_48]
mov [rsp+98h+var_58]... | long long func0(unsigned __int8 **a1)
{
unsigned __int8 *v1; // r12
unsigned __int8 *v2; // r15
unsigned __int8 *v3; // r15
signed __int8 v4; // r13
_QWORD *i; // rax
unsigned int v6; // ebx
unsigned long long v8; // rcx
unsigned long long v9; // r14
long long *v10; // r8
unsigned long long v11; //... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x68
MOV R12,qword ptr [RDI]
MOV R15,qword ptr [RDI + 0x8]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x58],RAX
XOR EAX,EAX
LEA RAX,[RSP + 0x50]
MOV dword ptr [RSP + 0x40],0x3f800000
ADD R15,R12
MOV qword ptr [RSP + 0x18],RAX
MOV qword p... | /* func0(std::string) */
char func0(int8 *param_1)
{
long *plVar1;
long *plVar2;
char cVar3;
long *plVar4;
long *plVar5;
void *__s;
int8 *puVar6;
long *plVar7;
ulong uVar8;
ulong extraout_RDX;
char cVar9;
ulong uVar10;
char *pcVar11;
ulong uVar12;
char *pcVar13;
long in_FS_OFFSET;
in... |
867 | func0 |
#include <iostream>
#include <unordered_map>
#include <assert.h>
| char func0(std::string str) {
std::unordered_map<char, int> h;
for (char ch : str) {
if (h.find(ch) != h.end()) {
return ch;
} else {
h[ch] = 0;
}
}
return '\0';
}
| int main() {
assert(func0("Google") == 'o');
assert(func0("data") == 'a');
assert(func0("python") == '\0');
return 0;
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x68,%rsp
mov (%rdi),%rbx
mov 0x8(%rdi),%r15
mov %fs:0x28,%rax
mov %rax,0x58(%rsp)
xor %eax,%eax
lea 0x50(%rsp),%r8
movl $0x... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 68h
mov r12, [rdi]
mov rax, fs:28h
mov [rsp+98h+var_40], rax
xor eax, eax
mov rax, [rdi+8]
lea r8, [rsp+98h+var_48]
mov [rsp+98h+var_70],... | long long func0(unsigned __int8 **a1)
{
unsigned __int8 *v1; // r12
unsigned __int8 *v2; // rax
_QWORD *v3; // r8
unsigned long long v4; // r9
unsigned int v5; // ebx
_QWORD *v6; // rbp
_BYTE *v7; // rax
void *v8; // rdi
unsigned long long v10; // rcx
unsigned long long v11; // r13
unsigned long ... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x68
MOV R12,qword ptr [RDI]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x58],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RDI + 0x8]
LEA R8,[RSP + 0x50]
MOV qword ptr [RSP + 0x28],0x1
MOV qword ptr [RSP + 0x18],R8
ADD RAX,R12
MOV qword ptr [RSP +... | /* func0(std::string) */
char func0(int8 *param_1)
{
long *plVar1;
char cVar2;
char *pcVar3;
long *plVar4;
long *plVar5;
void *__s;
int8 *puVar6;
long *plVar7;
ulong uVar8;
ulong extraout_RDX;
ulong uVar9;
char cVar10;
long *plVar11;
char *pcVar12;
long lVar13;
long in_FS_OFFSET;
int... |
868 | func0 |
#include <iostream>
#include <cmath>
#include <assert.h>
#include <numeric>
| int func0(int A, int B) {
if (A > B) {
std::swap(A, B);
}
B = B / std::gcd(A, B);
return B - 1;
}
| int main() {
assert(func0(2,4) == 1);
assert(func0(4,10) == 4);
assert(func0(1,4) == 3);
return 0;
}
| O0 | cpp | func0(int, int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x18,%rsp
mov %edi,-0x14(%rbp)
mov %esi,-0x18(%rbp)
mov -0x14(%rbp),%edx
mov -0x18(%rbp),%eax
cmp %eax,%edx
jle 11d9 <_Z5func0ii+0x30>
lea -0x18(%rbp),%rdx
lea -0x14(%rbp),%rax
mov %rdx,%rsi
mov %rax,%rdi
callq 13b9... | _Z5func0ii:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 18h
mov [rbp+var_14], edi
mov [rbp+var_18], esi
mov edx, [rbp+var_14]
mov eax, [rbp+var_18]
cmp edx, eax
jle short loc_1199
lea rdx, [rbp+var_18]
lea rax, [rbp+var_14]
mov rsi, rdx
mov rdi, rax
call _ZSt... | long long func0(int a1, int a2)
{
int v2; // ebx
unsigned int v4; // [rsp+8h] [rbp-18h] BYREF
_DWORD v5[3]; // [rsp+Ch] [rbp-14h] BYREF
v5[0] = a1;
v4 = a2;
if ( a1 > a2 )
std::swap<int>(v5, &v4);
v2 = v4;
return (unsigned int)(v2 / (int)std::gcd<int,int>(v5[0], v4) - 1);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x18
MOV dword ptr [RBP + -0x14],EDI
MOV dword ptr [RBP + -0x18],ESI
MOV EDX,dword ptr [RBP + -0x14]
MOV EAX,dword ptr [RBP + -0x18]
CMP EDX,EAX
JLE 0x00101199
LEA RDX,[RBP + -0x18]
LEA RAX,[RBP + -0x14]
MOV RSI,RDX
MOV RDI,RAX
CALL 0x00101284
LAB_00101199:
MOV EBX,d... | /* func0(int, int) */
int func0(int param_1,int param_2)
{
int iVar1;
type tVar2;
int local_20;
int local_1c [3];
local_20 = param_2;
local_1c[0] = param_1;
if (param_2 < param_1) {
std::swap<int>(local_1c,&local_20);
}
iVar1 = local_20;
tVar2 = std::gcd<int,int>(local_1c[0],local_20);
re... |
869 | func0 |
#include <iostream>
#include <cmath>
#include <assert.h>
#include <numeric>
| int func0(int A, int B) {
if (A > B) {
std::swap(A, B);
}
B = B / std::gcd(A, B);
return B - 1;
}
| int main() {
assert(func0(2,4) == 1);
assert(func0(4,10) == 4);
assert(func0(1,4) == 3);
return 0;
}
| O1 | cpp | func0(int, int):
endbr64
push %rbx
mov %esi,%ebx
cmp %esi,%edi
jle 119a <_Z5func0ii+0x11>
mov %edi,%eax
mov %esi,%edi
mov %eax,%ebx
mov %ebx,%eax
sar $0x1f,%eax
mov %eax,%ecx
xor %ebx,%ecx
sub %eax,%ecx
mov %edi,%eax
neg %eax
test %edi,%edi
js 11bb <_Z5func0ii+0x32>
mov ... | _Z5func0ii:
endbr64
mov eax, edi
mov ecx, esi
cmp edi, esi
jg short loc_1159
mov ecx, edi
mov eax, esi
loc_1159:
mov edx, eax
neg edx
mov edi, edx
cmovs edi, eax
mov esi, ecx
neg esi
cmovs esi, ecx
test esi, esi
jz short loc_1193
test edi, edi
jz short lo... | long long func0(int a1, int a2)
{
int v2; // eax
int v3; // ecx
unsigned int v7; // esi
unsigned int v9; // edx
v2 = a1;
v3 = a2;
if ( a1 <= a2 )
{
v3 = a1;
v2 = a2;
}
_EDI = -v2;
if ( v2 > 0 )
_EDI = v2;
_ESI = -v3;
if ( v3 > 0 )
_ESI = v3;
if ( _ESI )
{
if ( _EDI )
... | func0:
ENDBR64
MOV EAX,EDI
MOV ECX,ESI
CMP EDI,ESI
JG 0x00101159
MOV ECX,EDI
MOV EAX,ESI
LAB_00101159:
MOV EDX,EAX
NEG EDX
MOV EDI,EDX
CMOVS EDI,EAX
MOV ESI,ECX
NEG ESI
CMOVS ESI,ECX
TEST ESI,ESI
JZ 0x00101193
TEST EDI,EDI
JZ 0x00101191
XOR R8D,R8D
TZCNT R8D,ESI
MOV ECX,R8D
SHR ESI,CL
XOR ECX,ECX
TZCNT ECX,EDI
SHR EDI,... | /* func0(int, int) */
int func0(int param_1,int param_2)
{
byte bVar1;
int iVar2;
int iVar3;
uint uVar4;
uint uVar5;
uint uVar6;
uint uVar7;
uVar4 = param_1;
if (param_1 <= param_2) {
uVar4 = param_2;
param_2 = param_1;
}
uVar6 = -uVar4;
if (0 < (int)uVar4) {
uVar6 = uVar4;
}
... |
870 | func0 |
#include <iostream>
#include <cmath>
#include <assert.h>
#include <numeric>
| int func0(int A, int B) {
if (A > B) {
std::swap(A, B);
}
B = B / std::gcd(A, B);
return B - 1;
}
| int main() {
assert(func0(2,4) == 1);
assert(func0(4,10) == 4);
assert(func0(1,4) == 3);
return 0;
}
| O2 | cpp | func0(int, int):
endbr64
mov %edi,%eax
cmp %esi,%edi
jle 12ce <_Z5func0ii+0xe>
mov %esi,%eax
mov %edi,%esi
mov %esi,%edx
sar $0x1f,%edx
mov %edx,%r8d
xor %esi,%r8d
sub %edx,%r8d
test %eax,%eax
js 1310 <_Z5func0ii+0x50>
je 1300 <_Z5func0ii+0x40>
test %r8d,%r8d
je 1314 <_Z5fu... | _Z5func0ii:
endbr64
mov eax, edi
cmp edi, esi
jg short loc_1210
mov edx, esi
mov esi, edi
mov eax, edx
loc_1210:
mov edx, eax
neg edx
mov edi, edx
cmovs edi, eax
test esi, esi
jz short loc_1271
mov edx, esi
neg edx
cmovns esi, edx
test eax, eax
jz short lo... | long long func0(int a1, int _ESI)
{
int v2; // eax
int v3; // edx
unsigned int v6; // esi
unsigned int v8; // edx
v2 = a1;
if ( a1 <= _ESI )
{
v3 = _ESI;
_ESI = a1;
v2 = v3;
}
_EDI = -v2;
if ( v2 > 0 )
_EDI = v2;
if ( !_ESI )
return (unsigned int)(v2 / _EDI - 1);
if ( _ESI ... | func0:
ENDBR64
MOV EAX,EDI
CMP EDI,ESI
JG 0x00101210
MOV EDX,ESI
MOV ESI,EDI
MOV EAX,EDX
LAB_00101210:
MOV EDX,EAX
NEG EDX
MOV EDI,EDX
CMOVS EDI,EAX
TEST ESI,ESI
JZ 0x00101271
MOV EDX,ESI
NEG EDX
CMOVNS ESI,EDX
TEST EAX,EAX
JZ 0x00101280
XOR R8D,R8D
MOV EDX,EDI
TZCNT R8D,ESI
MOV ECX,R8D
SHR ESI,CL
XOR ECX,ECX
TZCNT ECX... | /* func0(int, int) */
int func0(int param_1,int param_2)
{
byte bVar1;
int iVar2;
int iVar3;
uint uVar4;
uint uVar5;
uint uVar6;
uint uVar7;
uVar4 = param_1;
if (param_1 <= param_2) {
uVar4 = param_2;
param_2 = param_1;
}
uVar5 = -uVar4;
if (0 < (int)uVar4) {
uVar5 = uVar4;
}
... |
871 | func0 |
#include <iostream>
#include <cmath>
#include <assert.h>
#include <numeric>
| int func0(int A, int B) {
if (A > B) {
std::swap(A, B);
}
B = B / std::gcd(A, B);
return B - 1;
}
| int main() {
assert(func0(2,4) == 1);
assert(func0(4,10) == 4);
assert(func0(1,4) == 3);
return 0;
}
| O3 | cpp | func0(int, int):
endbr64
cmp %esi,%edi
jle 12ce <_Z5func0ii+0xe>
mov %edi,%eax
mov %esi,%edi
mov %eax,%esi
mov %esi,%eax
sar $0x1f,%eax
mov %eax,%ecx
xor %esi,%ecx
sub %eax,%ecx
test %edi,%edi
js 1310 <_Z5func0ii+0x50>
je 1318 <_Z5func0ii+0x58>
test %ecx,%ecx
je 1306 <_Z5fu... | _Z5func0ii:
endbr64
mov eax, edi
cmp edi, esi
jg short loc_1210
mov edx, esi
mov esi, edi
mov eax, edx
loc_1210:
mov edx, eax
neg edx
mov edi, edx
cmovs edi, eax
test esi, esi
jz short loc_1271
mov edx, esi
neg edx
cmovns esi, edx
test eax, eax
jz short lo... | long long func0(int a1, int _ESI)
{
int v2; // eax
int v3; // edx
unsigned int v6; // esi
unsigned int v8; // edx
v2 = a1;
if ( a1 <= _ESI )
{
v3 = _ESI;
_ESI = a1;
v2 = v3;
}
_EDI = -v2;
if ( v2 > 0 )
_EDI = v2;
if ( !_ESI )
return (unsigned int)(v2 / _EDI - 1);
if ( _ESI ... | func0:
ENDBR64
MOV EAX,EDI
CMP EDI,ESI
JG 0x00101210
MOV EDX,ESI
MOV ESI,EDI
MOV EAX,EDX
LAB_00101210:
MOV EDX,EAX
NEG EDX
MOV EDI,EDX
CMOVS EDI,EAX
TEST ESI,ESI
JZ 0x00101271
MOV EDX,ESI
NEG EDX
CMOVNS ESI,EDX
TEST EAX,EAX
JZ 0x00101280
XOR R8D,R8D
MOV EDX,EDI
TZCNT R8D,ESI
MOV ECX,R8D
SHR ESI,CL
XOR ECX,ECX
TZCNT ECX... | /* func0(int, int) */
int func0(int param_1,int param_2)
{
byte bVar1;
int iVar2;
int iVar3;
uint uVar4;
uint uVar5;
uint uVar6;
uint uVar7;
uVar4 = param_1;
if (param_1 <= param_2) {
uVar4 = param_2;
param_2 = param_1;
}
uVar5 = -uVar4;
if (0 < (int)uVar4) {
uVar5 = uVar4;
}
... |
872 | func0 |
#include <vector>
#include <algorithm>
#include <tuple>
#include <cassert>
| std::tuple<std::vector<int>> func0(const std::vector<int>& test_vec, int K) {
std::vector<int> res;
std::vector<int> temp = test_vec;
std::sort(temp.begin(), temp.end());
for (int idx = 0; idx < temp.size(); ++idx) {
if (idx < K || idx >= temp.size() - K) {
res.push_back(temp... | int main() {
assert(func0({5, 20, 3, 7, 6, 8}, 2) == std::make_tuple(std::vector<int>{3, 5, 8, 20}));
assert(func0({4, 5, 6, 1, 2, 7}, 3) == std::make_tuple(std::vector<int>{1, 2, 4, 5, 6, 7}));
assert(func0({2, 3, 4, 8, 9, 11, 7}, 4) == std::make_tuple(std::vector<int>{2, 3, 4, 7, 8, 9, 11}));
... | O0 | cpp | func0(std::vector<int, std::allocator<int> > const&, int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x78,%rsp
mov %rdi,-0x68(%rbp)
mov %rsi,-0x70(%rbp)
mov %edx,-0x74(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
lea -0x50(%rbp),%rax
mov %rax,%rdi
callq 1bec <_ZNSt6... | _Z5func0RKSt6vectorIiSaIiEEi:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 78h
mov [rbp+var_68], rdi
mov [rbp+var_70], rsi
mov [rbp+var_74], edx
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_50]
mov rdi, rax
call _ZNSt6vectorIiSaIiEEC2Ev; std::v... | long long func0(long long a1, long long a2, int a3)
{
long long v3; // rbx
long long v4; // rax
long long v6; // rax
int i; // [rsp+2Ch] [rbp-54h]
_BYTE v10[32]; // [rsp+30h] [rbp-50h] BYREF
_BYTE v11[24]; // [rsp+50h] [rbp-30h] BYREF
unsigned long long v12; // [rsp+68h] [rbp-18h]
v12 = __readfsqword(... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x78
MOV qword ptr [RBP + -0x68],RDI
MOV qword ptr [RBP + -0x70],RSI
MOV dword ptr [RBP + -0x74],EDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x50]
MOV RDI,RAX
CALL 0x00101c1e
MOV RDX,qword ptr [RBP + -0x70]
LEA RAX,[RBP... | /* func0(std::vector<int, std::allocator<int> > const&, int) */
vector * func0(vector *param_1,int param_2)
{
bool bVar1;
__normal_iterator _Var2;
__normal_iterator _Var3;
long lVar4;
int *piVar5;
ulong uVar6;
int in_EDX;
int4 in_register_00000034;
long in_FS_OFFSET;
int local_5c;
vector<int,std... |
873 | func0 |
#include <vector>
#include <algorithm>
#include <tuple>
#include <cassert>
| std::tuple<std::vector<int>> func0(const std::vector<int>& test_vec, int K) {
std::vector<int> res;
std::vector<int> temp = test_vec;
std::sort(temp.begin(), temp.end());
for (int idx = 0; idx < temp.size(); ++idx) {
if (idx < K || idx >= temp.size() - K) {
res.push_back(temp... | int main() {
assert(func0({5, 20, 3, 7, 6, 8}, 2) == std::make_tuple(std::vector<int>{3, 5, 8, 20}));
assert(func0({4, 5, 6, 1, 2, 7}, 3) == std::make_tuple(std::vector<int>{1, 2, 4, 5, 6, 7}));
assert(func0({2, 3, 4, 8, 9, 11, 7}, 4) == std::make_tuple(std::vector<int>{2, 3, 4, 7, 8, 9, 11}));
... | O1 | cpp | func0(std::vector<int, std::allocator<int> > const&, int):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x38,%rsp
mov %rdi,%r13
mov %rsi,%rbx
mov %edx,%r12d
mov %fs:0x28,%rax
mov %rax,0x28(%rsp)
xor %eax,%eax
movq $0x0,0x10(%rsp)
movq $0x0,0x18(%rsp)
movq... | _Z5func0RKSt6vectorIiSaIiEEi:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 68h
mov [rsp+98h+var_90], rdi
mov rbx, rsi
mov r13d, edx
mov rax, fs:28h
mov [rsp+98h+var_40], rax
xor eax, eax
mov [rsp+98h+src], 0
mov [rsp+98h+var_70], 0
mov ... | _QWORD * func0(_QWORD *a1, _QWORD *a2, int a3)
{
long long v5; // rax
unsigned long long v6; // rax
struct _Unwind_Exception *v7; // rbx
_DWORD *v8; // r14
_DWORD *v9; // rsi
long long v10; // r12
int *v11; // rbp
unsigned long long v12; // rax
int *v13; // rbx
int v14; // ecx
int *v15; // rax
i... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x68
MOV qword ptr [RSP + 0x8],RDI
MOV RBX,RSI
MOV R13D,EDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x58],RAX
XOR EAX,EAX
MOV qword ptr [RSP + 0x20],0x0
MOV qword ptr [RSP + 0x28],0x0
MOV qword ptr [RSP + 0x30],0x0
MOV RAX,qword ptr [... | /* func0(std::vector<int, std::allocator<int> > const&, int) */
vector * func0(vector *param_1,int param_2,int param_3,int param_4,int param_5,
int param_6,int8 param_7,int8 param_8,int8 param_9,
int8 param_10,int8 param_11,int8 param_12,int1 param_13,
int8 param_14)
{
int ... |
874 | func0 |
#include <vector>
#include <algorithm>
#include <tuple>
#include <cassert>
| std::tuple<std::vector<int>> func0(const std::vector<int>& test_vec, int K) {
std::vector<int> res;
std::vector<int> temp = test_vec;
std::sort(temp.begin(), temp.end());
for (int idx = 0; idx < temp.size(); ++idx) {
if (idx < K || idx >= temp.size() - K) {
res.push_back(temp... | int main() {
assert(func0({5, 20, 3, 7, 6, 8}, 2) == std::make_tuple(std::vector<int>{3, 5, 8, 20}));
assert(func0({4, 5, 6, 1, 2, 7}, 3) == std::make_tuple(std::vector<int>{1, 2, 4, 5, 6, 7}));
assert(func0({2, 3, 4, 8, 9, 11, 7}, 4) == std::make_tuple(std::vector<int>{2, 3, 4, 7, 8, 9, 11}));
... | O2 | cpp | func0(std::vector<int, std::allocator<int> > const&, int):
endbr64
push %r15
push %r14
mov %rdi,%r14
push %r13
push %r12
push %rbp
push %rbx
mov %rsi,%rbx
sub $0x28,%rsp
mov 0x8(%rbx),%rax
mov (%rsi),%rsi
mov %edx,0x4(%rsp)
mov %rax,%rbp
sub %rsi,%rbp
mov %rbp,%rdx
sar $0x2,%rd... | _Z5func0RKSt6vectorIiSaIiEEi:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 68h
mov [rsp+98h+var_98], rdi
mov rax, fs:28h
mov [rsp+98h+var_40], rax
xor eax, eax
mov rax, [rsi+8]
sub rax, [rsi]
movaps xmmword ptr [rsp+98h+src], xm... | _QWORD * func0(_QWORD *a1, int **a2, unsigned int a3)
{
_DWORD *v3; // rbx
unsigned long long v4; // r12
unsigned long long v5; // r13
_DWORD *v6; // r14
unsigned long long v7; // rax
void **v8; // rdi
char *v10; // rax
int *v11; // rsi
int *v12; // rbx
signed long long v13; // rbx
void **v14; // ... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x68
MOV qword ptr [RSP],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x58],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RSI + 0x8]
SUB RAX,qword ptr [RSI]
MOVAPS xmmword ptr [RSP + 0x20],XMM0
MOV qword ptr [RSP + 0x30],0x0
MOV qw... | /* func0(std::vector<int, std::allocator<int> > const&, int) */
vector * func0(vector *param_1,int param_2,int param_3,int param_4,int param_5,
int param_6,int8 param_7,int8 param_8,int8 param_9,
int8 param_10,int8 param_11,int8 param_12,int8 param_13)
{
int iVar1;
vector<int,std::allo... |
875 | func0 |
#include <vector>
#include <algorithm>
#include <tuple>
#include <cassert>
| std::tuple<std::vector<int>> func0(const std::vector<int>& test_vec, int K) {
std::vector<int> res;
std::vector<int> temp = test_vec;
std::sort(temp.begin(), temp.end());
for (int idx = 0; idx < temp.size(); ++idx) {
if (idx < K || idx >= temp.size() - K) {
res.push_back(temp... | int main() {
assert(func0({5, 20, 3, 7, 6, 8}, 2) == std::make_tuple(std::vector<int>{3, 5, 8, 20}));
assert(func0({4, 5, 6, 1, 2, 7}, 3) == std::make_tuple(std::vector<int>{1, 2, 4, 5, 6, 7}));
assert(func0({2, 3, 4, 8, 9, 11, 7}, 4) == std::make_tuple(std::vector<int>{2, 3, 4, 7, 8, 9, 11}));
... | O3 | cpp | func0(std::vector<int, std::allocator<int> > const&, int):
endbr64
push %r15
push %r14
push %r13
mov %edx,%r13d
push %r12
push %rbp
push %rbx
mov %rsi,%rbx
sub $0x28,%rsp
mov 0x8(%rbx),%rax
mov (%rsi),%rsi
mov %rdi,0x8(%rsp)
mov %rax,%r15
sub %rsi,%r15
mov %r15,%rdx
sar $0x2,%r... | _Z5func0RKSt6vectorIiSaIiEEi:
endbr64
push r15
pxor xmm0, xmm0
mov r15, rdi
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 68h
mov rax, fs:28h
mov [rsp+98h+var_40], rax
xor eax, eax
mov rax, [rsi+8]
sub rax, [rsi]
movaps xmmword ptr [rsp+98h+src], xmm0
mov [r... | _QWORD * func0(_QWORD *a1, _QWORD *a2, int a3)
{
signed long long v3; // rbx
int *v4; // rbp
int *v5; // r12
int v6; // r13d
unsigned long long v8; // rax
_QWORD *v9; // rbx
unsigned long long v10; // r14
int *v11; // rax
long long v12; // rbx
bool v13; // zf
unsigned long long v14; // r14
unsig... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
MOV R15,RDI
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x68
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x58],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RSI + 0x8]
SUB RAX,qword ptr [RSI]
MOVAPS xmmword ptr [RSP + 0x20],XMM0
MOV qword ptr [RSP + 0x30],0x0
MOV qword ptr [RSP... | /* func0(std::vector<int, std::allocator<int> > const&, int) */
vector * func0(vector *param_1,int param_2,int param_3,int param_4,int param_5,
int param_6,int8 param_7,int8 param_8,int8 param_9,
int8 param_10,int8 param_11,int8 param_12,int8 param_13)
{
int iVar1;
long *__src;
int8 ... |
876 | func0 |
#include <iostream>
#include <string>
#include <cassert>
| std::string func0(const std::string& text, int n) {
std::string result = text;
int count = 0;
for (size_t i = 0; i < result.size(); ++i) {
if (result[i] == ' ' || result[i] == ',' || result[i] == '.') {
if (count < n) {
result[i] = ':';
count++;
... | int main() {
assert(func0("Python language, Programming language.", 2) == "Python:language: Programming language.");
assert(func0("a b c,d e f", 3) == "a:b:c:d e f");
assert(func0("ram reshma,ram rahim", 1) == "ram:reshma,ram rahim");
return 0;
}
| O0 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x48,%rsp
mov %rdi,-0x38(%rbp)
mov %rsi,-0x40(%rbp)
mov %edx,-0x44(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x40(%rbp),... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 38h
mov [rbp+var_28], rdi
mov [rbp+var_30], rsi
mov [rbp+var_34], edx
mov rdx, [rbp+var_30]
mov rax, [rbp+var_28]
mov rsi, rdx
mov rdi, rax
call __ZNSt7__cxx1112b... | long long func0(long long a1, long long a2, int a3)
{
bool v3; // al
int v6; // [rsp+24h] [rbp-1Ch]
unsigned long long i; // [rsp+28h] [rbp-18h]
std::string::basic_string(a1, a2);
v6 = 0;
for ( i = 0LL; i < std::string::size(a1); ++i )
{
v3 = *(_BYTE *)std::string::operator[](a1, i) == 32
|| *... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x38
MOV qword ptr [RBP + -0x28],RDI
MOV qword ptr [RBP + -0x30],RSI
MOV dword ptr [RBP + -0x34],EDX
MOV RDX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x28]
MOV RSI,RDX
MOV RDI,RAX
LAB_001013cf:
CALL 0x00101180
MOV dword ptr [RBP + -0x1c],0x0
MOV qword ptr [R... | /* func0(std::string const&, int) */
string * func0(string *param_1,int param_2)
{
bool bVar1;
char *pcVar2;
int *puVar3;
ulong uVar4;
int in_EDX;
int4 in_register_00000034;
int4 local_24;
int8 local_20;
std::string::string(param_1,(string *)CONCAT44(in_register_00000034,param_2));
local_24 = 0... |
877 | func0 |
#include <iostream>
#include <string>
#include <cassert>
| std::string func0(const std::string& text, int n) {
std::string result = text;
int count = 0;
for (size_t i = 0; i < result.size(); ++i) {
if (result[i] == ' ' || result[i] == ',' || result[i] == '.') {
if (count < n) {
result[i] = ':';
count++;
... | int main() {
assert(func0("Python language, Programming language.", 2) == "Python:language: Programming language.");
assert(func0("a b c,d e f", 3) == "a:b:c:d e f");
assert(func0("ram reshma,ram rahim", 1) == "ram:reshma,ram rahim");
return 0;
}
| O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int):
endbr64
push %r13
push %r12
push %rbp
push %rbx
sub $0x18,%rsp
mov %rdi,%rbx
mov %edx,%ebp
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
lea 0x10(%rdi),%rax
mov %rax,(%rdi)
mov (%r... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi:
endbr64
push r13
push r12
push rbp
push rbx
sub rsp, 18h
mov rbx, rdi
mov ebp, edx
mov rax, fs:28h
mov [rsp+38h+var_30], rax
xor eax, eax
lea rdi, [rdi+10h]
mov [rbx], rdi
mov r13, [rsi]
mov r12, [rsi+8]... | _QWORD * func0(_QWORD *a1, long long a2, int a3)
{
void *v5; // rdi
_BYTE *v6; // r13
size_t v7; // r12
long long v8; // rax
unsigned long long v9; // rax
int v10; // esi
long long v11; // rdi
_BYTE *v12; // rcx
unsigned long long v13; // rdx
_QWORD v15[7]; // [rsp+0h] [rbp-38h] BYREF
v15[1] = __... | func0:
ENDBR64
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
MOV EBP,EDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
LEA RDI,[RDI + 0x10]
MOV qword ptr [RBX],RDI
MOV R13,qword ptr [RSI]
MOV R12,qword ptr [RSI + 0x8]
MOV qword ptr [RSP],R12
CMP R12,0xf
JA 0x001012be
CMP R12,0x1
J... | /* func0(std::string const&, int) */
string * func0(string *param_1,int param_2)
{
byte bVar1;
string *__src;
ulong uVar2;
string *__dest;
int in_EDX;
int iVar3;
int4 in_register_00000034;
long in_FS_OFFSET;
ulong local_38;
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
__dest = ... |
878 | func0 |
#include <iostream>
#include <string>
#include <cassert>
| std::string func0(const std::string& text, int n) {
std::string result = text;
int count = 0;
for (size_t i = 0; i < result.size(); ++i) {
if (result[i] == ' ' || result[i] == ',' || result[i] == '.') {
if (count < n) {
result[i] = ':';
count++;
... | int main() {
assert(func0("Python language, Programming language.", 2) == "Python:language: Programming language.");
assert(func0("a b c,d e f", 3) == "a:b:c:d e f");
assert(func0("ram reshma,ram rahim", 1) == "ram:reshma,ram rahim");
return 0;
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int):
endbr64
push %r13
push %r12
mov %rdi,%r12
add $0x10,%rdi
push %rbp
push %rbx
mov %edx,%ebx
sub $0x18,%rsp
mov 0x8(%rsi),%r13
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
mov %rdi,... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi:
endbr64
push r13
push r12
push rbp
mov ebp, edx
push rbx
mov rbx, rdi
add rdi, 10h
sub rsp, 18h
mov r12, [rsi+8]
mov rax, fs:28h
mov [rsp+38h+var_30], rax
xor eax, eax
mov [rbx], rdi
mov r13, [rsi]
mov ... | long long * func0(long long *a1, long long a2, int a3)
{
void *v5; // rdi
size_t v6; // r12
_BYTE *v7; // r13
unsigned long long v8; // rax
int v9; // esi
long long i; // rdi
_BYTE *v11; // rcx
unsigned long long v12; // rdx
long long v14; // rax
_QWORD v15[7]; // [rsp+0h] [rbp-38h] BYREF
v5 = a1... | func0:
ENDBR64
PUSH R13
PUSH R12
PUSH RBP
MOV EBP,EDX
PUSH RBX
MOV RBX,RDI
ADD RDI,0x10
SUB RSP,0x18
MOV R12,qword ptr [RSI + 0x8]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
MOV qword ptr [RBX],RDI
MOV R13,qword ptr [RSI]
MOV qword ptr [RSP],R12
CMP R12,0xf
JA 0x00101500
CMP R12,0x1
JNZ 0x001... | /* func0(std::string const&, int) */
string * func0(string *param_1,int param_2)
{
byte bVar1;
string *__src;
ulong uVar2;
int in_EDX;
int iVar3;
int4 in_register_00000034;
string *__dest;
long in_FS_OFFSET;
ulong local_38;
long local_30;
__dest = param_1 + 0x10;
uVar2 = ((int8 *)CONCAT44(i... |
879 | func0 |
#include <iostream>
#include <string>
#include <cassert>
| std::string func0(const std::string& text, int n) {
std::string result = text;
int count = 0;
for (size_t i = 0; i < result.size(); ++i) {
if (result[i] == ' ' || result[i] == ',' || result[i] == '.') {
if (count < n) {
result[i] = ':';
count++;
... | int main() {
assert(func0("Python language, Programming language.", 2) == "Python:language: Programming language.");
assert(func0("a b c,d e f", 3) == "a:b:c:d e f");
assert(func0("ram reshma,ram rahim", 1) == "ram:reshma,ram rahim");
return 0;
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int):
endbr64
push %r13
push %r12
mov %rdi,%r12
add $0x10,%rdi
push %rbp
push %rbx
mov %edx,%ebx
sub $0x18,%rsp
mov 0x8(%rsi),%r13
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
mov %rdi,... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi:
endbr64
push r13
push r12
push rbp
mov ebp, edx
push rbx
mov rbx, rdi
add rdi, 10h
sub rsp, 18h
mov r12, [rsi+8]
mov rax, fs:28h
mov [rsp+38h+var_30], rax
xor eax, eax
mov [rbx], rdi
mov r13, [rsi]
mov ... | long long * func0(long long *a1, long long a2, int a3)
{
void *v5; // rdi
size_t v6; // r12
_BYTE *v7; // r13
long long v8; // r8
unsigned long long v9; // rax
unsigned long long v10; // rsi
int v11; // edi
_BYTE *v12; // rcx
unsigned long long v13; // rdx
long long v15; // rax
_QWORD v16[7]; // [... | func0:
ENDBR64
PUSH R13
PUSH R12
PUSH RBP
MOV EBP,EDX
PUSH RBX
MOV RBX,RDI
ADD RDI,0x10
SUB RSP,0x18
MOV R12,qword ptr [RSI + 0x8]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
MOV qword ptr [RBX],RDI
MOV R13,qword ptr [RSI]
MOV qword ptr [RSP],R12
CMP R12,0xf
JA 0x00101500
CMP R12,0x1
JNZ 0x001... | /* func0(std::string const&, int) */
string * func0(string *param_1,int param_2)
{
byte bVar1;
string *__src;
ulong uVar2;
int in_EDX;
int4 in_register_00000034;
ulong uVar3;
int iVar4;
string *__dest;
long in_FS_OFFSET;
ulong local_38;
long local_30;
__dest = param_1 + 0x10;
uVar3 = ((in... |
880 | func0 |
#include <vector>
#include <cassert>
| int func0(std::vector<int> nums) {
for (int el : nums) {
if (el % 2 == 0) {
return el;
}
}
return -1;
}
| int main() {
assert(func0({1, 3, 5, 7, 4, 1, 6, 8}) == 4);
assert(func0({2, 3, 4}) == 2);
assert(func0({5, 6, 7}) == 6);
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> >):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x40,%rsp
mov %rdi,-0x38(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x8(%rbp)
xor %eax,%eax
mov -0x38(%rbp),%rax
mov %rax,-0x10(%rbp)
mov -0x10(%rbp),%rax
mov %rax,%rdi
callq 15a2 <_ZNSt6vectorIiSaIiEE5beginEv>
m... | _Z5func0St6vectorIiSaIiEE:
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 _ZNSt6vectorIiSaIiEE5beginEv; std::vector<int>::... | long long func0(long long a1)
{
unsigned 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_cx... | 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 0x00101608
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qwor... | /* func0(std::vector<int, std::allocator<int> >) */
uint func0(vector param_1)
{
bool bVar1;
uint uVar2;
uint *puVar3;
int4 in_register_0000003c;
long in_FS_OFFSET;
int8 local_28;
int8 local_20;
vector<int,std::allocator<int>> *local_18;
long local_10;
local_18 = (vector<int,std::allocator<int>... |
881 | func0 |
#include <vector>
#include <cassert>
| int func0(std::vector<int> nums) {
for (int el : nums) {
if (el % 2 == 0) {
return el;
}
}
return -1;
}
| int main() {
assert(func0({1, 3, 5, 7, 4, 1, 6, 8}) == 4);
assert(func0({2, 3, 4}) == 2);
assert(func0({5, 6, 7}) == 6);
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> >):
endbr64
mov (%rdi),%rax
mov 0x8(%rdi),%rcx
cmp %rcx,%rax
je 1231 <_Z5func0St6vectorIiSaIiEE+0x28>
mov (%rax),%edx
test $0x1,%dl
je 122e <_Z5func0St6vectorIiSaIiEE+0x25>
add $0x4,%rax
cmp %rax,%rcx
jne 1219 <_Z5func0St6vectorIiSaIiEE+0x10>
mov... | _Z5func0St6vectorIiSaIiEE:
endbr64
mov rax, [rdi]
mov rcx, [rdi+8]
cmp rcx, rax
jz short loc_1231
loc_1219:
mov edx, [rax]
test dl, 1
jz short loc_122E
add rax, 4
cmp rcx, rax
jnz short loc_1219
mov edx, 0FFFFFFFFh
loc_122E:
mov eax, edx
retn
loc_1231:
mov edx, 0FFFF... | 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 & 1) == 0 )
break;
if ( v2 == ++v1 )
... | func0:
ENDBR64
MOV RAX,qword ptr [RDI]
MOV RCX,qword ptr [RDI + 0x8]
CMP RCX,RAX
JZ 0x00101231
LAB_00101219:
MOV EDX,dword ptr [RAX]
TEST DL,0x1
JZ 0x0010122e
ADD RAX,0x4
CMP RCX,RAX
JNZ 0x00101219
MOV EDX,0xffffffff
LAB_0010122e:
MOV EAX,EDX
RET
LAB_00101231:
MOV EDX,0xffffffff
JMP 0x0010122e | /* func0(std::vector<int, std::allocator<int> >) */
uint func0(vector param_1)
{
uint *puVar1;
int4 in_register_0000003c;
puVar1 = *(uint **)CONCAT44(in_register_0000003c,param_1);
while( true ) {
if (*(uint **)(CONCAT44(in_register_0000003c,param_1) + 8) == puVar1) {
return 0xffffffff;
}
... |
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.