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,082 | func0 |
#include <assert.h>
| bool func0(int x, int y, int z) {
if (x != y && y != z && z != x) {
return true;
} else {
return false;
}
}
| int main() {
assert(func0(6, 8, 12) == true);
assert(func0(6, 6, 12) == false);
assert(func0(6, 15, 20) == true);
return 0;
}
| O2 | cpp | func0(int, int, int):
endbr64
cmp %esi,%edi
setne %al
cmp %edx,%edi
setne %cl
and %ecx,%eax
cmp %edx,%esi
setne %dl
and %edx,%eax
retq
nopl 0x0(%rax,%rax,1)
| _Z5func0iii:
endbr64
cmp edi, esi
setnz al
cmp edi, edx
setnz cl
and eax, ecx
cmp esi, edx
setnz dl
and eax, edx
retn | long long func0(int a1, int a2, int a3, int a4)
{
unsigned int v4; // eax
LOBYTE(v4) = a1 != a2;
LOBYTE(a4) = a1 != a3;
LOBYTE(a3) = a2 != a3;
return a3 & a4 & v4;
} | func0:
ENDBR64
CMP EDI,ESI
SETNZ AL
CMP EDI,EDX
SETNZ CL
AND EAX,ECX
CMP ESI,EDX
SETNZ DL
AND EAX,EDX
RET | /* func0(int, int, int) */
uint func0(int param_1,int param_2,int param_3)
{
int8 in_RAX;
int4 in_ECX;
return (uint)CONCAT71((int7)((ulong)in_RAX >> 8),param_1 != param_2) &
CONCAT31((int3)((uint)in_ECX >> 8),param_1 != param_3) &
CONCAT31((int3)((uint)param_3 >> 8),param_2 != param_3);
} |
2,083 | func0 |
#include <assert.h>
| bool func0(int x, int y, int z) {
if (x != y && y != z && z != x) {
return true;
} else {
return false;
}
}
| int main() {
assert(func0(6, 8, 12) == true);
assert(func0(6, 6, 12) == false);
assert(func0(6, 15, 20) == true);
return 0;
}
| O3 | cpp | func0(int, int, int):
endbr64
cmp %esi,%edi
setne %al
cmp %edx,%edi
setne %cl
and %ecx,%eax
cmp %edx,%esi
setne %dl
and %edx,%eax
retq
nopl 0x0(%rax,%rax,1)
| _Z5func0iii:
endbr64
cmp edi, esi
setnz al
cmp edi, edx
setnz cl
and eax, ecx
cmp esi, edx
setnz dl
and eax, edx
retn | long long func0(int a1, int a2, int a3, int a4)
{
unsigned int v4; // eax
LOBYTE(v4) = a1 != a2;
LOBYTE(a4) = a1 != a3;
LOBYTE(a3) = a2 != a3;
return a3 & a4 & v4;
} | func0:
ENDBR64
CMP EDI,ESI
SETNZ AL
CMP EDI,EDX
SETNZ CL
AND EAX,ECX
CMP ESI,EDX
SETNZ DL
AND EAX,EDX
RET | /* func0(int, int, int) */
uint func0(int param_1,int param_2,int param_3)
{
int8 in_RAX;
int4 in_ECX;
return (uint)CONCAT71((int7)((ulong)in_RAX >> 8),param_1 != param_2) &
CONCAT31((int3)((uint)in_ECX >> 8),param_1 != param_3) &
CONCAT31((int3)((uint)param_3 >> 8),param_2 != param_3);
} |
2,084 | func0 |
#include <bits/stdc++.h>
#include <cassert>
using namespace std;
| int func0(vector<int> arr) {
int n = arr.size();
vector<int> lis(n, 1);
for(int i = 1; i < n; i++) {
for(int j = 0; j < i; j++) {
if(arr[i] > arr[j] && lis[i] < lis[j] + 1) {
lis[i] = lis[j] + 1;
}
}
}
vector<int> lds(n, 1);
fo... | int main() {
assert(func0({0, 8, 4, 12, 2, 10, 6, 14, 1, 9, 5, 13, 3, 11, 7, 15}) == 7);
assert(func0({1, 11, 2, 10, 4, 5, 2, 1}) == 6);
assert(func0({80, 60, 30, 40, 20, 10}) == 5);
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> >):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x78,%rsp
mov %rdi,-0x78(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x78(%rbp),%rax
mov %rax,%rdi
callq 1a20 <_ZNKSt6vectorIiSaIiEE4sizeEv>
mov %eax,-0x54(%rbp)
lea -0x6c... | _Z5func0St6vectorIiSaIiEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 88h
mov [rbp+var_88], rdi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_88]
mov rdi, rax
call _ZNKSt6vectorIiSaIiEE4sizeEv; std::vector<int>::size(void)
mov [rbp+var_64], eax
le... | long long func0(long long a1)
{
int v1; // ebx
int v2; // ebx
int v4; // ebx
int v5; // ebx
int v6; // ebx
int v8; // ebx
int v9; // ebx
int v10; // ebx
unsigned int v11; // ebx
int v13; // [rsp+10h] [rbp-80h] BYREF
int v14; // [rsp+14h] [rbp-7Ch] BYREF
int i; // [rsp+18h] [rbp-78h]
int j; //... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x88
MOV qword ptr [RBP + -0x88],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x88]
MOV RDI,RAX
CALL 0x00101a26
MOV dword ptr [RBP + -0x64],EAX
LEA RAX,[RBP + -0x7c]
MOV qword ptr [RBP + -0x60],RAX
NOP
NOP
MOV ... | /* func0(std::vector<int, std::allocator<int> >) */
int func0(vector param_1)
{
int iVar1;
bool bVar2;
int *piVar3;
int4 in_register_0000003c;
vector<int,std::allocator<int>> *this;
long in_FS_OFFSET;
int local_88;
int local_84;
int local_80;
int local_7c;
int local_78;
int local_74;
int loc... |
2,085 | func0 |
#include <bits/stdc++.h>
#include <cassert>
using namespace std;
| int func0(vector<int> arr) {
int n = arr.size();
vector<int> lis(n, 1);
for(int i = 1; i < n; i++) {
for(int j = 0; j < i; j++) {
if(arr[i] > arr[j] && lis[i] < lis[j] + 1) {
lis[i] = lis[j] + 1;
}
}
}
vector<int> lds(n, 1);
fo... | int main() {
assert(func0({0, 8, 4, 12, 2, 10, 6, 14, 1, 9, 5, 13, 3, 11, 7, 15}) == 7);
assert(func0({1, 11, 2, 10, 4, 5, 2, 1}) == 6);
assert(func0({80, 60, 30, 40, 20, 10}) == 5);
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> >):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x8,%rsp
mov 0x8(%rdi),%r13
sub (%rdi),%r13
sar $0x2,%r13
movslq %r13d,%r14
movabs $0x1fffffffffffffff,%rax
cmp %rax,%r14
ja 12c6 <_Z5func0St6vectorIiSaIiEE+0x7d>
mov ... | _Z5func0St6vectorIiSaIiEE:
endbr64
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 20h
mov rax, fs:28h
mov [rsp+48h+var_30], rax
xor eax, eax
mov r13, [rdi+8]
sub r13, [rdi]
sar r13, 2
movsxd r14, r13d
mov rax, r14
shr rax, 3Dh
jnz short loc_1296
mov r12... | long long func0(long long *a1)
{
long long v1; // r13
unsigned long long v2; // r14
_DWORD *v4; // rax
_DWORD *v5; // rbx
_DWORD *v6; // rdx
long long v7; // rdx
int v8; // r8d
unsigned long long v9; // rax
int v10; // ecx
long long v11; // rsi
_DWORD *v12; // rdi
long long v13; // rax
int v1... | func0:
ENDBR64
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x20
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x18],RAX
XOR EAX,EAX
MOV R13,qword ptr [RDI + 0x8]
SUB R13,qword ptr [RDI]
SAR R13,0x2
MOVSXD R14,R13D
MOV RAX,R14
SHR RAX,0x3d
JNZ 0x00101296
MOV R12,RDI
MOV EBP,R13D
TEST R14,R14
JZ 0x001013cd
SH... | /* func0(std::vector<int, std::allocator<int> >) */
int func0(vector param_1)
{
long lVar1;
long lVar2;
int iVar3;
int *piVar4;
long lVar5;
int *piVar6;
int *piVar7;
long lVar8;
int4 in_register_0000003c;
long *plVar9;
int iVar10;
int iVar11;
ulong uVar12;
ulong uVar13;
long in_FS_OFFSET... |
2,086 | func0 |
#include <bits/stdc++.h>
#include <cassert>
using namespace std;
| int func0(vector<int> arr) {
int n = arr.size();
vector<int> lis(n, 1);
for(int i = 1; i < n; i++) {
for(int j = 0; j < i; j++) {
if(arr[i] > arr[j] && lis[i] < lis[j] + 1) {
lis[i] = lis[j] + 1;
}
}
}
vector<int> lds(n, 1);
fo... | int main() {
assert(func0({0, 8, 4, 12, 2, 10, 6, 14, 1, 9, 5, 13, 3, 11, 7, 15}) == 7);
assert(func0({1, 11, 2, 10, 4, 5, 2, 1}) == 6);
assert(func0({80, 60, 30, 40, 20, 10}) == 5);
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> >):
endbr64
movabs $0x1fffffffffffffff,%rdx
push %r14
push %r13
push %r12
push %rbp
push %rbx
mov 0x8(%rdi),%r13
sub (%rdi),%r13
sar $0x2,%r13
movslq %r13d,%rax
cmp %rdx,%rax
ja 169d <_Z5func0St6vectorIiSaIiEE+0x18d>
lea 0x0(,%rax,4),%r14
test %r... | _Z5func0St6vectorIiSaIiEE:
endbr64
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 20h
mov r12, [rdi+8]
sub r12, [rdi]
mov rax, fs:28h
mov [rsp+48h+var_30], rax
xor eax, eax
sar r12, 2
movsxd r13, r12d
mov rax, r13
shr rax, 3Dh
jnz loc_164B
test r13, r13
... | long long func0(_QWORD *a1)
{
long long v1; // r12
unsigned long long v2; // r13
int v4; // ebp
int *v5; // rax
int *v6; // rdx
int *v7; // rbx
long long v8; // rdi
long long v9; // rdx
_DWORD *v10; // rsi
unsigned long long v11; // rax
int v12; // ecx
_DWORD *v13; // rax
_DWORD *v14; // rdi
... | func0:
ENDBR64
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x20
MOV R12,qword ptr [RDI + 0x8]
SUB R12,qword ptr [RDI]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x18],RAX
XOR EAX,EAX
SAR R12,0x2
MOVSXD R13,R12D
MOV RAX,R13
SHR RAX,0x3d
JNZ 0x0010164b
TEST R13,R13
JZ 0x00101120
SHL R13,0x2
MOV R14,RDI
MOV... | /* func0(std::vector<int, std::allocator<int> >) */
ulong func0(vector param_1)
{
int iVar1;
long lVar2;
code *pcVar3;
int *piVar4;
long lVar5;
int *piVar6;
int *piVar7;
long lVar8;
int4 in_register_0000003c;
long *plVar9;
int iVar10;
uint uVar11;
ulong uVar12;
ulong uVar13;
long in_FS_O... |
2,087 | func0 |
#include <bits/stdc++.h>
#include <cassert>
using namespace std;
| int func0(vector<int> arr) {
int n = arr.size();
vector<int> lis(n, 1);
for(int i = 1; i < n; i++) {
for(int j = 0; j < i; j++) {
if(arr[i] > arr[j] && lis[i] < lis[j] + 1) {
lis[i] = lis[j] + 1;
}
}
}
vector<int> lds(n, 1);
fo... | int main() {
assert(func0({0, 8, 4, 12, 2, 10, 6, 14, 1, 9, 5, 13, 3, 11, 7, 15}) == 7);
assert(func0({1, 11, 2, 10, 4, 5, 2, 1}) == 6);
assert(func0({80, 60, 30, 40, 20, 10}) == 5);
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> >):
endbr64
movabs $0x1fffffffffffffff,%rax
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x18,%rsp
mov 0x8(%rdi),%r12
sub (%rdi),%r12
sar $0x2,%r12
movslq %r12d,%r14
cmp %rax,%r14
ja 17cf <_Z5func0St6vectorIiSaIiEE+0x33f>
lea ... | _Z5func0St6vectorIiSaIiEE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 48h
mov r12, [rdi+8]
sub r12, [rdi]
mov rax, fs:28h
mov [rsp+78h+var_40], rax
xor eax, eax
sar r12, 2
movsxd r13, r12d
mov rax, r13
shr rax, 3Dh
jnz loc_1803
test ... | long long func0(_QWORD *a1)
{
long long v1; // r12
long long v2; // r12
unsigned long long v3; // r13
__m128i *v5; // rax
__m128i *v6; // rbx
__int32 *v7; // rdx
unsigned long long v8; // r15
__m128i si128; // xmm7
long long v10; // rcx
__m128i *v11; // rsi
__m128i v12; // xmm5
long long v13; /... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x48
MOV R12,qword ptr [RDI + 0x8]
SUB R12,qword ptr [RDI]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
SAR R12,0x2
MOVSXD R13,R12D
MOV RAX,R13
SHR RAX,0x3d
JNZ 0x00101803
TEST R13,R13
JZ 0x00101120
SHL R13,0x2
MOV R1... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(std::vector<int, std::allocator<int> >) */
uint func0(vector param_1)
{
ulong uVar1;
long lVar2;
code *pcVar3;
int8 uVar4;
int8 uVar5;
int iVar6;
int *piVar7;
int *piVar8;
long lVar9;
int *piVar10;
int ... |
2,088 | func0 |
#include <iostream>
#include <vector>
#include <string>
#include <cctype>
#include <cassert>
| std::vector<std::string> func0(const std::string& str1) {
std::vector<std::string> result;
bool has_upper = false, has_lower = false, has_digit = false;
for (char ch : str1) {
if (isupper(ch)) has_upper = true;
if (islower(ch)) has_lower = true;
if (isdigit(ch)) has_digit = t... | int main() {
assert(func0("python") == std::vector<std::string>({
"String must have 1 upper case character.",
"String must have 1 number.",
"String length should be atleast 8."
}));
assert(func0("123python") == std::vector<std::string>({
"String must have 1 upper cas... | O0 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x68,%rsp
mov %rdi,-0x68(%rbp)
mov %rsi,-0x70(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x68(%rbp),%rax
mov %rax,%rdi
callq ... | _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
mov rax, [rbp+var_98]
mov rdi, rax
call _ZNSt6vectorINSt7__cxx11... | long long func0(long long a1, long long a2)
{
char v3; // [rsp+1Ch] [rbp-84h]
char v4; // [rsp+1Dh] [rbp-83h]
char v5; // [rsp+1Eh] [rbp-82h]
char v6; // [rsp+1Fh] [rbp-81h]
long long v7; // [rsp+20h] [rbp-80h] BYREF
_QWORD v8[7]; // [rsp+28h] [rbp-78h] BYREF
_BYTE v9[40]; // [rsp+60h] [rbp-40h] BYREF
... | 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
MOV RAX,qword ptr [RBP + -0x98]
MOV RDI,RAX
CALL 0x001033da
MOV byte ptr [RBP + -0x84],0x0
MOV byte ptr [RBP + -0x83],0x0
MOV ... | /* func0(std::string const&) */
string * func0(string *param_1)
{
bool bVar1;
bool bVar2;
bool bVar3;
bool bVar4;
char cVar5;
int iVar6;
char *pcVar7;
ulong uVar8;
long in_FS_OFFSET;
int8 local_88;
int8 local_80 [2];
int8 *local_70;
int8 *local_68;
int8 *local_60;
int8 *local_58;
int8 ... |
2,089 | func0 |
#include <iostream>
#include <vector>
#include <string>
#include <cctype>
#include <cassert>
| std::vector<std::string> func0(const std::string& str1) {
std::vector<std::string> result;
bool has_upper = false, has_lower = false, has_digit = false;
for (char ch : str1) {
if (isupper(ch)) has_upper = true;
if (islower(ch)) has_lower = true;
if (isdigit(ch)) has_digit = t... | int main() {
assert(func0("python") == std::vector<std::string>({
"String must have 1 upper case character.",
"String must have 1 number.",
"String length should be atleast 8."
}));
assert(func0("123python") == std::vector<std::string>({
"String must have 1 upper cas... | O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x58,%rsp
mov %rdi,0x10(%rsp)
mov %rsi,0x18(%rsp)
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
movq $0x0,(%rdi)
m... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 58h
mov [rsp+88h+var_78], rdi
mov [rsp+88h+var_70], rsi
mov rax, fs:28h
mov [rsp+88h+var_40], rax
xor eax, eax
mov qword ptr [rdi], 0
mov ... | _QWORD * func0(_QWORD *a1, char **a2)
{
char *v2; // rbp
char v3; // r14
char v4; // r15
int v5; // r13d
bool v6; // zf
char v7; // al
char v9; // [rsp+7h] [rbp-81h]
char *v10; // [rsp+8h] [rbp-80h]
void *v11[2]; // [rsp+20h] [rbp-68h] BYREF
_QWORD v12[11]; // [rsp+30h] [rbp-58h] BYREF
v12[3] = _... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x58
MOV qword ptr [RSP + 0x10],RDI
MOV qword ptr [RSP + 0x18],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x48],RAX
XOR EAX,EAX
MOV qword ptr [RDI],0x0
MOV qword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
MOV RBP,qword ptr [R... | /* func0(std::string const&) */
string * func0(string *param_1)
{
bool bVar1;
bool bVar2;
bool bVar3;
int iVar4;
char *pcVar5;
char *pcVar6;
int8 *in_RSI;
int iVar7;
long in_FS_OFFSET;
long *local_68 [2];
long local_58 [3];
long local_40;
local_40 = *(long *)(in_FS_OFFSET + 0x28);
*(int... |
2,090 | func0 |
#include <iostream>
#include <vector>
#include <string>
#include <cctype>
#include <cassert>
| std::vector<std::string> func0(const std::string& str1) {
std::vector<std::string> result;
bool has_upper = false, has_lower = false, has_digit = false;
for (char ch : str1) {
if (isupper(ch)) has_upper = true;
if (islower(ch)) has_lower = true;
if (isdigit(ch)) has_digit = t... | int main() {
assert(func0("python") == std::vector<std::string>({
"String must have 1 upper case character.",
"String must have 1 number.",
"String length should be atleast 8."
}));
assert(func0("123python") == std::vector<std::string>({
"String must have 1 upper cas... | O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x68,%rsp
mov (%rsi),%rcx
mov %rdi,0x10(%rsp)
mov %rsi,0x18(%rsp)
mov %fs:0x28,%rax
mov %rax,0x58(%rsp)
xor %eax,%eax
m... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 68h
mov rdx, [rsi]
mov [rsp+98h+var_88], rdi
mov [rsp+98h+var_80], rsi
mov rax, fs:28h
mov [rsp+98h+var_40], rax
xor eax... | long long func0(long long a1, char **a2)
{
char *v2; // rdx
char *v3; // rax
char *v4; // r15
char v5; // r12
char v6; // r13
char v7; // r14
int v8; // ebx
__m128i *v10; // rax
__m128i si128; // xmm0
__m128i *v12; // rax
__m128i v13; // xmm0
__m128i *v14; // rax
__m128i *v15; // rax
__m128... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x68
MOV RDX,qword ptr [RSI]
MOV qword ptr [RSP + 0x10],RDI
MOV qword ptr [RSP + 0x18],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x58],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RSI + 0x8]
MOV qword ptr [RDI + 0x10],0x0
MOVUP... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(std::string const&) */
string * func0(string *param_1)
{
long lVar1;
bool bVar2;
bool bVar3;
bool bVar4;
int8 uVar5;
int8 uVar6;
int iVar7;
char *pcVar8;
int iVar9;
int8 *in_RSI;
char *pcVar10;
long i... |
2,091 | func0 |
#include <iostream>
#include <vector>
#include <string>
#include <cctype>
#include <cassert>
| std::vector<std::string> func0(const std::string& str1) {
std::vector<std::string> result;
bool has_upper = false, has_lower = false, has_digit = false;
for (char ch : str1) {
if (isupper(ch)) has_upper = true;
if (islower(ch)) has_lower = true;
if (isdigit(ch)) has_digit = t... | int main() {
assert(func0("python") == std::vector<std::string>({
"String must have 1 upper case character.",
"String must have 1 number.",
"String length should be atleast 8."
}));
assert(func0("123python") == std::vector<std::string>({
"String must have 1 upper cas... | O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r15
pxor %xmm0,%xmm0
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x68,%rsp
mov (%rsi),%rcx
mov %rdi,0x10(%rsp)
mov %rsi,0x18(%rsp)
mov %fs:0x28,%rax
mov %rax,0x58(%rsp)... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 68h
mov rdx, [rsi]
mov [rsp+98h+var_88], rdi
mov [rsp+98h+var_80], rsi
mov rax, fs:28h
mov [rsp+98h+var_40], rax
xor eax... | long long func0(long long a1, char **a2)
{
char *v2; // rdx
char *v3; // rax
char *v4; // r15
char v5; // r12
char v6; // r13
char v7; // r14
int v8; // ebx
void **v9; // rsi
__m128i *v11; // rax
__m128i si128; // xmm0
void **v13; // rsi
_QWORD *v14; // rdx
long long v15; // rax
__m128i *v1... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x68
MOV RDX,qword ptr [RSI]
MOV qword ptr [RSP + 0x10],RDI
MOV qword ptr [RSP + 0x18],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x58],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RSI + 0x8]
MOV qword ptr [RDI + 0x10],0x0
MOVUP... | /* WARNING: Removing unreachable block (ram,0x00101db7) */
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* WARNING: Restarted to delay deadcode elimination for space: stack */
/* func0(std::string const&) */
string * func0(string *param_1)
{
long *plVar1;
bool bVar2;
int4... |
2,092 | func0 |
#include <vector>
#include <cassert>
#include <algorithm>
| int func0(const std::vector<int>& arr, int n) {
int max = 0;
std::vector<int> msis(n, 0);
for (int i = 0; i < n; i++) {
msis[i] = arr[i];
}
for (int i = 1; i < n; i++) {
for (int j = 0; j < i; j++) {
if (arr[i] > arr[j] && msis[i] < msis[j] + arr[i]) {
... | int main() {
assert(func0({1, 101, 2, 3, 100, 4, 5}, 7) == 106);
assert(func0({3, 4, 5, 10}, 4) == 22);
assert(func0({10, 5, 4, 3}, 4) == 10);
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> > const&, int):
endbr64
push %rbp
mov %rsp,%rbp
push %r12
push %rbx
sub $0x50,%rsp
mov %rdi,-0x58(%rbp)
mov %esi,-0x5c(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
movl $0x0,-0x44(%rbp)
lea -0x49(%rbp),%rax
mov %rax,%rdi
callq ... | _Z5func0RKSt6vectorIiSaIiEEi:
endbr64
push rbp
mov rbp, rsp
push r12
push rbx
sub rsp, 60h
mov [rbp+var_68], rdi
mov [rbp+var_6C], esi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov [rbp+var_4C], 0
lea rax, [rbp+var_51]
mov [rbp+var_38], rax
nop
nop
mov [rbp+... | long long func0(long long a1, int a2)
{
int v2; // ebx
int v3; // ebx
int v4; // ebx
int v5; // r12d
int v7; // ebx
int v8; // ebx
_DWORD *v9; // rax
unsigned int v10; // ebx
char v12; // [rsp+1Fh] [rbp-51h] BYREF
int v13; // [rsp+20h] [rbp-50h] BYREF
int v14; // [rsp+24h] [rbp-4Ch]
int i; // [... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R12
PUSH RBX
SUB RSP,0x60
MOV qword ptr [RBP + -0x68],RDI
MOV dword ptr [RBP + -0x6c],ESI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV dword ptr [RBP + -0x4c],0x0
LEA RAX,[RBP + -0x51]
MOV qword ptr [RBP + -0x38],RAX
NOP
NOP
MOV dword ptr [RBP + -0... | /* func0(std::vector<int, std::allocator<int> > const&, int) */
int func0(vector *param_1,int param_2)
{
int4 uVar1;
int iVar2;
int iVar3;
bool bVar4;
int4 *puVar5;
int *piVar6;
long in_FS_OFFSET;
allocator local_59;
int local_58;
int local_54;
int local_50;
int local_4c;
int local_48;
int... |
2,093 | func0 |
#include <vector>
#include <cassert>
#include <algorithm>
| int func0(const std::vector<int>& arr, int n) {
int max = 0;
std::vector<int> msis(n, 0);
for (int i = 0; i < n; i++) {
msis[i] = arr[i];
}
for (int i = 1; i < n; i++) {
for (int j = 0; j < i; j++) {
if (arr[i] > arr[j] && msis[i] < msis[j] + arr[i]) {
... | int main() {
assert(func0({1, 101, 2, 3, 100, 4, 5}, 7) == 106);
assert(func0({3, 4, 5, 10}, 4) == 22);
assert(func0({10, 5, 4, 3}, 4) == 10);
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> > const&, int):
endbr64
push %r12
push %rbp
push %rbx
movslq %esi,%rax
movabs $0x1fffffffffffffff,%rdx
cmp %rdx,%rax
ja 1291 <_Z5func0RKSt6vectorIiSaIiEEi+0x88>
mov %rdi,%rbp
mov %esi,%ebx
test %rax,%rax
je 1301 <_Z5func0RKSt6vectorIiSaIiEEi+0xf8>
lea ... | _Z5func0RKSt6vectorIiSaIiEEi:
endbr64
push r13
push r12
push rbp
push rbx
sub rsp, 8
movsxd r12, esi
mov rax, r12
shr rax, 3Dh
jnz short loc_1281
mov r13, rdi
mov ebx, esi
test r12, r12
jz loc_130E
lea rbp, ds:0[r12*4]
mov rdi, rbp; unsigned __int64
call __Znwm; o... | long long func0(long long *a1, int a2)
{
long long v2; // r12
unsigned long long v5; // rbp
unsigned int *v6; // rax
unsigned int *v7; // rdi
unsigned int *v8; // rdx
long long v9; // rsi
unsigned long long v10; // rax
long long v11; // rcx
int v12; // r9d
unsigned long long v13; // rax
int v14; ... | func0:
ENDBR64
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOVSXD R12,ESI
MOV RAX,R12
SHR RAX,0x3d
JNZ 0x00101281
MOV R13,RDI
MOV EBX,ESI
TEST R12,R12
JZ 0x0010130e
LEA RBP,[R12*0x4]
MOV RDI,RBP
CALL 0x001010e0
MOV RDI,RAX
LEA RDX,[RAX + RBP*0x1]
LAB_00101248:
MOV dword ptr [RAX],0x0
ADD RAX,0x4
CMP RDX,RAX
JNZ 0x0... | /* func0(std::vector<int, std::allocator<int> > const&, int) */
int func0(vector *param_1,int param_2)
{
char *pcVar1;
long lVar2;
int *piVar3;
long in_RCX;
int iVar4;
uint unaff_EBX;
ulong unaff_RBP;
int4 in_register_00000034;
long lVar5;
int *in_R8;
uint uVar6;
ulong in_R9;
ulong uVar7;
... |
2,094 | func0 |
#include <vector>
#include <cassert>
#include <algorithm>
| int func0(const std::vector<int>& arr, int n) {
int max = 0;
std::vector<int> msis(n, 0);
for (int i = 0; i < n; i++) {
msis[i] = arr[i];
}
for (int i = 1; i < n; i++) {
for (int j = 0; j < i; j++) {
if (arr[i] > arr[j] && msis[i] < msis[j] + arr[i]) {
... | int main() {
assert(func0({1, 101, 2, 3, 100, 4, 5}, 7) == 106);
assert(func0({3, 4, 5, 10}, 4) == 22);
assert(func0({10, 5, 4, 3}, 4) == 10);
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> > const&, int):
endbr64
movabs $0x1fffffffffffffff,%rdx
movslq %esi,%rax
push %r12
push %rbp
push %rbx
cmp %rdx,%rax
ja 1523 <_Z5func0RKSt6vectorIiSaIiEEi+0x103>
xor %r12d,%r12d
test %rax,%rax
je 151b <_Z5func0RKSt6vectorIiSaIiEEi+0xfb>
lea 0x0(,%rax,4... | _Z5func0RKSt6vectorIiSaIiEEi:
endbr64
push r14
push r13
movsxd r13, esi
mov rax, r13
push r12
shr rax, 3Dh
push rbp
push rbx
jnz loc_14FF
xor ebx, ebx
test r13, r13
jz loc_14F4
mov rbp, r13
shl r13, 2
mov r14, rdi
mov rdi, r13; unsigned __int64
call __Znwm; ope... | long long func0(long long *a1, int a2)
{
int v2; // ebx
unsigned long long v4; // r13
int *v5; // r12
long long v6; // r8
int *v7; // rdi
long long v8; // rax
_DWORD *v9; // rsi
long long v10; // rcx
unsigned long long v11; // rax
int v12; // edx
int *v13; // rdx
int v14; // eax
if ( (unsign... | func0:
ENDBR64
PUSH R14
PUSH R13
MOVSXD R13,ESI
MOV RAX,R13
PUSH R12
SHR RAX,0x3d
PUSH RBP
PUSH RBX
JNZ 0x001014ff
XOR EBX,EBX
TEST R13,R13
JZ 0x001014f4
MOV RBP,R13
SHL R13,0x2
MOV R14,RDI
MOV RDI,R13
CALL 0x00101100
MOV RDX,R13
XOR ESI,ESI
MOV RDI,RAX
MOV R12,RAX
CALL 0x001010d0
MOV R8,qword ptr [R14]
MOV RDI,R12
XOR... | /* func0(std::vector<int, std::allocator<int> > const&, int) */
void * func0(vector *param_1,int param_2)
{
int *piVar1;
void *pvVar2;
uint *__s;
long lVar3;
long lVar4;
void *extraout_RAX;
int iVar5;
uint uVar6;
int *piVar7;
char *pcVar8;
uint *puVar9;
ulong uVar10;
ulong __n;
uVar10 =... |
2,095 | func0 |
#include <vector>
#include <cassert>
#include <algorithm>
| int func0(const std::vector<int>& arr, int n) {
int max = 0;
std::vector<int> msis(n, 0);
for (int i = 0; i < n; i++) {
msis[i] = arr[i];
}
for (int i = 1; i < n; i++) {
for (int j = 0; j < i; j++) {
if (arr[i] > arr[j] && msis[i] < msis[j] + arr[i]) {
... | int main() {
assert(func0({1, 101, 2, 3, 100, 4, 5}, 7) == 106);
assert(func0({3, 4, 5, 10}, 4) == 22);
assert(func0({10, 5, 4, 3}, 4) == 10);
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> > const&, int):
endbr64
movabs $0x1fffffffffffffff,%rdx
push %r13
movslq %esi,%rax
push %r12
push %rbp
push %rbx
sub $0x8,%rsp
cmp %rdx,%rax
ja 162f <_Z5func0RKSt6vectorIiSaIiEEi+0x22f>
xor %r12d,%r12d
test %rax,%rax
je 15ff <_Z5func0RKSt6vectorIiSaI... | _Z5func0RKSt6vectorIiSaIiEEi:
endbr64
push r13
push r12
push rbp
push rbx
movsxd rbx, esi
mov rax, rbx
sub rsp, 8
shr rax, 3Dh
jnz loc_163B
xor r12d, r12d
test rbx, rbx
jz loc_15A0
mov rbp, rbx
shl rbx, 2
mov r13, rdi
mov rdi, rbx; unsigned __int64
call __Znwm... | long long func0(long long *a1, int a2)
{
int v2; // r12d
unsigned long long v4; // rbx
void *v5; // rax
__m128i *v6; // rax
long long v7; // r8
__m128i *v8; // rdi
__m128i *v9; // rdx
_DWORD *v10; // rsi
long long v11; // rax
long long v12; // rcx
unsigned long long v13; // rax
int v14; // edx
... | func0:
ENDBR64
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOVSXD RBX,ESI
MOV RAX,RBX
SUB RSP,0x8
SHR RAX,0x3d
JNZ 0x0010163b
XOR R12D,R12D
TEST RBX,RBX
JZ 0x001015a0
MOV RBP,RBX
SHL RBX,0x2
MOV R13,RDI
MOV RDI,RBX
CALL 0x00101100
MOV RDX,RBX
XOR ESI,ESI
MOV RDI,RAX
CALL 0x001010d0
MOV R8,qword ptr [R13]
MOV RDI,RAX
CMP EBP,0x... | /* func0(std::vector<int, std::allocator<int> > const&, int) */
uint func0(vector *param_1,int param_2)
{
int *piVar1;
uint *puVar2;
uint *puVar3;
uint *puVar4;
int8 uVar5;
long lVar6;
uint uVar7;
void *__s;
char *pcVar8;
long lVar9;
long lVar10;
uint *puVar11;
int iVar12;
ulong __n;
int... |
2,096 | func0 |
#include <cassert>
#include <utility>
| bool func0(const std::pair<int, int>& line1, const std::pair<int, int>& line2) {
return line1.first * line2.second == line2.first * line1.second;
}
| int main() {
assert(func0({2, 3}, {2, 3}) == true);
assert(func0({2, 3}, {4, -3}) == false);
assert(func0({3, 3}, {5, 5}) == true);
return 0;
}
| O0 | cpp | func0(std::pair<int, int> const&, std::pair<int, int> const&):
endbr64
push %rbp
mov %rsp,%rbp
mov %rdi,-0x8(%rbp)
mov %rsi,-0x10(%rbp)
mov -0x8(%rbp),%rax
mov (%rax),%edx
mov -0x10(%rbp),%rax
mov 0x4(%rax),%eax
imul %eax,%edx
mov -0x10(%rbp),%rax
mov (%rax),%ecx
mov -0x8(%rbp),%rax
mo... | _Z5func0RKSt4pairIiiES2_:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov edx, [rax]
mov rax, [rbp+var_10]
mov eax, [rax+4]
mov ecx, edx
imul ecx, eax
mov rax, [rbp+var_10]
mov edx, [rax]
mov rax, [rbp+var_8]
mov eax... | bool func0(_DWORD *a1, _DWORD *a2)
{
return a2[1] * *a1 == *a2 * a1[1];
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV EDX,dword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x4]
MOV ECX,EDX
IMUL ECX,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RAX]
MOV RAX,qword ptr [RBP ... | /* func0(std::pair<int, int> const&, std::pair<int, int> const&) */
int4 func0(pair *param_1,pair *param_2)
{
return CONCAT31((int3)((uint)(*(int *)(param_1 + 4) * *(int *)param_2) >> 8),
*(int *)param_1 * *(int *)(param_2 + 4) == *(int *)(param_1 + 4) * *(int *)param_2
);
} |
2,097 | func0 |
#include <cassert>
#include <utility>
| bool func0(const std::pair<int, int>& line1, const std::pair<int, int>& line2) {
return line1.first * line2.second == line2.first * line1.second;
}
| int main() {
assert(func0({2, 3}, {2, 3}) == true);
assert(func0({2, 3}, {4, -3}) == false);
assert(func0({3, 3}, {5, 5}) == true);
return 0;
}
| O1 | cpp | func0(std::pair<int, int> const&, std::pair<int, int> const&):
endbr64
mov (%rdi),%edx
imul 0x4(%rsi),%edx
mov (%rsi),%eax
imul 0x4(%rdi),%eax
cmp %eax,%edx
sete %al
retq
| _Z5func0RKSt4pairIiiES2_:
endbr64
mov edx, [rdi]
imul edx, [rsi+4]
mov eax, [rsi]
imul eax, [rdi+4]
cmp edx, eax
setz al
retn | bool func0(_DWORD *a1, _DWORD *a2)
{
return a2[1] * *a1 == a1[1] * *a2;
} | func0:
ENDBR64
MOV EDX,dword ptr [RDI]
IMUL EDX,dword ptr [RSI + 0x4]
MOV EAX,dword ptr [RSI]
IMUL EAX,dword ptr [RDI + 0x4]
CMP EDX,EAX
SETZ AL
RET | /* func0(std::pair<int, int> const&, std::pair<int, int> const&) */
int4 func0(pair *param_1,pair *param_2)
{
return CONCAT31((int3)((uint)(*(int *)param_2 * *(int *)(param_1 + 4)) >> 8),
*(int *)param_1 * *(int *)(param_2 + 4) == *(int *)param_2 * *(int *)(param_1 + 4)
);
} |
2,098 | func0 |
#include <cassert>
#include <utility>
| bool func0(const std::pair<int, int>& line1, const std::pair<int, int>& line2) {
return line1.first * line2.second == line2.first * line1.second;
}
| int main() {
assert(func0({2, 3}, {2, 3}) == true);
assert(func0({2, 3}, {4, -3}) == false);
assert(func0({3, 3}, {5, 5}) == true);
return 0;
}
| O2 | cpp | func0(std::pair<int, int> const&, std::pair<int, int> const&):
endbr64
mov (%rdi),%edx
mov (%rsi),%eax
imul 0x4(%rsi),%edx
imul 0x4(%rdi),%eax
cmp %eax,%edx
sete %al
retq
nopw %cs:0x0(%rax,%rax,1)
| _Z5func0RKSt4pairIiiES2_:
endbr64
mov edx, [rdi]
mov eax, [rsi]
imul edx, [rsi+4]
imul eax, [rdi+4]
cmp edx, eax
setz al
retn | bool func0(_DWORD *a1, _DWORD *a2)
{
return a2[1] * *a1 == a1[1] * *a2;
} | func0:
ENDBR64
MOV EDX,dword ptr [RDI]
MOV EAX,dword ptr [RSI]
IMUL EDX,dword ptr [RSI + 0x4]
IMUL EAX,dword ptr [RDI + 0x4]
CMP EDX,EAX
SETZ AL
RET | /* func0(std::pair<int, int> const&, std::pair<int, int> const&) */
int4 func0(pair *param_1,pair *param_2)
{
return CONCAT31((int3)((uint)(*(int *)param_2 * *(int *)(param_1 + 4)) >> 8),
*(int *)param_1 * *(int *)(param_2 + 4) == *(int *)param_2 * *(int *)(param_1 + 4)
);
} |
2,099 | func0 |
#include <cassert>
#include <utility>
| bool func0(const std::pair<int, int>& line1, const std::pair<int, int>& line2) {
return line1.first * line2.second == line2.first * line1.second;
}
| int main() {
assert(func0({2, 3}, {2, 3}) == true);
assert(func0({2, 3}, {4, -3}) == false);
assert(func0({3, 3}, {5, 5}) == true);
return 0;
}
| O3 | cpp | func0(std::pair<int, int> const&, std::pair<int, int> const&):
endbr64
mov (%rdi),%edx
mov (%rsi),%eax
imul 0x4(%rsi),%edx
imul 0x4(%rdi),%eax
cmp %eax,%edx
sete %al
retq
nopw %cs:0x0(%rax,%rax,1)
| _Z5func0RKSt4pairIiiES2_:
endbr64
mov edx, [rdi]
mov eax, [rsi]
imul edx, [rsi+4]
imul eax, [rdi+4]
cmp edx, eax
setz al
retn | bool func0(_DWORD *a1, _DWORD *a2)
{
return a2[1] * *a1 == a1[1] * *a2;
} | func0:
ENDBR64
MOV EDX,dword ptr [RDI]
MOV EAX,dword ptr [RSI]
IMUL EDX,dword ptr [RSI + 0x4]
IMUL EAX,dword ptr [RDI + 0x4]
CMP EDX,EAX
SETZ AL
RET | /* func0(std::pair<int, int> const&, std::pair<int, int> const&) */
int4 func0(pair *param_1,pair *param_2)
{
return CONCAT31((int3)((uint)(*(int *)param_2 * *(int *)(param_1 + 4)) >> 8),
*(int *)param_1 * *(int *)(param_2 + 4) == *(int *)param_2 * *(int *)(param_1 + 4)
);
} |
2,100 | func0 |
#include <iostream>
#include <string>
#include <cassert>
#include <cctype>
| std::string func0(const std::string &str1) {
std::string result = "";
std::string tempStr = str1;
for (char &c : tempStr) {
c = tolower(c);
}
tempStr[0] = toupper(tempStr[0]);
for (size_t i = 0; i < tempStr.size(); ++i) {
if (i == tempStr.size() - 1 || tempStr[i + 1] ==... | int main() {
assert(func0("python") == "PythoN");
assert(func0("bigdata") == "BigdatA");
assert(func0("Hadoop") == "HadooP");
return 0;
}
| O0 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x78,%rsp
mov %rdi,-0x78(%rbp)
mov %rsi,-0x80(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
lea -0x60(%rbp),%rax
mov %rax,%rdi
callq ... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 78h
mov [rbp+var_78], rdi
mov [rbp+var_80], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_68]
mov [rbp+var_48], rax
nop
nop
lea rdx, [r... | long long func0(long long a1, long long a2)
{
char *v2; // rax
char v3; // bl
long long v4; // rax
char *v6; // rax
char v7; // bl
char *v8; // rax
unsigned long long v9; // rax
long long v11; // [rsp+10h] [rbp-70h] BYREF
long long v12; // [rsp+18h] [rbp-68h] BYREF
unsigned long long i; // [rsp+20h... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x78
MOV qword ptr [RBP + -0x78],RDI
MOV qword ptr [RBP + -0x80],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x68]
MOV qword ptr [RBP + -0x48],RAX
NOP
NOP
LEA RDX,[RBP + -0x68]
MOV RAX,qword ptr [RBP + -0x78]
LEA RCX,[0... | /* func0(std::string const&) */
string * func0(string *param_1)
{
bool bVar1;
int iVar2;
char *pcVar3;
int *puVar4;
long lVar5;
ulong uVar6;
string *in_RSI;
long in_FS_OFFSET;
int8 local_78;
int8 local_70;
ulong local_68;
string *local_60;
char *local_58;
int8 *local_50;
string local_48 ... |
2,101 | func0 |
#include <iostream>
#include <string>
#include <cassert>
#include <cctype>
| std::string func0(const std::string &str1) {
std::string result = "";
std::string tempStr = str1;
for (char &c : tempStr) {
c = tolower(c);
}
tempStr[0] = toupper(tempStr[0]);
for (size_t i = 0; i < tempStr.size(); ++i) {
if (i == tempStr.size() - 1 || tempStr[i + 1] ==... | int main() {
assert(func0("python") == "PythoN");
assert(func0("bigdata") == "BigdatA");
assert(func0("Hadoop") == "HadooP");
return 0;
}
| O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x48,%rsp
mov %rdi,%rbx
mov %rsi,%rbp
mov %fs:0x28,%rax
mov %rax,0x38(%rsp)
xor %eax,%eax
lea 0x10(%rdi),%r15
mov %r... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 48h
mov rbx, rdi
mov rbp, rsi
mov rax, fs:28h
mov [rsp+78h+var_40], rax
xor eax, eax
lea r15, [rdi+10h]
mov [rdi], r15
lea rsi, aFu... | _QWORD * func0(_QWORD *a1, long long a2)
{
_QWORD *v3; // r15
_BYTE *v4; // r12
size_t v5; // rbp
char *v6; // rbp
char *v7; // r12
_BYTE *v8; // rbp
size_t v9; // rax
size_t i; // rbp
_QWORD *v11; // rdi
_BYTE *v12; // r12
char v13; // r14
long long v14; // r12
unsigned long long v15; // r13
... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x48
MOV RBX,RDI
MOV RBP,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
LEA R15,[RDI + 0x10]
MOV qword ptr [RDI],R15
LEA RSI,[0x1020c2]
MOV RDX,RSI
LAB_00101302:
CALL 0x00101766
LEA RAX,[RSP + 0x20]
MOV qword ptr [R... | /* func0(std::string const&) */
string * func0(string *param_1)
{
char cVar1;
int *__src;
ulong uVar2;
ulong *puVar3;
int iVar4;
ulong uVar5;
ulong *puVar6;
ulong uVar7;
int8 *in_RSI;
ulong *puVar8;
char *pcVar9;
long in_FS_OFFSET;
ulong local_70;
ulong *local_68;
ulong local_60;
ulong... |
2,102 | func0 |
#include <iostream>
#include <string>
#include <cassert>
#include <cctype>
| std::string func0(const std::string &str1) {
std::string result = "";
std::string tempStr = str1;
for (char &c : tempStr) {
c = tolower(c);
}
tempStr[0] = toupper(tempStr[0]);
for (size_t i = 0; i < tempStr.size(); ++i) {
if (i == tempStr.size() - 1 || tempStr[i + 1] ==... | int main() {
assert(func0("python") == "PythoN");
assert(func0("bigdata") == "BigdatA");
assert(func0("Hadoop") == "HadooP");
return 0;
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r15
lea 0x10(%rdi),%r15
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x58,%rsp
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
movb $0x0,0x10(%rdi)
lea... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
lea r15, [rdi+10h]
push r14
push r13
push r12
push rbp
push rbx
mov rbx, rdi
sub rsp, 58h
mov rax, fs:28h
mov [rsp+88h+var_40], rax
xor eax, eax
mov byte ptr [rdi+10h], 0
lea rax, [rsp+88h+... | _QWORD * func0(_QWORD *a1, long long a2)
{
_QWORD *v2; // r15
size_t v4; // rbp
_BYTE *v5; // r12
_QWORD *v6; // rax
char *v7; // rbp
char *v8; // r12
int v9; // edi
size_t v10; // rbp
size_t i; // rdx
char v12; // r14
long long v13; // r12
long long v14; // rax
unsigned long long v15; // r13
... | func0:
ENDBR64
PUSH R15
LEA R15,[RDI + 0x10]
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV RBX,RDI
SUB RSP,0x58
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x48],RAX
XOR EAX,EAX
MOV byte ptr [RDI + 0x10],0x0
LEA RAX,[RSP + 0x20]
MOV qword ptr [RDI + 0x8],0x0
MOV RBP,qword ptr [RSI + 0x8]
MOV qword ptr [RSP + 0x... | /* func0(std::string const&) */
string * func0(string *param_1)
{
char *pcVar1;
string sVar2;
int *__src;
ulong uVar3;
ulong *puVar4;
int iVar5;
string *psVar6;
ulong uVar7;
ulong *puVar8;
ulong uVar9;
int8 *in_RSI;
ulong *puVar10;
long in_FS_OFFSET;
ulong local_70;
ulong *local_68;
ul... |
2,103 | func0 |
#include <iostream>
#include <string>
#include <cassert>
#include <cctype>
| std::string func0(const std::string &str1) {
std::string result = "";
std::string tempStr = str1;
for (char &c : tempStr) {
c = tolower(c);
}
tempStr[0] = toupper(tempStr[0]);
for (size_t i = 0; i < tempStr.size(); ++i) {
if (i == tempStr.size() - 1 || tempStr[i + 1] ==... | int main() {
assert(func0("python") == "PythoN");
assert(func0("bigdata") == "BigdatA");
assert(func0("Hadoop") == "HadooP");
return 0;
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r15
lea 0x10(%rdi),%r15
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x58,%rsp
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
movb $0x0,0x10(%rdi)
lea... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
lea r15, [rdi+10h]
push r14
push r13
push r12
push rbp
push rbx
mov rbx, rdi
sub rsp, 58h
mov rax, fs:28h
mov [rsp+88h+var_40], rax
xor eax, eax
mov byte ptr [rdi+10h], 0
lea rax, [rsp+88h+... | _QWORD * func0(_QWORD *a1, long long a2)
{
_QWORD *v2; // r15
size_t v4; // rbp
_BYTE *v5; // r12
_QWORD *v6; // rax
char *v7; // rbp
char *v8; // r12
int v9; // edi
size_t v10; // rbp
size_t i; // rdx
char v12; // r14
long long v13; // r12
long long v14; // rax
unsigned long long v15; // r13
... | func0:
ENDBR64
PUSH R15
LEA R15,[RDI + 0x10]
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV RBX,RDI
SUB RSP,0x58
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x48],RAX
XOR EAX,EAX
MOV byte ptr [RDI + 0x10],0x0
LEA RAX,[RSP + 0x20]
MOV qword ptr [RDI + 0x8],0x0
MOV RBP,qword ptr [RSI + 0x8]
MOV qword ptr [RSP + 0x... | /* func0(std::string const&) */
string * func0(string *param_1)
{
char *pcVar1;
string sVar2;
int *__src;
ulong uVar3;
ulong *puVar4;
int iVar5;
string *psVar6;
ulong uVar7;
ulong *puVar8;
ulong uVar9;
int8 *in_RSI;
ulong *puVar10;
long in_FS_OFFSET;
ulong local_70;
ulong *local_68;
ul... |
2,104 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int arr[], int n, int sum) {
int count = 0;
for (int i = 0; i < n; i++) {
for (int j = i + 1; j < n; j++) {
if (arr[i] + arr[j] == sum) {
count++;
}
}
}
return count;
}
| int main() {
int arr1[] = {1, 5, 7, -1, 5};
int arr2[] = {1, 5, 7, -1};
int arr3[] = {1, 1, 1, 1};
assert(func0(arr1, 5, 6) == 3);
assert(func0(arr2, 4, 6) == 2);
assert(func0(arr3, 4, 2) == 6);
return 0;
}
| O0 | cpp | func0(int*, int, int):
endbr64
push %rbp
mov %rsp,%rbp
mov %rdi,-0x18(%rbp)
mov %esi,-0x1c(%rbp)
mov %edx,-0x20(%rbp)
movl $0x0,-0xc(%rbp)
movl $0x0,-0x8(%rbp)
mov -0x8(%rbp),%eax
cmp -0x1c(%rbp),%eax
jge 1225 <_Z5func0Piii+0x7c>
mov -0x8(%rbp),%eax
add $0x1,%eax
mov %eax,-0x4(%rbp)
... | _Z5func0Piii:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_18], rdi
mov [rbp+var_1C], esi
mov [rbp+var_20], edx
mov [rbp+var_C], 0
mov [rbp+var_8], 0
jmp short loc_11DD
loc_118B:
mov eax, [rbp+var_8]
add eax, 1
mov [rbp+var_4], eax
jmp short loc_11D1
loc_1196:
mov eax, [... | long long func0(int *a1, int a2, int a3)
{
unsigned int v4; // [rsp+14h] [rbp-Ch]
int i; // [rsp+18h] [rbp-8h]
int j; // [rsp+1Ch] [rbp-4h]
v4 = 0;
for ( i = 0; i < a2; ++i )
{
for ( j = i + 1; j < a2; ++j )
{
if ( a3 == a1[i] + a1[j] )
++v4;
}
}
return v4;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x1c],ESI
MOV dword ptr [RBP + -0x20],EDX
MOV dword ptr [RBP + -0xc],0x0
MOV dword ptr [RBP + -0x8],0x0
JMP 0x001011dd
LAB_0010118b:
MOV EAX,dword ptr [RBP + -0x8]
ADD EAX,0x1
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001011d1
LAB_0010... | /* func0(int*, int, int) */
int func0(int *param_1,int param_2,int param_3)
{
int local_14;
int local_10;
int local_c;
local_14 = 0;
for (local_10 = 0; local_c = local_10, local_10 < param_2; local_10 = local_10 + 1) {
while (local_c = local_c + 1, local_c < param_2) {
if (param_3 == param_1[lo... |
2,105 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int arr[], int n, int sum) {
int count = 0;
for (int i = 0; i < n; i++) {
for (int j = i + 1; j < n; j++) {
if (arr[i] + arr[j] == sum) {
count++;
}
}
}
return count;
}
| int main() {
int arr1[] = {1, 5, 7, -1, 5};
int arr2[] = {1, 5, 7, -1};
int arr3[] = {1, 1, 1, 1};
assert(func0(arr1, 5, 6) == 3);
assert(func0(arr2, 4, 6) == 2);
assert(func0(arr3, 4, 2) == 6);
return 0;
}
| O1 | cpp | func0(int*, int, int):
endbr64
test %esi,%esi
jle 11f4 <_Z5func0Piii+0x4b>
lea -0x1(%rsi),%r11d
add $0x1,%r11
mov $0x1,%r10d
mov $0x0,%ecx
cmp %r11,%r10
je 11f9 <_Z5func0Piii+0x50>
mov -0x4(%rdi,%r10,4),%r9d
mov %r10,%rax
mov %r9d,%r8d
add (%rdi,%rax,4),%r8d
cmp %edx,%r8d
sete %... | _Z5func0Piii:
endbr64
test esi, esi
jle short loc_11C0
push rbx
mov r8, rdi
mov r11d, esi
movsxd rbx, esi
mov r10d, 1
mov ecx, 0
jmp short loc_118B
loc_1188:
mov r10, rax
loc_118B:
cmp r10, r11
jz short loc_11BC
mov r9d, [r8+r10*4-4]
mov rax, r10
loc_1198:
mov edi... | long long func0(int *a1, int a2, int a3)
{
long long v3; // r10
unsigned int v4; // ecx
long long v5; // rax
if ( a2 <= 0 )
return 0LL;
v3 = 1LL;
v4 = 0;
while ( v3 != a2 )
{
v5 = v3;
do
v4 += a1[v5++] + a1[v3 - 1] == a3;
while ( a2 > (int)v5 );
if ( v3 == a2 )
break;
... | func0:
ENDBR64
TEST ESI,ESI
JLE 0x001011c0
PUSH RBX
MOV R8,RDI
MOV R11D,ESI
MOVSXD RBX,ESI
MOV R10D,0x1
MOV ECX,0x0
JMP 0x0010118b
LAB_00101188:
MOV R10,RAX
LAB_0010118b:
CMP R10,R11
JZ 0x001011bc
MOV R9D,dword ptr [R8 + R10*0x4 + -0x4]
MOV RAX,R10
LAB_00101198:
MOV EDI,R9D
ADD EDI,dword ptr [R8 + RAX*0x4]
CMP EDI,EDX
... | /* func0(int*, int, int) */
int func0(int *param_1,int param_2,int param_3)
{
ulong uVar1;
int iVar2;
ulong uVar3;
bool bVar4;
if (param_2 < 1) {
return 0;
}
iVar2 = 0;
uVar3 = 1;
do {
if (uVar3 == (uint)param_2) {
return iVar2;
}
uVar1 = uVar3;
do {
iVar2 = iVar2 ... |
2,106 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int arr[], int n, int sum) {
int count = 0;
for (int i = 0; i < n; i++) {
for (int j = i + 1; j < n; j++) {
if (arr[i] + arr[j] == sum) {
count++;
}
}
}
return count;
}
| int main() {
int arr1[] = {1, 5, 7, -1, 5};
int arr2[] = {1, 5, 7, -1};
int arr3[] = {1, 1, 1, 1};
assert(func0(arr1, 5, 6) == 3);
assert(func0(arr2, 4, 6) == 2);
assert(func0(arr3, 4, 2) == 6);
return 0;
}
| O2 | cpp | func0(int*, int, int):
endbr64
test %esi,%esi
jle 1406 <_Z5func0Piii+0x56>
lea -0x1(%rsi),%r11d
mov $0x1,%r10d
xor %r8d,%r8d
add $0x1,%r11
cmp %r11,%r10
je 1402 <_Z5func0Piii+0x52>
xchg %ax,%ax
mov -0x4(%rdi,%r10,4),%r9d
mov %r10,%rax
nopl 0x0(%rax,%rax,1)
mov (%rdi,%rax,4),%ecx
add... | _Z5func0Piii:
endbr64
test esi, esi
jle short loc_12C9
mov r11d, esi
mov r10d, 1
xor ecx, ecx
cmp esi, 1
jz short loc_12C6
nop dword ptr [rax+rax+00000000h]
loc_1290:
mov r9d, [rdi+r10*4-4]
mov rax, r10
nop dword ptr [rax+rax+00000000h]
loc_12A0:
mov r8d, [rdi+rax*4]
add ... | long long func0(int *a1, int a2, int a3)
{
long long v3; // r10
unsigned int v4; // ecx
long long v5; // rax
bool v6; // r8
if ( a2 <= 0 )
return 0LL;
v3 = 1LL;
v4 = 0;
if ( a2 != 1 )
{
do
{
v5 = v3;
do
{
v6 = a3 == a1[v3 - 1] + a1[v5++];
v4 += v6;
... | func0:
ENDBR64
TEST ESI,ESI
JLE 0x001012c9
MOV R11D,ESI
MOV R10D,0x1
XOR ECX,ECX
CMP ESI,0x1
JZ 0x001012c6
NOP dword ptr [RAX + RAX*0x1]
LAB_00101290:
MOV R9D,dword ptr [RDI + R10*0x4 + -0x4]
MOV RAX,R10
NOP dword ptr [RAX + RAX*0x1]
LAB_001012a0:
MOV R8D,dword ptr [RDI + RAX*0x4]
ADD R8D,R9D
CMP EDX,R8D
SETZ R8B
ADD R... | /* func0(int*, int, int) */
int func0(int *param_1,int param_2,int param_3)
{
int *piVar1;
ulong uVar2;
int iVar3;
ulong uVar4;
if (param_2 < 1) {
return 0;
}
uVar4 = 1;
iVar3 = 0;
if (param_2 != 1) {
do {
uVar2 = uVar4;
do {
piVar1 = param_1 + uVar2;
uVar2 = u... |
2,107 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int arr[], int n, int sum) {
int count = 0;
for (int i = 0; i < n; i++) {
for (int j = i + 1; j < n; j++) {
if (arr[i] + arr[j] == sum) {
count++;
}
}
}
return count;
}
| int main() {
int arr1[] = {1, 5, 7, -1, 5};
int arr2[] = {1, 5, 7, -1};
int arr3[] = {1, 1, 1, 1};
assert(func0(arr1, 5, 6) == 3);
assert(func0(arr2, 4, 6) == 2);
assert(func0(arr3, 4, 2) == 6);
return 0;
}
| O3 | cpp | func0(int*, int, int):
endbr64
test %esi,%esi
jle 1501 <_Z5func0Piii+0x171>
cmp $0x1,%esi
je 1501 <_Z5func0Piii+0x171>
push %r14
xor %r9d,%r9d
mov $0x1,%r8d
push %r12
lea -0x1(%rsi),%r12d
push %rbp
mov $0x1,%ebp
push %rbx
mov %rdi,%rbx
mov %edx,%edi
movd %edi,%xmm5
lea 0x4(%rb... | _Z5func0Piii:
endbr64
test esi, esi
jle loc_1280
push r14
push r12
push rbp
push rbx
mov rbx, rdi
mov edi, esi
xor esi, esi
cmp edi, 1
jz loc_1273
movd xmm5, edx
mov r11d, edx
lea r10, [rbx+4]
xor esi, esi
mov ecx, 1
lea r12d, [rdi-1]
mov ebp, 1
pshufd ... | long long func0(int *a1, int a2, unsigned int a3)
{
unsigned int v5; // esi
int *v6; // r10
int v7; // ecx
__m128i v8; // xmm3
unsigned int v9; // r9d
unsigned int v10; // r8d
__m128i v11; // xmm1
const __m128i *v12; // rax
__m128i v13; // xmm2
__m128i v14; // xmm0
__m128i v15; // xmm1
int v16;... | func0:
ENDBR64
TEST ESI,ESI
JLE 0x00101280
PUSH R14
PUSH R12
PUSH RBP
PUSH RBX
MOV RBX,RDI
MOV EDI,ESI
XOR ESI,ESI
CMP EDI,0x1
JZ 0x00101273
MOVD XMM5,EDX
MOV R11D,EDX
LEA R10,[RBX + 0x4]
XOR ESI,ESI
MOV ECX,0x1
LEA R12D,[RDI + -0x1]
MOV EBP,0x1
PSHUFD XMM3,XMM5,0x0
NOP word ptr [RAX + RAX*0x1]
LAB_00101188:
MOV R8D,ED... | /* func0(int*, int, int) */
int func0(int *param_1,int param_2,int param_3)
{
int iVar1;
uint uVar2;
int iVar3;
int *piVar4;
int *piVar5;
int *piVar6;
int *piVar7;
int iVar8;
int iVar9;
int *piVar10;
int iVar11;
int iVar12;
int iVar13;
int iVar14;
if (param_2 < 1) {
return 0;
}
... |
2,108 | func0 |
#include <vector>
#include <algorithm>
#include <cassert>
#include <climits>
| std::pair<int, std::vector<int>> func0(const std::vector<std::vector<int>>& list1) {
int min_length = INT_MAX;
std::vector<int> min_list;
for (const auto& vec : list1) {
if (vec.size() < min_length) {
min_length = vec.size();
min_list = vec;
}
}
... | int main() {
using namespace std;
assert((func0({{0}, {1, 3}, {5, 7}, {9, 11}, {13, 15, 17}}) == make_pair(1, vector<int>{0})));
assert((func0({{1}, {5, 7}, {10, 12, 14, 15}}) == make_pair(1, vector<int>{1})));
assert((func0({{5}, {15, 20, 25}}) == make_pair(1, vector<int>{5})));
return 0... | O0 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x68,%rsp
mov %rdi,-0x68(%rbp)
mov %rsi,-0x70(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
movl $0x7fffffff... | _Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 68h
mov [rbp+var_68], rdi
mov [rbp+var_70], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov [rbp+var_54], 7FFFFFFFh
lea rax, [rbp+var_30]
mov rdi, rax
call _ZNSt6vectorIiSa... | long long func0(long long a1, long long a2)
{
int v3; // [rsp+1Ch] [rbp-54h] BYREF
long long v4; // [rsp+20h] [rbp-50h] BYREF
_QWORD v5[2]; // [rsp+28h] [rbp-48h] BYREF
long long v6; // [rsp+38h] [rbp-38h]
_BYTE v7[24]; // [rsp+40h] [rbp-30h] BYREF
unsigned long long v8; // [rsp+58h] [rbp-18h]
v8 = __re... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x68
MOV qword ptr [RBP + -0x68],RDI
MOV qword ptr [RBP + -0x70],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV dword ptr [RBP + -0x54],0x7fffffff
LEA RAX,[RBP + -0x30]
MOV RDI,RAX
CALL 0x00102248
MOV RAX,qword ptr [RBP + -0x70]
MOV q... | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > > const&) */
vector * func0(vector *param_1)
{
bool bVar1;
ulong uVar2;
vector<std::vector<int,std::allocator<int>>,std::allocator<std::vector<int,std::allocator<int>>>>
*in_RSI;
long in_F... |
2,109 | func0 |
#include <vector>
#include <algorithm>
#include <cassert>
#include <climits>
| std::pair<int, std::vector<int>> func0(const std::vector<std::vector<int>>& list1) {
int min_length = INT_MAX;
std::vector<int> min_list;
for (const auto& vec : list1) {
if (vec.size() < min_length) {
min_length = vec.size();
min_list = vec;
}
}
... | int main() {
using namespace std;
assert((func0({{0}, {1, 3}, {5, 7}, {9, 11}, {13, 15, 17}}) == make_pair(1, vector<int>{0})));
assert((func0({{1}, {5, 7}, {10, 12, 14, 15}}) == make_pair(1, vector<int>{1})));
assert((func0({{5}, {15, 20, 25}}) == make_pair(1, vector<int>{5})));
return 0... | O1 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&):
endbr64
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x20,%rsp
mov %rdi,%r12
mov %fs:0x28,%rax
mov %rax,0x18(%rsp)
xor %eax,%eax
movq $0x0,(%rsp)
movq $0x0,... | _Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EE:
endbr64
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 20h
mov r12, rdi
mov rax, fs:28h
mov [rsp+48h+var_30], rax
xor eax, eax
mov [rsp+48h+src], 0
mov [rsp+48h+var_40], 0
mov [rsp+48h+var_38], 0
mov rbx, [rsi]
mov r13... | long long func0(long long a1, long long a2)
{
_QWORD *v2; // rbx
_QWORD *v3; // r13
int v4; // ebp
char *v5; // rbp
signed long long v6; // rbx
_DWORD *v7; // rax
struct _Unwind_Exception *v8; // rbx
char *v9; // r13
unsigned long long v10; // rsi
void *src; // [rsp+0h] [rbp-48h] BYREF
char *v13;... | func0:
ENDBR64
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x20
MOV R12,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x18],RAX
XOR EAX,EAX
MOV qword ptr [RSP],0x0
MOV qword ptr [RSP + 0x8],0x0
MOV qword ptr [RSP + 0x10],0x0
MOV RBX,qword ptr [RSI]
MOV R13,qword ptr [RSI + 0x8]
CMP R13,RBX
JZ 0x00101347... | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > > const&) */
vector * func0(vector *param_1)
{
vector *pvVar1;
int4 *__src;
int iVar2;
ulong uVar3;
int4 *__dest;
int8 uVar4;
vector *pvVar5;
long *in_RSI;
long in_FS_OFFSET;
int... |
2,110 | func0 |
#include <vector>
#include <algorithm>
#include <cassert>
#include <climits>
| std::pair<int, std::vector<int>> func0(const std::vector<std::vector<int>>& list1) {
int min_length = INT_MAX;
std::vector<int> min_list;
for (const auto& vec : list1) {
if (vec.size() < min_length) {
min_length = vec.size();
min_list = vec;
}
}
... | int main() {
using namespace std;
assert((func0({{0}, {1, 3}, {5, 7}, {9, 11}, {13, 15, 17}}) == make_pair(1, vector<int>{0})));
assert((func0({{1}, {5, 7}, {10, 12, 14, 15}}) == make_pair(1, vector<int>{1})));
assert((func0({{5}, {15, 20, 25}}) == make_pair(1, vector<int>{5})));
return 0... | O2 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&):
endbr64
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x20,%rsp
mov (%rsi),%rbx
mov 0x8(%rsi),%r13
mov %fs:0x28,%rax
mov %rax,0x18(%rsp)
xor ... | _Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EE:
endbr64
push r15
pxor xmm0, xmm0
push r14
xor r14d, r14d
push r13
mov r13d, 7FFFFFFFh
push r12
push rbp
push rbx
sub rsp, 48h
mov rbx, [rsi]
mov r15, [rsi+8]
mov [rsp+78h+var_70], rdi
mov rax, fs:28h
mov [rsp+78h+var_40], rax
x... | long long func0(long long a1, char **a2)
{
_DWORD *v2; // r14
int v3; // r13d
char *v4; // rbx
char *v5; // r15
long long v6; // rdx
_DWORD *v7; // r12
signed long long v8; // rbp
_DWORD *v9; // r8
long long v10; // rcx
unsigned long long v11; // rax
char *v12; // rbp
unsigned long long v13; //... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
XOR R14D,R14D
PUSH R13
MOV R13D,0x7fffffff
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x48
MOV RBX,qword ptr [RSI]
MOV R15,qword ptr [RSI + 0x8]
MOV qword ptr [RSP + 0x8],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
MOVAPS xmmword ptr [RSP + 0x20],XM... | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > > const&) */
vector * func0(vector *param_1)
{
int8 *puVar1;
long lVar2;
int iVar3;
int4 *puVar4;
int4 *puVar5;
int4 *__dest;
long lVar6;
size_t __n;
int8 *__n_00;
int4 *__n_01;
... |
2,111 | func0 |
#include <vector>
#include <algorithm>
#include <cassert>
#include <climits>
| std::pair<int, std::vector<int>> func0(const std::vector<std::vector<int>>& list1) {
int min_length = INT_MAX;
std::vector<int> min_list;
for (const auto& vec : list1) {
if (vec.size() < min_length) {
min_length = vec.size();
min_list = vec;
}
}
... | int main() {
using namespace std;
assert((func0({{0}, {1, 3}, {5, 7}, {9, 11}, {13, 15, 17}}) == make_pair(1, vector<int>{0})));
assert((func0({{1}, {5, 7}, {10, 12, 14, 15}}) == make_pair(1, vector<int>{1})));
assert((func0({{5}, {15, 20, 25}}) == make_pair(1, vector<int>{5})));
return 0... | O3 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x38,%rsp
mov 0x8(%rsi),%rax
mov (%rsi),%rbx
mov %rdi,0x10(%rsp)
mov %rax,(%rsp)
cmp %rax,%r... | _Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EE:
endbr64
push r15
pxor xmm0, xmm0
push r14
xor r14d, r14d
push r13
mov r13d, 7FFFFFFFh
push r12
push rbp
push rbx
sub rsp, 48h
mov rbx, [rsi]
mov r15, [rsi+8]
mov [rsp+78h+var_70], rdi
mov rax, fs:28h
mov [rsp+78h+var_40], rax
x... | long long func0(long long a1, char **a2)
{
_DWORD *v2; // r14
int v3; // r13d
char *v4; // rbx
char *v5; // r15
long long v6; // rdx
_DWORD *v7; // r12
signed long long v8; // rbp
_DWORD *v9; // r8
long long v10; // rcx
_DWORD *v11; // rsi
signed long long v12; // rdx
unsigned long long v13; //... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
XOR R14D,R14D
PUSH R13
MOV R13D,0x7fffffff
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x48
MOV RBX,qword ptr [RSI]
MOV R15,qword ptr [RSI + 0x8]
MOV qword ptr [RSP + 0x8],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
MOVAPS xmmword ptr [RSP + 0x20],XM... | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > > const&) */
vector * func0(vector *param_1)
{
int8 *puVar1;
long lVar2;
int iVar3;
int4 *puVar4;
int4 *puVar5;
int4 *__dest;
long lVar6;
size_t __n;
int8 *__n_00;
int4 *__n_01;
... |
2,112 | func0 |
#include <vector>
#include <assert.h>
| int func0(int n) {
std::vector<int> dp(n + 1);
dp[0] = 2;
dp[1] = 1;
for (int i = 2; i <= n; ++i) {
dp[i] = dp[i - 1] + 2 * dp[i - 2];
}
return dp[n];
}
| int main() {
assert(func0(5) == 31);
assert(func0(2) == 5);
assert(func0(4) == 17);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x48,%rsp
mov %edi,-0x44(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
lea -0x35(%rbp),%rax
mov %rax,%rdi
callq 13e8 <_ZNSaIiEC1Ev>
mov -0x44(%rbp),%eax
add $0x1,%eax
movslq %eax,%rcx
lea -0x35(%rbp),%rdx
lea ... | _Z5func0i:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 48h
mov [rbp+var_44], edi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_3D]
mov [rbp+var_38], rax
nop
nop
mov eax, [rbp+var_44]
add eax, 1
movsxd rcx, eax
lea rdx, [rbp+var_3D]
lea ra... | long long func0(int a1)
{
int v1; // ebx
int v2; // ebx
unsigned int v3; // ebx
char v5; // [rsp+13h] [rbp-3Dh] BYREF
int i; // [rsp+14h] [rbp-3Ch]
char *v7; // [rsp+18h] [rbp-38h]
_BYTE v8[24]; // [rsp+20h] [rbp-30h] BYREF
unsigned long long v9; // [rsp+38h] [rbp-18h]
v9 = __readfsqword(0x28u);
v... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x48
MOV dword ptr [RBP + -0x44],EDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x3d]
MOV qword ptr [RBP + -0x38],RAX
NOP
NOP
MOV EAX,dword ptr [RBP + -0x44]
ADD EAX,0x1
MOVSXD RCX,EAX
LEA RDX,[RBP + -0x3d]
LEA RAX,[RBP + ... | /* func0(int) */
int4 func0(int param_1)
{
int iVar1;
int iVar2;
int4 uVar3;
int4 *puVar4;
int *piVar5;
long in_FS_OFFSET;
allocator local_45;
int local_44;
allocator *local_40;
vector<int,std::allocator<int>> local_38 [24];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
local_... |
2,113 | func0 |
#include <vector>
#include <assert.h>
| int func0(int n) {
std::vector<int> dp(n + 1);
dp[0] = 2;
dp[1] = 1;
for (int i = 2; i <= n; ++i) {
dp[i] = dp[i - 1] + 2 * dp[i - 2];
}
return dp[n];
}
| int main() {
assert(func0(5) == 31);
assert(func0(2) == 5);
assert(func0(4) == 17);
return 0;
}
| O1 | cpp | func0(int):
endbr64
push %rbp
push %rbx
sub $0x8,%rsp
lea 0x1(%rdi),%ecx
movslq %ecx,%rcx
movabs $0x1fffffffffffffff,%rax
cmp %rax,%rcx
ja 123d <_Z5func0i+0x94>
mov %edi,%ebp
test %rcx,%rcx
je 1249 <_Z5func0i+0xa0>
lea 0x0(,%rcx,4),%rbx
mov %rbx,%rdi
callq 10b0 <_Znwm@plt>
mov %rax,%... | _Z5func0i:
endbr64
push r12
push rbp
push rbx
lea r12d, [rdi+1]
movsxd r12, r12d
mov rax, r12
shr rax, 3Dh
jnz loc_124E
mov ebx, edi
test r12, r12
jz loc_125A
lea rbp, ds:0[r12*4]
mov rdi, rbp; unsigned __int64
call __Znwm; operator new(ulong)
mov rdi, rax; void *
cm... | long long func0(int a1)
{
unsigned long long v1; // r12
unsigned long long v3; // rbp
_DWORD *v4; // rax
_DWORD *v5; // rdi
_DWORD *v6; // rax
_DWORD *i; // rdx
_DWORD *v8; // rdx
unsigned int v9; // ebx
v1 = a1 + 1;
if ( v1 >> 61 )
std::__throw_length_error("cannot create std::vector larger t... | func0:
ENDBR64
PUSH R12
PUSH RBP
PUSH RBX
LEA R12D,[RDI + 0x1]
MOVSXD R12,R12D
MOV RAX,R12
SHR RAX,0x3d
JNZ 0x0010124e
MOV EBX,EDI
TEST R12,R12
JZ 0x0010125a
LEA RBP,[R12*0x4]
MOV RDI,RBP
CALL 0x001010a0
MOV RDI,RAX
CMP R12,0x1
JZ 0x00101271
LEA RAX,[RAX + RBP*0x1]
LEA RDX,[RDI + 0x4]
CMP RDX,RAX
JZ 0x00101209
LAB_0010... | /* func0(int) */
int func0(int param_1)
{
int iVar1;
int *piVar2;
int *piVar3;
int unaff_EBX;
ulong uVar4;
ulong uVar5;
uVar5 = (ulong)(param_1 + 1);
if (uVar5 >> 0x3d == 0) {
if (uVar5 == 0) goto LAB_0010125a;
uVar4 = uVar5 * 4;
piVar2 = (int *)operator_new(uVar4);
if (uVar5 != 1) ... |
2,114 | func0 |
#include <vector>
#include <assert.h>
| int func0(int n) {
std::vector<int> dp(n + 1);
dp[0] = 2;
dp[1] = 1;
for (int i = 2; i <= n; ++i) {
dp[i] = dp[i - 1] + 2 * dp[i - 2];
}
return dp[n];
}
| int main() {
assert(func0(5) == 31);
assert(func0(2) == 5);
assert(func0(4) == 17);
return 0;
}
| O2 | cpp | func0(int):
endbr64
movabs $0x1fffffffffffffff,%rdx
lea 0x1(%rdi),%eax
push %r12
cltq
push %rbp
push %rbx
cmp %rdx,%rax
ja 1305 <_Z5func0i+0xb5>
test %rax,%rax
je 12f8 <_Z5func0i+0xa8>
lea 0x0(,%rax,4),%rbx
mov %edi,%ebp
mov %rbx,%rdi
callq 10b0 <_Znwm@plt>
mov %rax,%rdi
lea (%rax,... | _Z5func0i:
endbr64
push r13
push r12
push rbp
push rbx
lea ebx, [rdi+1]
movsxd rbx, ebx
mov rax, rbx
sub rsp, 8
shr rax, 3Dh
jnz loc_1352
test rbx, rbx
jz loc_1330
lea r13, ds:0[rbx*4]
mov r12d, edi
mov rdi, r13; unsigned __int64
call __Znwm; operator new(ulong)
m... | long long func0(int a1)
{
unsigned long long v1; // rbx
long long v2; // r13
_QWORD *v3; // rax
_QWORD *v4; // rbp
_QWORD *v5; // rdx
int v6; // ecx
int v7; // eax
int v8; // esi
unsigned long long v9; // rsi
unsigned int v10; // ebx
v1 = a1 + 1;
if ( v1 >> 61 )
std::__throw_length_error("... | func0:
ENDBR64
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
LEA EBX,[RDI + 0x1]
MOVSXD RBX,EBX
MOV RAX,RBX
SUB RSP,0x8
SHR RAX,0x3d
JNZ 0x00101352
TEST RBX,RBX
JZ 0x00101330
LEA R13,[RBX*0x4]
MOV R12D,EDI
MOV RDI,R13
CALL 0x001010c0
MOV RBP,RAX
CMP RBX,0x1
JZ 0x00101340
LEA RDI,[RAX + 0x4]
LEA RAX,[RAX + R13*0x1]
CMP RDI,RAX
JZ... | /* WARNING: Control flow encountered bad instruction data */
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(int) */
int4 func0(int param_1)
{
ulong uVar1;
int4 uVar2;
code *pcVar3;
int iVar4;
int iVar5;
int8 *puVar6;
int iVar7;
int *piVar8;
int *piVar9;... |
2,115 | func0 |
#include <vector>
#include <assert.h>
| int func0(int n) {
std::vector<int> dp(n + 1);
dp[0] = 2;
dp[1] = 1;
for (int i = 2; i <= n; ++i) {
dp[i] = dp[i - 1] + 2 * dp[i - 2];
}
return dp[n];
}
| int main() {
assert(func0(5) == 31);
assert(func0(2) == 5);
assert(func0(4) == 17);
return 0;
}
| O3 | cpp | func0(int):
endbr64
movabs $0x1fffffffffffffff,%rdx
lea 0x1(%rdi),%eax
push %r12
cltq
push %rbp
push %rbx
cmp %rdx,%rax
ja 1344 <_Z5func0i+0xd4>
test %rax,%rax
je 1330 <_Z5func0i+0xc0>
lea 0x0(,%rax,4),%rbp
mov %edi,%ebx
mov %rbp,%rdi
callq 10d0 <_Znwm@plt>
mov %rbp,%rdx
xor %esi,%... | _Z5func0i:
endbr64
push r13
push r12
lea r12d, [rdi+1]
push rbp
movsxd r12, r12d
push rbx
mov rax, r12
sub rsp, 8
shr rax, 3Dh
jnz loc_1380
test r12, r12
jz loc_1358
lea r13, ds:0[r12*4]
mov ebp, edi
mov rdi, r13; unsigned __int64
call __Znwm; operator new(ulong)
... | long long func0(int a1)
{
unsigned long long v1; // r12
long long v2; // r13
_QWORD *v3; // rax
_QWORD *v4; // rbx
long long v5; // rdx
int v6; // esi
int v7; // ecx
long long v8; // rax
unsigned long long v9; // rsi
unsigned int v10; // ebp
v1 = a1 + 1;
if ( v1 >> 61 )
std::__throw_length... | func0:
ENDBR64
PUSH R13
PUSH R12
LEA R12D,[RDI + 0x1]
PUSH RBP
MOVSXD R12,R12D
PUSH RBX
MOV RAX,R12
SUB RSP,0x8
SHR RAX,0x3d
JNZ 0x00101380
TEST R12,R12
JZ 0x00101358
LEA R13,[R12*0x4]
MOV EBP,EDI
MOV RDI,R13
CALL 0x001010c0
MOV RBX,RAX
CMP R12,0x1
JZ 0x00101368
LEA RDI,[RAX + 0x4]
LEA RAX,[RAX + R13*0x1]
CMP RDI,RAX
J... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(int) */
ulong func0(int param_1)
{
ulong uVar1;
uint uVar2;
code *pcVar3;
int iVar4;
int8 *puVar5;
int iVar6;
long lVar7;
int iVar8;
ulong uVar9;
uVar9 = (ulong)(param_1 + 1);
if (uVar9 >> 0x3d != 0)... |
2,116 | func0 | #include <iostream>
#include <vector>
#include <cassert>
#include <cmath>
| double func0(const std::vector<int>& nums) {
int n = nums.size();
int n1 = 0;
for (int x : nums) {
if (x < 0) {
n1 += 1;
}
}
return round(n1 * 100.0 / n) / 100.0;
}
| int main() {
assert(func0({0, 1, 2, -1, -5, 6, 0, -3, -2, 3, 4, 6, 8}) == 0.31);
assert(func0({2, 1, 2, -1, -5, 6, 4, -3, -2, 3, 4, 6, 8}) == 0.31);
assert(func0({2, 4, -6, -9, 11, -12, 14, -5, 17}) == 0.44);
std::cout << "All test cases passed." << std::endl;
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,%rdi
callq 17e8 <_ZNKSt6vectorIiSaIiEE4sizeEv>
mov %eax,-0x28(%rbp)
movl $0x0,-0x2c(... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_38], rdi
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
mov rax, [rbp+var_38]
mov rdi, rax
call _ZNKSt6vectorIiSaIiEE4sizeEv; std::vector<int>::size(void)
mov [rbp+var_28], eax
mov [rbp+... | unsigned long long func0(long long a1)
{
int v2; // [rsp+14h] [rbp-2Ch]
int v3; // [rsp+18h] [rbp-28h]
long long v4; // [rsp+20h] [rbp-20h] BYREF
_QWORD v5[2]; // [rsp+28h] [rbp-18h] BYREF
unsigned long long v6; // [rsp+38h] [rbp-8h]
v6 = __readfsqword(0x28u);
v3 = std::vector<int>::size(a1);
v2 = 0;
... | 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 RDI,RAX
CALL 0x001017f8
MOV dword ptr [RBP + -0x28],EAX
MOV dword ptr [RBP + -0x2c],0x0
MOV RAX,qword ptr [RBP + -0x38]
MOV qword pt... | /* func0(std::vector<int, std::allocator<int> > const&) */
double func0(vector *param_1)
{
bool bVar1;
int iVar2;
int *piVar3;
long in_FS_OFFSET;
double dVar4;
int local_34;
int8 local_28;
int8 local_20;
vector<int,std::allocator<int>> *local_18;
long local_10;
local_10 = *(long *)(in_FS_OFFS... |
2,117 | func0 | #include <iostream>
#include <vector>
#include <cassert>
#include <cmath>
| double func0(const std::vector<int>& nums) {
int n = nums.size();
int n1 = 0;
for (int x : nums) {
if (x < 0) {
n1 += 1;
}
}
return round(n1 * 100.0 / n) / 100.0;
}
| int main() {
assert(func0({0, 1, 2, -1, -5, 6, 0, -3, -2, 3, 4, 6, 8}) == 0.31);
assert(func0({2, 1, 2, -1, -5, 6, 4, -3, -2, 3, 4, 6, 8}) == 0.31);
assert(func0({2, 4, -6, -9, 11, -12, 14, -5, 17}) == 0.44);
std::cout << "All test cases passed." << std::endl;
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
sub $0x8,%rsp
mov 0x8(%rdi),%rcx
mov (%rdi),%rax
mov %rcx,%rsi
sub %rax,%rsi
sar $0x2,%rsi
cmp %rax,%rcx
je 130c <_Z5func0RKSt6vectorIiSaIiEE+0x63>
mov $0x0,%edx
cmpl $0x80000000,(%rax)
sbb $0xffffffff,%edx
add $0x4,%rax
c... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
sub rsp, 8
mov rcx, [rdi+8]
mov rax, [rdi]
mov rsi, rcx
sub rsi, rax
sar rsi, 2
cmp rcx, rax
jz short loc_12CC
mov edx, 0
loc_128C:
cmp dword ptr [rax], 80000000h
sbb edx, 0FFFFFFFFh
add rax, 4
cmp rax, rcx
jnz short loc_128C
... | double func0(long long a1)
{
_DWORD *v1; // rcx
_DWORD *v2; // rax
int v3; // edx
v1 = *(_DWORD **)(a1 + 8);
v2 = *(_DWORD **)a1;
if ( v1 == *(_DWORD **)a1 )
{
v3 = 0;
}
else
{
v3 = 0;
do
v3 -= (*v2++ < 0x80000000) - 1;
while ( v2 != v1 );
}
return round((double)v3 * 100.... | func0:
ENDBR64
SUB RSP,0x8
MOV RCX,qword ptr [RDI + 0x8]
MOV RAX,qword ptr [RDI]
MOV RSI,RCX
SUB RSI,RAX
SAR RSI,0x2
CMP RCX,RAX
JZ 0x001012cc
MOV EDX,0x0
LAB_0010128c:
CMP dword ptr [RAX],0x80000000
SBB EDX,-0x1
ADD RAX,0x4
CMP RAX,RCX
JNZ 0x0010128c
LAB_0010129e:
PXOR XMM0,XMM0
CVTSI2SD XMM0,EDX
MULSD XMM0,qword ptr ... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(std::vector<int, std::allocator<int> > const&) */
double func0(vector *param_1)
{
uint *puVar1;
uint *puVar2;
int iVar3;
long lVar4;
double dVar5;
puVar1 = *(uint **)(param_1 + 8);
puVar2 = *(uint **)param_1... |
2,118 | func0 | #include <iostream>
#include <vector>
#include <cassert>
#include <cmath>
| double func0(const std::vector<int>& nums) {
int n = nums.size();
int n1 = 0;
for (int x : nums) {
if (x < 0) {
n1 += 1;
}
}
return round(n1 * 100.0 / n) / 100.0;
}
| int main() {
assert(func0({0, 1, 2, -1, -5, 6, 0, -3, -2, 3, 4, 6, 8}) == 0.31);
assert(func0({2, 1, 2, -1, -5, 6, 4, -3, -2, 3, 4, 6, 8}) == 0.31);
assert(func0({2, 4, -6, -9, 11, -12, 14, -5, 17}) == 0.44);
std::cout << "All test cases passed." << std::endl;
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
sub $0x18,%rsp
mov 0x8(%rdi),%rcx
mov (%rdi),%rax
mov %rcx,%rsi
sub %rax,%rsi
sar $0x2,%rsi
cmp %rcx,%rax
je 15f0 <_Z5func0RKSt6vectorIiSaIiEE+0x70>
xor %edx,%edx
cmpl $0x80000000,(%rax)
sbb $0xffffffff,%edx
add $0x4,%rax
... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
sub rsp, 18h
mov rcx, [rdi+8]
mov rax, [rdi]
mov rsi, rcx
sub rsi, rax
sar rsi, 2
cmp rcx, rax
jz short loc_15A0
xor edx, edx
loc_1550:
cmp dword ptr [rax], 80000000h
sbb edx, 0FFFFFFFFh
add rax, 4
cmp rax, rcx
jnz short loc_1... | double func0(long long a1)
{
_DWORD *v1; // rcx
_DWORD *v2; // rax
int v3; // edx
double v4; // xmm0_8
v1 = *(_DWORD **)(a1 + 8);
v2 = *(_DWORD **)a1;
if ( v1 == *(_DWORD **)a1 )
{
v4 = 0.0;
}
else
{
v3 = 0;
do
v3 -= (*v2++ < 0x80000000) - 1;
while ( v2 != v1 );
v4 = (d... | func0:
ENDBR64
SUB RSP,0x18
MOV RCX,qword ptr [RDI + 0x8]
MOV RAX,qword ptr [RDI]
MOV RSI,RCX
SUB RSI,RAX
SAR RSI,0x2
CMP RCX,RAX
JZ 0x001015a0
XOR EDX,EDX
LAB_00101550:
CMP dword ptr [RAX],0x80000000
SBB EDX,-0x1
ADD RAX,0x4
CMP RAX,RCX
JNZ 0x00101550
PXOR XMM0,XMM0
MOVSD XMM1,qword ptr [0x00102138]
CVTSI2SD XMM0,EDX
... | /* func0(std::vector<int, std::allocator<int> > const&) */
double func0(vector *param_1)
{
uint *puVar1;
double dVar2;
uint *puVar3;
int iVar4;
long lVar5;
double dVar6;
dVar2 = DAT_00102138;
puVar1 = *(uint **)(param_1 + 8);
puVar3 = *(uint **)param_1;
lVar5 = (long)puVar1 - (long)puVar3;
if... |
2,119 | func0 | #include <iostream>
#include <vector>
#include <cassert>
#include <cmath>
| double func0(const std::vector<int>& nums) {
int n = nums.size();
int n1 = 0;
for (int x : nums) {
if (x < 0) {
n1 += 1;
}
}
return round(n1 * 100.0 / n) / 100.0;
}
| int main() {
assert(func0({0, 1, 2, -1, -5, 6, 0, -3, -2, 3, 4, 6, 8}) == 0.31);
assert(func0({2, 1, 2, -1, -5, 6, 4, -3, -2, 3, 4, 6, 8}) == 0.31);
assert(func0({2, 4, -6, -9, 11, -12, 14, -5, 17}) == 0.44);
std::cout << "All test cases passed." << std::endl;
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
sub $0x18,%rsp
mov 0x8(%rdi),%r8
mov (%rdi),%rdx
mov %r8,%rsi
sub %rdx,%rsi
sar $0x2,%rsi
cmp %r8,%rdx
je 1610 <_Z5func0RKSt6vectorIiSaIiEE+0x120>
lea -0x4(%r8),%rcx
mov %rdx,%rax
movabs $0x3ffffffffffffffc,%r9
sub %rdx,%rcx... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
sub rsp, 18h
mov r8, [rdi+8]
mov rdx, [rdi]
mov rdi, r8
sub rdi, rdx
sar rdi, 2
cmp r8, rdx
jz loc_1630
lea rcx, [r8-4]
mov rax, rdx
sub rcx, rdx
mov rsi, rcx
shr rsi, 2
add rsi, 1
cmp rcx, 8
jbe loc_163E
mov rcx, ... | double func0(const __m128i **a1)
{
const __m128i *v1; // r8
const __m128i *v2; // rdx
long long v3; // rdi
const __m128i *v4; // rax
unsigned long long v5; // rsi
__m128i v6; // xmm0
__m128i v7; // xmm3
__m128i v8; // xmm0
int v9; // eax
double v10; // xmm0_8
v1 = a1[1];
v2 = *a1;
v3 = ((cha... | func0:
ENDBR64
SUB RSP,0x18
MOV R8,qword ptr [RDI + 0x8]
MOV RDX,qword ptr [RDI]
MOV RDI,R8
SUB RDI,RDX
SAR RDI,0x2
CMP R8,RDX
JZ 0x00101630
LEA RCX,[R8 + -0x4]
MOV RAX,RDX
SUB RCX,RDX
MOV RSI,RCX
SHR RSI,0x2
ADD RSI,0x1
CMP RCX,0x8
JBE 0x0010163e
MOV RCX,RSI
PXOR XMM0,XMM0
SHR RCX,0x2
MOVDQA XMM2,XMM0
SHL RCX,0x4
ADD ... | /* func0(std::vector<int, std::allocator<int> > const&) */
double func0(vector *param_1)
{
uint *puVar1;
uint uVar2;
uint *puVar3;
uint *puVar4;
uint *puVar5;
double dVar6;
uint *puVar7;
ulong uVar8;
uint *puVar9;
ulong uVar10;
long lVar11;
int iVar12;
int iVar14;
double dVar13;
int iVar... |
2,120 | func0 |
#include <iostream>
#include <climits>
#include <cassert>
| int func0(int coins[], int m, int V) {
if (V == 0) {
return 0;
}
int res = INT_MAX;
for (int i = 0; i < m; i++) {
if (coins[i] <= V) {
int sub_res = func0(coins, m, V-coins[i]);
if (sub_res != INT_MAX && sub_res + 1 < res) {
res = sub_res ... | int main() {
int coins1[] = {9, 6, 5, 1};
int coins2[] = {4, 5, 6, 7, 8, 9};
int coins3[] = {1, 2, 3};
assert(func0(coins1, 4, 11) == 2);
assert(func0(coins2, 6, 9) == 1);
assert(func0(coins3, 3, 4) == 2);
std::cout << "All test cases passed." << std::endl;
return 0;
}
| O0 | cpp | func0(int*, int, int):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x20,%rsp
mov %rdi,-0x18(%rbp)
mov %esi,-0x1c(%rbp)
mov %edx,-0x20(%rbp)
cmpl $0x0,-0x20(%rbp)
jne 120f <_Z5func0Piii+0x26>
mov $0x0,%eax
jmpq 1295 <_Z5func0Piii+0xac>
movl $0x7fffffff,-0xc(%rbp)
movl $0x0,-0x8(%rbp)
mov -0x8(... | _Z5func0Piii:
endbr64
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_18], rdi
mov [rbp+var_1C], esi
mov [rbp+var_20], edx
cmp [rbp+var_20], 0
jnz short loc_11CF
mov eax, 0
jmp locret_1255
loc_11CF:
mov [rbp+var_C], 7FFFFFFFh
mov [rbp+var_8], 0
jmp short loc_124A
loc_1... | long long func0(int *a1, int a2, int a3)
{
int v5; // [rsp+14h] [rbp-Ch]
int i; // [rsp+18h] [rbp-8h]
int v7; // [rsp+1Ch] [rbp-4h]
if ( !a3 )
return 0LL;
v5 = 0x7FFFFFFF;
for ( i = 0; i < a2; ++i )
{
if ( a3 >= a1[i] )
{
v7 = func0(a1, a2, a3 - a1[i]);
if ( v7 != 0x7FFFFFFF && v... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x1c],ESI
MOV dword ptr [RBP + -0x20],EDX
CMP dword ptr [RBP + -0x20],0x0
JNZ 0x001011cf
MOV EAX,0x0
JMP 0x00101255
LAB_001011cf:
MOV dword ptr [RBP + -0xc],0x7fffffff
MOV dword ptr [RBP + -0x8],0x0
JMP 0x0010124a
LAB... | /* func0(int*, int, int) */
int func0(int *param_1,int param_2,int param_3)
{
int iVar1;
int local_14;
int local_10;
if (param_3 == 0) {
local_14 = 0;
}
else {
local_14 = 0x7fffffff;
for (local_10 = 0; local_10 < param_2; local_10 = local_10 + 1) {
if (((param_1[local_10] <= param_3) ... |
2,121 | func0 |
#include <iostream>
#include <climits>
#include <cassert>
| int func0(int coins[], int m, int V) {
if (V == 0) {
return 0;
}
int res = INT_MAX;
for (int i = 0; i < m; i++) {
if (coins[i] <= V) {
int sub_res = func0(coins, m, V-coins[i]);
if (sub_res != INT_MAX && sub_res + 1 < res) {
res = sub_res ... | int main() {
int coins1[] = {9, 6, 5, 1};
int coins2[] = {4, 5, 6, 7, 8, 9};
int coins3[] = {1, 2, 3};
assert(func0(coins1, 4, 11) == 2);
assert(func0(coins2, 6, 9) == 1);
assert(func0(coins3, 3, 4) == 2);
std::cout << "All test cases passed." << std::endl;
return 0;
}
| O1 | cpp | func0(int*, int, int):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x8,%rsp
mov %edx,%r14d
test %edx,%edx
je 1252 <_Z5func0Piii+0x69>
mov %rdi,%r13
mov %esi,%r12d
mov %edx,%ebp
mov $0x7fffffff,%r14d
test %esi,%esi
jle 1252 <_Z5func0Piii+0x69>
mov ... | _Z5func0Piii:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 8
mov r12d, edx
test edx, edx
jz short loc_1213
mov r14, rdi
mov r13d, esi
mov ebp, edx
mov r12d, 7FFFFFFFh
test esi, esi
jle short loc_1213
mov rbx, rdi
movsxd rax, esi
lea... | long long func0(int *a1, int a2, int a3)
{
int v3; // r12d
int *v5; // rbx
int v6; // eax
int v7; // edx
v3 = a3;
if ( a3 )
{
v3 = 0x7FFFFFFF;
if ( a2 > 0 )
{
v5 = a1;
do
{
if ( *v5 <= a3 )
{
v6 = func0(a1, a2, a3 - *v5);
v7 = v6 + 1;
... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV R12D,EDX
TEST EDX,EDX
JZ 0x00101213
MOV R14,RDI
MOV R13D,ESI
MOV EBP,EDX
MOV R12D,0x7fffffff
TEST ESI,ESI
JLE 0x00101213
MOV RBX,RDI
MOVSXD RAX,ESI
LEA R15,[RDI + RAX*0x4]
JMP 0x001011e9
LAB_001011e0:
ADD RBX,0x4
CMP RBX,R15
JZ 0x00101... | /* func0(int*, int, int) */
int func0(int *param_1,int param_2,int param_3)
{
int iVar1;
int iVar2;
int *piVar3;
int iVar4;
int iVar5;
iVar5 = param_3;
if (param_3 != 0) {
iVar4 = 0x7fffffff;
iVar5 = 0x7fffffff;
if (0 < param_2) {
piVar3 = param_1;
do {
if (*piVar3 <= ... |
2,122 | func0 |
#include <iostream>
#include <climits>
#include <cassert>
| int func0(int coins[], int m, int V) {
if (V == 0) {
return 0;
}
int res = INT_MAX;
for (int i = 0; i < m; i++) {
if (coins[i] <= V) {
int sub_res = func0(coins, m, V-coins[i]);
if (sub_res != INT_MAX && sub_res + 1 < res) {
res = sub_res ... | int main() {
int coins1[] = {9, 6, 5, 1};
int coins2[] = {4, 5, 6, 7, 8, 9};
int coins3[] = {1, 2, 3};
assert(func0(coins1, 4, 11) == 2);
assert(func0(coins2, 6, 9) == 1);
assert(func0(coins3, 3, 4) == 2);
std::cout << "All test cases passed." << std::endl;
return 0;
}
| O2 | cpp | func0(int*, int, int):
endbr64
test %edx,%edx
je 13b0 <_Z5func0Piii+0x10>
jmp 13c0 <_Z5func0Piii.part.0>
nopw 0x0(%rax,%rax,1)
xor %eax,%eax
retq
data16 nopw %cs:0x0(%rax,%rax,1)
xchg %ax,%ax
| _Z5func0Piii_part_0:
push r15
push r14
mov r14d, 7FFFFFFFh
push r13
push r12
push rbp
push rbx
sub rsp, 8
test esi, esi
jle short loc_13F9
movsxd rax, esi
mov r15, rdi
mov r12d, esi
mov ebp, edx
mov rbx, rdi
lea r13, [rdi+rax*4]
loc_13EA:
mov eax, [rbx]
cmp ... | long long func0(int *a1, int a2, int a3)
{
int v3; // r14d
int *i; // rbx
int v6; // eax
int v8; // eax
int v9; // eax
v3 = 0x7FFFFFFF;
if ( a2 > 0 )
{
for ( i = a1; i != &a1[a2]; ++i )
{
v6 = *i;
if ( *i <= a3 )
{
if ( a3 == v6 )
{
v9 = 1;
LABEL_9:
... | func0:
PUSH R15
PUSH R14
MOV R14D,0x7fffffff
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x8
TEST ESI,ESI
JLE 0x001013f9
MOVSXD RAX,ESI
MOV R15,RDI
MOV R12D,ESI
MOV EBP,EDX
MOV RBX,RDI
LEA R13,[RDI + RAX*0x4]
LAB_001013ea:
MOV EAX,dword ptr [RBX]
CMP EAX,EBP
JLE 0x00101410
LAB_001013f0:
ADD RBX,0x4
CMP RBX,R13
JNZ 0x00... | /* func0(int*, int, int) [clone .part.0] */
int func0(int *param_1,int param_2,int param_3)
{
int iVar1;
int *piVar2;
int iVar3;
iVar3 = 0x7fffffff;
if (0 < param_2) {
piVar2 = param_1;
do {
if (*piVar2 <= param_3) {
iVar1 = param_3 - *piVar2;
if (iVar1 == 0) {
iVa... |
2,123 | func0 |
#include <iostream>
#include <climits>
#include <cassert>
| int func0(int coins[], int m, int V) {
if (V == 0) {
return 0;
}
int res = INT_MAX;
for (int i = 0; i < m; i++) {
if (coins[i] <= V) {
int sub_res = func0(coins, m, V-coins[i]);
if (sub_res != INT_MAX && sub_res + 1 < res) {
res = sub_res ... | int main() {
int coins1[] = {9, 6, 5, 1};
int coins2[] = {4, 5, 6, 7, 8, 9};
int coins3[] = {1, 2, 3};
assert(func0(coins1, 4, 11) == 2);
assert(func0(coins2, 6, 9) == 1);
assert(func0(coins3, 3, 4) == 2);
std::cout << "All test cases passed." << std::endl;
return 0;
}
| O3 | cpp | func0(int*, int, int) [clone .part.0]:
push %r15
push %r14
mov $0x7fffffff,%r14d
push %r13
push %r12
push %rbp
push %rbx
sub $0x8,%rsp
test %esi,%esi
jle 13ba <_Z5func0Piii.part.0+0x3a>
lea -0x1(%rsi),%eax
mov %rdi,%r15
mov %esi,%r12d
mov %edx,%ebp
mov %rdi,%rbx
lea 0x4(%rdi,%ra... | _Z5func0Piii_part_0:
push r15
push r14
push r13
mov r13d, 7FFFFFFFh
push r12
push rbp
push rbx
sub rsp, 58h
test esi, esi
jle short loc_13FE
movsxd rax, esi
mov r12d, edx
mov r14d, r13d
mov rbx, rdi
lea rdx, [rdi+rax*4]
mov r13, rdx
loc_13EB:
mov eax, [rbx]
cmp ... | long long func0(_DWORD *a1, long long a2, int a3)
{
unsigned int v3; // r13d
int v5; // r14d
_DWORD *v6; // rbx
_DWORD *v7; // r13
int v8; // eax
int v10; // r15d
_DWORD *v11; // rbp
int v12; // r8d
int v13; // r12d
int v14; // eax
int v15; // ecx
int v16; // ecx
_DWORD *v17; // rcx
int v18... | func0:
PUSH R15
PUSH R14
PUSH R13
MOV R13D,0x7fffffff
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x58
TEST ESI,ESI
JLE 0x001013fe
MOVSXD RAX,ESI
MOV R12D,EDX
MOV R14D,R13D
MOV RBX,RDI
LEA RDX,[RDI + RAX*0x4]
MOV R13,RDX
LAB_001013eb:
MOV EAX,dword ptr [RBX]
CMP EAX,R12D
JLE 0x00101410
LAB_001013f2:
ADD RBX,0x4
CMP RBX,R13
JNZ ... | /* func0(int*, int, int) [clone .part.0] */
int func0(int *param_1,int param_2,int param_3)
{
int *piVar1;
bool bVar2;
int iVar3;
int iVar4;
int iVar5;
int *piVar6;
int *piVar7;
int iVar8;
int *piVar9;
int iVar10;
int iVar11;
int iVar12;
long lVar13;
int iVar14;
int iVar15;
int iVar16;... |
2,124 | func0 |
#include <iostream>
#include <string>
#include <algorithm>
#include <assert.h>
| bool func0(std::string str1, std::string str2) {
int n1 = str1.length();
int n2 = str2.length();
if(n1 != n2) {
return false;
}
std::sort(str1.begin(), str1.end());
std::sort(str2.begin(), str2.end());
for(int i = 0; i < n1; i++) {
if(str1[i] != str2[i]) {
... | int main() {
assert(func0("abc", "cba") == true);
assert(func0("test", "ttew") == false);
assert(func0("xxyz", "yxzx") == true);
return 0;
}
| O0 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, 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 %rsi,-0x30(%rbp)
mov -0x28(%rbp),%rax
mov %rax,... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_:
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 __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv; std::string::length(... | long long func0(long long a1, long long a2)
{
long long v3; // rbx
long long v4; // rax
long long v5; // rbx
long long v6; // rax
char v7; // bl
int i; // [rsp+14h] [rbp-1Ch]
int v9; // [rsp+18h] [rbp-18h]
v9 = std::string::length(a1);
if ( v9 != (unsigned int)std::string::length(a2) )
return 0L... | 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 0x00101260
MOV dword ptr [RBP + -0x18],EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV RDI,RAX
CALL 0x00101260
MOV dword ptr [RBP + -0x14],EAX
MOV EAX,dword ... | /* func0(std::string, std::string) */
int8 func0(ulong param_1,ulong param_2)
{
char cVar1;
int iVar2;
int iVar3;
__normal_iterator _Var4;
__normal_iterator _Var5;
int8 uVar6;
char *pcVar7;
int local_24;
iVar2 = std::string::length();
iVar3 = std::string::length();
if (iVar2 == iVar3) {
_... |
2,125 | func0 |
#include <iostream>
#include <string>
#include <algorithm>
#include <assert.h>
| bool func0(std::string str1, std::string str2) {
int n1 = str1.length();
int n2 = str2.length();
if(n1 != n2) {
return false;
}
std::sort(str1.begin(), str1.end());
std::sort(str2.begin(), str2.end());
for(int i = 0; i < n1; i++) {
if(str1[i] != str2[i]) {
... | int main() {
assert(func0("abc", "cba") == true);
assert(func0("test", "ttew") == false);
assert(func0("xxyz", "yxzx") == true);
return 0;
}
| O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %r14
push %r13
push %r12
push %rbp
push %rbx
mov 0x8(%rdi),%r12
mov $0x0,%eax
cmp %r12d,0x8(%rsi)
je 128d <_Z5func0... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_:
endbr64
push r14
push r13
push r12
push rbp
push rbx
mov r12, [rdi+8]
mov eax, 0
cmp [rsi+8], r12d
jz short loc_126D
loc_1264:
pop rbx
pop rbp
pop r12
pop r13
pop r14
retn
loc_126D:
mov rbp, rdi
mov ... | long long func0(_QWORD *a1, _QWORD *a2)
{
unsigned long long v2; // r12
long long result; // rax
long long v4; // r13
unsigned long long v5; // r14
unsigned long long v6; // rax
long long v7; // r13
unsigned long long v8; // rax
unsigned long long v9; // r14
long long i; // rax
v2 = a1[1];
resul... | func0:
ENDBR64
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV R12,qword ptr [RDI + 0x8]
MOV EAX,0x0
CMP dword ptr [RSI + 0x8],R12D
JZ 0x0010126d
LAB_00101264:
POP RBX
POP RBP
POP R12
POP R13
POP R14
RET
LAB_0010126d:
MOV RBP,RDI
MOV RBX,RSI
MOV R13,qword ptr [RDI]
LEA R14,[R13 + R12*0x1]
CMP R13,R14
JZ 0x001012ab
BSR... | /* func0(std::string, std::string) */
int8 func0(long *param_1,long *param_2,int8 param_3,_Iter_less_iter param_4)
{
long lVar1;
long lVar2;
int8 uVar3;
ulong uVar4;
_Iter_less_iter extraout_EDX;
_Iter_less_iter extraout_EDX_00;
__normal_iterator _Var5;
int iVar6;
bool bVar7;
uVar4 = param_1[1]... |
2,126 | func0 |
#include <iostream>
#include <string>
#include <algorithm>
#include <assert.h>
| bool func0(std::string str1, std::string str2) {
int n1 = str1.length();
int n2 = str2.length();
if(n1 != n2) {
return false;
}
std::sort(str1.begin(), str1.end());
std::sort(str2.begin(), str2.end());
for(int i = 0; i < n1; i++) {
if(str1[i] != str2[i]) {
... | int main() {
assert(func0("abc", "cba") == true);
assert(func0("test", "ttew") == false);
assert(func0("xxyz", "yxzx") == true);
return 0;
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %r14
push %r13
push %r12
push %rbp
push %rbx
mov 0x8(%rdi),%r12
mov 0x8(%rsi),%rax
cmp %eax,%r12d
je 1518 <_Z5func0... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_:
endbr64
push r14
push r13
push r12
push rbp
push rbx
mov r12, [rdi+8]
mov rax, [rsi+8]
cmp r12d, eax
jz short loc_1898
loc_1889:
pop rbx
xor eax, eax
pop rbp
pop r12
pop r13
pop r14
retn
loc_1898:
mo... | long long func0(_QWORD *a1, _QWORD *a2)
{
unsigned long long v2; // r12
unsigned long long v3; // rax
long long v5; // r13
unsigned long long v6; // r14
unsigned long long v7; // rdx
long long v8; // r13
unsigned long long v9; // r14
unsigned long long v10; // rdx
long long i; // rax
v2 = a1[1];
... | func0:
ENDBR64
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV R12,qword ptr [RDI + 0x8]
MOV RAX,qword ptr [RSI + 0x8]
CMP R12D,EAX
JZ 0x00101898
LAB_00101889:
POP RBX
XOR EAX,EAX
POP RBP
POP R12
POP R13
POP R14
RET
LAB_00101898:
MOV R13,qword ptr [RDI]
MOV RBP,RDI
MOV RBX,RSI
LEA R14,[R13 + R12*0x1]
CMP R13,R14
JZ 0x... | /* func0(std::string, std::string) */
int8 func0(long *param_1,long *param_2,int8 param_3,_Iter_less_iter param_4)
{
long lVar1;
long lVar2;
ulong uVar3;
ulong uVar4;
_Iter_less_iter extraout_EDX;
_Iter_less_iter extraout_EDX_00;
__normal_iterator _Var5;
int iVar6;
bool bVar7;
uVar4 = param_1[1... |
2,127 | func0 |
#include <iostream>
#include <string>
#include <algorithm>
#include <assert.h>
| bool func0(std::string str1, std::string str2) {
int n1 = str1.length();
int n2 = str2.length();
if(n1 != n2) {
return false;
}
std::sort(str1.begin(), str1.end());
std::sort(str2.begin(), str2.end());
for(int i = 0; i < n1; i++) {
if(str1[i] != str2[i]) {
... | int main() {
assert(func0("abc", "cba") == true);
assert(func0("test", "ttew") == false);
assert(func0("xxyz", "yxzx") == true);
return 0;
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x18,%rsp
mov 0x8(%rdi),%r13
mov 0x8(%rsi),%r14
cmp %r... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 18h
mov r12, [rdi+8]
mov r14, [rsi+8]
cmp r12d, r14d
jz short loc_17F0
loc_17DF:
add rsp, 18h
xor eax, eax
pop rbx
pop rbp
pop ... | long long func0(_QWORD *a1, _QWORD *a2)
{
signed long long v2; // r12
signed long long v3; // r14
_BYTE *v7; // r15
unsigned long long v8; // rdx
_BYTE *v9; // rcx
_BYTE *v10; // r13
_BYTE *v11; // r14
char v12; // r9
_BYTE *v13; // rsi
char v14; // dl
_BYTE *j; // rax
_BYTE *k; // rdi
char v... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x18
MOV R12,qword ptr [RDI + 0x8]
MOV R14,qword ptr [RSI + 0x8]
CMP R12D,R14D
JZ 0x001017f0
LAB_001017df:
ADD RSP,0x18
XOR EAX,EAX
POP RBX
POP RBP
POP R12
POP R13
POP R14
POP R15
RET
LAB_001017f0:
MOV RCX,qword ptr [RDI]
MOV RBP,RDI
MOV RBX,R... | /* func0(std::string, std::string) */
int8 func0(long *param_1,long *param_2)
{
char *pcVar1;
char cVar2;
char cVar3;
char *pcVar4;
long lVar5;
char *pcVar6;
ulong uVar7;
size_t sVar8;
char *pcVar9;
int iVar10;
char *pcVar11;
ulong uVar12;
bool bVar13;
uVar7 = param_1[1];
uVar12 = par... |
2,128 | func0 |
#include <cassert>
#include <variant>
#include <vector>
#include <string>
#include <typeinfo>
| std::vector<std::variant<int, double, std::string>> func0(
const std::vector<std::variant<int, double, std::string>>& test_tuple,
const std::type_info& data_type)
{
std::vector<std::variant<int, double, std::string>> res;
for (const auto& ele : test_tuple) {
if ((data_type == typeid(int)... | int main() {
// Test 1
std::vector<std::variant<int, double, std::string>> test1 = {4, 5, 4, 7.7, 1.2};
std::vector<std::variant<int, double, std::string>> expected1 = {7.7, 1.2};
assert(func0(test1, typeid(int)) == expected1);
// Test 2
std::vector<std::variant<int, double, std::string>... | O0 | cpp | func0(std::vector<std::variant<int, double, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::variant<int, double, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&, std::type_info const&):
endbr64
push %rbp
mov %rsp,%r... | _Z5func0RKSt6vectorISt7variantIJidNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaIS7_EERKSt9type_info:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 58h
mov [rbp+var_48], rdi
mov [rbp+var_50], rsi
mov [rbp+var_58], rdx
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
m... | long long func0(long long a1, long long a2, long long a3)
{
long long v6; // [rsp+28h] [rbp-38h] BYREF
_QWORD v7[2]; // [rsp+30h] [rbp-30h] BYREF
long long v8; // [rsp+40h] [rbp-20h]
unsigned long long v9; // [rsp+48h] [rbp-18h]
v9 = __readfsqword(0x28u);
std::vector<std::variant<int,double,std::string>>:... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x58
MOV qword ptr [RBP + -0x48],RDI
MOV qword ptr [RBP + -0x50],RSI
MOV qword ptr [RBP + -0x58],RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x48]
MOV RDI,RAX
CALL 0x00103504
MOV RAX,qword ptr [RBP + -0x50]
MO... | /* func0(std::vector<std::variant<int, double, std::string >, std::allocator<std::variant<int,
double, std::string > > > const&, std::type_info const&) */
vector * func0(vector *param_1,type_info *param_2)
{
char cVar1;
bool bVar2;
type_info *in_RDX;
long in_FS_OFFSET;
int8 local_40;
int8 local_38;
v... |
2,129 | func0 |
#include <cassert>
#include <variant>
#include <vector>
#include <string>
#include <typeinfo>
| std::vector<std::variant<int, double, std::string>> func0(
const std::vector<std::variant<int, double, std::string>>& test_tuple,
const std::type_info& data_type)
{
std::vector<std::variant<int, double, std::string>> res;
for (const auto& ele : test_tuple) {
if ((data_type == typeid(int)... | int main() {
// Test 1
std::vector<std::variant<int, double, std::string>> test1 = {4, 5, 4, 7.7, 1.2};
std::vector<std::variant<int, double, std::string>> expected1 = {7.7, 1.2};
assert(func0(test1, typeid(int)) == expected1);
// Test 2
std::vector<std::variant<int, double, std::string>... | O1 | cpp | func0(std::vector<std::variant<int, double, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::variant<int, double, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&, std::type_info const&):
endbr64
push %r15
push %r14
pu... | _Z5func0RKSt6vectorISt7variantIJidNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaIS7_EERKSt9type_info:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 18h
mov r13, rdi
mov [rsp+48h+var_40], rdx
mov qword ptr [rdi], 0
mov qword ptr [rdi+8], 0
mov ... | _QWORD * func0(_QWORD *a1, long long *a2, long long a3, int a4, int a5, int a6)
{
long long v6; // rbp
long long v7; // r15
int *v8; // rbx
long long v9; // rbx
long long v11; // [rsp+0h] [rbp-48h]
*a1 = 0LL;
a1[1] = 0LL;
a1[2] = 0LL;
v6 = *a2;
v7 = a2[1];
if ( v7 != *a2 )
{
while ( 1 )
... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x18
MOV R13,RDI
MOV qword ptr [RSP + 0x8],RDX
MOV qword ptr [RDI],0x0
MOV qword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
MOV RBP,qword ptr [RSI]
MOV R15,qword ptr [RSI + 0x8]
CMP R15,RBP
JZ 0x00101535
LEA R14,[0x103140]
JMP 0x001013... | /* func0(std::vector<std::variant<int, double, std::string >, std::allocator<std::variant<int,
double, std::string > > > const&, std::type_info const&) */
vector * func0(vector *param_1,type_info *param_2)
{
variant *pvVar1;
char *__s1;
long *plVar2;
int iVar3;
long in_RDX;
variant *pvVar4;
*(int8... |
2,130 | func0 |
#include <cassert>
#include <variant>
#include <vector>
#include <string>
#include <typeinfo>
| std::vector<std::variant<int, double, std::string>> func0(
const std::vector<std::variant<int, double, std::string>>& test_tuple,
const std::type_info& data_type)
{
std::vector<std::variant<int, double, std::string>> res;
for (const auto& ele : test_tuple) {
if ((data_type == typeid(int)... | int main() {
// Test 1
std::vector<std::variant<int, double, std::string>> test1 = {4, 5, 4, 7.7, 1.2};
std::vector<std::variant<int, double, std::string>> expected1 = {7.7, 1.2};
assert(func0(test1, typeid(int)) == expected1);
// Test 2
std::vector<std::variant<int, double, std::string>... | O2 | cpp | func0(std::vector<std::variant<int, double, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::variant<int, double, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&, std::type_info const&):
endbr64
push %r15
push %r14
pu... | _Z5func0RKSt6vectorISt7variantIJidNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaIS7_EERKSt9type_info:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
push r12
mov r12, rdi
push rbp
push rbx
sub rsp, 18h
movups xmmword ptr [rdi], xmm0
mov r13, cs:qword_4CE8
mov qword pt... | long long func0(long long a1, long long *a2, long long a3)
{
long long v3; // rbx
char v5; // al
long long v6; // rbp
char v7; // al
int *v8; // rbp
long long v10; // rdx
long long v11; // [rsp+0h] [rbp-40h]
*(_OWORD *)a1 = 0LL;
*(_QWORD *)(a1 + 16) = 0LL;
v3 = *a2;
v11 = a2[1];
if ( v11 != *a... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
PUSH R13
PUSH R12
MOV R12,RDI
PUSH RBP
PUSH RBX
SUB RSP,0x18
MOVUPS xmmword ptr [RDI],XMM0
MOV R13,qword ptr [0x00104ce8]
MOV qword ptr [RDI + 0x10],0x0
MOV RAX,qword ptr [RSI + 0x8]
MOV RBX,qword ptr [RSI]
MOV qword ptr [RSP + 0x8],RAX
CMP RAX,RBX
JZ 0x00101dbc
MOV R14,R... | /* func0(std::vector<std::variant<int, double, std::string >, std::allocator<std::variant<int,
double, std::string > > > const&, std::type_info const&) */
vector * func0(vector *param_1,type_info *param_2)
{
variant *pvVar1;
char *__s1;
int8 uVar2;
int8 uVar3;
variant vVar4;
int iVar5;
long in_RDX;
... |
2,131 | func0 |
#include <cassert>
#include <variant>
#include <vector>
#include <string>
#include <typeinfo>
| std::vector<std::variant<int, double, std::string>> func0(
const std::vector<std::variant<int, double, std::string>>& test_tuple,
const std::type_info& data_type)
{
std::vector<std::variant<int, double, std::string>> res;
for (const auto& ele : test_tuple) {
if ((data_type == typeid(int)... | int main() {
// Test 1
std::vector<std::variant<int, double, std::string>> test1 = {4, 5, 4, 7.7, 1.2};
std::vector<std::variant<int, double, std::string>> expected1 = {7.7, 1.2};
assert(func0(test1, typeid(int)) == expected1);
// Test 2
std::vector<std::variant<int, double, std::string>... | O3 | cpp | func0(std::vector<std::variant<int, double, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::variant<int, double, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&, std::type_info const&):
endbr64
push %r15
pxor %xmm0,%... | _Z5func0RKSt6vectorISt7variantIJidNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaIS7_EERKSt9type_info:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
push r12
mov r12, rdi
push rbp
push rbx
sub rsp, 38h
mov r13, cs:qword_4CE8
mov rax, fs:28h
mov [rsp+68h+var_40], ra... | long long func0(long long a1, long long **a2, long long a3)
{
long long *v4; // rbx
char v6; // al
long long *v7; // rbp
char v8; // al
int *v9; // rbp
_BYTE *v11; // rdi
long long v12; // rax
long long v13; // rdi
long long v14; // rax
long long *v15; // [rsp+0h] [rbp-60h]
size_t n; // [rsp+8h] ... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
PUSH R13
PUSH R12
MOV R12,RDI
PUSH RBP
PUSH RBX
SUB RSP,0x38
MOV R13,qword ptr [0x00104ce8]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x28],RAX
XOR EAX,EAX
MOV qword ptr [RDI + 0x10],0x0
MOVUPS xmmword ptr [RDI],XMM0
MOV RAX,qword ptr [RSI + 0x8]
MOV RBX,qword ptr ... | /* func0(std::vector<std::variant<int, double, std::string >, std::allocator<std::variant<int,
double, std::string > > > const&, std::type_info const&) */
vector * func0(vector *param_1,type_info *param_2)
{
variant *pvVar1;
char *__s1;
int *__src;
ulong __n;
int8 uVar2;
variant vVar3;
int iVar4;
u... |
2,132 | func0 |
#include <iostream>
#include <regex>
#include <cassert>
| std::pair<int, int> func0(const std::string& pattern, const std::string& text) {
std::smatch match;
std::regex_search(text, match, std::regex(pattern));
int s = match.position();
int e = s + match.length();
return {s, e};
}
| int main() {
assert(func0("python", "python programming language") == std::make_pair(0, 6));
assert(func0("programming", "python programming language") == std::make_pair(7, 18));
assert(func0("language", "python programming language") == std::make_pair(19, 27));
return 0;
}
| O0 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x78,%rsp
mov %rdi,-0x78(%rbp)
mov %rsi,-0x80(%rbp)
mov %fs:0x28,%rax
m... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 78h
mov [rbp+var_78], rdi
mov [rbp+var_80], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_60]
mov rdi, rax
call _ZNSt7__cxx1113match_... | long long func0(long long a1, long long a2)
{
long long v2; // rbx
int v4; // [rsp+18h] [rbp-68h] BYREF
int v5; // [rsp+1Ch] [rbp-64h] BYREF
_BYTE v6[32]; // [rsp+20h] [rbp-60h] BYREF
_QWORD v7[7]; // [rsp+40h] [rbp-40h] BYREF
v7[5] = __readfsqword(0x28u);
std::match_results<__gnu_cxx::__normal_iterator... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x78
MOV qword ptr [RBP + -0x78],RDI
MOV qword ptr [RBP + -0x80],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x60]
MOV RDI,RAX
CALL 0x0010631e
MOV RCX,qword ptr [RBP + -0x78]
LEA RAX,[RBP + -0x40]
MOV EDX,0x10
MOV RSI,R... | /* func0(std::string const&, std::string const&) */
int8 func0(string *param_1,string *param_2)
{
long in_FS_OFFSET;
int local_70;
int local_6c;
match_results<__normal_iterator<char_const*,std::string>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::string>>>>
local_68 [32];
int8 local_48... |
2,133 | func0 |
#include <iostream>
#include <regex>
#include <cassert>
| std::pair<int, int> func0(const std::string& pattern, const std::string& text) {
std::smatch match;
std::regex_search(text, match, std::regex(pattern));
int s = match.position();
int e = s + match.length();
return {s, e};
}
| int main() {
assert(func0("python", "python programming language") == std::make_pair(0, 6));
assert(func0("programming", "python programming language") == std::make_pair(7, 18));
assert(func0("language", "python programming language") == std::make_pair(19, 27));
return 0;
}
| O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r13
push %r12
push %rbp
push %rbx
sub $0x1f8,%rsp
mov %rsi,%rbx
mov %fs:0x28,%rax
mov %rax,0x1e8(%rsp)
... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_:
endbr64
push rbp
mov rbp, rsp
push r14
push r12
push rbx
sub rsp, 1E8h
mov r14, rdi
mov rbx, rsi
mov rax, fs:28h
mov [rbp+var_28], rax
xor eax, eax
mov [rbp+var_200], 0
mov [rbp+var_1F8], 0
mov [rbp+va... | unsigned long long func0(_QWORD *a1, _QWORD *a2)
{
long long v3; // rsi
long long v4; // r8
long long v5; // r9
long long v6; // rdx
long long v7; // rax
long long v8; // rcx
signed __int32 *v9; // rdi
volatile signed __int32 *v10; // rcx
long long v11; // rdx
signed __int32 v12; // eax
long long... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x1e8
MOV R14,RDI
MOV RBX,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
XOR EAX,EAX
MOV qword ptr [RBP + -0x200],0x0
MOV qword ptr [RBP + -0x1f8],0x0
MOV qword ptr [RBP + -0x1f0],0x0
MOV qword ptr [RBP + -0x1e8],0x0
LEA R12,[RBP + ... | /* func0(std::string const&, std::string const&) */
int8 func0(string *param_1,string *param_2)
{
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
_Sp_counted_base<(_Lock_policy)2> *p_Var2;
int iVar3;
int iVar4;
int8 *puVar5;
long in_FS_OFFSET;
int8 *local_208;
int8 *local_200;
long local_1f8;
int8 loca... |
2,134 | func0 |
#include <iostream>
#include <regex>
#include <cassert>
| std::pair<int, int> func0(const std::string& pattern, const std::string& text) {
std::smatch match;
std::regex_search(text, match, std::regex(pattern));
int s = match.position();
int e = s + match.length();
return {s, e};
}
| int main() {
assert(func0("python", "python programming language") == std::make_pair(0, 6));
assert(func0("programming", "python programming language") == std::make_pair(7, 18));
assert(func0("language", "python programming language") == std::make_pair(19, 27));
return 0;
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r14
push %r13
push %r12
mov %rsi,%r12
push %rbp
push %rbx
sub $0x1f0,%rsp
mov 0x8(%rdi),%rbx
mov (%rd... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
push r12
push rbp
mov rbp, rdi
push rbx
mov rbx, rsi
sub rsp, 2B8h
mov rax, fs:28h
mov [rsp+2E8h+var_40], rax
xor eax, eax
lea r12, [rsp+2E8h+var_280]
mo... | unsigned long long func0(long long *a1, unsigned long long *a2)
{
long long v3; // rsi
long long v4; // rdx
__m128i v5; // xmm0
volatile signed __int32 *v6; // rbp
long long v7; // rdx
volatile signed __int32 *v8; // rcx
signed __int32 v9; // eax
long long v10; // rbp
long long v11; // rdx
volatile... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
MOV RBX,RSI
SUB RSP,0x2b8
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x2a8],RAX
XOR EAX,EAX
LEA R12,[RSP + 0x68]
MOVAPS xmmword ptr [RSP + 0x40],XMM0
MOV RDI,R12
MOVAPS xmmword ptr [RSP + 0x50],XMM0
CALL 0x001036d0
MOV... | /* func0(std::string const&, std::string const&) */
ulong func0(string *param_1,string *param_2)
{
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
int8 uVar2;
void *pvVar3;
int auVar4 [16];
bool bVar5;
char cVar6;
int iVar7;
int8 *puVar8;
long lVar9;
int8 *puVar10;
void *pvVar11;
long *plVar12;
i... |
2,135 | func0 |
#include <iostream>
#include <regex>
#include <cassert>
| std::pair<int, int> func0(const std::string& pattern, const std::string& text) {
std::smatch match;
std::regex_search(text, match, std::regex(pattern));
int s = match.position();
int e = s + match.length();
return {s, e};
}
| int main() {
assert(func0("python", "python programming language") == std::make_pair(0, 6));
assert(func0("programming", "python programming language") == std::make_pair(7, 18));
assert(func0("language", "python programming language") == std::make_pair(19, 27));
return 0;
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r14
pxor %xmm0,%xmm0
push %r13
push %r12
push %rbp
push %rbx
mov %rsi,%rbx
sub $0x1f0,%rsp
mov 0x8(%rd... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_:
endbr64
push r15
pxor xmm0, xmm0
push r14
mov r14, rsi
push r13
push r12
push rbp
push rbx
mov rbx, rdi
sub rsp, 2A8h
mov rax, fs:28h
mov [rsp+2D8h+var_40], rax
xor eax, eax
lea r12, [rsp+2D8h+var_280]
mo... | unsigned long long func0(long long *a1, unsigned long long *a2)
{
long long v3; // rsi
long long v4; // rdx
__m128i v5; // xmm0
long long v6; // rdi
void *v7; // rdi
void **v8; // rbx
unsigned long long v9; // rbp
void *v10; // rdi
unsigned long long v11; // r13
unsigned long long v12; // rbx
lon... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
MOV R14,RSI
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV RBX,RDI
SUB RSP,0x2a8
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x298],RAX
XOR EAX,EAX
LEA R12,[RSP + 0x58]
MOVAPS xmmword ptr [RSP + 0x30],XMM0
MOV RDI,R12
MOVAPS xmmword ptr [RSP + 0x40],XMM0
CALL 0x00104710
MOV... | /* func0(std::string const&, std::string const&) */
ulong func0(string *param_1,string *param_2)
{
int8 uVar1;
int auVar2 [16];
bool bVar3;
char cVar4;
int iVar5;
long lVar6;
int8 *puVar7;
long lVar8;
int8 *puVar9;
ulong uVar10;
long *plVar11;
int iVar12;
long lVar13;
long lVar14;
int8 u... |
2,136 | func0 |
#include <assert.h>
| double func0(double r) {
double toporbottomarea = 3.1415 * r * r;
return toporbottomarea;
}
| int main() {
assert(func0(10) == 314.15000000000003);
assert(func0(5) == 78.53750000000001);
assert(func0(4) == 50.264);
return 0;
}
| O0 | cpp | func0(double):
endbr64
push %rbp
mov %rsp,%rbp
movsd %xmm0,-0x18(%rbp)
movsd -0x18(%rbp),%xmm1
movsd 0xf55(%rip),%xmm0
mulsd %xmm1,%xmm0
movsd -0x18(%rbp),%xmm1
mulsd %xmm1,%xmm0
movsd %xmm0,-0x8(%rbp)
movsd -0x8(%rbp),%xmm0
pop %rbp
retq
| _Z5func0d:
endbr64
push rbp
mov rbp, rsp
movsd [rbp+var_18], xmm0
movsd xmm1, [rbp+var_18]
movsd xmm0, cs:qword_2098
mulsd xmm0, xmm1
movsd xmm1, [rbp+var_18]
mulsd xmm0, xmm1
movsd [rbp+var_8], xmm0
movsd xmm0, [rbp+var_8]
pop rbp
retn | double func0(double a1)
{
return 3.1415 * a1 * a1;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOVSD qword ptr [RBP + -0x18],XMM0
MOVSD XMM1,qword ptr [RBP + -0x18]
MOVSD XMM0,qword ptr [0x00102098]
MULSD XMM0,XMM1
MOVSD XMM1,qword ptr [RBP + -0x18]
MULSD XMM0,XMM1
MOVSD qword ptr [RBP + -0x8],XMM0
MOVSD XMM0,qword ptr [RBP + -0x8]
POP RBP
RET | /* func0(double) */
double func0(double param_1)
{
return DAT_00102098 * param_1 * param_1;
} |
2,137 | func0 |
#include <assert.h>
| double func0(double r) {
double toporbottomarea = 3.1415 * r * r;
return toporbottomarea;
}
| int main() {
assert(func0(10) == 314.15000000000003);
assert(func0(5) == 78.53750000000001);
assert(func0(4) == 50.264);
return 0;
}
| O1 | cpp | func0(double):
endbr64
movapd %xmm0,%xmm1
mulsd 0xecf(%rip),%xmm0
mulsd %xmm1,%xmm0
retq
| _Z5func0d:
endbr64
movapd xmm1, xmm0
mulsd xmm0, cs:qword_2008
mulsd xmm0, xmm1
retn | double func0(double a1)
{
return a1 * 3.1415 * a1;
} | func0:
ENDBR64
MOVAPD XMM1,XMM0
MULSD XMM0,qword ptr [0x00102008]
MULSD XMM0,XMM1
RET | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(double) */
double func0(double param_1)
{
return param_1 * _DAT_00102008 * param_1;
} |
2,138 | func0 |
#include <assert.h>
| double func0(double r) {
double toporbottomarea = 3.1415 * r * r;
return toporbottomarea;
}
| int main() {
assert(func0(10) == 314.15000000000003);
assert(func0(5) == 78.53750000000001);
assert(func0(4) == 50.264);
return 0;
}
| O2 | cpp | func0(double):
endbr64
movapd %xmm0,%xmm1
movsd 0xeb8(%rip),%xmm0
mulsd %xmm1,%xmm0
mulsd %xmm1,%xmm0
retq
nopl 0x0(%rax)
| _Z5func0d:
endbr64
movapd xmm1, xmm0
movsd xmm0, cs:qword_2008
mulsd xmm0, xmm1
mulsd xmm0, xmm1
retn | double func0(double a1)
{
return 3.1415 * a1 * a1;
} | func0:
ENDBR64
MOVAPD XMM1,XMM0
MOVSD XMM0,qword ptr [0x00102008]
MULSD XMM0,XMM1
MULSD XMM0,XMM1
RET | /* func0(double) */
double func0(double param_1)
{
return DAT_00102008 * param_1 * param_1;
} |
2,139 | func0 |
#include <assert.h>
| double func0(double r) {
double toporbottomarea = 3.1415 * r * r;
return toporbottomarea;
}
| int main() {
assert(func0(10) == 314.15000000000003);
assert(func0(5) == 78.53750000000001);
assert(func0(4) == 50.264);
return 0;
}
| O3 | cpp | func0(double):
endbr64
movapd %xmm0,%xmm1
movsd 0xeb8(%rip),%xmm0
mulsd %xmm1,%xmm0
mulsd %xmm1,%xmm0
retq
nopl 0x0(%rax)
| _Z5func0d:
endbr64
movapd xmm1, xmm0
movsd xmm0, cs:qword_2008
mulsd xmm0, xmm1
mulsd xmm0, xmm1
retn | double func0(double a1)
{
return 3.1415 * a1 * a1;
} | func0:
ENDBR64
MOVAPD XMM1,XMM0
MOVSD XMM0,qword ptr [0x00102008]
MULSD XMM0,XMM1
MULSD XMM0,XMM1
RET | /* func0(double) */
double func0(double param_1)
{
return DAT_00102008 * param_1 * param_1;
} |
2,140 | func0 |
#include <vector>
#include <assert.h>
| std::vector<int> func0(std::vector<int> list, int n) {
std::vector<int> result;
for (int i = 0; i < list.size(); i += n) {
result.push_back(list[i]);
}
return result;
}
| int main() {
assert((func0({1, 2, 3, 4, 5, 6, 7, 8, 9}, 2) == std::vector<int>{1, 3, 5, 7, 9}));
assert((func0({10, 15, 19, 17, 16, 18}, 3) == std::vector<int>{10, 17}));
assert((func0({14, 16, 19, 15, 17}, 4) == std::vector<int>{14, 17}));
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> >, int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x38,%rsp
mov %rdi,-0x28(%rbp)
mov %rsi,-0x30(%rbp)
mov %edx,-0x34(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x28(%rbp),%rax
mov %rax,%rdi
callq 19ce <_ZNSt6vectorI... | _Z5func0St6vectorIiSaIiEEi:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 38h
mov [rbp+var_28], rdi
mov [rbp+var_30], rsi
mov [rbp+var_34], edx
mov rax, [rbp+var_28]
mov rdi, rax
call _ZNSt6vectorIiSaIiEEC2Ev; std::vector<int>::vector(void)
mov [rbp+var_14], 0
jmp short lo... | long long func0(long long a1, long long a2, int a3)
{
long long v3; // rax
int i; // [rsp+2Ch] [rbp-14h]
std::vector<int>::vector(a1);
for ( i = 0; i < (unsigned long long)std::vector<int>::size(a2); i += a3 )
{
v3 = std::vector<int>::operator[](a2, i);
std::vector<int>::push_back(a1, v3);
}
ret... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x38
MOV qword ptr [RBP + -0x28],RDI
MOV qword ptr [RBP + -0x30],RSI
MOV dword ptr [RBP + -0x34],EDX
MOV RAX,qword ptr [RBP + -0x28]
MOV RDI,RAX
CALL 0x00101a1a
MOV dword ptr [RBP + -0x14],0x0
JMP 0x001012c3
LAB_00101296:
MOV EAX,dword ptr [RBP + -0x14]
MOVSXD RDX,EA... | /* func0(std::vector<int, std::allocator<int> >, int) */
vector<int,std::allocator<int>> * func0(vector param_1,int param_2)
{
int *piVar1;
ulong uVar2;
int in_EDX;
int4 in_register_00000034;
int4 in_register_0000003c;
vector<int,std::allocator<int>> *this;
int4 local_1c;
this = (vector<int,std::al... |
2,141 | func0 |
#include <vector>
#include <assert.h>
| std::vector<int> func0(std::vector<int> list, int n) {
std::vector<int> result;
for (int i = 0; i < list.size(); i += n) {
result.push_back(list[i]);
}
return result;
}
| int main() {
assert((func0({1, 2, 3, 4, 5, 6, 7, 8, 9}, 2) == std::vector<int>{1, 3, 5, 7, 9}));
assert((func0({10, 15, 19, 17, 16, 18}, 3) == std::vector<int>{10, 17}));
assert((func0({14, 16, 19, 15, 17}, 4) == std::vector<int>{14, 17}));
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> >, int):
endbr64
push %r13
push %r12
push %rbp
push %rbx
sub $0x8,%rsp
mov %rdi,%rbx
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi)
movq $0x0,0x10(%rdi)
mov (%rsi),%rcx
cmp %rcx,0x8(%rsi)
je 12dc <_Z5func0St6vectorIiSaIiEEi+0x93>
mov %rsi,%r12
movslq %ed... | _Z5func0St6vectorIiSaIiEEi:
endbr64
push r13
push r12
push rbp
push rbx
sub rsp, 8
mov rbx, rdi
mov qword ptr [rdi], 0
mov qword ptr [rdi+8], 0
mov qword ptr [rdi+10h], 0
mov rcx, [rsi]
cmp [rsi+8], rcx
jz short loc_12D7
mov r12, rsi
movsxd r13, edx
mov ebp, 0
jmp ... | _QWORD * func0(_QWORD *a1, long long *a2, int a3)
{
long long v3; // rcx
long long v5; // r13
unsigned long long v6; // rbp
_DWORD *v7; // rdx
_DWORD *v8; // rsi
*a1 = 0LL;
a1[1] = 0LL;
a1[2] = 0LL;
v3 = *a2;
if ( a2[1] != *a2 )
{
v5 = a3;
v6 = 0LL;
do
{
v7 = (_DWORD *)(v3 +... | func0:
ENDBR64
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV RBX,RDI
MOV qword ptr [RDI],0x0
MOV qword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
MOV RCX,qword ptr [RSI]
CMP qword ptr [RSI + 0x8],RCX
JZ 0x001012d7
MOV R12,RSI
MOVSXD R13,EDX
MOV EBP,0x0
JMP 0x001012a7
LAB_00101287:
MOV RDI,RBX
LAB_0010128a... | /* func0(std::vector<int, std::allocator<int> >, int) */
vector<int,std::allocator<int>> * func0(vector param_1,int param_2)
{
int *piVar1;
int *piVar2;
long lVar3;
int in_EDX;
ulong uVar4;
int4 in_register_00000034;
long *plVar5;
int4 in_register_0000003c;
vector<int,std::allocator<int>> *this;
... |
2,142 | func0 |
#include <vector>
#include <assert.h>
| std::vector<int> func0(std::vector<int> list, int n) {
std::vector<int> result;
for (int i = 0; i < list.size(); i += n) {
result.push_back(list[i]);
}
return result;
}
| int main() {
assert((func0({1, 2, 3, 4, 5, 6, 7, 8, 9}, 2) == std::vector<int>{1, 3, 5, 7, 9}));
assert((func0({10, 15, 19, 17, 16, 18}, 3) == std::vector<int>{10, 17}));
assert((func0({14, 16, 19, 15, 17}, 4) == std::vector<int>{14, 17}));
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> >, int):
endbr64
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x8,%rsp
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi)
movq $0x0,0x10(%rdi)
mov (%rsi),%rcx
cmp %rcx,0x8(%rsi)
je 16d8 <_Z5func0St6vectorIiSaIiEEi+0x88>
mov %rsi,%rbp
movslq %ed... | _Z5func0St6vectorIiSaIiEEi:
endbr64
push r13
pxor xmm0, xmm0
push r12
push rbp
mov rbp, rdi
push rbx
sub rsp, 8
movups xmmword ptr [rdi], xmm0
mov rcx, [rsi]
mov qword ptr [rdi+10h], 0
cmp [rsi+8], rcx
jz short loc_1690
mov r12, rsi
movsxd r13, edx
xor ebx, ebx
xor ... | long long func0(long long a1, long long *a2, int a3)
{
long long v3; // rcx
long long v5; // r13
unsigned long long v6; // rbx
long long v7; // rax
long long v8; // rsi
long long v9; // rsi
_DWORD *v10; // rdx
*(_OWORD *)a1 = 0LL;
v3 = *a2;
*(_QWORD *)(a1 + 16) = 0LL;
if ( a2[1] != v3 )
{
... | func0:
ENDBR64
PUSH R13
PXOR XMM0,XMM0
PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
SUB RSP,0x8
MOVUPS xmmword ptr [RDI],XMM0
MOV RCX,qword ptr [RSI]
MOV qword ptr [RDI + 0x10],0x0
CMP qword ptr [RSI + 0x8],RCX
JZ 0x00101690
MOV R12,RSI
MOVSXD R13,EDX
XOR EBX,EBX
XOR EAX,EAX
XOR ESI,ESI
JMP 0x00101679
LAB_00101650:
MOV EAX,d... | /* func0(std::vector<int, std::allocator<int> >, int) */
vector<int,std::allocator<int>> * func0(vector param_1,int param_2)
{
int *piVar1;
int *piVar2;
long lVar3;
int in_EDX;
ulong uVar4;
int4 in_register_00000034;
long *plVar5;
int *piVar6;
int4 in_register_0000003c;
vector<int,std::allocator<i... |
2,143 | func0 |
#include <vector>
#include <assert.h>
| std::vector<int> func0(std::vector<int> list, int n) {
std::vector<int> result;
for (int i = 0; i < list.size(); i += n) {
result.push_back(list[i]);
}
return result;
}
| int main() {
assert((func0({1, 2, 3, 4, 5, 6, 7, 8, 9}, 2) == std::vector<int>{1, 3, 5, 7, 9}));
assert((func0({10, 15, 19, 17, 16, 18}, 3) == std::vector<int>{10, 17}));
assert((func0({14, 16, 19, 15, 17}, 4) == std::vector<int>{14, 17}));
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> >, int):
endbr64
push %r13
pxor %xmm0,%xmm0
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x8,%rsp
movq $0x0,0x10(%rdi)
movups %xmm0,(%rdi)
mov (%rsi),%rcx
cmp %rcx,0x8(%rsi)
je 1668 <_Z5func0St6vectorIiSaIiEEi+0x88>
mov %rsi,%rbp
movslq %edx,... | _Z5func0St6vectorIiSaIiEEi:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
mov r13, rsi
push r12
push rbp
mov rbp, rdi
push rbx
sub rsp, 28h
movups xmmword ptr [rdi], xmm0
mov rsi, [rsi]
mov qword ptr [rdi+10h], 0
cmp rsi, [r13+8]
jz loc_1700
movsxd r14, edx
xor ... | char ** func0(char **a1, long long *a2, int a3)
{
long long v5; // rsi
long long v6; // r14
unsigned long long v7; // rbx
char *v8; // r8
long long v9; // rcx
_DWORD *v10; // r12
signed long long v11; // r15
unsigned long long v12; // rax
unsigned long long v13; // rdx
char *v14; // r9
char *v16; ... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
PUSH R13
MOV R13,RSI
PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
SUB RSP,0x28
MOVUPS xmmword ptr [RDI],XMM0
MOV RSI,qword ptr [RSI]
MOV qword ptr [RDI + 0x10],0x0
CMP RSI,qword ptr [R13 + 0x8]
JZ 0x00101700
MOVSXD R14,EDX
XOR EBX,EBX
XOR R8D,R8D
XOR ECX,ECX
JMP 0x00101676
LAB_... | /* func0(std::vector<int, std::allocator<int> >, int) */
int (*) [16] func0(vector param_1,int param_2)
{
int4 *puVar1;
ulong uVar2;
void *__dest;
int (*pauVar3) [16];
int4 *puVar4;
int4 *puVar5;
int in_EDX;
ulong uVar6;
int4 in_register_00000034;
long *plVar7;
long lVar8;
vector vVar9;
int4... |
2,144 | func0 |
#include <iostream>
#include <set>
#include <string>
#include <assert.h>
#include <sstream>
| std::string func0(std::string str1) {
std::set<std::string> temp;
std::string word;
std::istringstream iss(str1);
while (iss >> word) {
if (temp.find(word) != temp.end()) {
return word;
} else {
temp.insert(word);
}
}
return ... | int main() {
assert(func0("ab ca bc ab") == "ab");
assert(func0("ab ca bc") == "None");
assert(func0("ab ca bc ca ab bc") == "ca");
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 $0x208,%rsp
mov %rdi,-0x208(%rbp)
mov %rsi,-0x210(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
lea -0x1f0(%rbp),%rax
mov %rax,%rdi
callq 2bd... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 218h
mov [rbp+var_218], rdi
mov [rbp+var_220], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_1F0]
mov rdi, rax
call _ZNSt3setINSt7__cxx111... | long long func0(long long a1, long long a2)
{
_QWORD *v2; // rax
long long v4; // [rsp+18h] [rbp-208h] BYREF
_QWORD v5[2]; // [rsp+20h] [rbp-200h] BYREF
_BYTE v6[48]; // [rsp+30h] [rbp-1F0h] BYREF
_BYTE v7[32]; // [rsp+60h] [rbp-1C0h] BYREF
_BYTE v8[392]; // [rsp+80h] [rbp-1A0h] BYREF
unsigned long long ... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x218
MOV qword ptr [RBP + -0x218],RDI
MOV qword ptr [RBP + -0x220],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x1f0]
MOV RDI,RAX
CALL 0x00102cfc
LEA RAX,[RBP + -0x1c0]
MOV RDI,RAX
CALL 0x00102430
MOV RCX,qword ptr [RB... | /* func0(std::string) */
string * func0(string *param_1,string *param_2)
{
char cVar1;
bool bVar2;
istream *piVar3;
long in_FS_OFFSET;
int8 local_210;
int8 local_208;
int8 *local_200;
set<std::string,std::less<std::string>,std::allocator<std::string>> local_1f8 [48];
string local_1c8 [32];
istring... |
2,145 | func0 |
#include <iostream>
#include <set>
#include <string>
#include <assert.h>
#include <sstream>
| std::string func0(std::string str1) {
std::set<std::string> temp;
std::string word;
std::istringstream iss(str1);
while (iss >> word) {
if (temp.find(word) != temp.end()) {
return word;
} else {
temp.insert(word);
}
}
return ... | int main() {
assert(func0("ab ca bc ab") == "ab");
assert(func0("ab ca bc") == "None");
assert(func0("ab ca bc ca ab bc") == "ca");
return 0;
}
| O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x1f0,%rsp
mov %rdi,%rbp
mov %rsi,%rbx
mov %fs:0x28,%rax
mov %rax,0x1e8(%rsp)
xor %eax,%eax
movl $0x0,0x18(%rsp)
movq $0x0,0x20(%rsp)
lea... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 1F0h
mov rbp, rdi
mov rbx, rsi
mov rax, fs:28h
mov [rsp+218h+var_30], rax
xor eax, eax
mov [rsp+218h+var_200], 0
mov [rsp+218h+var_1F8], 0
lea ra... | void ** func0(void **a1, long long *a2)
{
long long v3; // rdx
long long v4; // rsi
_QWORD *v5; // rax
_QWORD *v6; // rdx
unsigned int v8; // eax
unsigned long long v9; // rdi
char *v10; // rdx
char *v11; // rcx
unsigned int v12; // eax
unsigned int v13; // eax
unsigned int v14; // edx
long long... | func0:
ENDBR64
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x1f0
MOV RBP,RDI
MOV RBX,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x1e8],RAX
XOR EAX,EAX
MOV dword ptr [RSP + 0x18],0x0
MOV qword ptr [RSP + 0x20],0x0
LEA RAX,[RSP + 0x18]
MOV qword ptr [RSP + 0x28],RAX
MOV qword ptr [RSP + 0x30],RAX
MOV q... | /* func0(std::string) */
long * func0(long *param_1,int8 *param_2)
{
char *pcVar1;
int8 uVar2;
int8 uVar3;
uint uVar4;
int8 uVar5;
istream *piVar6;
ulong uVar7;
int4 *puVar8;
uint uVar9;
long lVar10;
long in_FS_OFFSET;
int auVar11 [16];
_Rb_tree<std::string,std::string,std::_Identity<std::st... |
2,146 | func0 |
#include <iostream>
#include <set>
#include <string>
#include <assert.h>
#include <sstream>
| std::string func0(std::string str1) {
std::set<std::string> temp;
std::string word;
std::istringstream iss(str1);
while (iss >> word) {
if (temp.find(word) != temp.end()) {
return word;
} else {
temp.insert(word);
}
}
return ... | int main() {
assert(func0("ab ca bc ab") == "ab");
assert(func0("ab ca bc") == "None");
assert(func0("ab ca bc ca ab bc") == "ca");
return 0;
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
mov %rsi,%rbp
push %rbx
sub $0x248,%rsp
mov %rdi,0x28(%rsp)
lea 0xb0(%rsp),%rbx
mov %fs:0x28,%rax
mov %rax,0x238(%rsp)
xor %eax,%eax
lea 0... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
push r14
push r13
push r12
push rbp
mov rbp, rsi
push rbx
sub rsp, 248h
mov [rsp+278h+var_250], rdi
lea rbx, [rsp+278h+var_1C8]
mov rax, fs:28h
mov [rsp+278h+var_40], rax
xor eax, eax
lea rax... | long long func0(long long a1, long long a2)
{
char *v2; // rbx
_BYTE *v3; // rbp
_QWORD *v4; // rax
void **p_s2; // rsi
_QWORD *v6; // rax
size_t v7; // rdx
_QWORD *v8; // r13
size_t v9; // rbx
void *v10; // r15
int *v11; // r12
size_t v12; // r14
size_t v13; // rdx
int v14; // eax
long lon... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
MOV RBP,RSI
PUSH RBX
SUB RSP,0x248
MOV qword ptr [RSP + 0x28],RDI
LEA RBX,[RSP + 0xb0]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x238],RAX
XOR EAX,EAX
LEA RAX,[RSP + 0x68]
MOV dword ptr [RSP + 0x68],0x0
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP... | |
2,147 | func0 |
#include <iostream>
#include <set>
#include <string>
#include <assert.h>
#include <sstream>
| std::string func0(std::string str1) {
std::set<std::string> temp;
std::string word;
std::istringstream iss(str1);
while (iss >> word) {
if (temp.find(word) != temp.end()) {
return word;
} else {
temp.insert(word);
}
}
return ... | int main() {
assert(func0("ab ca bc ab") == "ab");
assert(func0("ab ca bc") == "None");
assert(func0("ab ca bc ca ab bc") == "ca");
return 0;
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
mov %rsi,%rbx
sub $0x248,%rsp
mov %rdi,0x28(%rsp)
lea 0xb0(%rsp),%r14
mov %fs:0x28,%rax
mov %rax,0x238(%rsp)
xor %eax,%eax
lea 0... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
push r14
push r13
push r12
push rbp
mov rbp, rsi
push rbx
sub rsp, 248h
mov [rsp+278h+var_250], rdi
lea rbx, [rsp+278h+var_1C8]
mov rax, fs:28h
mov [rsp+278h+var_40], rax
xor eax, eax
lea rax... | long long func0(long long a1, long long a2)
{
char *v2; // rbx
_BYTE *v3; // rbp
_QWORD *v4; // rax
void **p_s2; // rsi
_QWORD *v6; // rax
size_t v7; // rdx
_QWORD *v8; // r13
size_t v9; // r15
size_t v10; // rbx
void *v11; // r15
int *v12; // r12
size_t v13; // r14
size_t v14; // rdx
int v... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
MOV RBP,RSI
PUSH RBX
SUB RSP,0x248
MOV qword ptr [RSP + 0x28],RDI
LEA RBX,[RSP + 0xb0]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x238],RAX
XOR EAX,EAX
LEA RAX,[RSP + 0x68]
MOV dword ptr [RSP + 0x68],0x0
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP... | |
2,148 | func0 |
#include <string>
#include <cassert>
#include <cctype>
| std::string func0(const std::string& str1) {
std::string result;
for(char x : str1){
if(!std::isspace(static_cast<unsigned char>(x))){
result += x;
}
}
return result;
}
| int main(){
assert(func0("python 3.0") == "python3.0");
assert(func0("bigdata") == "bigdata");
assert(func0("language") == "language");
}
| O0 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x48,%rsp
mov %rdi,-0x48(%rbp)
mov %rsi,-0x50(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x48(%rbp),%rax
mov %rax,%rdi
callq ... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 48h
mov [rbp+var_48], rdi
mov [rbp+var_50], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_48]
mov rdi, rax
call __ZNSt7__cxx1112basic_st... | long long func0(long long a1, long long a2)
{
unsigned __int8 v3; // [rsp+1Fh] [rbp-31h]
long long v4; // [rsp+20h] [rbp-30h] BYREF
_QWORD v5[4]; // [rsp+28h] [rbp-28h] BYREF
v5[2] = __readfsqword(0x28u);
std::string::basic_string(a1);
v5[1] = a2;
v4 = std::string::begin(a2);
v5[0] = std::string::end(... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RBP + -0x48],RDI
MOV qword ptr [RBP + -0x50],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x48]
MOV RDI,RAX
CALL 0x001022d0
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x20],RAX
MO... | /* func0(std::string const&) */
string * func0(string *param_1)
{
byte bVar1;
bool bVar2;
int iVar3;
byte *pbVar4;
long in_FS_OFFSET;
int8 local_38;
int8 local_30 [2];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
std::string::string(param_1);
local_38 = std::string::begin();
lo... |
2,149 | func0 |
#include <string>
#include <cassert>
#include <cctype>
| std::string func0(const std::string& str1) {
std::string result;
for(char x : str1){
if(!std::isspace(static_cast<unsigned char>(x))){
result += x;
}
}
return result;
}
| int main(){
assert(func0("python 3.0") == "python3.0");
assert(func0("bigdata") == "bigdata");
assert(func0("language") == "language");
}
| O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x18,%rsp
mov %rdi,%rbp
lea 0x10(%rdi),%rax
mov %rax,0x8(%rsp)
mov %rax,(%rdi)
movq $0x0,0x8(%rdi)
movb $0x0,0x10(%rdi)
m... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 18h
mov rbp, rdi
lea rax, [rdi+10h]
mov [rsp+48h+var_40], rax
mov [rdi], rax
mov qword ptr [rdi+8], 0
mov byte ptr [rdi+10h], 0
mov rbx... | _QWORD * func0(_QWORD *a1, unsigned __int8 **a2)
{
unsigned __int8 *v2; // rbx
unsigned __int8 *v3; // r14
unsigned long long v5; // rax
unsigned __int8 v6; // r12
long long v7; // r13
unsigned long long v8; // r15
*a1 = a1 + 2;
a1[1] = 0LL;
*((_BYTE *)a1 + 16) = 0;
v2 = *a2;
v3 = &(*a2)[(_QWORD)... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x18
MOV RBP,RDI
LEA RAX,[RDI + 0x10]
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RDI],RAX
MOV qword ptr [RDI + 0x8],0x0
MOV byte ptr [RDI + 0x10],0x0
MOV RBX,qword ptr [RSI]
MOV R14,RBX
ADD R14,qword ptr [RSI + 0x8]
CMP R14,RBX
JNZ 0x001012f... | /* func0(std::string const&) */
string * func0(string *param_1)
{
byte bVar1;
ulong uVar2;
int iVar3;
ulong uVar4;
byte *pbVar5;
int8 *in_RSI;
byte *pbVar6;
*(string **)param_1 = param_1 + 0x10;
*(int8 *)(param_1 + 8) = 0;
param_1[0x10] = (string)0x0;
pbVar5 = (byte *)*in_RSI;
pbVar6 = pbVa... |
2,150 | func0 |
#include <string>
#include <cassert>
#include <cctype>
| std::string func0(const std::string& str1) {
std::string result;
for(char x : str1){
if(!std::isspace(static_cast<unsigned char>(x))){
result += x;
}
}
return result;
}
| int main(){
assert(func0("python 3.0") == "python3.0");
assert(func0("bigdata") == "bigdata");
assert(func0("language") == "language");
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r15
lea 0x10(%rdi),%rax
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x18,%rsp
movb $0x0,0x10(%rdi)
mov %rax,(%rdi)
mov (%rsi),%rbx
movq $0x0,0x8(%rdi)
mov ... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
lea rax, [rdi+10h]
push r14
push r13
push r12
push rbp
mov rbp, rdi
push rbx
sub rsp, 18h
mov byte ptr [rdi+10h], 0
mov [rdi], rax
mov rbx, [rsi]
mov qword ptr [rdi+8], 0
mov r14, [rsi+8]
m... | _QWORD * func0(_QWORD *a1, unsigned __int8 **a2)
{
unsigned __int8 *v2; // rbx
unsigned __int8 *i; // r14
unsigned __int8 v4; // r12
long long v5; // r13
long long v6; // rax
unsigned long long v7; // r15
unsigned long long v8; // rdx
long long v9; // rax
*((_BYTE *)a1 + 16) = 0;
*a1 = a1 + 2;
v2... | func0:
ENDBR64
PUSH R15
LEA RAX,[RDI + 0x10]
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
SUB RSP,0x18
MOV byte ptr [RDI + 0x10],0x0
MOV qword ptr [RDI],RAX
MOV RBX,qword ptr [RSI]
MOV qword ptr [RDI + 0x8],0x0
MOV R14,qword ptr [RSI + 0x8]
MOV qword ptr [RSP + 0x8],RAX
ADD R14,RBX
CMP R14,RBX
JNZ 0x001014b... | /* func0(std::string const&) */
string * func0(string *param_1)
{
string sVar1;
ulong uVar2;
int iVar3;
string *psVar4;
ulong uVar5;
string *psVar6;
int8 *in_RSI;
string *psVar7;
param_1[0x10] = (string)0x0;
*(string **)param_1 = param_1 + 0x10;
psVar6 = (string *)*in_RSI;
*(int8 *)(param_1... |
2,151 | func0 |
#include <string>
#include <cassert>
#include <cctype>
| std::string func0(const std::string& str1) {
std::string result;
for(char x : str1){
if(!std::isspace(static_cast<unsigned char>(x))){
result += x;
}
}
return result;
}
| int main(){
assert(func0("python 3.0") == "python3.0");
assert(func0("bigdata") == "bigdata");
assert(func0("language") == "language");
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r15
lea 0x10(%rdi),%rax
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x18,%rsp
movb $0x0,0x10(%rdi)
mov %rax,(%rdi)
mov (%rsi),%rbx
movq $0x0,0x8(%rdi)
mov ... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
lea rax, [rdi+10h]
push r14
push r13
push r12
push rbp
mov rbp, rdi
push rbx
sub rsp, 18h
mov byte ptr [rdi+10h], 0
mov [rdi], rax
mov rbx, [rsi]
mov qword ptr [rdi+8], 0
mov r14, [rsi+8]
m... | _QWORD * func0(_QWORD *a1, unsigned __int8 **a2)
{
unsigned __int8 *v2; // rbx
unsigned __int8 *i; // r14
unsigned __int8 v4; // r12
long long v5; // r13
long long v6; // rax
unsigned long long v7; // r15
unsigned long long v8; // rdx
long long v9; // rax
*((_BYTE *)a1 + 16) = 0;
*a1 = a1 + 2;
v2... | func0:
ENDBR64
PUSH R15
LEA RAX,[RDI + 0x10]
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
SUB RSP,0x18
MOV byte ptr [RDI + 0x10],0x0
MOV qword ptr [RDI],RAX
MOV RBX,qword ptr [RSI]
MOV qword ptr [RDI + 0x8],0x0
MOV R14,qword ptr [RSI + 0x8]
MOV qword ptr [RSP + 0x8],RAX
ADD R14,RBX
CMP R14,RBX
JNZ 0x001014b... | /* func0(std::string const&) */
string * func0(string *param_1)
{
string sVar1;
ulong uVar2;
int iVar3;
string *psVar4;
ulong uVar5;
string *psVar6;
int8 *in_RSI;
string *psVar7;
param_1[0x10] = (string)0x0;
*(string **)param_1 = param_1 + 0x10;
psVar6 = (string *)*in_RSI;
*(int8 *)(param_1... |
2,152 | func0 |
#include <iostream>
#include <vector>
#include <cmath>
#include <assert.h>
| std::vector<double> func0(std::vector<int> bases_num, std::vector<int> index) {
std::vector<double> result;
for (size_t i = 0; i < bases_num.size(); i++) {
result.push_back(std::pow(bases_num[i], index[i]));
}
return result;
}
| int main() {
assert(func0({10, 20, 30, 40, 50, 60, 70, 80, 90, 100}, {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}) == std::vector<double>({10, 400, 27000, 2560000, 312500000, 46656000000, 8235430000000, 1677721600000000, 387420489000000000, 100000000000000000000.0}));
assert(func0({1, 2, 3, 4, 5, 6, 7}, {10, 20, 30, 40, 5... | O0 | cpp | func0(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >):
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),%rax
mov %... | _Z5func0St6vectorIiSaIiEES1_:
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 _ZNSt6vectorIdSaIdEEC2Ev; std::v... | long long func0(long long a1, long long a2, long long a3)
{
unsigned int v3; // ebx
unsigned int *v4; // rax
unsigned long long v5; // rax
double v8; // [rsp+28h] [rbp-28h] BYREF
unsigned long long i; // [rsp+30h] [rbp-20h]
unsigned long long v10; // [rsp+38h] [rbp-18h]
v10 = __readfsqword(0x28u);
std... | 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 0x00101f50
MOV qword ptr [RBP + -0x20],0x0
JM... | /* func0(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >) */
vector<double,std::allocator<double>> * func0(vector param_1,vector param_2)
{
int iVar1;
int *piVar2;
ulong uVar3;
vector<int,std::allocator<int>> *in_RDX;
int4 in_register_00000034;
int4 in_register_0000003c;
v... |
2,153 | func0 |
#include <iostream>
#include <vector>
#include <cmath>
#include <assert.h>
| std::vector<double> func0(std::vector<int> bases_num, std::vector<int> index) {
std::vector<double> result;
for (size_t i = 0; i < bases_num.size(); i++) {
result.push_back(std::pow(bases_num[i], index[i]));
}
return result;
}
| int main() {
assert(func0({10, 20, 30, 40, 50, 60, 70, 80, 90, 100}, {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}) == std::vector<double>({10, 400, 27000, 2560000, 312500000, 46656000000, 8235430000000, 1677721600000000, 387420489000000000, 100000000000000000000.0}));
assert(func0({1, 2, 3, 4, 5, 6, 7}, {10, 20, 30, 40, 5... | O1 | cpp | func0(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >):
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)
movq $0x0,... | _Z5func0St6vectorIiSaIiEES1_:
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, [rsi... | _QWORD * func0(_QWORD *a1, long long *a2, _QWORD *a3)
{
long long v4; // rdx
unsigned long long v6; // rbx
double v7; // xmm0_8
double *v8; // rsi
_QWORD v10[7]; // [rsp+0h] [rbp-38h] BYREF
v10[1] = __readfsqword(0x28u);
*a1 = 0LL;
a1[1] = 0LL;
a1[2] = 0LL;
v4 = *a2;
if ( *a2 != a2[1] )
{
v... | 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 0x00101365
... | /* func0(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >) */
vector<double,std::allocator<double>> * func0(vector param_1,vector param_2)
{
double *pdVar1;
long *in_RDX;
long lVar2;
ulong uVar3;
int4 in_register_00000034;
long *plVar4;
int4 in_register_0000003c;
vector<d... |
2,154 | func0 |
#include <iostream>
#include <vector>
#include <cmath>
#include <assert.h>
| std::vector<double> func0(std::vector<int> bases_num, std::vector<int> index) {
std::vector<double> result;
for (size_t i = 0; i < bases_num.size(); i++) {
result.push_back(std::pow(bases_num[i], index[i]));
}
return result;
}
| int main() {
assert(func0({10, 20, 30, 40, 50, 60, 70, 80, 90, 100}, {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}) == std::vector<double>({10, 400, 27000, 2560000, 312500000, 46656000000, 8235430000000, 1677721600000000, 387420489000000000, 100000000000000000000.0}));
assert(func0({1, 2, 3, 4, 5, 6, 7}, {10, 20, 30, 40, 5... | O2 | cpp | func0(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >):
endbr64
push %r14
push %r13
mov %rdx,%r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x10,%rsp
mov (%rsi),%rdx
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
movq $0x0,(%rdi)
movq $0x0,0x8... | _Z5func0St6vectorIiSaIiEES1_:
endbr64
push r14
pxor xmm0, xmm0
push r13
mov r13, rdx
push r12
push rbp
mov rbp, rdi
push rbx
sub rsp, 10h
mov rdx, [rsi]
mov rax, fs:28h
mov [rsp+38h+var_30], rax
xor eax, eax
mov qword ptr [rdi+10h], 0
movups xmmword ptr [rdi], xmm0
cmp... | long long func0(long long a1, long long *a2, _QWORD *a3)
{
long long v4; // rdx
unsigned long long v6; // rbx
double v7; // xmm0_8
double *v8; // rsi
_QWORD v10[7]; // [rsp+0h] [rbp-38h] BYREF
v4 = *a2;
v10[1] = __readfsqword(0x28u);
*(_QWORD *)(a1 + 16) = 0LL;
*(_OWORD *)a1 = 0LL;
if ( a2[1] != v... | func0:
MOV RDI,RBP
CALL 0x00101a50
MOV RAX,qword ptr [RSP + 0x8]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x00101220
MOV RDI,RBX
LAB_0010121b:
CALL 0x001011f0
LAB_00101220:
CALL 0x001011a0 | /* func0(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >) [clone
.cold] */
void func0(vector param_1,vector param_2,int param_3,int param_4,int param_5,
int param_6,long param_7)
{
vector<double,std::allocator<double>> *unaff_RBP;
long in_FS_OFFSET;
std::vector<dou... |
2,155 | func0 |
#include <iostream>
#include <vector>
#include <cmath>
#include <assert.h>
| std::vector<double> func0(std::vector<int> bases_num, std::vector<int> index) {
std::vector<double> result;
for (size_t i = 0; i < bases_num.size(); i++) {
result.push_back(std::pow(bases_num[i], index[i]));
}
return result;
}
| int main() {
assert(func0({10, 20, 30, 40, 50, 60, 70, 80, 90, 100}, {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}) == std::vector<double>({10, 400, 27000, 2560000, 312500000, 46656000000, 8235430000000, 1677721600000000, 387420489000000000, 100000000000000000000.0}));
assert(func0({1, 2, 3, 4, 5, 6, 7}, {10, 20, 30, 40, 5... | O3 | cpp | func0(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >):
endbr64
push %r14
pxor %xmm0,%xmm0
push %r13
mov %rdx,%r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x10,%rsp
mov (%rsi),%rdx
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
movq $0x0,0x1... | _Z5func0St6vectorIiSaIiEES1_:
endbr64
push r14
pxor xmm0, xmm0
push r13
mov r13, rdx
push r12
push rbp
mov rbp, rdi
push rbx
sub rsp, 10h
mov rdx, [rsi]
mov rax, fs:28h
mov [rsp+38h+var_30], rax
xor eax, eax
mov qword ptr [rdi+10h], 0
movups xmmword ptr [rdi], xmm0
cmp... | long long func0(long long a1, long long *a2, _QWORD *a3)
{
long long v4; // rdx
unsigned long long v6; // rbx
double v7; // xmm0_8
double *v8; // rsi
_QWORD v10[7]; // [rsp+0h] [rbp-38h] BYREF
v4 = *a2;
v10[1] = __readfsqword(0x28u);
*(_QWORD *)(a1 + 16) = 0LL;
*(_OWORD *)a1 = 0LL;
if ( a2[1] != v... | func0:
MOV RDI,RBP
CALL 0x00101a50
MOV RAX,qword ptr [RSP + 0x8]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x00101220
MOV RDI,RBX
LAB_0010121b:
CALL 0x001011f0
LAB_00101220:
CALL 0x00101190 | /* func0(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >) [clone
.cold] */
void func0(vector param_1,vector param_2,int param_3,int param_4,int param_5,
int param_6,long param_7)
{
vector<double,std::allocator<double>> *unaff_RBP;
long in_FS_OFFSET;
std::vector<dou... |
2,156 | func0 |
#include <algorithm>
#include <vector>
#include <assert.h>
| int func0(std::vector<int>& arr, int n) {
std::sort(arr.begin(), arr.end());
int count = 0;
int max_count = 0;
int min_count = n;
for (int i = 0; i < (n - 1); i++) {
if (arr[i] == arr[i + 1]) {
count += 1;
continue;
} else {
max_c... | int main() {
std::vector<int> test_vec1 = {1,1,2,2,7,8,4,5,1,4};
std::vector<int> test_vec2 = {1,7,9,2,3,3,1,3,3};
std::vector<int> test_vec3 = {1, 2, 1, 2};
assert(func0(test_vec1,10) == 2);
assert(func0(test_vec2 ,9) == 3);
assert(func0(test_vec3 ,4) == 0);
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> >&, int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x38,%rsp
mov %rdi,-0x38(%rbp)
mov %esi,-0x3c(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x38(%rbp),%rax
mov %rax,%rdi
callq 175c <_ZNSt6vectorIiSaIiEE3endEv>
mov %... | _Z5func0RSt6vectorIiSaIiEEi:
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 _ZNSt6vectorIiSaIiEE3endEv; std::vector<int>::end(void)
mov... | long long func0(long long a1, int a2)
{
long long v2; // rbx
long long v3; // rax
int v4; // ebx
int v6; // [rsp+18h] [rbp-28h] BYREF
int v7; // [rsp+1Ch] [rbp-24h] BYREF
int v8; // [rsp+20h] [rbp-20h] BYREF
int i; // [rsp+24h] [rbp-1Ch]
unsigned long long v10; // [rsp+28h] [rbp-18h]
v10 = __readfsq... | 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 0x00101752
MOV RBX,RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RDI,RAX
CALL 0x001... | /* func0(std::vector<int, std::allocator<int> >&, int) */
int func0(vector *param_1,int param_2)
{
int iVar1;
__normal_iterator _Var2;
__normal_iterator _Var3;
int *piVar4;
long in_FS_OFFSET;
int local_30;
int local_2c;
int local_28;
int local_24;
long local_20;
local_20 = *(long *)(in_FS_OFF... |
2,157 | func0 |
#include <algorithm>
#include <vector>
#include <assert.h>
| int func0(std::vector<int>& arr, int n) {
std::sort(arr.begin(), arr.end());
int count = 0;
int max_count = 0;
int min_count = n;
for (int i = 0; i < (n - 1); i++) {
if (arr[i] == arr[i + 1]) {
count += 1;
continue;
} else {
max_c... | int main() {
std::vector<int> test_vec1 = {1,1,2,2,7,8,4,5,1,4};
std::vector<int> test_vec2 = {1,7,9,2,3,3,1,3,3};
std::vector<int> test_vec3 = {1, 2, 1, 2};
assert(func0(test_vec1,10) == 2);
assert(func0(test_vec2 ,9) == 3);
assert(func0(test_vec3 ,4) == 0);
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> >&, int):
endbr64
push %r14
push %r13
push %r12
push %rbp
push %rbx
mov %rdi,%rbp
mov %esi,%ebx
mov 0x8(%rdi),%r12
mov (%rdi),%r14
cmp %r12,%r14
je 12ce <_Z5func0RSt6vectorIiSaIiEEi+0xa5>
mov %r12,%r13
sub %r14,%r13
mov %r13,%rax
sar $0... | _Z5func0RSt6vectorIiSaIiEEi:
endbr64
push r14
push r13
push r12
push rbp
push rbx
mov r13, rdi
mov ebx, esi
mov r12, [rdi+8]
mov r14, [rdi]
cmp r14, r12
jz loc_12D2
mov rbp, r12
sub rbp, r14
mov rdx, rbp
sar rdx, 2
mov eax, 40h ; '@'
jz short loc_1265
bsr... | long long func0(char **a1, int a2)
{
char *v3; // r12
char *v4; // r14
int v5; // eax
unsigned long long v6; // rax
char *v7; // rbp
int v8; // ecx
char *v9; // rax
int v10; // edx
char *v11; // rsi
char *v12; // rdx
long long v13; // rsi
int v14; // eax
int v15; // ecx
v3 = a1[1];
v4 = ... | func0:
ENDBR64
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV R13,RDI
MOV EBX,ESI
MOV R12,qword ptr [RDI + 0x8]
MOV R14,qword ptr [RDI]
CMP R14,R12
JZ 0x001012d2
MOV RBP,R12
SUB RBP,R14
MOV RDX,RBP
SAR RDX,0x2
MOV EAX,0x40
JZ 0x00101265
BSR RAX,RDX
XOR EAX,0x3f
LAB_00101265:
MOV EDX,0x3f
SUB EDX,EAX
MOVSXD RDX,EDX
AD... | /* func0(std::vector<int, std::allocator<int> >&, int) */
int func0(vector *param_1,int param_2)
{
long lVar1;
int *piVar2;
int *piVar3;
int *piVar4;
uint uVar5;
int iVar6;
_Iter_less_iter in_ECX;
int iVar7;
_Iter_less_iter extraout_EDX;
ulong uVar8;
int *piVar9;
int *piVar10;
__normal_itera... |
2,158 | func0 |
#include <algorithm>
#include <vector>
#include <assert.h>
| int func0(std::vector<int>& arr, int n) {
std::sort(arr.begin(), arr.end());
int count = 0;
int max_count = 0;
int min_count = n;
for (int i = 0; i < (n - 1); i++) {
if (arr[i] == arr[i + 1]) {
count += 1;
continue;
} else {
max_c... | int main() {
std::vector<int> test_vec1 = {1,1,2,2,7,8,4,5,1,4};
std::vector<int> test_vec2 = {1,7,9,2,3,3,1,3,3};
std::vector<int> test_vec3 = {1, 2, 1, 2};
assert(func0(test_vec1,10) == 2);
assert(func0(test_vec2 ,9) == 3);
assert(func0(test_vec3 ,4) == 0);
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> >&, int):
endbr64
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
mov 0x8(%rdi),%r13
mov %esi,%ebx
mov (%rdi),%r14
cmp %r13,%r14
je 152c <_Z5func0RSt6vectorIiSaIiEEi+0x9c>
mov %r13,%rbp
mov $0x3f,%edx
mov %r13,%rsi
mov %... | _Z5func0RSt6vectorIiSaIiEEi:
endbr64
push r14
push r13
mov r13, rdi
push r12
push rbp
push rbx
mov r12, [rdi+8]
mov ebx, esi
mov r14, [rdi]
cmp r14, r12
jz loc_1874
mov rbp, r12
mov rdx, 0FFFFFFFFFFFFFFFEh
sub rbp, r14
mov rax, rbp
sar rax, 2
jz short loc... | long long func0(char **a1, int a2)
{
char *v2; // r12
int v3; // ebx
char *v4; // r14
long long v5; // rdx
unsigned long long v6; // rax
char *v7; // rbp
int v8; // ecx
int v9; // edx
char *v10; // rax
char *v11; // rsi
long long v12; // r8
int v13; // esi
int *v14; // rcx
int v15; // edx
... | func0:
ENDBR64
PUSH R14
PUSH R13
MOV R13,RDI
PUSH R12
PUSH RBP
PUSH RBX
MOV R12,qword ptr [RDI + 0x8]
MOV EBX,ESI
MOV R14,qword ptr [RDI]
CMP R14,R12
JZ 0x00101874
MOV RBP,R12
MOV RDX,-0x2
SUB RBP,R14
MOV RAX,RBP
SAR RAX,0x2
JZ 0x00101811
BSR RAX,RAX
CDQE
LEA RDX,[RAX + RAX*0x1]
LAB_00101811:
MOV RSI,R12
MOV RDI,R14
CA... | /* func0(std::vector<int, std::allocator<int> >&, int) */
int func0(vector *param_1,int param_2)
{
int iVar1;
int *piVar2;
int *piVar3;
int iVar4;
ulong uVar5;
int *piVar6;
_Iter_less_iter in_ECX;
int *piVar7;
_Iter_less_iter extraout_EDX;
int iVar8;
uint uVar9;
int iVar10;
long lVar11;
__... |
2,159 | func0 |
#include <algorithm>
#include <vector>
#include <assert.h>
| int func0(std::vector<int>& arr, int n) {
std::sort(arr.begin(), arr.end());
int count = 0;
int max_count = 0;
int min_count = n;
for (int i = 0; i < (n - 1); i++) {
if (arr[i] == arr[i + 1]) {
count += 1;
continue;
} else {
max_c... | int main() {
std::vector<int> test_vec1 = {1,1,2,2,7,8,4,5,1,4};
std::vector<int> test_vec2 = {1,7,9,2,3,3,1,3,3};
std::vector<int> test_vec3 = {1, 2, 1, 2};
assert(func0(test_vec1,10) == 2);
assert(func0(test_vec2 ,9) == 3);
assert(func0(test_vec3 ,4) == 0);
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> >&, int):
endbr64
push %r15
mov %rdi,%r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
mov %esi,%ebx
sub $0x18,%rsp
mov 0x8(%rdi),%r13
mov (%rdi),%rbp
cmp %r13,%rbp
je 155c <_Z5func0RSt6vectorIiSaIiEEi+0x11c>
mov %r13,%r12
mov $0x3f... | _Z5func0RSt6vectorIiSaIiEEi:
endbr64
push r15
push r14
push r13
push r12
mov r12d, esi
push rbp
push rbx
sub rsp, 18h
mov r13, [rdi+8]
mov rbp, [rdi]
mov [rsp+48h+var_40], rdi
cmp rbp, r13
jz loc_180C
mov r14, r13
lea rbx, [rbp+4]
sub r14, rbp
mov rax, r14
... | long long func0(char **a1, int a2)
{
char *v3; // r13
char *v4; // rbp
char *v5; // rbx
unsigned long long v6; // rdx
char *v7; // r15
int v8; // r14d
char *v9; // rsi
int v10; // edx
char *j; // rax
int v12; // ecx
int v13; // edx
char *v14; // rax
char *v15; // rsi
int v16; // eax
long ... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
MOV R12D,ESI
PUSH RBP
PUSH RBX
SUB RSP,0x18
MOV R13,qword ptr [RDI + 0x8]
MOV RBP,qword ptr [RDI]
MOV qword ptr [RSP + 0x8],RDI
CMP RBP,R13
JZ 0x0010180c
MOV R14,R13
LEA RBX,[RBP + 0x4]
SUB R14,RBP
MOV RAX,R14
SAR RAX,0x2
JZ 0x00101875
BSR RDX,RAX
MOV RSI,R13
MOV RDI,R... | /* func0(std::vector<int, std::allocator<int> >&, int) */
int func0(vector *param_1,int param_2,int param_3,int param_4,int param_5,
int param_6,int8 param_7)
{
uint uVar1;
int iVar2;
int *piVar3;
long lVar4;
int *piVar5;
int iVar6;
ulong uVar7;
_Iter_less_iter _Var8;
int7 in_register_00000... |
2,160 | func0 |
#include <cmath>
#include <cassert>
| bool func0(int n) {
int sum = 0;
int i = 1;
while (i <= std::sqrt(n)) {
if (n % i == 0) {
if (n / i == i) {
sum += i;
} else {
sum += i;
sum += (n / i);
}
}
i++;
}
sum -= n;
... | int main() {
assert(func0(12) == true);
assert(func0(15) == false);
assert(func0(18) == true);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x20,%rsp
mov %edi,-0x14(%rbp)
movl $0x0,-0x8(%rbp)
movl $0x1,-0x4(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm1
movsd %xmm1,-0x20(%rbp)
mov -0x14(%rbp),%eax
mov %eax,%edi
callq 128f <_ZSt4sqrtIiEN9__gnu_cxx11__enable_ifIXsrSt12__is_integerIT_E7__valueEdE6__typ... | _Z5func0i:
endbr64
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_14], edi
mov [rbp+var_8], 0
mov [rbp+var_4], 1
jmp short loc_11BD
loc_1188:
mov eax, [rbp+var_14]
cdq
idiv [rbp+var_4]
mov eax, edx
test eax, eax
jnz short loc_11B9
mov eax, [rbp+var_14]
cdq
idiv [rbp+... | bool func0(signed int a1)
{
int v2; // [rsp+18h] [rbp-8h]
int i; // [rsp+1Ch] [rbp-4h]
v2 = 0;
for ( i = 1; std::sqrt<int>((unsigned int)a1) >= (double)i; ++i )
{
if ( !(a1 % i) )
{
if ( i == a1 / i )
v2 += i;
else
v2 += a1 / i + i;
}
}
return v2 - a1 > a1;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0x14],EDI
MOV dword ptr [RBP + -0x8],0x0
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001011bd
LAB_00101188:
MOV EAX,dword ptr [RBP + -0x14]
CDQ
IDIV dword ptr [RBP + -0x4]
MOV EAX,EDX
TEST EAX,EAX
JNZ 0x001011b9
MOV EAX,dword ptr [RBP + -0x14]
CDQ
IDIV dwo... | /* func0(int) */
int4 func0(int param_1)
{
double extraout_XMM0_Qa;
int4 local_10;
int4 local_c;
local_10 = 0;
local_c = 1;
while( true ) {
std::sqrt<int>(param_1);
if (extraout_XMM0_Qa < (double)local_c) break;
if (param_1 % local_c == 0) {
if (local_c == param_1 / local_c) {
... |
2,161 | func0 |
#include <cmath>
#include <cassert>
| bool func0(int n) {
int sum = 0;
int i = 1;
while (i <= std::sqrt(n)) {
if (n % i == 0) {
if (n / i == i) {
sum += i;
} else {
sum += i;
sum += (n / i);
}
}
i++;
}
sum -= n;
... | int main() {
assert(func0(12) == true);
assert(func0(15) == false);
assert(func0(18) == true);
return 0;
}
| O1 | cpp | func0(int):
endbr64
push %r12
push %rbp
push %rbx
sub $0x20,%rsp
mov %edi,%r12d
pxor %xmm6,%xmm6
cvtsi2sd %edi,%xmm6
movsd %xmm6,0x10(%rsp)
sqrtsd %xmm6,%xmm6
movsd %xmm6,0x18(%rsp)
mov $0x1,%ebx
mov $0x0,%ebp
jmp 11ac <_Z5func0i+0x43>
movsd 0x10(%rsp),%xmm0
callq 1070 <sqrt@plt>
jmp 11c6 ... | _Z5func0i:
endbr64
push r12
push rbp
push rbx
sub rsp, 10h
mov r12d, edi
mov ebx, 1
mov ebp, 0
pxor xmm4, xmm4
cvtsi2sd xmm4, edi
movsd [rsp+28h+x], xmm4
jmp short loc_1195
loc_1192:
add ebx, 1
loc_1195:
pxor xmm2, xmm2
cvtsi2sd xmm2, ebx
movsd [rsp+28h+var_28], xmm2
pxor x... | bool func0(int a1)
{
int v1; // ebx
int v2; // ebp
double v3; // xmm0_8
int v4; // edx
double x; // [rsp+8h] [rbp-20h]
v1 = 1;
v2 = 0;
x = (double)a1;
while ( 1 )
{
v3 = x < 0.0 ? sqrt(x) : sqrt(x);
if ( v3 < (double)v1 )
break;
if ( !(a1 % v1) )
{
v4 = v2 + v1;
v... | func0:
ENDBR64
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x10
MOV R12D,EDI
MOV EBX,0x1
MOV EBP,0x0
PXOR XMM4,XMM4
CVTSI2SD XMM4,EDI
MOVSD qword ptr [RSP + 0x8],XMM4
JMP 0x00101195
LAB_00101192:
ADD EBX,0x1
LAB_00101195:
PXOR XMM2,XMM2
CVTSI2SD XMM2,EBX
MOVSD qword ptr [RSP],XMM2
PXOR XMM0,XMM0
MOVSD XMM1,qword ptr [RSP + 0x8]... | /* func0(int) */
bool func0(int param_1)
{
int iVar1;
int iVar2;
int iVar3;
double dVar4;
double __x;
iVar2 = 1;
iVar3 = 0;
__x = (double)param_1;
while( true ) {
if (__x < 0.0) {
dVar4 = sqrt(__x);
}
else {
dVar4 = SQRT(__x);
}
if (dVar4 < (double)iVar2) break;
... |
2,162 | func0 |
#include <cmath>
#include <cassert>
| bool func0(int n) {
int sum = 0;
int i = 1;
while (i <= std::sqrt(n)) {
if (n % i == 0) {
if (n / i == i) {
sum += i;
} else {
sum += i;
sum += (n / i);
}
}
i++;
}
sum -= n;
... | int main() {
assert(func0(12) == true);
assert(func0(15) == false);
assert(func0(18) == true);
return 0;
}
| O2 | cpp | func0(int):
endbr64
pxor %xmm2,%xmm2
push %rbp
pxor %xmm3,%xmm3
xor %ebp,%ebp
cvtsi2sd %edi,%xmm2
push %rbx
mov $0x1,%ebx
sub $0x28,%rsp
movapd %xmm2,%xmm4
sqrtsd %xmm4,%xmm4
jmp 1257 <_Z5func0i+0x47>
nopw 0x0(%rax,%rax,1)
mov %edi,%eax
cltd
idiv %ebx
test %edx,%edx
jne 1254 <_Z5func0i+0... | _Z5func0i:
endbr64
push rbp
pxor xmm1, xmm1
xor ebp, ebp
pxor xmm3, xmm3
push rbx
cvtsi2sd xmm1, edi
mov ebx, 1
sub rsp, 28h
jmp short loc_1247
loc_1230:
mov eax, edi
cdq
idiv ebx
test edx, edx
jnz short loc_1244
add ebp, ebx
cmp eax, ebx
lea edx, [rbp+rax+0]
cmovnz... | bool func0(int a1)
{
int v1; // ebp
double v2; // xmm1_8
int i; // ebx
int v4; // eax
double v5; // xmm2_8
double v6; // xmm0_8
v1 = 0;
v2 = (double)a1;
for ( i = 1; ; ++i )
{
v5 = (double)i;
if ( v2 < 0.0 )
{
v6 = sqrt(v2);
v5 = (double)i;
}
else
{
v6 = s... | func0:
ENDBR64
PUSH RBP
PXOR XMM1,XMM1
XOR EBP,EBP
PXOR XMM3,XMM3
PUSH RBX
CVTSI2SD XMM1,EDI
MOV EBX,0x1
SUB RSP,0x28
JMP 0x00101247
LAB_00101230:
MOV EAX,EDI
CDQ
IDIV EBX
TEST EDX,EDX
JNZ 0x00101244
ADD EBP,EBX
CMP EAX,EBX
LEA EDX,[RBP + RAX*0x1]
CMOVNZ EBP,EDX
LAB_00101244:
ADD EBX,0x1
LAB_00101247:
UCOMISD XMM3,XMM1... | /* func0(int) */
bool func0(int param_1)
{
int iVar1;
int iVar2;
double dVar3;
double __x;
iVar2 = 0;
__x = (double)param_1;
iVar1 = 1;
while( true ) {
if (__x < 0.0) {
dVar3 = sqrt(__x);
}
else {
dVar3 = SQRT(__x);
}
if (dVar3 < (double)iVar1) break;
if (param_1... |
2,163 | func0 |
#include <cmath>
#include <cassert>
| bool func0(int n) {
int sum = 0;
int i = 1;
while (i <= std::sqrt(n)) {
if (n % i == 0) {
if (n / i == i) {
sum += i;
} else {
sum += i;
sum += (n / i);
}
}
i++;
}
sum -= n;
... | int main() {
assert(func0(12) == true);
assert(func0(15) == false);
assert(func0(18) == true);
return 0;
}
| O3 | cpp | func0(int):
endbr64
pxor %xmm2,%xmm2
push %rbp
pxor %xmm0,%xmm0
cvtsi2sd %edi,%xmm2
push %rbx
sub $0x28,%rsp
ucomisd %xmm2,%xmm0
movapd %xmm2,%xmm1
sqrtsd %xmm1,%xmm1
ja 127a <_Z5func0i+0x6a>
xor %ebx,%ebx
comisd 0xe52(%rip),%xmm1
mov $0x1,%ecx
jb 126c <_Z5func0i+0x5c>
nopl (%rax)
mov %edi... | _Z5func0i:
endbr64
pxor xmm1, xmm1
push r12
pxor xmm0, xmm0
cvtsi2sd xmm1, edi
push rbx
sub rsp, 18h
ucomisd xmm0, xmm1
ja short loc_127B
sqrtsd xmm1, xmm1
xor ebx, ebx
mov ecx, 1
comisd xmm1, cs:qword_2070
jb short loc_126C
nop word ptr [rax+rax+00h]
loc_1248:
mov eax, edi
c... | bool func0(int a1)
{
double v1; // xmm1_8
double v2; // xmm1_8
int v3; // ebx
int v4; // ecx
int v5; // eax
int v7; // r12d
int v8; // eax
v1 = (double)a1;
if ( (double)a1 < 0.0 )
{
v7 = 1;
v3 = 0;
while ( sqrt(v1) >= (double)v7 )
{
v8 = a1 / v7;
if ( !(a1 % v7) )
... | func0:
ENDBR64
PXOR XMM1,XMM1
PUSH R12
PXOR XMM0,XMM0
CVTSI2SD XMM1,EDI
PUSH RBX
SUB RSP,0x18
UCOMISD XMM0,XMM1
JA 0x0010127b
SQRTSD XMM1,XMM1
XOR EBX,EBX
MOV ECX,0x1
COMISD XMM1,qword ptr [0x00102070]
JC 0x0010126c
NOP word ptr [RAX + RAX*0x1]
LAB_00101248:
MOV EAX,EDI
CDQ
IDIV ECX
TEST EDX,EDX
JNZ 0x0010125b
ADD EBX,... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(int) */
bool func0(int param_1)
{
int iVar1;
int iVar2;
double dVar3;
double __x;
__x = (double)param_1;
if (__x < 0.0) {
iVar2 = 0;
for (iVar1 = 1; dVar3 = sqrt(__x), (double)iVar1 <= dVar3; iVar1 = i... |
2,164 | func0 |
#include <iostream>
#include <regex>
#include <string>
#include <assert.h>
| std::string func0(const std::string& text) {
std::regex pattern("[ ,.]");
return std::regex_replace(text, pattern, ":");
}
| int main() {
assert(func0("Boult Curve Wireless Neckband") == "Boult:Curve:Wireless:Neckband");
assert(func0("Stereo Sound Sweatproof") == "Stereo:Sound:Sweatproof");
assert(func0("Probass Curve Audio") == "Probass:Curve:Audio");
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,165 | func0 |
#include <iostream>
#include <regex>
#include <string>
#include <assert.h>
| std::string func0(const std::string& text) {
std::regex pattern("[ ,.]");
return std::regex_replace(text, pattern, ":");
}
| int main() {
assert(func0("Boult Curve Wireless Neckband") == "Boult:Curve:Wireless:Neckband");
assert(func0("Stereo Sound Sweatproof") == "Stereo:Sound:Sweatproof");
assert(func0("Probass Curve Audio") == "Probass:Curve:Audio");
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,166 | func0 |
#include <iostream>
#include <regex>
#include <string>
#include <assert.h>
| std::string func0(const std::string& text) {
std::regex pattern("[ ,.]");
return std::regex_replace(text, pattern, ":");
}
| int main() {
assert(func0("Boult Curve Wireless Neckband") == "Boult:Curve:Wireless:Neckband");
assert(func0("Stereo Sound Sweatproof") == "Stereo:Sound:Sweatproof");
assert(func0("Probass Curve Audio") == "Probass:Curve:Audio");
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,[0x11a6ac]
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,167 | func0 |
#include <iostream>
#include <regex>
#include <string>
#include <assert.h>
| std::string func0(const std::string& text) {
std::regex pattern("[ ,.]");
return std::regex_replace(text, pattern, ":");
}
| int main() {
assert(func0("Boult Curve Wireless Neckband") == "Boult:Curve:Wireless:Neckband");
assert(func0("Stereo Sound Sweatproof") == "Stereo:Sound:Sweatproof");
assert(func0("Probass Curve Audio") == "Probass:Curve:Audio");
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,168 | func0 |
#include <cassert>
| long long func0(long long num1, long long num2) {
long long number = num1 + num2;
int count = 0;
while (number > 0) {
number /= 10;
count++;
}
return count;
}
| int main() {
assert(func0(9875, 10) == 4);
assert(func0(98759853034, 100) == 11);
assert(func0(1234567, 500) == 7);
return 0;
}
| O0 | cpp | func0(long long, long long):
endbr64
push %rbp
mov %rsp,%rbp
mov %rdi,-0x18(%rbp)
mov %rsi,-0x20(%rbp)
mov -0x18(%rbp),%rdx
mov -0x20(%rbp),%rax
add %rdx,%rax
mov %rax,-0x8(%rbp)
movl $0x0,-0xc(%rbp)
cmpq $0x0,-0x8(%rbp)
jle 11a5 <_Z5func0xx+0x5c>
mov -0x8(%rbp),%rcx
movabs $0x666666666... | _Z5func0xx:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_18], rdi
mov [rbp+var_20], rsi
mov rdx, [rbp+var_18]
mov rax, [rbp+var_20]
add rax, rdx
mov [rbp+var_8], rax
mov [rbp+var_C], 0
jmp short loc_119E
loc_1171:
mov rcx, [rbp+var_8]
mov rdx, 6666666666666667h
mov rax, ... | long long func0(long long a1, long long a2)
{
int v3; // [rsp+14h] [rbp-Ch]
long long v4; // [rsp+18h] [rbp-8h]
v4 = a1 + a2;
v3 = 0;
while ( v4 > 0 )
{
v4 /= 10LL;
++v3;
}
return v3;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x18],RDI
MOV qword ptr [RBP + -0x20],RSI
MOV RDX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,RDX
MOV qword ptr [RBP + -0x8],RAX
MOV dword ptr [RBP + -0xc],0x0
JMP 0x0010119e
LAB_00101171:
MOV RCX,qword ptr [RBP + -0x8]
MOV RDX,0x666666666666... | /* func0(long long, long long) */
long func0(longlong param_1,longlong param_2)
{
int4 local_14;
int8 local_10;
local_14 = 0;
for (local_10 = param_2 + param_1; 0 < local_10; local_10 = local_10 / 10) {
local_14 = local_14 + 1;
}
return (long)local_14;
} |
2,169 | func0 |
#include <cassert>
| long long func0(long long num1, long long num2) {
long long number = num1 + num2;
int count = 0;
while (number > 0) {
number /= 10;
count++;
}
return count;
}
| int main() {
assert(func0(9875, 10) == 4);
assert(func0(98759853034, 100) == 11);
assert(func0(1234567, 500) == 7);
return 0;
}
| O1 | cpp | func0(long long, long long):
endbr64
add %rdi,%rsi
test %rsi,%rsi
jle 1168 <_Z5func0xx+0x3f>
mov $0x0,%ecx
movabs $0x6666666666666667,%r8
mov %rsi,%rdi
mov %rsi,%rax
imul %r8
sar $0x2,%rdx
sar $0x3f,%rsi
sub %rsi,%rdx
mov %rdx,%rsi
add $0x1,%ecx
cmp $0x9,%rdi
jg 1144 <_Z5func0xx... | _Z5func0xx:
endbr64
add rdi, rsi
test rdi, rdi
jle short loc_116B
mov ecx, 0
mov r8, 6666666666666667h
loc_1144:
mov rsi, rdi
mov rax, rdi
imul r8
sar rdx, 2
mov rax, rdi
sar rax, 3Fh
sub rdx, rax
mov rdi, rdx
add ecx, 1
cmp rsi, 9
jg short loc_1144
loc_116... | long long func0(long long a1, long long a2)
{
long long v2; // rdi
int v3; // ecx
long long v4; // rsi
v2 = a2 + a1;
if ( v2 <= 0 )
{
return 0;
}
else
{
v3 = 0;
do
{
v4 = v2;
v2 /= 10LL;
++v3;
}
while ( v4 > 9 );
}
return v3;
} | func0:
ENDBR64
ADD RDI,RSI
TEST RDI,RDI
JLE 0x0010116b
MOV ECX,0x0
MOV R8,0x6666666666666667
LAB_00101144:
MOV RSI,RDI
MOV RAX,RDI
IMUL R8
SAR RDX,0x2
MOV RAX,RDI
SAR RAX,0x3f
SUB RDX,RAX
MOV RDI,RDX
ADD ECX,0x1
CMP RSI,0x9
JG 0x00101144
LAB_00101167:
MOVSXD RAX,ECX
RET
LAB_0010116b:
MOV ECX,0x0
JMP 0x00101167 | /* func0(long long, long long) */
long func0(longlong param_1,longlong param_2)
{
bool bVar1;
int iVar2;
long lVar3;
if (param_1 + param_2 < 1) {
iVar2 = 0;
}
else {
iVar2 = 0;
lVar3 = param_1 + param_2;
do {
iVar2 = iVar2 + 1;
bVar1 = 9 < lVar3;
lVar3 = lVar3 / 10;
... |
2,170 | func0 |
#include <cassert>
| long long func0(long long num1, long long num2) {
long long number = num1 + num2;
int count = 0;
while (number > 0) {
number /= 10;
count++;
}
return count;
}
| int main() {
assert(func0(9875, 10) == 4);
assert(func0(98759853034, 100) == 11);
assert(func0(1234567, 500) == 7);
return 0;
}
| O2 | cpp | func0(long long, long long):
endbr64
lea (%rdi,%rsi,1),%rdx
test %rdx,%rdx
jle 1180 <_Z5func0xx+0x40>
movabs $0xcccccccccccccccd,%rdi
xor %esi,%esi
nopl 0x0(%rax)
mov %rdx,%rax
mov %rdx,%rcx
add $0x1,%esi
mul %rdi
shr $0x3,%rdx
cmp $0x9,%rcx
jg 1160 <_Z5func0xx+0x20>
movslq %esi,%rax
... | _Z5func0xx:
endbr64
lea rdx, [rdi+rsi]
test rdx, rdx
jle short loc_1180
mov rdi, 0CCCCCCCCCCCCCCCDh
xor esi, esi
nop dword ptr [rax+00000000h]
loc_1160:
mov rax, rdx
mov rcx, rdx
add esi, 1
mul rdi
shr rdx, 3
cmp rcx, 9
jg short loc_1160
movsxd rax, esi
retn
loc_1180... | long long func0(long long a1, long long a2)
{
unsigned long long v2; // rdx
int v3; // esi
long long v4; // rcx
v2 = a1 + a2;
if ( a1 + a2 <= 0 )
return 0LL;
v3 = 0;
do
{
v4 = v2;
++v3;
v2 /= 0xAuLL;
}
while ( v4 > 9 );
return v3;
} | func0:
ENDBR64
LEA RDX,[RDI + RSI*0x1]
TEST RDX,RDX
JLE 0x00101180
MOV RDI,-0x3333333333333333
XOR ESI,ESI
NOP dword ptr [RAX]
LAB_00101160:
MOV RAX,RDX
MOV RCX,RDX
ADD ESI,0x1
MUL RDI
SHR RDX,0x3
CMP RCX,0x9
JG 0x00101160
MOVSXD RAX,ESI
RET
LAB_00101180:
XOR EAX,EAX
RET | /* func0(long long, long long) */
long func0(longlong param_1,longlong param_2)
{
bool bVar1;
ulong uVar2;
int iVar3;
if (0 < param_1 + param_2) {
iVar3 = 0;
uVar2 = param_1 + param_2;
do {
iVar3 = iVar3 + 1;
bVar1 = 9 < (long)uVar2;
uVar2 = uVar2 / 10;
} while (bVar1);
... |
2,171 | func0 |
#include <cassert>
| long long func0(long long num1, long long num2) {
long long number = num1 + num2;
int count = 0;
while (number > 0) {
number /= 10;
count++;
}
return count;
}
| int main() {
assert(func0(9875, 10) == 4);
assert(func0(98759853034, 100) == 11);
assert(func0(1234567, 500) == 7);
return 0;
}
| O3 | cpp | func0(long long, long long):
endbr64
lea (%rdi,%rsi,1),%rdx
test %rdx,%rdx
jle 1180 <_Z5func0xx+0x40>
movabs $0xcccccccccccccccd,%rdi
xor %esi,%esi
nopl 0x0(%rax)
mov %rdx,%rax
mov %rdx,%rcx
add $0x1,%esi
mul %rdi
shr $0x3,%rdx
cmp $0x9,%rcx
jg 1160 <_Z5func0xx+0x20>
movslq %esi,%rax
... | _Z5func0xx:
endbr64
lea rdx, [rdi+rsi]
test rdx, rdx
jle short loc_1180
mov rdi, 0CCCCCCCCCCCCCCCDh
xor esi, esi
nop dword ptr [rax+00000000h]
loc_1160:
mov rax, rdx
mov rcx, rdx
add esi, 1
mul rdi
shr rdx, 3
cmp rcx, 9
jg short loc_1160
movsxd rax, esi
retn
loc_1180... | long long func0(long long a1, long long a2)
{
unsigned long long v2; // rdx
int v3; // esi
long long v4; // rcx
v2 = a1 + a2;
if ( a1 + a2 <= 0 )
return 0LL;
v3 = 0;
do
{
v4 = v2;
++v3;
v2 /= 0xAuLL;
}
while ( v4 > 9 );
return v3;
} | func0:
ENDBR64
LEA RDX,[RDI + RSI*0x1]
TEST RDX,RDX
JLE 0x00101180
MOV RDI,-0x3333333333333333
XOR ESI,ESI
NOP dword ptr [RAX]
LAB_00101160:
MOV RAX,RDX
MOV RCX,RDX
ADD ESI,0x1
MUL RDI
SHR RDX,0x3
CMP RCX,0x9
JG 0x00101160
MOVSXD RAX,ESI
RET
LAB_00101180:
XOR EAX,EAX
RET | /* func0(long long, long long) */
long func0(longlong param_1,longlong param_2)
{
bool bVar1;
ulong uVar2;
int iVar3;
if (0 < param_1 + param_2) {
iVar3 = 0;
uVar2 = param_1 + param_2;
do {
iVar3 = iVar3 + 1;
bVar1 = 9 < (long)uVar2;
uVar2 = uVar2 / 10;
} while (bVar1);
... |
2,172 | func0 |
#include <iostream>
#include <vector>
#include <string>
#include <sstream>
#include <assert.h>
| std::string func0(const std::vector<std::vector<std::string>>& test_list) {
std::stringstream ss;
bool first = true;
for (const auto& tup : test_list) {
for (const auto& idx : tup) {
if (!first) {
ss << " ";
}
ss << idx;
first ... | int main() {
assert(func0({{"1", "4", "6"}, {"5", "8"}, {"2", "9"}, {"1", "10"}}) == "1 4 6 5 8 2 9 1 10");
assert(func0({{"2", "3", "4"}, {"6", "9"}, {"3", "2"}, {"2", "11"}}) == "2 3 4 6 9 3 2 2 11");
assert(func0({{"14", "21", "9"}, {"24", "19"}, {"12", "29"}, {"23", "17"}}) == "14 21 9 24 19 12 29 23... | O0 | cpp | func0(std::vector<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::allocator<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, s... | _Z5func0RKSt6vectorIS_INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EESaIS7_EE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 1F8h
mov [rbp+var_1F8], rdi
mov [rbp+var_200], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_1A0]
mov rdi, rax... | long long func0(long long a1, long long a2)
{
char v3; // [rsp+1Fh] [rbp-1E1h]
long long v4; // [rsp+20h] [rbp-1E0h] BYREF
long long v5; // [rsp+28h] [rbp-1D8h] BYREF
long long v6; // [rsp+30h] [rbp-1D0h] BYREF
_QWORD v7[2]; // [rsp+38h] [rbp-1C8h] BYREF
long long v8; // [rsp+48h] [rbp-1B8h]
long long v9... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x1f8
MOV qword ptr [RBP + -0x1f8],RDI
MOV qword ptr [RBP + -0x200],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x1a0]
MOV RDI,RAX
LAB_00102560:
CALL 0x001022e0
MOV byte ptr [RBP + -0x1e1],0x1
MOV RAX,qword ptr [RBP + -... | /* func0(std::vector<std::vector<std::string, std::allocator<std::string > >,
std::allocator<std::vector<std::string, std::allocator<std::string > > > > const&) */
vector * func0(vector *param_1)
{
bool bVar1;
bool bVar2;
vector<std::vector<std::string,std::allocator<std::string>>,std::allocator<std::vector<... |
2,173 | func0 |
#include <iostream>
#include <vector>
#include <string>
#include <sstream>
#include <assert.h>
| std::string func0(const std::vector<std::vector<std::string>>& test_list) {
std::stringstream ss;
bool first = true;
for (const auto& tup : test_list) {
for (const auto& idx : tup) {
if (!first) {
ss << " ";
}
ss << idx;
first ... | int main() {
assert(func0({{"1", "4", "6"}, {"5", "8"}, {"2", "9"}, {"1", "10"}}) == "1 4 6 5 8 2 9 1 10");
assert(func0({{"2", "3", "4"}, {"6", "9"}, {"3", "2"}, {"2", "11"}}) == "2 3 4 6 9 3 2 2 11");
assert(func0({{"14", "21", "9"}, {"24", "19"}, {"12", "29"}, {"23", "17"}}) == "14 21 9 24 19 12 29 23... | O1 | cpp | func0(std::vector<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::allocator<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, s... | _Z5func0RKSt6vectorIS_INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EESaIS7_EE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 198h
mov r15, rdi
mov rbx, rsi
mov rax, fs:28h
mov [rsp+var_s188], rax
xor eax, eax
mov rbp, rsp
lea rdi, ... | long long func0(long long a1, long long a2)
{
_QWORD *v2; // r12
_QWORD *v3; // r14
char v4; // al
_QWORD *v5; // rbx
_QWORD *v6; // rbp
unsigned long long v7; // r8
int *vars0; // [rsp+0h] [rbp+0h] BYREF
long long vars8; // [rsp+8h] [rbp+8h]
int *vars10; // [rsp+10h] [rbp+10h] BYREF
_QWORD vars18[... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x198
MOV R15,RDI
MOV RBX,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x188],RAX
XOR EAX,EAX
MOV RBP,RSP
LEA RDI,[RSP + 0x80]
CALL 0x001021f0
LEA RAX,[0x105af0]
MOV qword ptr [RSP + 0x80],RAX
MOV qword ptr [RSP + 0x158],0x0
MOV byte p... | /* func0(std::vector<std::vector<std::string, std::allocator<std::string > >,
std::allocator<std::vector<std::string, std::allocator<std::string > > > > const&) */
vector * func0(vector *param_1)
{
int8 *puVar1;
int8 *puVar2;
bool bVar3;
int8 *puVar4;
long *in_RSI;
int8 *puVar5;
long in_FS_OFFSET;
... |
2,174 | func0 |
#include <iostream>
#include <vector>
#include <string>
#include <sstream>
#include <assert.h>
| std::string func0(const std::vector<std::vector<std::string>>& test_list) {
std::stringstream ss;
bool first = true;
for (const auto& tup : test_list) {
for (const auto& idx : tup) {
if (!first) {
ss << " ";
}
ss << idx;
first ... | int main() {
assert(func0({{"1", "4", "6"}, {"5", "8"}, {"2", "9"}, {"1", "10"}}) == "1 4 6 5 8 2 9 1 10");
assert(func0({{"2", "3", "4"}, {"6", "9"}, {"3", "2"}, {"2", "11"}}) == "2 3 4 6 9 3 2 2 11");
assert(func0({{"14", "21", "9"}, {"24", "19"}, {"12", "29"}, {"23", "17"}}) == "14 21 9 24 19 12 29 23... | O2 | cpp | func0(std::vector<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::allocator<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, s... | _Z5func0RKSt6vectorIS_INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EESaIS7_EE:
endbr64
push r15
push r14
push r13
push r12
lea r12, unk_5C58
push rbp
movq xmm3, r12
push rbx
mov rbx, rsi
sub rsp, 1D8h
mov [rsp+208h+var_1F8], rdi
lea r15, [rsp+208h+var_148]
lea ... | long long func0(long long a1, long long a2)
{
_QWORD *v2; // rdi
__m128i si128; // xmm2
_QWORD *v4; // r13
_QWORD *v5; // r15
char v6; // al
_QWORD *v7; // rbx
_QWORD *v8; // r12
long long v9; // rdi
unsigned long long v10; // r8
long long v11; // rax
unsigned long long v12; // rdx
__m128i v13;... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
LEA R12,[0x105c58]
PUSH RBP
MOVQ XMM3,R12
PUSH RBX
MOV RBX,RSI
SUB RSP,0x1d8
MOV qword ptr [RSP + 0x10],RDI
LEA R15,[RSP + 0xc0]
LEA R14,[RSP + 0x40]
MOV RDI,R15
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x1c8],RAX
LEA RAX,[0x105c10]
MOV qword ptr [RSP + 0x38],R... | /* func0(std::vector<std::vector<std::string, std::allocator<std::string > >,
std::allocator<std::vector<std::string, std::allocator<std::string > > > > const&) */
vector * func0(vector *param_1)
{
long *plVar1;
int8 *puVar2;
bool bVar3;
pointer_____offset_0x10___ puVar4;
int8 *puVar5;
long *in_RSI;
... |
2,175 | func0 |
#include <iostream>
#include <vector>
#include <string>
#include <sstream>
#include <assert.h>
| std::string func0(const std::vector<std::vector<std::string>>& test_list) {
std::stringstream ss;
bool first = true;
for (const auto& tup : test_list) {
for (const auto& idx : tup) {
if (!first) {
ss << " ";
}
ss << idx;
first ... | int main() {
assert(func0({{"1", "4", "6"}, {"5", "8"}, {"2", "9"}, {"1", "10"}}) == "1 4 6 5 8 2 9 1 10");
assert(func0({{"2", "3", "4"}, {"6", "9"}, {"3", "2"}, {"2", "11"}}) == "2 3 4 6 9 3 2 2 11");
assert(func0({{"14", "21", "9"}, {"24", "19"}, {"12", "29"}, {"23", "17"}}) == "14 21 9 24 19 12 29 23... | O3 | cpp | func0(std::vector<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::allocator<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, s... | _Z5func0RKSt6vectorIS_INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EESaIS7_EE:
endbr64
push r15
push r14
push r13
push r12
lea r12, unk_5C58
push rbp
movq xmm3, r12
push rbx
mov rbx, rsi
sub rsp, 1D8h
mov [rsp+208h+var_208], rdi
lea r15, [rsp+208h+var_148]
lea ... | long long func0(long long a1, long long a2)
{
_QWORD *v2; // rdi
__m128i si128; // xmm2
_QWORD *v4; // r13
_QWORD *v5; // r15
char v6; // al
_QWORD *v7; // rbx
_QWORD *v8; // r12
unsigned long long v9; // r8
unsigned long long v10; // rdx
__m128i v11; // xmm4
std::locale *v14[2]; // [rsp+10h] [rb... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
LEA R12,[0x105c58]
PUSH RBP
MOVQ XMM3,R12
PUSH RBX
MOV RBX,RSI
SUB RSP,0x1d8
MOV qword ptr [RSP],RDI
LEA R15,[RSP + 0xc0]
LEA R14,[RSP + 0x40]
MOV RDI,R15
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x1c8],RAX
LEA RAX,[0x105c10]
MOV qword ptr [RSP + 0x38],R14
MOV ... | /* func0(std::vector<std::vector<std::string, std::allocator<std::string > >,
std::allocator<std::vector<std::string, std::allocator<std::string > > > > const&) */
vector * func0(vector *param_1)
{
long *plVar1;
int8 *puVar2;
bool bVar3;
pointer_____offset_0x10___ puVar4;
int8 *puVar5;
long *in_RSI;
... |
2,176 | func0 |
#include <assert.h>
int take_L_and_F_set_bits(int n) {
n = n | n >> 1;
n = n | n >> 2;
n = n | n >> 4;
n = n | n >> 8;
n = n | n >> 16;
return ((n + 1) >> 1) + 1;
}
| int func0(int n) {
if (n == 1) {
return 0;
}
return n ^ take_L_and_F_set_bits(n);
}
| int main() {
assert(func0(10) == 3);
assert(func0(15) == 6);
assert(func0(20) == 5);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x8,%rsp
mov %edi,-0x4(%rbp)
cmpl $0x1,-0x4(%rbp)
jne 11a9 <_Z5func0i+0x1c>
mov $0x0,%eax
jmp 11b6 <_Z5func0i+0x29>
mov -0x4(%rbp),%eax
mov %eax,%edi
callq 1149 <_Z21take_L_and_F_set_bitsi>
xor -0x4(%rbp),%eax
leaveq
retq
| _Z5func0i:
endbr64
push rbp
mov rbp, rsp
sub rsp, 8
mov [rbp+var_4], edi
cmp [rbp+var_4], 1
jnz short loc_11A9
mov eax, 0
jmp short locret_11B6
loc_11A9:
mov eax, [rbp+var_4]
mov edi, eax; int
call _Z21take_L_and_F_set_bitsi; take_L_and_F_set_bits(int)
xor eax, [rbp+var_4]
... | long long func0(int a1)
{
if ( a1 == 1 )
return 0LL;
else
return a1 ^ (unsigned int)take_L_and_F_set_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 0x001011a9
MOV EAX,0x0
JMP 0x001011b6
LAB_001011a9:
MOV EAX,dword ptr [RBP + -0x4]
MOV EDI,EAX
CALL 0x00101149
XOR EAX,dword ptr [RBP + -0x4]
LAB_001011b6:
LEAVE
RET | /* func0(int) */
uint func0(int param_1)
{
uint uVar1;
if (param_1 == 1) {
uVar1 = 0;
}
else {
uVar1 = take_L_and_F_set_bits(param_1);
uVar1 = uVar1 ^ param_1;
}
return uVar1;
} |
2,177 | func0 |
#include <assert.h>
int take_L_and_F_set_bits(int n) {
n = n | n >> 1;
n = n | n >> 2;
n = n | n >> 4;
n = n | n >> 8;
n = n | n >> 16;
return ((n + 1) >> 1) + 1;
}
| int func0(int n) {
if (n == 1) {
return 0;
}
return n ^ take_L_and_F_set_bits(n);
}
| int main() {
assert(func0(10) == 3);
assert(func0(15) == 6);
assert(func0(20) == 5);
return 0;
}
| O1 | cpp | func0(int):
endbr64
mov $0x0,%eax
cmp $0x1,%edi
je 1192 <_Z5func0i+0x1a>
push %rbx
mov %edi,%ebx
callq 1149 <_Z21take_L_and_F_set_bitsi>
xor %ebx,%eax
pop %rbx
retq
retq
| _Z5func0i:
endbr64
mov eax, 0
cmp edi, 1
jz short locret_1192
push rbx
mov ebx, edi
call _Z21take_L_and_F_set_bitsi; take_L_and_F_set_bits(int)
xor eax, ebx
pop rbx
retn
locret_1192:
retn | long long func0(int a1)
{
long long result; // rax
result = 0LL;
if ( a1 != 1 )
return a1 ^ (unsigned int)take_L_and_F_set_bits(a1);
return result;
} | func0:
ENDBR64
MOV EAX,0x0
CMP EDI,0x1
JZ 0x00101192
PUSH RBX
MOV EBX,EDI
CALL 0x00101149
XOR EAX,EBX
POP RBX
RET
LAB_00101192:
RET | /* func0(int) */
uint func0(int param_1)
{
uint uVar1;
if (param_1 != 1) {
uVar1 = take_L_and_F_set_bits(param_1);
return uVar1 ^ param_1;
}
return 0;
} |
2,178 | func0 |
#include <assert.h>
int take_L_and_F_set_bits(int n) {
n = n | n >> 1;
n = n | n >> 2;
n = n | n >> 4;
n = n | n >> 8;
n = n | n >> 16;
return ((n + 1) >> 1) + 1;
}
| int func0(int n) {
if (n == 1) {
return 0;
}
return n ^ take_L_and_F_set_bits(n);
}
| int main() {
assert(func0(10) == 3);
assert(func0(15) == 6);
assert(func0(20) == 5);
return 0;
}
| O2 | cpp | func0(int):
endbr64
xor %eax,%eax
cmp $0x1,%edi
je 11a7 <_Z5func0i+0x37>
mov %edi,%eax
sar %eax
or %edi,%eax
mov %eax,%edx
sar $0x2,%edx
or %edx,%eax
mov %eax,%edx
sar $0x4,%edx
or %edx,%eax
mov %eax,%edx
sar $0x8,%edx
or %edx,%eax
mov %eax,%edx
sar $0x10,%edx
or ... | _Z5func0i:
endbr64
xor eax, eax
cmp edi, 1
jz short locret_11A7
mov eax, edi
sar eax, 1
or eax, edi
mov edx, eax
sar edx, 2
or eax, edx
mov edx, eax
sar edx, 4
or eax, edx
mov edx, eax
sar edx, 8
or eax, edx
mov edx, eax
sar edx, 10h
or eax, ... | long long func0(int a1)
{
long long result; // rax
result = 0LL;
if ( a1 != 1 )
return a1 ^ (unsigned int)((((((((((((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
XOR EAX,EAX
CMP EDI,0x1
JZ 0x001011a7
MOV EAX,EDI
SAR EAX,0x1
OR EAX,EDI
MOV EDX,EAX
SAR EDX,0x2
OR EAX,EDX
MOV EDX,EAX
SAR EDX,0x4
OR EAX,EDX
MOV EDX,EAX
SAR EDX,0x8
OR EAX,EDX
MOV EDX,EAX
SAR EDX,0x10
OR EAX,EDX
ADD EAX,0x1
SAR EAX,0x1
ADD EAX,0x1
XOR EAX,EDI
LAB_001011a7:
RET | /* func0(int) */
uint func0(int param_1)
{
uint uVar1;
uVar1 = 0;
if (param_1 != 1) {
uVar1 = param_1 >> 1 | param_1;
uVar1 = uVar1 | (int)uVar1 >> 2;
uVar1 = uVar1 | (int)uVar1 >> 4;
uVar1 = uVar1 | (int)uVar1 >> 8;
uVar1 = ((int)((uVar1 | (int)uVar1 >> 0x10) + 1) >> 1) + 1U ^ param_1;
... |
2,179 | func0 |
#include <assert.h>
int take_L_and_F_set_bits(int n) {
n = n | n >> 1;
n = n | n >> 2;
n = n | n >> 4;
n = n | n >> 8;
n = n | n >> 16;
return ((n + 1) >> 1) + 1;
}
| int func0(int n) {
if (n == 1) {
return 0;
}
return n ^ take_L_and_F_set_bits(n);
}
| int main() {
assert(func0(10) == 3);
assert(func0(15) == 6);
assert(func0(20) == 5);
return 0;
}
| O3 | cpp | func0(int):
endbr64
xor %eax,%eax
cmp $0x1,%edi
je 11a7 <_Z5func0i+0x37>
mov %edi,%eax
sar %eax
or %edi,%eax
mov %eax,%edx
sar $0x2,%edx
or %edx,%eax
mov %eax,%edx
sar $0x4,%edx
or %edx,%eax
mov %eax,%edx
sar $0x8,%edx
or %edx,%eax
mov %eax,%edx
sar $0x10,%edx
or ... | _Z5func0i:
endbr64
xor eax, eax
cmp edi, 1
jz short locret_11A7
mov eax, edi
sar eax, 1
or eax, edi
mov edx, eax
sar edx, 2
or eax, edx
mov edx, eax
sar edx, 4
or eax, edx
mov edx, eax
sar edx, 8
or eax, edx
mov edx, eax
sar edx, 10h
or eax, ... | long long func0(int a1)
{
long long result; // rax
result = 0LL;
if ( a1 != 1 )
return a1 ^ (unsigned int)((((((((((((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
XOR EAX,EAX
CMP EDI,0x1
JZ 0x001011a7
MOV EAX,EDI
SAR EAX,0x1
OR EAX,EDI
MOV EDX,EAX
SAR EDX,0x2
OR EAX,EDX
MOV EDX,EAX
SAR EDX,0x4
OR EAX,EDX
MOV EDX,EAX
SAR EDX,0x8
OR EAX,EDX
MOV EDX,EAX
SAR EDX,0x10
OR EAX,EDX
ADD EAX,0x1
SAR EAX,0x1
ADD EAX,0x1
XOR EAX,EDI
LAB_001011a7:
RET | /* func0(int) */
uint func0(int param_1)
{
uint uVar1;
uVar1 = 0;
if (param_1 != 1) {
uVar1 = param_1 >> 1 | param_1;
uVar1 = uVar1 | (int)uVar1 >> 2;
uVar1 = uVar1 | (int)uVar1 >> 4;
uVar1 = uVar1 | (int)uVar1 >> 8;
uVar1 = ((int)((uVar1 | (int)uVar1 >> 0x10) + 1) >> 1) + 1U ^ param_1;
... |
2,180 | func0 |
#include <cassert>
#include <string>
| int func0(std::string string, char char_to_find) {
int flag = -1;
for (int i = 0; i < string.length(); i++) {
if (string[i] == char_to_find) {
flag = i;
}
}
if (flag == -1) {
return -1; // Use -1 to represent None in Python
} else {
return flag... | int main() {
assert(func0("hello world", 'l') == 10);
assert(func0("language", 'g') == 7);
assert(func0("little", 'y') == -1); // -1 represents None in Python
return 0;
}
| O0 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x28,%rsp
mov %rdi,-0x28(%rbp)
mov %esi,%eax
mov %al,-0x2c(%rbp)
movl $0xffffffff,-0x18(%rbp)
movl $0x0,-0x14(%rbp)
mov -0x14(%rbp),%eax
movslq %eax,%rbx... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEc:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 28h
mov [rbp+var_28], rdi
mov eax, esi
mov [rbp+var_2C], al
mov [rbp+var_18], 0FFFFFFFFh
mov [rbp+var_14], 0
jmp short loc_139B
loc_136F:
mov eax, [rbp+var_14]
movsxd ... | long long func0(long long a1, char a2)
{
int v3; // [rsp+18h] [rbp-18h]
int i; // [rsp+1Ch] [rbp-14h]
v3 = -1;
for ( i = 0; i < (unsigned long long)std::string::length(a1); ++i )
{
if ( a2 == *(_BYTE *)std::string::operator[](a1, i) )
v3 = i;
}
if ( v3 == -1 )
return 0xFFFFFFFFLL;
else
... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x28
MOV qword ptr [RBP + -0x28],RDI
MOV EAX,ESI
MOV byte ptr [RBP + -0x2c],AL
MOV dword ptr [RBP + -0x18],0xffffffff
MOV dword ptr [RBP + -0x14],0x0
JMP 0x0010139b
LAB_0010136f:
MOV EAX,dword ptr [RBP + -0x14]
MOVSXD RDX,EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RSI,R... | /* func0(std::string, char) */
int func0(ulong param_1,char param_2)
{
char *pcVar1;
ulong uVar2;
int4 local_20;
int4 local_1c;
local_20 = -1;
local_1c = 0;
while( true ) {
uVar2 = std::string::length();
if (uVar2 <= (ulong)(long)local_1c) break;
pcVar1 = (char *)std::string::operator[](p... |
2,181 | func0 |
#include <cassert>
#include <string>
| int func0(std::string string, char char_to_find) {
int flag = -1;
for (int i = 0; i < string.length(); i++) {
if (string[i] == char_to_find) {
flag = i;
}
}
if (flag == -1) {
return -1; // Use -1 to represent None in Python
} else {
return flag... | int main() {
assert(func0("hello world", 'l') == 10);
assert(func0("language", 'g') == 7);
assert(func0("little", 'y') == -1); // -1 represents None in Python
return 0;
}
| O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char):
endbr64
mov 0x8(%rdi),%rcx
test %rcx,%rcx
je 121e <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEc+0x35>
mov (%rdi),%rdi
mov $0x0,%eax
mov $0xffffffff,%edx
cmp %sil,(%rdi,%rax,1)
cmove %eax,... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEc:
endbr64
mov rcx, [rdi+8]
test rcx, rcx
jz short loc_123E
mov rdi, [rdi]
mov eax, 0
mov edx, 0FFFFFFFFh
loc_1223:
cmp [rdi+rax], sil
cmovz edx, eax
add rax, 1
cmp rcx, rax
jnz short loc_1223
cmp edx, 0FFFFFFFFh
j... | long long func0(long long *a1, char a2)
{
long long v2; // rcx
long long v3; // rdi
long long v4; // rax
unsigned int v5; // edx
v2 = a1[1];
if ( v2 )
{
v3 = *a1;
v4 = 0LL;
v5 = -1;
do
{
if ( *(_BYTE *)(v3 + v4) == a2 )
v5 = v4;
++v4;
}
while ( v2 != v4 );... | func0:
ENDBR64
MOV RCX,qword ptr [RDI + 0x8]
TEST RCX,RCX
JZ 0x0010123e
MOV RDI,qword ptr [RDI]
MOV EAX,0x0
MOV EDX,0xffffffff
LAB_00101223:
CMP byte ptr [RDI + RAX*0x1],SIL
CMOVZ EDX,EAX
ADD RAX,0x1
CMP RCX,RAX
JNZ 0x00101223
CMP EDX,-0x1
JZ 0x0010123b
ADD EDX,0x1
LAB_0010123b:
MOV EAX,EDX
RET
LAB_0010123e:
MOV EDX,0x... | /* func0(std::string, char) */
ulong func0(long *param_1,char param_2)
{
ulong uVar1;
ulong uVar2;
if (param_1[1] == 0) {
uVar2 = 0xffffffff;
}
else {
uVar1 = 0;
uVar2 = 0xffffffff;
do {
if (*(char *)(*param_1 + uVar1) == param_2) {
uVar2 = uVar1 & 0xffffffff;
}
... |
Subsets and Splits
C++ Functions With Standard Library Dependencies
Identifies C++ functions that depend on standard library components, revealing patterns in how developers utilize STL libraries and potentially highlighting common coding practices or dependencies in the dataset.
C++ Standard Library Function Analysis
Filters C++ code examples that use standard library containers and types, providing useful insights into common programming patterns and data structures in the dataset.
Random Training Function Samples
Performs basic filtering and random sampling of assembly code data without revealing meaningful patterns or relationships.
Random Training Function Samples
Retrieves a random sample of 1000 records from the training dataset, providing basic data exploration but offering limited analytical value beyond seeing raw entries.