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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
2,882 | func0 | #include <iostream>
#include <vector>
#include <assert.h>
using namespace std;
| double func0(vector<vector<int>> cost, int N) {
vector<vector<int>> dp(N, vector<int>(N, 0));
dp[0][0] = cost[0][0];
for (int i = 1; i < N; i++) {
dp[i][0] = dp[i - 1][0] + cost[i][0];
}
for (int j = 1; j < N; j++) {
dp[0][j] = dp[0][j - 1] + cost[0][j];
}
for ... | int main() {
assert(func0({{1, 2, 3}, {6, 5, 4}, {7, 3, 9}}, 3) == 5.2);
assert(func0({{2, 3, 4}, {7, 6, 5}, {8, 4, 10}}, 3) == 6.2);
assert(func0({{3, 4, 5}, {8, 7, 6}, {9, 5, 11}}, 3) == 7.2);
cout << "All assertions passed." << endl;
return 0;
}
| O2 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >, int):
endbr64
movabs $0x1fffffffffffffff,%rax
push %r15
push %r14
push %r13
push %r12
push %rbp
movslq %esi,%rbp
push %rbx
sub $0x28,%rsp
mov %rdi,0x18(%rsp)
mov %ebp,0x14(%rsp)
cmp ... | _Z5func0St6vectorIS_IiSaIiEESaIS1_EEi:
endbr64
push r15
push r14
push r13
push r12
push rbp
movsxd rbp, esi
push rbx
sub rsp, 58h
mov [rsp+88h+var_88], rdi
mov rax, fs:28h
mov [rsp+88h+var_40], rax
mov rax, rbp
shr rax, 3Dh
jnz loc_1C51
pxor xmm0, xmm0
lea r13, [rbp... | double func0(int ***a1, int a2)
{
unsigned long long v3; // r13
unsigned long long v4; // r15
char *v5; // rax
char *v6; // rbx
void *v7; // r14
void **v8; // rbx
long long v9; // rbp
int *v10; // r8
int **v11; // r11
int *v12; // r9
int v13; // eax
long long v14; // rax
int *v15; // rsi
_D... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
MOVSXD RBP,ESI
PUSH RBX
SUB RSP,0x58
MOV qword ptr [RSP],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x48],RAX
MOV RAX,RBP
SHR RAX,0x3d
JNZ 0x00101c51
PXOR XMM0,XMM0
LEA R13,[RBP + RBP*0x2]
MOV R12,RBP
MOVUPS xmmword ptr [RSP + 0x38],XMM0
SHL R13,0x3
... | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > >, int) */
double func0(vector param_1,int param_2)
{
int8 *puVar1;
int8 *puVar2;
int iVar3;
int *piVar4;
int8 *puVar5;
int *piVar6;
long lVar7;
long lVar8;
void *pvVar9;
vector ... |
2,883 | func0 | #include <iostream>
#include <vector>
#include <assert.h>
using namespace std;
| double func0(vector<vector<int>> cost, int N) {
vector<vector<int>> dp(N, vector<int>(N, 0));
dp[0][0] = cost[0][0];
for (int i = 1; i < N; i++) {
dp[i][0] = dp[i - 1][0] + cost[i][0];
}
for (int j = 1; j < N; j++) {
dp[0][j] = dp[0][j - 1] + cost[0][j];
}
for ... | int main() {
assert(func0({{1, 2, 3}, {6, 5, 4}, {7, 3, 9}}, 3) == 5.2);
assert(func0({{2, 3, 4}, {7, 6, 5}, {8, 4, 10}}, 3) == 6.2);
assert(func0({{3, 4, 5}, {8, 7, 6}, {9, 5, 11}}, 3) == 7.2);
cout << "All assertions passed." << endl;
return 0;
}
| O3 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >, int):
endbr64
movabs $0x1fffffffffffffff,%rax
push %r15
push %r14
push %r13
movslq %esi,%r13
push %r12
push %rbp
push %rbx
sub $0x18,%rsp
mov %rdi,0x8(%rsp)
cmp %rax,%r13
ja 1c6e... | _Z5func0St6vectorIS_IiSaIiEESaIS1_EEi:
endbr64
push r15
push r14
push r13
push r12
movsxd r12, esi
push rbp
push rbx
sub rsp, 48h
mov [rsp+78h+var_60], rdi
mov [rsp+78h+var_6C], esi
mov rax, fs:28h
mov [rsp+78h+var_40], rax
xor eax, eax
mov rax, r12
shr rax, 3Dh
jnz ... | double func0(int ***a1, int a2)
{
long long v2; // r12
unsigned long long v3; // r13
int *v4; // r14
void **v5; // rbp
void **v6; // rbx
char *v7; // rax
char *v8; // r15
int *v9; // rdi
int **v10; // r10
int *v11; // r8
int v12; // eax
long long v13; // rax
int *v14; // rsi
_DWORD *v15; //... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
MOVSXD R12,ESI
PUSH RBP
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RSP + 0x18],RDI
MOV dword ptr [RSP + 0xc],ESI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
MOV RAX,R12
SHR RAX,0x3d
JNZ 0x00101cf9
TEST R12,R12
JZ 0x00101cb3
LEA R13,[R12*0x4]
MOV RD... | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > >, int) */
double func0(vector param_1,int param_2)
{
int8 *puVar1;
ulong __n;
int8 *puVar2;
int iVar3;
int4 uVar4;
long lVar5;
int *piVar6;
int8 *puVar7;
int *piVar8;
long lVar9... |
2,884 | func0 |
#include <cassert>
#include <map>
#include <string>
#include <utility>
| std::map<std::string, std::pair<double, int>> func0(const std::map<std::string, std::pair<double, int>>& students, double h, int w) {
std::map<std::string, std::pair<double, int>> result;
for (const auto& [k, s] : students) {
if (s.first >= h && s.second >= w) {
result[k] = s;
}... | int main() {
std::map<std::string, std::pair<double, int>> students = {
{"Cierra Vega", {6.2, 70}},
{"Alden Cantrell", {5.9, 65}},
{"Kierra Gentry", {6.0, 68}},
{"Pierre Cox", {5.8, 66}}
};
std::map<std::string, std::pair<double, int>> expected1 = {
{"Cierra... | O0 | cpp | func0(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::pair<double, int>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > co... | _Z5func0RKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIdiESt4lessIS5_ESaIS6_IKS5_S7_EEEdi:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 68h
mov [rbp+var_58], rdi
mov [rbp+var_60], rsi
movsd [rbp+var_68], xmm0
mov [rbp+var_6C], edx
mov rax, fs:28h
mov [rbp+var... | long long func0(long long a1, long long a2, int a3, double a4)
{
long long v4; // rax
long long v7; // [rsp+28h] [rbp-48h] BYREF
_QWORD v8[2]; // [rsp+30h] [rbp-40h] BYREF
long long v9; // [rsp+40h] [rbp-30h]
long long v10; // [rsp+48h] [rbp-28h]
long long v11; // [rsp+50h] [rbp-20h]
unsigned long long v... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x68
MOV qword ptr [RBP + -0x58],RDI
MOV qword ptr [RBP + -0x60],RSI
MOVSD qword ptr [RBP + -0x68],XMM0
MOV dword ptr [RBP + -0x6c],EDX
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 0x001037b6... | /* func0(std::map<std::string, std::pair<double, int>, std::less<std::string >,
std::allocator<std::pair<std::string const, std::pair<double, int> > > > const&, double, int) */
map * func0(map *param_1,double param_2,int param_3)
{
char cVar1;
pair<double,int> *this;
int in_EDX;
int4 in_register_00000034;
... |
2,885 | func0 |
#include <cassert>
#include <map>
#include <string>
#include <utility>
| std::map<std::string, std::pair<double, int>> func0(const std::map<std::string, std::pair<double, int>>& students, double h, int w) {
std::map<std::string, std::pair<double, int>> result;
for (const auto& [k, s] : students) {
if (s.first >= h && s.second >= w) {
result[k] = s;
}... | int main() {
std::map<std::string, std::pair<double, int>> students = {
{"Cierra Vega", {6.2, 70}},
{"Alden Cantrell", {5.9, 65}},
{"Kierra Gentry", {6.0, 68}},
{"Pierre Cox", {5.8, 66}}
};
std::map<std::string, std::pair<double, int>> expected1 = {
{"Cierra... | O1 | cpp | func0(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::pair<double, int>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > co... | _Z5func0RKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIdiESt4lessIS5_ESaIS6_IKS5_S7_EEEdi:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 58h
mov r14, rdi
movsd [rsp+88h+var_70], xmm0
mov [rsp+88h+var_64], edx
mov rax, fs:28h
mov [rsp... | long long func0(long long a1, _QWORD *a2, size_t a3, double a4)
{
long long v4; // r12
long long v6; // rbx
int v7; // edx
long long v8; // rbp
size_t v9; // rbx
size_t v10; // rdx
size_t v11; // rbx
unsigned int v12; // eax
long long v13; // r13
size_t v14; // r13
const void *v15; // r15
long ... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x58
MOV R14,RDI
MOVSD qword ptr [RSP + 0x18],XMM0
MOV dword ptr [RSP + 0x24],EDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x48],RAX
XOR EAX,EAX
MOV dword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
LEA RAX,[RDI + 0x8]
MOV qword... | /* func0(std::map<std::string, std::pair<double, int>, std::less<std::string >,
std::allocator<std::pair<std::string const, std::pair<double, int> > > > const&, double, int) */
map * func0(map *param_1,double param_2,int param_3)
{
map *pmVar1;
ulong uVar2;
ulong uVar3;
void *__s2;
int iVar4;
_Rb_tree_... |
2,886 | func0 |
#include <cassert>
#include <map>
#include <string>
#include <utility>
| std::map<std::string, std::pair<double, int>> func0(const std::map<std::string, std::pair<double, int>>& students, double h, int w) {
std::map<std::string, std::pair<double, int>> result;
for (const auto& [k, s] : students) {
if (s.first >= h && s.second >= w) {
result[k] = s;
}... | int main() {
std::map<std::string, std::pair<double, int>> students = {
{"Cierra Vega", {6.2, 70}},
{"Alden Cantrell", {5.9, 65}},
{"Kierra Gentry", {6.0, 68}},
{"Pierre Cox", {5.8, 66}}
};
std::map<std::string, std::pair<double, int>> expected1 = {
{"Cierra... | O2 | cpp | func0(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::pair<double, int>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > co... | _Z5func0RKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIdiESt4lessIS5_ESaIS6_IKS5_S7_EEEdi:
endbr64
push r15
lea rax, [rdi+8]
push r14
push r13
push r12
mov r12, rdi
push rbp
push rbx
sub rsp, 48h
mov [rdi+18h], rax
mov rbx, [rsi+18h]
mov [rsp+78h+var_60], ... | long long func0(long long a1, long long a2, int a3, double a4)
{
long long v4; // r12
long long v5; // rbx
double v6; // xmm0_8
int v7; // r14d
long long v8; // rbp
long long v9; // r12
size_t v10; // rbx
size_t v11; // r13
size_t v12; // rdx
int v13; // eax
size_t v14; // r13
size_t v15; // r1... | func0:
ENDBR64
PUSH R15
LEA RAX,[RDI + 0x8]
PUSH R14
PUSH R13
PUSH R12
MOV R12,RDI
PUSH RBP
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RDI + 0x18],RAX
MOV RBX,qword ptr [RSI + 0x18]
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RDI + 0x20],RAX
LEA RAX,[RSI + 0x8]
MOV dword ptr [RSP + 0x14],EDX
MOV dword ptr [RDI + 0x8],0x0
M... | /* func0(std::map<std::string, std::pair<double, int>, std::less<std::string >,
std::allocator<std::pair<std::string const, std::pair<double, int> > > > const&, double, int) */
map * func0(map *param_1,double param_2,int param_3)
{
_Rb_tree_node_base *p_Var1;
double dVar2;
int4 uVar3;
void *__s2;
ulong u... |
2,887 | func0 |
#include <cassert>
#include <map>
#include <string>
#include <utility>
| std::map<std::string, std::pair<double, int>> func0(const std::map<std::string, std::pair<double, int>>& students, double h, int w) {
std::map<std::string, std::pair<double, int>> result;
for (const auto& [k, s] : students) {
if (s.first >= h && s.second >= w) {
result[k] = s;
}... | int main() {
std::map<std::string, std::pair<double, int>> students = {
{"Cierra Vega", {6.2, 70}},
{"Alden Cantrell", {5.9, 65}},
{"Kierra Gentry", {6.0, 68}},
{"Pierre Cox", {5.8, 66}}
};
std::map<std::string, std::pair<double, int>> expected1 = {
{"Cierra... | O3 | cpp | func0(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::pair<double, int>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > co... | _Z5func0RKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIdiESt4lessIS5_ESaIS6_IKS5_S7_EEEdi:
endbr64
push r15
push r14
push r13
mov r13, rdi
push r12
push rbp
push rbx
sub rsp, 58h
mov [rsp+88h+var_74], edx
movsd [rsp+88h+var_88], xmm0
mov rax, fs:28h
mov [rsp... | long long func0(long long a1, long long a2, int a3, double a4)
{
long long v4; // r13
long long v5; // rbx
double v6; // xmm0_8
int v7; // r15d
void *v8; // rax
long long v9; // rbp
size_t v10; // rbx
long long v11; // r12
const void *v12; // r14
size_t v13; // r13
size_t v14; // rdx
int v15; /... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
MOV R13,RDI
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x58
MOV dword ptr [RSP + 0x14],EDX
MOVSD qword ptr [RSP],XMM0
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x48],RAX
XOR EAX,EAX
LEA RAX,[RDI + 0x8]
MOV dword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x18],RAX
MOV RBX,qword pt... | /* func0(std::map<std::string, std::pair<double, int>, std::less<std::string >,
std::allocator<std::pair<std::string const, std::pair<double, int> > > > const&, double, int) */
map * func0(map *param_1,double param_2,int param_3)
{
_Rb_tree_node_base *p_Var1;
double dVar2;
int4 uVar3;
void *__s2;
ulong u... |
2,888 | func0 |
#include <cassert>
#include <vector>
| int func0(const std::vector<int>& nums1, const std::vector<int>& nums2) {
int result = 0;
for (size_t i = 0; i < nums1.size() && i < nums2.size(); i++) {
if (nums1[i] == nums2[i]) {
result++;
}
}
return result;
}
| int main() {
assert(func0({1, 2, 3, 4, 5, 6, 7, 8}, {2, 2, 3, 1, 2, 6, 7, 9}) == 4);
assert(func0({0, 1, 2, -1, -5, 6, 0, -3, -2, 3, 4, 6, 8}, {2, 1, 2, -1, -5, 6, 4, -3, -2, 3, 4, 6, 8}) == 11);
assert(func0({2, 4, -6, -9, 11, -12, 14, 17}, {2, 1, 2, -1, -5, 6, 4, -3}) == 1);
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x28,%rsp
mov %rdi,-0x28(%rbp)
mov %rsi,-0x30(%rbp)
movl $0x0,-0x1c(%rbp)
movq $0x0,-0x18(%rbp)
mov -0x28(%rbp),%rax
mov %rax,%rdi
callq 1948 <_Z... | _Z5func0RKSt6vectorIiSaIiEES3_:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 28h
mov [rbp+var_28], rdi
mov [rbp+var_30], rsi
mov [rbp+var_1C], 0
mov [rbp+var_18], 0
jmp short loc_12AB
loc_126F:
mov rdx, [rbp+var_18]
mov rax, [rbp+var_28]
mov rsi, rdx
mov rdi, rax
cal... | long long func0(long long a1, long long a2)
{
unsigned long long i; // rax
int v3; // ebx
unsigned int v6; // [rsp+14h] [rbp-1Ch]
unsigned long long v7; // [rsp+18h] [rbp-18h]
v6 = 0;
v7 = 0LL;
for ( i = std::vector<int>::size(a1); v7 < i && v7 < std::vector<int>::size(a2); i = std::vector<int>::size(a1... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x28
MOV qword ptr [RBP + -0x28],RDI
MOV qword ptr [RBP + -0x30],RSI
MOV dword ptr [RBP + -0x1c],0x0
MOV qword ptr [RBP + -0x18],0x0
JMP 0x001012ab
LAB_0010126f:
MOV RDX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x28]
MOV RSI,RDX
MOV RDI,RAX
CALL 0x001019d8
M... | /* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> >
const&) */
int func0(vector *param_1,vector *param_2)
{
int iVar1;
bool bVar2;
int *piVar3;
ulong uVar4;
int4 local_24;
int8 local_20;
local_24 = 0;
local_20 = 0;
do {
uVar4 = std::vector<int,std... |
2,889 | func0 |
#include <cassert>
#include <vector>
| int func0(const std::vector<int>& nums1, const std::vector<int>& nums2) {
int result = 0;
for (size_t i = 0; i < nums1.size() && i < nums2.size(); i++) {
if (nums1[i] == nums2[i]) {
result++;
}
}
return result;
}
| int main() {
assert(func0({1, 2, 3, 4, 5, 6, 7, 8}, {2, 2, 3, 1, 2, 6, 7, 9}) == 4);
assert(func0({0, 1, 2, -1, -5, 6, 0, -3, -2, 3, 4, 6, 8}, {2, 1, 2, -1, -5, 6, 4, -3, -2, 3, 4, 6, 8}) == 11);
assert(func0({2, 4, -6, -9, 11, -12, 14, 17}, {2, 1, 2, -1, -5, 6, 4, -3}) == 1);
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&):
endbr64
mov (%rdi),%rcx
mov 0x8(%rdi),%rax
sub %rcx,%rax
sar $0x2,%rax
mov %rax,%r8
je 123a <_Z5func0RKSt6vectorIiSaIiEES3_+0x31>
mov (%rsi),%rdi
mov 0x8(%rsi),%rdx
sub %rdi,%rdx
sar $0x2,... | _Z5func0RKSt6vectorIiSaIiEES3_:
endbr64
mov rax, [rdi+8]
mov rcx, [rdi]
mov rdi, rax
sub rdi, rcx
sar rdi, 2
cmp rax, rcx
jz short loc_125A
mov r8, [rsi]
mov rdx, [rsi+8]
sub rdx, r8
sar rdx, 2
mov eax, 0
mov esi, 0
jmp short loc_1249
loc_123D:
add esi, 1
loc... | long long func0(long long *a1, long long *a2)
{
long long v2; // rax
long long v3; // rcx
unsigned long long v4; // rdi
long long v5; // r8
long long v6; // rdx
unsigned long long v7; // rax
unsigned int v8; // esi
v2 = a1[1];
v3 = *a1;
v4 = (v2 - *a1) >> 2;
if ( v2 == v3 )
{
return 0;
}... | func0:
ENDBR64
MOV RAX,qword ptr [RDI + 0x8]
MOV RCX,qword ptr [RDI]
MOV RDI,RAX
SUB RDI,RCX
SAR RDI,0x2
CMP RAX,RCX
JZ 0x0010125a
MOV R8,qword ptr [RSI]
MOV RDX,qword ptr [RSI + 0x8]
SUB RDX,R8
SAR RDX,0x2
MOV EAX,0x0
MOV ESI,0x0
JMP 0x00101249
LAB_0010123d:
ADD ESI,0x1
LAB_00101240:
ADD RAX,0x1
CMP RAX,RDI
JNC 0x0010... | /* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> >
const&) */
int func0(vector *param_1,vector *param_2)
{
long lVar1;
ulong uVar2;
int iVar3;
lVar1 = *(long *)param_1;
if (*(long *)(param_1 + 8) == lVar1) {
iVar3 = 0;
}
else {
uVar2 = 0;
iVa... |
2,890 | func0 |
#include <cassert>
#include <vector>
| int func0(const std::vector<int>& nums1, const std::vector<int>& nums2) {
int result = 0;
for (size_t i = 0; i < nums1.size() && i < nums2.size(); i++) {
if (nums1[i] == nums2[i]) {
result++;
}
}
return result;
}
| int main() {
assert(func0({1, 2, 3, 4, 5, 6, 7, 8}, {2, 2, 3, 1, 2, 6, 7, 9}) == 4);
assert(func0({0, 1, 2, -1, -5, 6, 0, -3, -2, 3, 4, 6, 8}, {2, 1, 2, -1, -5, 6, 4, -3, -2, 3, 4, 6, 8}) == 11);
assert(func0({2, 4, -6, -9, 11, -12, 14, 17}, {2, 1, 2, -1, -5, 6, 4, -3}) == 1);
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&):
endbr64
mov (%rdi),%r8
mov 0x8(%rdi),%rdx
sub %r8,%rdx
sar $0x2,%rdx
je 165f <_Z5func0RKSt6vectorIiSaIiEES3_+0x4f>
mov (%rsi),%rdi
mov 0x8(%rsi),%rcx
xor %eax,%eax
xor %r9d,%r9d
sub %rdi,%... | _Z5func0RKSt6vectorIiSaIiEES3_:
endbr64
mov rax, [rdi+8]
mov rcx, [rdi]
mov rdi, rax
sub rdi, rcx
sar rdi, 2
cmp rax, rcx
jz short loc_154E
mov r8, [rsi]
mov rdx, [rsi+8]
xor eax, eax
xor esi, esi
sub rdx, r8
sar rdx, 2
jmp short loc_1546
loc_1530:
mov r9d, [... | long long func0(long long *a1, long long *a2)
{
long long v2; // rax
long long v3; // rcx
unsigned long long v4; // rdi
long long v5; // r8
long long v6; // rdx
unsigned long long v7; // rax
unsigned int v8; // esi
long long v9; // rdx
v2 = a1[1];
v3 = *a1;
v4 = (v2 - *a1) >> 2;
if ( v2 == v3 ... | func0:
ENDBR64
MOV RAX,qword ptr [RDI + 0x8]
MOV RCX,qword ptr [RDI]
MOV RDI,RAX
SUB RDI,RCX
SAR RDI,0x2
CMP RAX,RCX
JZ 0x0010154e
MOV R8,qword ptr [RSI]
MOV RDX,qword ptr [RSI + 0x8]
XOR EAX,EAX
XOR ESI,ESI
SUB RDX,R8
SAR RDX,0x2
JMP 0x00101546
LAB_00101530:
MOV R9D,dword ptr [R8 + RAX*0x4]
CMP dword ptr [RCX + RAX*0x... | /* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> >
const&) */
int func0(vector *param_1,vector *param_2)
{
long lVar1;
ulong uVar2;
int iVar3;
lVar1 = *(long *)param_1;
if (*(long *)(param_1 + 8) == lVar1) {
iVar3 = 0;
}
else {
uVar2 = 0;
iVa... |
2,891 | func0 |
#include <cassert>
#include <vector>
| int func0(const std::vector<int>& nums1, const std::vector<int>& nums2) {
int result = 0;
for (size_t i = 0; i < nums1.size() && i < nums2.size(); i++) {
if (nums1[i] == nums2[i]) {
result++;
}
}
return result;
}
| int main() {
assert(func0({1, 2, 3, 4, 5, 6, 7, 8}, {2, 2, 3, 1, 2, 6, 7, 9}) == 4);
assert(func0({0, 1, 2, -1, -5, 6, 0, -3, -2, 3, 4, 6, 8}, {2, 1, 2, -1, -5, 6, 4, -3, -2, 3, 4, 6, 8}) == 11);
assert(func0({2, 4, -6, -9, 11, -12, 14, 17}, {2, 1, 2, -1, -5, 6, 4, -3}) == 1);
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&):
endbr64
mov (%rdi),%r8
mov 0x8(%rdi),%rdx
sub %r8,%rdx
sar $0x2,%rdx
je 155f <_Z5func0RKSt6vectorIiSaIiEES3_+0x4f>
mov (%rsi),%rdi
mov 0x8(%rsi),%rcx
xor %eax,%eax
xor %r9d,%r9d
sub %rdi,%... | _Z5func0RKSt6vectorIiSaIiEES3_:
endbr64
mov rax, [rdi+8]
mov rcx, [rdi]
mov rdi, rax
sub rdi, rcx
sar rdi, 2
cmp rax, rcx
jz short loc_154E
mov r8, [rsi]
mov rdx, [rsi+8]
xor eax, eax
xor esi, esi
sub rdx, r8
sar rdx, 2
jmp short loc_1546
loc_1530:
mov r9d, [... | long long func0(long long *a1, long long *a2)
{
long long v2; // rax
long long v3; // rcx
unsigned long long v4; // rdi
long long v5; // r8
long long v6; // rdx
unsigned long long v7; // rax
unsigned int v8; // esi
long long v9; // rdx
v2 = a1[1];
v3 = *a1;
v4 = (v2 - *a1) >> 2;
if ( v2 == v3 ... | func0:
ENDBR64
MOV RAX,qword ptr [RDI + 0x8]
MOV RCX,qword ptr [RDI]
MOV RDI,RAX
SUB RDI,RCX
SAR RDI,0x2
CMP RAX,RCX
JZ 0x0010154e
MOV R8,qword ptr [RSI]
MOV RDX,qword ptr [RSI + 0x8]
XOR EAX,EAX
XOR ESI,ESI
SUB RDX,R8
SAR RDX,0x2
JMP 0x00101546
LAB_00101530:
MOV R9D,dword ptr [R8 + RAX*0x4]
CMP dword ptr [RCX + RAX*0x... | /* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> >
const&) */
int func0(vector *param_1,vector *param_2)
{
long lVar1;
ulong uVar2;
int iVar3;
lVar1 = *(long *)param_1;
if (*(long *)(param_1 + 8) == lVar1) {
iVar3 = 0;
}
else {
uVar2 = 0;
iVa... |
2,892 | func0 |
#include <cassert>
#include <string>
| int func0(int base, int power) {
std::string result = "1";
for(int i = 0; i < power; ++i) {
int carry = 0;
for(int j = result.size() - 1; j >= 0; --j) {
int digit = (result[j] - '0') * base + carry;
result[j] = (digit % 10) + '0';
carry = digit / 10;
... | int main(){
assert(func0(2, 100) == 115);
assert(func0(8, 10) == 37);
assert(func0(8, 15) == 62);
}
| O0 | cpp | func0(int, int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x78,%rsp
mov %edi,-0x74(%rbp)
mov %esi,-0x78(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
lea -0x50(%rbp),%rax
mov %rax,%rdi
callq 2310 <_ZNSaIcEC1Ev@plt>
lea -0x50(%rbp),%rdx
lea -0x40(%rbp),%rax
lea ... | _Z5func0ii:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 88h
mov [rbp+var_84], edi
mov [rbp+var_88], esi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_58]
mov [rbp+var_48], rax
nop
nop
lea rdx, [rbp+var_58]
lea rax, [rbp+var_40]
lea rcx, un... | long long func0(int a1, int a2)
{
int i; // [rsp+1Ch] [rbp-74h]
int v4; // [rsp+20h] [rbp-70h]
int j; // [rsp+24h] [rbp-6Ch]
unsigned int v6; // [rsp+28h] [rbp-68h]
int v7; // [rsp+2Ch] [rbp-64h]
long long v8; // [rsp+30h] [rbp-60h] BYREF
long long v9; // [rsp+38h] [rbp-58h] BYREF
_BYTE *v10; // [rsp+4... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x88
MOV dword ptr [RBP + -0x84],EDI
MOV dword ptr [RBP + -0x88],ESI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x58]
MOV qword ptr [RBP + -0x48],RAX
NOP
NOP
LEA RDX,[RBP + -0x58]
LEA RAX,[RBP + -0x40]
LEA RCX,[0x102008]
M... | /* func0(int, int) */
int func0(int param_1,int param_2)
{
bool bVar1;
char *pcVar2;
long in_FS_OFFSET;
int local_7c;
int local_78;
int local_74;
int local_70;
int8 local_68;
int8 local_60;
string *local_58;
int8 *local_50;
string local_48 [40];
long local_20;
local_20 = *(long *)(in_FS... |
2,893 | func0 |
#include <cassert>
#include <string>
| int func0(int base, int power) {
std::string result = "1";
for(int i = 0; i < power; ++i) {
int carry = 0;
for(int j = result.size() - 1; j >= 0; --j) {
int digit = (result[j] - '0') * base + carry;
result[j] = (digit % 10) + '0';
carry = digit / 10;
... | int main(){
assert(func0(2, 100) == 115);
assert(func0(8, 10) == 37);
assert(func0(8, 15) == 62);
}
| O1 | cpp | func0(int, int):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x38,%rsp
mov %fs:0x28,%rax
mov %rax,0x28(%rsp)
xor %eax,%eax
lea 0x10(%rsp),%rax
mov %rax,(%rsp)
movb $0x31,0x10(%rsp)
movq $0x1,0x8(%rsp)
movb $0x0,0x11(%rsp)
test %esi,%esi
jle 1347 <_Z5... | _Z5func0ii:
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
lea rax, [rsp+68h+var_58]
mov [rsp+68h+var_68], rax
mov byte ptr [rsp+68h+var_58], 31h ; '1'
mov [rsp+68h+var_60], 1
mov byt... | long long func0(int a1, int a2)
{
int i; // r12d
int v3; // ebx
long long v4; // rdx
int v5; // eax
char *v6; // rdi
char *v7; // rcx
char *v8; // rax
unsigned int v9; // ebx
void *v11; // [rsp+0h] [rbp-68h] BYREF
long long v12; // [rsp+8h] [rbp-60h]
_QWORD v13[11]; // [rsp+10h] [rbp-58h] BYREF
... | 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
LEA RAX,[RSP + 0x10]
MOV qword ptr [RSP],RAX
MOV byte ptr [RSP + 0x10],0x31
MOV qword ptr [RSP + 0x8],0x1
MOV byte ptr [RSP + 0x11],0x0
TEST ESI,ESI
JLE 0x001013b6
MOV... | /* func0(int, int) */
int func0(int param_1,int param_2)
{
int iVar1;
int iVar2;
long lVar3;
char *pcVar4;
char *pcVar5;
int iVar6;
int iVar7;
long in_FS_OFFSET;
char *local_68;
long local_60;
char local_58;
char cStack_57;
int6 uStack_56;
long local_40;
local_40 = *(long *)(in_FS_OFF... |
2,894 | func0 |
#include <cassert>
#include <string>
| int func0(int base, int power) {
std::string result = "1";
for(int i = 0; i < power; ++i) {
int carry = 0;
for(int j = result.size() - 1; j >= 0; --j) {
int digit = (result[j] - '0') * base + carry;
result[j] = (digit % 10) + '0';
carry = digit / 10;
... | int main(){
assert(func0(2, 100) == 115);
assert(func0(8, 10) == 37);
assert(func0(8, 15) == 62);
}
| O2 | cpp | func0(int, int):
endbr64
push %r15
mov $0x31,%edx
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x48,%rsp
mov %fs:0x28,%rax
mov %rax,0x38(%rsp)
xor %eax,%eax
lea 0x20(%rsp),%rax
mov %dx,0x20(%rsp)
mov %rax,0x8(%rsp)
mov %rax,0x10(%rsp)
movq $0x1,0x18(%rsp)
test %esi,%... | _Z5func0ii:
endbr64
push r15
mov edx, 31h ; '1'
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 48h
mov rax, fs:28h
mov [rsp+78h+var_40], rax
xor eax, eax
lea rax, [rsp+78h+var_58]
mov word ptr [rsp+78h+var_58], dx
mov [rsp+78h+var_70], rax
mov [rsp+78h+var_68... | long long func0(int a1, int a2)
{
char *v3; // rdi
long long v4; // rcx
int i; // r14d
char *v6; // rdi
int v7; // eax
int v8; // ebx
long long v9; // rdx
_BYTE *v10; // rcx
char *v11; // rcx
char *v12; // rax
unsigned int v13; // ebx
int v14; // edx
void *v16; // [rsp+10h] [rbp-68h] BYREF
... | func0:
ENDBR64
PUSH R15
MOV EDX,0x31
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x48
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
LEA RAX,[RSP + 0x20]
MOV word ptr [RSP + 0x20],DX
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x18],0x1
TEST ESI,ESI... | /* func0(int, int) */
int func0(int param_1,int param_2)
{
char cVar1;
int iVar2;
char *pcVar3;
int iVar4;
long lVar5;
char *pcVar6;
ulong uVar7;
int iVar8;
char *pcVar9;
int iVar10;
long in_FS_OFFSET;
char *local_68;
long local_60;
int2 local_58;
int6 uStack_56;
long local_40;
lo... |
2,895 | func0 |
#include <cassert>
#include <string>
| int func0(int base, int power) {
std::string result = "1";
for(int i = 0; i < power; ++i) {
int carry = 0;
for(int j = result.size() - 1; j >= 0; --j) {
int digit = (result[j] - '0') * base + carry;
result[j] = (digit % 10) + '0';
carry = digit / 10;
... | int main(){
assert(func0(2, 100) == 115);
assert(func0(8, 10) == 37);
assert(func0(8, 15) == 62);
}
| O3 | cpp | func0(int, int):
endbr64
push %r15
push %r14
push %r13
push %r12
mov %edi,%r12d
push %rbp
push %rbx
sub $0x48,%rsp
mov %fs:0x28,%rax
mov %rax,0x38(%rsp)
xor %eax,%eax
lea 0x20(%rsp),%rdi
mov $0x31,%eax
movq $0x1,0x18(%rsp)
mov %rdi,0x8(%rsp)
mov %rdi,0x10(%rsp)
mov %ax,0x20(%... | _Z5func0ii:
endbr64
push r15
mov edx, 31h ; '1'
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 48h
mov rax, fs:28h
mov [rsp+78h+var_40], rax
xor eax, eax
lea rax, [rsp+78h+var_58]
mov word ptr [rsp+78h+var_58], dx
mov [rsp+78h+var_70], rax
mov [rsp+78h+var_68... | long long func0(int a1, int a2)
{
__m128i *v3; // rdi
long long v4; // rcx
int v5; // r14d
__int8 *v6; // rdx
int v7; // eax
int v8; // ebx
long long v9; // rdx
_BYTE *v10; // rcx
char *v11; // rsi
__m128i v12; // xmm3
const __m128i *v13; // rax
unsigned long long v14; // r8
__m128i si128; //... | func0:
ENDBR64
PUSH R15
MOV EDX,0x31
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x48
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
LEA RAX,[RSP + 0x20]
MOV word ptr [RSP + 0x20],DX
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x18],0x1
TEST ESI,ESI... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(int, int) */
int func0(int param_1,int param_2)
{
int auVar1 [14];
int auVar2 [12];
unkbyte10 Var3;
int auVar4 [12];
int auVar5 [12];
int auVar6 [14];
int auVar7 [12];
int auVar8 [12];
int auVar9 [12];
un... |
2,896 | func0 |
#include <iostream>
#include <string>
#include <vector>
#include <regex>
#include <assert.h>
| std::vector<std::string> func0(const std::string& text1) {
std::regex pattern(R"(\"([^\"]*)\")");
std::smatch matches;
std::vector<std::string> results;
std::string::const_iterator searchStart(text1.cbegin());
while (regex_search(searchStart, text1.cend(), matches, pattern)) {
results.... | int main() {
std::vector<std::string> result1 = func0("Cortex \"A53\" Based \"multi\" tasking \"Processor\"");
assert((result1[0] == "A53" && result1[1] == "multi" && result1[2] == "Processor"));
std::vector<std::string> result2 = func0("Cast your \"favorite\" entertainment \"apps\"");
assert(... | 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 $0x98,%rsp
mov %rdi,-0x98(%rbp)
mov %rsi,-0xa0(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
lea -0x80(%rbp),%rax
mov $0x10,%edx
lea ... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 98h
mov [rbp+var_98], rdi
mov [rbp+var_A0], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_80]
mov edx, 10h
lea rcx, asc_33051; "\\\"([^... | long long func0(long long a1, long long a2)
{
long long v2; // rax
long long v3; // rax
long long i; // [rsp+18h] [rbp-88h]
_BYTE v6[32]; // [rsp+20h] [rbp-80h] BYREF
_BYTE v7[32]; // [rsp+40h] [rbp-60h] BYREF
_BYTE v8[40]; // [rsp+60h] [rbp-40h] BYREF
unsigned long long v9; // [rsp+88h] [rbp-18h]
v9 ... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x98
MOV qword ptr [RBP + -0x98],RDI
MOV qword ptr [RBP + -0xa0],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x80]
MOV EDX,0x10
LEA RCX,[0x133051]
MOV RSI,RCX
MOV RDI,RAX
LAB_00104b6c:
CALL 0x00106400
LEA RAX,[RBP + -0x... | /* func0(std::string const&) */
string * func0(string *param_1)
{
bool bVar1;
__normal_iterator _Var2;
int8 uVar3;
int8 *puVar4;
long in_FS_OFFSET;
int8 local_90;
regex local_88 [32];
match_results<__normal_iterator<char_const*,std::string>,std::allocator<std::sub_match<__normal_iterator<char_const*,s... |
2,897 | func0 |
#include <iostream>
#include <string>
#include <vector>
#include <regex>
#include <assert.h>
| std::vector<std::string> func0(const std::string& text1) {
std::regex pattern(R"(\"([^\"]*)\")");
std::smatch matches;
std::vector<std::string> results;
std::string::const_iterator searchStart(text1.cbegin());
while (regex_search(searchStart, text1.cend(), matches, pattern)) {
results.... | int main() {
std::vector<std::string> result1 = func0("Cortex \"A53\" Based \"multi\" tasking \"Processor\"");
assert((result1[0] == "A53" && result1[1] == "multi" && result1[2] == "Processor"));
std::vector<std::string> result2 = func0("Cast your \"favorite\" entertainment \"apps\"");
assert(... | O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x1f0,%rsp
mov %rdi,%rbx
mov %rsi,%rbp
mov %fs:0x28,%rax
mov %rax,0x1e8(%rsp)
xor %eax,%eax
lea 0x30(%rsp),%r13
mov %r13,%rdi
ca... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 1F8h
mov rbx, rdi
mov r15, rsi
mov rax, fs:28h
mov [rbp+var_38], rax
xor eax, eax
lea r12, [rbp+var_208]
mov rdi, r12;... | _QWORD * func0(_QWORD *a1, long long *a2)
{
char *v4; // rsi
long long v5; // rdx
long long v6; // rax
long long v7; // rdi
_DWORD *v8; // r12
volatile signed __int32 *v9; // rcx
long long v10; // rdx
signed __int32 v11; // eax
long long i; // rdi
_BYTE *v13; // r14
long long v14; // r13
size_t ... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x1f8
MOV RBX,RDI
MOV R15,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x38],RAX
XOR EAX,EAX
LEA R12,[RBP + -0x208]
MOV RDI,R12
CALL 0x001046f0
MOV qword ptr [RBP + -0x200],0x0
MOV qword ptr [RBP + -0x1f8],0x0
LEA RDI,[RBP... | /* func0(std::string const&) */
string * func0(string *param_1)
{
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
int *__src;
long *plVar2;
_Sp_counted_base<(_Lock_policy)2> *p_Var3;
bool bVar4;
int iVar5;
uint uVar6;
ulong uVar7;
int8 *puVar8;
uint uVar9;
long lVar10;
int8 *in_RSI;
int8 uVar11;
... |
2,898 | func0 |
#include <iostream>
#include <string>
#include <vector>
#include <regex>
#include <assert.h>
| std::vector<std::string> func0(const std::string& text1) {
std::regex pattern(R"(\"([^\"]*)\")");
std::smatch matches;
std::vector<std::string> results;
std::string::const_iterator searchStart(text1.cbegin());
while (regex_search(searchStart, text1.cend(), matches, pattern)) {
results.... | int main() {
std::vector<std::string> result1 = func0("Cortex \"A53\" Based \"multi\" tasking \"Processor\"");
assert((result1[0] == "A53" && result1[1] == "multi" && result1[2] == "Processor"));
std::vector<std::string> result2 = func0("Cast your \"favorite\" entertainment \"apps\"");
assert(... | O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r15
mov %rsi,%r15
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x228,%rsp
mov %fs:0x28,%rax
mov %rax,0x218(%rsp)
xor %eax,%eax
lea 0x60(%rsp),%r13
lea ... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r15
push r14
lea r15, [rbp+var_208]
push r13
mov r13, rsi
push r12
push rbx
mov rbx, rdi
mov rdi, r15; this
sub rsp, 218h
mov rax, fs:28h
mov [rbp+var_38], rax
xor eax... | long long func0(long long a1, long long *a2)
{
char *v4; // rsi
__m128i v5; // xmm0
long long v6; // rax
signed __int32 *v7; // rdi
long long v8; // rdx
volatile signed __int32 *v9; // rcx
signed __int32 v10; // eax
long long v11; // rdi
long long v12; // rdx
volatile signed __int32 *v13; // rcx
... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
LEA R15,[RBP + -0x208]
PUSH R13
MOV R13,RSI
PUSH R12
PUSH RBX
MOV RBX,RDI
MOV RDI,R15
SUB RSP,0x218
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x38],RAX
XOR EAX,EAX
MOV qword ptr [RBP + -0x240],R15
CALL 0x001036d0
LEA RDX,[0x11974b]
PXOR XMM0,XMM0
LEA RDI,[RB... | /* WARNING: Restarted to delay deadcode elimination for space: stack */
/* func0(std::string const&) */
string * func0(string *param_1)
{
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
int *__src;
int auVar2 [16];
bool bVar3;
int iVar4;
int8 *puVar5;
uint uVar6;
uint uVar7;
long lVar8;
int8 *in_RSI;
... |
2,899 | func0 |
#include <iostream>
#include <string>
#include <vector>
#include <regex>
#include <assert.h>
| std::vector<std::string> func0(const std::string& text1) {
std::regex pattern(R"(\"([^\"]*)\")");
std::smatch matches;
std::vector<std::string> results;
std::string::const_iterator searchStart(text1.cbegin());
while (regex_search(searchStart, text1.cend(), matches, pattern)) {
results.... | int main() {
std::vector<std::string> result1 = func0("Cortex \"A53\" Based \"multi\" tasking \"Processor\"");
assert((result1[0] == "A53" && result1[1] == "multi" && result1[2] == "Processor"));
std::vector<std::string> result2 = func0("Cast your \"favorite\" entertainment \"apps\"");
assert(... | O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r15
mov %rsi,%r15
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x228,%rsp
mov %fs:0x28,%rax
mov %rax,0x218(%rsp)
xor %eax,%eax
lea 0x60(%rsp),%r13
lea ... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
push r14
push r13
mov r13, rdi
push r12
push rbp
push rbx
sub rsp, 2F8h
mov [rsp+328h+var_318], rsi
lea rbx, [rsp+328h+var_2A0]
mov rdi, rbx; this
mov rax, fs:28h
mov [rsp+328h+var_40], rax
xor... | long long func0(long long a1, long long *a2)
{
char *v3; // rsi
__m128i v4; // xmm0
long long v5; // rdi
void *v6; // rdi
void **v7; // rbx
unsigned long long v8; // rbp
void *v9; // rdi
long long *v10; // rax
_QWORD *v11; // rdx
long long v12; // r12
long long v13; // rbx
unsigned long long v1... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
MOV R13,RDI
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x2f8
MOV qword ptr [RSP + 0x10],RSI
LEA RBX,[RSP + 0x88]
MOV RDI,RBX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x2e8],RAX
XOR EAX,EAX
MOV qword ptr [RSP + 0x38],RBX
CALL 0x00104710
LEA RDX,[0x11a790]
PXOR XMM0,XMM0
LEA RDI,... | /* func0(std::string const&) */
string * func0(string *param_1)
{
int *__src;
int8 uVar1;
void *pvVar2;
int auVar3 [16];
bool bVar4;
int auVar5 [16];
char cVar6;
int8 *puVar7;
long lVar8;
int (*pauVar9) [16];
int (*pauVar10) [16];
int8 *puVar11;
void *pvVar12;
long *plVar13;
uint uVar14;... |
2,900 | func0 |
#include <vector>
#include <tuple>
#include <cassert>
| std::tuple<int, int, int, int> func0(const std::tuple<int, int, int, int, int>& test_tup) {
int first, second, third, fourth, fifth;
std::tie(first, second, third, fourth, fifth) = test_tup;
return std::make_tuple(first*second, second*third, third*fourth, fourth*fifth);
}
| int main() {
assert(func0(std::make_tuple(1, 5, 7, 8, 10)) == std::make_tuple(5, 35, 56, 80));
assert(func0(std::make_tuple(2, 4, 5, 6, 7)) == std::make_tuple(8, 20, 30, 42));
assert(func0(std::make_tuple(12, 13, 14, 9, 15)) == std::make_tuple(156, 182, 126, 135));
return 0;
}
| O0 | cpp | func0(std::tuple<int, int, int, int, int> const&):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x60,%rsp
mov %rdi,-0x58(%rbp)
mov %rsi,-0x60(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x8(%rbp)
xor %eax,%eax
lea -0x30(%rbp),%rax
lea -0x40(%rbp),%r8
lea -0x44(%rbp),%rdi
lea -0x48(%rbp),%rcx
lea -0x... | _Z5func0RKSt5tupleIJiiiiiEE:
endbr64
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_58], rdi
mov [rbp+var_60], rsi
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
lea rax, [rbp+var_30]
lea r8, [rbp+var_40]
lea rdi, [rbp+var_44]
lea rcx, [rbp+var_48]
lea rdx, [rbp+va... | long long func0(long long a1, long long a2)
{
int v3; // [rsp+10h] [rbp-50h] BYREF
int v4; // [rsp+14h] [rbp-4Ch] BYREF
int v5; // [rsp+18h] [rbp-48h] BYREF
int v6; // [rsp+1Ch] [rbp-44h] BYREF
int v7; // [rsp+20h] [rbp-40h] BYREF
int v8; // [rsp+24h] [rbp-3Ch] BYREF
int v9; // [rsp+28h] [rbp-38h] BYREF
... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x58],RDI
MOV qword ptr [RBP + -0x60],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x30]
LEA R8,[RBP + -0x40]
LEA RDI,[RBP + -0x44]
LEA RCX,[RBP + -0x48]
LEA RDX,[RBP + -0x4c]
LEA RSI,[RBP + -0x50]
MOV R... | /* func0(std::tuple<int, int, int, int, int> const&) */
tuple * func0(tuple *param_1)
{
tuple *in_RSI;
long in_FS_OFFSET;
int local_58;
int local_54;
int local_50;
int local_4c;
int local_48;
int local_44;
int local_40;
int local_3c;
int local_38 [10];
long local_10;
local_10 = *(long *)(... |
2,901 | func0 |
#include <vector>
#include <tuple>
#include <cassert>
| std::tuple<int, int, int, int> func0(const std::tuple<int, int, int, int, int>& test_tup) {
int first, second, third, fourth, fifth;
std::tie(first, second, third, fourth, fifth) = test_tup;
return std::make_tuple(first*second, second*third, third*fourth, fourth*fifth);
}
| int main() {
assert(func0(std::make_tuple(1, 5, 7, 8, 10)) == std::make_tuple(5, 35, 56, 80));
assert(func0(std::make_tuple(2, 4, 5, 6, 7)) == std::make_tuple(8, 20, 30, 42));
assert(func0(std::make_tuple(12, 13, 14, 9, 15)) == std::make_tuple(156, 182, 126, 135));
return 0;
}
| O1 | cpp | func0(std::tuple<int, int, int, int, int> const&):
endbr64
mov %rdi,%rax
mov 0xc(%rsi),%edx
mov 0x8(%rsi),%edi
mov 0x4(%rsi),%ecx
mov %edx,%r8d
imul 0x10(%rsi),%r8d
mov %ecx,%r9d
imul (%rsi),%r9d
mov %r9d,(%rax)
imul %edi,%ecx
mov %ecx,0x4(%rax)
imul %edi,%edx
mov %edx,0x8(%rax)
mov ... | _Z5func0RKSt5tupleIJiiiiiEE:
endbr64
mov rax, rdi
mov edx, [rsi+0Ch]
mov edi, [rsi+8]
mov ecx, [rsi+4]
mov r8d, edx
imul r8d, [rsi+10h]
mov r9d, ecx
imul r9d, [rsi]
mov [rax], r9d
imul ecx, edi
mov [rax+4], ecx
imul edx, edi
mov [rax+8], edx
mov [rax+0Ch], r8d
retn | _DWORD * func0(_DWORD *a1, _DWORD *a2)
{
_DWORD *result; // rax
int v3; // edx
int v4; // edi
int v5; // ecx
int v6; // r8d
result = a1;
v3 = a2[3];
v4 = a2[2];
v5 = a2[1];
v6 = a2[4] * v3;
*result = *a2 * v5;
result[1] = v4 * v5;
result[2] = v4 * v3;
result[3] = v6;
return result;
} | func0:
ENDBR64
MOV RAX,RDI
MOV EDX,dword ptr [RSI + 0xc]
MOV EDI,dword ptr [RSI + 0x8]
MOV ECX,dword ptr [RSI + 0x4]
MOV R8D,EDX
IMUL R8D,dword ptr [RSI + 0x10]
MOV R9D,ECX
IMUL R9D,dword ptr [RSI]
MOV dword ptr [RAX],R9D
IMUL ECX,EDI
MOV dword ptr [RAX + 0x4],ECX
IMUL EDX,EDI
MOV dword ptr [RAX + 0x8],EDX
MOV dword pt... | /* func0(std::tuple<int, int, int, int, int> const&) */
void func0(tuple *param_1)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
int *in_RSI;
iVar1 = in_RSI[3];
iVar2 = in_RSI[2];
iVar3 = in_RSI[1];
iVar4 = in_RSI[4];
*(int *)param_1 = iVar3 * *in_RSI;
*(int *)(param_1 + 4) = iVar3 * iVar2;
... |
2,902 | func0 |
#include <vector>
#include <tuple>
#include <cassert>
| std::tuple<int, int, int, int> func0(const std::tuple<int, int, int, int, int>& test_tup) {
int first, second, third, fourth, fifth;
std::tie(first, second, third, fourth, fifth) = test_tup;
return std::make_tuple(first*second, second*third, third*fourth, fourth*fifth);
}
| int main() {
assert(func0(std::make_tuple(1, 5, 7, 8, 10)) == std::make_tuple(5, 35, 56, 80));
assert(func0(std::make_tuple(2, 4, 5, 6, 7)) == std::make_tuple(8, 20, 30, 42));
assert(func0(std::make_tuple(12, 13, 14, 9, 15)) == std::make_tuple(156, 182, 126, 135));
return 0;
}
| O2 | cpp | func0(std::tuple<int, int, int, int, int> const&):
endbr64
mov 0xc(%rsi),%edx
mov 0x4(%rsi),%ecx
mov %rdi,%rax
mov 0x10(%rsi),%r8d
mov 0x8(%rsi),%edi
mov (%rsi),%r9d
imul %edx,%r8d
imul %ecx,%r9d
imul %edi,%edx
imul %edi,%ecx
mov %r8d,0xc(%rax)
mov %r9d,(%rax)
mov %edx,0x8(%rax)
mov ... | _Z5func0RKSt5tupleIJiiiiiEE:
endbr64
movdqu xmm0, xmmword ptr [rsi+4]
movdqu xmm2, xmmword ptr [rsi]
mov rax, rdi
movdqa xmm1, xmm0
psrlq xmm0, 20h ; ' '
pmuludq xmm1, xmm2
psrlq xmm2, 20h ; ' '
pmuludq xmm0, xmm2
pshufd xmm1, xmm1, 8
pshufd xmm0, xmm0, 8
punpckldq xmm1, xmm0
movups xmmword ptr [rdi], xmm... | __m128i * func0(__m128i *a1, long long a2)
{
__m128i v2; // xmm2
__m128i *result; // rax
__m128i v4; // xmm1
v2 = _mm_loadu_si128((const __m128i *)a2);
result = a1;
v4 = _mm_loadu_si128((const __m128i *)(a2 + 4));
*a1 = _mm_unpacklo_epi32(
_mm_shuffle_epi32(_mm_mul_epu32(v4, v2), 8),
... | func0:
ENDBR64
MOVDQU XMM0,xmmword ptr [RSI + 0x4]
MOVDQU XMM2,xmmword ptr [RSI]
MOV RAX,RDI
MOVDQA XMM1,XMM0
PSRLQ XMM0,0x20
PMULUDQ XMM1,XMM2
PSRLQ XMM2,0x20
PMULUDQ XMM0,XMM2
PSHUFD XMM1,XMM1,0x8
PSHUFD XMM0,XMM0,0x8
PUNPCKLDQ XMM1,XMM0
MOVUPS xmmword ptr [RDI],XMM1
RET | /* func0(std::tuple<int, int, int, int, int> const&) */
tuple * func0(tuple *param_1)
{
ulong uVar1;
ulong uVar2;
ulong *in_RSI;
uVar1 = *(ulong *)((long)in_RSI + 0xc);
uVar2 = in_RSI[1];
*(ulong *)param_1 =
CONCAT44((int)((*(ulong *)((long)in_RSI + 4) >> 0x20) * (*in_RSI >> 0x20)),
... |
2,903 | func0 |
#include <vector>
#include <tuple>
#include <cassert>
| std::tuple<int, int, int, int> func0(const std::tuple<int, int, int, int, int>& test_tup) {
int first, second, third, fourth, fifth;
std::tie(first, second, third, fourth, fifth) = test_tup;
return std::make_tuple(first*second, second*third, third*fourth, fourth*fifth);
}
| int main() {
assert(func0(std::make_tuple(1, 5, 7, 8, 10)) == std::make_tuple(5, 35, 56, 80));
assert(func0(std::make_tuple(2, 4, 5, 6, 7)) == std::make_tuple(8, 20, 30, 42));
assert(func0(std::make_tuple(12, 13, 14, 9, 15)) == std::make_tuple(156, 182, 126, 135));
return 0;
}
| O3 | cpp | func0(std::tuple<int, int, int, int, int> const&):
endbr64
movdqu 0x4(%rsi),%xmm0
movdqu (%rsi),%xmm2
mov %rdi,%rax
movdqa %xmm0,%xmm1
psrlq $0x20,%xmm0
pmuludq %xmm2,%xmm1
psrlq $0x20,%xmm2
pmuludq %xmm2,%xmm0
pshufd $0x8,%xmm1,%xmm1
pshufd $0x8,%xmm0,%xmm0
punpckldq %xmm0,%xmm1
movups %xmm1,(%rdi)
retq
nopl 0x... | _Z5func0RKSt5tupleIJiiiiiEE:
endbr64
movdqu xmm0, xmmword ptr [rsi+4]
movdqu xmm2, xmmword ptr [rsi]
mov rax, rdi
movdqa xmm1, xmm0
psrlq xmm0, 20h ; ' '
pmuludq xmm1, xmm2
psrlq xmm2, 20h ; ' '
pmuludq xmm0, xmm2
pshufd xmm1, xmm1, 8
pshufd xmm0, xmm0, 8
punpckldq xmm1, xmm0
movups xmmword ptr [rdi], xmm... | __m128i * func0(__m128i *a1, long long a2)
{
__m128i v2; // xmm2
__m128i *result; // rax
__m128i v4; // xmm1
v2 = _mm_loadu_si128((const __m128i *)a2);
result = a1;
v4 = _mm_loadu_si128((const __m128i *)(a2 + 4));
*a1 = _mm_unpacklo_epi32(
_mm_shuffle_epi32(_mm_mul_epu32(v4, v2), 8),
... | func0:
ENDBR64
MOVDQU XMM0,xmmword ptr [RSI + 0x4]
MOVDQU XMM2,xmmword ptr [RSI]
MOV RAX,RDI
MOVDQA XMM1,XMM0
PSRLQ XMM0,0x20
PMULUDQ XMM1,XMM2
PSRLQ XMM2,0x20
PMULUDQ XMM0,XMM2
PSHUFD XMM1,XMM1,0x8
PSHUFD XMM0,XMM0,0x8
PUNPCKLDQ XMM1,XMM0
MOVUPS xmmword ptr [RDI],XMM1
RET | /* func0(std::tuple<int, int, int, int, int> const&) */
tuple * func0(tuple *param_1)
{
ulong uVar1;
ulong uVar2;
ulong *in_RSI;
uVar1 = *(ulong *)((long)in_RSI + 0xc);
uVar2 = in_RSI[1];
*(ulong *)param_1 =
CONCAT44((int)((*(ulong *)((long)in_RSI + 4) >> 0x20) * (*in_RSI >> 0x20)),
... |
2,904 | func0 | #include <iostream>
#include <string>
#include <regex>
#include <cassert>
| std::string func0(const std::string& S) {
std::regex pattern("[\\W_]+");
return std::regex_replace(S, pattern, "");
}
| int main() {
assert(func0("123abcjw:, .@! eiw") == "123abcjweiw");
assert(func0("Hello1234:, ! Howare33u") == "Hello1234Howare33u");
assert(func0("Cool543Triks@:, Make@987Trips") == "Cool543TriksMake987Trips");
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 %rsi,-0x50(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
lea -0x40(%rbp),%rax
mov $0x10,%edx
lea ... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 48h
mov [rbp+var_48], rdi
mov [rbp+var_50], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_40]
mov edx, 10h
lea rcx, aW; "[\\W_]+"
mov ... | long long func0(long long a1, long long a2)
{
_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, "[\\W_]+", 16LL);
std::regex_replace<std::regex_traits<char>,char,std::char_traits... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RBP + -0x48],RDI
MOV qword ptr [RBP + -0x50],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x40]
MOV EDX,0x10
LEA RCX,[0x134051]
MOV RSI,RCX
MOV RDI,RAX
LAB_00104b63:
CALL 0x00106152
MOV RAX,qword ptr ... | /* func0(std::string const&) */
string * func0(string *param_1)
{
int8 in_RSI;
long in_FS_OFFSET;
regex local_48 [40];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
std::regex::basic_regex(local_48,"[\\W_]+",0x10);
/* try { // try from 00104b84 to 00104b88 has its CatchH... |
2,905 | func0 | #include <iostream>
#include <string>
#include <regex>
#include <cassert>
| std::string func0(const std::string& S) {
std::regex pattern("[\\W_]+");
return std::regex_replace(S, pattern, "");
}
| int main() {
assert(func0("123abcjw:, .@! eiw") == "123abcjweiw");
assert(func0("Hello1234:, ! Howare33u") == "Hello1234Howare33u");
assert(func0("Cool543Triks@:, Make@987Trips") == "Cool543TriksMake987Trips");
return 0;
}
| O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r13
push %r12
push %rbp
push %rbx
sub $0x48,%rsp
mov %rdi,%rbx
mov %rsi,%rbp
mov %fs:0x28,%rax
mov %rax,0x38(%rsp)
xor %eax,%eax
lea 0x8(%rsp),%r13
mov %r13,%rdi
callq 4730 <_ZNS... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r14
push r12
push rbx
sub rsp, 38h
mov rbx, rdi
mov r14, rsi
mov rax, fs:28h
mov [rbp+var_28], rax
xor eax, eax
lea r12, [rbp+var_50]
lea rdi, [rbp+var_48]; this
call __Z... | long long func0(long long a1, long long *a2)
{
long long v4; // rsi
_DWORD *v5; // rdi
volatile signed __int32 *v6; // rcx
long long v7; // rdx
signed __int32 v8; // eax
_BYTE v10[8]; // [rsp+0h] [rbp-50h] BYREF
_BYTE v11[8]; // [rsp+8h] [rbp-48h] BYREF
long long v12; // [rsp+10h] [rbp-40h]
long long... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV RBX,RDI
MOV R14,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
XOR EAX,EAX
LEA R12,[RBP + -0x50]
LEA RDI,[RBP + -0x48]
CALL 0x00104710
MOV qword ptr [RBP + -0x40],0x0
MOV qword ptr [RBP + -0x38],0x0
MOV ECX,0x10
LEA RDX,[0x... | /* func0(std::string const&) */
string * func0(string *param_1)
{
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
_Sp_counted_base<(_Lock_policy)2> *p_Var2;
int iVar3;
int8 *in_RSI;
long in_FS_OFFSET;
regex local_58 [8];
int local_50 [8];
int8 local_48;
_Sp_counted_base<(_Lock_policy)2> *local_40;
long... |
2,906 | func0 | #include <iostream>
#include <string>
#include <regex>
#include <cassert>
| std::string func0(const std::string& S) {
std::regex pattern("[\\W_]+");
return std::regex_replace(S, pattern, "");
}
| int main() {
assert(func0("123abcjw:, .@! eiw") == "123abcjweiw");
assert(func0("Hello1234:, ! Howare33u") == "Hello1234Howare33u");
assert(func0("Cool543Triks@:, Make@987Trips") == "Cool543TriksMake987Trips");
return 0;
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
mov %rsi,%rbx
sub $0x40,%rsp
mov %fs:0x28,%rax
mov %rax,0x38(%rsp)
xor %eax,%eax
lea 0x8(%rsp),%rbp
lea 0x18(%rsp),%r13... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r14
mov r14, rsi
push r13
lea r13, [rbp+var_50]
push r12
lea r12, [rbp+var_48]
push rbx
mov rbx, rdi
mov rdi, r12; this
sub rsp, 30h
mov rax, fs:28h
mov [rbp+var_28], rax... | long long func0(long long a1, long long *a2)
{
long long v3; // rsi
long long v4; // rdi
long long v5; // rdx
volatile signed __int32 *v6; // rcx
signed __int32 v7; // eax
long long v9; // rax
_BYTE v10[8]; // [rsp+0h] [rbp-50h] BYREF
_BYTE v11[8]; // [rsp+8h] [rbp-48h] BYREF
__int128 v12; // [rsp+10... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R14
MOV R14,RSI
PUSH R13
LEA R13,[RBP + -0x50]
PUSH R12
LEA R12,[RBP + -0x48]
PUSH RBX
MOV RBX,RDI
MOV RDI,R12
SUB RSP,0x30
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
XOR EAX,EAX
CALL 0x001046f0
LEA RDX,[0x11a695]
PXOR XMM0,XMM0
MOV RDI,R13
MOV ECX,0x10
LEA RSI,... | /* func0(std::string const&) */
string * func0(string *param_1)
{
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
int8 uVar2;
int iVar3;
int8 *in_RSI;
long in_FS_OFFSET;
regex local_58 [8];
int local_50 [8];
int local_48 [24];
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
std::locale::... |
2,907 | func0 | #include <iostream>
#include <string>
#include <regex>
#include <cassert>
| std::string func0(const std::string& S) {
std::regex pattern("[\\W_]+");
return std::regex_replace(S, pattern, "");
}
| int main() {
assert(func0("123abcjw:, .@! eiw") == "123abcjweiw");
assert(func0("Hello1234:, ! Howare33u") == "Hello1234Howare33u");
assert(func0("Cool543Triks@:, Make@987Trips") == "Cool543TriksMake987Trips");
return 0;
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
mov %rsi,%rbx
sub $0x40,%rsp
mov %fs:0x28,%rax
mov %rax,0x38(%rsp)
xor %eax,%eax
lea 0x8(%rsp),%rbp
lea 0x18(%rsp),%r13... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r15
push r14
lea r14, [rbp+var_E0]
push r13
push r12
mov r12, rsi
push rbx
mov rbx, rdi
sub rsp, 108h
mov rax, fs:28h
mov [rbp+var_38], rax
xor eax, eax
lea rax, [rbp+... | _QWORD * func0(_QWORD *a1, char **a2)
{
char *v3; // rax
long long v4; // r13
char *v5; // r15
char *v6; // r12
char v7; // al
long long v8; // rdx
long long v9; // rcx
long long v10; // r8
long long v11; // r9
unsigned long long v12; // rsi
long long v13; // rdi
volatile signed __int32 *v14; //... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
LEA R14,[RBP + -0xe0]
PUSH R13
PUSH R12
MOV R12,RSI
PUSH RBX
MOV RBX,RDI
SUB RSP,0x108
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x38],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0xd8]
MOV qword ptr [RBP + -0x130],R14
MOV RDI,RAX
MOV qword ptr [RBP + -0x128],RAX
CALL 0x... | /* func0(std::string const&) */
string * func0(string *param_1)
{
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
string sVar2;
string *psVar3;
long lVar4;
int8 uVar5;
bool bVar6;
char cVar7;
int iVar8;
int8 *puVar9;
string *psVar10;
long lVar11;
long *plVar12;
ulong uVar13;
ulong uVar14;
lon... |
2,908 | func0 |
#include <vector>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& lst1, const std::vector<int>& lst2) {
std::vector<int> res_list;
for (int i = 0; i < lst1.size(); i++) {
res_list.push_back(lst1[i] + lst2[i]);
}
return res_list;
}
| int main() {
assert(func0({10,20,30}, {15,25,35}) == std::vector<int>({25,45,65}));
assert(func0({1,2,3}, {5,6,7}) == std::vector<int>({6,8,10}));
assert(func0({15,20,30}, {15,45,75}) == std::vector<int>({30,65,105}));
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x38,%rsp
mov %rdi,-0x28(%rbp)
mov %rsi,-0x30(%rbp)
mov %rdx,-0x38(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x28(%rbp)... | _Z5func0RKSt6vectorIiSaIiEES3_:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 38h
mov [rbp+var_28], rdi
mov [rbp+var_30], rsi
mov [rbp+var_38], rdx
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_28]
mov rdi, rax
call _ZNSt6vectorIiSaIiEEC2Ev; std:... | long long func0(long long a1, long long a2, long long a3)
{
int v3; // ebx
unsigned long long v4; // rbx
int v7; // [rsp+20h] [rbp-20h] BYREF
int i; // [rsp+24h] [rbp-1Ch]
unsigned long long v9; // [rsp+28h] [rbp-18h]
v9 = __readfsqword(0x28u);
std::vector<int>::vector(a1);
for ( i = 0; ; ++i )
{
... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x38
MOV qword ptr [RBP + -0x28],RDI
MOV qword ptr [RBP + -0x30],RSI
MOV qword ptr [RBP + -0x38],RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RDI,RAX
CALL 0x00101c34
MOV dword ptr [RBP + -0x1c],0x0
JM... | /* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> >
const&) */
vector * func0(vector *param_1,vector *param_2)
{
int iVar1;
int *piVar2;
ulong uVar3;
vector<int,std::allocator<int>> *in_RDX;
ulong uVar4;
long in_FS_OFFSET;
int local_28;
int local_24;
lon... |
2,909 | func0 |
#include <vector>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& lst1, const std::vector<int>& lst2) {
std::vector<int> res_list;
for (int i = 0; i < lst1.size(); i++) {
res_list.push_back(lst1[i] + lst2[i]);
}
return res_list;
}
| int main() {
assert(func0({10,20,30}, {15,25,35}) == std::vector<int>({25,45,65}));
assert(func0({1,2,3}, {5,6,7}) == std::vector<int>({6,8,10}));
assert(func0({15,20,30}, {15,45,75}) == std::vector<int>({30,65,105}));
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&):
endbr64
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x10,%rsp
mov %rdi,%rbp
mov %rdx,%r13
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi... | _Z5func0RKSt6vectorIiSaIiEES3_:
endbr64
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 10h
mov rbp, rdi
mov r13, rdx
mov rax, fs:28h
mov [rsp+38h+var_30], rax
xor eax, eax
mov qword ptr [rdi], 0
mov qword ptr [rdi+8], 0
mov qword ptr [rdi+10h], 0
mov rdx, [r... | _QWORD * func0(_QWORD *a1, long long *a2, _QWORD *a3)
{
long long v4; // rdx
unsigned long long v6; // rbx
int v7; // eax
int *v8; // rsi
int v10; // [rsp+4h] [rbp-34h] BYREF
unsigned long long v11; // [rsp+8h] [rbp-30h]
v11 = __readfsqword(0x28u);
*a1 = 0LL;
a1[1] = 0LL;
a1[2] = 0LL;
v4 = *a2;
... | func0:
ENDBR64
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x10
MOV RBP,RDI
MOV R13,RDX
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 RDX,qword ptr [RSI]
CMP qword ptr [RSI + 0x8],RDX
JZ 0x00101313
... | /* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> >
const&) */
vector * func0(vector *param_1,vector *param_2)
{
int *piVar1;
long *in_RDX;
long lVar2;
ulong uVar3;
long in_FS_OFFSET;
int local_34;
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28... |
2,910 | func0 |
#include <vector>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& lst1, const std::vector<int>& lst2) {
std::vector<int> res_list;
for (int i = 0; i < lst1.size(); i++) {
res_list.push_back(lst1[i] + lst2[i]);
}
return res_list;
}
| int main() {
assert(func0({10,20,30}, {15,25,35}) == std::vector<int>({25,45,65}));
assert(func0({1,2,3}, {5,6,7}) == std::vector<int>({6,8,10}));
assert(func0({15,20,30}, {15,45,75}) == std::vector<int>({30,65,105}));
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&):
endbr64
push %r14
push %r13
mov %rdx,%r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x10,%rsp
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi... | _Z5func0RKSt6vectorIiSaIiEES3_:
endbr64
push r14
pxor xmm0, xmm0
push r13
mov r13, rdx
push r12
push rbp
mov rbp, rdi
push rbx
sub rsp, 10h
mov rax, fs:28h
mov [rsp+38h+var_30], rax
xor eax, eax
movups xmmword ptr [rdi], xmm0
mov rdx, [rsi]
mov qword ptr [rdi+10h], 0
c... | long long func0(long long a1, long long *a2, _QWORD *a3)
{
long long v5; // rdx
long long v7; // rbx
int *v8; // rdi
int *v9; // rsi
int v10; // eax
int v12; // [rsp+0h] [rbp-34h] BYREF
unsigned long long v13; // [rsp+4h] [rbp-30h]
v13 = __readfsqword(0x28u);
*(_OWORD *)a1 = 0LL;
v5 = *a2;
*(_QW... | func0:
ENDBR64
PUSH R14
PXOR XMM0,XMM0
PUSH R13
MOV R13,RDX
PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
SUB RSP,0x10
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
MOVUPS xmmword ptr [RDI],XMM0
MOV RDX,qword ptr [RSI]
MOV qword ptr [RDI + 0x10],0x0
CMP qword ptr [RSI + 0x8],RDX
JZ 0x001017d0
MOV R12,R... | /* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> >
const&) */
vector * func0(vector *param_1,vector *param_2)
{
long *in_RDX;
long lVar1;
ulong uVar2;
int *piVar3;
int *piVar4;
long in_FS_OFFSET;
int local_34;
long local_30;
local_30 = *(long *)(in_F... |
2,911 | func0 |
#include <vector>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& lst1, const std::vector<int>& lst2) {
std::vector<int> res_list;
for (int i = 0; i < lst1.size(); i++) {
res_list.push_back(lst1[i] + lst2[i]);
}
return res_list;
}
| int main() {
assert(func0({10,20,30}, {15,25,35}) == std::vector<int>({25,45,65}));
assert(func0({1,2,3}, {5,6,7}) == std::vector<int>({6,8,10}));
assert(func0({15,20,30}, {15,45,75}) == std::vector<int>({30,65,105}));
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&):
endbr64
push %r14
pxor %xmm0,%xmm0
push %r13
mov %rdx,%r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x10,%rsp
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
movq $0x0,0x10(%rd... | _Z5func0RKSt6vectorIiSaIiEES3_:
endbr64
push r14
pxor xmm0, xmm0
push r13
mov r13, rdx
push r12
push rbp
mov rbp, rdi
push rbx
sub rsp, 10h
mov rax, fs:28h
mov [rsp+38h+var_30], rax
xor eax, eax
movups xmmword ptr [rdi], xmm0
mov rdx, [rsi]
mov qword ptr [rdi+10h], 0
c... | long long func0(long long a1, long long *a2, _QWORD *a3)
{
long long v5; // rdx
long long v7; // rbx
int *v8; // rdi
int *v9; // rsi
int v10; // eax
int v12; // [rsp+0h] [rbp-34h] BYREF
unsigned long long v13; // [rsp+4h] [rbp-30h]
v13 = __readfsqword(0x28u);
*(_OWORD *)a1 = 0LL;
v5 = *a2;
*(_QW... | func0:
ENDBR64
PUSH R14
PXOR XMM0,XMM0
PUSH R13
MOV R13,RDX
PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
SUB RSP,0x10
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
MOVUPS xmmword ptr [RDI],XMM0
MOV RDX,qword ptr [RSI]
MOV qword ptr [RDI + 0x10],0x0
CMP qword ptr [RSI + 0x8],RDX
JZ 0x001017d0
MOV R12,R... | /* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> >
const&) */
vector * func0(vector *param_1,vector *param_2)
{
long *in_RDX;
long lVar1;
ulong uVar2;
int *piVar3;
int *piVar4;
long in_FS_OFFSET;
int local_34;
long local_30;
local_30 = *(long *)(in_F... |
2,912 | func0 |
#include <vector>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& nums1, const std::vector<int>& nums2) {
std::vector<int> result;
for (size_t i = 0; i < nums1.size(); ++i) {
result.push_back(nums1[i] + nums2[i]);
}
return result;
}
| int main() {
assert(func0({1, 2, 3}, {4, 5, 6}) == std::vector<int>({5, 7, 9}));
assert(func0({1, 2}, {3, 4}) == std::vector<int>({4, 6}));
assert(func0({10, 20}, {50, 70}) == std::vector<int>({60, 90}));
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x48,%rsp
mov %rdi,-0x38(%rbp)
mov %rsi,-0x40(%rbp)
mov %rdx,-0x48(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x38(%rbp)... | _Z5func0RKSt6vectorIiSaIiEES3_:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 48h
mov [rbp+var_38], rdi
mov [rbp+var_40], rsi
mov [rbp+var_48], rdx
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_38]
mov rdi, rax
call _ZNSt6vectorIiSaIiEEC2Ev; std:... | long long func0(long long a1, long long a2, long long a3)
{
int v3; // ebx
unsigned long long v4; // rax
int v7; // [rsp+2Ch] [rbp-24h] BYREF
unsigned long long i; // [rsp+30h] [rbp-20h]
unsigned long long v9; // [rsp+38h] [rbp-18h]
v9 = __readfsqword(0x28u);
std::vector<int>::vector(a1);
for ( i = 0L... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RBP + -0x38],RDI
MOV qword ptr [RBP + -0x40],RSI
MOV qword ptr [RBP + -0x48],RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RDI,RAX
CALL 0x00101c02
MOV qword ptr [RBP + -0x20],0x0
JM... | /* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> >
const&) */
vector * func0(vector *param_1,vector *param_2)
{
int iVar1;
int *piVar2;
ulong uVar3;
vector<int,std::allocator<int>> *in_RDX;
long in_FS_OFFSET;
int local_2c;
ulong local_28;
long local_20;
... |
2,913 | func0 |
#include <vector>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& nums1, const std::vector<int>& nums2) {
std::vector<int> result;
for (size_t i = 0; i < nums1.size(); ++i) {
result.push_back(nums1[i] + nums2[i]);
}
return result;
}
| int main() {
assert(func0({1, 2, 3}, {4, 5, 6}) == std::vector<int>({5, 7, 9}));
assert(func0({1, 2}, {3, 4}) == std::vector<int>({4, 6}));
assert(func0({10, 20}, {50, 70}) == std::vector<int>({60, 90}));
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&):
endbr64
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x10,%rsp
mov %rdi,%rbp
mov %rdx,%r13
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi... | _Z5func0RKSt6vectorIiSaIiEES3_:
endbr64
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 10h
mov rbp, rdi
mov r13, rdx
mov rax, fs:28h
mov [rsp+38h+var_30], rax
xor eax, eax
mov qword ptr [rdi], 0
mov qword ptr [rdi+8], 0
mov qword ptr [rdi+10h], 0
mov rdx, [r... | _QWORD * func0(_QWORD *a1, long long *a2, _QWORD *a3)
{
long long v4; // rdx
unsigned long long v6; // rbx
int v7; // eax
int *v8; // rsi
int v10; // [rsp+4h] [rbp-34h] BYREF
unsigned long long v11; // [rsp+8h] [rbp-30h]
v11 = __readfsqword(0x28u);
*a1 = 0LL;
a1[1] = 0LL;
a1[2] = 0LL;
v4 = *a2;
... | func0:
ENDBR64
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x10
MOV RBP,RDI
MOV R13,RDX
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 RDX,qword ptr [RSI]
CMP RDX,qword ptr [RSI + 0x8]
JZ 0x00101313
... | /* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> >
const&) */
vector * func0(vector *param_1,vector *param_2)
{
int *piVar1;
long *in_RDX;
long lVar2;
ulong uVar3;
long in_FS_OFFSET;
int local_34;
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28... |
2,914 | func0 |
#include <vector>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& nums1, const std::vector<int>& nums2) {
std::vector<int> result;
for (size_t i = 0; i < nums1.size(); ++i) {
result.push_back(nums1[i] + nums2[i]);
}
return result;
}
| int main() {
assert(func0({1, 2, 3}, {4, 5, 6}) == std::vector<int>({5, 7, 9}));
assert(func0({1, 2}, {3, 4}) == std::vector<int>({4, 6}));
assert(func0({10, 20}, {50, 70}) == std::vector<int>({60, 90}));
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&):
endbr64
push %r14
push %r13
mov %rdx,%r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x10,%rsp
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi... | _Z5func0RKSt6vectorIiSaIiEES3_:
endbr64
push r14
pxor xmm0, xmm0
push r13
mov r13, rdx
push r12
push rbp
mov rbp, rdi
push rbx
sub rsp, 10h
mov rax, fs:28h
mov [rsp+38h+var_30], rax
xor eax, eax
movups xmmword ptr [rdi], xmm0
mov rdx, [rsi]
mov qword ptr [rdi+10h], 0
c... | long long func0(long long a1, long long *a2, _QWORD *a3)
{
long long v5; // rdx
int *v7; // rdi
int *v8; // rsi
long long v9; // rbx
int v10; // eax
int v12; // [rsp+0h] [rbp-34h] BYREF
unsigned long long v13; // [rsp+4h] [rbp-30h]
v13 = __readfsqword(0x28u);
*(_OWORD *)a1 = 0LL;
v5 = *a2;
*(_QW... | func0:
ENDBR64
PUSH R14
PXOR XMM0,XMM0
PUSH R13
MOV R13,RDX
PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
SUB RSP,0x10
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
MOVUPS xmmword ptr [RDI],XMM0
MOV RDX,qword ptr [RSI]
MOV qword ptr [RDI + 0x10],0x0
CMP qword ptr [RSI + 0x8],RDX
JZ 0x001017a0
MOV R12,R... | /* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> >
const&) */
vector * func0(vector *param_1,vector *param_2)
{
long *in_RDX;
long lVar1;
ulong uVar2;
int *piVar3;
int *piVar4;
long in_FS_OFFSET;
int local_34;
long local_30;
local_30 = *(long *)(in_F... |
2,915 | func0 |
#include <vector>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& nums1, const std::vector<int>& nums2) {
std::vector<int> result;
for (size_t i = 0; i < nums1.size(); ++i) {
result.push_back(nums1[i] + nums2[i]);
}
return result;
}
| int main() {
assert(func0({1, 2, 3}, {4, 5, 6}) == std::vector<int>({5, 7, 9}));
assert(func0({1, 2}, {3, 4}) == std::vector<int>({4, 6}));
assert(func0({10, 20}, {50, 70}) == std::vector<int>({60, 90}));
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&):
endbr64
push %r14
pxor %xmm0,%xmm0
push %r13
mov %rdx,%r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x10,%rsp
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
movq $0x0,0x10(%rd... | _Z5func0RKSt6vectorIiSaIiEES3_:
endbr64
push r14
pxor xmm0, xmm0
push r13
mov r13, rdx
push r12
push rbp
mov rbp, rdi
push rbx
sub rsp, 10h
mov rax, fs:28h
mov [rsp+38h+var_30], rax
xor eax, eax
movups xmmword ptr [rdi], xmm0
mov rdx, [rsi]
mov qword ptr [rdi+10h], 0
c... | long long func0(long long a1, long long *a2, _QWORD *a3)
{
long long v5; // rdx
int *v7; // rdi
int *v8; // rsi
long long v9; // rbx
int v10; // eax
int v12; // [rsp+0h] [rbp-34h] BYREF
unsigned long long v13; // [rsp+4h] [rbp-30h]
v13 = __readfsqword(0x28u);
*(_OWORD *)a1 = 0LL;
v5 = *a2;
*(_QW... | func0:
ENDBR64
PUSH R14
PXOR XMM0,XMM0
PUSH R13
MOV R13,RDX
PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
SUB RSP,0x10
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
MOVUPS xmmword ptr [RDI],XMM0
MOV RDX,qword ptr [RSI]
MOV qword ptr [RDI + 0x10],0x0
CMP qword ptr [RSI + 0x8],RDX
JZ 0x001017a0
MOV R12,R... | /* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> >
const&) */
vector * func0(vector *param_1,vector *param_2)
{
long *in_RDX;
long lVar1;
ulong uVar2;
int *piVar3;
int *piVar4;
long in_FS_OFFSET;
int local_34;
long local_30;
local_30 = *(long *)(in_F... |
2,916 | func0 |
#include <iostream>
#include <vector>
#include <assert.h>
template <typename T>
| std::vector<T> func0(std::vector<T> nums) {
std::vector<T> result;
if (!nums.empty()) {
typename std::vector<T>::iterator it = nums.begin();
T last = *it;
result.push_back(last);
++it;
for (; it != nums.end(); ++it) {
if (*it != last) {
... | int main() {
assert((func0(std::vector<int>{0, 0, 1, 2, 3, 4, 4, 5, 6, 6, 6, 7, 8, 9, 4, 4}) == std::vector<int>{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 4}));
assert((func0(std::vector<int>{10, 10, 15, 19, 18, 18, 17, 26, 26, 17, 18, 10}) == std::vector<int>{10, 15, 19, 18, 17, 26, 17, 18, 10}));
assert((func0(std... | O0 | cpp | std::vector<int, std::allocator<int> > func0<int>(std::vector<int, std::allocator<int> >):
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 -0x38(%rbp),%rax
mov %rax,%rdi
callq 1caa... | _Z5func0IiESt6vectorIT_SaIS1_EES3_:
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_38]
mov rdi, rax
call _ZNSt6vectorIiSaIiEEC2Ev; std::vector<int>::vector(v... | long long func0<int>(long long a1, long long a2)
{
_DWORD *v2; // rax
int v4; // [rsp+14h] [rbp-2Ch] BYREF
long long v5; // [rsp+18h] [rbp-28h] BYREF
_QWORD v6[3]; // [rsp+20h] [rbp-20h] BYREF
v6[1] = __readfsqword(0x28u);
std::vector<int>::vector(a1);
if ( (unsigned __int8)std::vector<int>::empty(a2) !... | func0<int>:
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 + -0x38]
MOV RDI,RAX
CALL 0x00101b98
MOV RAX,qword ptr [RBP + -0x40]
MOV RDI,RAX
CALL 0x0010230e
X... | /* std::vector<int, std::allocator<int> > func0<int>(std::vector<int, std::allocator<int> >) */
vector func0<int>(vector param_1)
{
char cVar1;
bool bVar2;
int *piVar3;
vector<int,std::allocator<int>> *in_RSI;
int4 in_register_0000003c;
vector<int,std::allocator<int>> *this;
long in_FS_OFFSET;
int loc... |
2,917 | func0 |
#include <iostream>
#include <vector>
#include <assert.h>
template <typename T>
| std::vector<T> func0(std::vector<T> nums) {
std::vector<T> result;
if (!nums.empty()) {
typename std::vector<T>::iterator it = nums.begin();
T last = *it;
result.push_back(last);
++it;
for (; it != nums.end(); ++it) {
if (*it != last) {
... | int main() {
assert((func0(std::vector<int>{0, 0, 1, 2, 3, 4, 4, 5, 6, 6, 6, 7, 8, 9, 4, 4}) == std::vector<int>{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 4}));
assert((func0(std::vector<int>{10, 10, 15, 19, 18, 18, 17, 26, 26, 17, 18, 10}) == std::vector<int>{10, 15, 19, 18, 17, 26, 17, 18, 10}));
assert((func0(std... | O1 | cpp | std::vector<int, std::allocator<int> > func0<int>(std::vector<int, std::allocator<int> >):
endbr64
push %r13
push %r12
push %rbp
push %rbx
sub $0x18,%rsp
mov %rdi,%rbp
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi)
movq $0x0,0x10(%rdi)
mov (%rsi),... | _Z5func0IiESt6vectorIT_SaIS1_EES3_:
endbr64
push r12
push rbp
push rbx
sub rsp, 10h
mov rbp, rdi
mov rax, fs:28h
mov [rsp+28h+var_20], rax
xor eax, eax
mov qword ptr [rdi], 0
mov qword ptr [rdi+8], 0
mov qword ptr [rdi+10h], 0
mov rbx, [rsi]
cmp [rsi+8], rbx
jz shor... | _QWORD * func0<int>(_QWORD *a1, int **a2)
{
int *v2; // rbx
int *i; // rbx
int v6; // eax
_DWORD *v7; // rsi
int v8; // [rsp+4h] [rbp-24h] BYREF
unsigned long long v9; // [rsp+8h] [rbp-20h]
v9 = __readfsqword(0x28u);
*a1 = 0LL;
a1[1] = 0LL;
a1[2] = 0LL;
v2 = *a2;
if ( a2[1] != *a2 )
{
v8 ... | func0<int>:
ENDBR64
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x10
MOV RBP,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
MOV qword ptr [RDI],0x0
MOV qword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
MOV RBX,qword ptr [RSI]
CMP qword ptr [RSI + 0x8],RBX
JZ 0x00101bfd
MOV R12,RSI
MOV EAX,dword... | /* std::vector<int, std::allocator<int> > func0<int>(std::vector<int, std::allocator<int> >) */
vector<int,std::allocator<int>> *
func0<int>(vector<int,std::allocator<int>> *param_1,int8 *param_2)
{
int iVar1;
int *piVar2;
int *piVar3;
long in_FS_OFFSET;
int local_24;
long local_20;
local_20 = *(long... |
2,918 | func0 |
#include <iostream>
#include <vector>
#include <assert.h>
template <typename T>
| std::vector<T> func0(std::vector<T> nums) {
std::vector<T> result;
if (!nums.empty()) {
typename std::vector<T>::iterator it = nums.begin();
T last = *it;
result.push_back(last);
++it;
for (; it != nums.end(); ++it) {
if (*it != last) {
... | int main() {
assert((func0(std::vector<int>{0, 0, 1, 2, 3, 4, 4, 5, 6, 6, 6, 7, 8, 9, 4, 4}) == std::vector<int>{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 4}));
assert((func0(std::vector<int>{10, 10, 15, 19, 18, 18, 17, 26, 26, 17, 18, 10}) == std::vector<int>{10, 15, 19, 18, 17, 26, 17, 18, 10}));
assert((func0(std... | O2 | cpp | std::vector<int, std::allocator<int> > func0<int>(std::vector<int, std::allocator<int> >):
endbr64
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x18,%rsp
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi)
movq $0x0,0x10(%rdi)
mov (%rsi),... | _Z5func0IiESt6vectorIT_SaIS1_EES3_:
endbr64
push r14
pxor xmm0, xmm0
push r13
push r12
push rbp
mov rbp, rdi
push rbx
sub rsp, 10h
mov rax, fs:28h
mov [rsp+38h+var_30], rax
xor eax, eax
mov qword ptr [rdi+10h], 0
movups xmmword ptr [rdi], xmm0
mov rbx, [rsi]
cmp [rsi+8... | long long func0<int>(long long a1, int **a2)
{
int *v2; // rbx
int v3; // r14d
int *v5; // rbx
int v7; // eax
_DWORD *v8; // rsi
int v9; // [rsp+0h] [rbp-34h] BYREF
unsigned long long v10; // [rsp+4h] [rbp-30h]
v10 = __readfsqword(0x28u);
*(_QWORD *)(a1 + 16) = 0LL;
*(_OWORD *)a1 = 0LL;
v2 = *a2... | func0<int>:
ENDBR64
PUSH R14
PXOR XMM0,XMM0
PUSH R13
PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
SUB RSP,0x10
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
MOV qword ptr [RDI + 0x10],0x0
MOVUPS xmmword ptr [RDI],XMM0
MOV RBX,qword ptr [RSI]
CMP qword ptr [RSI + 0x8],RBX
JZ 0x00101b20
MOV R14D,dword p... | /* std::vector<int, std::allocator<int> > func0<int>(std::vector<int, std::allocator<int> >) */
vector<int,std::allocator<int>> *
func0<int>(vector<int,std::allocator<int>> *param_1,int8 *param_2)
{
int iVar1;
int *piVar2;
int *piVar3;
int iVar4;
long in_FS_OFFSET;
int local_34;
long local_30;
loca... |
2,919 | func0 |
#include <iostream>
#include <vector>
#include <assert.h>
template <typename T>
| std::vector<T> func0(std::vector<T> nums) {
std::vector<T> result;
if (!nums.empty()) {
typename std::vector<T>::iterator it = nums.begin();
T last = *it;
result.push_back(last);
++it;
for (; it != nums.end(); ++it) {
if (*it != last) {
... | int main() {
assert((func0(std::vector<int>{0, 0, 1, 2, 3, 4, 4, 5, 6, 6, 6, 7, 8, 9, 4, 4}) == std::vector<int>{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 4}));
assert((func0(std::vector<int>{10, 10, 15, 19, 18, 18, 17, 26, 26, 17, 18, 10}) == std::vector<int>{10, 15, 19, 18, 17, 26, 17, 18, 10}));
assert((func0(std... | O3 | cpp | std::vector<int, std::allocator<int> > func0<int>(std::vector<int, std::allocator<int> >):
endbr64
push %r13
pxor %xmm0,%xmm0
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x18,%rsp
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
movq $0x0,0x10(%rdi)
movups %xmm0,(%rdi)
mov (%rsi),%r... | _Z5func0IiESt6vectorIT_SaIS1_EES3_:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
push r12
mov r12, rdi
push rbp
push rbx
sub rsp, 18h
mov rax, fs:28h
mov [rsp+48h+var_40], rax
xor eax, eax
mov qword ptr [rdi+10h], 0
movups xmmword ptr [rdi], xmm0
mov rbx, [rsi]
cm... | long long func0<int>(long long a1, int **a2)
{
int *v2; // rbx
int v3; // r15d
int *v5; // rax
int *i; // rbx
int v7; // ebp
_DWORD *v8; // rsi
int v10; // [rsp+0h] [rbp-44h] BYREF
unsigned long long v11; // [rsp+4h] [rbp-40h]
v11 = __readfsqword(0x28u);
*(_QWORD *)(a1 + 16) = 0LL;
*(_OWORD *)a1... | func0<int>:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
PUSH R13
PUSH R12
MOV R12,RDI
PUSH RBP
PUSH RBX
SUB RSP,0x18
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
MOV qword ptr [RDI + 0x10],0x0
MOVUPS xmmword ptr [RDI],XMM0
MOV RBX,qword ptr [RSI]
CMP qword ptr [RSI + 0x8],RBX
JZ 0x00101b6a
MOV R15... | /* std::vector<int, std::allocator<int> > func0<int>(std::vector<int, std::allocator<int> >) */
vector<int,std::allocator<int>> *
func0<int>(vector<int,std::allocator<int>> *param_1,int8 *param_2)
{
int iVar1;
int *piVar2;
int *piVar3;
int iVar4;
long in_FS_OFFSET;
int local_44;
long local_40;
loca... |
2,920 | func0 |
#include <cmath>
#include <cassert>
| double func0(double r, double h) {
double l = sqrt(r * r + h * h);
double LSA = M_PI * r * l;
return LSA;
}
| int main() {
assert(fabs(func0(5, 12) - 204.20352248333654) < 0.0001);
assert(fabs(func0(10, 15) - 566.3586699569488) < 0.0001);
assert(fabs(func0(19, 17) - 1521.8090132193388) < 0.0001);
return 0;
}
| O0 | cpp | func0(double, double):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x20,%rsp
movsd %xmm0,-0x18(%rbp)
movsd %xmm1,-0x20(%rbp)
movsd -0x18(%rbp),%xmm0
movapd %xmm0,%xmm1
mulsd %xmm0,%xmm1
movsd -0x20(%rbp),%xmm0
mulsd %xmm0,%xmm0
addsd %xmm1,%xmm0
callq 1070 <sqrt@plt>
movq %xmm0,%rax
mov %rax,-0x10(%rbp)
m... | _Z5func0dd:
endbr64
push rbp
mov rbp, rsp
sub rsp, 20h
movsd [rbp+var_18], xmm0
movsd [rbp+var_20], xmm1
movsd xmm0, [rbp+var_18]
movapd xmm1, xmm0
mulsd xmm1, xmm0
movsd xmm0, [rbp+var_20]
mulsd xmm0, xmm0
addsd xmm1, xmm0
movq rax, xmm1
movq xmm0, rax; x
call _sqrt
movq rax, xmm0... | double func0(double a1, double a2)
{
return 3.141592653589793 * a1 * sqrt(a1 * a1 + a2 * a2);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOVSD qword ptr [RBP + -0x18],XMM0
MOVSD qword ptr [RBP + -0x20],XMM1
MOVSD XMM0,qword ptr [RBP + -0x18]
MOVAPD XMM1,XMM0
MULSD XMM1,XMM0
MOVSD XMM0,qword ptr [RBP + -0x20]
MULSD XMM0,XMM0
ADDSD XMM1,XMM0
MOVQ RAX,XMM1
MOVQ XMM0,RAX
CALL 0x00101070
MOVQ RAX,XMM0
MOV qwor... | /* func0(double, double) */
double func0(double param_1,double param_2)
{
double dVar1;
dVar1 = sqrt(param_1 * param_1 + param_2 * param_2);
return DAT_001020f0 * param_1 * dVar1;
} |
2,921 | func0 |
#include <cmath>
#include <cassert>
| double func0(double r, double h) {
double l = sqrt(r * r + h * h);
double LSA = M_PI * r * l;
return LSA;
}
| int main() {
assert(fabs(func0(5, 12) - 204.20352248333654) < 0.0001);
assert(fabs(func0(10, 15) - 566.3586699569488) < 0.0001);
assert(fabs(func0(19, 17) - 1521.8090132193388) < 0.0001);
return 0;
}
| O1 | cpp | func0(double, double):
endbr64
sub $0x18,%rsp
movsd %xmm0,0x8(%rsp)
mulsd %xmm0,%xmm0
mulsd %xmm1,%xmm1
addsd %xmm1,%xmm0
movapd %xmm0,%xmm3
sqrtsd %xmm3,%xmm3
movsd %xmm3,(%rsp)
pxor %xmm1,%xmm1
ucomisd %xmm0,%xmm1
ja 1192 <_Z5func0dd+0x49>
movsd 0x8(%rsp),%xmm0
mulsd 0xe80(%rip),%xmm0
mulsd (%rsp),%x... | _Z5func0dd:
endbr64
movapd xmm2, xmm0
mulsd xmm2, xmm0
mulsd xmm1, xmm1
addsd xmm2, xmm1
sqrtsd xmm2, xmm2
mulsd xmm0, cs:qword_2008
mulsd xmm0, xmm2
retn | double func0(double a1, double a2)
{
return a1 * 3.141592653589793 * sqrt(a1 * a1 + a2 * a2);
} | func0:
ENDBR64
MOVAPD XMM2,XMM0
MULSD XMM2,XMM0
MULSD XMM1,XMM1
ADDSD XMM2,XMM1
SQRTSD XMM2,XMM2
MULSD XMM0,qword ptr [0x00102008]
MULSD XMM0,XMM2
RET | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(double, double) */
double func0(double param_1,double param_2)
{
return param_1 * _DAT_00102008 * SQRT(param_1 * param_1 + param_2 * param_2);
} |
2,922 | func0 |
#include <cmath>
#include <cassert>
| double func0(double r, double h) {
double l = sqrt(r * r + h * h);
double LSA = M_PI * r * l;
return LSA;
}
| int main() {
assert(fabs(func0(5, 12) - 204.20352248333654) < 0.0001);
assert(fabs(func0(10, 15) - 566.3586699569488) < 0.0001);
assert(fabs(func0(19, 17) - 1521.8090132193388) < 0.0001);
return 0;
}
| O2 | cpp | func0(double, double):
endbr64
mulsd %xmm1,%xmm1
movapd %xmm0,%xmm2
mulsd %xmm0,%xmm0
addsd %xmm1,%xmm0
pxor %xmm1,%xmm1
ucomisd %xmm0,%xmm1
movapd %xmm0,%xmm3
sqrtsd %xmm3,%xmm3
ja 1197 <_Z5func0dd+0x37>
mulsd 0xe7a(%rip),%xmm2
movapd %xmm2,%xmm0
mulsd %xmm3,%xmm0
retq
sub $0x18,%rsp
movsd %xmm2,0x8(%rs... | _Z5func0dd:
endbr64
mulsd xmm1, xmm1
movapd xmm2, xmm0
mulsd xmm2, xmm0
mulsd xmm0, cs:qword_2008
addsd xmm2, xmm1
sqrtsd xmm2, xmm2
mulsd xmm0, xmm2
retn | double func0(double a1, double a2)
{
return a1 * 3.141592653589793 * sqrt(a1 * a1 + a2 * a2);
} | func0:
ENDBR64
MULSD XMM1,XMM1
MOVAPD XMM2,XMM0
MULSD XMM2,XMM0
MULSD XMM0,qword ptr [0x00102008]
ADDSD XMM2,XMM1
SQRTSD XMM2,XMM2
MULSD XMM0,XMM2
RET | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(double, double) */
double func0(double param_1,double param_2)
{
return param_1 * _DAT_00102008 * SQRT(param_1 * param_1 + param_2 * param_2);
} |
2,923 | func0 |
#include <cmath>
#include <cassert>
| double func0(double r, double h) {
double l = sqrt(r * r + h * h);
double LSA = M_PI * r * l;
return LSA;
}
| int main() {
assert(fabs(func0(5, 12) - 204.20352248333654) < 0.0001);
assert(fabs(func0(10, 15) - 566.3586699569488) < 0.0001);
assert(fabs(func0(19, 17) - 1521.8090132193388) < 0.0001);
return 0;
}
| O3 | cpp | func0(double, double):
endbr64
mulsd %xmm1,%xmm1
movapd %xmm0,%xmm2
mulsd %xmm0,%xmm0
addsd %xmm1,%xmm0
pxor %xmm1,%xmm1
ucomisd %xmm0,%xmm1
movapd %xmm0,%xmm3
sqrtsd %xmm3,%xmm3
ja 1197 <_Z5func0dd+0x37>
mulsd 0xe7a(%rip),%xmm2
movapd %xmm2,%xmm0
mulsd %xmm3,%xmm0
retq
sub $0x18,%rsp
movsd %xmm2,0x8(%rs... | _Z5func0dd:
endbr64
mulsd xmm1, xmm1
movapd xmm2, xmm0
mulsd xmm2, xmm0
mulsd xmm0, cs:qword_2008
addsd xmm2, xmm1
sqrtsd xmm2, xmm2
mulsd xmm0, xmm2
retn | double func0(double a1, double a2)
{
return a1 * 3.141592653589793 * sqrt(a1 * a1 + a2 * a2);
} | func0:
ENDBR64
MULSD XMM1,XMM1
MOVAPD XMM2,XMM0
MULSD XMM2,XMM0
MULSD XMM0,qword ptr [0x00102008]
ADDSD XMM2,XMM1
SQRTSD XMM2,XMM2
MULSD XMM0,XMM2
RET | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(double, double) */
double func0(double param_1,double param_2)
{
return param_1 * _DAT_00102008 * SQRT(param_1 * param_1 + param_2 * param_2);
} |
2,924 | func0 |
#include <iostream>
#include <regex>
#include <cassert>
| std::string func0(const std::string &text) {
std::regex pattern("[ ,.]");
return std::regex_replace(text, pattern, ":");
}
| int main() {
assert(func0("Python language, Programming language.") == "Python:language::Programming:language:");
assert(func0("a b c,d e f") == "a:b:c:d:e:f");
assert(func0("ram reshma,ram rahim") == "ram:reshma:ram:rahim");
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 %rsi,-0x50(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
lea -0x40(%rbp),%rax
mov $0x10,%edx
lea ... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 48h
mov [rbp+var_48], rdi
mov [rbp+var_50], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_40]
mov edx, 10h
lea rcx, asc_34051; "[ ,.]"
... | long long func0(long long a1, long long a2)
{
_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, "[ ,.]", 16LL);
std::regex_replace<std::regex_traits<char>,char,std::char_traits<c... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RBP + -0x48],RDI
MOV qword ptr [RBP + -0x50],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x40]
MOV EDX,0x10
LEA RCX,[0x134051]
MOV RSI,RCX
MOV RDI,RAX
LAB_00104b63:
CALL 0x00106152
MOV RAX,qword ptr ... | /* func0(std::string const&) */
string * func0(string *param_1)
{
int8 in_RSI;
long in_FS_OFFSET;
regex local_48 [40];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
std::regex::basic_regex(local_48,"[ ,.]",0x10);
/* try { // try from 00104b84 to 00104b88 has its CatchHan... |
2,925 | func0 |
#include <iostream>
#include <regex>
#include <cassert>
| std::string func0(const std::string &text) {
std::regex pattern("[ ,.]");
return std::regex_replace(text, pattern, ":");
}
| int main() {
assert(func0("Python language, Programming language.") == "Python:language::Programming:language:");
assert(func0("a b c,d e f") == "a:b:c:d:e:f");
assert(func0("ram reshma,ram rahim") == "ram:reshma:ram:rahim");
return 0;
}
| O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r13
push %r12
push %rbp
push %rbx
sub $0x48,%rsp
mov %rdi,%rbx
mov %rsi,%rbp
mov %fs:0x28,%rax
mov %rax,0x38(%rsp)
xor %eax,%eax
lea 0x8(%rsp),%r13
mov %r13,%rdi
callq 4730 <_ZNS... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r14
push r12
push rbx
sub rsp, 38h
mov rbx, rdi
mov r14, rsi
mov rax, fs:28h
mov [rbp+var_28], rax
xor eax, eax
lea r12, [rbp+var_50]
lea rdi, [rbp+var_48]; this
call __Z... | long long func0(long long a1, long long *a2)
{
long long v4; // rsi
_DWORD *v5; // rdi
volatile signed __int32 *v6; // rcx
long long v7; // rdx
signed __int32 v8; // eax
_BYTE v10[8]; // [rsp+0h] [rbp-50h] BYREF
_BYTE v11[8]; // [rsp+8h] [rbp-48h] BYREF
long long v12; // [rsp+10h] [rbp-40h]
long long... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV RBX,RDI
MOV R14,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
XOR EAX,EAX
LEA R12,[RBP + -0x50]
LEA RDI,[RBP + -0x48]
CALL 0x00104710
MOV qword ptr [RBP + -0x40],0x0
MOV qword ptr [RBP + -0x38],0x0
MOV ECX,0x10
LEA RDX,[0x... | /* func0(std::string const&) */
string * func0(string *param_1)
{
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
_Sp_counted_base<(_Lock_policy)2> *p_Var2;
int iVar3;
int8 *in_RSI;
long in_FS_OFFSET;
regex local_58 [8];
int local_50 [8];
int8 local_48;
_Sp_counted_base<(_Lock_policy)2> *local_40;
long... |
2,926 | func0 |
#include <iostream>
#include <regex>
#include <cassert>
| std::string func0(const std::string &text) {
std::regex pattern("[ ,.]");
return std::regex_replace(text, pattern, ":");
}
| int main() {
assert(func0("Python language, Programming language.") == "Python:language::Programming:language:");
assert(func0("a b c,d e f") == "a:b:c:d:e:f");
assert(func0("ram reshma,ram rahim") == "ram:reshma:ram:rahim");
return 0;
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
mov %rsi,%rbx
sub $0x40,%rsp
mov %fs:0x28,%rax
mov %rax,0x38(%rsp)
xor %eax,%eax
lea 0x8(%rsp),%rbp
lea 0x18(%rsp),%r13... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r14
mov r14, rsi
push r13
lea r13, [rbp+var_50]
push r12
lea r12, [rbp+var_48]
push rbx
mov rbx, rdi
mov rdi, r12; this
sub rsp, 30h
mov rax, fs:28h
mov [rbp+var_28], rax... | long long func0(long long a1, long long *a2)
{
long long v3; // rsi
long long v4; // rdi
long long v5; // rdx
volatile signed __int32 *v6; // rcx
signed __int32 v7; // eax
long long v9; // rax
_BYTE v10[8]; // [rsp+0h] [rbp-50h] BYREF
_BYTE v11[8]; // [rsp+8h] [rbp-48h] BYREF
__int128 v12; // [rsp+10... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R14
MOV R14,RSI
PUSH R13
LEA R13,[RBP + -0x50]
PUSH R12
LEA R12,[RBP + -0x48]
PUSH RBX
MOV RBX,RDI
MOV RDI,R12
SUB RSP,0x30
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
XOR EAX,EAX
CALL 0x001046f0
LEA RDX,[0x11a6f4]
PXOR XMM0,XMM0
MOV RDI,R13
MOV ECX,0x10
LEA RSI,... | /* func0(std::string const&) */
string * func0(string *param_1)
{
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
int8 uVar2;
int iVar3;
int8 *in_RSI;
long in_FS_OFFSET;
regex local_58 [8];
int local_50 [8];
int local_48 [24];
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
std::locale::... |
2,927 | func0 |
#include <iostream>
#include <regex>
#include <cassert>
| std::string func0(const std::string &text) {
std::regex pattern("[ ,.]");
return std::regex_replace(text, pattern, ":");
}
| int main() {
assert(func0("Python language, Programming language.") == "Python:language::Programming:language:");
assert(func0("a b c,d e f") == "a:b:c:d:e:f");
assert(func0("ram reshma,ram rahim") == "ram:reshma:ram:rahim");
return 0;
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
mov %rsi,%rbx
sub $0x40,%rsp
mov %fs:0x28,%rax
mov %rax,0x38(%rsp)
xor %eax,%eax
lea 0x8(%rsp),%rbp
lea 0x18(%rsp),%r13... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r15
push r14
lea r15, [rbp+var_E0]
push r13
push r12
mov r12, rsi
push rbx
mov rbx, rdi
sub rsp, 108h
mov rax, fs:28h
mov [rbp+var_38], rax
xor eax, eax
lea rax, [rbp+... | _QWORD * func0(_QWORD *a1, char **a2)
{
char *v3; // rax
long long v4; // r13
char *v5; // r15
char *v6; // r12
char v7; // al
long long v8; // rdx
long long v9; // rcx
long long v10; // r8
long long v11; // r9
unsigned long long v12; // rsi
long long v13; // rdi
volatile signed __int32 *v14; //... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
LEA R15,[RBP + -0xe0]
PUSH R13
PUSH R12
MOV R12,RSI
PUSH RBX
MOV RBX,RDI
SUB RSP,0x108
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x38],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0xd8]
MOV qword ptr [RBP + -0x128],R15
MOV RDI,RAX
MOV qword ptr [RBP + -0x130],RAX
CALL 0x... | /* func0(std::string const&) */
string * func0(string *param_1)
{
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
string sVar2;
string *psVar3;
long lVar4;
int8 uVar5;
bool bVar6;
char cVar7;
int iVar8;
int8 *puVar9;
string *psVar10;
long lVar11;
long *plVar12;
ulong uVar13;
ulong uVar14;
lon... |
2,928 | func0 |
#include <vector>
#include <assert.h>
| int func0(const std::vector<int>& A, int x) {
int left = 0;
int right = A.size() - 1;
int result = -1;
while (left <= right) {
int mid = left + (right - left) / 2;
if (x == A[mid]) {
result = mid;
right = mid - 1;
} else if (x < A[mid]) {
... | int main() {
assert(func0({2, 5, 5, 5, 6, 6, 8, 9, 9, 9}, 5) == 1);
assert(func0({2, 3, 5, 5, 6, 6, 8, 9, 9, 9}, 5) == 2);
assert(func0({2, 4, 1, 5, 6, 6, 8, 9, 9, 9}, 6) == 4);
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> > const&, int):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x20,%rsp
mov %rdi,-0x18(%rbp)
mov %esi,-0x1c(%rbp)
movl $0x0,-0x10(%rbp)
mov -0x18(%rbp),%rax
mov %rax,%rdi
callq 1646 <_ZNKSt6vectorIiSaIiEE4sizeEv>
sub $0x1,%eax
mov %eax,-0xc(%rbp)
movl $0x... | _Z5func0RKSt6vectorIiSaIiEEi:
endbr64
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_18], rdi
mov [rbp+var_1C], esi
mov [rbp+var_10], 0
mov rax, [rbp+var_18]
mov rdi, rax
call _ZNKSt6vectorIiSaIiEE4sizeEv; std::vector<int>::size(void)
sub eax, 1
mov [rbp+var_C], eax
mov [r... | long long func0(long long a1, int a2)
{
int v3; // [rsp+10h] [rbp-10h]
int v4; // [rsp+14h] [rbp-Ch]
unsigned int v5; // [rsp+18h] [rbp-8h]
int v6; // [rsp+1Ch] [rbp-4h]
v3 = 0;
v4 = std::vector<int>::size(a1) - 1;
v5 = -1;
while ( v3 <= v4 )
{
v6 = (v4 - v3) / 2 + v3;
if ( a2 == *(_DWORD *)... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x1c],ESI
MOV dword ptr [RBP + -0x10],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,RAX
CALL 0x001016a8
SUB EAX,0x1
MOV dword ptr [RBP + -0xc],EAX
MOV dword ptr [RBP + -0x8],0xffffffff
JMP 0x00101301
LAB_00101281:
MOV E... | /* func0(std::vector<int, std::allocator<int> > const&, int) */
int func0(vector *param_1,int param_2)
{
int iVar1;
int *piVar2;
int4 local_18;
int4 local_14;
int4 local_10;
local_18 = 0;
local_14 = std::vector<int,std::allocator<int>>::size((vector<int,std::allocator<int>> *)param_1);
local_14 = l... |
2,929 | func0 |
#include <vector>
#include <assert.h>
| int func0(const std::vector<int>& A, int x) {
int left = 0;
int right = A.size() - 1;
int result = -1;
while (left <= right) {
int mid = left + (right - left) / 2;
if (x == A[mid]) {
result = mid;
right = mid - 1;
} else if (x < A[mid]) {
... | int main() {
assert(func0({2, 5, 5, 5, 6, 6, 8, 9, 9, 9}, 5) == 1);
assert(func0({2, 3, 5, 5, 6, 6, 8, 9, 9, 9}, 5) == 2);
assert(func0({2, 4, 1, 5, 6, 6, 8, 9, 9, 9}, 6) == 4);
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> > const&, int):
endbr64
mov (%rdi),%r8
mov 0x8(%rdi),%rdx
sub %r8,%rdx
sar $0x2,%rdx
sub $0x1,%edx
js 125d <_Z5func0RKSt6vectorIiSaIiEEi+0x54>
mov $0xffffffff,%r9d
mov $0x0,%ecx
jmp 1237 <_Z5func0RKSt6vectorIiSaIiEEi+0x2e>
lea -0x1(%rax),%edx
mov... | _Z5func0RKSt6vectorIiSaIiEEi:
endbr64
mov r8d, esi
mov r9, [rdi]
mov rdx, [rdi+8]
sub rdx, r9
sar rdx, 2
sub edx, 1
js short loc_125F
mov edi, 0FFFFFFFFh
mov ecx, 0
jmp short loc_1238
loc_122F:
lea edx, [rax-1]
mov edi, eax
loc_1234:
cmp edx, ecx
jl short loc_12... | long long func0(long long *a1, int a2)
{
long long v3; // r9
int v4; // edx
unsigned int v5; // edi
int v6; // ecx
signed int v7; // eax
int v8; // esi
v3 = *a1;
v4 = ((a1[1] - *a1) >> 2) - 1;
if ( v4 < 0 )
{
return (unsigned int)-1;
}
else
{
v5 = -1;
v6 = 0;
do
{
v... | func0:
ENDBR64
MOV R8D,ESI
MOV R9,qword ptr [RDI]
MOV RDX,qword ptr [RDI + 0x8]
SUB RDX,R9
SAR RDX,0x2
SUB EDX,0x1
JS 0x0010125f
MOV EDI,0xffffffff
MOV ECX,0x0
JMP 0x00101238
LAB_0010122f:
LEA EDX,[RAX + -0x1]
MOV EDI,EAX
LAB_00101234:
CMP EDX,ECX
JL 0x00101264
LAB_00101238:
MOV ESI,EDX
SUB ESI,ECX
MOV EAX,ESI
SHR EAX,... | /* func0(std::vector<int, std::allocator<int> > const&, int) */
int func0(vector *param_1,int param_2)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
iVar4 = (int)(*(long *)(param_1 + 8) - *(long *)param_1 >> 2) + -1;
if (iVar4 < 0) {
iVar2 = -1;
}
else {
iVar3 = 0;
iVar5 = ... |
2,930 | func0 |
#include <vector>
#include <assert.h>
| int func0(const std::vector<int>& A, int x) {
int left = 0;
int right = A.size() - 1;
int result = -1;
while (left <= right) {
int mid = left + (right - left) / 2;
if (x == A[mid]) {
result = mid;
right = mid - 1;
} else if (x < A[mid]) {
... | int main() {
assert(func0({2, 5, 5, 5, 6, 6, 8, 9, 9, 9}, 5) == 1);
assert(func0({2, 3, 5, 5, 6, 6, 8, 9, 9, 9}, 5) == 2);
assert(func0({2, 4, 1, 5, 6, 6, 8, 9, 9, 9}, 6) == 4);
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> > const&, int):
endbr64
mov (%rdi),%r8
mov 0x8(%rdi),%rdx
mov $0xffffffff,%r9d
sub %r8,%rdx
sar $0x2,%rdx
sub $0x1,%edx
js 147c <_Z5func0RKSt6vectorIiSaIiEEi+0x4c>
xor %ecx,%ecx
jmp 1461 <_Z5func0RKSt6vectorIiSaIiEEi+0x31>
nopl 0x0(%rax)
jle 14... | _Z5func0RKSt6vectorIiSaIiEEi:
endbr64
mov r8, [rdi]
mov rdx, [rdi+8]
mov r9d, 0FFFFFFFFh
sub rdx, r8
sar rdx, 2
sub edx, 1
js short loc_13FC
xor ecx, ecx
jmp short loc_13E1
loc_13D8:
jge short loc_1400
lea edx, [rax-1]
loc_13DD:
cmp ecx, edx
jg short loc_13FC
loc_13... | long long func0(long long *a1, int a2)
{
long long v2; // r8
unsigned int v3; // r9d
int v4; // edx
int v5; // ecx
signed int v6; // eax
v2 = *a1;
v3 = -1;
v4 = ((a1[1] - *a1) >> 2) - 1;
if ( v4 >= 0 )
{
v5 = 0;
do
{
while ( 1 )
{
v6 = v5 + ((v4 - v5) >> 1);
... | func0:
ENDBR64
MOV R8,qword ptr [RDI]
MOV RDX,qword ptr [RDI + 0x8]
MOV R9D,0xffffffff
SUB RDX,R8
SAR RDX,0x2
SUB EDX,0x1
JS 0x001013fc
XOR ECX,ECX
JMP 0x001013e1
LAB_001013d8:
JGE 0x00101400
LEA EDX,[RAX + -0x1]
LAB_001013dd:
CMP ECX,EDX
JG 0x001013fc
LAB_001013e1:
MOV EAX,EDX
SUB EAX,ECX
SAR EAX,0x1
ADD EAX,ECX
MOVSX... | /* func0(std::vector<int, std::allocator<int> > const&, int) */
int func0(vector *param_1,int param_2)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
iVar5 = -1;
iVar4 = (int)(*(long *)(param_1 + 8) - *(long *)param_1 >> 2) + -1;
if (-1 < iVar4) {
iVar3 = 0;
do {
while( true... |
2,931 | func0 |
#include <vector>
#include <assert.h>
| int func0(const std::vector<int>& A, int x) {
int left = 0;
int right = A.size() - 1;
int result = -1;
while (left <= right) {
int mid = left + (right - left) / 2;
if (x == A[mid]) {
result = mid;
right = mid - 1;
} else if (x < A[mid]) {
... | int main() {
assert(func0({2, 5, 5, 5, 6, 6, 8, 9, 9, 9}, 5) == 1);
assert(func0({2, 3, 5, 5, 6, 6, 8, 9, 9, 9}, 5) == 2);
assert(func0({2, 4, 1, 5, 6, 6, 8, 9, 9, 9}, 6) == 4);
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> > const&, int):
endbr64
mov (%rdi),%r8
mov 0x8(%rdi),%rdx
mov $0xffffffff,%r9d
sub %r8,%rdx
sar $0x2,%rdx
sub $0x1,%edx
js 142c <_Z5func0RKSt6vectorIiSaIiEEi+0x4c>
xor %ecx,%ecx
jmp 1411 <_Z5func0RKSt6vectorIiSaIiEEi+0x31>
nopl 0x0(%rax)
jge 14... | _Z5func0RKSt6vectorIiSaIiEEi:
endbr64
mov r8, [rdi]
mov rdx, [rdi+8]
mov r9d, 0FFFFFFFFh
sub rdx, r8
sar rdx, 2
sub edx, 1
js short loc_13FC
xor ecx, ecx
jmp short loc_13E1
loc_13D8:
jge short loc_1400
lea edx, [rax-1]
loc_13DD:
cmp ecx, edx
jg short loc_13FC
loc_13... | long long func0(long long *a1, int a2)
{
long long v2; // r8
unsigned int v3; // r9d
int v4; // edx
int v5; // ecx
signed int v6; // eax
v2 = *a1;
v3 = -1;
v4 = ((a1[1] - *a1) >> 2) - 1;
if ( v4 >= 0 )
{
v5 = 0;
do
{
while ( 1 )
{
v6 = v5 + ((v4 - v5) >> 1);
... | func0:
ENDBR64
MOV R8,qword ptr [RDI]
MOV RDX,qword ptr [RDI + 0x8]
MOV R9D,0xffffffff
SUB RDX,R8
SAR RDX,0x2
SUB EDX,0x1
JS 0x001013fc
XOR ECX,ECX
JMP 0x001013e1
LAB_001013d8:
JGE 0x00101400
LEA EDX,[RAX + -0x1]
LAB_001013dd:
CMP ECX,EDX
JG 0x001013fc
LAB_001013e1:
MOV EAX,EDX
SUB EAX,ECX
SAR EAX,0x1
ADD EAX,ECX
MOVSX... | /* func0(std::vector<int, std::allocator<int> > const&, int) */
int func0(vector *param_1,int param_2)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
iVar5 = -1;
iVar4 = (int)(*(long *)(param_1 + 8) - *(long *)param_1 >> 2) + -1;
if (-1 < iVar4) {
iVar3 = 0;
do {
while( true... |
2,932 | func0 |
#include <assert.h>
#include <vector>
using namespace std;
| int func0(vector<int> arr, int n) {
int ans = 0;
int res = 0;
int i = n - 1;
while (i >= 0) {
int incr = arr[i] * (1 + res);
ans += incr;
res = incr;
i -= 1;
}
return ans;
}
| int main() {
assert(func0({1, 2, 3}, 3) == 20);
assert(func0({1, 2}, 2) == 5);
assert(func0({1, 2, 3, 4}, 4) == 84);
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> >, int):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x20,%rsp
mov %rdi,-0x18(%rbp)
mov %esi,-0x1c(%rbp)
movl $0x0,-0x10(%rbp)
movl $0x0,-0xc(%rbp)
mov -0x1c(%rbp),%eax
sub $0x1,%eax
mov %eax,-0x8(%rbp)
cmpl $0x0,-0x8(%rbp)
js 128e <_Z5func0St6vectorI... | _Z5func0St6vectorIiSaIiEEi:
endbr64
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_18], rdi
mov [rbp+var_1C], esi
mov [rbp+var_10], 0
mov [rbp+var_C], 0
mov eax, [rbp+var_1C]
sub eax, 1
mov [rbp+var_8], eax
jmp short loc_12A8
loc_1275:
mov eax, [rbp+var_8]
movsxd rdx, ea... | long long func0(long long a1, int a2)
{
unsigned int v3; // [rsp+10h] [rbp-10h]
int v4; // [rsp+14h] [rbp-Ch]
int i; // [rsp+18h] [rbp-8h]
int v6; // [rsp+1Ch] [rbp-4h]
v3 = 0;
v4 = 0;
for ( i = a2 - 1; i >= 0; --i )
{
v6 = (v4 + 1) * *(_DWORD *)std::vector<int>::operator[](a1, i);
v3 += v6;
... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x1c],ESI
MOV dword ptr [RBP + -0x10],0x0
MOV dword ptr [RBP + -0xc],0x0
MOV EAX,dword ptr [RBP + -0x1c]
SUB EAX,0x1
MOV dword ptr [RBP + -0x8],EAX
JMP 0x001012a8
LAB_00101275:
MOV EAX,dword ptr [RBP + -0x8]
MOVSXD RD... | /* func0(std::vector<int, std::allocator<int> >, int) */
int func0(vector param_1,int param_2)
{
int *piVar1;
int4 in_register_0000003c;
int4 local_18;
int4 local_14;
int4 local_10;
local_18 = 0;
local_14 = 0;
for (local_10 = param_2 + -1; -1 < local_10; local_10 = local_10 + -1) {
piVar1 = (in... |
2,933 | func0 |
#include <assert.h>
#include <vector>
using namespace std;
| int func0(vector<int> arr, int n) {
int ans = 0;
int res = 0;
int i = n - 1;
while (i >= 0) {
int incr = arr[i] * (1 + res);
ans += incr;
res = incr;
i -= 1;
}
return ans;
}
| int main() {
assert(func0({1, 2, 3}, 3) == 20);
assert(func0({1, 2}, 2) == 5);
assert(func0({1, 2, 3, 4}, 4) == 84);
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> >, int):
endbr64
sub $0x1,%esi
js 1236 <_Z5func0St6vectorIiSaIiEEi+0x2d>
mov (%rdi),%rcx
movslq %esi,%rsi
mov $0x0,%eax
mov $0x0,%edx
add $0x1,%eax
imul (%rcx,%rsi,4),%eax
add %eax,%edx
sub $0x1,%rsi
test %esi,%esi
jns 1222 <_Z5func0St6vectorIiS... | _Z5func0St6vectorIiSaIiEEi:
endbr64
sub esi, 1
js short loc_1236
mov rcx, [rdi]
movsxd rsi, esi
mov eax, 0
mov edx, 0
loc_1222:
add eax, 1
imul eax, [rcx+rsi*4]
add edx, eax
sub rsi, 1
test esi, esi
jns short loc_1222
loc_1233:
mov eax, edx
retn
loc_1236:
mov edx, 0
j... | long long func0(_QWORD *a1, int a2)
{
long long v2; // rsi
int v3; // eax
unsigned int v4; // edx
LODWORD(v2) = a2 - 1;
if ( (int)v2 < 0 )
{
return 0;
}
else
{
v2 = (int)v2;
v3 = 0;
v4 = 0;
do
{
v3 = *(_DWORD *)(*a1 + 4 * v2) * (v3 + 1);
v4 += v3;
--v2;
... | func0:
ENDBR64
SUB ESI,0x1
JS 0x00101236
MOV RCX,qword ptr [RDI]
MOVSXD RSI,ESI
MOV EAX,0x0
MOV EDX,0x0
LAB_00101222:
ADD EAX,0x1
IMUL EAX,dword ptr [RCX + RSI*0x4]
ADD EDX,EAX
SUB RSI,0x1
TEST ESI,ESI
JNS 0x00101222
LAB_00101233:
MOV EAX,EDX
RET
LAB_00101236:
MOV EDX,0x0
JMP 0x00101233 | /* func0(std::vector<int, std::allocator<int> >, int) */
int func0(vector param_1,int param_2)
{
int iVar1;
int iVar2;
long lVar3;
int4 in_register_0000003c;
if (param_2 + -1 < 0) {
iVar2 = 0;
}
else {
lVar3 = (long)(param_2 + -1);
iVar1 = 0;
iVar2 = 0;
do {
iVar1 = (iVar1 +... |
2,934 | func0 |
#include <assert.h>
#include <vector>
using namespace std;
| int func0(vector<int> arr, int n) {
int ans = 0;
int res = 0;
int i = n - 1;
while (i >= 0) {
int incr = arr[i] * (1 + res);
ans += incr;
res = incr;
i -= 1;
}
return ans;
}
| int main() {
assert(func0({1, 2, 3}, 3) == 20);
assert(func0({1, 2}, 2) == 5);
assert(func0({1, 2, 3, 4}, 4) == 84);
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> >, int):
endbr64
sub $0x1,%esi
js 13e0 <_Z5func0St6vectorIiSaIiEEi+0x30>
mov (%rdi),%rdx
movslq %esi,%rsi
xor %eax,%eax
xor %r8d,%r8d
nopl 0x0(%rax)
add $0x1,%eax
imul (%rdx,%rsi,4),%eax
sub $0x1,%rsi
add %eax,%r8d
test %esi,%esi
jns 13c8 <_Z5... | _Z5func0St6vectorIiSaIiEEi:
endbr64
sub esi, 1
js short loc_13D0
mov rcx, [rdi]
movsxd rsi, esi
xor eax, eax
xor edx, edx
nop dword ptr [rax+rax+00h]
loc_13B8:
add eax, 1
imul eax, [rcx+rsi*4]
sub rsi, 1
add edx, eax
test esi, esi
jns short loc_13B8
mov eax, edx
retn
... | long long func0(_QWORD *a1, int a2)
{
long long v2; // rsi
int v3; // eax
unsigned int v4; // edx
LODWORD(v2) = a2 - 1;
if ( (int)v2 < 0 )
return 0LL;
v2 = (int)v2;
v3 = 0;
v4 = 0;
do
{
v3 = *(_DWORD *)(*a1 + 4 * v2--) * (v3 + 1);
v4 += v3;
}
while ( (int)v2 >= 0 );
return v4;
} | func0:
ENDBR64
SUB ESI,0x1
JS 0x001013d0
MOV RCX,qword ptr [RDI]
MOVSXD RSI,ESI
XOR EAX,EAX
XOR EDX,EDX
NOP dword ptr [RAX + RAX*0x1]
LAB_001013b8:
ADD EAX,0x1
IMUL EAX,dword ptr [RCX + RSI*0x4]
SUB RSI,0x1
ADD EDX,EAX
TEST ESI,ESI
JNS 0x001013b8
MOV EAX,EDX
RET
LAB_001013d0:
XOR EDX,EDX
MOV EAX,EDX
RET | /* func0(std::vector<int, std::allocator<int> >, int) */
int func0(vector param_1,int param_2)
{
int iVar1;
int iVar2;
long lVar3;
int4 in_register_0000003c;
if (-1 < param_2 + -1) {
lVar3 = (long)(param_2 + -1);
iVar1 = 0;
iVar2 = 0;
do {
iVar1 = (iVar1 + 1) * *(int *)(*(long *)CON... |
2,935 | func0 |
#include <assert.h>
#include <vector>
using namespace std;
| int func0(vector<int> arr, int n) {
int ans = 0;
int res = 0;
int i = n - 1;
while (i >= 0) {
int incr = arr[i] * (1 + res);
ans += incr;
res = incr;
i -= 1;
}
return ans;
}
| int main() {
assert(func0({1, 2, 3}, 3) == 20);
assert(func0({1, 2}, 2) == 5);
assert(func0({1, 2, 3, 4}, 4) == 84);
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> >, int):
endbr64
sub $0x1,%esi
js 13c0 <_Z5func0St6vectorIiSaIiEEi+0x30>
mov (%rdi),%rdx
movslq %esi,%rsi
xor %eax,%eax
xor %r8d,%r8d
nopl 0x0(%rax)
add $0x1,%eax
imul (%rdx,%rsi,4),%eax
sub $0x1,%rsi
add %eax,%r8d
test %esi,%esi
jns 13a8 <_Z5... | _Z5func0St6vectorIiSaIiEEi:
endbr64
sub esi, 1
js short loc_13D0
mov rcx, [rdi]
movsxd rsi, esi
xor eax, eax
xor edx, edx
nop dword ptr [rax+rax+00h]
loc_13B8:
add eax, 1
imul eax, [rcx+rsi*4]
sub rsi, 1
add edx, eax
test esi, esi
jns short loc_13B8
mov eax, edx
retn
... | long long func0(_QWORD *a1, int a2)
{
long long v2; // rsi
int v3; // eax
unsigned int v4; // edx
LODWORD(v2) = a2 - 1;
if ( (int)v2 < 0 )
return 0LL;
v2 = (int)v2;
v3 = 0;
v4 = 0;
do
{
v3 = *(_DWORD *)(*a1 + 4 * v2--) * (v3 + 1);
v4 += v3;
}
while ( (int)v2 >= 0 );
return v4;
} | func0:
ENDBR64
SUB ESI,0x1
JS 0x001013d0
MOV RCX,qword ptr [RDI]
MOVSXD RSI,ESI
XOR EAX,EAX
XOR EDX,EDX
NOP dword ptr [RAX + RAX*0x1]
LAB_001013b8:
ADD EAX,0x1
IMUL EAX,dword ptr [RCX + RSI*0x4]
SUB RSI,0x1
ADD EDX,EAX
TEST ESI,ESI
JNS 0x001013b8
MOV EAX,EDX
RET
LAB_001013d0:
XOR EDX,EDX
MOV EAX,EDX
RET | /* func0(std::vector<int, std::allocator<int> >, int) */
int func0(vector param_1,int param_2)
{
int iVar1;
int iVar2;
long lVar3;
int4 in_register_0000003c;
if (-1 < param_2 + -1) {
lVar3 = (long)(param_2 + -1);
iVar1 = 0;
iVar2 = 0;
do {
iVar1 = (iVar1 + 1) * *(int *)(*(long *)CON... |
2,936 | func0 | #include <iostream>
#include <assert.h>
unsigned int set_middle_bits(unsigned int n) {
n |= n >> 1;
n |= n >> 2;
n |= n >> 4;
n |= n >> 8;
n |= n >> 16;
return (n >> 1) ^ 1;
}
| unsigned int func0(unsigned int n) {
if (n == 1) {
return 1;
}
return n ^ set_middle_bits(n);
}
| int main() {
assert(func0(9) == 15);
assert(func0(10) == 12);
assert(func0(11) == 13);
return 0;
}
| O0 | cpp | func0(unsigned int):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x8,%rsp
mov %edi,-0x4(%rbp)
cmpl $0x1,-0x4(%rbp)
jne 11e6 <_Z5func0j+0x1c>
mov $0x1,%eax
jmp 11f3 <_Z5func0j+0x29>
mov -0x4(%rbp),%eax
mov %eax,%edi
callq 1189 <_Z15set_middle_bitsj>
xor -0x4(%rbp),%eax
leaveq
retq
| _Z5func0j:
endbr64
push rbp
mov rbp, rsp
sub rsp, 8
mov [rbp+var_4], edi
cmp [rbp+var_4], 1
jnz short loc_11A6
mov eax, 1
jmp short locret_11B3
loc_11A6:
mov eax, [rbp+var_4]
mov edi, eax; unsigned int
call _Z15set_middle_bitsj; set_middle_bits(uint)
xor eax, [rbp+var_4]
lo... | long long func0(unsigned int a1)
{
if ( a1 == 1 )
return 1LL;
else
return a1 ^ (unsigned int)set_middle_bits(a1);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x8
MOV dword ptr [RBP + -0x4],EDI
CMP dword ptr [RBP + -0x4],0x1
JNZ 0x001011a6
MOV EAX,0x1
JMP 0x001011b3
LAB_001011a6:
MOV EAX,dword ptr [RBP + -0x4]
MOV EDI,EAX
CALL 0x00101149
XOR EAX,dword ptr [RBP + -0x4]
LAB_001011b3:
LEAVE
RET | /* func0(unsigned int) */
uint func0(uint param_1)
{
uint uVar1;
if (param_1 == 1) {
uVar1 = 1;
}
else {
uVar1 = set_middle_bits(param_1);
uVar1 = uVar1 ^ param_1;
}
return uVar1;
} |
2,937 | func0 | #include <iostream>
#include <assert.h>
unsigned int set_middle_bits(unsigned int n) {
n |= n >> 1;
n |= n >> 2;
n |= n >> 4;
n |= n >> 8;
n |= n >> 16;
return (n >> 1) ^ 1;
}
| unsigned int func0(unsigned int n) {
if (n == 1) {
return 1;
}
return n ^ set_middle_bits(n);
}
| int main() {
assert(func0(9) == 15);
assert(func0(10) == 12);
assert(func0(11) == 13);
return 0;
}
| O1 | cpp | func0(unsigned int):
endbr64
mov %edi,%eax
cmp $0x1,%edi
je 11c9 <_Z5func0j+0x34>
mov %edi,%edx
shr %edx
or %edi,%edx
mov %edx,%eax
shr $0x2,%eax
or %eax,%edx
mov %edx,%eax
shr $0x4,%eax
or %eax,%edx
mov %edx,%eax
shr $0x8,%eax
or %eax,%edx
mov %edx,%eax
shr $0x10... | _Z5func0j:
endbr64
mov eax, edi
cmp edi, 1
jz short locret_1189
mov edx, edi
shr edx, 1
or edx, edi
mov eax, edx
shr eax, 2
or edx, eax
mov eax, edx
shr eax, 4
or edx, eax
mov eax, edx
shr eax, 8
or edx, eax
mov eax, edx
shr eax, 10h
or eax, ... | long long func0(unsigned int a1)
{
long long result; // rax
result = a1;
if ( a1 != 1 )
return a1 ^ ((((((((a1 | (a1 >> 1)) >> 2) | a1 | (a1 >> 1)) >> 4) | ((a1 | (a1 >> 1)) >> 2) | a1 | (a1 >> 1)) >> 8) | ((((a1 | (a1 >> 1)) >> 2) | a1 | (a1 >> 1)) >> 4) | ((a1 | (a1 >> 1)) >> 2) | a1 | (a1 >> 1) | (((((((... | func0:
ENDBR64
MOV EAX,EDI
CMP EDI,0x1
JZ 0x00101189
MOV EDX,EDI
SHR EDX,0x1
OR EDX,EDI
MOV EAX,EDX
SHR EAX,0x2
OR EDX,EAX
MOV EAX,EDX
SHR EAX,0x4
OR EDX,EAX
MOV EAX,EDX
SHR EAX,0x8
OR EDX,EAX
MOV EAX,EDX
SHR EAX,0x10
OR EAX,EDX
SHR EAX,0x1
XOR EAX,EDI
XOR EAX,0x1
LAB_00101189:
RET | /* func0(unsigned int) */
uint func0(uint param_1)
{
uint uVar1;
if (param_1 != 1) {
uVar1 = param_1 >> 1 | param_1;
uVar1 = uVar1 | uVar1 >> 2;
uVar1 = uVar1 | uVar1 >> 4;
uVar1 = uVar1 | uVar1 >> 8;
param_1 = (uVar1 >> 0x10 | uVar1) >> 1 ^ param_1 ^ 1;
}
return param_1;
} |
2,938 | func0 | #include <iostream>
#include <assert.h>
unsigned int set_middle_bits(unsigned int n) {
n |= n >> 1;
n |= n >> 2;
n |= n >> 4;
n |= n >> 8;
n |= n >> 16;
return (n >> 1) ^ 1;
}
| unsigned int func0(unsigned int n) {
if (n == 1) {
return 1;
}
return n ^ set_middle_bits(n);
}
| int main() {
assert(func0(9) == 15);
assert(func0(10) == 12);
assert(func0(11) == 13);
return 0;
}
| O2 | cpp | func0(unsigned int):
endbr64
mov $0x1,%eax
cmp $0x1,%edi
je 1227 <_Z5func0j+0x37>
mov %edi,%edx
shr %edx
or %edi,%edx
mov %edx,%eax
shr $0x2,%eax
or %eax,%edx
mov %edx,%eax
shr $0x4,%eax
or %eax,%edx
mov %edx,%eax
shr $0x8,%eax
or %eax,%edx
mov %edx,%eax
shr $0x10... | _Z5func0j:
endbr64
mov eax, 1
cmp edi, 1
jz short locret_11A7
mov edx, edi
shr edx, 1
or edx, edi
mov eax, edx
shr eax, 2
or edx, eax
mov eax, edx
shr eax, 4
or edx, eax
mov eax, edx
shr eax, 8
or edx, eax
mov eax, edx
shr eax, 10h
or eax, ed... | long long func0(unsigned int a1)
{
long long result; // rax
result = 1LL;
if ( a1 != 1 )
return a1 ^ ((((((((a1 | (a1 >> 1)) >> 2) | a1 | (a1 >> 1)) >> 4) | ((a1 | (a1 >> 1)) >> 2) | a1 | (a1 >> 1)) >> 8) | ((((a1 | (a1 >> 1)) >> 2) | a1 | (a1 >> 1)) >> 4) | ((a1 | (a1 >> 1)) >> 2) | a1 | (a1 >> 1) | ((((((... | func0:
ENDBR64
MOV EAX,0x1
CMP EDI,0x1
JZ 0x001011a7
MOV EDX,EDI
SHR EDX,0x1
OR EDX,EDI
MOV EAX,EDX
SHR EAX,0x2
OR EDX,EAX
MOV EAX,EDX
SHR EAX,0x4
OR EDX,EAX
MOV EAX,EDX
SHR EAX,0x8
OR EDX,EAX
MOV EAX,EDX
SHR EAX,0x10
OR EAX,EDX
SHR EAX,0x1
XOR EAX,EDI
XOR EAX,0x1
LAB_001011a7:
RET | /* func0(unsigned int) */
uint func0(uint param_1)
{
uint uVar1;
uVar1 = 1;
if (param_1 != 1) {
uVar1 = param_1 >> 1 | param_1;
uVar1 = uVar1 | uVar1 >> 2;
uVar1 = uVar1 | uVar1 >> 4;
uVar1 = uVar1 | uVar1 >> 8;
uVar1 = (uVar1 >> 0x10 | uVar1) >> 1 ^ param_1 ^ 1;
}
return uVar1;
} |
2,939 | func0 | #include <iostream>
#include <assert.h>
unsigned int set_middle_bits(unsigned int n) {
n |= n >> 1;
n |= n >> 2;
n |= n >> 4;
n |= n >> 8;
n |= n >> 16;
return (n >> 1) ^ 1;
}
| unsigned int func0(unsigned int n) {
if (n == 1) {
return 1;
}
return n ^ set_middle_bits(n);
}
| int main() {
assert(func0(9) == 15);
assert(func0(10) == 12);
assert(func0(11) == 13);
return 0;
}
| O3 | cpp | func0(unsigned int):
endbr64
mov $0x1,%eax
cmp $0x1,%edi
je 1227 <_Z5func0j+0x37>
mov %edi,%edx
shr %edx
or %edi,%edx
mov %edx,%eax
shr $0x2,%eax
or %eax,%edx
mov %edx,%eax
shr $0x4,%eax
or %eax,%edx
mov %edx,%eax
shr $0x8,%eax
or %eax,%edx
mov %edx,%eax
shr $0x10... | _Z5func0j:
endbr64
mov eax, 1
cmp edi, 1
jz short locret_11A7
mov edx, edi
shr edx, 1
or edx, edi
mov eax, edx
shr eax, 2
or edx, eax
mov eax, edx
shr eax, 4
or edx, eax
mov eax, edx
shr eax, 8
or edx, eax
mov eax, edx
shr eax, 10h
or eax, ed... | long long func0(unsigned int a1)
{
long long result; // rax
result = 1LL;
if ( a1 != 1 )
return a1 ^ ((((((((a1 | (a1 >> 1)) >> 2) | a1 | (a1 >> 1)) >> 4) | ((a1 | (a1 >> 1)) >> 2) | a1 | (a1 >> 1)) >> 8) | ((((a1 | (a1 >> 1)) >> 2) | a1 | (a1 >> 1)) >> 4) | ((a1 | (a1 >> 1)) >> 2) | a1 | (a1 >> 1) | ((((((... | func0:
ENDBR64
MOV EAX,0x1
CMP EDI,0x1
JZ 0x001011a7
MOV EDX,EDI
SHR EDX,0x1
OR EDX,EDI
MOV EAX,EDX
SHR EAX,0x2
OR EDX,EAX
MOV EAX,EDX
SHR EAX,0x4
OR EDX,EAX
MOV EAX,EDX
SHR EAX,0x8
OR EDX,EAX
MOV EAX,EDX
SHR EAX,0x10
OR EAX,EDX
SHR EAX,0x1
XOR EAX,EDI
XOR EAX,0x1
LAB_001011a7:
RET | /* func0(unsigned int) */
uint func0(uint param_1)
{
uint uVar1;
uVar1 = 1;
if (param_1 != 1) {
uVar1 = param_1 >> 1 | param_1;
uVar1 = uVar1 | uVar1 >> 2;
uVar1 = uVar1 | uVar1 >> 4;
uVar1 = uVar1 | uVar1 >> 8;
uVar1 = (uVar1 >> 0x10 | uVar1) >> 1 ^ param_1 ^ 1;
}
return uVar1;
} |
2,940 | func0 |
#include <iostream>
#include <vector>
#include <algorithm>
#include <assert.h>
| int func0(const std::vector<int>& a, int x) {
auto i = std::lower_bound(a.begin(), a.end(), x);
return i - a.begin();
}
| int main() {
assert(func0({1,2,4,5}, 6) == 4);
assert(func0({1,2,4,5}, 3) == 2);
assert(func0({1,2,4,5}, 7) == 4);
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> > const&, int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x38,%rsp
mov %rdi,-0x38(%rbp)
mov %esi,-0x3c(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x38(%rbp),%rax
mov %rax,%rdi
callq 16ea <_ZNKSt6vectorIiSaIiEE3endEv>
m... | _Z5func0RKSt6vectorIiSaIiEEi:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 38h
mov [rbp+var_38], rdi
mov [rbp+var_3C], esi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_38]
mov rdi, rax
call _ZNKSt6vectorIiSaIiEE3endEv; std::vector<int>::end(void)
m... | long long func0(long long a1, int a2)
{
long long v2; // rbx
long long v3; // rax
int v5; // [rsp+4h] [rbp-3Ch] BYREF
long long v6; // [rsp+8h] [rbp-38h]
long long v7; // [rsp+18h] [rbp-28h] BYREF
_QWORD v8[3]; // [rsp+20h] [rbp-20h] BYREF
v6 = a1;
v5 = a2;
v8[1] = __readfsqword(0x28u);
v2 = std::... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x38
MOV qword ptr [RBP + -0x38],RDI
MOV dword ptr [RBP + -0x3c],ESI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RDI,RAX
CALL 0x00101686
MOV RBX,RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RDI,RAX
CALL 0x001... | /* func0(std::vector<int, std::allocator<int> > const&, int) */
void func0(vector *param_1,int param_2)
{
__normal_iterator _Var1;
__normal_iterator _Var2;
int4 extraout_var;
long in_FS_OFFSET;
int local_44;
vector<int,std::allocator<int>> *local_40;
int8 local_30;
int8 local_28;
long local_20;
... |
2,941 | func0 |
#include <iostream>
#include <vector>
#include <algorithm>
#include <assert.h>
| int func0(const std::vector<int>& a, int x) {
auto i = std::lower_bound(a.begin(), a.end(), x);
return i - a.begin();
}
| int main() {
assert(func0({1,2,4,5}, 6) == 4);
assert(func0({1,2,4,5}, 3) == 2);
assert(func0({1,2,4,5}, 7) == 4);
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> > const&, int):
endbr64
mov (%rdi),%rcx
mov 0x8(%rdi),%rdx
sub %rcx,%rdx
sar $0x2,%rdx
mov %rcx,%rax
jmp 1263 <_Z5func0RKSt6vectorIiSaIiEEi+0x1a>
mov %rdi,%rdx
test %rdx,%rdx
jle 1284 <_Z5func0RKSt6vectorIiSaIiEEi+0x3b>
mov %rdx,%rdi
sar %rdi
le... | _Z5func0RKSt6vectorIiSaIiEEi:
endbr64
mov r8, [rdi]
mov rax, [rdi+8]
sub rax, r8
mov rdx, rax
sar rdx, 2
test rax, rax
jle short loc_124B
mov rax, r8
jmp short loc_1230
loc_1228:
mov rdx, rcx
loc_122B:
test rdx, rdx
jle short loc_124E
loc_1230:
mov rcx, rdx
sar rcx,... | long long func0(_QWORD *a1, int a2)
{
_DWORD *v2; // r8
long long v3; // rdx
_DWORD *v4; // rax
_DWORD *v5; // rdi
v2 = (_DWORD *)*a1;
v3 = (long long)(a1[1] - *a1) >> 2;
if ( (long long)(a1[1] - *a1) <= 0 )
{
v4 = (_DWORD *)*a1;
}
else
{
v4 = (_DWORD *)*a1;
do
{
v5 = &v4[v... | func0:
ENDBR64
MOV R8,qword ptr [RDI]
MOV RAX,qword ptr [RDI + 0x8]
SUB RAX,R8
MOV RDX,RAX
SAR RDX,0x2
TEST RAX,RAX
JLE 0x0010124b
MOV RAX,R8
JMP 0x00101230
LAB_00101228:
MOV RDX,RCX
LAB_0010122b:
TEST RDX,RDX
JLE 0x0010124e
LAB_00101230:
MOV RCX,RDX
SAR RCX,0x1
LEA RDI,[RAX + RCX*0x4]
CMP dword ptr [RDI],ESI
JGE 0x001... | /* func0(std::vector<int, std::allocator<int> > const&, int) */
long func0(vector *param_1,int param_2)
{
int *piVar1;
int *piVar2;
long lVar3;
long lVar4;
long lVar5;
piVar2 = *(int **)param_1;
lVar5 = *(long *)(param_1 + 8) - (long)piVar2;
piVar1 = piVar2;
lVar4 = lVar5 >> 2;
while (lVar3 = l... |
2,942 | func0 |
#include <iostream>
#include <vector>
#include <algorithm>
#include <assert.h>
| int func0(const std::vector<int>& a, int x) {
auto i = std::lower_bound(a.begin(), a.end(), x);
return i - a.begin();
}
| int main() {
assert(func0({1,2,4,5}, 6) == 4);
assert(func0({1,2,4,5}, 3) == 2);
assert(func0({1,2,4,5}, 7) == 4);
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> > const&, int):
endbr64
mov (%rdi),%r8
mov 0x8(%rdi),%rdx
sub %r8,%rdx
mov %r8,%rax
sar $0x2,%rdx
nopl (%rax)
test %rdx,%rdx
jle 147b <_Z5func0RKSt6vectorIiSaIiEEi+0x3b>
mov %rdx,%rcx
sar %rcx
lea (%rax,%rcx,4),%rdi
cmp %esi,(%rdi)
jge 1488... | _Z5func0RKSt6vectorIiSaIiEEi:
endbr64
mov r8, [rdi]
mov rax, [rdi+8]
sub rax, r8
mov rdx, rax
sar rdx, 2
test rax, rax
jle short loc_13C0
mov rax, r8
jmp short loc_13A0
loc_1390:
sub rdx, rcx
lea rax, [rdi+4]
sub rdx, 1
test rdx, rdx
jle short loc_13B6
loc_13A0:
mov... | long long func0(_QWORD *a1, int a2)
{
_DWORD *v2; // r8
long long v3; // rdx
_DWORD *v4; // rax
long long v5; // rcx
_DWORD *v6; // rdi
v2 = (_DWORD *)*a1;
v3 = (long long)(a1[1] - *a1) >> 2;
if ( (long long)(a1[1] - *a1) <= 0 )
return 0LL;
v4 = (_DWORD *)*a1;
do
{
while ( 1 )
{
... | func0:
ENDBR64
MOV R8,qword ptr [RDI]
MOV RAX,qword ptr [RDI + 0x8]
SUB RAX,R8
MOV RDX,RAX
SAR RDX,0x2
TEST RAX,RAX
JLE 0x001013c0
MOV RAX,R8
JMP 0x001013a0
LAB_00101390:
SUB RDX,RCX
LEA RAX,[RDI + 0x4]
SUB RDX,0x1
TEST RDX,RDX
JLE 0x001013b6
LAB_001013a0:
MOV RCX,RDX
SAR RCX,0x1
LEA RDI,[RAX + RCX*0x4]
CMP dword ptr [... | /* func0(std::vector<int, std::allocator<int> > const&, int) */
long func0(vector *param_1,int param_2)
{
int *piVar1;
int *piVar2;
long lVar3;
long lVar4;
piVar1 = *(int **)param_1;
lVar4 = *(long *)(param_1 + 8) - (long)piVar1 >> 2;
piVar2 = piVar1;
if (*(long *)(param_1 + 8) - (long)piVar1 < 1) ... |
2,943 | func0 |
#include <iostream>
#include <vector>
#include <algorithm>
#include <assert.h>
| int func0(const std::vector<int>& a, int x) {
auto i = std::lower_bound(a.begin(), a.end(), x);
return i - a.begin();
}
| int main() {
assert(func0({1,2,4,5}, 6) == 4);
assert(func0({1,2,4,5}, 3) == 2);
assert(func0({1,2,4,5}, 7) == 4);
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> > const&, int):
endbr64
mov (%rdi),%r8
mov 0x8(%rdi),%rdx
sub %r8,%rdx
mov %r8,%rax
sar $0x2,%rdx
nopl (%rax)
test %rdx,%rdx
jle 144b <_Z5func0RKSt6vectorIiSaIiEEi+0x3b>
mov %rdx,%rcx
sar %rcx
lea (%rax,%rcx,4),%rdi
cmp %esi,(%rdi)
jge 1458... | _Z5func0RKSt6vectorIiSaIiEEi:
endbr64
mov r8, [rdi]
mov rax, [rdi+8]
sub rax, r8
mov rdx, rax
sar rdx, 2
test rax, rax
jle short loc_13D0
mov rax, r8
nop dword ptr [rax]
loc_1390:
mov rcx, rdx
sar rcx, 1
lea rdi, [rax+rcx*4]
cmp [rdi], esi
jge short loc_13C0
sub ... | long long func0(_QWORD *a1, int a2)
{
_DWORD *v2; // r8
long long v3; // rdx
_DWORD *v4; // rax
long long v5; // rcx
_DWORD *v6; // rdi
v2 = (_DWORD *)*a1;
v3 = (long long)(a1[1] - *a1) >> 2;
if ( (long long)(a1[1] - *a1) <= 0 )
return 0LL;
v4 = (_DWORD *)*a1;
while ( 1 )
{
while ( 1 )
... | func0:
ENDBR64
MOV R8,qword ptr [RDI]
MOV RAX,qword ptr [RDI + 0x8]
SUB RAX,R8
MOV RDX,RAX
SAR RDX,0x2
TEST RAX,RAX
JLE 0x001013d0
MOV RAX,R8
NOP dword ptr [RAX]
LAB_00101390:
MOV RCX,RDX
SAR RCX,0x1
LEA RDI,[RAX + RCX*0x4]
CMP dword ptr [RDI],ESI
JGE 0x001013c0
SUB RDX,RCX
LEA RAX,[RDI + 0x4]
SUB RDX,0x1
TEST RDX,RDX
... | /* func0(std::vector<int, std::allocator<int> > const&, int) */
long func0(vector *param_1,int param_2)
{
int *piVar1;
int *piVar2;
long lVar3;
long lVar4;
piVar1 = *(int **)param_1;
piVar2 = piVar1;
lVar4 = *(long *)(param_1 + 8) - (long)piVar1 >> 2;
if (*(long *)(param_1 + 8) - (long)piVar1 < 1) ... |
2,944 | func0 |
#include <iostream>
#include <string>
#include <regex>
#include <assert.h>
| std::string func0(const std::string& string) {
std::regex regex("^[aeiouAEIOU][A-Za-z0-9_]*");
if (std::regex_search(string, regex))
return "Valid";
else
return "Invalid";
}
| int main() {
assert(func0("annie") == "Valid");
assert(func0("dawood") == "Invalid");
assert(func0("Else") == "Valid");
return 0;
}
| O0 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x58,%rsp
mov %rdi,-0x58(%rbp)
mov %rsi,-0x60(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
lea -0x40(%rbp),%rax
mov $0x10,%edx
lea ... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 68h
mov [rbp+var_68], rdi
mov [rbp+var_70], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_40]
mov edx, 10h
lea rcx, aAeiouaeiouAZaZ; "^... | long long func0(long long a1, long long a2)
{
char v3; // [rsp+1Fh] [rbp-51h] BYREF
char *v4; // [rsp+20h] [rbp-50h]
char *v5; // [rsp+28h] [rbp-48h]
_BYTE v6[40]; // [rsp+30h] [rbp-40h] BYREF
unsigned long long v7; // [rsp+58h] [rbp-18h]
v7 = __readfsqword(0x28u);
std::basic_regex<char,std::regex_trait... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x68
MOV qword ptr [RBP + -0x68],RDI
MOV qword ptr [RBP + -0x70],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x40]
MOV EDX,0x10
LEA RCX,[0x132051]
MOV RSI,RCX
MOV RDI,RAX
LAB_00104b43:
CALL 0x001061ba
LEA RCX,[RBP + -0x... | /* func0(std::string const&) */
string * func0(string *param_1)
{
bool bVar1;
string *in_RSI;
long in_FS_OFFSET;
allocator local_59;
allocator *local_58;
allocator *local_50;
regex local_48 [40];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
std::regex::basic_regex(local_48,"^[aeiou... |
2,945 | func0 |
#include <iostream>
#include <string>
#include <regex>
#include <assert.h>
| std::string func0(const std::string& string) {
std::regex regex("^[aeiouAEIOU][A-Za-z0-9_]*");
if (std::regex_search(string, regex))
return "Valid";
else
return "Invalid";
}
| int main() {
assert(func0("annie") == "Valid");
assert(func0("dawood") == "Invalid");
assert(func0("Else") == "Valid");
return 0;
}
| O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r13
push %r12
push %rbp
push %rbx
sub $0x58,%rsp
mov %rdi,%rbx
mov %rsi,%rbp
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
lea 0x20(%rsp),%r13
mov %r13,%rdi
callq 4730 <_ZN... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r14
push r12
push rbx
sub rsp, 58h
mov rbx, rdi
mov r14, rsi
mov rax, fs:28h
mov [rbp+var_28], rax
xor eax, eax
lea r12, [rbp+var_70]
lea rdi, [rbp+var_68]; this
call __Z... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV RBX,RDI
MOV R14,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
XOR EAX,EAX
LEA R12,[RBP + -0x70]
LEA RDI,[RBP + -0x68]
CALL 0x001046f0
MOV qword ptr [RBP + -0x60],0x0
MOV qword ptr [RBP + -0x58],0x0
MOV ECX,0x10
LEA RDX,[0x... | /* func0(std::string const&) */
string * func0(string *param_1)
{
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
_Sp_counted_base<(_Lock_policy)2> *p_Var2;
bool bVar3;
int iVar4;
int8 *in_RSI;
long in_FS_OFFSET;
regex local_78 [8];
int local_70 [8];
int8 local_68;
_Sp_counted_base<(_Lock_policy)2> *lo... | |
2,946 | func0 |
#include <iostream>
#include <string>
#include <regex>
#include <assert.h>
| std::string func0(const std::string& string) {
std::regex regex("^[aeiouAEIOU][A-Za-z0-9_]*");
if (std::regex_search(string, regex))
return "Valid";
else
return "Invalid";
}
| int main() {
assert(func0("annie") == "Valid");
assert(func0("dawood") == "Invalid");
assert(func0("Else") == "Valid");
return 0;
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
mov %rsi,%rbx
sub $0x50,%rsp
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
lea 0x20(%rsp),%r13
lea 0x8(%rsp),%rbp... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r14
mov r14, rsi
push r13
lea r13, [rbp+var_70]
push r12
lea r12, [rbp+var_68]
push rbx
mov rbx, rdi
mov rdi, r12; this
sub rsp, 50h
mov rax, fs:28h
mov [rbp+var_28], rax... | long long func0(long long a1, long long *a2)
{
long long v3; // rdi
long long v4; // rsi
long long v5; // rsi
char v6; // r13
long long v7; // rdi
long long v8; // rdx
volatile signed __int32 *v9; // rcx
signed __int32 v10; // eax
long long v12; // rax
_BYTE v13[8]; // [rsp+0h] [rbp-70h] BYREF
_B... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R14
MOV R14,RSI
PUSH R13
LEA R13,[RBP + -0x70]
PUSH R12
LEA R12,[RBP + -0x68]
PUSH RBX
MOV RBX,RDI
MOV RDI,R12
SUB RSP,0x50
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
XOR EAX,EAX
CALL 0x001036d0
LEA RDX,[0x1185f9]
PXOR XMM0,XMM0
MOV RDI,R13
MOV ECX,0x10
LEA RSI,... | /* func0(std::string const&) */
string * func0(string *param_1)
{
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
int8 uVar2;
bool bVar3;
int iVar4;
int8 *in_RSI;
long in_FS_OFFSET;
regex local_78 [8];
int local_70 [8];
int local_68 [16];
int local_58 [16];
int local_48 [16];
long local_30;
lo... |
2,947 | func0 |
#include <iostream>
#include <string>
#include <regex>
#include <assert.h>
| std::string func0(const std::string& string) {
std::regex regex("^[aeiouAEIOU][A-Za-z0-9_]*");
if (std::regex_search(string, regex))
return "Valid";
else
return "Invalid";
}
| int main() {
assert(func0("annie") == "Valid");
assert(func0("dawood") == "Invalid");
assert(func0("Else") == "Valid");
return 0;
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
mov %rsi,%rbx
sub $0x50,%rsp
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
lea 0x20(%rsp),%r13
lea 0x8(%rsp),%rbp... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
mov r15, rsi
push r14
push r13
push r12
push rbp
push rbx
mov rbx, rdi
sub rsp, 2B8h
mov rax, fs:28h
mov [rsp+2E8h+var_40], rax
xor eax, eax
lea r14, [rsp+2E8h+var_2A0]
mov rdi, r14; this
c... | long long func0(long long a1, unsigned long long *a2)
{
__m128i v3; // xmm0
long long v4; // rdi
void *v5; // rdi
void **v6; // rbp
unsigned long long v7; // r12
void *v8; // rdi
unsigned long long v9; // r13
unsigned long long v10; // rbp
long long v11; // rax
long long v12; // rcx
unsigned long... | func0:
ENDBR64
PUSH R15
MOV R15,RSI
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV RBX,RDI
SUB RSP,0x2b8
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x2a8],RAX
XOR EAX,EAX
LEA R14,[RSP + 0x48]
MOV RDI,R14
CALL 0x00104730
LEA RDX,[0x11a63a]
PXOR XMM0,XMM0
LEA RDI,[RSP + 0x110]
MOV R8D,0x10
MOV RCX,R14
LEA RSI,[RD... | /* func0(std::string const&) */
string * func0(string *param_1)
{
ulong uVar1;
int8 uVar2;
ulong uVar3;
int auVar4 [16];
bool bVar5;
char cVar6;
long lVar7;
int8 *puVar8;
int8 *puVar9;
ulong uVar10;
ulong *puVar11;
long lVar12;
ulong uVar13;
ulong *in_RSI;
uint *puVar14;
_Match_mode _V... |
2,948 | func0 |
#include <cmath>
#include <cassert>
| double func0(int n) {
if (n < 0) {
return 0;
} else {
return 1 / (pow(2, n)) + func0(n - 1);
}
}
| int main() {
assert(func0(7) == 1.9921875);
assert(func0(4) == 1.9375);
assert(func0(8) == 1.99609375);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x10,%rsp
mov %edi,-0x4(%rbp)
cmpl $0x0,-0x4(%rbp)
jns 1184 <_Z5func0i+0x1b>
pxor %xmm0,%xmm0
jmp 11c1 <_Z5func0i+0x58>
cvtsi2sdl -0x4(%rbp),%xmm0
mov 0xf10(%rip),%rax
movapd %xmm0,%xmm1
movq %rax,%xmm0
callq 1060 <pow@plt>
movsd 0xf02(%rip),%... | _Z5func0i:
endbr64
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_4], edi
cmp [rbp+var_4], 0
jns short loc_1184
pxor xmm0, xmm0
jmp short locret_11C5
loc_1184:
pxor xmm0, xmm0
cvtsi2sd xmm0, [rbp+var_4]
mov rax, cs:x
movapd xmm1, xmm0; y
movq xmm0, rax; x
call _pow
movsd x... | double func0(int a1)
{
double v2; // xmm0_8
if ( a1 < 0 )
return 0.0;
v2 = pow(2.0, (double)a1);
func0(a1 - 1);
return v2 + 1.0 / v2;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV dword ptr [RBP + -0x4],EDI
CMP dword ptr [RBP + -0x4],0x0
JNS 0x00101184
PXOR XMM0,XMM0
JMP 0x001011c5
LAB_00101184:
PXOR XMM0,XMM0
CVTSI2SD XMM0,dword ptr [RBP + -0x4]
MOV RAX,qword ptr [0x00102080]
MOVAPD XMM1,XMM0
MOVQ XMM0,RAX
CALL 0x00101060
MOVSD XMM1,qword ptr... | /* func0(int) */
double func0(int param_1)
{
double dVar1;
double dVar2;
if (param_1 < 0) {
dVar2 = 0.0;
}
else {
dVar1 = pow(DAT_00102080,(double)param_1);
dVar1 = DAT_00102088 / dVar1;
dVar2 = (double)func0(param_1 + -1);
dVar2 = dVar2 + dVar1;
}
return dVar2;
} |
2,949 | func0 |
#include <cmath>
#include <cassert>
| double func0(int n) {
if (n < 0) {
return 0;
} else {
return 1 / (pow(2, n)) + func0(n - 1);
}
}
| int main() {
assert(func0(7) == 1.9921875);
assert(func0(4) == 1.9375);
assert(func0(8) == 1.99609375);
return 0;
}
| O1 | cpp | func0(int):
endbr64
pxor %xmm0,%xmm0
test %edi,%edi
js 11bb <_Z5func0i+0x52>
push %rbx
sub $0x10,%rsp
mov %edi,%ebx
pxor %xmm1,%xmm1
cvtsi2sd %edi,%xmm1
movsd 0xf0c(%rip),%xmm0
callq 1060 <pow@plt>
movsd %xmm0,0x8(%rsp)
lea -0x1(%rbx),%edi
callq 1169 <_Z5func0i>
movapd %xmm0,%xmm1
movsd 0xef5(... | _Z5func0i:
endbr64
pxor xmm0, xmm0
test edi, edi
js short locret_11B7
push rbx
sub rsp, 10h
mov ebx, edi
pxor xmm1, xmm1
cvtsi2sd xmm1, edi; y
movsd xmm0, cs:x; x
call _pow
movsd xmm1, cs:qword_2078
divsd xmm1, xmm0
movsd [rsp+18h+var_10], xmm1
lea edi, [rbx-1]; int
call _Z5fu... | double func0(int a1)
{
double result; // xmm0_8
double v2; // xmm0_8
result = 0.0;
if ( a1 >= 0 )
{
v2 = pow(2.0, (double)a1);
func0(a1 - 1);
return v2 + 1.0 / v2;
}
return result;
} | func0:
ENDBR64
PXOR XMM0,XMM0
TEST EDI,EDI
JS 0x001011b7
PUSH RBX
SUB RSP,0x10
MOV EBX,EDI
PXOR XMM1,XMM1
CVTSI2SD XMM1,EDI
MOVSD XMM0,qword ptr [0x00102070]
CALL 0x00101060
MOVSD XMM1,qword ptr [0x00102078]
DIVSD XMM1,XMM0
MOVSD qword ptr [RSP + 0x8],XMM1
LEA EDI,[RBX + -0x1]
CALL 0x00101169
ADDSD XMM0,qword ptr [RSP ... | /* func0(int) */
double func0(int param_1)
{
double dVar1;
double dVar2;
if (-1 < param_1) {
dVar1 = pow(DAT_00102070,(double)param_1);
dVar1 = DAT_00102078 / dVar1;
dVar2 = (double)func0(param_1 + -1);
return dVar2 + dVar1;
}
return 0.0;
} |
2,950 | func0 |
#include <cmath>
#include <cassert>
| double func0(int n) {
if (n < 0) {
return 0;
} else {
return 1 / (pow(2, n)) + func0(n - 1);
}
}
| int main() {
assert(func0(7) == 1.9921875);
assert(func0(4) == 1.9375);
assert(func0(8) == 1.99609375);
return 0;
}
| O2 | cpp | func0(int):
endbr64
test %edi,%edi
js 1230 <_Z5func0i+0x10>
jmp 1240 <_Z5func0i.part.0>
nopw 0x0(%rax,%rax,1)
pxor %xmm0,%xmm0
retq
data16 nopw %cs:0x0(%rax,%rax,1)
| _Z5func0i_part_0:
push rbx
pxor xmm1, xmm1
mov ebx, edi
cvtsi2sd xmm1, edi; y
sub rsp, 30h
movsd xmm0, cs:x; x
call _pow
movsd xmm3, cs:qword_2078
divsd xmm3, xmm0
pxor xmm0, xmm0
movsd [rsp+38h+var_30], xmm3
test ebx, ebx
jz loc_135C
lea eax, [rbx-1]
pxor xmm1, xmm1
movsd x... | double func0(int a1)
{
double v1; // xmm3_8
double v2; // xmm0_8
double v3; // xmm5_8
double v4; // xmm0_8
double v5; // xmm7_8
double v6; // xmm0_8
double v7; // xmm2_8
double v8; // xmm0_8
double v9; // xmm1_8
double v11; // [rsp+8h] [rbp-28h]
v1 = 1.0 / pow(2.0, (double)a1);
v2 = 0.0;
if ... | func0:
PUSH RBX
PXOR XMM1,XMM1
MOV EBX,EDI
CVTSI2SD XMM1,EDI
SUB RSP,0x30
MOVSD XMM0,qword ptr [0x00102070]
CALL 0x00101060
MOVSD XMM3,qword ptr [0x00102078]
DIVSD XMM3,XMM0
PXOR XMM0,XMM0
MOVSD qword ptr [RSP + 0x8],XMM3
TEST EBX,EBX
JZ 0x0010135c
LEA EAX,[RBX + -0x1]
PXOR XMM1,XMM1
MOVSD XMM0,qword ptr [0x00102070]
C... | /* func0(int) [clone .part.0] */
double func0(int param_1)
{
double dVar1;
double dVar2;
double dVar3;
double dVar4;
double dVar5;
double dVar6;
dVar1 = pow(DAT_00102070,(double)param_1);
dVar1 = DAT_00102078 / dVar1;
dVar6 = 0.0;
if (param_1 != 0) {
dVar2 = pow(DAT_00102070,(double)(param_... |
2,951 | func0 |
#include <cmath>
#include <cassert>
| double func0(int n) {
if (n < 0) {
return 0;
} else {
return 1 / (pow(2, n)) + func0(n - 1);
}
}
| int main() {
assert(func0(7) == 1.9921875);
assert(func0(4) == 1.9375);
assert(func0(8) == 1.99609375);
return 0;
}
| O3 | cpp | func0(int) [clone .part.0]:
push %rbx
pxor %xmm1,%xmm1
mov %edi,%ebx
cvtsi2sd %edi,%xmm1
sub $0x10,%rsp
movsd 0xe61(%rip),%xmm0
callq 1060 <pow@plt>
movsd 0xe5c(%rip),%xmm1
divsd %xmm0,%xmm1
pxor %xmm0,%xmm0
test %ebx,%ebx
je 1264 <_Z5func0i.part.0+0x44>
lea -0x1(%rbx),%edi
movsd %xmm1,0x8(%rs... | _Z5func0i_part_0:
push rbx
pxor xmm1, xmm1
mov ebx, edi
cvtsi2sd xmm1, edi; y
sub rsp, 30h
movsd xmm0, cs:x; x
call _pow
movsd xmm3, cs:qword_2080
divsd xmm3, xmm0
pxor xmm0, xmm0
movsd [rsp+38h+var_30], xmm3
test ebx, ebx
jz loc_135C
lea eax, [rbx-1]
pxor xmm1, xmm1
movsd x... | double func0(int a1)
{
double v1; // xmm3_8
double v2; // xmm0_8
double v3; // xmm5_8
double v4; // xmm0_8
double v5; // xmm7_8
double v6; // xmm0_8
double v7; // xmm2_8
double v8; // xmm0_8
double v9; // xmm1_8
double v11; // [rsp+8h] [rbp-28h]
v1 = 1.0 / pow(2.0, (double)a1);
v2 = 0.0;
if ... | func0:
PUSH RBX
PXOR XMM1,XMM1
MOV EBX,EDI
CVTSI2SD XMM1,EDI
SUB RSP,0x30
MOVSD XMM0,qword ptr [0x00102078]
CALL 0x00101060
MOVSD XMM3,qword ptr [0x00102080]
DIVSD XMM3,XMM0
PXOR XMM0,XMM0
MOVSD qword ptr [RSP + 0x8],XMM3
TEST EBX,EBX
JZ 0x0010135c
LEA EAX,[RBX + -0x1]
PXOR XMM1,XMM1
MOVSD XMM0,qword ptr [0x00102078]
C... | /* func0(int) [clone .part.0] */
double func0(int param_1)
{
double dVar1;
double dVar2;
double dVar3;
double dVar4;
double dVar5;
double dVar6;
dVar1 = pow(DAT_00102078,(double)param_1);
dVar1 = DAT_00102080 / dVar1;
dVar6 = 0.0;
if (param_1 != 0) {
dVar2 = pow(DAT_00102078,(double)(param_... |
2,952 | func0 |
#include <cmath>
#include <cassert>
| int func0(int n) {
double x = std::sqrt(2 * std::pow(10,(n - 1)));
return std::round(x);
}
| int main() {
assert(func0(2) == 4);
assert(func0(3) == 14);
assert(func0(4) == 45);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x20,%rsp
mov %edi,-0x14(%rbp)
mov -0x14(%rbp),%eax
sub $0x1,%eax
mov %eax,%esi
mov $0xa,%edi
callq 1289 <_ZSt3powIiiEN9__gnu_cxx11__promote_2IT_T0_NS0_9__promoteIS2_XsrSt12__is_integerIS2_E7__valueEE6__typeENS4_IS3_XsrS5_IS3_E7__valueEE6__typeEE6... | _Z5func0i:
endbr64
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_14], edi
mov eax, [rbp+var_14]
sub eax, 1
mov esi, eax
mov edi, 0Ah
call _ZSt3powIiiEN9__gnu_cxx11__promote_2IDTplcvNS1_IT_XsrSt12__is_integerIS2_E7__valueEE6__typeELi0EcvNS1_IT0_XsrS3_IS7_E7__valueEE6__typeELi0EEXsrS3_... | long long func0(int a1)
{
double v1; // xmm0_8
double v2; // xmm0_8
v1 = std::pow<int,int>(10LL, (unsigned int)(a1 - 1));
v2 = sqrt(v1 + v1);
return (unsigned int)(int)round(v2);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0x14],EDI
MOV EAX,dword ptr [RBP + -0x14]
SUB EAX,0x1
MOV ESI,EAX
MOV EDI,0xa
CALL 0x001012ae
ADDSD XMM0,XMM0
MOVQ RAX,XMM0
MOVQ XMM0,RAX
CALL 0x001010b0
MOVQ RAX,XMM0
MOV qword ptr [RBP + -0x8],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOVQ XMM0,RAX
CALL ... | /* func0(int) */
int func0(int param_1)
{
double extraout_XMM0_Qa;
double dVar1;
std::pow<int,int>(10,param_1 + -1);
dVar1 = sqrt(extraout_XMM0_Qa + extraout_XMM0_Qa);
dVar1 = round(dVar1);
return (int)dVar1;
} |
2,953 | func0 |
#include <cmath>
#include <cassert>
| int func0(int n) {
double x = std::sqrt(2 * std::pow(10,(n - 1)));
return std::round(x);
}
| int main() {
assert(func0(2) == 4);
assert(func0(3) == 14);
assert(func0(4) == 45);
return 0;
}
| O1 | cpp | func0(int):
endbr64
sub $0x18,%rsp
sub $0x1,%edi
pxor %xmm1,%xmm1
cvtsi2sd %edi,%xmm1
movsd 0xec4(%rip),%xmm0
callq 1090 <pow@plt>
addsd %xmm0,%xmm0
movapd %xmm0,%xmm2
sqrtsd %xmm2,%xmm2
movsd %xmm2,0x8(%rsp)
pxor %xmm1,%xmm1
ucomisd %xmm0,%xmm1
ja 11f9 <_Z5func0i+0x50>
movsd 0x8(%rsp),%xmm0
callq 1... | _Z5func0i:
endbr64
sub rsp, 8
sub edi, 1
pxor xmm1, xmm1
cvtsi2sd xmm1, edi; y
movsd xmm0, cs:x; x
call _pow
addsd xmm0, xmm0
sqrtsd xmm0, xmm0; x
call _round
cvttsd2si eax, xmm0
add rsp, 8
retn | long long func0(int a1)
{
double v1; // xmm0_8
v1 = pow(10.0, (double)(a1 - 1));
return (unsigned int)(int)round(sqrt(v1 + v1));
} | func0:
ENDBR64
SUB RSP,0x8
SUB EDI,0x1
PXOR XMM1,XMM1
CVTSI2SD XMM1,EDI
MOVSD XMM0,qword ptr [0x00102060]
CALL 0x00101080
ADDSD XMM0,XMM0
SQRTSD XMM0,XMM0
CALL 0x00101070
CVTTSD2SI EAX,XMM0
ADD RSP,0x8
RET | /* func0(int) */
int func0(int param_1)
{
double dVar1;
dVar1 = pow(DAT_00102060,(double)(param_1 + -1));
dVar1 = round(SQRT(dVar1 + dVar1));
return (int)dVar1;
} |
2,954 | func0 |
#include <cmath>
#include <cassert>
| int func0(int n) {
double x = std::sqrt(2 * std::pow(10,(n - 1)));
return std::round(x);
}
| int main() {
assert(func0(2) == 4);
assert(func0(3) == 14);
assert(func0(4) == 45);
return 0;
}
| O2 | cpp | func0(int):
endbr64
sub $0x1,%edi
pxor %xmm1,%xmm1
sub $0x18,%rsp
movsd 0xe21(%rip),%xmm0
cvtsi2sd %edi,%xmm1
callq 1090 <pow@plt>
pxor %xmm2,%xmm2
addsd %xmm0,%xmm0
ucomisd %xmm0,%xmm2
movapd %xmm0,%xmm1
sqrtsd %xmm1,%xmm1
ja 1298 <_Z5func0i+0x48>
movapd %xmm1,%xmm0
callq 1080 <round@plt>
add $0x1... | _Z5func0i:
endbr64
sub edi, 1
pxor xmm1, xmm1
sub rsp, 8
movsd xmm0, cs:x; x
cvtsi2sd xmm1, edi; y
call _pow
addsd xmm0, xmm0
sqrtsd xmm0, xmm0; x
call _round
add rsp, 8
cvttsd2si eax, xmm0
retn | long long func0(int a1)
{
double v1; // xmm0_8
v1 = pow(10.0, (double)(a1 - 1));
return (unsigned int)(int)round(sqrt(v1 + v1));
} | func0:
ENDBR64
SUB EDI,0x1
PXOR XMM1,XMM1
SUB RSP,0x8
MOVSD XMM0,qword ptr [0x00102060]
CVTSI2SD XMM1,EDI
CALL 0x00101080
ADDSD XMM0,XMM0
SQRTSD XMM0,XMM0
CALL 0x00101070
ADD RSP,0x8
CVTTSD2SI EAX,XMM0
RET | /* func0(int) */
int func0(int param_1)
{
double dVar1;
dVar1 = pow(DAT_00102060,(double)(param_1 + -1));
dVar1 = round(SQRT(dVar1 + dVar1));
return (int)dVar1;
} |
2,955 | func0 |
#include <cmath>
#include <cassert>
| int func0(int n) {
double x = std::sqrt(2 * std::pow(10,(n - 1)));
return std::round(x);
}
| int main() {
assert(func0(2) == 4);
assert(func0(3) == 14);
assert(func0(4) == 45);
return 0;
}
| O3 | cpp | func0(int):
endbr64
sub $0x1,%edi
pxor %xmm1,%xmm1
sub $0x18,%rsp
movsd 0xe21(%rip),%xmm0
cvtsi2sd %edi,%xmm1
callq 1090 <pow@plt>
pxor %xmm2,%xmm2
addsd %xmm0,%xmm0
ucomisd %xmm0,%xmm2
movapd %xmm0,%xmm1
sqrtsd %xmm1,%xmm1
ja 1298 <_Z5func0i+0x48>
movapd %xmm1,%xmm0
callq 1080 <round@plt>
add $0x1... | _Z5func0i:
endbr64
sub edi, 1
pxor xmm1, xmm1
sub rsp, 8
movsd xmm0, cs:x; x
cvtsi2sd xmm1, edi; y
call _pow
addsd xmm0, xmm0
sqrtsd xmm0, xmm0; x
call _round
add rsp, 8
cvttsd2si eax, xmm0
retn | long long func0(int a1)
{
double v1; // xmm0_8
v1 = pow(10.0, (double)(a1 - 1));
return (unsigned int)(int)round(sqrt(v1 + v1));
} | func0:
ENDBR64
SUB EDI,0x1
PXOR XMM1,XMM1
SUB RSP,0x8
MOVSD XMM0,qword ptr [0x00102068]
CVTSI2SD XMM1,EDI
CALL 0x00101080
ADDSD XMM0,XMM0
SQRTSD XMM0,XMM0
CALL 0x00101070
ADD RSP,0x8
CVTTSD2SI EAX,XMM0
RET | /* func0(int) */
int func0(int param_1)
{
double dVar1;
dVar1 = pow(DAT_00102068,(double)(param_1 + -1));
dVar1 = round(SQRT(dVar1 + dVar1));
return (int)dVar1;
} |
2,956 | func0 | #include <cassert>
#include <map>
#include <vector>
| std::map<int, int> func0(const std::vector<int>& test_tup) {
std::map<int, int> res;
for (size_t i = 0; i < test_tup.size(); i += 2) {
res[test_tup[i]] = test_tup[i + 1];
}
return res;
}
| int main() {
{
std::map<int, int> expected = {{1, 5}, {7, 10}, {13, 5}};
assert(func0({1, 5, 7, 10, 13, 5}) == expected);
}
{
std::map<int, int> expected = {{1, 2}, {3, 4}, {5, 6}};
assert(func0({1, 2, 3, 4, 5, 6}) == expected);
}
{
std::map<int, int... | O0 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x28,%rsp
mov %rdi,-0x28(%rbp)
mov %rsi,-0x30(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x28(%rbp),%rax
mov %rax,%rdi
callq 1b70 <_ZNSt3mapIiiSt4lessIiESaISt4pairIKi... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 28h
mov [rbp+var_28], rdi
mov [rbp+var_30], rsi
mov rax, [rbp+var_28]
mov rdi, rax
call _ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEC2Ev; std::map<int,int>::map(void)
mov [rbp+var_18], 0
jmp short loc_1399
l... | long long func0(long long a1, long long a2)
{
int v2; // ebx
long long v3; // rax
unsigned long long i; // [rsp+18h] [rbp-18h]
std::map<int,int>::map(a1);
for ( i = 0LL; i < std::vector<int>::size(a2); i += 2LL )
{
v2 = *(_DWORD *)std::vector<int>::operator[](a2, i + 1);
v3 = std::vector<int>::ope... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x28
MOV qword ptr [RBP + -0x28],RDI
MOV qword ptr [RBP + -0x30],RSI
MOV RAX,qword ptr [RBP + -0x28]
MOV RDI,RAX
CALL 0x00101be8
MOV qword ptr [RBP + -0x18],0x0
JMP 0x00101399
LAB_00101354:
MOV RAX,qword ptr [RBP + -0x18]
LEA RDX,[RAX + 0x1]
MOV RAX,qword ptr [RBP + ... | /* func0(std::vector<int, std::allocator<int> > const&) */
vector * func0(vector *param_1)
{
int4 uVar1;
int4 *puVar2;
int *piVar3;
ulong uVar4;
vector<int,std::allocator<int>> *in_RSI;
int8 local_20;
std::map<int,int,std::less<int>,std::allocator<std::pair<int_const,int>>>::map
((map<int... |
2,957 | func0 | #include <cassert>
#include <map>
#include <vector>
| std::map<int, int> func0(const std::vector<int>& test_tup) {
std::map<int, int> res;
for (size_t i = 0; i < test_tup.size(); i += 2) {
res[test_tup[i]] = test_tup[i + 1];
}
return res;
}
| int main() {
{
std::map<int, int> expected = {{1, 5}, {7, 10}, {13, 5}};
assert(func0({1, 5, 7, 10, 13, 5}) == expected);
}
{
std::map<int, int> expected = {{1, 2}, {3, 4}, {5, 6}};
assert(func0({1, 2, 3, 4, 5, 6}) == expected);
}
{
std::map<int, int... | O1 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x28,%rsp
mov %rdi,%r12
movl $0x0,0x8(%rdi)
movq $0x0,0x10(%rdi)
lea 0x8(%rdi),%r13
mov %r13,0x18(%rdi)
mov %r13,0x20(%rdi)
movq $0x0,0x28(%rdi)
mov (%rsi),%... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 18h
mov r12, rdi
mov dword ptr [rdi+8], 0
mov qword ptr [rdi+10h], 0
lea r13, [rdi+8]
mov [rdi+18h], r13
mov [rdi+20h], r13
mov qword ptr [rdi+28h], 0
mov rdx, [rsi]
... | long long func0(long long a1, long long *a2)
{
_DWORD *v3; // r13
long long v4; // rdx
unsigned long long i; // rbp
long long v6; // rax
_DWORD *v7; // rbx
unsigned int v8; // r15d
long long insert_hint_unique_pos; // rax
_DWORD *v10; // rdx
bool v11; // di
unsigned int *v12; // r15
int v13; // e... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x18
MOV R12,RDI
MOV dword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
LEA R13,[RDI + 0x8]
MOV qword ptr [RDI + 0x18],R13
MOV qword ptr [RDI + 0x20],R13
MOV qword ptr [RDI + 0x28],0x0
MOV RDX,qword ptr [RSI]
CMP RDX,qword ptr [RSI + 0x8... | /* func0(std::vector<int, std::allocator<int> > const&) */
vector * func0(vector *param_1)
{
_Rb_tree_node_base *p_Var1;
int *piVar2;
int4 uVar3;
int iVar4;
bool bVar5;
_Rb_tree_node_base *p_Var6;
_Rb_tree_node_base *p_Var7;
long lVar8;
_Rb_tree_node_base *p_Var9;
ulong uVar10;
long *in_RSI;
i... |
2,958 | func0 | #include <cassert>
#include <map>
#include <vector>
| std::map<int, int> func0(const std::vector<int>& test_tup) {
std::map<int, int> res;
for (size_t i = 0; i < test_tup.size(); i += 2) {
res[test_tup[i]] = test_tup[i + 1];
}
return res;
}
| int main() {
{
std::map<int, int> expected = {{1, 5}, {7, 10}, {13, 5}};
assert(func0({1, 5, 7, 10, 13, 5}) == expected);
}
{
std::map<int, int> expected = {{1, 2}, {3, 4}, {5, 6}};
assert(func0({1, 2, 3, 4, 5, 6}) == expected);
}
{
std::map<int, int... | O2 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
lea 0x8(%rdi),%rbp
push %rbx
sub $0x18,%rsp
movl $0x0,0x8(%rdi)
mov (%rsi),%rdx
movq $0x0,0x10(%rdi)
mov %rbp,0x18(%rdi)
mov %rbp,0x20(%rdi)
movq $0x0,0x28(%r... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push r15
push r14
push r13
lea r13, [rdi+8]
push r12
mov r12, rdi
push rbp
push rbx
sub rsp, 18h
mov dword ptr [rdi+8], 0
mov qword ptr [rdi+10h], 0
mov [rdi+18h], r13
mov [rdi+20h], r13
mov qword ptr [rdi+28h], 0
mov rdi, [rsi]
... | _QWORD * func0(_QWORD *a1, long long *a2)
{
_DWORD *v2; // r13
long long v4; // rdi
long long v6; // rax
unsigned long long v7; // rbp
int v8; // r15d
unsigned int *v9; // rbx
int v10; // esi
_DWORD *v11; // r8
long long v12; // rdx
long long v13; // rcx
_DWORD *v14; // rax
unsigned int v15; // ... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
LEA R13,[RDI + 0x8]
PUSH R12
MOV R12,RDI
PUSH RBP
PUSH RBX
SUB RSP,0x18
MOV dword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
MOV qword ptr [RDI + 0x18],R13
MOV qword ptr [RDI + 0x20],R13
MOV qword ptr [RDI + 0x28],0x0
MOV RDI,qword ptr [RSI]
CMP qword ptr [RSI + 0x8],RD... | /* func0(std::vector<int, std::allocator<int> > const&) */
vector * func0(vector *param_1)
{
_Rb_tree_node_base *p_Var1;
int4 uVar2;
uint uVar3;
long lVar4;
_Rb_tree_node_base *p_Var5;
_Rb_tree_node_base *p_Var6;
uint *puVar7;
ulong uVar8;
long *in_RSI;
bool bVar9;
long lVar10;
_Rb_tree_node_b... |
2,959 | func0 | #include <cassert>
#include <map>
#include <vector>
| std::map<int, int> func0(const std::vector<int>& test_tup) {
std::map<int, int> res;
for (size_t i = 0; i < test_tup.size(); i += 2) {
res[test_tup[i]] = test_tup[i + 1];
}
return res;
}
| int main() {
{
std::map<int, int> expected = {{1, 5}, {7, 10}, {13, 5}};
assert(func0({1, 5, 7, 10, 13, 5}) == expected);
}
{
std::map<int, int> expected = {{1, 2}, {3, 4}, {5, 6}};
assert(func0({1, 2, 3, 4, 5, 6}) == expected);
}
{
std::map<int, int... | O3 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
lea 0x8(%rdi),%rbp
push %rbx
sub $0x18,%rsp
mov (%rsi),%rdx
movl $0x0,0x8(%rdi)
mov %rsi,0x8(%rsp)
mov 0x8(%rsi),%rsi
movq $0x0,0x10(%rdi)
mov %rbp,0x18(%rdi... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push r15
push r14
lea r14, [rdi+8]
push r13
mov r13, rdi
push r12
push rbp
push rbx
sub rsp, 28h
mov dword ptr [rdi+8], 0
mov r8, [rsi+8]
mov qword ptr [rdi+10h], 0
mov [rdi+18h], r14
mov [rdi+20h], r14
mov qword ptr [rdi+28h], 0... | long long func0(long long a1, long long a2)
{
long long v2; // r14
long long v4; // r8
long long v5; // rdi
void *v6; // rbx
unsigned long long v7; // r12
int v8; // r15d
unsigned int *v9; // rbp
int v10; // ecx
void *v11; // rdx
_QWORD *v12; // rax
_DWORD *v13; // rax
long long v14; // rdx
v... | func0:
ENDBR64
PUSH R15
PUSH R14
LEA R14,[RDI + 0x8]
PUSH R13
MOV R13,RDI
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x28
MOV dword ptr [RDI + 0x8],0x0
MOV R8,qword ptr [RSI + 0x8]
MOV qword ptr [RDI + 0x10],0x0
MOV qword ptr [RDI + 0x18],R14
MOV qword ptr [RDI + 0x20],R14
MOV qword ptr [RDI + 0x28],0x0
MOV RDI,qword ptr [RSI]... | /* func0(std::vector<int, std::allocator<int> > const&) */
vector * func0(vector *param_1)
{
_Rb_tree_node_base *p_Var1;
int4 uVar2;
_Rb_tree_node_base *p_Var3;
_Rb_tree_node_base *p_Var4;
_Rb_tree_node_base *p_Var5;
_Rb_tree_node_base *p_Var6;
_Rb_tree_node_base *p_Var7;
_Rb_tree_node_base *p_Var8;
... |
2,960 | func0 |
#include <string>
#include <assert.h>
| bool func0(std::string s) {
int n = s.length();
for (int i = 1; i < n; i++) {
if (s[i] != s[0]) {
return false;
}
}
return true;
}
| int main() {
assert(func0("python") == false);
assert(func0("aaa") == true);
assert(func0("data") == false);
return 0;
}
| O0 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x28,%rsp
mov %rdi,-0x28(%rbp)
mov -0x28(%rbp),%rax
mov %rax,%rdi
callq 1290 <_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv@plt>
mov %eax,-0x14(... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 28h
mov [rbp+var_28], rdi
mov rax, [rbp+var_28]
mov rdi, rax
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv; std::string::length(void)
mov [rbp+var_14], e... | long long func0(long long a1)
{
char v1; // bl
int i; // [rsp+18h] [rbp-18h]
int v4; // [rsp+1Ch] [rbp-14h]
v4 = std::string::length(a1);
for ( i = 1; i < v4; ++i )
{
v1 = *(_BYTE *)std::string::operator[](a1, i);
if ( v1 != *(_BYTE *)std::string::operator[](a1, 0LL) )
return 0LL;
}
retu... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x28
MOV qword ptr [RBP + -0x28],RDI
MOV RAX,qword ptr [RBP + -0x28]
MOV RDI,RAX
CALL 0x00101210
MOV dword ptr [RBP + -0x14],EAX
MOV dword ptr [RBP + -0x18],0x1
JMP 0x001013b2
LAB_00101372:
MOV EAX,dword ptr [RBP + -0x18]
MOVSXD RDX,EAX
MOV RAX,qword ptr [RBP + -0x28... | /* func0(std::string) */
int8 func0(ulong param_1)
{
char cVar1;
int iVar2;
char *pcVar3;
int local_20;
iVar2 = std::string::length();
local_20 = 1;
while( true ) {
if (iVar2 <= local_20) {
return 1;
}
pcVar3 = (char *)std::string::operator[](param_1);
cVar1 = *pcVar3;
pcVar... |
2,961 | func0 |
#include <string>
#include <assert.h>
| bool func0(std::string s) {
int n = s.length();
for (int i = 1; i < n; i++) {
if (s[i] != s[0]) {
return false;
}
}
return true;
}
| int main() {
assert(func0("python") == false);
assert(func0("aaa") == true);
assert(func0("data") == false);
return 0;
}
| O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
mov 0x8(%rdi),%rsi
cmp $0x1,%esi
jle 121b <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x32>
mov (%rdi),%rcx
movzbl (%rcx),%edx
lea 0x1(%rcx),%rax
lea -0x2(%rsi),%esi
lea 0x2(%rcx,%rsi,1... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
mov rsi, [rdi+8]
cmp esi, 1
jle short loc_123B
mov rcx, [rdi]
movzx edx, byte ptr [rcx]
lea rax, [rcx+1]
lea esi, [rsi-2]
lea rcx, [rcx+rsi+2]
loc_1228:
cmp [rax], dl
jnz short loc_1241
add rax, 1
cmp rax... | long long func0(_QWORD *a1)
{
long long v1; // rsi
_BYTE *v2; // rax
v1 = a1[1];
if ( (int)v1 <= 1 )
return 1LL;
v2 = (_BYTE *)(*a1 + 1LL);
while ( *v2 == *(_BYTE *)*a1 )
{
if ( ++v2 == (_BYTE *)(*a1 + (unsigned int)(v1 - 2) + 2LL) )
return 1LL;
}
return 0LL;
} | func0:
ENDBR64
MOV RSI,qword ptr [RDI + 0x8]
CMP ESI,0x1
JLE 0x0010123b
MOV RCX,qword ptr [RDI]
MOVZX EDX,byte ptr [RCX]
LEA RAX,[RCX + 0x1]
LEA ESI,[RSI + -0x2]
LEA RCX,[RCX + RSI*0x1 + 0x2]
LAB_00101228:
CMP byte ptr [RAX],DL
JNZ 0x00101241
ADD RAX,0x1
CMP RAX,RCX
JNZ 0x00101228
MOV EAX,0x1
RET
LAB_0010123b:
MOV EAX,... | /* func0(std::string) */
int8 func0(int8 *param_1)
{
char *pcVar1;
char *pcVar2;
if ((int)param_1[1] < 2) {
return 1;
}
pcVar1 = (char *)*param_1;
pcVar2 = pcVar1 + 1;
do {
if (*pcVar2 != *pcVar1) {
return 0;
}
pcVar2 = pcVar2 + 1;
} while (pcVar2 != pcVar1 + (ulong)((int)para... |
2,962 | func0 |
#include <string>
#include <assert.h>
| bool func0(std::string s) {
int n = s.length();
for (int i = 1; i < n; i++) {
if (s[i] != s[0]) {
return false;
}
}
return true;
}
| int main() {
assert(func0("python") == false);
assert(func0("aaa") == true);
assert(func0("data") == false);
return 0;
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
mov 0x8(%rdi),%rsi
cmp $0x1,%esi
jle 1400 <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x40>
mov (%rdi),%rcx
sub $0x2,%esi
movzbl (%rcx),%edx
lea 0x1(%rcx),%rax
lea 0x2(%rcx,%rsi,1),%rcx... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
mov rsi, [rdi+8]
cmp esi, 1
jle short loc_13F0
mov rcx, [rdi]
sub esi, 2
movzx edx, byte ptr [rcx]
lea rax, [rcx+1]
lea rcx, [rcx+rsi+2]
jmp short loc_13E1
loc_13D8:
add rax, 1
cmp rax, rcx
jz short loc_... | long long func0(_QWORD *a1)
{
long long v1; // rsi
_BYTE *v2; // rax
v1 = a1[1];
if ( (int)v1 <= 1 )
return 1LL;
v2 = (_BYTE *)(*a1 + 1LL);
while ( *v2 == *(_BYTE *)*a1 )
{
if ( ++v2 == (_BYTE *)(*a1 + (unsigned int)(v1 - 2) + 2LL) )
return 1LL;
}
return 0LL;
} | func0:
ENDBR64
MOV RSI,qword ptr [RDI + 0x8]
CMP ESI,0x1
JLE 0x001013f0
MOV RCX,qword ptr [RDI]
SUB ESI,0x2
MOVZX EDX,byte ptr [RCX]
LEA RAX,[RCX + 0x1]
LEA RCX,[RCX + RSI*0x1 + 0x2]
JMP 0x001013e1
LAB_001013d8:
ADD RAX,0x1
CMP RAX,RCX
JZ 0x001013f0
LAB_001013e1:
CMP byte ptr [RAX],DL
JZ 0x001013d8
XOR EAX,EAX
RET
LAB_... | /* func0(std::string) */
int8 func0(int8 *param_1)
{
char *pcVar1;
char *pcVar2;
if (1 < (int)param_1[1]) {
pcVar1 = (char *)*param_1;
pcVar2 = pcVar1 + 1;
do {
if (*pcVar2 != *pcVar1) {
return 0;
}
pcVar2 = pcVar2 + 1;
} while (pcVar2 != pcVar1 + (ulong)((int)param_... |
2,963 | func0 |
#include <string>
#include <assert.h>
| bool func0(std::string s) {
int n = s.length();
for (int i = 1; i < n; i++) {
if (s[i] != s[0]) {
return false;
}
}
return true;
}
| int main() {
assert(func0("python") == false);
assert(func0("aaa") == true);
assert(func0("data") == false);
return 0;
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
mov 0x8(%rdi),%rsi
cmp $0x1,%esi
jle 1400 <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x40>
mov (%rdi),%rcx
sub $0x2,%esi
movzbl (%rcx),%edx
lea 0x1(%rcx),%rax
lea 0x2(%rcx,%rsi,1),%rcx... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
mov rsi, [rdi+8]
cmp esi, 1
jle short loc_13F0
mov rcx, [rdi]
sub esi, 2
movzx edx, byte ptr [rcx]
lea rax, [rcx+1]
lea rcx, [rcx+rsi+2]
jmp short loc_13E1
loc_13D8:
add rax, 1
cmp rax, rcx
jz short loc_... | long long func0(_QWORD *a1)
{
long long v1; // rsi
_BYTE *v2; // rax
v1 = a1[1];
if ( (int)v1 <= 1 )
return 1LL;
v2 = (_BYTE *)(*a1 + 1LL);
while ( *v2 == *(_BYTE *)*a1 )
{
if ( ++v2 == (_BYTE *)(*a1 + (unsigned int)(v1 - 2) + 2LL) )
return 1LL;
}
return 0LL;
} | func0:
ENDBR64
MOV RSI,qword ptr [RDI + 0x8]
CMP ESI,0x1
JLE 0x001013f0
MOV RCX,qword ptr [RDI]
SUB ESI,0x2
MOVZX EDX,byte ptr [RCX]
LEA RAX,[RCX + 0x1]
LEA RCX,[RCX + RSI*0x1 + 0x2]
JMP 0x001013e1
LAB_001013d8:
ADD RAX,0x1
CMP RAX,RCX
JZ 0x001013f0
LAB_001013e1:
CMP byte ptr [RAX],DL
JZ 0x001013d8
XOR EAX,EAX
RET
LAB_... | /* func0(std::string) */
int8 func0(int8 *param_1)
{
char *pcVar1;
char *pcVar2;
if (1 < (int)param_1[1]) {
pcVar1 = (char *)*param_1;
pcVar2 = pcVar1 + 1;
do {
if (*pcVar2 != *pcVar1) {
return 0;
}
pcVar2 = pcVar2 + 1;
} while (pcVar2 != pcVar1 + (ulong)((int)param_... |
2,964 | func0 |
#include <cmath>
#include <cassert>
using namespace std;
| double func0(double side) {
double area = sqrt(3) * (side * side);
return area;
}
| int main() {
assert(func0(3) == 15.588457268119894);
assert(func0(20) == 692.8203230275509);
assert(func0(10) == 173.20508075688772);
return 0;
}
| O0 | cpp | func0(double):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x20,%rsp
movsd %xmm0,-0x18(%rbp)
mov $0x3,%edi
callq 127c <_ZSt4sqrtIiEN9__gnu_cxx11__enable_ifIXsrSt12__is_integerIT_E7__valueEdE6__typeES3_>
movapd %xmm0,%xmm1
movsd -0x18(%rbp),%xmm0
mulsd %xmm0,%xmm0
mulsd %xmm1,%xmm0
movsd %xmm0,-0x8(%rbp)
movsd... | _Z5func0d:
endbr64
push rbp
mov rbp, rsp
sub rsp, 20h
movsd [rbp+var_18], xmm0
mov edi, 3
call _ZSt4sqrtIiEN9__gnu_cxx11__enable_ifIXsrSt12__is_integerIT_E7__valueEdE6__typeES3_; std::sqrt<int>(int)
movapd xmm1, xmm0
movsd xmm0, [rbp+var_18]
mulsd xmm0, xmm0
mulsd xmm0, xmm1
movsd [rbp+var_... | double func0(double a1)
{
return a1 * a1 * std::sqrt<int>(3LL);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOVSD qword ptr [RBP + -0x18],XMM0
MOV EDI,0x3
CALL 0x001012c4
MOVAPD XMM1,XMM0
MOVSD XMM0,qword ptr [RBP + -0x18]
MULSD XMM0,XMM0
MULSD XMM0,XMM1
MOVSD qword ptr [RBP + -0x8],XMM0
MOVSD XMM0,qword ptr [RBP + -0x8]
LEAVE
RET | /* func0(double) */
double func0(double param_1)
{
double extraout_XMM0_Qa;
std::sqrt<int>(3);
return param_1 * param_1 * extraout_XMM0_Qa;
} |
2,965 | func0 |
#include <cmath>
#include <cassert>
using namespace std;
| double func0(double side) {
double area = sqrt(3) * (side * side);
return area;
}
| int main() {
assert(func0(3) == 15.588457268119894);
assert(func0(20) == 692.8203230275509);
assert(func0(10) == 173.20508075688772);
return 0;
}
| O1 | cpp | func0(double):
endbr64
mulsd %xmm0,%xmm0
mulsd 0xecf(%rip),%xmm0
retq
| _Z5func0d:
endbr64
mulsd xmm0, xmm0
mulsd xmm0, cs:qword_2008
retn | double func0(double a1)
{
return a1 * a1 * 1.732050807568877;
} | func0:
ENDBR64
MULSD XMM0,XMM0
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 * param_1 * _DAT_00102008;
} |
2,966 | func0 |
#include <cmath>
#include <cassert>
using namespace std;
| double func0(double side) {
double area = sqrt(3) * (side * side);
return area;
}
| int main() {
assert(func0(3) == 15.588457268119894);
assert(func0(20) == 692.8203230275509);
assert(func0(10) == 173.20508075688772);
return 0;
}
| O2 | cpp | func0(double):
endbr64
mulsd %xmm0,%xmm0
mulsd 0xeb8(%rip),%xmm0
retq
nopw %cs:0x0(%rax,%rax,1)
nopl 0x0(%rax,%rax,1)
| _Z5func0d:
endbr64
mulsd xmm0, xmm0
mulsd xmm0, cs:qword_2008
retn | double func0(double a1)
{
return a1 * a1 * 1.732050807568877;
} | func0:
ENDBR64
MULSD XMM0,XMM0
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 * param_1 * _DAT_00102008;
} |
2,967 | func0 |
#include <cmath>
#include <cassert>
using namespace std;
| double func0(double side) {
double area = sqrt(3) * (side * side);
return area;
}
| int main() {
assert(func0(3) == 15.588457268119894);
assert(func0(20) == 692.8203230275509);
assert(func0(10) == 173.20508075688772);
return 0;
}
| O3 | cpp | func0(double):
endbr64
mulsd %xmm0,%xmm0
mulsd 0xeb8(%rip),%xmm0
retq
nopw %cs:0x0(%rax,%rax,1)
nopl 0x0(%rax,%rax,1)
| _Z5func0d:
endbr64
mulsd xmm0, xmm0
mulsd xmm0, cs:qword_2008
retn | double func0(double a1)
{
return a1 * a1 * 1.732050807568877;
} | func0:
ENDBR64
MULSD XMM0,XMM0
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 * param_1 * _DAT_00102008;
} |
2,968 | func0 |
#include <vector>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& list1, int m, int n) {
std::vector<int> result;
result.insert(result.end(), list1.end() - m, list1.end());
result.insert(result.end(), list1.begin(), list1.end() - n);
return result;
}
| int main() {
assert((func0({1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, 3, 4) == std::vector<int>{8, 9, 10, 1, 2, 3, 4, 5, 6}));
assert((func0({1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, 2, 2) == std::vector<int>{9, 10, 1, 2, 3, 4, 5, 6, 7, 8}));
assert((func0({1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, 5, 2) == std::vector<int>{6, 7, 8,... | O0 | cpp | func0(std::vector<int, std::allocator<int> > const&, int, int):
endbr64
push %rbp
mov %rsp,%rbp
push %r12
push %rbx
sub $0x40,%rsp
mov %rdi,-0x38(%rbp)
mov %rsi,-0x40(%rbp)
mov %edx,-0x44(%rbp)
mov %ecx,-0x48(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x38(%rbp),... | _Z5func0RKSt6vectorIiSaIiEEii:
endbr64
push rbp
mov rbp, rsp
push r12
push rbx
sub rsp, 40h
mov [rbp+var_38], rdi
mov [rbp+var_40], rsi
mov [rbp+var_44], edx
mov [rbp+var_48], ecx
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_38]
mov rdi, rax
c... | long long func0(long long a1, long long a2, int a3, int a4)
{
long long v4; // r12
long long v5; // rbx
long long v6; // r12
long long v7; // rbx
long long v11; // [rsp+20h] [rbp-30h] BYREF
long long v12; // [rsp+28h] [rbp-28h] BYREF
_QWORD v13[4]; // [rsp+30h] [rbp-20h] BYREF
v13[1] = __readfsqword(0... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV qword ptr [RBP + -0x38],RDI
MOV qword ptr [RBP + -0x40],RSI
MOV dword ptr [RBP + -0x44],EDX
MOV dword ptr [RBP + -0x48],ECX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RDI,RAX
CALL 0x00... | /* func0(std::vector<int, std::allocator<int> > const&, int, int) */
vector * func0(vector *param_1,int param_2,int param_3)
{
int8 uVar1;
int8 uVar2;
int in_ECX;
int4 in_register_00000034;
vector<int,std::allocator<int>> *this;
long in_FS_OFFSET;
int8 local_38;
int8 local_30;
int8 local_28;
long ... |
2,969 | func0 |
#include <vector>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& list1, int m, int n) {
std::vector<int> result;
result.insert(result.end(), list1.end() - m, list1.end());
result.insert(result.end(), list1.begin(), list1.end() - n);
return result;
}
| int main() {
assert((func0({1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, 3, 4) == std::vector<int>{8, 9, 10, 1, 2, 3, 4, 5, 6}));
assert((func0({1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, 2, 2) == std::vector<int>{9, 10, 1, 2, 3, 4, 5, 6, 7, 8}));
assert((func0({1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, 5, 2) == std::vector<int>{6, 7, 8,... | O1 | cpp | func0(std::vector<int, std::allocator<int> > const&, int, int):
endbr64
push %r12
push %rbp
push %rbx
mov %rdi,%rbx
mov %rsi,%r12
mov %ecx,%ebp
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi)
movq $0x0,0x10(%rdi)
mov 0x8(%rsi),%rcx
movslq %edx,%rdx
shl $0x2,%rdx
mov %rcx,%rax
sub %rdx,%rax
mov ... | _Z5func0RKSt6vectorIiSaIiEEii:
endbr64
push r12
push rbp
push rbx
mov rbx, rdi
mov r12, rsi
mov ebp, ecx
mov qword ptr [rdi], 0
mov qword ptr [rdi+8], 0
mov qword ptr [rdi+10h], 0
mov rcx, [rsi+8]
movsxd rdx, edx
shl rdx, 2
mov rax, rcx
sub rax, rdx
mov rdx, rax
mov... | _QWORD * func0(_QWORD *a1, _QWORD *a2, int a3)
{
*a1 = 0LL;
a1[1] = 0LL;
a1[2] = 0LL;
std::vector<int>::_M_range_insert<__gnu_cxx::__normal_iterator<int const*,std::vector<int>>>(
a1,
0LL,
a2[1] - 4LL * a3);
std::vector<int>::_M_range_insert<__gnu_cxx::__normal_iterator<int const*,std::vector<int>... | func0:
ENDBR64
PUSH R12
PUSH RBP
PUSH RBX
MOV RBX,RDI
MOV R12,RSI
MOV EBP,ECX
MOV qword ptr [RDI],0x0
MOV qword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
MOV RCX,qword ptr [RSI + 0x8]
MOVSXD RDX,EDX
SHL RDX,0x2
MOV RAX,RCX
SUB RAX,RDX
MOV RDX,RAX
MOV ESI,0x0
LAB_00101289:
CALL 0x0010198c
MOVSXD RBP,EBP
SHL RBP... | /* func0(std::vector<int, std::allocator<int> > const&, int, int) */
vector * func0(vector *param_1,int param_2,int param_3)
{
int in_ECX;
int4 in_register_00000034;
int8 *puVar1;
puVar1 = (int8 *)CONCAT44(in_register_00000034,param_2);
*(int8 *)param_1 = 0;
*(int8 *)(param_1 + 8) = 0;
*(int8 *)(para... |
2,970 | func0 |
#include <vector>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& list1, int m, int n) {
std::vector<int> result;
result.insert(result.end(), list1.end() - m, list1.end());
result.insert(result.end(), list1.begin(), list1.end() - n);
return result;
}
| int main() {
assert((func0({1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, 3, 4) == std::vector<int>{8, 9, 10, 1, 2, 3, 4, 5, 6}));
assert((func0({1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, 2, 2) == std::vector<int>{9, 10, 1, 2, 3, 4, 5, 6, 7, 8}));
assert((func0({1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, 5, 2) == std::vector<int>{6, 7, 8,... | O2 | cpp | func0(std::vector<int, std::allocator<int> > const&, int, int):
endbr64
push %r12
movslq %edx,%rdx
mov %rdi,%r12
push %rbp
shl $0x2,%rdx
mov %rsi,%rbp
push %rbx
movslq %ecx,%rbx
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi)
movq $0x0,0x10(%rdi)
mov 0x8(%rsi),%rcx
xor %esi,%esi
mov %rcx,%rax
sub ... | _Z5func0RKSt6vectorIiSaIiEEii:
endbr64
pxor xmm0, xmm0
push r12
movsxd rdx, edx
mov r12, rsi
push rbp
movsxd rbp, ecx
shl rdx, 2
push rbx
mov rbx, rdi
mov qword ptr [rdi+10h], 0
movups xmmword ptr [rdi], xmm0
mov rcx, [rsi+8]
xor esi, esi
mov rax, rcx
sub rax, rdx
mov ... | long long func0(long long a1, _QWORD *a2, int a3)
{
*(_QWORD *)(a1 + 16) = 0LL;
*(_OWORD *)a1 = 0LL;
std::vector<int>::_M_range_insert<__gnu_cxx::__normal_iterator<int const*,std::vector<int>>>(
a1,
0LL,
a2[1] - 4LL * a3);
std::vector<int>::_M_range_insert<__gnu_cxx::__normal_iterator<int const*,st... | func0:
ENDBR64
PXOR XMM0,XMM0
PUSH R12
MOVSXD RDX,EDX
MOV R12,RSI
PUSH RBP
MOVSXD RBP,ECX
SHL RDX,0x2
PUSH RBX
MOV RBX,RDI
MOV qword ptr [RDI + 0x10],0x0
MOVUPS xmmword ptr [RDI],XMM0
MOV RCX,qword ptr [RSI + 0x8]
XOR ESI,ESI
MOV RAX,RCX
SUB RAX,RDX
MOV RDX,RAX
LAB_00101a16:
CALL 0x00101690
MOV RCX,qword ptr [R12 + 0x8... | /* func0(std::vector<int, std::allocator<int> > const&, int, int) */
vector * func0(vector *param_1,int param_2,int param_3)
{
int in_ECX;
int4 in_register_00000034;
int8 *puVar1;
puVar1 = (int8 *)CONCAT44(in_register_00000034,param_2);
*(int8 *)(param_1 + 0x10) = 0;
*(int (*) [16])param_1 = (int [16]... |
2,971 | func0 |
#include <vector>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& list1, int m, int n) {
std::vector<int> result;
result.insert(result.end(), list1.end() - m, list1.end());
result.insert(result.end(), list1.begin(), list1.end() - n);
return result;
}
| int main() {
assert((func0({1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, 3, 4) == std::vector<int>{8, 9, 10, 1, 2, 3, 4, 5, 6}));
assert((func0({1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, 2, 2) == std::vector<int>{9, 10, 1, 2, 3, 4, 5, 6, 7, 8}));
assert((func0({1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, 5, 2) == std::vector<int>{6, 7, 8,... | O3 | cpp | func0(std::vector<int, std::allocator<int> > const&, int, int):
endbr64
push %r15
pxor %xmm0,%xmm0
movslq %edx,%rdx
push %r14
mov %rsi,%r14
push %r13
movslq %ecx,%r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
lea 0x0(,%rdx,4),%rbx
sub $0x28,%rsp
movq $0x0,0x10(%rdi)
movups %xmm0,(%rdi)
mov... | _Z5func0RKSt6vectorIiSaIiEEii:
endbr64
push r15
pxor xmm0, xmm0
movsxd rdx, edx
push r14
push r13
mov r13, rsi
push r12
mov r12, rdi
push rbp
movsxd rbp, ecx
push rbx
lea rbx, ds:0[rdx*4]
sub rsp, 18h
mov qword ptr [rdi+10h], 0
movups xmmword ptr [rdi], xmm0
mov rax, [rsi... | long long func0(long long a1, long long a2, int a3, int a4)
{
long long v5; // rbp
size_t v6; // rbx
long long v7; // rax
_DWORD *v8; // r14
_DWORD *v9; // rax
_DWORD *v10; // r15
long long v11; // rcx
_DWORD *v12; // r13
long long v13; // rax
long long v15; // rbp
signed long long v16; // rbp
... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
MOVSXD RDX,EDX
PUSH R14
PUSH R13
MOV R13,RSI
PUSH R12
MOV R12,RDI
PUSH RBP
MOVSXD RBP,ECX
PUSH RBX
LEA RBX,[RDX*0x4]
SUB RSP,0x18
MOV qword ptr [RDI + 0x10],0x0
MOVUPS xmmword ptr [RDI],XMM0
MOV RAX,qword ptr [RSI + 0x8]
MOV R14,RAX
SUB R14,RBX
CMP R14,RAX
JZ 0x00101750
MOV RAX,0x... | /* func0(std::vector<int, std::allocator<int> > const&, int, int) */
vector * func0(vector *param_1,int param_2,int param_3)
{
long *plVar1;
int8 *puVar2;
ulong uVar3;
int4 *__src;
int in_ECX;
ulong uVar4;
long lVar5;
int4 *puVar6;
int4 *__n;
int4 in_register_00000034;
int8 *__src_00;
int4 *un... |
2,972 | func0 |
#include <iostream>
#include <vector>
#include <cassert>
| bool func0(const std::vector<int*>& test_tup) {
for (auto ele : test_tup) {
if (ele == nullptr) {
return true;
}
}
return false;
}
| int main() {
int a = 10, b = 4, c = 5, d = 6;
int e = 7, f = 8, g = 9, h = 11, i = 14;
int j = 1, k = 2, l = 3, m = 4;
assert(func0({&a, &b, &c, &d, nullptr}) == true);
assert(func0({&e, &f, &g, &h, &i}) == false);
assert(func0({&j, &k, &l, &m, nullptr}) == true);
return 0;
}... | O0 | cpp | func0(std::vector<int*, std::allocator<int*> > const&):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x40,%rsp
mov %rdi,-0x38(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x8(%rbp)
xor %eax,%eax
mov -0x38(%rbp),%rax
mov %rax,-0x18(%rbp)
mov -0x18(%rbp),%rax
mov %rax,%rdi
callq 1716 <_ZNKSt6vectorIPiSaIS0_... | _Z5func0RKSt6vectorIPiSaIS0_EE:
endbr64
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_38], rdi
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
mov rax, [rbp+var_38]
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
mov rdi, rax
call _ZNKSt6vectorIPiSaIS0_EE5beginEv; std::vect... | long long func0(long long a1)
{
long long v2; // [rsp+18h] [rbp-28h] BYREF
_QWORD v3[2]; // [rsp+20h] [rbp-20h] BYREF
unsigned long long v5; // [rsp+38h] [rbp-8h]
v5 = __readfsqword(0x28u);
v3[1] = a1;
v2 = std::vector<int *>::begin(a1);
v3[0] = std::vector<int *>::end(a1);
while ( (unsigned __int8)__... | 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 + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,RAX
CALL 0x001016d6
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qwor... | /* func0(std::vector<int*, std::allocator<int*> > const&) */
int8 func0(vector *param_1)
{
bool bVar1;
long *plVar2;
int8 uVar3;
long in_FS_OFFSET;
int8 local_30;
int8 local_28;
vector<int*,std::allocator<int*>> *local_20;
long local_18;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);... |
2,973 | func0 |
#include <iostream>
#include <vector>
#include <cassert>
| bool func0(const std::vector<int*>& test_tup) {
for (auto ele : test_tup) {
if (ele == nullptr) {
return true;
}
}
return false;
}
| int main() {
int a = 10, b = 4, c = 5, d = 6;
int e = 7, f = 8, g = 9, h = 11, i = 14;
int j = 1, k = 2, l = 3, m = 4;
assert(func0({&a, &b, &c, &d, nullptr}) == true);
assert(func0({&e, &f, &g, &h, &i}) == false);
assert(func0({&j, &k, &l, &m, nullptr}) == true);
return 0;
}... | O1 | cpp | func0(std::vector<int*, std::allocator<int*> > const&):
endbr64
mov (%rdi),%rax
mov 0x8(%rdi),%rdx
cmp %rdx,%rax
je 126e <_Z5func0RKSt6vectorIPiSaIS0_EE+0x25>
cmpq $0x0,(%rax)
je 1274 <_Z5func0RKSt6vectorIPiSaIS0_EE+0x2b>
add $0x8,%rax
cmp %rax,%rdx
jne 1259 <_Z5func0RKSt6vectorIPiSaIS0_EE+0... | _Z5func0RKSt6vectorIPiSaIS0_EE:
endbr64
mov rax, [rdi]
mov rdx, [rdi+8]
cmp rdx, rax
jz short loc_122E
loc_1219:
cmp qword ptr [rax], 0
jz short loc_1234
add rax, 8
cmp rdx, rax
jnz short loc_1219
mov eax, 0
retn
loc_122E:
mov eax, 0
retn
loc_1234:
mov eax, 1
retn | long long func0(long long a1)
{
_QWORD *v1; // rax
_QWORD *v2; // rdx
v1 = *(_QWORD **)a1;
v2 = *(_QWORD **)(a1 + 8);
if ( v2 == *(_QWORD **)a1 )
return 0LL;
while ( *v1 )
{
if ( v2 == ++v1 )
return 0LL;
}
return 1LL;
} | func0:
ENDBR64
MOV RAX,qword ptr [RDI]
MOV RDX,qword ptr [RDI + 0x8]
CMP RDX,RAX
JZ 0x0010122e
LAB_00101219:
CMP qword ptr [RAX],0x0
JZ 0x00101234
ADD RAX,0x8
CMP RDX,RAX
JNZ 0x00101219
MOV EAX,0x0
RET
LAB_0010122e:
MOV EAX,0x0
RET
LAB_00101234:
MOV EAX,0x1
RET | /* func0(std::vector<int*, std::allocator<int*> > const&) */
int8 func0(vector *param_1)
{
long *plVar1;
plVar1 = *(long **)param_1;
if (*(long **)(param_1 + 8) == plVar1) {
return 0;
}
do {
if (*plVar1 == 0) {
return 1;
}
plVar1 = plVar1 + 1;
} while (*(long **)(param_1 + 8) != p... |
2,974 | func0 |
#include <iostream>
#include <vector>
#include <cassert>
| bool func0(const std::vector<int*>& test_tup) {
for (auto ele : test_tup) {
if (ele == nullptr) {
return true;
}
}
return false;
}
| int main() {
int a = 10, b = 4, c = 5, d = 6;
int e = 7, f = 8, g = 9, h = 11, i = 14;
int j = 1, k = 2, l = 3, m = 4;
assert(func0({&a, &b, &c, &d, nullptr}) == true);
assert(func0({&e, &f, &g, &h, &i}) == false);
assert(func0({&j, &k, &l, &m, nullptr}) == true);
return 0;
}... | O2 | cpp | func0(std::vector<int*, std::allocator<int*> > const&):
endbr64
mov (%rdi),%rax
mov 0x8(%rdi),%rdx
cmp %rdx,%rax
jne 1551 <_Z5func0RKSt6vectorIPiSaIS0_EE+0x21>
jmp 1560 <_Z5func0RKSt6vectorIPiSaIS0_EE+0x30>
nopw 0x0(%rax,%rax,1)
add $0x8,%rax
cmp %rax,%rdx
je 1560 <_Z5func0RKSt6vectorIPiSaIS0... | _Z5func0RKSt6vectorIPiSaIS0_EE:
endbr64
mov rax, [rdi]
mov rdx, [rdi+8]
cmp rdx, rax
jnz short loc_1541
jmp short loc_1550
loc_1538:
add rax, 8
cmp rdx, rax
jz short loc_1550
loc_1541:
cmp qword ptr [rax], 0
jnz short loc_1538
mov eax, 1
retn
loc_1550:
xor eax, eax
retn | long long func0(long long a1)
{
_QWORD *v1; // rax
_QWORD *v2; // rdx
v1 = *(_QWORD **)a1;
v2 = *(_QWORD **)(a1 + 8);
if ( v2 == *(_QWORD **)a1 )
return 0LL;
while ( *v1 )
{
if ( v2 == ++v1 )
return 0LL;
}
return 1LL;
} | func0:
ENDBR64
MOV RAX,qword ptr [RDI]
MOV RDX,qword ptr [RDI + 0x8]
CMP RDX,RAX
JNZ 0x00101541
JMP 0x00101550
LAB_00101538:
ADD RAX,0x8
CMP RDX,RAX
JZ 0x00101550
LAB_00101541:
CMP qword ptr [RAX],0x0
JNZ 0x00101538
MOV EAX,0x1
RET
LAB_00101550:
XOR EAX,EAX
RET | /* func0(std::vector<int*, std::allocator<int*> > const&) */
int8 func0(vector *param_1)
{
long *plVar1;
plVar1 = *(long **)param_1;
while( true ) {
if (*(long **)(param_1 + 8) == plVar1) {
return 0;
}
if (*plVar1 == 0) break;
plVar1 = plVar1 + 1;
}
return 1;
} |
2,975 | func0 |
#include <iostream>
#include <vector>
#include <cassert>
| bool func0(const std::vector<int*>& test_tup) {
for (auto ele : test_tup) {
if (ele == nullptr) {
return true;
}
}
return false;
}
| int main() {
int a = 10, b = 4, c = 5, d = 6;
int e = 7, f = 8, g = 9, h = 11, i = 14;
int j = 1, k = 2, l = 3, m = 4;
assert(func0({&a, &b, &c, &d, nullptr}) == true);
assert(func0({&e, &f, &g, &h, &i}) == false);
assert(func0({&j, &k, &l, &m, nullptr}) == true);
return 0;
}... | O3 | cpp | func0(std::vector<int*, std::allocator<int*> > const&):
endbr64
mov (%rdi),%rax
mov 0x8(%rdi),%rdx
cmp %rdx,%rax
jne 1581 <_Z5func0RKSt6vectorIPiSaIS0_EE+0x21>
jmp 1590 <_Z5func0RKSt6vectorIPiSaIS0_EE+0x30>
nopw 0x0(%rax,%rax,1)
add $0x8,%rax
cmp %rax,%rdx
je 1590 <_Z5func0RKSt6vectorIPiSaIS0... | _Z5func0RKSt6vectorIPiSaIS0_EE:
endbr64
mov rax, [rdi]
mov rdx, [rdi+8]
cmp rdx, rax
jnz short loc_1541
jmp short loc_1550
loc_1538:
add rax, 8
cmp rdx, rax
jz short loc_1550
loc_1541:
cmp qword ptr [rax], 0
jnz short loc_1538
mov eax, 1
retn
loc_1550:
xor eax, eax
retn | long long func0(long long a1)
{
_QWORD *v1; // rax
_QWORD *v2; // rdx
v1 = *(_QWORD **)a1;
v2 = *(_QWORD **)(a1 + 8);
if ( v2 == *(_QWORD **)a1 )
return 0LL;
while ( *v1 )
{
if ( v2 == ++v1 )
return 0LL;
}
return 1LL;
} | func0:
ENDBR64
MOV RAX,qword ptr [RDI]
MOV RDX,qword ptr [RDI + 0x8]
CMP RDX,RAX
JNZ 0x00101541
JMP 0x00101550
LAB_00101538:
ADD RAX,0x8
CMP RDX,RAX
JZ 0x00101550
LAB_00101541:
CMP qword ptr [RAX],0x0
JNZ 0x00101538
MOV EAX,0x1
RET
LAB_00101550:
XOR EAX,EAX
RET | /* func0(std::vector<int*, std::allocator<int*> > const&) */
int8 func0(vector *param_1)
{
long *plVar1;
plVar1 = *(long **)param_1;
while( true ) {
if (*(long **)(param_1 + 8) == plVar1) {
return 0;
}
if (*plVar1 == 0) break;
plVar1 = plVar1 + 1;
}
return 1;
} |
2,976 | func0 |
#include <vector>
#include <string>
#include <assert.h>
| std::vector<int> func0(int startnum, int endnum) {
std::vector<int> result;
for (int n = startnum; n <= endnum; n++) {
bool divisible = true;
std::string s = std::to_string(n);
for (char c : s) {
int digit = c - '0';
if (digit == 0 || n % digit != 0) {
... | int main() {
std::vector<int> vec1 = {1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 15, 22};
std::vector<int> vec2 = {1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 15};
std::vector<int> vec3 = {22, 24};
assert(func0(1, 22) == vec1);
assert(func0(1, 15) == vec2);
assert(func0(20, 25) == vec3);
return 0;... | O0 | cpp | func0(int, int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x78,%rsp
mov %rdi,-0x78(%rbp)
mov %esi,-0x7c(%rbp)
mov %edx,-0x80(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x78(%rbp),%rax
mov %rax,%rdi
callq 2b2a <_ZNSt6vectorIiSaIiEEC1Ev>
mov -0x7c(%rbp),%ea... | _Z5func0ii:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 78h
mov [rbp+var_78], rdi
mov [rbp+var_7C], esi
mov [rbp+var_80], edx
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_78]
mov rdi, rax
call _ZNSt6vectorIiSaIiEEC2Ev; std::vector<int>::vector... | long long func0(long long a1, int a2, int a3)
{
char v5; // [rsp+1Eh] [rbp-62h]
char v6; // [rsp+1Fh] [rbp-61h]
int i; // [rsp+20h] [rbp-60h] BYREF
int v8; // [rsp+24h] [rbp-5Ch]
long long v9; // [rsp+28h] [rbp-58h] BYREF
long long v10; // [rsp+30h] [rbp-50h] BYREF
_BYTE *v11; // [rsp+38h] [rbp-48h]
_B... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x78
MOV qword ptr [RBP + -0x78],RDI
MOV dword ptr [RBP + -0x7c],ESI
MOV dword ptr [RBP + -0x80],EDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x78]
MOV RDI,RAX
CALL 0x00101a6a
MOV EAX,dword ptr [RBP + -0x7c]
MO... | /* func0(int, int) */
vector<int,std::allocator<int>> * func0(int param_1,int param_2)
{
bool bVar1;
bool bVar2;
char *pcVar3;
int in_EDX;
int4 in_register_0000003c;
vector<int,std::allocator<int>> *this;
long in_FS_OFFSET;
int local_68;
int local_64;
int8 local_60;
int8 local_58;
string *loca... |
2,977 | func0 |
#include <vector>
#include <string>
#include <assert.h>
| std::vector<int> func0(int startnum, int endnum) {
std::vector<int> result;
for (int n = startnum; n <= endnum; n++) {
bool divisible = true;
std::string s = std::to_string(n);
for (char c : s) {
int digit = c - '0';
if (digit == 0 || n % digit != 0) {
... | int main() {
std::vector<int> vec1 = {1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 15, 22};
std::vector<int> vec2 = {1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 15};
std::vector<int> vec3 = {22, 24};
assert(func0(1, 22) == vec1);
assert(func0(1, 15) == vec2);
assert(func0(20, 25) == vec3);
return 0;... | O1 | cpp | func0(int, int):
endbr64
push %r12
push %rbp
push %rbx
sub $0x40,%rsp
mov %rdi,%rbx
mov %fs:0x28,%rax
mov %rax,0x38(%rsp)
xor %eax,%eax
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi)
movq $0x0,0x10(%rdi)
mov %esi,0xc(%rsp)
cmp %edx,%esi
jg 1391 <_Z5func0ii+0x128>
mov %esi,%r8d
mov %edx,... | _Z5func0ii:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 118h
mov r14, rdi
mov r12d, esi
mov r15d, edx
mov rax, fs:28h
mov [rsp+148h+var_40], rax
xor eax, eax
mov qword ptr [rdi], 0
mov qword ptr [rdi+8], 0
mov qword ptr [rdi+10h], 0
mo... | _QWORD * func0(_QWORD *a1, int a2, int a3)
{
int v3; // r12d
unsigned int v6; // ebx
char *v7; // r13
int v8; // ebp
char v9; // bp
_BYTE *v10; // rsi
int *v11; // rsi
unsigned int v12; // r13d
unsigned int v13; // ebp
unsigned int v14; // eax
unsigned int v15; // edx
unsigned int v16; // eax
... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x118
MOV R14,RDI
MOV R12D,ESI
MOV R15D,EDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x108],RAX
XOR EAX,EAX
MOV qword ptr [RDI],0x0
MOV qword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
MOV dword ptr [RSP + 0xc],ESI
CMP ESI,EDX
... | /* func0(int, int) */
vector<int,std::allocator<int>> * func0(int param_1,int param_2)
{
uint *puVar1;
byte bVar2;
int iVar3;
uint uVar4;
uint uVar5;
int in_EDX;
uint uVar6;
uint uVar7;
ulong uVar8;
uint uVar9;
char cVar10;
ulong uVar11;
long *plVar12;
int4 in_register_0000003c;
vector<i... |
2,978 | func0 |
#include <vector>
#include <string>
#include <assert.h>
| std::vector<int> func0(int startnum, int endnum) {
std::vector<int> result;
for (int n = startnum; n <= endnum; n++) {
bool divisible = true;
std::string s = std::to_string(n);
for (char c : s) {
int digit = c - '0';
if (digit == 0 || n % digit != 0) {
... | int main() {
std::vector<int> vec1 = {1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 15, 22};
std::vector<int> vec2 = {1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 15};
std::vector<int> vec3 = {22, 24};
assert(func0(1, 22) == vec1);
assert(func0(1, 15) == vec2);
assert(func0(20, 25) == vec3);
return 0;... | O2 | cpp | func0(int, int):
endbr64
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x40,%rsp
mov %fs:0x28,%rax
mov %rax,0x38(%rsp)
xor %eax,%eax
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi)
movq $0x0,0x10(%rdi)
mov %esi,0xc(%rsp)
cmp %edx,%esi
jg 1688 <_Z5func0ii+0xd8>
mov ... | _Z5func0ii:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
push r12
push rbp
mov rbp, rdi
push rbx
sub rsp, 138h
mov [rsp+168h+var_14C], edx
mov rax, fs:28h
mov [rsp+168h+var_40], rax
xor eax, eax
lea rax, [rsp+168h+var_138]
mov qword ptr [rdi+10h], 0
mov [rs... | long long func0(long long a1, int a2, int a3)
{
int v4; // ebx
unsigned int v5; // r15d
unsigned int v6; // ecx
unsigned int v7; // r13d
int v8; // esi
unsigned int v9; // r14d
long long v10; // rsi
long long v11; // rax
__int8 *v12; // r15
unsigned long long v13; // rdx
unsigned int v14; // eax
... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
SUB RSP,0x138
MOV dword ptr [RSP + 0x1c],EDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x128],RAX
XOR EAX,EAX
LEA RAX,[RSP + 0x30]
MOV qword ptr [RDI + 0x10],0x0
MOV dword ptr [RSP + 0x2c],ESI
MOV qword ptr [RSP + 0x1... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(int, int) */
vector<int,std::allocator<int>> * func0(int param_1,int param_2)
{
uint uVar1;
uint *puVar2;
uint uVar3;
int in_EDX;
uint uVar4;
uint uVar5;
ulong uVar6;
char cVar7;
int iVar8;
long *plVar9;
... |
2,979 | func0 |
#include <vector>
#include <string>
#include <assert.h>
| std::vector<int> func0(int startnum, int endnum) {
std::vector<int> result;
for (int n = startnum; n <= endnum; n++) {
bool divisible = true;
std::string s = std::to_string(n);
for (char c : s) {
int digit = c - '0';
if (digit == 0 || n % digit != 0) {
... | int main() {
std::vector<int> vec1 = {1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 15, 22};
std::vector<int> vec2 = {1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 15};
std::vector<int> vec3 = {22, 24};
assert(func0(1, 22) == vec1);
assert(func0(1, 15) == vec2);
assert(func0(20, 25) == vec3);
return 0;... | O3 | cpp | func0(int, int):
endbr64
push %r15
pxor %xmm0,%xmm0
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x48,%rsp
mov %fs:0x28,%rax
mov %rax,0x38(%rsp)
xor %eax,%eax
movq $0x0,0x10(%rdi)
mov %esi,0xc(%rsp)
movups %xmm0,(%rdi)
cmp %edx,%esi
jg 17f3 <_Z5func0ii+0x... | _Z5func0ii:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
push r12
push rbp
mov rbp, rdi
push rbx
mov ebx, esi
sub rsp, 138h
mov [rsp+168h+var_14C], edx
lea r12, [rsp+168h+var_128]
mov rax, fs:28h
mov [rsp+168h+var_40], rax
xor eax, eax
lea rax, [rsp+168h+va... | long long func0(long long a1, int a2, int a3)
{
int v4; // ebx
unsigned int v5; // r15d
unsigned int v6; // ecx
unsigned int v7; // r13d
int v8; // esi
unsigned int v9; // r14d
long long v10; // rsi
long long v11; // rax
__int8 *v12; // r15
unsigned long long v13; // rdx
unsigned int v14; // eax
... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
MOV EBX,ESI
SUB RSP,0x138
MOV dword ptr [RSP + 0x1c],EDX
LEA R12,[RSP + 0x40]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x128],RAX
XOR EAX,EAX
LEA RAX,[RSP + 0x30]
MOV qword ptr [RDI + 0x10],0x0
MOV dword ptr [RSP + 0... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(int, int) */
vector<int,std::allocator<int>> * func0(int param_1,int param_2)
{
uint uVar1;
uint *puVar2;
uint uVar3;
int in_EDX;
uint uVar4;
uint uVar5;
char cVar7;
int iVar8;
long *plVar9;
int4 in_regis... |
2,980 | func0 |
#include <assert.h>
#include <cmath>
| double func0(double r, double a) {
double pi = 22.0 / 7.0;
if (a >= 360) {
return std::nan("1");
}
double sectorarea = (pi * std::pow(r, 2)) * (a / 360);
return sectorarea;
}
| int main() {
assert(func0(4, 45) == 6.285714285714286);
assert(func0(9, 45) == 31.82142857142857);
assert(std::isnan(func0(9, 360)));
return 0;
}
| O0 | cpp | func0(double, double):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x20,%rsp
movsd %xmm0,-0x18(%rbp)
movsd %xmm1,-0x20(%rbp)
movsd 0xf41(%rip),%xmm0
movsd %xmm0,-0x10(%rbp)
movsd -0x20(%rbp),%xmm0
comisd 0xf37(%rip),%xmm0
jb 11a5 <_Z5func0dd+0x3c>
movsd 0xf35(%rip),%xmm0
jmp 11e0 <_Z5func0dd+0x77>
mov ... | _Z5func0dd:
endbr64
push rbp
mov rbp, rsp
sub rsp, 20h
movsd [rbp+var_18], xmm0
movsd [rbp+var_20], xmm1
movsd xmm0, cs:qword_20A8
movsd [rbp+var_10], xmm0
movsd xmm0, [rbp+var_20]
comisd xmm0, cs:dbl_20B0
jb short loc_11A5
movsd xmm0, cs:qword_20B8
jmp short locret_11E6
loc_11A5:
mov ... | double func0(double a1, double a2)
{
if ( a2 < 360.0 )
return a2 / 360.0 * (std::pow<double,int>(2LL, a1) * 3.142857142857143);
else
return NAN;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOVSD qword ptr [RBP + -0x18],XMM0
MOVSD qword ptr [RBP + -0x20],XMM1
MOVSD XMM0,qword ptr [0x001020a8]
MOVSD qword ptr [RBP + -0x10],XMM0
MOVSD XMM0,qword ptr [RBP + -0x20]
COMISD XMM0,qword ptr [0x001020b0]
JC 0x001011a5
MOVSD XMM0,qword ptr [0x001020b8]
JMP 0x001011e6... | /* func0(double, double) */
void func0(double param_1,double param_2)
{
if (param_2 < DAT_001020b0) {
std::pow<double,int>(param_1,2);
}
return;
} |
2,981 | func0 |
#include <assert.h>
#include <cmath>
| double func0(double r, double a) {
double pi = 22.0 / 7.0;
if (a >= 360) {
return std::nan("1");
}
double sectorarea = (pi * std::pow(r, 2)) * (a / 360);
return sectorarea;
}
| int main() {
assert(func0(4, 45) == 6.285714285714286);
assert(func0(9, 45) == 31.82142857142857);
assert(std::isnan(func0(9, 360)));
return 0;
}
| O1 | cpp | func0(double, double):
endbr64
comisd 0xedb(%rip),%xmm1
jb 1140 <_Z5func0dd+0x17>
movsd 0xec9(%rip),%xmm0
retq
mulsd %xmm0,%xmm0
mulsd 0xecc(%rip),%xmm0
divsd 0xebc(%rip),%xmm1
mulsd %xmm1,%xmm0
retq
| _Z5func0dd:
endbr64
comisd xmm1, cs:qword_2010
jb short loc_1140
movsd xmm0, cs:qword_2008
retn
loc_1140:
mulsd xmm0, xmm0
mulsd xmm0, cs:qword_2018
divsd xmm1, cs:qword_2010
mulsd xmm0, xmm1
retn | double func0(double a1, double a2)
{
if ( a2 < 360.0 )
return a1 * a1 * 3.142857142857143 * (a2 / 360.0);
else
return NAN;
} | func0:
ENDBR64
COMISD XMM1,qword ptr [0x00102010]
JC 0x00101140
MOVSD XMM0,qword ptr [0x00102008]
RET
LAB_00101140:
MULSD XMM0,XMM0
MULSD XMM0,qword ptr [0x00102018]
DIVSD XMM1,qword ptr [0x00102010]
MULSD XMM0,XMM1
RET | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(double, double) */
double func0(double param_1,double param_2)
{
if (_DAT_00102010 <= param_2) {
return DAT_00102008;
}
return param_1 * param_1 * _DAT_00102018 * (param_2 / _DAT_00102010);
} |
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.