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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
3,482 | func0 |
#include <iostream>
#include <string>
#include <assert.h>
| bool func0(std::string string1, std::string string2) {
int size1 = string1.length();
int size2 = string2.length();
std::string temp;
if (size1 != size2) {
return false;
}
temp = string1 + string1;
if (temp.find(string2) != std::string::npos) {
return true;
... | int main() {
assert(func0("abc", "cba") == false);
assert(func0("abcd", "cdba") == false);
assert(func0("abacd", "cdaba") == 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 %r15
push %r14
xor %r14d,%r14d
push %r13
push %r12
push %rbp
push %rbx
sub $0x78,%rsp
mov 0x8(%rdi),%r12
mov %fs:0... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_:
endbr64
push r15
push r14
push r13
push r12
xor r12d, r12d
push rbp
push rbx
sub rsp, 58h
mov rbp, [rdi+8]
mov rax, fs:28h
mov [rsp+88h+var_40], rax
xor eax, eax
lea r13, [rsp+88h+var_80+8]
mov byte ptr [r... | long long func0(long long *a1, long long a2)
{
double *v2; // r12
size_t v3; // rbp
long long v5; // r15
double *v6; // rdi
size_t v7; // rdx
__m128 v8; // xmm0
double v9; // rdx
void *dest; // [rsp+0h] [rbp-88h] BYREF
__m128 v11; // [rsp+8h] [rbp-80h] BYREF
void *v12; // [rsp+20h] [rbp-68h] BYREF
... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
XOR R12D,R12D
PUSH RBP
PUSH RBX
SUB RSP,0x58
MOV RBP,qword ptr [RDI + 0x8]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x48],RAX
XOR EAX,EAX
LEA R13,[RSP + 0x10]
MOV byte ptr [RSP + 0x10],0x0
MOV qword ptr [RSP],R13
MOV qword ptr [RSP + 0x8],0x0
CMP dword ptr [RSI... | /* func0(std::string, std::string) */
ulong func0(ulong *param_1,ulong *param_2)
{
ulong *puVar1;
long lVar2;
ulong uVar3;
ulong uVar4;
long in_FS_OFFSET;
ulong *local_88;
size_t local_80;
ulong auStack_78 [2];
ulong *local_68;
size_t local_60;
ulong local_58 [3];
long local_40;
uVar4 = 0... |
3,483 | func0 |
#include <iostream>
#include <string>
#include <assert.h>
| bool func0(std::string string1, std::string string2) {
int size1 = string1.length();
int size2 = string2.length();
std::string temp;
if (size1 != size2) {
return false;
}
temp = string1 + string1;
if (temp.find(string2) != std::string::npos) {
return true;
... | int main() {
assert(func0("abc", "cba") == false);
assert(func0("abcd", "cdba") == false);
assert(func0("abacd", "cdaba") == 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
xor %r14d,%r14d
push %r13
push %r12
push %rbp
push %rbx
sub $0x78,%rsp
mov 0x8(%rdi),%r12
mov %fs:0... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_:
endbr64
push r15
push r14
push r13
push r12
xor r12d, r12d
push rbp
push rbx
sub rsp, 58h
mov rbp, [rdi+8]
mov rax, fs:28h
mov [rsp+88h+var_40], rax
xor eax, eax
lea r13, [rsp+88h+var_80+8]
mov byte ptr [r... | long long func0(long long *a1, long long a2)
{
double *v2; // r12
size_t v3; // rbp
long long v5; // r15
double *v6; // rdi
size_t v7; // rdx
__m128 v8; // xmm0
double v9; // rdx
void *dest; // [rsp+0h] [rbp-88h] BYREF
__m128 v11; // [rsp+8h] [rbp-80h] BYREF
void *v12; // [rsp+20h] [rbp-68h] BYREF
... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
XOR R12D,R12D
PUSH RBP
PUSH RBX
SUB RSP,0x58
MOV RBP,qword ptr [RDI + 0x8]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x48],RAX
XOR EAX,EAX
LEA R13,[RSP + 0x10]
MOV byte ptr [RSP + 0x10],0x0
MOV qword ptr [RSP],R13
MOV qword ptr [RSP + 0x8],0x0
CMP dword ptr [RSI... | /* func0(std::string, std::string) */
ulong func0(ulong *param_1,ulong *param_2)
{
ulong *puVar1;
long lVar2;
ulong uVar3;
ulong uVar4;
long in_FS_OFFSET;
ulong *local_88;
size_t local_80;
ulong auStack_78 [2];
ulong *local_68;
size_t local_60;
ulong local_58 [3];
long local_40;
uVar4 = 0... |
3,484 | func0 |
#include <iostream>
#include <vector>
#include <algorithm>
#include <assert.h>
template<typename T>
| bool func0(const std::vector<std::vector<T>>& list1, const std::vector<std::vector<T>>& list2) {
for (const auto& sublist : list2) {
if (std::find(list1.begin(), list1.end(), sublist) == list1.end()) {
return false;
}
}
return true;
}
| int main() {
std::vector<std::vector<int>> list1_1 = {{1, 3}, {5, 7}, {9, 11}, {13, 15, 17}};
std::vector<std::vector<int>> list2_1 = {{1, 3}, {13, 15, 17}};
assert(func0<int>(list1_1, list2_1) == true);
std::vector<std::vector<int>> list1_2 = {{1, 2}, {2, 3}, {3, 4}, {5, 6}};
std::vector<std... | O0 | cpp | bool func0<int>(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x58,%rsp
... | _Z5func0IiEbRKSt6vectorIS0_IT_SaIS1_EESaIS3_EES7_:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 58h
mov [rbp+var_58], rdi
mov [rbp+var_60], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_60]
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
mov rd... | long long func0<int>(long long a1, long long a2)
{
long long v2; // rbx
long long v3; // rax
long long v5; // [rsp+18h] [rbp-48h] BYREF
long long v6; // [rsp+20h] [rbp-40h] BYREF
long long v7; // [rsp+28h] [rbp-38h] BYREF
_QWORD v8[2]; // [rsp+30h] [rbp-30h] BYREF
long long v9; // [rsp+40h] [rbp-20h]
u... | func0<int>:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x58
MOV qword ptr [RBP + -0x58],RDI
MOV qword ptr [RBP + -0x60],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RDI,RAX
CALL 0x00102c... | /* bool func0<int>(std::vector<std::vector<int, std::allocator<int> >,
std::allocator<std::vector<int, std::allocator<int> > > > const&, std::vector<std::vector<int,
std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&) */
bool func0<int>(vector *param_1,vector *param_2)
{
b... |
3,485 | func0 |
#include <iostream>
#include <vector>
#include <algorithm>
#include <assert.h>
template<typename T>
| bool func0(const std::vector<std::vector<T>>& list1, const std::vector<std::vector<T>>& list2) {
for (const auto& sublist : list2) {
if (std::find(list1.begin(), list1.end(), sublist) == list1.end()) {
return false;
}
}
return true;
}
| int main() {
std::vector<std::vector<int>> list1_1 = {{1, 3}, {5, 7}, {9, 11}, {13, 15, 17}};
std::vector<std::vector<int>> list2_1 = {{1, 3}, {13, 15, 17}};
assert(func0<int>(list1_1, list2_1) == true);
std::vector<std::vector<int>> list1_2 = {{1, 2}, {2, 3}, {3, 4}, {5, 6}};
std::vector<std... | O1 | cpp | bool func0<int>(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&):
endbr64
push %r13
push %r12
push %rbp
push %rbx
sub $0x8... | _Z5func0IiEbRKSt6vectorIS0_IT_SaIS1_EESaIS3_EES7_:
endbr64
push r13
push r12
push rbp
push rbx
sub rsp, 8
mov r12, rdi
mov rbx, [rsi]
mov r13, [rsi+8]
cmp r13, rbx
jz short loc_21E4
loc_21BB:
mov rbp, [r12+8]
mov rdi, [r12]
mov rdx, rbx
mov rsi, rbp
call _ZSt9__fi... | long long func0<int>(_QWORD *a1, long long *a2)
{
long long v2; // rbx
long long v3; // r13
long long v4; // rbp
v2 = *a2;
v3 = a2[1];
if ( v3 == *a2 )
return 1LL;
while ( 1 )
{
v4 = a1[1];
if ( v4 == std::__find_if<__gnu_cxx::__normal_iterator<std::vector<int> const*,std::vector<std::vect... | func0<int>:
ENDBR64
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV R12,RDI
MOV RBX,qword ptr [RSI]
MOV R13,qword ptr [RSI + 0x8]
CMP R13,RBX
JZ 0x001021e4
LAB_001021bb:
MOV RBP,qword ptr [R12 + 0x8]
MOV RDI,qword ptr [R12]
MOV RDX,RBX
MOV RSI,RBP
CALL 0x00101f83
CMP RBP,RAX
JZ 0x001021eb
ADD RBX,0x18
CMP R13,RBX
J... | /* bool func0<int>(std::vector<std::vector<int, std::allocator<int> >,
std::allocator<std::vector<int, std::allocator<int> > > > const&, std::vector<std::vector<int,
std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&) */
bool func0<int>(vector *param_1,vector *param_2)
{
l... |
3,486 | func0 |
#include <iostream>
#include <vector>
#include <algorithm>
#include <assert.h>
template<typename T>
| bool func0(const std::vector<std::vector<T>>& list1, const std::vector<std::vector<T>>& list2) {
for (const auto& sublist : list2) {
if (std::find(list1.begin(), list1.end(), sublist) == list1.end()) {
return false;
}
}
return true;
}
| int main() {
std::vector<std::vector<int>> list1_1 = {{1, 3}, {5, 7}, {9, 11}, {13, 15, 17}};
std::vector<std::vector<int>> list2_1 = {{1, 3}, {13, 15, 17}};
assert(func0<int>(list1_1, list2_1) == true);
std::vector<std::vector<int>> list1_2 = {{1, 2}, {2, 3}, {3, 4}, {5, 6}};
std::vector<std... | O2 | cpp | bool func0<int>(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&):
endbr64
push %r13
push %r12
push %rbp
push %rbx
sub $0x8... | _Z5func0IiEbRKSt6vectorIS0_IT_SaIS1_EESaIS3_EES7_:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 58h
mov r13, [rsi]
mov rdx, [rsi+8]
cmp rdx, r13
jz loc_2012
mov r11, [rdi+8]
mov rcx, [rdi]
mov [rsp+88h+var_78], rdx
mov rax, 0AAAAAAAAAAAAAA... | long long func0<int>(long long *a1, long long *a2)
{
long long v2; // r13
long long v3; // r12
const void *v4; // rbp
long long v5; // r14
size_t v6; // rbx
const void *v7; // rdi
size_t v8; // rdx
const void *v9; // rdi
size_t v10; // rdx
const void *v11; // rdi
size_t v12; // rdx
long long v1... | func0<int>:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x58
MOV R13,qword ptr [RSI]
MOV RDX,qword ptr [RSI + 0x8]
CMP RDX,R13
JZ 0x00102012
MOV R11,qword ptr [RDI + 0x8]
MOV RCX,qword ptr [RDI]
MOV qword ptr [RSP + 0x10],RDX
MOV RAX,-0x5555555555555555
MOV RSI,R11
LEA R9,[RCX + 0x48]
MOV qwor... | /* bool func0<int>(std::vector<std::vector<int, std::allocator<int> >,
std::allocator<std::vector<int, std::allocator<int> > > > const&, std::vector<std::vector<int,
std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&) */
bool func0<int>(vector *param_1,vector *param_2)
{
l... |
3,487 | func0 |
#include <iostream>
#include <vector>
#include <algorithm>
#include <assert.h>
template<typename T>
| bool func0(const std::vector<std::vector<T>>& list1, const std::vector<std::vector<T>>& list2) {
for (const auto& sublist : list2) {
if (std::find(list1.begin(), list1.end(), sublist) == list1.end()) {
return false;
}
}
return true;
}
| int main() {
std::vector<std::vector<int>> list1_1 = {{1, 3}, {5, 7}, {9, 11}, {13, 15, 17}};
std::vector<std::vector<int>> list2_1 = {{1, 3}, {13, 15, 17}};
assert(func0<int>(list1_1, list2_1) == true);
std::vector<std::vector<int>> list1_2 = {{1, 2}, {2, 3}, {3, 4}, {5, 6}};
std::vector<std... | O3 | cpp | bool func0<int>(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&):
endbr64
push %r13
push %r12
push %rbp
push %rbx
sub $0x8... | _Z5func0IiEbRKSt6vectorIS0_IT_SaIS1_EESaIS3_EES7_:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 58h
mov r13, [rsi]
mov rdx, [rsi+8]
cmp rdx, r13
jz loc_207F
mov r14, [rdi+8]
mov rcx, [rdi]
mov [rsp+88h+var_78], rdx
mov rax, 0AAAAAAAAAAAAAA... | long long func0<int>(long long *a1, long long *a2)
{
long long v2; // r13
const void *v3; // r14
long long v4; // rbp
size_t v5; // rbx
const void *v6; // rdi
size_t v7; // rdx
const void *v8; // rdi
size_t v9; // rdx
const void *v10; // rdi
size_t v11; // rdx
const void *v12; // rdi
long long ... | func0<int>:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x58
MOV R13,qword ptr [RSI]
MOV RDX,qword ptr [RSI + 0x8]
CMP RDX,R13
JZ 0x0010207f
MOV R14,qword ptr [RDI + 0x8]
MOV RCX,qword ptr [RDI]
MOV qword ptr [RSP + 0x10],RDX
MOV RAX,-0x5555555555555555
MOV RSI,R14
LEA R9,[RCX + 0x48]
MOV qwor... | /* bool func0<int>(std::vector<std::vector<int, std::allocator<int> >,
std::allocator<std::vector<int, std::allocator<int> > > > const&, std::vector<std::vector<int,
std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&) */
bool func0<int>(vector *param_1,vector *param_2)
{
l... |
3,488 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int n) {
if (n == 1 || n == 2) {
return 1;
} else {
return (func0(n - 1) + func0(n - 2));
}
}
| int main() {
assert(func0(7) == 13);
assert(func0(8) == 21);
assert(func0(9) == 34);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x18,%rsp
mov %edi,-0x14(%rbp)
cmpl $0x1,-0x14(%rbp)
je 11a5 <_Z5func0i+0x1c>
cmpl $0x2,-0x14(%rbp)
jne 11ac <_Z5func0i+0x23>
mov $0x1,%eax
jmp 11ca <_Z5func0i+0x41>
mov -0x14(%rbp),%eax
sub $0x1,%eax
mov %eax,%edi
callq ... | _Z5func0i:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 18h
mov [rbp+var_14], edi
cmp [rbp+var_14], 1
jz short loc_1165
cmp [rbp+var_14], 2
jnz short loc_116C
loc_1165:
mov eax, 1
jmp short loc_118A
loc_116C:
mov eax, [rbp+var_14]
sub eax, 1
mov edi, eax; int
ca... | long long func0(int a1)
{
int v2; // ebx
if ( a1 == 1 || a1 == 2 )
return 1LL;
v2 = func0(a1 - 1);
return v2 + (unsigned int)func0(a1 - 2);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x18
MOV dword ptr [RBP + -0x14],EDI
CMP dword ptr [RBP + -0x14],0x1
JZ 0x00101165
CMP dword ptr [RBP + -0x14],0x2
JNZ 0x0010116c
LAB_00101165:
MOV EAX,0x1
JMP 0x0010118a
LAB_0010116c:
MOV EAX,dword ptr [RBP + -0x14]
SUB EAX,0x1
MOV EDI,EAX
CALL 0x00101149
MOV EBX,EA... | /* func0(int) */
int func0(int param_1)
{
int iVar1;
int iVar2;
if ((param_1 == 1) || (param_1 == 2)) {
iVar2 = 1;
}
else {
iVar1 = func0(param_1 + -1);
iVar2 = func0(param_1 + -2);
iVar2 = iVar2 + iVar1;
}
return iVar2;
} |
3,489 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int n) {
if (n == 1 || n == 2) {
return 1;
} else {
return (func0(n - 1) + func0(n - 2));
}
}
| int main() {
assert(func0(7) == 13);
assert(func0(8) == 21);
assert(func0(9) == 34);
return 0;
}
| O1 | cpp | func0(int):
endbr64
lea -0x1(%rdi),%edx
mov $0x1,%eax
cmp $0x1,%edx
jbe 11bc <_Z5func0i+0x33>
push %rbp
push %rbx
sub $0x8,%rsp
mov %edi,%ebx
mov %edx,%edi
callq 1189 <_Z5func0i>
mov %eax,%ebp
lea -0x2(%rbx),%edi
callq 1189 <_Z5func0i>
add %ebp,%eax
add $0x8,%rsp
pop %rbx
pop ... | _Z5func0i:
endbr64
lea edx, [rdi-1]
mov eax, 1
cmp edx, 1
jbe short locret_117C
push rbp
push rbx
sub rsp, 8
mov ebx, edi
mov edi, edx; int
call _Z5func0i; func0(int)
mov ebp, eax
lea edi, [rbx-2]; int
call _Z5func0i; func0(int)
add eax, ebp
add rsp, 8
pop rbx... | long long func0(int a1)
{
long long result; // rax
int v2; // ebp
result = 1LL;
if ( (unsigned int)(a1 - 1) > 1 )
{
v2 = func0(a1 - 1);
return v2 + (unsigned int)func0(a1 - 2);
}
return result;
} | func0:
ENDBR64
LEA EDX,[RDI + -0x1]
MOV EAX,0x1
CMP EDX,0x1
JBE 0x0010117c
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV EBX,EDI
MOV EDI,EDX
CALL 0x00101149
MOV EBP,EAX
LEA EDI,[RBX + -0x2]
CALL 0x00101149
ADD EAX,EBP
ADD RSP,0x8
POP RBX
POP RBP
RET
LAB_0010117c:
RET | /* func0(int) */
int func0(int param_1)
{
int iVar1;
int iVar2;
if (1 < param_1 - 1U) {
iVar1 = func0(param_1 - 1U);
iVar2 = func0(param_1 + -2);
return iVar2 + iVar1;
}
return 1;
} |
3,490 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int n) {
if (n == 1 || n == 2) {
return 1;
} else {
return (func0(n - 1) + func0(n - 2));
}
}
| int main() {
assert(func0(7) == 13);
assert(func0(8) == 21);
assert(func0(9) == 34);
return 0;
}
| O2 | cpp | func0(int):
endbr64
push %rbp
mov $0x1,%eax
push %rbx
lea -0x1(%rdi),%ebx
sub $0x8,%rsp
cmp $0x1,%ebx
jbe 12fd <_Z5func0i+0x2d>
xor %ebp,%ebp
mov %ebx,%edi
sub $0x2,%ebx
callq 12d0 <_Z5func0i>
add %eax,%ebp
cmp $0x1,%ebx
ja 12e9 <_Z5func0i+0x19>
lea 0x1(%rbp),%eax
add $0x8,%... | _Z5func0i:
endbr64
push r15
lea edx, [rdi-1]
push r14
push r13
mov r13d, 1
push r12
push rbp
push rbx
sub rsp, 58h
cmp edx, 1
jbe loc_14EC
lea r15d, [rdi-2]
xor r13d, r13d
loc_121B:
cmp r15d, 1
jz loc_14E8
lea ebp, [r15-1]
mov [rsp+88h+var_70], r13d
xor ... | long long func0(int a1)
{
unsigned int v1; // r13d
int v2; // r15d
int v3; // r13d
int v4; // ebp
int v5; // r14d
int v6; // ecx
int v7; // r13d
int v8; // r15d
int v9; // edi
int v10; // r12d
int v11; // esi
int v12; // ebx
int v13; // r10d
int v14; // r11d
int v15; // r14d
int v16; //... | func0:
ENDBR64
PUSH R15
LEA EDX,[RDI + -0x1]
PUSH R14
PUSH R13
MOV R13D,0x1
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x58
CMP EDX,0x1
JBE 0x001014ec
LEA R15D,[RDI + -0x2]
XOR R13D,R13D
LAB_0010121b:
CMP R15D,0x1
JZ 0x001014e8
LEA EBP,[R15 + -0x1]
MOV dword ptr [RSP + 0x18],R13D
XOR R14D,R14D
MOV dword ptr [RSP + 0x1c],EBP
MO... | /* func0(int) */
int func0(int param_1)
{
int iVar1;
int iVar2;
uint uVar3;
uint uVar4;
uint uVar5;
uint uVar6;
int iVar7;
int iVar8;
uint uVar9;
int iVar10;
uint uVar11;
int iVar12;
int iVar13;
int iVar14;
int iVar15;
uint uVar16;
uint uVar17;
int iVar18;
uint uVar19;
int iVar... |
3,491 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int n) {
if (n == 1 || n == 2) {
return 1;
} else {
return (func0(n - 1) + func0(n - 2));
}
}
| int main() {
assert(func0(7) == 13);
assert(func0(8) == 21);
assert(func0(9) == 34);
return 0;
}
| O3 | cpp | func0(int):
endbr64
push %rbp
mov $0x1,%eax
push %rbx
lea -0x1(%rdi),%ebx
sub $0x8,%rsp
cmp $0x1,%ebx
jbe 135d <_Z5func0i+0x2d>
xor %ebp,%ebp
mov %ebx,%edi
sub $0x2,%ebx
callq 1330 <_Z5func0i>
add %eax,%ebp
cmp $0x1,%ebx
ja 1349 <_Z5func0i+0x19>
lea 0x1(%rbp),%eax
add $0x8,%... | _Z5func0i:
endbr64
push r15
lea edx, [rdi-1]
push r14
push r13
mov r13d, 1
push r12
push rbp
push rbx
sub rsp, 58h
cmp edx, 1
jbe loc_155C
lea r15d, [rdi-2]
xor r13d, r13d
loc_128B:
cmp r15d, 1
jz loc_1558
lea ebp, [r15-1]
mov [rsp+88h+var_70], r13d
xor ... | long long func0(int a1)
{
unsigned int v1; // r13d
int v2; // r15d
int v3; // r13d
int v4; // ebp
int v5; // r14d
int v6; // ecx
int v7; // r13d
int v8; // r15d
int v9; // edi
int v10; // r12d
int v11; // esi
int v12; // ebx
int v13; // r10d
int v14; // r11d
int v15; // r14d
int v16; //... | func0:
ENDBR64
PUSH R15
LEA EDX,[RDI + -0x1]
PUSH R14
PUSH R13
MOV R13D,0x1
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x58
CMP EDX,0x1
JBE 0x0010155c
LEA R15D,[RDI + -0x2]
XOR R13D,R13D
LAB_0010128b:
CMP R15D,0x1
JZ 0x00101558
LEA EBP,[R15 + -0x1]
MOV dword ptr [RSP + 0x18],R13D
XOR R14D,R14D
MOV dword ptr [RSP + 0x1c],EBP
MO... | /* func0(int) */
int func0(int param_1)
{
int iVar1;
int iVar2;
uint uVar3;
uint uVar4;
uint uVar5;
uint uVar6;
int iVar7;
int iVar8;
uint uVar9;
int iVar10;
uint uVar11;
int iVar12;
int iVar13;
int iVar14;
int iVar15;
uint uVar16;
uint uVar17;
int iVar18;
uint uVar19;
int iVar... |
3,492 | func0 |
#include <string>
#include <cassert>
| bool func0(const std::string& str1, const std::string& str2) {
int N = str1.length();
int M = str2.length();
if (N % M != 0) {
return false;
}
for (int i = 0; i < N; i++) {
if (str1[i] != str2[i % M]) {
return false;
}
}
return true;
}
| int main() {
assert(func0("abcabcabc", "abc") == true);
assert(func0("abcab", "abc") == false);
assert(func0("aba", "ab") == false);
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 $0x28,%rsp
mov %rdi,-0x28(%rbp)
mov %rsi,-0x30(%rbp)
mov -0x28(%rbp),%ra... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_:
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::lengt... | long long func0(long long a1, long long a2)
{
char v3; // bl
int i; // [rsp+14h] [rbp-1Ch]
int v5; // [rsp+18h] [rbp-18h]
int v6; // [rsp+1Ch] [rbp-14h]
v5 = std::string::length(a1);
v6 = std::string::length(a2);
if ( v5 % v6 )
return 0LL;
for ( i = 0; i < v5; ++i )
{
v3 = *(_BYTE *)std::str... | 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 0x00101220
MOV dword ptr [RBP + -0x18],EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV RDI,RAX
CALL 0x00101220
MOV dword ptr [RBP + -0x14],EAX
MOV EAX,dword ... | /* func0(std::string const&, std::string const&) */
int8 func0(string *param_1,string *param_2)
{
char cVar1;
int iVar2;
int iVar3;
int8 uVar4;
char *pcVar5;
int local_24;
iVar2 = std::string::length();
iVar3 = std::string::length();
if (iVar2 % iVar3 == 0) {
for (local_24 = 0; local_24 < iVa... |
3,493 | func0 |
#include <string>
#include <cassert>
| bool func0(const std::string& str1, const std::string& str2) {
int N = str1.length();
int M = str2.length();
if (N % M != 0) {
return false;
}
for (int i = 0; i < N; i++) {
if (str1[i] != str2[i % M]) {
return false;
}
}
return true;
}
| int main() {
assert(func0("abcabcabc", "abc") == true);
assert(func0("abcab", "abc") == false);
assert(func0("aba", "ab") == false);
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
mov 0x8(%rdi),%rcx
mov 0x8(%rsi),%r8d
mov %ecx,%eax
cltd
idiv %r8d
mov $0x0,%eax
test %edx,%edx
jne 1268 <_Z5f... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_:
endbr64
mov rcx, [rdi+8]
mov r8d, [rsi+8]
mov eax, ecx
cdq
idiv r8d
mov eax, 0
test edx, edx
jnz short locret_1288
test ecx, ecx
jle short loc_127D
mov rdi, [rdi]
mov rsi, [rsi]
lea r9d, [rcx-1]
mov ecx, ... | long long func0(long long *a1, long long *a2)
{
long long v2; // rcx
int v3; // r8d
long long result; // rax
long long v5; // rdi
long long v6; // rsi
long long v7; // r9
long long i; // rcx
v2 = a1[1];
v3 = *((_DWORD *)a2 + 2);
result = 0LL;
if ( !((int)v2 % v3) )
{
if ( (int)v2 <= 0 )
... | func0:
ENDBR64
MOV RCX,qword ptr [RDI + 0x8]
MOV R8D,dword ptr [RSI + 0x8]
MOV EAX,ECX
CDQ
IDIV R8D
MOV EAX,0x0
TEST EDX,EDX
JNZ 0x00101288
TEST ECX,ECX
JLE 0x0010127d
MOV RDI,qword ptr [RDI]
MOV RSI,qword ptr [RSI]
LEA R9D,[RCX + -0x1]
MOV ECX,0x0
JMP 0x0010125c
LAB_00101259:
MOV RCX,RAX
LAB_0010125c:
MOV EAX,ECX
CDQ
... | /* func0(std::string const&, std::string const&) */
int8 func0(string *param_1,string *param_2)
{
int iVar1;
ulong uVar2;
bool bVar3;
iVar1 = (int)*(ulong *)(param_1 + 8);
if ((int)((long)((ulong)(uint)(iVar1 >> 0x1f) << 0x20 | *(ulong *)(param_1 + 8) & 0xffffffff) %
(long)*(int *)(param_2 + 8... |
3,494 | func0 |
#include <string>
#include <cassert>
| bool func0(const std::string& str1, const std::string& str2) {
int N = str1.length();
int M = str2.length();
if (N % M != 0) {
return false;
}
for (int i = 0; i < N; i++) {
if (str1[i] != str2[i % M]) {
return false;
}
}
return true;
}
| int main() {
assert(func0("abcabcabc", "abc") == true);
assert(func0("abcab", "abc") == false);
assert(func0("aba", "ab") == false);
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
mov 0x8(%rdi),%rcx
mov 0x8(%rsi),%r8d
mov %ecx,%eax
cltd
idiv %r8d
xor %eax,%eax
test %edx,%edx
jne 1550 <_Z5f... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_:
endbr64
mov rcx, [rdi+8]
mov r8d, [rsi+8]
mov eax, ecx
cdq
idiv r8d
xor eax, eax
test edx, edx
jnz short locret_1460
test ecx, ecx
jle short loc_1468
lea r9d, [rcx-1]
mov rdi, [rdi]
mov rsi, [rsi]
xor ecx... | long long func0(long long *a1, long long *a2)
{
long long v2; // rcx
int v3; // r8d
long long result; // rax
long long v5; // r9
long long v6; // rdi
long long v7; // rsi
long long i; // rcx
v2 = a1[1];
v3 = *((_DWORD *)a2 + 2);
result = 0LL;
if ( !((int)v2 % v3) )
{
if ( (int)v2 <= 0 )
... | func0:
ENDBR64
MOV RCX,qword ptr [RDI + 0x8]
MOV R8D,dword ptr [RSI + 0x8]
MOV EAX,ECX
CDQ
IDIV R8D
XOR EAX,EAX
TEST EDX,EDX
JNZ 0x00101460
TEST ECX,ECX
JLE 0x00101468
LEA R9D,[RCX + -0x1]
MOV RDI,qword ptr [RDI]
MOV RSI,qword ptr [RSI]
XOR ECX,ECX
JMP 0x0010144c
LAB_00101440:
LEA RAX,[RCX + 0x1]
CMP R9,RCX
JZ 0x001014... | /* func0(std::string const&, std::string const&) */
int8 func0(string *param_1,string *param_2)
{
int iVar1;
ulong uVar2;
bool bVar3;
iVar1 = (int)*(ulong *)(param_1 + 8);
if ((int)((long)((ulong)(uint)(iVar1 >> 0x1f) << 0x20 | *(ulong *)(param_1 + 8) & 0xffffffff) %
(long)*(int *)(param_2 + 8... |
3,495 | func0 |
#include <string>
#include <cassert>
| bool func0(const std::string& str1, const std::string& str2) {
int N = str1.length();
int M = str2.length();
if (N % M != 0) {
return false;
}
for (int i = 0; i < N; i++) {
if (str1[i] != str2[i % M]) {
return false;
}
}
return true;
}
| int main() {
assert(func0("abcabcabc", "abc") == true);
assert(func0("abcab", "abc") == false);
assert(func0("aba", "ab") == false);
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
mov 0x8(%rdi),%rcx
mov 0x8(%rsi),%r8d
mov %ecx,%eax
cltd
idiv %r8d
xor %eax,%eax
test %edx,%edx
jne 15e0 <_Z5f... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_:
endbr64
mov rcx, [rdi+8]
mov r8d, [rsi+8]
mov eax, ecx
cdq
idiv r8d
xor eax, eax
test edx, edx
jnz short locret_1520
test ecx, ecx
jle short loc_1528
lea r9d, [rcx-1]
mov rdi, [rdi]
mov rsi, [rsi]
xor ecx... | long long func0(long long *a1, long long *a2)
{
long long v2; // rcx
int v3; // r8d
long long result; // rax
long long v5; // r9
long long v6; // rdi
long long v7; // rsi
long long i; // rcx
v2 = a1[1];
v3 = *((_DWORD *)a2 + 2);
result = 0LL;
if ( !((int)v2 % v3) )
{
if ( (int)v2 <= 0 )
... | func0:
ENDBR64
MOV RCX,qword ptr [RDI + 0x8]
MOV R8D,dword ptr [RSI + 0x8]
MOV EAX,ECX
CDQ
IDIV R8D
XOR EAX,EAX
TEST EDX,EDX
JNZ 0x00101520
TEST ECX,ECX
JLE 0x00101528
LEA R9D,[RCX + -0x1]
MOV RDI,qword ptr [RDI]
MOV RSI,qword ptr [RSI]
XOR ECX,ECX
JMP 0x0010150c
LAB_00101500:
LEA RAX,[RCX + 0x1]
CMP R9,RCX
JZ 0x001015... | /* func0(std::string const&, std::string const&) */
int8 func0(string *param_1,string *param_2)
{
int iVar1;
ulong uVar2;
bool bVar3;
iVar1 = (int)*(ulong *)(param_1 + 8);
if ((int)((long)((ulong)(uint)(iVar1 >> 0x1f) << 0x20 | *(ulong *)(param_1 + 8) & 0xffffffff) %
(long)*(int *)(param_2 + 8... |
3,496 | func0 |
#include <iostream>
#include <vector>
#include <climits>
#include <cmath>
#include <cassert>
| int func0(const std::vector<std::pair<int, int>>& test_list) {
std::vector<int> temp;
for (const auto& p : test_list) {
temp.push_back(abs(p.second - p.first));
}
int res = INT_MAX;
for (int t : temp) {
if (t < res) {
res = t;
}
}
return res;
}... | int main() {
assert(func0({{3, 5}, {1, 7}, {10, 3}, {1, 2}}) == 1);
assert(func0({{4, 6}, {12, 8}, {11, 4}, {2, 13}}) == 2);
assert(func0({{5, 17}, {3, 9}, {12, 5}, {3, 24}}) == 6);
return 0;
}
| O0 | cpp | func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x78,%rsp
mov %rdi,-0x78(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
lea -0x30(%rbp),%rax
mov %rax,%rdi
callq 1856 <_ZNSt6vectorIiSaIiEEC1Ev>
... | _Z5func0RKSt6vectorISt4pairIiiESaIS1_EE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 78h
mov [rbp+var_78], rdi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_30]
mov rdi, rax
call _ZNSt6vectorIiSaIiEEC2Ev; std::vector<int>::vector(void)
mov rax, [rb... | long long func0(long long a1)
{
int v1; // eax
unsigned int v2; // ebx
int v4; // [rsp+1Ch] [rbp-64h] BYREF
int v5; // [rsp+20h] [rbp-60h]
int v6; // [rsp+24h] [rbp-5Ch]
long long v7; // [rsp+28h] [rbp-58h] BYREF
_QWORD v8[2]; // [rsp+30h] [rbp-50h] BYREF
_BYTE *v9; // [rsp+40h] [rbp-40h]
_DWORD *v10... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x78
MOV qword ptr [RBP + -0x78],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x30]
MOV RDI,RAX
CALL 0x001017f0
MOV RAX,qword ptr [RBP + -0x78]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x48]
MOV RDI,RAX
... | /* func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&) */
int func0(vector *param_1)
{
int iVar1;
bool bVar2;
int *piVar3;
long in_FS_OFFSET;
int local_6c;
int local_68;
int local_64;
int8 local_60;
int8 local_58;
vector<std::pair<int,int>,std::allocator<std::pair... |
3,497 | func0 |
#include <iostream>
#include <vector>
#include <climits>
#include <cmath>
#include <cassert>
| int func0(const std::vector<std::pair<int, int>>& test_list) {
std::vector<int> temp;
for (const auto& p : test_list) {
temp.push_back(abs(p.second - p.first));
}
int res = INT_MAX;
for (int t : temp) {
if (t < res) {
res = t;
}
}
return res;
}... | int main() {
assert(func0({{3, 5}, {1, 7}, {10, 3}, {1, 2}}) == 1);
assert(func0({{4, 6}, {12, 8}, {11, 4}, {2, 13}}) == 2);
assert(func0({{5, 17}, {3, 9}, {12, 5}, {3, 24}}) == 6);
return 0;
}
| O1 | cpp | func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&):
endbr64
push %r12
push %rbp
push %rbx
sub $0x30,%rsp
mov %fs:0x28,%rax
mov %rax,0x28(%rsp)
xor %eax,%eax
movq $0x0,0x10(%rsp)
movq $0x0,0x18(%rsp)
movq $0x0,0x20(%rsp)
mov (%rdi),%rbx
mov 0x8(%rdi),%rbp
... | _Z5func0RKSt6vectorISt4pairIiiESaIS1_EE:
endbr64
push r12
push rbp
push rbx
sub rsp, 30h
mov rax, fs:28h
mov [rsp+48h+var_20], rax
xor eax, eax
mov [rsp+48h+var_38], 0
mov [rsp+48h+var_30], 0
mov [rsp+48h+var_28], 0
mov rbx, [rdi]
mov rbp, [rdi+8]
cmp rbp, rbx
jz lo... | long long func0(long long a1)
{
_DWORD *v1; // rbx
_DWORD *v2; // rbp
int v3; // eax
int *v4; // rsi
int *v5; // rax
int v6; // ebx
int v8; // [rsp+Ch] [rbp-3Ch] BYREF
void *v9; // [rsp+10h] [rbp-38h] BYREF
int *v10; // [rsp+18h] [rbp-30h]
int *v11; // [rsp+20h] [rbp-28h]
unsigned long long v12; ... | func0:
ENDBR64
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x30
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x28],RAX
XOR EAX,EAX
MOV qword ptr [RSP + 0x10],0x0
MOV qword ptr [RSP + 0x18],0x0
MOV qword ptr [RSP + 0x20],0x0
MOV RBX,qword ptr [RDI]
MOV RBP,qword ptr [RDI + 0x8]
CMP RBP,RBX
JZ 0x00101311
LEA R12,[RSP + 0xc]
J... | /* func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&) */
int func0(vector *param_1)
{
int *piVar1;
int *piVar2;
int iVar3;
long in_FS_OFFSET;
int local_3c;
int *local_38;
int *local_30;
int *local_28;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
... |
3,498 | func0 |
#include <iostream>
#include <vector>
#include <climits>
#include <cmath>
#include <cassert>
| int func0(const std::vector<std::pair<int, int>>& test_list) {
std::vector<int> temp;
for (const auto& p : test_list) {
temp.push_back(abs(p.second - p.first));
}
int res = INT_MAX;
for (int t : temp) {
if (t < res) {
res = t;
}
}
return res;
}... | int main() {
assert(func0({{3, 5}, {1, 7}, {10, 3}, {1, 2}}) == 1);
assert(func0({{4, 6}, {12, 8}, {11, 4}, {2, 13}}) == 2);
assert(func0({{5, 17}, {3, 9}, {12, 5}, {3, 24}}) == 6);
return 0;
}
| O2 | cpp | func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&):
endbr64
push %r12
push %rbp
push %rbx
sub $0x30,%rsp
mov (%rdi),%rbx
mov 0x8(%rdi),%rbp
mov %fs:0x28,%rax
mov %rax,0x28(%rsp)
xor %eax,%eax
movq $0x0,0x10(%rsp)
movq $0x0,0x18(%rsp)
movq $0x0,0x20(%rsp)
... | _Z5func0RKSt6vectorISt4pairIiiESaIS1_EE:
endbr64
push r12
pxor xmm0, xmm0
push rbp
push rbx
sub rsp, 30h
mov rbx, [rdi]
mov rbp, [rdi+8]
mov rax, fs:28h
mov [rsp+48h+var_20], rax
xor eax, eax
movaps xmmword ptr [rsp+48h+var_38], xmm0
mov [rsp+48h+var_28], 0
cmp rbp, rbx
jz ... | long long func0(long long a1)
{
_DWORD *v1; // rbx
_DWORD *v2; // rbp
int *v3; // rcx
int *v4; // rsi
int v5; // eax
int *v6; // rax
int v7; // ebx
int v9; // [rsp+4h] [rbp-3Ch] BYREF
void *v10[2]; // [rsp+8h] [rbp-38h] BYREF
int *v11; // [rsp+18h] [rbp-28h]
unsigned long long v12; // [rsp+20h] [... | func0:
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x20]
SUB RSI,RDI
TEST RDI,RDI
JZ 0x00101157
CALL 0x00101100
LAB_00101157:
MOV RAX,qword ptr [RSP + 0x28]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x0010116f
MOV RDI,RBX
LAB_0010116a:
CALL 0x00101130
LAB_0010116f:
CALL 0x00101110 | /* func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&) [clone
.cold] */
void func0(vector *param_1,int param_2,int param_3,int param_4,int param_5,
int param_6,int param_7,void *param_8,int param_9,long param_10,
long param_11)
{
long in_FS_OFFSET;
if (p... |
3,499 | func0 |
#include <iostream>
#include <vector>
#include <climits>
#include <cmath>
#include <cassert>
| int func0(const std::vector<std::pair<int, int>>& test_list) {
std::vector<int> temp;
for (const auto& p : test_list) {
temp.push_back(abs(p.second - p.first));
}
int res = INT_MAX;
for (int t : temp) {
if (t < res) {
res = t;
}
}
return res;
}... | int main() {
assert(func0({{3, 5}, {1, 7}, {10, 3}, {1, 2}}) == 1);
assert(func0({{4, 6}, {12, 8}, {11, 4}, {2, 13}}) == 2);
assert(func0({{5, 17}, {3, 9}, {12, 5}, {3, 24}}) == 6);
return 0;
}
| O3 | cpp | func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&):
endbr64
push %r12
pxor %xmm0,%xmm0
push %rbp
push %rbx
sub $0x30,%rsp
mov (%rdi),%rbx
mov 0x8(%rdi),%rbp
mov %fs:0x28,%rax
mov %rax,0x28(%rsp)
xor %eax,%eax
movaps %xmm0,0x10(%rsp)
movq $0x0,0x20(%rsp)
cmp... | _Z5func0RKSt6vectorISt4pairIiiESaIS1_EE:
endbr64
push r12
pxor xmm0, xmm0
push rbp
push rbx
sub rsp, 30h
mov rbx, [rdi]
mov rbp, [rdi+8]
mov rax, fs:28h
mov [rsp+48h+var_20], rax
xor eax, eax
movaps xmmword ptr [rsp+48h+var_38], xmm0
mov [rsp+48h+var_28], 0
cmp rbp, rbx
jz ... | long long func0(long long a1)
{
_DWORD *v1; // rbx
_DWORD *v2; // rbp
int *v3; // rsi
int *v4; // rdi
int v5; // eax
const __m128i *v6; // rax
unsigned long long v7; // rcx
__m128i si128; // xmm0
__m128i v9; // xmm1
__m128i v10; // xmm3
__m128i v11; // xmm1
__m128i v12; // xmm2
__m128i v13; /... | func0:
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x20]
SUB RSI,RDI
TEST RDI,RDI
JZ 0x00101157
CALL 0x00101100
LAB_00101157:
MOV RAX,qword ptr [RSP + 0x28]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x0010116f
MOV RDI,RBX
LAB_0010116a:
CALL 0x00101130
LAB_0010116f:
CALL 0x00101110 | /* func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&) [clone
.cold] */
void func0(vector *param_1,int param_2,int param_3,int param_4,int param_5,
int param_6,int param_7,void *param_8,int param_9,long param_10,
long param_11)
{
long in_FS_OFFSET;
if (p... |
3,500 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int x, int y) {
int z;
if (x > y) {
z = x;
} else {
z = y;
}
while (true) {
if ((z % x == 0) && (z % y == 0)) {
return z;
}
z += 1;
}
}
| int main() {
assert(func0(4, 6) == 12);
assert(func0(15, 17) == 255);
assert(func0(2, 6) == 6);
return 0;
}
| O0 | cpp | func0(int, int):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
mov %esi,-0x18(%rbp)
mov -0x14(%rbp),%eax
cmp -0x18(%rbp),%eax
jle 11a7 <_Z5func0ii+0x1e>
mov -0x14(%rbp),%eax
mov %eax,-0x4(%rbp)
jmp 11ad <_Z5func0ii+0x24>
mov -0x18(%rbp),%eax
mov %eax,-0x4(%rbp)
mov -0x4(%rbp... | _Z5func0ii:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_14], edi
mov [rbp+var_18], esi
mov eax, [rbp+var_14]
cmp eax, [rbp+var_18]
jle short loc_1167
mov eax, [rbp+var_14]
mov [rbp+var_4], eax
jmp short loc_116D
loc_1167:
mov eax, [rbp+var_18]
mov [rbp+var_4], eax
loc_116D:... | long long func0(signed int a1, signed int a2)
{
signed int v3; // [rsp+14h] [rbp-4h]
if ( a1 <= a2 )
v3 = a2;
else
v3 = a1;
while ( v3 % a1 || v3 % a2 )
++v3;
return (unsigned int)v3;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x14],EDI
MOV dword ptr [RBP + -0x18],ESI
MOV EAX,dword ptr [RBP + -0x14]
CMP EAX,dword ptr [RBP + -0x18]
JLE 0x00101167
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0010116d
LAB_00101167:
MOV EAX,dword ptr [RBP + -0x18]
MOV dword ptr [RB... | /* func0(int, int) */
int func0(int param_1,int param_2)
{
int local_c;
local_c = param_2;
if (param_2 < param_1) {
local_c = param_1;
}
for (; (local_c % param_1 != 0 || (local_c % param_2 != 0)); local_c = local_c + 1) {
}
return local_c;
} |
3,501 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int x, int y) {
int z;
if (x > y) {
z = x;
} else {
z = y;
}
while (true) {
if ((z % x == 0) && (z % y == 0)) {
return z;
}
z += 1;
}
}
| int main() {
assert(func0(4, 6) == 12);
assert(func0(15, 17) == 255);
assert(func0(2, 6) == 6);
return 0;
}
| O1 | cpp | func0(int, int):
endbr64
cmp %esi,%edi
mov %esi,%ecx
cmovge %edi,%ecx
jmp 1199 <_Z5func0ii+0x10>
add $0x1,%ecx
mov %ecx,%eax
cltd
idiv %edi
test %edx,%edx
jne 1196 <_Z5func0ii+0xd>
mov %ecx,%eax
cltd
idiv %esi
test %edx,%edx
jne 1196 <_Z5func0ii+0xd>
mov %ecx,%eax
retq
| _Z5func0ii:
endbr64
cmp edi, esi
mov ecx, esi
cmovge ecx, edi
jmp short loc_1159
loc_1156:
add ecx, 1
loc_1159:
mov eax, ecx
cdq
idiv edi
test edx, edx
jnz short loc_1156
mov eax, ecx
cdq
idiv esi
test edx, edx
jnz short loc_1156
mov eax, ecx
retn | long long func0(signed int a1, signed int a2)
{
signed int v2; // ecx
v2 = a2;
if ( a1 >= a2 )
v2 = a1;
while ( v2 % a1 || v2 % a2 )
++v2;
return (unsigned int)v2;
} | func0:
ENDBR64
CMP EDI,ESI
MOV ECX,ESI
CMOVGE ECX,EDI
JMP 0x00101159
LAB_00101156:
ADD ECX,0x1
LAB_00101159:
MOV EAX,ECX
CDQ
IDIV EDI
TEST EDX,EDX
JNZ 0x00101156
MOV EAX,ECX
CDQ
IDIV ESI
TEST EDX,EDX
JNZ 0x00101156
MOV EAX,ECX
RET | /* func0(int, int) */
int func0(int param_1,int param_2)
{
int iVar1;
iVar1 = param_2;
if (param_2 <= param_1) {
iVar1 = param_1;
}
for (; (iVar1 % param_1 != 0 || (iVar1 % param_2 != 0)); iVar1 = iVar1 + 1) {
}
return iVar1;
} |
3,502 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int x, int y) {
int z;
if (x > y) {
z = x;
} else {
z = y;
}
while (true) {
if ((z % x == 0) && (z % y == 0)) {
return z;
}
z += 1;
}
}
| int main() {
assert(func0(4, 6) == 12);
assert(func0(15, 17) == 255);
assert(func0(2, 6) == 6);
return 0;
}
| O2 | cpp | func0(int, int):
endbr64
cmp %esi,%edi
mov %esi,%r8d
cmovge %edi,%r8d
jmp 12c4 <_Z5func0ii+0x14>
add $0x1,%r8d
mov %r8d,%eax
cltd
idiv %edi
test %edx,%edx
jne 12c0 <_Z5func0ii+0x10>
mov %r8d,%eax
cltd
idiv %esi
test %edx,%edx
jne 12c0 <_Z5func0ii+0x10>
mov %r8d,%eax
retq
nopl 0x0(%r... | _Z5func0ii:
endbr64
cmp edi, esi
mov ecx, esi
cmovge ecx, edi
jmp short loc_1233
loc_1230:
add ecx, 1
loc_1233:
mov eax, ecx
cdq
idiv edi
test edx, edx
jnz short loc_1230
mov eax, ecx
cdq
idiv esi
test edx, edx
jnz short loc_1230
mov eax, ecx
retn | long long func0(signed int a1, signed int a2)
{
signed int v2; // ecx
v2 = a2;
if ( a1 >= a2 )
v2 = a1;
while ( v2 % a1 || v2 % a2 )
++v2;
return (unsigned int)v2;
} | func0:
ENDBR64
CMP EDI,ESI
MOV ECX,ESI
CMOVGE ECX,EDI
JMP 0x00101233
LAB_00101230:
ADD ECX,0x1
LAB_00101233:
MOV EAX,ECX
CDQ
IDIV EDI
TEST EDX,EDX
JNZ 0x00101230
MOV EAX,ECX
CDQ
IDIV ESI
TEST EDX,EDX
JNZ 0x00101230
MOV EAX,ECX
RET | /* func0(int, int) */
int func0(int param_1,int param_2)
{
int iVar1;
iVar1 = param_2;
if (param_2 <= param_1) {
iVar1 = param_1;
}
for (; (iVar1 % param_1 != 0 || (iVar1 % param_2 != 0)); iVar1 = iVar1 + 1) {
}
return iVar1;
} |
3,503 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int x, int y) {
int z;
if (x > y) {
z = x;
} else {
z = y;
}
while (true) {
if ((z % x == 0) && (z % y == 0)) {
return z;
}
z += 1;
}
}
| int main() {
assert(func0(4, 6) == 12);
assert(func0(15, 17) == 255);
assert(func0(2, 6) == 6);
return 0;
}
| O3 | cpp | func0(int, int):
endbr64
cmp %esi,%edi
mov %esi,%r8d
cmovge %edi,%r8d
jmp 12c4 <_Z5func0ii+0x14>
add $0x1,%r8d
mov %r8d,%eax
cltd
idiv %edi
test %edx,%edx
jne 12c0 <_Z5func0ii+0x10>
mov %r8d,%eax
cltd
idiv %esi
test %edx,%edx
jne 12c0 <_Z5func0ii+0x10>
mov %r8d,%eax
retq
nopl 0x0(%r... | _Z5func0ii:
endbr64
cmp edi, esi
mov ecx, esi
cmovge ecx, edi
jmp short loc_1233
loc_1230:
add ecx, 1
loc_1233:
mov eax, ecx
cdq
idiv edi
test edx, edx
jnz short loc_1230
mov eax, ecx
cdq
idiv esi
test edx, edx
jnz short loc_1230
mov eax, ecx
retn | long long func0(signed int a1, signed int a2)
{
signed int v2; // ecx
v2 = a2;
if ( a1 >= a2 )
v2 = a1;
while ( v2 % a1 || v2 % a2 )
++v2;
return (unsigned int)v2;
} | func0:
ENDBR64
CMP EDI,ESI
MOV ECX,ESI
CMOVGE ECX,EDI
JMP 0x00101233
LAB_00101230:
ADD ECX,0x1
LAB_00101233:
MOV EAX,ECX
CDQ
IDIV EDI
TEST EDX,EDX
JNZ 0x00101230
MOV EAX,ECX
CDQ
IDIV ESI
TEST EDX,EDX
JNZ 0x00101230
MOV EAX,ECX
RET | /* func0(int, int) */
int func0(int param_1,int param_2)
{
int iVar1;
iVar1 = param_2;
if (param_2 <= param_1) {
iVar1 = param_1;
}
for (; (iVar1 % param_1 != 0 || (iVar1 % param_2 != 0)); iVar1 = iVar1 + 1) {
}
return iVar1;
} |
3,504 | func0 |
#include <iostream>
#include <string>
#include <algorithm>
#include <assert.h>
| std::string func0(std::string str) {
std::sort(str.begin(), str.end());
return str;
}
| int main() {
assert(func0("cba") == "abc");
assert(func0("data") == "aadt");
assert(func0("zxy") == "xyz");
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 $0x18,%rsp
mov %rdi,-0x18(%rbp)
mov %rsi,-0x20(%rbp)
mov -0x20(%rbp),%rax
mov %rax,%rdi
callq 2220 <_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv@plt... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 18h
mov [rbp+var_18], rdi
mov [rbp+var_20], rsi
mov rax, [rbp+var_20]
mov rdi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv; std::string::end(void)
mov ... | long long func0(long long a1, long long a2)
{
long long v2; // rbx
long long v3; // rax
v2 = std::string::end(a2);
v3 = std::string::begin(a2);
std::sort<__gnu_cxx::__normal_iterator<char *,std::string>>(v3, v2);
std::string::basic_string(a1, a2);
return a1;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x18
MOV qword ptr [RBP + -0x18],RDI
MOV qword ptr [RBP + -0x20],RSI
MOV RAX,qword ptr [RBP + -0x20]
MOV RDI,RAX
CALL 0x001021c0
MOV RBX,RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RDI,RAX
CALL 0x00102250
MOV RSI,RBX
MOV RDI,RAX
CALL 0x00102962
MOV RDX,qword ptr [RBP + -... | /* func0(std::string) */
string * func0(string *param_1,string *param_2)
{
__normal_iterator _Var1;
__normal_iterator _Var2;
_Var1 = std::string::end();
_Var2 = std::string::begin();
std::sort<__normal_iterator<char*,std::string>>(_Var2,_Var1);
std::string::string(param_1,param_2);
return param_1;
} |
3,505 | func0 |
#include <iostream>
#include <string>
#include <algorithm>
#include <assert.h>
| std::string func0(std::string str) {
std::sort(str.begin(), str.end());
return str;
}
| int main() {
assert(func0("cba") == "abc");
assert(func0("data") == "aadt");
assert(func0("zxy") == "xyz");
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
mov %rdi,%rbp
mov %rsi,%rbx
mov (%rsi),%r14
mov 0x8(%rsi),%r12
lea (%r14,%r12,1),%r13
cmp %r13,%r14
je 1308 <_Z5func0NSt7__cxx1112basic_string... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r14
push r13
push r12
push rbp
push rbx
mov rbp, rdi
mov rbx, rsi
mov r14, [rsi]
mov r13, [rsi+8]
lea r12, [r14+r13]
cmp r14, r12
jz loc_13BA
bsr rax, r13
xor rax, 3Fh
mov edx, 3Fh ; '?'
su... | _QWORD * func0(_QWORD *a1, char **a2)
{
char *v4; // r14
signed long long v5; // r13
char *v6; // r12
unsigned long long v7; // rax
char *v8; // rdi
char *v9; // rsi
char v10; // cl
char *v11; // rax
char v12; // dl
_QWORD *v13; // rcx
char *v14; // rdx
char *v15; // rax
char *v17; // rsi
un... | func0:
ENDBR64
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV RBP,RDI
MOV RBX,RSI
MOV R14,qword ptr [RSI]
MOV R13,qword ptr [RSI + 0x8]
LEA R12,[R14 + R13*0x1]
CMP R14,R12
JZ 0x001013ba
BSR RAX,R13
XOR RAX,0x3f
MOV EDX,0x3f
SUB EDX,EAX
MOVSXD RDX,EDX
ADD RDX,RDX
MOV RSI,R12
MOV RDI,R14
CALL 0x00101809
CMP R13,0x10
JL... | /* func0(std::string) */
long * func0(long *param_1,int8 *param_2,int8 param_3,_Iter_less_iter param_4)
{
char *pcVar1;
char cVar2;
char cVar3;
ulong uVar4;
char *pcVar5;
char *pcVar6;
char *pcVar7;
long *plVar8;
uint uVar9;
long lVar10;
_Iter_less_iter extraout_EDX;
uint uVar11;
long *plVar... |
3,506 | func0 |
#include <iostream>
#include <string>
#include <algorithm>
#include <assert.h>
| std::string func0(std::string str) {
std::sort(str.begin(), str.end());
return str;
}
| int main() {
assert(func0("cba") == "abc");
assert(func0("data") == "aadt");
assert(func0("zxy") == "xyz");
return 0;
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
mov (%rsi),%r13
mov %rsi,%rbx
mov 0x8(%rsi),%rbp
lea 0x0(%r13,%rbp,1),%r14
cmp %r14,%r13
je 152b <_Z5func0NSt7__cxx1112basic_str... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r14
push r13
push r12
mov r12, rdi
push rbp
mov rbp, rsi
push rbx
mov r14, [rsi]
mov rbx, [rsi+8]
lea r13, [r14+rbx]
cmp r14, r13
jz loc_1880
bsr rdx, rbx
mov rsi, r13
mov rdi, r14
movsxd ... | _QWORD * func0(_QWORD *a1, char **a2)
{
char *v4; // r14
signed long long v5; // rbx
char *v6; // r13
unsigned long long v7; // rdx
_QWORD *v8; // rsi
char *v9; // rdx
char *v10; // rax
char *v11; // rcx
_QWORD *result; // rax
char *i; // rdi
char v14; // cl
char v15; // dl
char *v16; // rsi
... | func0:
ENDBR64
PUSH R14
PUSH R13
PUSH R12
MOV R12,RDI
PUSH RBP
MOV RBP,RSI
PUSH RBX
MOV R14,qword ptr [RSI]
MOV RBX,qword ptr [RSI + 0x8]
LEA R13,[R14 + RBX*0x1]
CMP R14,R13
JZ 0x00101880
BSR RDX,RBX
MOV RSI,R13
MOV RDI,R14
MOVSXD RDX,EDX
ADD RDX,RDX
CALL 0x001015b0
CMP RBX,0x10
JG 0x00101820
MOV RSI,R13
MOV RDI,R14
CA... | /* func0(std::string) */
long * func0(long *param_1,int8 *param_2,int8 param_3,_Iter_less_iter param_4)
{
char *pcVar1;
char cVar2;
char cVar3;
char *pcVar4;
uint uVar5;
ulong uVar6;
uint uVar7;
int8 *puVar8;
_Iter_less_iter extraout_EDX;
long *plVar9;
long *plVar10;
long lVar11;
__normal_it... |
3,507 | func0 |
#include <iostream>
#include <string>
#include <algorithm>
#include <assert.h>
| std::string func0(std::string str) {
std::sort(str.begin(), str.end());
return str;
}
| int main() {
assert(func0("cba") == "abc");
assert(func0("data") == "aadt");
assert(func0("zxy") == "xyz");
return 0;
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %r15
push %r14
push %r13
mov %rdi,%r13
push %r12
mov %rsi,%r12
push %rbp
push %rbx
sub $0x18,%rsp
mov (%rsi),%rbp
mov 0x8(%rsi),%r14
lea 0x0(%rbp,%r14,1),%rcx
cmp %rcx,%rbp
je 1594 <... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
push r14
push r13
push r12
mov r12, rdi
push rbp
mov rbp, rsi
push rbx
sub rsp, 18h
mov rcx, [rsi]
mov r14, [rsi+8]
lea r13, [rcx+r14]
cmp rcx, r13
jz loc_18C0
bsr rdx, r14
mov rdi, ... | _QWORD * func0(_QWORD *a1, char **a2)
{
signed long long v4; // r14
char *v5; // r13
unsigned long long v6; // rdx
char *v7; // rcx
char *v8; // rbx
char v9; // r15
char *v10; // rsi
char v11; // dl
char *j; // rax
_QWORD *v13; // rsi
char *v14; // rdx
char *v15; // rax
char *v16; // rcx
_QW... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
MOV R12,RDI
PUSH RBP
MOV RBP,RSI
PUSH RBX
SUB RSP,0x18
MOV RCX,qword ptr [RSI]
MOV R14,qword ptr [RSI + 0x8]
LEA R13,[RCX + R14*0x1]
CMP RCX,R13
JZ 0x001018c0
BSR RDX,R14
MOV RDI,RCX
MOV RSI,R13
MOV qword ptr [RSP + 0x8],RCX
MOVSXD RDX,EDX
ADD RDX,RDX
CALL 0x001014f0
M... | /* func0(std::string) */
long * func0(long *param_1,int8 *param_2)
{
char *pcVar1;
char cVar2;
char *pcVar3;
char *pcVar4;
uint uVar5;
ulong uVar6;
uint uVar7;
int8 *puVar8;
char cVar9;
size_t sVar10;
long *plVar11;
char *pcVar12;
long *plVar13;
long lVar14;
char *pcVar15;
pcVar3 = ... |
3,508 | func0 |
#include <vector>
#include <tuple>
#include <cassert>
#include <algorithm>
| bool func0(const std::tuple<int, int, int, int, int, int>& test_tuple, const std::vector<int>& K) {
bool res = true;
auto unpack_tuple = {std::get<0>(test_tuple), std::get<1>(test_tuple), std::get<2>(test_tuple), std::get<3>(test_tuple), std::get<4>(test_tuple), std::get<5>(test_tuple)};
for (auto ele : ... | int main() {
assert(func0(std::make_tuple(3, 5, 6, 5, 3, 6), {3, 6, 5}) == true);
assert(func0(std::make_tuple(4, 5, 6, 4, 6, 5), {4, 5, 6}) == true);
assert(func0(std::make_tuple(9, 8, 7, 6, 8, 9), {9, 8, 1}) == false);
return 0;
}
| O0 | cpp | func0(std::tuple<int, int, int, int, int, int> const&, std::vector<int, std::allocator<int> > 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
movb $0x1,-0x6d(%rbp)
movq $0x0,-0x4... | _Z5func0RKSt5tupleIJiiiiiiEERKSt6vectorIiSaIiEE:
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
mov [rbp+var_6D], 1
mov [rbp+var_40], 0
mov [rbp+var_38], 0
mov [rbp+var_3... | long long func0(long long a1, long long a2)
{
long long v2; // rbx
long long v3; // rax
unsigned __int8 v5; // [rsp+13h] [rbp-6Dh]
int v6; // [rsp+14h] [rbp-6Ch] BYREF
long long v7; // [rsp+18h] [rbp-68h] BYREF
long long v8; // [rsp+20h] [rbp-60h] BYREF
int *v9; // [rsp+28h] [rbp-58h]
_QWORD *v10; // [... | 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
MOV byte ptr [RBP + -0x6d],0x1
MOV qword ptr [RBP + -0x40],0x0
MOV qword ptr [RBP + -0x38],0x0
MOV qword ptr [RBP + -0x38],0x6... | /* func0(std::tuple<int, int, int, int, int, int> const&, std::vector<int, std::allocator<int> >
const&) */
int func0(tuple *param_1,vector *param_2)
{
bool bVar1;
__normal_iterator _Var2;
__normal_iterator _Var3;
type *ptVar4;
type *ptVar5;
type *ptVar6;
type *ptVar7;
type *ptVar8;
type *ptVar9;... |
3,509 | func0 |
#include <vector>
#include <tuple>
#include <cassert>
#include <algorithm>
| bool func0(const std::tuple<int, int, int, int, int, int>& test_tuple, const std::vector<int>& K) {
bool res = true;
auto unpack_tuple = {std::get<0>(test_tuple), std::get<1>(test_tuple), std::get<2>(test_tuple), std::get<3>(test_tuple), std::get<4>(test_tuple), std::get<5>(test_tuple)};
for (auto ele : ... | int main() {
assert(func0(std::make_tuple(3, 5, 6, 5, 3, 6), {3, 6, 5}) == true);
assert(func0(std::make_tuple(4, 5, 6, 4, 6, 5), {4, 5, 6}) == true);
assert(func0(std::make_tuple(9, 8, 7, 6, 8, 9), {9, 8, 1}) == false);
return 0;
}
| O1 | cpp | func0(std::tuple<int, int, int, int, int, int> const&, std::vector<int, std::allocator<int> > const&):
endbr64
sub $0x28,%rsp
mov %fs:0x28,%rax
mov %rax,0x18(%rsp)
xor %eax,%eax
mov 0x14(%rdi),%eax
mov %eax,(%rsp)
mov 0x10(%rdi),%eax
mov %eax,0x4(%rsp)
mov 0xc(%rdi),%eax
mov %eax,0x8(%rsp)... | _Z5func0RKSt5tupleIJiiiiiiEERKSt6vectorIiSaIiEE:
endbr64
sub rsp, 28h
mov rax, fs:28h
mov [rsp+28h+var_10], rax
xor eax, eax
mov eax, [rdi+14h]
mov [rsp+28h+var_28], eax
mov eax, [rdi+10h]
mov [rsp+28h+var_24], eax
mov eax, [rdi+0Ch]
mov [rsp+28h+var_20], eax
mov eax, [rdi+8]... | long long func0(_DWORD *a1, _QWORD *a2)
{
char *v2; // r8
char *v3; // rdi
long long v4; // rcx
long long v5; // r9
unsigned long long *v6; // rsi
char *v7; // rcx
char *v8; // rax
int v9; // edx
signed long long v10; // r11
_DWORD v12[6]; // [rsp+0h] [rbp-28h] BYREF
unsigned long long v13; // [r... | func0:
ENDBR64
SUB RSP,0x28
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x18],RAX
XOR EAX,EAX
MOV EAX,dword ptr [RDI + 0x14]
MOV dword ptr [RSP],EAX
MOV EAX,dword ptr [RDI + 0x10]
MOV dword ptr [RSP + 0x4],EAX
MOV EAX,dword ptr [RDI + 0xc]
MOV dword ptr [RSP + 0x8],EAX
MOV EAX,dword ptr [RDI + 0x8]
MOV dword ptr [... | /* func0(std::tuple<int, int, int, int, int, int> const&, std::vector<int, std::allocator<int> >
const&) */
int8 func0(tuple *param_1,vector *param_2)
{
int iVar1;
int *piVar2;
int *piVar3;
int *piVar4;
int *piVar5;
int8 uVar6;
int *piVar7;
long *plVar8;
long lVar9;
long in_FS_OFFSET;
int8 lo... |
3,510 | func0 |
#include <vector>
#include <tuple>
#include <cassert>
#include <algorithm>
| bool func0(const std::tuple<int, int, int, int, int, int>& test_tuple, const std::vector<int>& K) {
bool res = true;
auto unpack_tuple = {std::get<0>(test_tuple), std::get<1>(test_tuple), std::get<2>(test_tuple), std::get<3>(test_tuple), std::get<4>(test_tuple), std::get<5>(test_tuple)};
for (auto ele : ... | int main() {
assert(func0(std::make_tuple(3, 5, 6, 5, 3, 6), {3, 6, 5}) == true);
assert(func0(std::make_tuple(4, 5, 6, 4, 6, 5), {4, 5, 6}) == true);
assert(func0(std::make_tuple(9, 8, 7, 6, 8, 9), {9, 8, 1}) == false);
return 0;
}
| O2 | cpp | func0(std::tuple<int, int, int, int, int, int> const&, std::vector<int, std::allocator<int> > const&):
endbr64
sub $0x28,%rsp
mov 0x8(%rsi),%r8
mov 0x14(%rdi),%edx
mov %fs:0x28,%rax
mov %rax,0x18(%rsp)
xor %eax,%eax
mov 0x10(%rdi),%eax
mov (%rsi),%r9
lea 0x18(%rsp),%r10
mov %edx,(%rsp)
mov... | _Z5func0RKSt5tupleIJiiiiiiEERKSt6vectorIiSaIiEE:
endbr64
push rbx
sub rsp, 20h
movd xmm1, dword ptr [rdi+0Ch]
movd xmm2, dword ptr [rdi+8]
mov rax, fs:28h
mov [rsp+28h+var_10], rax
xor eax, eax
movd xmm0, dword ptr [rdi+14h]
mov r8, [rsi+8]
lea r10, [rsp+28h+var_10]
movd xmm3, dwo... | long long func0(const __m128i *a1, char **a2)
{
__m128i v2; // xmm1
__m128i v3; // xmm2
char *v4; // r8
__m128i v5; // xmm0
char *v6; // rdi
__m128i *v7; // rsi
char *v8; // rcx
__int32 v9; // edx
char *v10; // rax
long long v12; // r11
__m128i v13; // [rsp+0h] [rbp-28h] BYREF
unsigned long lon... | func0:
ENDBR64
PUSH RBX
SUB RSP,0x20
MOVD XMM1,dword ptr [RDI + 0xc]
MOVD XMM2,dword ptr [RDI + 0x8]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x18],RAX
XOR EAX,EAX
MOVD XMM0,dword ptr [RDI + 0x14]
MOV R8,qword ptr [RSI + 0x8]
LEA R10,[RSP + 0x18]
MOVD XMM3,dword ptr [RDI + 0x10]
PUNPCKLDQ XMM1,XMM2
MOV RCX,R8
P... | /* func0(std::tuple<int, int, int, int, int, int> const&, std::vector<int, std::allocator<int> >
const&) */
int8 func0(tuple *param_1,vector *param_2)
{
int iVar1;
int *piVar2;
int *piVar3;
ulong uVar4;
int *piVar5;
int8 uVar6;
ulong uVar7;
int *piVar8;
long *plVar9;
long lVar10;
long in_FS_O... |
3,511 | func0 |
#include <vector>
#include <tuple>
#include <cassert>
#include <algorithm>
| bool func0(const std::tuple<int, int, int, int, int, int>& test_tuple, const std::vector<int>& K) {
bool res = true;
auto unpack_tuple = {std::get<0>(test_tuple), std::get<1>(test_tuple), std::get<2>(test_tuple), std::get<3>(test_tuple), std::get<4>(test_tuple), std::get<5>(test_tuple)};
for (auto ele : ... | int main() {
assert(func0(std::make_tuple(3, 5, 6, 5, 3, 6), {3, 6, 5}) == true);
assert(func0(std::make_tuple(4, 5, 6, 4, 6, 5), {4, 5, 6}) == true);
assert(func0(std::make_tuple(9, 8, 7, 6, 8, 9), {9, 8, 1}) == false);
return 0;
}
| O3 | cpp | func0(std::tuple<int, int, int, int, int, int> const&, std::vector<int, std::allocator<int> > const&):
endbr64
sub $0x28,%rsp
mov 0x8(%rsi),%r8
mov (%rsi),%r9
mov %fs:0x28,%rax
mov %rax,0x18(%rsp)
xor %eax,%eax
mov 0x14(%rdi),%eax
mov %rsp,%rsi
lea 0x18(%rsp),%r10
mov %eax,(%rsp)
mov 0x... | _Z5func0RKSt5tupleIJiiiiiiEERKSt6vectorIiSaIiEE:
endbr64
push rbx
sub rsp, 20h
movd xmm1, dword ptr [rdi+0Ch]
movd xmm2, dword ptr [rdi+8]
mov rax, fs:28h
mov [rsp+28h+var_10], rax
xor eax, eax
movd xmm0, dword ptr [rdi+14h]
mov r8, [rsi+8]
lea r10, [rsp+28h+var_10]
movd xmm3, dwo... | long long func0(const __m128i *a1, char **a2)
{
__m128i v2; // xmm1
__m128i v3; // xmm2
char *v4; // r8
__m128i v5; // xmm0
char *v6; // rdi
__m128i *v7; // rsi
char *v8; // rcx
__int32 v9; // edx
char *v10; // rax
long long v12; // r11
__m128i v13; // [rsp+0h] [rbp-28h] BYREF
unsigned long lon... | func0:
ENDBR64
PUSH RBX
SUB RSP,0x20
MOVD XMM1,dword ptr [RDI + 0xc]
MOVD XMM2,dword ptr [RDI + 0x8]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x18],RAX
XOR EAX,EAX
MOVD XMM0,dword ptr [RDI + 0x14]
MOV R8,qword ptr [RSI + 0x8]
LEA R10,[RSP + 0x18]
MOVD XMM3,dword ptr [RDI + 0x10]
PUNPCKLDQ XMM1,XMM2
MOV RCX,R8
P... | /* func0(std::tuple<int, int, int, int, int, int> const&, std::vector<int, std::allocator<int> >
const&) */
int8 func0(tuple *param_1,vector *param_2)
{
int iVar1;
int *piVar2;
int *piVar3;
ulong uVar4;
int *piVar5;
int8 uVar6;
ulong uVar7;
int *piVar8;
long *plVar9;
long lVar10;
long in_FS_O... |
3,512 | func0 |
#include <iostream>
#include <regex>
#include <assert.h>
| std::string func0(const std::string &text) {
std::regex pattern("a.*?b$");
if (std::regex_search(text, pattern)) {
return "Found a match!";
} else {
return "Not matched!";
}
}
| int main() {
assert(func0("aabbbbd") == "Not matched!");
assert(func0("aabAbbbc") == "Not matched!");
assert(func0("accddbbjjjb") == "Found a match!");
return 0;
}
| O0 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x58,%rsp
mov %rdi,-0x58(%rbp)
mov %rsi,-0x60(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
lea -0x40(%rbp),%rax
mov $0x10,%edx
lea ... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 68h
mov [rbp+var_68], rdi
mov [rbp+var_70], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_40]
mov edx, 10h
lea rcx, aAB; "a.*?b$"
mov ... | long long func0(long long a1, long long a2)
{
char v3; // [rsp+1Fh] [rbp-51h] BYREF
char *v4; // [rsp+20h] [rbp-50h]
char *v5; // [rsp+28h] [rbp-48h]
_BYTE v6[40]; // [rsp+30h] [rbp-40h] BYREF
unsigned long long v7; // [rsp+58h] [rbp-18h]
v7 = __readfsqword(0x28u);
std::basic_regex<char,std::regex_trait... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x68
MOV qword ptr [RBP + -0x68],RDI
MOV qword ptr [RBP + -0x70],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x40]
MOV EDX,0x10
LEA RCX,[0x132051]
MOV RSI,RCX
MOV RDI,RAX
LAB_00104b43:
CALL 0x001061ba
LEA RCX,[RBP + -0x... | /* func0(std::string const&) */
string * func0(string *param_1)
{
bool bVar1;
string *in_RSI;
long in_FS_OFFSET;
allocator local_59;
allocator *local_58;
allocator *local_50;
regex local_48 [40];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
std::regex::basic_regex(local_48,"a.*?b$"... |
3,513 | func0 |
#include <iostream>
#include <regex>
#include <assert.h>
| std::string func0(const std::string &text) {
std::regex pattern("a.*?b$");
if (std::regex_search(text, pattern)) {
return "Found a match!";
} else {
return "Not matched!";
}
}
| int main() {
assert(func0("aabbbbd") == "Not matched!");
assert(func0("aabAbbbc") == "Not matched!");
assert(func0("accddbbjjjb") == "Found a match!");
return 0;
}
| O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r13
push %r12
push %rbp
push %rbx
sub $0x58,%rsp
mov %rdi,%rbx
mov %rsi,%rbp
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
lea 0x20(%rsp),%r13
mov %r13,%rdi
callq 4730 <_ZN... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r14
push r12
push rbx
sub rsp, 58h
mov rbx, rdi
mov r14, rsi
mov rax, fs:28h
mov [rbp+var_28], rax
xor eax, eax
lea r12, [rbp+var_70]
lea rdi, [rbp+var_68]; this
call __Z... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV RBX,RDI
MOV R14,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
XOR EAX,EAX
LEA R12,[RBP + -0x70]
LEA RDI,[RBP + -0x68]
CALL 0x001046f0
MOV qword ptr [RBP + -0x60],0x0
MOV qword ptr [RBP + -0x58],0x0
MOV ECX,0x10
LEA RDX,[0x... | /* func0(std::string const&) */
string * func0(string *param_1)
{
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
_Sp_counted_base<(_Lock_policy)2> *p_Var2;
bool bVar3;
int iVar4;
int8 *in_RSI;
long in_FS_OFFSET;
regex local_78 [8];
int local_70 [8];
int8 local_68;
_Sp_counted_base<(_Lock_policy)2> *lo... | |
3,514 | func0 |
#include <iostream>
#include <regex>
#include <assert.h>
| std::string func0(const std::string &text) {
std::regex pattern("a.*?b$");
if (std::regex_search(text, pattern)) {
return "Found a match!";
} else {
return "Not matched!";
}
}
| int main() {
assert(func0("aabbbbd") == "Not matched!");
assert(func0("aabAbbbc") == "Not matched!");
assert(func0("accddbbjjjb") == "Found a match!");
return 0;
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
mov %rsi,%rbx
sub $0x50,%rsp
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
lea 0x20(%rsp),%r13
lea 0x8(%rsp),%rbp... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r14
mov r14, rsi
push r13
lea r13, [rbp+var_70]
push r12
lea r12, [rbp+var_68]
push rbx
mov rbx, rdi
mov rdi, r12; this
sub rsp, 50h
mov rax, fs:28h
mov [rbp+var_28], rax... | long long func0(long long a1, long long *a2)
{
long long v3; // rdi
long long v4; // rsi
long long v5; // rsi
char v6; // r13
long long v7; // rdi
long long v8; // rdx
volatile signed __int32 *v9; // rcx
signed __int32 v10; // eax
long long v12; // rax
_BYTE v13[8]; // [rsp+0h] [rbp-70h] BYREF
_B... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R14
MOV R14,RSI
PUSH R13
LEA R13,[RBP + -0x70]
PUSH R12
LEA R12,[RBP + -0x68]
PUSH RBX
MOV RBX,RDI
MOV RDI,R12
SUB RSP,0x50
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
XOR EAX,EAX
CALL 0x001036d0
LEA RDX,[0x118661]
PXOR XMM0,XMM0
MOV RDI,R13
MOV ECX,0x10
LEA RSI,... | /* func0(std::string const&) */
string * func0(string *param_1)
{
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
int8 uVar2;
bool bVar3;
int iVar4;
int8 *in_RSI;
long in_FS_OFFSET;
regex local_78 [8];
int local_70 [8];
int local_68 [16];
int local_58 [16];
int local_48 [16];
long local_30;
lo... |
3,515 | func0 |
#include <iostream>
#include <regex>
#include <assert.h>
| std::string func0(const std::string &text) {
std::regex pattern("a.*?b$");
if (std::regex_search(text, pattern)) {
return "Found a match!";
} else {
return "Not matched!";
}
}
| int main() {
assert(func0("aabbbbd") == "Not matched!");
assert(func0("aabAbbbc") == "Not matched!");
assert(func0("accddbbjjjb") == "Found a match!");
return 0;
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
mov %rsi,%rbx
sub $0x50,%rsp
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
lea 0x20(%rsp),%r13
lea 0x8(%rsp),%rbp... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
mov r15, rsi
push r14
push r13
push r12
push rbp
push rbx
mov rbx, rdi
sub rsp, 2B8h
mov rax, fs:28h
mov [rsp+2E8h+var_40], rax
xor eax, eax
lea r14, [rsp+2E8h+var_2A0]
mov rdi, r14; this
c... | long long func0(long long a1, unsigned long long *a2)
{
__m128i v3; // xmm0
long long v4; // rdi
void *v5; // rdi
void **v6; // rbp
unsigned long long v7; // r12
void *v8; // rdi
unsigned long long v9; // r13
unsigned long long v10; // rbp
long long v11; // rax
long long v12; // rcx
unsigned long... | func0:
ENDBR64
PUSH R15
MOV R15,RSI
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV RBX,RDI
SUB RSP,0x2b8
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x2a8],RAX
XOR EAX,EAX
LEA R14,[RSP + 0x48]
MOV RDI,R14
CALL 0x00104730
LEA RDX,[0x11a6a6]
PXOR XMM0,XMM0
LEA RDI,[RSP + 0x110]
MOV R8D,0x10
MOV RCX,R14
LEA RSI,[RD... | /* func0(std::string const&) */
string * func0(string *param_1)
{
ulong uVar1;
int8 uVar2;
ulong uVar3;
int auVar4 [16];
bool bVar5;
char cVar6;
long lVar7;
int8 *puVar8;
int8 *puVar9;
ulong uVar10;
ulong *puVar11;
long lVar12;
ulong uVar13;
ulong *in_RSI;
uint *puVar14;
_Match_mode _V... |
3,516 | func0 | #include <iostream>
#include <cassert>
using namespace std;
| string func0(int a, int b, int c) {
if ((b*b) - (4*a*c) > 0) {
return "2 solutions";
} else if ((b*b) - (4*a*c) == 0) {
return "1 solution";
} else {
return "No solutions";
}
}
| int main() {
assert(func0(2,5,2) == "2 solutions");
assert(func0(1,1,1) == "No solutions");
assert(func0(1,2,1) == "1 solution");
cout << "All test cases passed." << endl;
return 0;
}
| O0 | cpp | func0[abi:cxx11](int, int, int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x38,%rsp
mov %rdi,-0x28(%rbp)
mov %esi,-0x2c(%rbp)
mov %edx,-0x30(%rbp)
mov %ecx,-0x34(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x30(%rbp),%eax
imul %eax,%eax
mov %eax,%edx
mov ... | _Z5func0B5cxx11iii:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 58h
mov [rbp+var_48], rdi
mov [rbp+var_4C], esi
mov [rbp+var_50], edx
mov [rbp+var_54], ecx
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov eax, [rbp+var_50]
imul eax, eax
mov ecx, eax
mov ... | long long func0[abi:cxx11](long long a1, int a2, int a3, int a4)
{
char v5; // [rsp+2Fh] [rbp-31h] BYREF
char *v6; // [rsp+30h] [rbp-30h]
char *v7; // [rsp+38h] [rbp-28h]
char *v8; // [rsp+40h] [rbp-20h]
unsigned long long v9; // [rsp+48h] [rbp-18h]
v9 = __readfsqword(0x28u);
if ( a3 * a3 - 4 * a4 * a2 ... | func0[abi:cxx11]:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x58
MOV qword ptr [RBP + -0x48],RDI
MOV dword ptr [RBP + -0x4c],ESI
MOV dword ptr [RBP + -0x50],EDX
MOV dword ptr [RBP + -0x54],ECX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV EAX,dword ptr [RBP + -0x50]
IMUL EAX,EAX
MOV EC... | /* func0[abi:cxx11](int, int, int) */
string * func0_abi_cxx11_(int param_1,int param_2,int param_3)
{
int in_ECX;
int4 in_register_0000003c;
string *this;
long in_FS_OFFSET;
allocator local_39;
allocator *local_38;
allocator *local_30;
allocator *local_28;
long local_20;
this = (string *)CONCA... |
3,517 | func0 | #include <iostream>
#include <cassert>
using namespace std;
| string func0(int a, int b, int c) {
if ((b*b) - (4*a*c) > 0) {
return "2 solutions";
} else if ((b*b) - (4*a*c) == 0) {
return "1 solution";
} else {
return "No solutions";
}
}
| int main() {
assert(func0(2,5,2) == "2 solutions");
assert(func0(1,1,1) == "No solutions");
assert(func0(1,2,1) == "1 solution");
cout << "All test cases passed." << endl;
return 0;
}
| O1 | cpp | func0[abi:cxx11](int, int, int):
endbr64
push %rbx
mov %rdi,%rbx
imul %edx,%edx
imul %ecx,%esi
lea 0x0(,%rsi,4),%ecx
mov %edx,%eax
sub %ecx,%eax
test %eax,%eax
jg 12c3 <_Z5func0B5cxx11iii+0x3a>
cmp %ecx,%edx
je 12df <_Z5func0B5cxx11iii+0x56>
lea 0x10(%rdi),%rax
mov %rax,(%rdi)
lea ... | _Z5func0B5cxx11iii:
endbr64
push rbx
mov rbx, rdi
imul edx, edx
imul esi, ecx
shl esi, 2
cmp edx, esi
jg short loc_1279
jz short loc_1295
lea rax, [rdi+10h]
mov [rdi], rax
lea rdx, aNoSolutions+0Ch; ""
lea rsi, [rdx-0Ch]
call _ZNSt7__cxx1112basic_stringIcSt11char_traits... | _QWORD * func0[abi:cxx11](_QWORD *a1, int a2, int a3, int a4)
{
int v4; // edx
int v5; // esi
v4 = a3 * a3;
v5 = 4 * a4 * a2;
if ( v4 > v5 )
{
*a1 = a1 + 2;
std::string::_M_construct<char const*>(a1, "2 solutions");
}
else
{
*a1 = a1 + 2;
if ( v4 == v5 )
std::string::_M_construc... | func0[abi:cxx11]:
ENDBR64
PUSH RBX
MOV RBX,RDI
IMUL EDX,EDX
IMUL ESI,ECX
SHL ESI,0x2
CMP EDX,ESI
JG 0x00101279
JZ 0x00101295
LEA RAX,[RDI + 0x10]
MOV qword ptr [RDI],RAX
LEA RDX,[0x102027]
LEA RSI,[RDX + -0xc]
CALL 0x00101452
JMP 0x00101290
LAB_00101279:
LEA RAX,[RDI + 0x10]
MOV qword ptr [RDI],RAX
LEA RDX,[0x10200f]
L... | /* func0[abi:cxx11](int, int, int) */
int8 func0_abi_cxx11_(int param_1,int param_2,int param_3)
{
int in_ECX;
int iVar1;
int iVar2;
int4 in_register_0000003c;
iVar1 = param_3 * param_3;
iVar2 = param_2 * in_ECX * 4;
if (iVar1 == iVar2 || iVar1 < iVar2) {
if (iVar1 == iVar2) {
*(long *)CONC... |
3,518 | func0 | #include <iostream>
#include <cassert>
using namespace std;
| string func0(int a, int b, int c) {
if ((b*b) - (4*a*c) > 0) {
return "2 solutions";
} else if ((b*b) - (4*a*c) == 0) {
return "1 solution";
} else {
return "No solutions";
}
}
| int main() {
assert(func0(2,5,2) == "2 solutions");
assert(func0(1,1,1) == "No solutions");
assert(func0(1,2,1) == "1 solution");
cout << "All test cases passed." << endl;
return 0;
}
| O2 | cpp | func0[abi:cxx11](int, int, int):
endbr64
imul %ecx,%esi
mov %rdi,%rax
imul %edx,%edx
lea 0x0(,%rsi,4),%ecx
lea 0x10(%rdi),%rsi
mov %edx,%edi
mov %rsi,(%rax)
sub %ecx,%edi
test %edi,%edi
jg 1440 <_Z5func0B5cxx11iii+0x50>
cmp %ecx,%edx
je 1470 <_Z5func0B5cxx11iii+0x80>
movabs $0x74756c6... | _Z5func0B5cxx11iii:
endbr64
imul esi, ecx
lea rax, [rdi+10h]
push rbx
mov rbx, rdi
imul edx, edx
mov [rdi], rax
shl esi, 2
cmp edx, esi
jg short loc_1568
jz short loc_1580
lea rdx, aNoSolutions+0Ch; ""
lea rsi, [rdx-0Ch]
call _ZNSt7__cxx1112basic_stringIcSt11char_traits... | _QWORD * func0[abi:cxx11](_QWORD *a1, int a2, int a3, int a4)
{
int v4; // edx
int v5; // esi
v4 = a3 * a3;
*a1 = a1 + 2;
v5 = 4 * a4 * a2;
if ( v4 > v5 )
{
std::string::_M_construct<char const*>(a1, "2 solutions");
return a1;
}
else
{
if ( v4 == v5 )
std::string::_M_construct<cha... | func0[abi:cxx11]:
ENDBR64
IMUL ESI,ECX
LEA RAX,[RDI + 0x10]
PUSH RBX
MOV RBX,RDI
IMUL EDX,EDX
MOV qword ptr [RDI],RAX
SHL ESI,0x2
CMP EDX,ESI
JG 0x00101568
JZ 0x00101580
LEA RDX,[0x102027]
LEA RSI,[RDX + -0xc]
CALL 0x00101480
MOV RAX,RBX
POP RBX
RET
LAB_00101568:
LEA RDX,[0x10200f]
LEA RSI,[RDX + -0xb]
CALL 0x00101480
... | /* func0[abi:cxx11](int, int, int) */
int8 func0_abi_cxx11_(int param_1,int param_2,int param_3)
{
int8 uVar1;
int in_ECX;
int iVar2;
int4 in_register_0000003c;
uVar1 = CONCAT44(in_register_0000003c,param_1);
*(long *)CONCAT44(in_register_0000003c,param_1) = CONCAT44(in_register_0000003c,param_1) + 0x1... |
3,519 | func0 | #include <iostream>
#include <cassert>
using namespace std;
| string func0(int a, int b, int c) {
if ((b*b) - (4*a*c) > 0) {
return "2 solutions";
} else if ((b*b) - (4*a*c) == 0) {
return "1 solution";
} else {
return "No solutions";
}
}
| int main() {
assert(func0(2,5,2) == "2 solutions");
assert(func0(1,1,1) == "No solutions");
assert(func0(1,2,1) == "1 solution");
cout << "All test cases passed." << endl;
return 0;
}
| O3 | cpp | func0[abi:cxx11](int, int, int):
endbr64
imul %ecx,%esi
mov %rdi,%rax
imul %edx,%edx
lea 0x0(,%rsi,4),%ecx
lea 0x10(%rdi),%rsi
mov %edx,%edi
mov %rsi,(%rax)
sub %ecx,%edi
test %edi,%edi
jg 1440 <_Z5func0B5cxx11iii+0x50>
cmp %ecx,%edx
je 1470 <_Z5func0B5cxx11iii+0x80>
movabs $0x74756c6... | _Z5func0B5cxx11iii:
endbr64
imul esi, ecx
mov rax, rdi
imul edx, edx
shl esi, 2
cmp edx, esi
lea rdx, [rdi+10h]
mov [rdi], rdx
jg short loc_1470
jz short loc_1498
mov rdi, 74756C6F73206F4Eh
mov dword ptr [rax+18h], 736E6F69h
mov [rax+10h], rdi
mov qword ptr [rax+8], 0... | long long func0[abi:cxx11](long long a1, int a2, int a3, int a4)
{
long long result; // rax
int v5; // edx
int v6; // esi
result = a1;
v5 = a3 * a3;
v6 = 4 * a4 * a2;
*(_QWORD *)a1 = a1 + 16;
if ( v5 > v6 )
{
*(_QWORD *)(a1 + 8) = 11LL;
strcpy((char *)(a1 + 16), "2 solutions");
}
else if... | func0[abi:cxx11]:
ENDBR64
IMUL ESI,ECX
MOV RAX,RDI
IMUL EDX,EDX
SHL ESI,0x2
CMP EDX,ESI
LEA RDX,[RDI + 0x10]
MOV qword ptr [RDI],RDX
JG 0x00101470
JZ 0x00101498
MOV RDI,0x74756c6f73206f4e
MOV dword ptr [RAX + 0x18],0x736e6f69
MOV qword ptr [RAX + 0x10],RDI
MOV qword ptr [RAX + 0x8],0xc
MOV byte ptr [RAX + 0x1c],0x0
RET... | /* func0[abi:cxx11](int, int, int) */
void func0_abi_cxx11_(int param_1,int param_2,int param_3)
{
int in_ECX;
int iVar1;
int4 in_register_0000003c;
long *plVar2;
plVar2 = (long *)CONCAT44(in_register_0000003c,param_1);
iVar1 = param_2 * in_ECX * 4;
*plVar2 = (long)(plVar2 + 2);
if (iVar1 < param_3... |
3,520 | func0 | #include <vector>
#include <cassert>
#include <algorithm>
| int func0(const std::vector<int>& list1) {
auto it_even = std::find_if(list1.begin(), list1.end(), [](int x) { return x % 2 == 0; });
auto it_odd = std::find_if(list1.begin(), list1.end(), [](int x) { return x % 2 != 0; });
int first_even = (it_even != list1.end()) ? *it_even : -1;
int first_o... | int main() {
assert(func0({1, 3, 5, 7, 4, 1, 6, 8}) == 5);
assert(func0({1, 2, 3, 4, 5, 6, 7, 8, 9, 10}) == 3);
assert(func0({1, 5, 7, 9, 10}) == 11);
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> > const&)::{lambda(int)#1}::operator()(int) const:
push %rbp
mov %rsp,%rbp
mov %rdi,-0x8(%rbp)
mov %esi,-0xc(%rbp)
mov -0xc(%rbp),%eax
and $0x1,%eax
test %eax,%eax
sete %al
pop %rbp
retq
| _ZZ5func0RKSt6vectorIiSaIiEEENKUliE_clEi:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov eax, [rbp+var_C]
and eax, 1
test eax, eax
setz al
pop rbp
retn | bool func0(std::vector<int> const&)::{lambda(int)#1}::operator()(long long a1, char a2)
{
return (a2 & 1) == 0;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RBP + -0x48],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x48]
MOV RDI,RAX
CALL 0x00101ca4
MOV RBX,RAX
MOV RAX,qword ptr [RBP + -0x48]
MOV RDI,RAX
CALL 0x00101c58
MOV RSI,RBX
MOV RDI,RAX
CA... | /* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
bool bVar1;
int iVar2;
int iVar3;
int8 uVar4;
int8 uVar5;
int *piVar6;
long in_FS_OFFSET;
int8 local_38;
int8 local_30;
int8 local_28;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
uVar4 = ... |
3,521 | func0 | #include <vector>
#include <cassert>
#include <algorithm>
| int func0(const std::vector<int>& list1) {
auto it_even = std::find_if(list1.begin(), list1.end(), [](int x) { return x % 2 == 0; });
auto it_odd = std::find_if(list1.begin(), list1.end(), [](int x) { return x % 2 != 0; });
int first_even = (it_even != list1.end()) ? *it_even : -1;
int first_o... | int main() {
assert(func0({1, 3, 5, 7, 4, 1, 6, 8}) == 5);
assert(func0({1, 2, 3, 4, 5, 6, 7, 8, 9, 10}) == 3);
assert(func0({1, 5, 7, 9, 10}) == 11);
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
mov 0x8(%rdi),%rsi
mov (%rdi),%rdx
mov %rsi,%rax
sub %rdx,%rax
sar $0x4,%rax
test %rax,%rax
jle 1306 <_Z5func0RKSt6vectorIiSaIiEE+0xfd>
mov %rax,%rdi
shl $0x4,%rdi
add %rdx,%rdi
mov %rdx,%rcx
testb $0x1,(%rcx)
je 128e <_Z... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
mov r8, [rdi+8]
mov rdx, [rdi]
mov rcx, r8
sub rcx, rdx
sar rcx, 4
test rcx, rcx
jle loc_1307
mov rsi, rcx
shl rsi, 4
add rsi, rdx
mov rax, rdx
loc_1234:
test byte ptr [rax], 1
jz short loc_128C
test byte ptr [rax+4], 1
jz s... | long long func0(long long a1)
{
_BYTE *v1; // r8
_BYTE *v2; // rdx
long long v3; // rcx
_BYTE *v4; // rsi
_BYTE *v5; // rax
long long v6; // rax
_BYTE *v7; // rcx
long long v8; // rdx
int v9; // ecx
int v10; // eax
v1 = *(_BYTE **)(a1 + 8);
v2 = *(_BYTE **)a1;
v3 = (long long)&v1[-*(_QWORD *... | func0:
ENDBR64
MOV R8,qword ptr [RDI + 0x8]
MOV RDX,qword ptr [RDI]
MOV RCX,R8
SUB RCX,RDX
SAR RCX,0x4
TEST RCX,RCX
JLE 0x00101307
MOV RSI,RCX
SHL RSI,0x4
ADD RSI,RDX
MOV RAX,RDX
LAB_00101234:
TEST byte ptr [RAX],0x1
JZ 0x0010128c
TEST byte ptr [RAX + 0x4],0x1
JZ 0x00101288
TEST byte ptr [RAX + 0x8],0x1
JZ 0x001012fb
T... | /* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
byte *pbVar1;
int iVar2;
byte *pbVar3;
long lVar4;
int iVar5;
long lVar6;
byte *pbVar7;
byte *pbVar8;
byte *pbVar9;
pbVar1 = *(byte **)(param_1 + 8);
pbVar8 = *(byte **)param_1;
lVar6 = (long)pbVar1 - (l... |
3,522 | func0 | #include <vector>
#include <cassert>
#include <algorithm>
| int func0(const std::vector<int>& list1) {
auto it_even = std::find_if(list1.begin(), list1.end(), [](int x) { return x % 2 == 0; });
auto it_odd = std::find_if(list1.begin(), list1.end(), [](int x) { return x % 2 != 0; });
int first_even = (it_even != list1.end()) ? *it_even : -1;
int first_o... | int main() {
assert(func0({1, 3, 5, 7, 4, 1, 6, 8}) == 5);
assert(func0({1, 2, 3, 4, 5, 6, 7, 8, 9, 10}) == 3);
assert(func0({1, 5, 7, 9, 10}) == 11);
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
mov 0x8(%rdi),%rsi
mov (%rdi),%rdx
mov %rsi,%rax
sub %rdx,%rax
mov %rax,%r8
sar $0x4,%rax
sar $0x2,%r8
test %rax,%rax
jle 15c8 <_Z5func0RKSt6vectorIiSaIiEE+0x1c8>
mov %rax,%rdi
mov %rdx,%rcx
shl $0x4,%rdi
add %rdx,%rdi
j... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
mov r8, [rdi+8]
mov rdx, [rdi]
mov rax, r8
sub rax, rdx
mov rdi, rax
sar rax, 4
sar rdi, 2
test rax, rax
jle loc_1550
mov rsi, rax
mov rcx, rdx
shl rsi, 4
add rsi, rdx
jmp short loc_13F3
loc_13C8:
test byte ptr [rcx+4], 1
jz ... | long long func0(long long a1)
{
_BYTE *v1; // r8
_BYTE *v2; // rdx
long long v3; // rdi
long long v4; // rax
long long v5; // rdi
_BYTE *v6; // rcx
_BYTE *v7; // rax
int v8; // eax
long long result; // rax
long long v10; // rsi
v1 = *(_BYTE **)(a1 + 8);
v2 = *(_BYTE **)a1;
v3 = (long long)&v... | func0:
ENDBR64
MOV R8,qword ptr [RDI + 0x8]
MOV RDX,qword ptr [RDI]
MOV RAX,R8
SUB RAX,RDX
MOV RDI,RAX
SAR RAX,0x4
SAR RDI,0x2
TEST RAX,RAX
JLE 0x00101550
MOV RSI,RAX
MOV RCX,RDX
SHL RSI,0x4
ADD RSI,RDX
JMP 0x001013f3
LAB_001013c8:
TEST byte ptr [RCX + 0x4],0x1
JZ 0x00101490
TEST byte ptr [RCX + 0x8],0x1
JZ 0x001014a0
... | /* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
byte *pbVar1;
int iVar2;
long lVar3;
byte *pbVar4;
byte *pbVar5;
byte *pbVar6;
long lVar7;
long lVar8;
pbVar1 = *(byte **)(param_1 + 8);
pbVar6 = *(byte **)param_1;
lVar3 = (long)pbVar1 - (long)pbVar6 >> 4... |
3,523 | func0 | #include <vector>
#include <cassert>
#include <algorithm>
| int func0(const std::vector<int>& list1) {
auto it_even = std::find_if(list1.begin(), list1.end(), [](int x) { return x % 2 == 0; });
auto it_odd = std::find_if(list1.begin(), list1.end(), [](int x) { return x % 2 != 0; });
int first_even = (it_even != list1.end()) ? *it_even : -1;
int first_o... | int main() {
assert(func0({1, 3, 5, 7, 4, 1, 6, 8}) == 5);
assert(func0({1, 2, 3, 4, 5, 6, 7, 8, 9, 10}) == 3);
assert(func0({1, 5, 7, 9, 10}) == 11);
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
mov 0x8(%rdi),%rsi
mov (%rdi),%rdx
mov %rsi,%rax
sub %rdx,%rax
mov %rax,%r8
sar $0x4,%rax
sar $0x2,%r8
test %rax,%rax
jle 1578 <_Z5func0RKSt6vectorIiSaIiEE+0x1c8>
mov %rax,%rdi
mov %rdx,%rcx
shl $0x4,%rdi
add %rdx,%rdi
j... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
mov r8, [rdi+8]
mov rdx, [rdi]
mov rax, r8
sub rax, rdx
mov rdi, rax
sar rax, 4
sar rdi, 2
test rax, rax
jle loc_1550
mov rsi, rax
mov rcx, rdx
shl rsi, 4
add rsi, rdx
jmp short loc_13F3
loc_13C8:
test byte ptr [rcx+4], 1
jz ... | long long func0(long long a1)
{
_BYTE *v1; // r8
_BYTE *v2; // rdx
long long v3; // rdi
long long v4; // rax
long long v5; // rdi
_BYTE *v6; // rcx
_BYTE *v7; // rax
int v8; // eax
long long result; // rax
long long v10; // rsi
v1 = *(_BYTE **)(a1 + 8);
v2 = *(_BYTE **)a1;
v3 = (long long)&v... | func0:
ENDBR64
MOV R8,qword ptr [RDI + 0x8]
MOV RDX,qword ptr [RDI]
MOV RAX,R8
SUB RAX,RDX
MOV RDI,RAX
SAR RAX,0x4
SAR RDI,0x2
TEST RAX,RAX
JLE 0x00101550
MOV RSI,RAX
MOV RCX,RDX
SHL RSI,0x4
ADD RSI,RDX
JMP 0x001013f3
LAB_001013c8:
TEST byte ptr [RCX + 0x4],0x1
JZ 0x00101490
TEST byte ptr [RCX + 0x8],0x1
JZ 0x001014a0
... | /* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
byte *pbVar1;
int iVar2;
long lVar3;
byte *pbVar4;
byte *pbVar5;
byte *pbVar6;
long lVar7;
long lVar8;
pbVar1 = *(byte **)(param_1 + 8);
pbVar6 = *(byte **)param_1;
lVar3 = (long)pbVar1 - (long)pbVar6 >> 4... |
3,524 | func0 |
#include <assert.h>
| int func0(int b, int h) {
int perimeter = 2 * (b * h);
return perimeter;
}
| int main() {
assert(func0(10, 20) == 400);
assert(func0(15, 20) == 600);
assert(func0(8, 9) == 144);
return 0;
}
| O0 | cpp | func0(int, int):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
mov %esi,-0x18(%rbp)
mov -0x14(%rbp),%eax
imul -0x18(%rbp),%eax
add %eax,%eax
mov %eax,-0x4(%rbp)
mov -0x4(%rbp),%eax
pop %rbp
retq
| _Z5func0ii:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_14], edi
mov [rbp+var_18], esi
mov eax, [rbp+var_14]
imul eax, [rbp+var_18]
add eax, eax
mov [rbp+var_4], eax
mov eax, [rbp+var_4]
pop rbp
retn | long long func0(int a1, int a2)
{
return (unsigned int)(2 * a2 * a1);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x14],EDI
MOV dword ptr [RBP + -0x18],ESI
MOV EAX,dword ptr [RBP + -0x14]
IMUL EAX,dword ptr [RBP + -0x18]
ADD EAX,EAX
MOV dword ptr [RBP + -0x4],EAX
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET | /* func0(int, int) */
int func0(int param_1,int param_2)
{
return param_1 * param_2 * 2;
} |
3,525 | func0 |
#include <assert.h>
| int func0(int b, int h) {
int perimeter = 2 * (b * h);
return perimeter;
}
| int main() {
assert(func0(10, 20) == 400);
assert(func0(15, 20) == 600);
assert(func0(8, 9) == 144);
return 0;
}
| O1 | cpp | func0(int, int):
endbr64
imul %esi,%edi
lea (%rdi,%rdi,1),%eax
retq
| _Z5func0ii:
endbr64
imul edi, esi
lea eax, [rdi+rdi]
retn | long long func0(int a1, int a2)
{
return (unsigned int)(2 * a2 * a1);
} | func0:
ENDBR64
IMUL EDI,ESI
LEA EAX,[RDI + RDI*0x1]
RET | /* func0(int, int) */
int func0(int param_1,int param_2)
{
return param_1 * param_2 * 2;
} |
3,526 | func0 |
#include <assert.h>
| int func0(int b, int h) {
int perimeter = 2 * (b * h);
return perimeter;
}
| int main() {
assert(func0(10, 20) == 400);
assert(func0(15, 20) == 600);
assert(func0(8, 9) == 144);
return 0;
}
| O2 | cpp | func0(int, int):
endbr64
imul %esi,%edi
lea (%rdi,%rdi,1),%eax
retq
nopl 0x0(%rax,%rax,1)
| _Z5func0ii:
endbr64
imul edi, esi
lea eax, [rdi+rdi]
retn | long long func0(int a1, int a2)
{
return (unsigned int)(2 * a2 * a1);
} | func0:
ENDBR64
IMUL EDI,ESI
LEA EAX,[RDI + RDI*0x1]
RET | /* func0(int, int) */
int func0(int param_1,int param_2)
{
return param_1 * param_2 * 2;
} |
3,527 | func0 |
#include <assert.h>
| int func0(int b, int h) {
int perimeter = 2 * (b * h);
return perimeter;
}
| int main() {
assert(func0(10, 20) == 400);
assert(func0(15, 20) == 600);
assert(func0(8, 9) == 144);
return 0;
}
| O3 | cpp | func0(int, int):
endbr64
imul %esi,%edi
lea (%rdi,%rdi,1),%eax
retq
nopl 0x0(%rax,%rax,1)
| _Z5func0ii:
endbr64
imul edi, esi
lea eax, [rdi+rdi]
retn | long long func0(int a1, int a2)
{
return (unsigned int)(2 * a2 * a1);
} | func0:
ENDBR64
IMUL EDI,ESI
LEA EAX,[RDI + RDI*0x1]
RET | /* func0(int, int) */
int func0(int param_1,int param_2)
{
return param_1 * param_2 * 2;
} |
3,528 | func0 | #include <vector>
#include <assert.h>
| std::vector<int> func0(const std::vector<int>& nums, int m, int n) {
std::vector<int> result;
for(int num : nums) {
if(num % m == 0 && num % n == 0) {
result.push_back(num);
}
}
return result;
}
| int main() {
assert((func0({19, 65, 57, 39, 152, 639, 121, 44, 90, 190}, 2, 4) == std::vector<int>{152, 44}));
assert((func0({1, 2, 3, 5, 7, 8, 10}, 2, 5) == std::vector<int>{10}));
assert((func0({10, 15, 14, 13, 18, 12, 20}, 10, 5) == std::vector<int>{10, 20}));
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> > const&, int, int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x58,%rsp
mov %rdi,-0x48(%rbp)
mov %rsi,-0x50(%rbp)
mov %edx,-0x54(%rbp)
mov %ecx,-0x58(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x48(%rbp),%rax
mov ... | _Z5func0RKSt6vectorIiSaIiEEii:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 58h
mov [rbp+var_48], rdi
mov [rbp+var_50], rsi
mov [rbp+var_54], edx
mov [rbp+var_58], ecx
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_48]
mov rdi, rax
call _ZNSt... | long long func0(long long a1, long long a2, int a3, int a4)
{
int v7; // [rsp+2Ch] [rbp-34h] BYREF
long long v8; // [rsp+30h] [rbp-30h] BYREF
_QWORD v9[4]; // [rsp+38h] [rbp-28h] BYREF
v9[2] = __readfsqword(0x28u);
std::vector<int>::vector(a1);
v9[1] = a2;
v8 = std::vector<int>::begin(a2);
v9[0] = std... | 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 dword ptr [RBP + -0x54],EDX
MOV dword ptr [RBP + -0x58],ECX
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 0x00101a70
MO... | /* func0(std::vector<int, std::allocator<int> > const&, int, int) */
vector * func0(vector *param_1,int param_2,int param_3)
{
bool bVar1;
int *piVar2;
int in_ECX;
int4 in_register_00000034;
long in_FS_OFFSET;
int local_3c;
int8 local_38;
int8 local_30;
vector<int,std::allocator<int>> *local_28;
l... |
3,529 | func0 | #include <vector>
#include <assert.h>
| std::vector<int> func0(const std::vector<int>& nums, int m, int n) {
std::vector<int> result;
for(int num : nums) {
if(num % m == 0 && num % n == 0) {
result.push_back(num);
}
}
return result;
}
| int main() {
assert((func0({19, 65, 57, 39, 152, 639, 121, 44, 90, 190}, 2, 4) == std::vector<int>{152, 44}));
assert((func0({1, 2, 3, 5, 7, 8, 10}, 2, 5) == std::vector<int>{10}));
assert((func0({10, 15, 14, 13, 18, 12, 20}, 10, 5) == std::vector<int>{10, 20}));
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> > const&, int, int):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x18,%rsp
mov %rdi,%r12
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi)
movq $0x0,0x10(%rdi)
mov (%rsi),%rb... | _Z5func0RKSt6vectorIiSaIiEEii:
endbr64
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 10h
mov r12, rdi
mov ebp, edx
mov r13d, ecx
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], ... | _QWORD * func0(_QWORD *a1, int **a2, int a3, int a4)
{
int *v6; // rbx
int *v7; // r14
int v9; // ecx
_DWORD *v10; // rsi
int v11; // [rsp+4h] [rbp-34h] BYREF
unsigned long long v12; // [rsp+8h] [rbp-30h]
v12 = __readfsqword(0x28u);
*a1 = 0LL;
a1[1] = 0LL;
a1[2] = 0LL;
v6 = *a2;
v7 = a2[1];
i... | func0:
ENDBR64
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x10
MOV R12,RDI
MOV EBP,EDX
MOV R13D,ECX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
MOV qword ptr [RDI],0x0
MOV qword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
MOV RBX,qword ptr [RSI]
MOV R14,qword ptr [RSI + 0x8]
C... | /* func0(std::vector<int, std::allocator<int> > const&, int, int) */
vector * func0(vector *param_1,int param_2,int param_3)
{
int *piVar1;
int *piVar2;
int in_ECX;
int *piVar3;
int4 in_register_00000034;
long in_FS_OFFSET;
int local_34;
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
... |
3,530 | func0 | #include <vector>
#include <assert.h>
| std::vector<int> func0(const std::vector<int>& nums, int m, int n) {
std::vector<int> result;
for(int num : nums) {
if(num % m == 0 && num % n == 0) {
result.push_back(num);
}
}
return result;
}
| int main() {
assert((func0({19, 65, 57, 39, 152, 639, 121, 44, 90, 190}, 2, 4) == std::vector<int>{152, 44}));
assert((func0({1, 2, 3, 5, 7, 8, 10}, 2, 5) == std::vector<int>{10}));
assert((func0({10, 15, 14, 13, 18, 12, 20}, 10, 5) == std::vector<int>{10, 20}));
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> > const&, int, int):
endbr64
push %r15
push %r14
push %r13
mov %rdi,%r13
push %r12
push %rbp
push %rbx
sub $0x18,%rsp
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi)
movq $0x0,0x10(%rdi)
mov (%rsi),%rb... | _Z5func0RKSt6vectorIiSaIiEEii:
endbr64
push r14
pxor xmm0, xmm0
mov r14, rdi
push r13
push r12
push rbp
push rbx
sub rsp, 10h
mov rax, fs:28h
mov [rsp+38h+var_30], rax
xor eax, eax
mov qword ptr [rdi+10h], 0
movups xmmword ptr [rdi], xmm0
mov rbx, [rsi]
mov r13, [rsi+8... | long long func0(long long a1, int **a2, int a3, int a4)
{
int *v4; // rbx
int *v5; // r13
_DWORD *v8; // rsi
int v10; // [rsp+0h] [rbp-34h] BYREF
unsigned long long v11; // [rsp+4h] [rbp-30h]
v11 = __readfsqword(0x28u);
*(_QWORD *)(a1 + 16) = 0LL;
*(_OWORD *)a1 = 0LL;
v4 = *a2;
v5 = a2[1];
if ( ... | func0:
ENDBR64
PUSH R14
PXOR XMM0,XMM0
MOV R14,RDI
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x10
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
MOV qword ptr [RDI + 0x10],0x0
MOVUPS xmmword ptr [RDI],XMM0
MOV RBX,qword ptr [RSI]
MOV R13,qword ptr [RSI + 0x8]
CMP R13,RBX
JZ 0x001016c0
MOV EBP,E... | /* func0(std::vector<int, std::allocator<int> > const&, int, int) */
vector * func0(vector *param_1,int param_2,int param_3)
{
int *piVar1;
int *piVar2;
int in_ECX;
int *piVar3;
int4 in_register_00000034;
long in_FS_OFFSET;
int local_34;
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
... |
3,531 | func0 | #include <vector>
#include <assert.h>
| std::vector<int> func0(const std::vector<int>& nums, int m, int n) {
std::vector<int> result;
for(int num : nums) {
if(num % m == 0 && num % n == 0) {
result.push_back(num);
}
}
return result;
}
| int main() {
assert((func0({19, 65, 57, 39, 152, 639, 121, 44, 90, 190}, 2, 4) == std::vector<int>{152, 44}));
assert((func0({1, 2, 3, 5, 7, 8, 10}, 2, 5) == std::vector<int>{10}));
assert((func0({10, 15, 14, 13, 18, 12, 20}, 10, 5) == std::vector<int>{10, 20}));
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> > const&, int, int):
endbr64
push %r15
pxor %xmm0,%xmm0
push %r14
mov %rdi,%r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x18,%rsp
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
movq $0x0,0x10(%rdi)
movups %xmm0,(%rdi)
mov (%rsi),%rbx
... | _Z5func0RKSt6vectorIiSaIiEEii:
endbr64
push r14
pxor xmm0, xmm0
mov r14, rdi
push r13
push r12
push rbp
push rbx
sub rsp, 10h
mov rax, fs:28h
mov [rsp+38h+var_30], rax
xor eax, eax
mov qword ptr [rdi+10h], 0
movups xmmword ptr [rdi], xmm0
mov rbx, [rsi]
mov r13, [rsi+8... | long long func0(long long a1, int **a2, int a3, int a4)
{
int *v4; // rbx
int *v5; // r13
_DWORD *v8; // rsi
int v10; // [rsp+0h] [rbp-34h] BYREF
unsigned long long v11; // [rsp+4h] [rbp-30h]
v11 = __readfsqword(0x28u);
*(_QWORD *)(a1 + 16) = 0LL;
*(_OWORD *)a1 = 0LL;
v4 = *a2;
v5 = a2[1];
if ( ... | func0:
ENDBR64
PUSH R14
PXOR XMM0,XMM0
MOV R14,RDI
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x10
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
MOV qword ptr [RDI + 0x10],0x0
MOVUPS xmmword ptr [RDI],XMM0
MOV RBX,qword ptr [RSI]
MOV R13,qword ptr [RSI + 0x8]
CMP R13,RBX
JZ 0x001016c0
MOV EBP,E... | /* func0(std::vector<int, std::allocator<int> > const&, int, int) */
vector * func0(vector *param_1,int param_2,int param_3)
{
int *piVar1;
int *piVar2;
int in_ECX;
int *piVar3;
int4 in_register_00000034;
long in_FS_OFFSET;
int local_34;
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
... |
3,532 | func0 |
#include <assert.h>
| bool func0(int n, int l, int r) {
int num = ((1 << r) - 1) ^ ((1 << (l - 1)) - 1);
int new_num = n & num;
return (num == new_num);
}
| int main() {
assert(func0(10, 2, 1) == true);
assert(func0(5, 2, 4) == false);
assert(func0(22, 2, 3) == true);
return 0;
}
| O0 | cpp | func0(int, int, int):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
mov %esi,-0x18(%rbp)
mov %edx,-0x1c(%rbp)
mov -0x1c(%rbp),%eax
mov $0x1,%edx
mov %eax,%ecx
shl %cl,%edx
mov %edx,%eax
lea -0x1(%rax),%edx
mov -0x18(%rbp),%eax
sub $0x1,%eax
mov $0x1,%esi
mov %eax,%ecx
... | _Z5func0iii:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_14], edi
mov [rbp+var_18], esi
mov [rbp+var_1C], edx
mov eax, [rbp+var_1C]
mov edx, 1
mov ecx, eax
shl edx, cl
mov eax, edx
lea edx, [rax-1]
mov eax, [rbp+var_18]
sub eax, 1
mov esi, 1
mov ecx, eax
shl ... | bool func0(int a1, char a2, char a3)
{
int v4; // [rsp+14h] [rbp-8h]
v4 = ((1 << a3) - 1) ^ ((1 << (a2 - 1)) - 1);
return v4 == (v4 & a1);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x14],EDI
MOV dword ptr [RBP + -0x18],ESI
MOV dword ptr [RBP + -0x1c],EDX
MOV EAX,dword ptr [RBP + -0x1c]
MOV EDX,0x1
MOV ECX,EAX
SHL EDX,CL
MOV EAX,EDX
LEA EDX,[RAX + -0x1]
MOV EAX,dword ptr [RBP + -0x18]
SUB EAX,0x1
MOV ESI,0x1
MOV ECX,EAX
SHL ESI,CL
MOV EAX,E... | /* func0(int, int, int) */
int4 func0(int param_1,int param_2,int param_3)
{
uint uVar1;
uVar1 = (1 << ((char)param_2 - 1U & 0x1f)) - 1U ^ (1 << ((byte)param_3 & 0x1f)) - 1U;
return CONCAT31((int3)(uVar1 >> 8),uVar1 == (param_1 & uVar1));
} |
3,533 | func0 |
#include <assert.h>
| bool func0(int n, int l, int r) {
int num = ((1 << r) - 1) ^ ((1 << (l - 1)) - 1);
int new_num = n & num;
return (num == new_num);
}
| int main() {
assert(func0(10, 2, 1) == true);
assert(func0(5, 2, 4) == false);
assert(func0(22, 2, 3) == true);
return 0;
}
| O1 | cpp | func0(int, int, int):
endbr64
lea -0x1(%rsi),%ecx
mov $0x1,%r8d
mov %r8d,%eax
shl %cl,%eax
sub $0x1,%eax
mov %edx,%ecx
shl %cl,%r8d
sub $0x1,%r8d
xor %r8d,%eax
and %eax,%edi
cmp %eax,%edi
sete %al
retq
| _Z5func0iii:
endbr64
lea ecx, [rsi-1]
mov eax, 1
mov esi, eax
shl esi, cl
sub esi, 1
mov ecx, edx
shl eax, cl
sub eax, 1
xor esi, eax
not edi
test edi, esi
setz al
retn | bool func0(int a1, char a2, char a3)
{
return ((((1 << a3) - 1) ^ ((1 << (a2 - 1)) - 1)) & ~a1) == 0;
} | func0:
ENDBR64
LEA ECX,[RSI + -0x1]
MOV EAX,0x1
MOV ESI,EAX
SHL ESI,CL
SUB ESI,0x1
MOV ECX,EDX
SHL EAX,CL
SUB EAX,0x1
XOR ESI,EAX
NOT EDI
TEST EDI,ESI
SETZ AL
RET | /* func0(int, int, int) */
int4 func0(int param_1,int param_2,int param_3)
{
uint uVar1;
uVar1 = (1 << ((byte)param_3 & 0x1f)) - 1;
return CONCAT31((int3)(uVar1 >> 8),
(~param_1 & ((1 << ((char)param_2 - 1U & 0x1f)) - 1U ^ uVar1)) == 0);
} |
3,534 | func0 |
#include <assert.h>
| bool func0(int n, int l, int r) {
int num = ((1 << r) - 1) ^ ((1 << (l - 1)) - 1);
int new_num = n & num;
return (num == new_num);
}
| int main() {
assert(func0(10, 2, 1) == true);
assert(func0(5, 2, 4) == false);
assert(func0(22, 2, 3) == true);
return 0;
}
| O2 | cpp | func0(int, int, int):
endbr64
mov $0x1,%r8d
lea -0x1(%rsi),%ecx
mov %r8d,%eax
shl %cl,%eax
mov %edx,%ecx
shl %cl,%r8d
sub $0x1,%eax
sub $0x1,%r8d
xor %r8d,%eax
and %eax,%edi
cmp %eax,%edi
sete %al
retq
nopl 0x0(%rax)
| _Z5func0iii:
endbr64
mov eax, 1
lea ecx, [rsi-1]
not edi
mov esi, eax
shl esi, cl
mov ecx, edx
shl eax, cl
sub esi, 1
sub eax, 1
xor esi, eax
test edi, esi
setz al
retn | bool func0(int a1, char a2, char a3)
{
return ((((1 << a3) - 1) ^ ((1 << (a2 - 1)) - 1)) & ~a1) == 0;
} | func0:
ENDBR64
MOV EAX,0x1
LEA ECX,[RSI + -0x1]
NOT EDI
MOV ESI,EAX
SHL ESI,CL
MOV ECX,EDX
SHL EAX,CL
SUB ESI,0x1
SUB EAX,0x1
XOR ESI,EAX
TEST EDI,ESI
SETZ AL
RET | /* func0(int, int, int) */
int4 func0(int param_1,int param_2,int param_3)
{
uint uVar1;
uVar1 = (1 << ((byte)param_3 & 0x1f)) - 1;
return CONCAT31((int3)(uVar1 >> 8),
(~param_1 & ((1 << ((char)param_2 - 1U & 0x1f)) - 1U ^ uVar1)) == 0);
} |
3,535 | func0 |
#include <assert.h>
| bool func0(int n, int l, int r) {
int num = ((1 << r) - 1) ^ ((1 << (l - 1)) - 1);
int new_num = n & num;
return (num == new_num);
}
| int main() {
assert(func0(10, 2, 1) == true);
assert(func0(5, 2, 4) == false);
assert(func0(22, 2, 3) == true);
return 0;
}
| O3 | cpp | func0(int, int, int):
endbr64
mov $0x1,%r8d
lea -0x1(%rsi),%ecx
mov %r8d,%eax
shl %cl,%eax
mov %edx,%ecx
shl %cl,%r8d
sub $0x1,%eax
sub $0x1,%r8d
xor %r8d,%eax
and %eax,%edi
cmp %eax,%edi
sete %al
retq
nopl 0x0(%rax)
| _Z5func0iii:
endbr64
mov eax, 1
lea ecx, [rsi-1]
not edi
mov esi, eax
shl esi, cl
mov ecx, edx
shl eax, cl
sub esi, 1
sub eax, 1
xor esi, eax
test edi, esi
setz al
retn | bool func0(int a1, char a2, char a3)
{
return ((((1 << a3) - 1) ^ ((1 << (a2 - 1)) - 1)) & ~a1) == 0;
} | func0:
ENDBR64
MOV EAX,0x1
LEA ECX,[RSI + -0x1]
NOT EDI
MOV ESI,EAX
SHL ESI,CL
MOV ECX,EDX
SHL EAX,CL
SUB ESI,0x1
SUB EAX,0x1
XOR ESI,EAX
TEST EDI,ESI
SETZ AL
RET | /* func0(int, int, int) */
int4 func0(int param_1,int param_2,int param_3)
{
uint uVar1;
uVar1 = (1 << ((byte)param_3 & 0x1f)) - 1;
return CONCAT31((int3)(uVar1 >> 8),
(~param_1 & ((1 << ((char)param_2 - 1U & 0x1f)) - 1U ^ uVar1)) == 0);
} |
3,536 | func0 |
#include <iostream>
#include <string>
#include <map>
#include <vector>
#include <algorithm>
#include <assert.h>
| bool func0(std::string str1, std::string str2) {
std::map<char, std::vector<int>> dict_str1, dict_str2;
for (int i = 0; i < str1.size(); ++i) {
dict_str1[str1[i]].push_back(i);
}
for (int i = 0; i < str2.size(); ++i) {
dict_str2[str2[i]].push_back(i);
}
std::v... | int main() {
assert(func0("paper", "title") == true);
assert(func0("ab", "ba") == true);
assert(func0("ab", "aa") == false);
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 $0xf8,%rsp
mov %rdi,-0xf8(%rbp)
mov %rsi,-0x100(%rbp)
mov %fs:0x28,%rax
mov %rax,-0... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 0F8h
mov [rbp+var_F8], rdi
mov [rbp+var_100], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_80]
mov rdi, rax
call _ZNSt3mapIcSt6vectorI... | long long func0(long long a1, long long a2)
{
long long v2; // rax
long long v3; // rax
unsigned long long v4; // rbx
long long v5; // rax
long long v6; // rax
unsigned long long v7; // rbx
long long v8; // rbx
long long v9; // rax
long long v10; // rbx
long long v11; // rax
long long v13; // [rs... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0xf8
MOV qword ptr [RBP + -0xf8],RDI
MOV qword ptr [RBP + -0x100],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x80]
MOV RDI,RAX
CALL 0x00102df6
LEA RAX,[RBP + -0x50]
MOV RDI,RAX
CALL 0x00102df6
MOV dword ptr [RBP + -0xa... | /* func0(std::string, std::string) */
ulong func0(ulong param_1,ulong param_2)
{
char cVar1;
bool bVar2;
__normal_iterator _Var3;
__normal_iterator _Var4;
ulong uVar5;
char *pcVar6;
vector<int,std::allocator<int>> *pvVar7;
int7 extraout_var;
ulong uVar8;
long in_FS_OFFSET;
int8 local_f8;
int8 ... |
3,537 | func0 |
#include <iostream>
#include <string>
#include <map>
#include <vector>
#include <algorithm>
#include <assert.h>
| bool func0(std::string str1, std::string str2) {
std::map<char, std::vector<int>> dict_str1, dict_str2;
for (int i = 0; i < str1.size(); ++i) {
dict_str1[str1[i]].push_back(i);
}
for (int i = 0; i < str2.size(); ++i) {
dict_str2[str2[i]].push_back(i);
}
std::v... | int main() {
assert(func0("paper", "title") == true);
assert(func0("ab", "ba") == true);
assert(func0("ab", "aa") == false);
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
sub $0xc0,%rsp
mov %rsi,%rbx
mov %fs:0x28,%rax
mov %rax,0xb8(%rsp)
xor ... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 0E8h
mov r12, rsi
mov rax, fs:28h
mov [rsp+118h+var_40], rax
xor eax, eax
mov [rsp+118h+var_A0], 0
mov [rsp+118h+var_98], 0
lea rax, [... | long long func0(_QWORD *a1, _QWORD *a2)
{
unsigned long long v3; // rbx
long long v4; // rax
char *v5; // rsi
_DWORD *v6; // rax
char v7; // dl
unsigned long long v8; // rbx
long long v9; // rax
char *v10; // rsi
_DWORD *v11; // rax
char v12; // dl
long long v13; // rbp
struct _Unwind_Exception... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0xe8
MOV R12,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0xd8],RAX
XOR EAX,EAX
MOV dword ptr [RSP + 0x78],0x0
MOV qword ptr [RSP + 0x80],0x0
LEA RAX,[RSP + 0x78]
MOV qword ptr [RSP + 0x88],RAX
MOV qword ptr [RSP + 0x90],RAX
MOV qword ... | /* WARNING: Removing unreachable block (ram,0x001019b7) */
/* WARNING: Removing unreachable block (ram,0x00101aea) */
/* func0(std::string, std::string) */
int8 func0(long *param_1,long *param_2)
{
char cVar1;
int *piVar2;
int4 *puVar3;
void *pvVar4;
long lVar5;
int8 *puVar6;
_Rb_tree_iterator _Var7;
... |
3,538 | func0 |
#include <iostream>
#include <string>
#include <map>
#include <vector>
#include <algorithm>
#include <assert.h>
| bool func0(std::string str1, std::string str2) {
std::map<char, std::vector<int>> dict_str1, dict_str2;
for (int i = 0; i < str1.size(); ++i) {
dict_str1[str1[i]].push_back(i);
}
for (int i = 0; i < str2.size(); ++i) {
dict_str2[str2[i]].push_back(i);
}
std::v... | int main() {
assert(func0("paper", "title") == true);
assert(func0("ab", "ba") == true);
assert(func0("ab", "aa") == false);
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 %r15
push %r14
push %r13
push %r12
push %rbp
mov %rsi,%rbp
push %rbx
sub $0xe8,%rsp
mov %fs:0x28,%rax
mov %rax,0xd... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_:
endbr64
push r15
push r14
mov r14, rsi
push r13
push r12
push rbp
push rbx
sub rsp, 0E8h
mov rax, fs:28h
mov [rsp+118h+var_40], rax
xor eax, eax
lea r12, [rsp+118h+var_A0]
cmp qword ptr [rdi+8], 0
lea r13,... | long long func0(_QWORD *a1, _QWORD *a2)
{
char *v3; // rax
int *v4; // r12
bool v5; // zf
unsigned long long v7; // rbx
int v8; // ebp
char v9; // di
char *v10; // rsi
long long v11; // rdx
long long v12; // rcx
long long v13; // rax
long long v14; // rax
unsigned long long v15; // rbx
char *... | func0:
ENDBR64
PUSH R15
PUSH R14
MOV R14,RSI
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0xe8
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0xd8],RAX
XOR EAX,EAX
LEA R12,[RSP + 0x78]
CMP qword ptr [RDI + 0x8],0x0
LEA R13,[RSP + 0xa8]
MOV dword ptr [RSP + 0x78],0x0
MOV qword ptr [RSP + 0x80],0x0
MOV qword ptr [RSP + ... | /* func0(std::string, std::string) */
int8 func0(long *param_1,long *param_2,int8 param_3,tuple *param_4)
{
char cVar1;
int *piVar2;
int4 *puVar3;
void *pvVar4;
long lVar5;
int auVar6 [16];
_Rb_tree_iterator _Var7;
int iVar8;
int4 extraout_var;
int4 extraout_var_00;
tuple *ptVar9;
int4 *puVar1... |
3,539 | func0 |
#include <iostream>
#include <string>
#include <map>
#include <vector>
#include <algorithm>
#include <assert.h>
| bool func0(std::string str1, std::string str2) {
std::map<char, std::vector<int>> dict_str1, dict_str2;
for (int i = 0; i < str1.size(); ++i) {
dict_str1[str1[i]].push_back(i);
}
for (int i = 0; i < str2.size(); ++i) {
dict_str2[str2[i]].push_back(i);
}
std::v... | int main() {
assert(func0("paper", "title") == true);
assert(func0("ab", "ba") == true);
assert(func0("ab", "aa") == false);
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 $0xe8,%rsp
mov %rdi,0x10(%rsp)
lea 0x78(%rsp),%rbx
lea ... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_:
endbr64
push r15
push r14
mov r14, rsi
push r13
push r12
push rbp
push rbx
sub rsp, 0E8h
mov rax, fs:28h
mov [rsp+118h+var_40], rax
xor eax, eax
lea r12, [rsp+118h+var_A0]
cmp qword ptr [rdi+8], 0
lea r13,... | long long func0(_QWORD *a1, _QWORD *a2)
{
int *v3; // r12
bool v4; // zf
unsigned long long v6; // rbx
int *i; // rsi
int v8; // ebp
char v9; // cl
int *v10; // rdi
int *v11; // rdx
long long v12; // rax
long long v13; // rax
long long v14; // rax
unsigned long long v15; // rbx
int *v16; // r... | func0:
ENDBR64
PUSH R15
PUSH R14
MOV R14,RSI
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0xe8
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0xd8],RAX
XOR EAX,EAX
LEA R12,[RSP + 0x78]
CMP qword ptr [RDI + 0x8],0x0
LEA R13,[RSP + 0xa8]
MOV dword ptr [RSP + 0x78],0x0
MOV qword ptr [RSP + 0x80],0x0
MOV qword ptr [RSP + ... | /* func0(std::string, std::string) */
int8 func0(long *param_1,long *param_2,int8 param_3,tuple *param_4)
{
_Rb_tree_node_base _Var1;
byte bVar2;
int *piVar3;
int4 *puVar4;
void *pvVar5;
long lVar6;
int auVar7 [16];
_Rb_tree_node_base *p_Var8;
_Rb_tree_iterator _Var9;
int iVar10;
int4 extraout_v... |
3,540 | func0 |
#include <vector>
#include <cassert>
| double func0(const std::vector<int>& numbers) {
double total = 0;
for(int num : numbers){
total += num;
}
return total / numbers.size();
}
| int main() {
assert(func0({8, 2, 3, 0, 7}) == 4.0);
assert(func0({-10, -20, -30}) == -20.0);
assert(func0({19, 15, 18}) == 17.333333333333332);
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
pxor %xmm0,%xmm0
movsd %xmm0,-0x18(%rbp)
mov -0x38(%rbp),%rax
mov %rax,-0x10(%rbp)
mov -0x10(%rbp),%rax
mov %ra... | _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
pxor xmm0, xmm0
movsd [rbp+var_18], xmm0
mov rax, [rbp+var_38]
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov rdi, rax
call ... | unsigned long long func0(long long a1)
{
int *v1; // rax
long long v3; // [rsp+18h] [rbp-28h] BYREF
long long v4; // [rsp+20h] [rbp-20h] BYREF
double v5; // [rsp+28h] [rbp-18h]
long long v6; // [rsp+30h] [rbp-10h]
unsigned long long v7; // [rsp+38h] [rbp-8h]
v7 = __readfsqword(0x28u);
v5 = 0.0;
v6 =... | 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
PXOR XMM0,XMM0
MOVSD qword ptr [RBP + -0x18],XMM0
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,RAX
CALL 0x001... | /* func0(std::vector<int, std::allocator<int> > const&) */
double func0(vector *param_1)
{
bool bVar1;
int *piVar2;
ulong uVar3;
long in_FS_OFFSET;
int8 local_30;
int8 local_28;
double local_20;
vector<int,std::allocator<int>> *local_18;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);... |
3,541 | func0 |
#include <vector>
#include <cassert>
| double func0(const std::vector<int>& numbers) {
double total = 0;
for(int num : numbers){
total += num;
}
return total / numbers.size();
}
| int main() {
assert(func0({8, 2, 3, 0, 7}) == 4.0);
assert(func0({-10, -20, -30}) == -20.0);
assert(func0({19, 15, 18}) == 17.333333333333332);
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
mov (%rdi),%rcx
mov 0x8(%rdi),%rdx
cmp %rcx,%rdx
je 124c <_Z5func0RKSt6vectorIiSaIiEE+0x43>
mov %rcx,%rax
pxor %xmm0,%xmm0
pxor %xmm1,%xmm1
cvtsi2sdl (%rax),%xmm1
addsd %xmm1,%xmm0
add $0x4,%rax
cmp %rax,%rdx
jne 1220 <_Z5func0R... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
mov rcx, [rdi]
mov rdx, [rdi+8]
cmp rcx, rdx
jz short loc_124C
mov rax, rcx
pxor xmm0, xmm0
loc_1220:
pxor xmm1, xmm1
cvtsi2sd xmm1, dword ptr [rax]
addsd xmm0, xmm1
add rax, 4
cmp rax, rdx
jnz short loc_1220
loc_1235:
sub rdx, rcx
sar ... | double func0(int **a1)
{
int *v1; // rdx
int *v2; // rax
double v3; // xmm0_8
long long v4; // rdx
double v5; // xmm1_8
v1 = a1[1];
if ( *a1 == v1 )
{
v3 = 0.0;
}
else
{
v2 = *a1;
v3 = 0.0;
do
v3 = v3 + (double)*v2++;
while ( v2 != v1 );
}
v4 = v1 - *a1;
if ( v4 <... | func0:
ENDBR64
MOV RCX,qword ptr [RDI]
MOV RDX,qword ptr [RDI + 0x8]
CMP RCX,RDX
JZ 0x0010124c
MOV RAX,RCX
PXOR XMM0,XMM0
LAB_00101220:
PXOR XMM1,XMM1
CVTSI2SD XMM1,dword ptr [RAX]
ADDSD XMM0,XMM1
ADD RAX,0x4
CMP RAX,RDX
JNZ 0x00101220
LAB_00101235:
SUB RDX,RCX
SAR RDX,0x2
JS 0x00101252
PXOR XMM1,XMM1
CVTSI2SD XMM1,RDX... | /* func0(std::vector<int, std::allocator<int> > const&) */
double func0(vector *param_1)
{
int *piVar1;
int *piVar2;
int *piVar3;
double dVar4;
piVar1 = *(int **)param_1;
piVar2 = *(int **)(param_1 + 8);
if (piVar1 == piVar2) {
dVar4 = 0.0;
}
else {
dVar4 = 0.0;
piVar3 = piVar1;
d... |
3,542 | func0 |
#include <vector>
#include <cassert>
| double func0(const std::vector<int>& numbers) {
double total = 0;
for(int num : numbers){
total += num;
}
return total / numbers.size();
}
| int main() {
assert(func0({8, 2, 3, 0, 7}) == 4.0);
assert(func0({-10, -20, -30}) == -20.0);
assert(func0({19, 15, 18}) == 17.333333333333332);
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
mov (%rdi),%rcx
mov 0x8(%rdi),%rdx
cmp %rdx,%rcx
je 1580 <_Z5func0RKSt6vectorIiSaIiEE+0x70>
mov %rcx,%rax
pxor %xmm0,%xmm0
nopw 0x0(%rax,%rax,1)
pxor %xmm1,%xmm1
add $0x4,%rax
cvtsi2sdl -0x4(%rax),%xmm1
addsd %xmm1,%xmm0
cmp %rax... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
mov rcx, [rdi]
mov rdx, [rdi+8]
cmp rcx, rdx
jz short loc_1400
mov rax, rcx
pxor xmm0, xmm0
nop word ptr [rax+rax+00000000h]
loc_13B0:
pxor xmm1, xmm1
add rax, 4
cvtsi2sd xmm1, dword ptr [rax-4]
addsd xmm0, xmm1
cmp rdx, rax
jnz short loc... | double func0(long long *a1)
{
long long v1; // rdx
long long v2; // rax
double v3; // xmm0_8
long long v4; // rdx
v1 = a1[1];
if ( *a1 == v1 )
{
v3 = 0.0;
}
else
{
v2 = *a1;
v3 = 0.0;
do
{
v2 += 4LL;
v3 = v3 + (double)*(int *)(v2 - 4);
}
while ( v1 != v2 );
... | func0:
ENDBR64
MOV RCX,qword ptr [RDI]
MOV RDX,qword ptr [RDI + 0x8]
CMP RCX,RDX
JZ 0x00101400
MOV RAX,RCX
PXOR XMM0,XMM0
NOP word ptr [RAX + RAX*0x1]
LAB_001013b0:
PXOR XMM1,XMM1
ADD RAX,0x4
CVTSI2SD XMM1,dword ptr [RAX + -0x4]
ADDSD XMM0,XMM1
CMP RDX,RAX
JNZ 0x001013b0
LAB_001013c6:
SUB RDX,RCX
SAR RDX,0x2
JS 0x00101... | /* func0(std::vector<int, std::allocator<int> > const&) */
double func0(vector *param_1)
{
int *piVar1;
int *piVar2;
int *piVar3;
int *piVar4;
ulong uVar5;
double dVar6;
piVar1 = *(int **)param_1;
piVar2 = *(int **)(param_1 + 8);
if (piVar1 == piVar2) {
dVar6 = 0.0;
}
else {
dVar6 = 0... |
3,543 | func0 |
#include <vector>
#include <cassert>
| double func0(const std::vector<int>& numbers) {
double total = 0;
for(int num : numbers){
total += num;
}
return total / numbers.size();
}
| int main() {
assert(func0({8, 2, 3, 0, 7}) == 4.0);
assert(func0({-10, -20, -30}) == -20.0);
assert(func0({19, 15, 18}) == 17.333333333333332);
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
mov (%rdi),%rcx
mov 0x8(%rdi),%rdx
cmp %rdx,%rcx
je 1580 <_Z5func0RKSt6vectorIiSaIiEE+0x70>
mov %rcx,%rax
pxor %xmm0,%xmm0
nopw 0x0(%rax,%rax,1)
pxor %xmm1,%xmm1
add $0x4,%rax
cvtsi2sdl -0x4(%rax),%xmm1
addsd %xmm1,%xmm0
cmp %rax... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
mov rcx, [rdi]
mov rdx, [rdi+8]
cmp rcx, rdx
jz short loc_1530
mov rax, rcx
pxor xmm0, xmm0
nop word ptr [rax+rax+00000000h]
loc_14E0:
pxor xmm1, xmm1
add rax, 4
cvtsi2sd xmm1, dword ptr [rax-4]
addsd xmm0, xmm1
cmp rdx, rax
jnz short loc... | double func0(long long *a1)
{
long long v1; // rdx
long long v2; // rax
double v3; // xmm0_8
long long v4; // rdx
v1 = a1[1];
if ( *a1 == v1 )
{
v3 = 0.0;
}
else
{
v2 = *a1;
v3 = 0.0;
do
{
v2 += 4LL;
v3 = v3 + (double)*(int *)(v2 - 4);
}
while ( v1 != v2 );
... | func0:
ENDBR64
MOV RCX,qword ptr [RDI]
MOV RDX,qword ptr [RDI + 0x8]
CMP RCX,RDX
JZ 0x00101530
MOV RAX,RCX
PXOR XMM0,XMM0
NOP word ptr [RAX + RAX*0x1]
LAB_001014e0:
PXOR XMM1,XMM1
ADD RAX,0x4
CVTSI2SD XMM1,dword ptr [RAX + -0x4]
ADDSD XMM0,XMM1
CMP RDX,RAX
JNZ 0x001014e0
LAB_001014f6:
SUB RDX,RCX
SAR RDX,0x2
JS 0x00101... | /* func0(std::vector<int, std::allocator<int> > const&) */
double func0(vector *param_1)
{
int *piVar1;
int *piVar2;
int *piVar3;
int *piVar4;
ulong uVar5;
double dVar6;
piVar1 = *(int **)param_1;
piVar2 = *(int **)(param_1 + 8);
if (piVar1 == piVar2) {
dVar6 = 0.0;
}
else {
dVar6 = 0... |
3,544 | func0 |
#include <assert.h>
| bool func0(int n) {
if ((n ^ 1) == n - 1) {
return true;
} else {
return false;
}
}
| int main() {
assert(func0(5) == true);
assert(func0(6) == false);
assert(func0(7) == true);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x4(%rbp)
mov -0x4(%rbp),%eax
xor $0x1,%eax
mov %eax,%edx
mov -0x4(%rbp),%eax
sub $0x1,%eax
cmp %eax,%edx
jne 116d <_Z5func0i+0x24>
mov $0x1,%eax
jmp 1172 <_Z5func0i+0x29>
mov $0x0,%eax
pop %rbp
retq
| _Z5func0i:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_4], edi
mov eax, [rbp+var_4]
xor eax, 1
mov edx, eax
mov eax, [rbp+var_4]
sub eax, 1
cmp edx, eax
jnz short loc_116D
mov eax, 1
jmp short loc_1172
loc_116D:
mov eax, 0
loc_1172:
pop rbp
retn | _BOOL8 func0(int a1)
{
return (a1 ^ 1) == a1 - 1;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x4],EDI
MOV EAX,dword ptr [RBP + -0x4]
XOR EAX,0x1
MOV EDX,EAX
MOV EAX,dword ptr [RBP + -0x4]
SUB EAX,0x1
CMP EDX,EAX
JNZ 0x0010116d
MOV EAX,0x1
JMP 0x00101172
LAB_0010116d:
MOV EAX,0x0
LAB_00101172:
POP RBP
RET | /* func0(int) */
bool func0(int param_1)
{
return (param_1 ^ 1U) == param_1 - 1U;
} |
3,545 | func0 |
#include <assert.h>
| bool func0(int n) {
if ((n ^ 1) == n - 1) {
return true;
} else {
return false;
}
}
| int main() {
assert(func0(5) == true);
assert(func0(6) == false);
assert(func0(7) == true);
return 0;
}
| O1 | cpp | func0(int):
endbr64
mov %edi,%eax
xor $0x1,%eax
sub $0x1,%edi
cmp %edi,%eax
sete %al
retq
| _Z5func0i:
endbr64
mov eax, edi
xor eax, 1
sub edi, 1
cmp eax, edi
setz al
retn | bool func0(int a1)
{
return (a1 ^ 1) == a1 - 1;
} | func0:
ENDBR64
MOV EAX,EDI
XOR EAX,0x1
SUB EDI,0x1
CMP EAX,EDI
SETZ AL
RET | /* func0(int) */
bool func0(int param_1)
{
return (param_1 ^ 1U) == param_1 - 1U;
} |
3,546 | func0 |
#include <assert.h>
| bool func0(int n) {
if ((n ^ 1) == n - 1) {
return true;
} else {
return false;
}
}
| int main() {
assert(func0(5) == true);
assert(func0(6) == false);
assert(func0(7) == true);
return 0;
}
| O2 | cpp | func0(int):
endbr64
mov %edi,%eax
sub $0x1,%edi
xor $0x1,%eax
cmp %edi,%eax
sete %al
retq
nopw %cs:0x0(%rax,%rax,1)
nopl 0x0(%rax)
| _Z5func0i:
endbr64
mov eax, edi
sub edi, 1
xor eax, 1
cmp eax, edi
setz al
retn | bool func0(int a1)
{
return (a1 ^ 1) == a1 - 1;
} | func0:
ENDBR64
MOV EAX,EDI
SUB EDI,0x1
XOR EAX,0x1
CMP EAX,EDI
SETZ AL
RET | /* func0(int) */
bool func0(int param_1)
{
return (param_1 ^ 1U) == param_1 - 1U;
} |
3,547 | func0 |
#include <assert.h>
| bool func0(int n) {
if ((n ^ 1) == n - 1) {
return true;
} else {
return false;
}
}
| int main() {
assert(func0(5) == true);
assert(func0(6) == false);
assert(func0(7) == true);
return 0;
}
| O3 | cpp | func0(int):
endbr64
mov %edi,%eax
sub $0x1,%edi
xor $0x1,%eax
cmp %edi,%eax
sete %al
retq
nopw %cs:0x0(%rax,%rax,1)
nopl 0x0(%rax)
| _Z5func0i:
endbr64
mov eax, edi
sub edi, 1
xor eax, 1
cmp eax, edi
setz al
retn | bool func0(int a1)
{
return (a1 ^ 1) == a1 - 1;
} | func0:
ENDBR64
MOV EAX,EDI
SUB EDI,0x1
XOR EAX,0x1
CMP EAX,EDI
SETZ AL
RET | /* func0(int) */
bool func0(int param_1)
{
return (param_1 ^ 1U) == param_1 - 1U;
} |
3,548 | func0 | #include <vector>
#include <cassert>
#include <algorithm>
using namespace std;
| vector<vector<int>> func0(const vector<vector<int>>& test_tup1, const vector<vector<int>>& test_tup2) {
vector<vector<int>> res;
size_t n = min(test_tup1.size(), test_tup2.size());
for (size_t i = 0; i < n; i++) {
const vector<int>& v1 = test_tup1[i];
const vector<int>& v2 = test_tup2[i... | int main() {
assert(func0({{1, 3}, {4, 5}, {2, 9}, {1, 10}},
{{6, 7}, {3, 9}, {1, 1}, {7, 3}}) ==
vector<vector<int>>({{-5, -4}, {1, -4}, {1, 8}, {-6, 7}}));
assert(func0({{13, 4}, {14, 6}, {13, 10}, {12, 11}},
{{19, 8}, {14, 10}, {12, ... | O0 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x88,%rsp
mov %rd... | _Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EES5_:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 88h
mov [rbp+var_78], rdi
mov [rbp+var_80], rsi
mov [rbp+var_88], rdx
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_78]
mov rdi, rax
call _ZNSt6vectorIS_IiSa... | long long func0(long long a1, long long a2, long long a3)
{
int v3; // ebx
long long v6; // [rsp+28h] [rbp-68h] BYREF
unsigned long long i; // [rsp+30h] [rbp-60h]
unsigned long long j; // [rsp+38h] [rbp-58h]
unsigned long long v9; // [rsp+40h] [rbp-50h]
long long v10; // [rsp+48h] [rbp-48h]
long long v11... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x88
MOV qword ptr [RBP + -0x78],RDI
MOV qword ptr [RBP + -0x80],RSI
MOV qword ptr [RBP + -0x88],RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x78]
MOV RDI,RAX
CALL 0x00103392
MOV RAX,qword ptr [RBP + -0x88]
MO... | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > > const&, std::vector<std::vector<int, std::allocator<int> >,
std::allocator<std::vector<int, std::allocator<int> > > > const&) */
vector * func0(vector *param_1,vector *param_2)
{
int iVar1;
... |
3,549 | func0 | #include <vector>
#include <cassert>
#include <algorithm>
using namespace std;
| vector<vector<int>> func0(const vector<vector<int>>& test_tup1, const vector<vector<int>>& test_tup2) {
vector<vector<int>> res;
size_t n = min(test_tup1.size(), test_tup2.size());
for (size_t i = 0; i < n; i++) {
const vector<int>& v1 = test_tup1[i];
const vector<int>& v2 = test_tup2[i... | int main() {
assert(func0({{1, 3}, {4, 5}, {2, 9}, {1, 10}},
{{6, 7}, {3, 9}, {1, 1}, {7, 3}}) ==
vector<vector<int>>({{-5, -4}, {1, -4}, {1, 8}, {-6, 7}}));
assert(func0({{13, 4}, {14, 6}, {13, 10}, {12, 11}},
{{19, 8}, {14, 10}, {12, ... | O1 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %r... | _Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EES5_:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 68h
mov r15, rdi
mov [rsp+98h+var_78], rsi
mov [rsp+98h+var_70], rdx
mov rax, fs:28h
mov [rsp+98h+var_40], rax
xor eax, eax
mov qword ptr [rdi], 0
mov q... | _QWORD * func0(_QWORD *a1, _QWORD *a2, _QWORD *a3)
{
long long v3; // rdx
long long v4; // rax
long long i; // r14
long long j; // rbx
int v7; // eax
int *v8; // rsi
_QWORD *v9; // rbx
char *v10; // r12
signed long long v11; // rbp
_DWORD *v12; // rax
struct _Unwind_Exception *v13; // rbx
char *... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x68
MOV R15,RDI
MOV qword ptr [RSP + 0x20],RSI
MOV qword ptr [RSP + 0x28],RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x58],RAX
XOR EAX,EAX
MOV qword ptr [RDI],0x0
MOV qword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
MOV RAX,... | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > > const&, std::vector<std::vector<int, std::allocator<int> >,
std::allocator<std::vector<int, std::allocator<int> > > > const&) */
vector * func0(vector *param_1,vector *param_2)
{
int4 *__src;... |
3,550 | func0 | #include <vector>
#include <cassert>
#include <algorithm>
using namespace std;
| vector<vector<int>> func0(const vector<vector<int>>& test_tup1, const vector<vector<int>>& test_tup2) {
vector<vector<int>> res;
size_t n = min(test_tup1.size(), test_tup2.size());
for (size_t i = 0; i < n; i++) {
const vector<int>& v1 = test_tup1[i];
const vector<int>& v2 = test_tup2[i... | int main() {
assert(func0({{1, 3}, {4, 5}, {2, 9}, {1, 10}},
{{6, 7}, {3, 9}, {1, 1}, {7, 3}}) ==
vector<vector<int>>({{-5, -4}, {1, -4}, {1, 8}, {-6, 7}}));
assert(func0({{13, 4}, {14, 6}, {13, 10}, {12, 11}},
{{19, 8}, {14, 10}, {12, ... | O2 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&):
endbr64
movabs $0xaaaaaaaaaaaaaaab,%rcx
push %r15
mov %rdx,%rax
push %... | _Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EES5_:
endbr64
push r15
pxor xmm0, xmm0
mov r15, rdi
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 68h
mov [rsp+98h+var_70], rdx
mov [rsp+98h+var_78], rsi
mov rax, fs:28h
mov [rsp+98h+var_40], rax
xor eax, eax
movups xmmword p... | long long func0(long long a1, long long *a2, long long *a3)
{
long long v4; // r12
long long v5; // rbp
long long v6; // rax
long long v7; // rdx
long long v8; // rdx
long long v9; // rax
long long v10; // r14
long long *v11; // r12
long long *v12; // rbp
long long v13; // rdx
long long v14; // r... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
MOV R15,RDI
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x68
MOV qword ptr [RSP + 0x28],RDX
MOV qword ptr [RSP + 0x20],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x58],RAX
XOR EAX,EAX
MOVUPS xmmword ptr [RDI],XMM0
MOV R12,qword ptr [RDX]
MOV RBP,qword ptr [RSI]
... | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > > const&, std::vector<std::vector<int, std::allocator<int> >,
std::allocator<std::vector<int, std::allocator<int> > > > const&) */
vector * func0(vector *param_1,vector *param_2)
{
int (*pauVar... |
3,551 | func0 | #include <vector>
#include <cassert>
#include <algorithm>
using namespace std;
| vector<vector<int>> func0(const vector<vector<int>>& test_tup1, const vector<vector<int>>& test_tup2) {
vector<vector<int>> res;
size_t n = min(test_tup1.size(), test_tup2.size());
for (size_t i = 0; i < n; i++) {
const vector<int>& v1 = test_tup1[i];
const vector<int>& v2 = test_tup2[i... | int main() {
assert(func0({{1, 3}, {4, 5}, {2, 9}, {1, 10}},
{{6, 7}, {3, 9}, {1, 1}, {7, 3}}) ==
vector<vector<int>>({{-5, -4}, {1, -4}, {1, 8}, {-6, 7}}));
assert(func0({{13, 4}, {14, 6}, {13, 10}, {12, 11}},
{{19, 8}, {14, 10}, {12, ... | O3 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&):
endbr64
push %r15
pxor %xmm0,%xmm0
mov %rdx,%rax
push %r14
push %r... | _Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EES5_:
endbr64
push r15
pxor xmm0, xmm0
mov r15, rdi
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 68h
mov [rsp+98h+var_70], rdx
mov [rsp+98h+var_78], rsi
mov rax, fs:28h
mov [rsp+98h+var_40], rax
xor eax, eax
movups xmmword p... | long long func0(long long a1, long long *a2, long long *a3)
{
long long v4; // r12
long long v5; // rbp
long long v6; // rax
long long v7; // rdx
long long v8; // rdx
long long v9; // rax
long long v10; // r14
long long *v11; // r12
long long *v12; // rbp
long long v13; // rdx
long long v14; // r... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
MOV R15,RDI
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x68
MOV qword ptr [RSP + 0x28],RDX
MOV qword ptr [RSP + 0x20],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x58],RAX
XOR EAX,EAX
MOVUPS xmmword ptr [RDI],XMM0
MOV R12,qword ptr [RDX]
MOV RBP,qword ptr [RSI]
... | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > > const&, std::vector<std::vector<int, std::allocator<int> >,
std::allocator<std::vector<int, std::allocator<int> > > > const&) */
vector * func0(vector *param_1,vector *param_2)
{
int (*pauVar... |
3,552 | func0 |
#include <vector>
#include <algorithm>
#include <cassert>
| std::vector<std::vector<int>> func0(std::vector<std::vector<int>>& lists) {
for (auto& l : lists) {
std::sort(l.rbegin(), l.rend());
}
return lists;
}
| int main() {
std::vector<std::vector<int>> test1 = {{1, 2, 3, 4}, {5, 6, 7, 8}, {9, 10, 11, 12}, {13, 14, 15, 16}};
std::vector<std::vector<int>> result1 = {{4, 3, 2, 1}, {8, 7, 6, 5}, {12, 11, 10, 9}, {16, 15, 14, 13}};
assert(func0(test1) == result1);
std::vector<std::vector<int>> test2 = {{1, 2... | O0 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >&):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x50,%rsp
mov %rdi,-0x48(%rbp)
mov %rsi,-0x50(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x8(%rbp)
xor %eax,%eax
mov -0x50(%rbp),%rax
mov %rax,-... | _Z5func0RSt6vectorIS_IiSaIiEESaIS1_EE:
endbr64
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_48], rdi
mov [rbp+var_50], rsi
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
mov rax, [rbp+var_50]
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
mov rdi, rax
call _ZNSt6vect... | long long func0(long long a1, long long a2)
{
long long v3; // [rsp+18h] [rbp-38h] BYREF
long long v4; // [rsp+20h] [rbp-30h] BYREF
_BYTE v5[8]; // [rsp+28h] [rbp-28h] BYREF
_BYTE v6[8]; // [rsp+30h] [rbp-20h] BYREF
long long v7; // [rsp+38h] [rbp-18h]
long long v8; // [rsp+40h] [rbp-10h]
unsigned long l... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x48],RDI
MOV qword ptr [RBP + -0x50],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,RAX
CALL 0x001026a0
MOV qword pt... | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > >&) */
vector * func0(vector *param_1)
{
bool bVar1;
vector<std::vector<int,std::allocator<int>>,std::allocator<std::vector<int,std::allocator<int>>>>
*in_RSI;
long in_FS_OFFSET;
int8 loca... |
3,553 | func0 |
#include <vector>
#include <algorithm>
#include <cassert>
| std::vector<std::vector<int>> func0(std::vector<std::vector<int>>& lists) {
for (auto& l : lists) {
std::sort(l.rbegin(), l.rend());
}
return lists;
}
| int main() {
std::vector<std::vector<int>> test1 = {{1, 2, 3, 4}, {5, 6, 7, 8}, {9, 10, 11, 12}, {13, 14, 15, 16}};
std::vector<std::vector<int>> result1 = {{4, 3, 2, 1}, {8, 7, 6, 5}, {12, 11, 10, 9}, {16, 15, 14, 13}};
assert(func0(test1) == result1);
std::vector<std::vector<int>> test2 = {{1, 2... | O1 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >&):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x48,%rsp
mov %rdi,0x8(%rsp)
mov %rsi,0x10(%rsp)
mov %fs:0x28,%rcx
mov %rcx,0x38(%rsp)
xor %ecx,%e... | _Z5func0RSt6vectorIS_IiSaIiEESaIS1_EE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 38h
mov r13, rdi
mov [rsp+68h+var_60], rsi
mov rax, fs:28h
mov [rsp+68h+var_40], rax
xor eax, eax
mov r12, [rsi]
mov r14, [rsi+8]
cmp r14, r12
jnz loc_1... | _QWORD * func0(_QWORD *a1, long long **a2)
{
long long *v2; // r12
long long *v3; // r14
unsigned long long v4; // rbx
long long v5; // rdx
long long v6; // rbp
long long v7; // r15
int v8; // eax
unsigned long long v9; // rax
long long v10; // rbx
long long v12; // [rsp+18h] [rbp-50h] BYREF
_QWOR... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x38
MOV R13,RDI
MOV qword ptr [RSP + 0x8],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x28],RAX
XOR EAX,EAX
MOV R12,qword ptr [RSI]
MOV R14,qword ptr [RSI + 0x8]
CMP R14,R12
JNZ 0x00101396
LAB_00101303:
MOV RAX,qword ptr [RSP + 0x8]
... | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > >&) */
vector * func0(vector *param_1,int param_2,int param_3,int param_4,
int param_5,int param_6,int param_7,int param_8,
int8 param_9,int8 param_10)
{
long *plVar1;
... |
3,554 | func0 |
#include <vector>
#include <algorithm>
#include <cassert>
| std::vector<std::vector<int>> func0(std::vector<std::vector<int>>& lists) {
for (auto& l : lists) {
std::sort(l.rbegin(), l.rend());
}
return lists;
}
| int main() {
std::vector<std::vector<int>> test1 = {{1, 2, 3, 4}, {5, 6, 7, 8}, {9, 10, 11, 12}, {13, 14, 15, 16}};
std::vector<std::vector<int>> result1 = {{4, 3, 2, 1}, {8, 7, 6, 5}, {12, 11, 10, 9}, {16, 15, 14, 13}};
assert(func0(test1) == result1);
std::vector<std::vector<int>> test2 = {{1, 2... | O2 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >&):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x48,%rsp
mov 0x8(%rsi),%rax
mov (%rsi),%r15
mov %rdi,0x10(%rsp)
mov %rsi,0x18(%rsp)
mov %fs:0x28,... | _Z5func0RSt6vectorIS_IiSaIiEESaIS1_EE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 38h
mov r8, [rsi]
mov rbp, [rsi+8]
mov [rsp+68h+var_68], rdi
mov [rsp+68h+var_60], rsi
mov rax, fs:28h
mov [rsp+68h+var_40], rax
xor eax, eax
cmp rbp, r8
jz... | long long func0(long long a1, int ***a2)
{
int **v2; // r8
int **v3; // rbp
int **v4; // r12
int *v5; // r15
int *v6; // rbx
unsigned long long v7; // rdx
int *v8; // r14
int v9; // ecx
int v10; // edx
int *v11; // rax
int *v12; // rsi
unsigned long long v13; // rbp
unsigned long long v14; //... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x38
MOV R8,qword ptr [RSI]
MOV RBP,qword ptr [RSI + 0x8]
MOV qword ptr [RSP],RDI
MOV qword ptr [RSP + 0x8],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x28],RAX
XOR EAX,EAX
CMP RBP,R8
JZ 0x00102462
MOV R12,R8
NOP
LAB_00102200:
MOV R1... | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > >&) */
vector * func0(vector *param_1,int param_2,int param_3,int param_4,
int param_5,int param_6,int8 param_7,int param_8,
int8 param_9,int8 param_10,int8 param_11)
{
... |
3,555 | func0 |
#include <vector>
#include <algorithm>
#include <cassert>
| std::vector<std::vector<int>> func0(std::vector<std::vector<int>>& lists) {
for (auto& l : lists) {
std::sort(l.rbegin(), l.rend());
}
return lists;
}
| int main() {
std::vector<std::vector<int>> test1 = {{1, 2, 3, 4}, {5, 6, 7, 8}, {9, 10, 11, 12}, {13, 14, 15, 16}};
std::vector<std::vector<int>> result1 = {{4, 3, 2, 1}, {8, 7, 6, 5}, {12, 11, 10, 9}, {16, 15, 14, 13}};
assert(func0(test1) == result1);
std::vector<std::vector<int>> test2 = {{1, 2... | O3 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >&):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x38,%rsp
mov (%rsi),%r9
mov 0x8(%rsi),%r12
mov %rdi,(%rsp)
mov %rsi,0x8(%rsp)
mov %fs:0x28,%rdi
m... | _Z5func0RSt6vectorIS_IiSaIiEESaIS1_EE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 48h
mov r14, [rsi+8]
mov rbx, [rsi]
mov [rsp+78h+var_70], rdi
mov [rsp+78h+var_60], rsi
mov rax, fs:28h
mov [rsp+78h+var_40], rax
xor eax, eax
mov rax, r14
... | long long func0(long long a1, char **a2)
{
char *v2; // r14
char *v3; // rbx
int *v4; // r15
long long v5; // r12
long long v6; // rdx
unsigned long long v7; // rax
int *v8; // rcx
int *v9; // rbp
int v10; // r13d
int *v11; // rsi
int v12; // edx
int *v13; // rax
int v14; // ecx
int v15; //... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x48
MOV R14,qword ptr [RSI + 0x8]
MOV RBX,qword ptr [RSI]
MOV qword ptr [RSP + 0x8],RDI
MOV qword ptr [RSP + 0x18],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
MOV RAX,R14
SUB RAX,RBX
MOV qword ptr [RSP + 0x10],R... | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > >&) */
vector * func0(vector *param_1,int param_2,int param_3,int param_4,
int param_5,int param_6,int8 param_7,int8 param_8,
int8 param_9,int param_10,int8 param_11,int8 ... |
3,556 | func0 |
#include <assert.h>
| int func0(int arr1[], int arr2[], int n) {
for (int i = 0; i < n; i++) {
if (arr1[i] != arr2[i]) {
return i;
}
}
return n;
}
| int main() {
int arr1_1[] = {1, 2, 3, 4};
int arr2_1[] = {1, 2, 3};
assert(func0(arr1_1, arr2_1, 3) == 3);
int arr1_2[] = {2, 4, 6, 8, 10};
int arr2_2[] = {2, 4, 6, 8};
assert(func0(arr1_2, arr2_2, 4) == 4);
int arr1_3[] = {1, 3, 5, 7, 9, 11};
int arr2_3[] = {1, 3, 5, 7, 9};
... | O0 | cpp | func0(int*, int*, int):
endbr64
push %rbp
mov %rsp,%rbp
mov %rdi,-0x18(%rbp)
mov %rsi,-0x20(%rbp)
mov %edx,-0x24(%rbp)
movl $0x0,-0x4(%rbp)
mov -0x4(%rbp),%eax
cmp -0x24(%rbp),%eax
jge 11c6 <_Z5func0PiS_i+0x5d>
mov -0x4(%rbp),%eax
cltq
lea 0x0(,%rax,4),%rdx
mov -0x18(%rbp),%rax
add ... | _Z5func0PiS_i:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_18], rdi
mov [rbp+var_20], rsi
mov [rbp+var_24], edx
mov [rbp+var_4], 0
jmp short loc_11BE
loc_1185:
mov eax, [rbp+var_4]
cdqe
lea rdx, ds:0[rax*4]
mov rax, [rbp+var_18]
add rax, rdx
mov edx, [rax]
mov eax, [rbp... | long long func0(int *a1, int *a2, unsigned int a3)
{
unsigned int i; // [rsp+20h] [rbp-4h]
for ( i = 0; (int)i < (int)a3; ++i )
{
if ( a1[i] != a2[i] )
return i;
}
return a3;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x18],RDI
MOV qword ptr [RBP + -0x20],RSI
MOV dword ptr [RBP + -0x24],EDX
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001011be
LAB_00101185:
MOV EAX,dword ptr [RBP + -0x4]
CDQE
LEA RDX,[RAX*0x4]
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,RDX
MOV EDX,dword ptr [RAX]
MOV EA... | /* func0(int*, int*, int) */
int func0(int *param_1,int *param_2,int param_3)
{
int iVar1;
int local_c;
for (local_c = 0;
(iVar1 = param_3, local_c < param_3 && (iVar1 = local_c, param_1[local_c] == param_2[local_c])
); local_c = local_c + 1) {
}
return iVar1;
} |
3,557 | func0 |
#include <assert.h>
| int func0(int arr1[], int arr2[], int n) {
for (int i = 0; i < n; i++) {
if (arr1[i] != arr2[i]) {
return i;
}
}
return n;
}
| int main() {
int arr1_1[] = {1, 2, 3, 4};
int arr2_1[] = {1, 2, 3};
assert(func0(arr1_1, arr2_1, 3) == 3);
int arr1_2[] = {2, 4, 6, 8, 10};
int arr2_2[] = {2, 4, 6, 8};
assert(func0(arr1_2, arr2_2, 4) == 4);
int arr1_3[] = {1, 3, 5, 7, 9, 11};
int arr2_3[] = {1, 3, 5, 7, 9};
... | O1 | cpp | func0(int*, int*, int):
endbr64
mov %edx,%eax
test %edx,%edx
jle 1195 <_Z5func0PiS_i+0x2c>
lea -0x1(%rdx),%r9d
mov $0x0,%ecx
jmp 1181 <_Z5func0PiS_i+0x18>
mov %r8,%rcx
mov (%rsi,%rcx,4),%edx
cmp %edx,(%rdi,%rcx,4)
jne 1193 <_Z5func0PiS_i+0x2a>
lea 0x1(%rcx),%r8
cmp %r9,%rcx
jne 117... | _Z5func0PiS_i:
endbr64
mov eax, edx
test edx, edx
jle short locret_118C
movsxd r8, edx
mov ecx, 0
loc_117B:
mov edx, [rsi+rcx*4]
cmp [rdi+rcx*4], edx
jnz short loc_118D
add rcx, 1
cmp rcx, r8
jnz short loc_117B
locret_118C:
retn
loc_118D:
mov eax, ecx
retn | long long func0(int *a1, int *a2, int a3)
{
long long result; // rax
long long v4; // rcx
result = (unsigned int)a3;
if ( a3 > 0 )
{
v4 = 0LL;
while ( a1[v4] == a2[v4] )
{
if ( ++v4 == a3 )
return result;
}
return (unsigned int)v4;
}
return result;
} | func0:
ENDBR64
MOV EAX,EDX
TEST EDX,EDX
JLE 0x0010118c
MOVSXD R8,EDX
MOV ECX,0x0
LAB_0010117b:
MOV EDX,dword ptr [RSI + RCX*0x4]
CMP dword ptr [RDI + RCX*0x4],EDX
JNZ 0x0010118d
ADD RCX,0x1
CMP RCX,R8
JNZ 0x0010117b
LAB_0010118c:
RET
LAB_0010118d:
MOV EAX,ECX
RET | /* func0(int*, int*, int) */
ulong func0(int *param_1,int *param_2,int param_3)
{
ulong uVar1;
if (0 < param_3) {
uVar1 = 0;
do {
if (param_1[uVar1] != param_2[uVar1]) {
return uVar1 & 0xffffffff;
}
uVar1 = uVar1 + 1;
} while (uVar1 != (long)param_3);
}
return (ulong)(... |
3,558 | func0 |
#include <assert.h>
| int func0(int arr1[], int arr2[], int n) {
for (int i = 0; i < n; i++) {
if (arr1[i] != arr2[i]) {
return i;
}
}
return n;
}
| int main() {
int arr1_1[] = {1, 2, 3, 4};
int arr2_1[] = {1, 2, 3};
assert(func0(arr1_1, arr2_1, 3) == 3);
int arr1_2[] = {2, 4, 6, 8, 10};
int arr2_2[] = {2, 4, 6, 8};
assert(func0(arr1_2, arr2_2, 4) == 4);
int arr1_3[] = {1, 3, 5, 7, 9, 11};
int arr2_3[] = {1, 3, 5, 7, 9};
... | O2 | cpp | func0(int*, int*, int):
endbr64
mov %edx,%eax
test %edx,%edx
jle 116e <_Z5func0PiS_i+0x2e>
lea -0x1(%rdx),%r9d
xor %ecx,%ecx
jmp 1164 <_Z5func0PiS_i+0x24>
nopw 0x0(%rax,%rax,1)
lea 0x1(%rcx),%r8
cmp %r9,%rcx
je 1170 <_Z5func0PiS_i+0x30>
mov %r8,%rcx
mov (%rsi,%rcx,4),%edx
cmp %edx,... | _Z5func0PiS_i:
endbr64
mov eax, edx
test edx, edx
jle short locret_1320
movsxd r8, edx
xor ecx, ecx
jmp short loc_1311
loc_1308:
add rcx, 1
cmp rcx, r8
jz short locret_1320
loc_1311:
mov edx, [rsi+rcx*4]
cmp [rdi+rcx*4], edx
jz short loc_1308
mov eax, ecx
retn
locret_13... | long long func0(int *a1, int *a2, int a3)
{
long long result; // rax
long long v4; // rcx
result = (unsigned int)a3;
if ( a3 > 0 )
{
v4 = 0LL;
while ( a1[v4] == a2[v4] )
{
if ( ++v4 == a3 )
return result;
}
return (unsigned int)v4;
}
return result;
} | func0:
ENDBR64
MOV EAX,EDX
TEST EDX,EDX
JLE 0x00101320
MOVSXD R8,EDX
XOR ECX,ECX
JMP 0x00101311
LAB_00101308:
ADD RCX,0x1
CMP RCX,R8
JZ 0x00101320
LAB_00101311:
MOV EDX,dword ptr [RSI + RCX*0x4]
CMP dword ptr [RDI + RCX*0x4],EDX
JZ 0x00101308
MOV EAX,ECX
RET
LAB_00101320:
RET | /* func0(int*, int*, int) */
ulong func0(int *param_1,int *param_2,int param_3)
{
ulong uVar1;
if (0 < param_3) {
uVar1 = 0;
do {
if (param_1[uVar1] != param_2[uVar1]) {
return uVar1 & 0xffffffff;
}
uVar1 = uVar1 + 1;
} while (uVar1 != (long)param_3);
}
return (ulong)(... |
3,559 | func0 |
#include <assert.h>
| int func0(int arr1[], int arr2[], int n) {
for (int i = 0; i < n; i++) {
if (arr1[i] != arr2[i]) {
return i;
}
}
return n;
}
| int main() {
int arr1_1[] = {1, 2, 3, 4};
int arr2_1[] = {1, 2, 3};
assert(func0(arr1_1, arr2_1, 3) == 3);
int arr1_2[] = {2, 4, 6, 8, 10};
int arr2_2[] = {2, 4, 6, 8};
assert(func0(arr1_2, arr2_2, 4) == 4);
int arr1_3[] = {1, 3, 5, 7, 9, 11};
int arr2_3[] = {1, 3, 5, 7, 9};
... | O3 | cpp | func0(int*, int*, int):
endbr64
mov %edx,%eax
test %edx,%edx
jle 122e <_Z5func0PiS_i+0x2e>
lea -0x1(%rdx),%r9d
xor %ecx,%ecx
jmp 1224 <_Z5func0PiS_i+0x24>
nopw 0x0(%rax,%rax,1)
lea 0x1(%rcx),%r8
cmp %r9,%rcx
je 1230 <_Z5func0PiS_i+0x30>
mov %r8,%rcx
mov (%rsi,%rcx,4),%edx
cmp %edx,... | _Z5func0PiS_i:
endbr64
mov eax, edx
test edx, edx
jle short locret_1170
movsxd r8, edx
xor ecx, ecx
jmp short loc_1161
loc_1158:
add rcx, 1
cmp rcx, r8
jz short locret_1170
loc_1161:
mov edx, [rsi+rcx*4]
cmp [rdi+rcx*4], edx
jz short loc_1158
mov eax, ecx
retn
locret_11... | long long func0(int *a1, int *a2, int a3)
{
long long result; // rax
long long v4; // rcx
result = (unsigned int)a3;
if ( a3 > 0 )
{
v4 = 0LL;
while ( a1[v4] == a2[v4] )
{
if ( ++v4 == a3 )
return result;
}
return (unsigned int)v4;
}
return result;
} | func0:
ENDBR64
MOV EAX,EDX
TEST EDX,EDX
JLE 0x00101170
MOVSXD R8,EDX
XOR ECX,ECX
JMP 0x00101161
LAB_00101158:
ADD RCX,0x1
CMP RCX,R8
JZ 0x00101170
LAB_00101161:
MOV EDX,dword ptr [RSI + RCX*0x4]
CMP dword ptr [RDI + RCX*0x4],EDX
JZ 0x00101158
MOV EAX,ECX
RET
LAB_00101170:
RET | /* func0(int*, int*, int) */
ulong func0(int *param_1,int *param_2,int param_3)
{
ulong uVar1;
if (0 < param_3) {
uVar1 = 0;
do {
if (param_1[uVar1] != param_2[uVar1]) {
return uVar1 & 0xffffffff;
}
uVar1 = uVar1 + 1;
} while (uVar1 != (long)param_3);
}
return (ulong)(... |
3,560 | func0 |
#include <cassert>
| bool func0(int A, int B) {
while (A > 0 && B > 0) {
A = A / 10;
B = B / 10;
}
if (A == 0 && B == 0) {
return true;
}
return false;
}
| int main() {
assert(func0(12, 1) == false);
assert(func0(2, 2) == true);
assert(func0(10, 20) == true);
return 0;
}
| O0 | cpp | func0(int, int):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x4(%rbp)
mov %esi,-0x8(%rbp)
cmpl $0x0,-0x4(%rbp)
jle 11a1 <_Z5func0ii+0x58>
cmpl $0x0,-0x8(%rbp)
jle 11a1 <_Z5func0ii+0x58>
mov -0x4(%rbp),%eax
movslq %eax,%rdx
imul $0x66666667,%rdx,%rdx
shr $0x20,%rdx
sar $0x2,%edx
sar $0x... | _Z5func0ii:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_4], edi
mov [rbp+var_8], esi
jmp short loc_1195
loc_1159:
mov eax, [rbp+var_4]
movsxd rdx, eax
imul rdx, 66666667h
shr rdx, 20h
mov ecx, edx
sar ecx, 2
cdq
mov eax, ecx
sub eax, edx
mov [rbp+var_4], eax
mov eax... | _BOOL8 func0(int a1, int a2)
{
while ( a1 > 0 && a2 > 0 )
{
a1 /= 10;
a2 /= 10;
}
return !a1 && !a2;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x4],EDI
MOV dword ptr [RBP + -0x8],ESI
JMP 0x00101195
LAB_00101159:
MOV EAX,dword ptr [RBP + -0x4]
MOVSXD RDX,EAX
IMUL RDX,RDX,0x66666667
SHR RDX,0x20
MOV ECX,EDX
SAR ECX,0x2
CDQ
MOV EAX,ECX
SUB EAX,EDX
MOV dword ptr [RBP + -0x4],EAX
MOV EAX,dword ptr [RBP + -0... | /* func0(int, int) */
int8 func0(int param_1,int param_2)
{
int8 uVar1;
int4 local_10;
int4 local_c;
local_c = param_1;
for (local_10 = param_2; (0 < local_c && (0 < local_10)); local_10 = local_10 / 10) {
local_c = local_c / 10;
}
if ((local_c == 0) && (local_10 == 0)) {
uVar1 = 1;
}
els... |
3,561 | func0 |
#include <cassert>
| bool func0(int A, int B) {
while (A > 0 && B > 0) {
A = A / 10;
B = B / 10;
}
if (A == 0 && B == 0) {
return true;
}
return false;
}
| int main() {
assert(func0(12, 1) == false);
assert(func0(2, 2) == true);
assert(func0(10, 20) == true);
return 0;
}
| O1 | cpp | func0(int, int):
endbr64
test %edi,%edi
jle 118d <_Z5func0ii+0x44>
test %esi,%esi
jle 118d <_Z5func0ii+0x44>
mov %edi,%edx
movslq %edi,%rax
imul $0x66666667,%rax,%rax
sar $0x22,%rax
sar $0x1f,%edi
sub %edi,%eax
mov %eax,%edi
mov %esi,%ecx
movslq %esi,%rax
imul $0x66666667,%rax,%rax
sar ... | _Z5func0ii:
endbr64
test edi, edi
jle short loc_1191
test esi, esi
jle short loc_1191
loc_1155:
mov edx, edi
movsxd rax, edi
imul rax, 66666667h
sar rax, 22h
mov ecx, edi
sar ecx, 1Fh
sub eax, ecx
mov edi, eax
mov r8d, esi
movsxd rax, esi
imul rax, 66666667h
sar rax... | bool func0(int a1, int a2)
{
int v2; // edx
int v3; // r8d
if ( a1 > 0 && a2 > 0 )
{
do
{
v2 = a1;
a1 /= 10;
v3 = a2;
a2 /= 10;
}
while ( v2 > 9 && v3 > 9 );
}
return (a2 | a1) == 0;
} | func0:
ENDBR64
TEST EDI,EDI
JLE 0x00101191
TEST ESI,ESI
JLE 0x00101191
LAB_00101155:
MOV EDX,EDI
MOVSXD RAX,EDI
IMUL RAX,RAX,0x66666667
SAR RAX,0x22
MOV ECX,EDI
SAR ECX,0x1f
SUB EAX,ECX
MOV EDI,EAX
MOV R8D,ESI
MOVSXD RAX,ESI
IMUL RAX,RAX,0x66666667
SAR RAX,0x22
SAR ESI,0x1f
SUB EAX,ESI
MOV ESI,EAX
CMP EDX,0x9
JLE 0x001... | /* func0(int, int) */
bool func0(int param_1,int param_2)
{
bool bVar1;
int iVar2;
int iVar3;
if ((0 < param_1) && (iVar3 = param_1, iVar2 = param_2, 0 < param_2)) {
do {
param_1 = iVar3 / 10;
param_2 = iVar2 / 10;
if (iVar3 < 10) break;
bVar1 = 9 < iVar2;
iVar3 = param_1;... |
3,562 | func0 |
#include <cassert>
| bool func0(int A, int B) {
while (A > 0 && B > 0) {
A = A / 10;
B = B / 10;
}
if (A == 0 && B == 0) {
return true;
}
return false;
}
| int main() {
assert(func0(12, 1) == false);
assert(func0(2, 2) == true);
assert(func0(10, 20) == true);
return 0;
}
| O2 | cpp | func0(int, int):
endbr64
test %esi,%esi
jle 120c <_Z5func0ii+0x3c>
test %edi,%edi
jle 120c <_Z5func0ii+0x3c>
mov $0xcccccccd,%ecx
nopl 0x0(%rax)
mov %edi,%edi
mov %esi,%esi
mov %rdi,%rax
imul %rcx,%rdi
mov %rsi,%rdx
imul %rcx,%rsi
shr $0x23,%rdi
shr $0x23,%rsi
cmp $0x9,%eax
jle ... | _Z5func0ii:
endbr64
test edi, edi
jle short loc_117C
test esi, esi
jle short loc_117C
mov ecx, 0CCCCCCCDh
nop dword ptr [rax+00000000h]
loc_1158:
mov edi, edi
mov esi, esi
mov rax, rdi
imul rdi, rcx
mov rdx, rsi
imul rsi, rcx
shr rdi, 23h
shr rsi, 23h
cmp eax, 9
j... | bool func0(int a1, int a2)
{
int v2; // eax
int v3; // edx
if ( a1 > 0 && a2 > 0 )
{
do
{
v2 = a1;
v3 = a2;
a1 /= 0xAu;
a2 /= 0xAu;
}
while ( v2 > 9 && v3 > 9 );
}
return (a2 | a1) == 0;
} | func0:
ENDBR64
TEST EDI,EDI
JLE 0x0010117c
TEST ESI,ESI
JLE 0x0010117c
MOV ECX,0xcccccccd
NOP dword ptr [RAX]
LAB_00101158:
MOV EDI,EDI
MOV ESI,ESI
MOV RAX,RDI
IMUL RDI,RCX
MOV RDX,RSI
IMUL RSI,RCX
SHR RDI,0x23
SHR RSI,0x23
CMP EAX,0x9
JLE 0x0010117c
CMP EDX,0x9
JG 0x00101158
LAB_0010117c:
OR EDI,ESI
SETZ AL
RET | /* func0(int, int) */
bool func0(int param_1,int param_2)
{
int iVar1;
ulong uVar2;
ulong uVar3;
uVar3 = (ulong)(uint)param_1;
uVar2 = (ulong)(uint)param_2;
if ((0 < param_1) && (0 < param_2)) {
do {
param_1 = (int)(uVar3 / 10);
param_2 = (int)(uVar2 / 10);
if ((int)uVar3 < 10) br... |
3,563 | func0 |
#include <cassert>
| bool func0(int A, int B) {
while (A > 0 && B > 0) {
A = A / 10;
B = B / 10;
}
if (A == 0 && B == 0) {
return true;
}
return false;
}
| int main() {
assert(func0(12, 1) == false);
assert(func0(2, 2) == true);
assert(func0(10, 20) == true);
return 0;
}
| O3 | cpp | func0(int, int):
endbr64
test %esi,%esi
jle 120c <_Z5func0ii+0x3c>
test %edi,%edi
jle 120c <_Z5func0ii+0x3c>
mov $0xcccccccd,%ecx
nopl 0x0(%rax)
mov %edi,%edi
mov %esi,%esi
mov %rdi,%rax
imul %rcx,%rdi
mov %rsi,%rdx
imul %rcx,%rsi
shr $0x23,%rdi
shr $0x23,%rsi
cmp $0x9,%eax
jle ... | _Z5func0ii:
endbr64
test edi, edi
jle short loc_117C
test esi, esi
jle short loc_117C
mov ecx, 0CCCCCCCDh
nop dword ptr [rax+00000000h]
loc_1158:
mov edi, edi
mov esi, esi
mov rax, rdi
imul rdi, rcx
mov rdx, rsi
imul rsi, rcx
shr rdi, 23h
shr rsi, 23h
cmp eax, 9
j... | bool func0(int a1, int a2)
{
int v2; // eax
int v3; // edx
if ( a1 > 0 && a2 > 0 )
{
do
{
v2 = a1;
v3 = a2;
a1 /= 0xAu;
a2 /= 0xAu;
}
while ( v2 > 9 && v3 > 9 );
}
return (a2 | a1) == 0;
} | func0:
ENDBR64
TEST EDI,EDI
JLE 0x0010117c
TEST ESI,ESI
JLE 0x0010117c
MOV ECX,0xcccccccd
NOP dword ptr [RAX]
LAB_00101158:
MOV EDI,EDI
MOV ESI,ESI
MOV RAX,RDI
IMUL RDI,RCX
MOV RDX,RSI
IMUL RSI,RCX
SHR RDI,0x23
SHR RSI,0x23
CMP EAX,0x9
JLE 0x0010117c
CMP EDX,0x9
JG 0x00101158
LAB_0010117c:
OR EDI,ESI
SETZ AL
RET | /* func0(int, int) */
bool func0(int param_1,int param_2)
{
int iVar1;
ulong uVar2;
ulong uVar3;
uVar3 = (ulong)(uint)param_1;
uVar2 = (ulong)(uint)param_2;
if ((0 < param_1) && (0 < param_2)) {
do {
param_1 = (int)(uVar3 / 10);
param_2 = (int)(uVar2 / 10);
if ((int)uVar3 < 10) br... |
3,564 | func0 |
#include <iostream>
#include <regex>
#include <cassert>
| std::string func0(const std::string& text) {
std::regex pattern(" +");
return std::regex_replace(text, pattern, " ");
}
| int main() {
assert(func0("python program") == "python program");
assert(func0("python programming language") == "python programming language");
assert(func0("python program") == "python program");
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; " +"
mov... | long long func0(long long a1, long long a2)
{
_BYTE v3[40]; // [rsp+10h] [rbp-40h] BYREF
unsigned long long v4; // [rsp+38h] [rbp-18h]
v4 = __readfsqword(0x28u);
std::basic_regex<char,std::regex_traits<char>>::basic_regex(v3, " +", 16LL);
std::regex_replace<std::regex_traits<char>,char,std::char_traits<char... | 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 CatchHandle... |
3,565 | func0 |
#include <iostream>
#include <regex>
#include <cassert>
| std::string func0(const std::string& text) {
std::regex pattern(" +");
return std::regex_replace(text, pattern, " ");
}
| int main() {
assert(func0("python program") == "python program");
assert(func0("python programming language") == "python programming language");
assert(func0("python program") == "python program");
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... |
3,566 | func0 |
#include <iostream>
#include <regex>
#include <cassert>
| std::string func0(const std::string& text) {
std::regex pattern(" +");
return std::regex_replace(text, pattern, " ");
}
| int main() {
assert(func0("python program") == "python program");
assert(func0("python programming language") == "python programming language");
assert(func0("python program") == "python program");
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,[0x11a6f1]
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::... |
3,567 | func0 |
#include <iostream>
#include <regex>
#include <cassert>
| std::string func0(const std::string& text) {
std::regex pattern(" +");
return std::regex_replace(text, pattern, " ");
}
| int main() {
assert(func0("python program") == "python program");
assert(func0("python programming language") == "python programming language");
assert(func0("python program") == "python program");
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... |
3,568 | func0 |
#include <vector>
#include <cassert>
template<typename T>
| std::vector<T> func0(const std::vector<std::vector<T>>& lst) {
std::vector<T> results;
for (const auto& item : lst) {
results.push_back(item.back());
}
return results;
}
| int main() {
assert((func0<int>({{1, 2, 3}, {4, 5}, {6, 7, 8, 9}}) == std::vector<int>{3, 5, 9}));
assert((func0<char>({{'x', 'y', 'z'}, {'m'}, {'a', 'b'}, {'u', 'v'}}) == std::vector<char>{'z', 'm', 'b', 'v'}));
assert((func0<int>({{1, 2, 3}, {4, 5}}) == std::vector<int>{3, 5}));
return 0;
}
| O0 | cpp | std::vector<int, std::allocator<int> > func0<int>(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 $0x48,%rsp
mov %rdi,-0x48(%rbp)
mov %rsi,-0x50(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x... | _Z5func0IiESt6vectorIT_SaIS1_EERKS0_IS3_SaIS3_EE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 48h
mov [rbp+var_48], rdi
mov [rbp+var_50], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_48]
mov rdi, rax
call _ZNSt6vectorIiSaIiEEC2Ev; std::vector<... | long long func0<int>(long long a1, long long a2)
{
long long v2; // rax
long long v4; // [rsp+18h] [rbp-38h] BYREF
_QWORD v5[2]; // [rsp+20h] [rbp-30h] BYREF
long long v6; // [rsp+30h] [rbp-20h]
unsigned long long v7; // [rsp+38h] [rbp-18h]
v7 = __readfsqword(0x28u);
std::vector<int>::vector(a1);
v5[1... | func0<int>:
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 0x001021d8
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x28],R... | /* std::vector<int, std::allocator<int> > func0<int>(std::vector<std::vector<int,
std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&) */
vector func0<int>(vector_conflict *param_1)
{
bool bVar1;
int *piVar2;
vector<std::vector<int,std::allocator<int>>,std::allocator<std::... |
3,569 | func0 |
#include <vector>
#include <cassert>
template<typename T>
| std::vector<T> func0(const std::vector<std::vector<T>>& lst) {
std::vector<T> results;
for (const auto& item : lst) {
results.push_back(item.back());
}
return results;
}
| int main() {
assert((func0<int>({{1, 2, 3}, {4, 5}, {6, 7, 8, 9}}) == std::vector<int>{3, 5, 9}));
assert((func0<char>({{'x', 'y', 'z'}, {'m'}, {'a', 'b'}, {'u', 'v'}}) == std::vector<char>{'z', 'm', 'b', 'v'}));
assert((func0<int>({{1, 2, 3}, {4, 5}}) == std::vector<int>{3, 5}));
return 0;
}
| O1 | cpp | std::vector<int, std::allocator<int> > func0<int>(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&):
endbr64
push %r12
push %rbp
push %rbx
mov %rdi,%rbx
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi)
movq $0x0,0x10(%rdi)
mov (%rsi),%rbp
mov ... | _Z5func0IiESt6vectorIT_SaIS1_EERKS0_IS3_SaIS3_EE:
endbr64
push r12
push rbp
push rbx
mov rbx, rdi
mov qword ptr [rdi], 0
mov qword ptr [rdi+8], 0
mov qword ptr [rdi+10h], 0
mov rbp, [rsi]
mov r12, [rsi+8]
cmp r12, rbp
jnz short loc_1F76
loc_1F59:
mov rax, rbx
pop rbx
pop... | _QWORD * func0<int>(_QWORD *a1, long long *a2)
{
long long v2; // rbp
long long v3; // r12
long long v5; // rdx
_DWORD *v6; // rsi
*a1 = 0LL;
a1[1] = 0LL;
a1[2] = 0LL;
v2 = *a2;
v3 = a2[1];
if ( v3 != *a2 )
{
do
{
v5 = *(_QWORD *)(v2 + 8);
v6 = (_DWORD *)a1[1];
if ( v6 =... | func0<int>:
ENDBR64
PUSH R12
PUSH RBP
PUSH RBX
MOV RBX,RDI
MOV qword ptr [RDI],0x0
MOV qword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
MOV RBP,qword ptr [RSI]
MOV R12,qword ptr [RSI + 0x8]
CMP R12,RBP
JNZ 0x00101f76
LAB_00101f59:
MOV RAX,RBX
POP RBX
POP RBP
POP R12
RET
LAB_00101f61:
SUB RDX,0x4
MOV RDI,RBX
LAB... | /* std::vector<int, std::allocator<int> > func0<int>(std::vector<std::vector<int,
std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&) */
vector<int,std::allocator<int>> * func0<int>(vector<int,std::allocator<int>> *param_1,long *param_2)
{
long lVar1;
int4 *puVar2;
long l... |
3,570 | func0 |
#include <vector>
#include <cassert>
template<typename T>
| std::vector<T> func0(const std::vector<std::vector<T>>& lst) {
std::vector<T> results;
for (const auto& item : lst) {
results.push_back(item.back());
}
return results;
}
| int main() {
assert((func0<int>({{1, 2, 3}, {4, 5}, {6, 7, 8, 9}}) == std::vector<int>{3, 5, 9}));
assert((func0<char>({{'x', 'y', 'z'}, {'m'}, {'a', 'b'}, {'u', 'v'}}) == std::vector<char>{'z', 'm', 'b', 'v'}));
assert((func0<int>({{1, 2, 3}, {4, 5}}) == std::vector<int>{3, 5}));
return 0;
}
| O2 | cpp | std::vector<int, std::allocator<int> > func0<int>(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&):
endbr64
push %r15
push %r14
push %r13
mov %rdi,%r13
push %r12
push %rbp
push %rbx
sub $0x18,%rsp
mov (%rsi),%rbx
mov 0x8(%rsi),... | _Z5func0IiESt6vectorIT_SaIS1_EERKS0_IS3_SaIS3_EE:
endbr64
push r12
pxor xmm0, xmm0
push rbp
mov rbp, rdi
push rbx
mov rbx, [rsi]
mov r12, [rsi+8]
mov qword ptr [rdi+10h], 0
movups xmmword ptr [rdi], xmm0
cmp r12, rbx
jz short loc_1FDD
xor eax, eax
xor esi, esi
jmp short... | long long func0<int>(long long a1, long long *a2)
{
long long v2; // rbx
long long v3; // r12
long long v4; // rax
long long v5; // rsi
long long v6; // rsi
long long v7; // rdx
v2 = *a2;
v3 = a2[1];
*(_QWORD *)(a1 + 16) = 0LL;
*(_OWORD *)a1 = 0LL;
if ( v3 != v2 )
{
v4 = 0LL;
v5 = 0LL;... | func0<int>:
ENDBR64
PUSH R12
PXOR XMM0,XMM0
PUSH RBP
MOV RBP,RDI
PUSH RBX
MOV RBX,qword ptr [RSI]
MOV R12,qword ptr [RSI + 0x8]
MOV qword ptr [RDI + 0x10],0x0
MOVUPS xmmword ptr [RDI],XMM0
CMP R12,RBX
JZ 0x00101fdd
XOR EAX,EAX
XOR ESI,ESI
JMP 0x00101fbf
LAB_00101fa0:
MOV EAX,dword ptr [RDX + -0x4]
ADD RSI,0x4
ADD RBX,0... | /* std::vector<int, std::allocator<int> > func0<int>(std::vector<std::vector<int,
std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&) */
vector<int,std::allocator<int>> * func0<int>(vector<int,std::allocator<int>> *param_1,long *param_2)
{
long lVar1;
int4 *puVar2;
long l... |
3,571 | func0 |
#include <vector>
#include <cassert>
template<typename T>
| std::vector<T> func0(const std::vector<std::vector<T>>& lst) {
std::vector<T> results;
for (const auto& item : lst) {
results.push_back(item.back());
}
return results;
}
| int main() {
assert((func0<int>({{1, 2, 3}, {4, 5}, {6, 7, 8, 9}}) == std::vector<int>{3, 5, 9}));
assert((func0<char>({{'x', 'y', 'z'}, {'m'}, {'a', 'b'}, {'u', 'v'}}) == std::vector<char>{'z', 'm', 'b', 'v'}));
assert((func0<int>({{1, 2, 3}, {4, 5}}) == std::vector<int>{3, 5}));
return 0;
}
| O3 | cpp | std::vector<int, std::allocator<int> > func0<int>(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&):
endbr64
push %r15
pxor %xmm0,%xmm0
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x28,%rsp
mov (%rsi),%rb... | _Z5func0IiESt6vectorIT_SaIS1_EERKS0_IS3_SaIS3_EE:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
push r12
push rbp
mov rbp, rdi
push rbx
sub rsp, 28h
mov rbx, [rsi]
mov r13, [rsi+8]
movups xmmword ptr [rdi], xmm0
mov qword ptr [rdi+10h], 0
cmp r13, rbx
jz loc_1D04
... | long long func0<int>(long long a1, long long *a2)
{
long long v3; // rbx
long long v4; // r13
char *v5; // r8
long long v6; // rcx
long long v7; // r12
void *v8; // r15
signed long long v9; // r14
unsigned long long v10; // rax
unsigned long long v11; // rdx
char *v12; // r9
char *v14; // rax
u... | func0<int>:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
SUB RSP,0x28
MOV RBX,qword ptr [RSI]
MOV R13,qword ptr [RSI + 0x8]
MOVUPS xmmword ptr [RDI],XMM0
MOV qword ptr [RDI + 0x10],0x0
CMP R13,RBX
JZ 0x00101d04
XOR R8D,R8D
XOR ECX,ECX
JMP 0x00101c7d
LAB_00101c60:
MOV EAX,dwor... | /* std::vector<int, std::allocator<int> > func0<int>(std::vector<std::vector<int,
std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&) */
vector<int,std::allocator<int>> * func0<int>(vector<int,std::allocator<int>> *param_1,long *param_2)
{
long lVar1;
long lVar2;
int4 *__... |
3,572 | func0 | #include <vector>
#include <string>
#include <sstream>
#include <cassert>
| std::vector<float> func0(const std::string& test_str) {
std::vector<float> res;
std::stringstream ss(test_str);
std::string item;
while (std::getline(ss, item, ','))
res.push_back(std::stof(item));
return res;
}
| int main() {
std::vector<float> result1 = func0("1.2, 1.3, 2.3, 2.4, 6.5");
std::vector<float> expected1 = {1.2, 1.3, 2.3, 2.4, 6.5};
assert(result1 == expected1);
std::vector<float> result2 = func0("2.3, 2.4, 5.6, 5.4, 8.9");
std::vector<float> expected2 = {2.3, 2.4, 5.6, 5.4, 8.9};
ass... | O0 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x1d8,%rsp
mov %rdi,-0x1d8(%rbp)
mov %rsi,-0x1e0(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x1d8(%rbp),%rax
mov %rax,%rdi
cal... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 1D8h
mov [rbp+var_1D8], rdi
mov [rbp+var_1E0], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_1D8]
mov rdi, rax
call _ZNSt6vectorIfSaIfEE... | long long func0(long long a1, long long a2, __m128i a3)
{
unsigned int v3; // eax
_QWORD *v4; // rax
int v6; // [rsp+1Ch] [rbp-1C4h] BYREF
_BYTE v7[32]; // [rsp+20h] [rbp-1C0h] BYREF
_BYTE v8[392]; // [rsp+40h] [rbp-1A0h] BYREF
unsigned long long v9; // [rsp+1C8h] [rbp-18h]
v9 = __readfsqword(0x28u);
... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x1d8
MOV qword ptr [RBP + -0x1d8],RDI
MOV qword ptr [RBP + -0x1e0],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x1d8]
MOV RDI,RAX
CALL 0x00102d20
MOV ESI,0x8
MOV EDI,0x10
CALL 0x00102cc1
MOV EDX,EAX
MOV RCX,q... | /* func0(std::string const&) */
string * func0(string *param_1)
{
bool bVar1;
_Ios_Openmode _Var2;
istream *piVar3;
string *in_RSI;
long in_FS_OFFSET;
float local_1cc;
string local_1c8 [32];
stringstream local_1a8 [392];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
std::vector<fl... |
3,573 | func0 | #include <vector>
#include <string>
#include <sstream>
#include <cassert>
| std::vector<float> func0(const std::string& test_str) {
std::vector<float> res;
std::stringstream ss(test_str);
std::string item;
while (std::getline(ss, item, ','))
res.push_back(std::stof(item));
return res;
}
| int main() {
std::vector<float> result1 = func0("1.2, 1.3, 2.3, 2.4, 6.5");
std::vector<float> expected1 = {1.2, 1.3, 2.3, 2.4, 6.5};
assert(result1 == expected1);
std::vector<float> result2 = func0("2.3, 2.4, 5.6, 5.4, 8.9");
std::vector<float> expected2 = {2.3, 2.4, 5.6, 5.4, 8.9};
ass... | 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 $0x1c8,%rsp
mov %rdi,%rbp
mov %rsi,%rbx
mov %fs:0x28,%rax
mov %rax,0x1b8(%rsp)
xor %eax,%eax
movq $0x0,(%rdi)
movq $0x0... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 1C8h
mov rbp, rdi
mov rbx, rsi
mov rax, fs:28h
mov [rsp+1F8h+var_40], rax
xor eax, eax
mov qword ptr [rdi], 0
mov qword ptr [rdi+8], 0
... | _QWORD * func0(_QWORD *a1, long long *a2)
{
long long v2; // rdx
long long v3; // rsi
struct _Unwind_Exception *v4; // rax
struct _Unwind_Exception *v5; // rbx
const char *v6; // r12
int *v7; // rbx
int v8; // r13d
float v9; // xmm0_4
float *v10; // rsi
_QWORD *v11; // rax
char *endptr; // [rsp+8h... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x1c8
MOV RBP,RDI
MOV RBX,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x1b8],RAX
XOR EAX,EAX
MOV qword ptr [RDI],0x0
MOV qword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
LEA R12,[RSP + 0x30]
LEA RDI,[RSP + 0xb0]
CALL 0x001021f... | /* func0(std::string const&) */
string * func0(string *param_1)
{
int iVar1;
char *pcVar2;
float *pfVar3;
int8 uVar4;
int *piVar5;
istream *piVar6;
int8 *in_RSI;
long in_FS_OFFSET;
float fVar7;
int8 local_1f0;
char *local_1e8;
int8 local_1e0;
char local_1d8;
int7 uStack_1d7;
long local_1... |
3,574 | func0 | #include <vector>
#include <string>
#include <sstream>
#include <cassert>
| std::vector<float> func0(const std::string& test_str) {
std::vector<float> res;
std::stringstream ss(test_str);
std::string item;
while (std::getline(ss, item, ','))
res.push_back(std::stof(item));
return res;
}
| int main() {
std::vector<float> result1 = func0("1.2, 1.3, 2.3, 2.4, 6.5");
std::vector<float> expected1 = {1.2, 1.3, 2.3, 2.4, 6.5};
assert(result1 == expected1);
std::vector<float> result2 = func0("2.3, 2.4, 5.6, 5.4, 8.9");
std::vector<float> expected2 = {2.3, 2.4, 5.6, 5.4, 8.9};
ass... | O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
mov %rsi,%rbx
sub $0x1f8,%rsp
mov %fs:0x28,%rax
mov %rax,0x1e8(%rsp)
xor %eax,%eax
movq $0x0,(%rdi)
lea 0x60... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
push r12
mov r12, rsi
push rbp
mov rbp, rdi
push rbx
sub rsp, 1F8h
movq xmm1, cs:off_5CC8
mov rax, fs:28h
mov [rsp+228h+var_40], rax
xor eax, eax
mov qwo... | long long func0(long long a1, _BYTE **a2)
{
_QWORD *v3; // rdi
__m128i si128; // xmm1
char *v5; // rbx
_BYTE *v6; // r12
void *v7; // rax
_QWORD *v8; // rax
const char *v9; // r12
int *v10; // rax
int v11; // r13d
int *v12; // rbx
float v13; // xmm0_4
float *v14; // rsi
void *v15; // rdi
__... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
PUSH R13
PUSH R12
MOV R12,RSI
PUSH RBP
MOV RBP,RDI
PUSH RBX
SUB RSP,0x1f8
MOVQ XMM1,qword ptr [0x00105cc8]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x1e8],RAX
XOR EAX,EAX
MOV qword ptr [RDI + 0x10],0x0
LEA RAX,[RSP + 0xe0]
LEA R15,[RSP + 0x60]
MOVUPS xmmword ptr [... | /* WARNING: Type propagation algorithm not settling */
/* func0(std::string const&) */
string * func0(string *param_1)
{
streambuf *psVar1;
int iVar2;
char *pcVar3;
int *__src;
float *pfVar4;
pointer_____offset_0x40___ puVar5;
pointer_____offset_0x10___ puVar6;
istream *piVar7;
int *piVar8;
int8 *... |
3,575 | func0 | #include <vector>
#include <string>
#include <sstream>
#include <cassert>
| std::vector<float> func0(const std::string& test_str) {
std::vector<float> res;
std::stringstream ss(test_str);
std::string item;
while (std::getline(ss, item, ','))
res.push_back(std::stof(item));
return res;
}
| int main() {
std::vector<float> result1 = func0("1.2, 1.3, 2.3, 2.4, 6.5");
std::vector<float> expected1 = {1.2, 1.3, 2.3, 2.4, 6.5};
assert(result1 == expected1);
std::vector<float> result2 = func0("2.3, 2.4, 5.6, 5.4, 8.9");
std::vector<float> expected2 = {2.3, 2.4, 5.6, 5.4, 8.9};
ass... | 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
mov %rdi,%r12
push %rbp
push %rbx
mov %rsi,%rbx
sub $0x1f8,%rsp
mov %fs:0x28,%rax
mov %rax,0x1e8(%rsp)
xor %eax,%eax
movq $0x0... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
push r12
mov r12, rsi
push rbp
mov rbp, rdi
push rbx
sub rsp, 1F8h
movq xmm1, cs:off_5CC8
mov rax, fs:28h
mov [rsp+228h+var_40], rax
xor eax, eax
mov qwo... | long long func0(long long a1, _BYTE **a2)
{
_QWORD *v3; // rdi
__m128i si128; // xmm1
char *v5; // rbx
_BYTE *v6; // r12
void *v7; // rax
_QWORD *v8; // rax
const char *v9; // r12
int *v10; // rax
int v11; // r13d
int *v12; // rbx
float v13; // xmm0_4
float *v14; // rsi
void *v15; // rdi
__... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
PUSH R13
PUSH R12
MOV R12,RSI
PUSH RBP
MOV RBP,RDI
PUSH RBX
SUB RSP,0x1f8
MOVQ XMM1,qword ptr [0x00105cc8]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x1e8],RAX
XOR EAX,EAX
MOV qword ptr [RDI + 0x10],0x0
LEA RAX,[RSP + 0xe0]
LEA R15,[RSP + 0x60]
MOVUPS xmmword ptr [... | /* WARNING: Type propagation algorithm not settling */
/* func0(std::string const&) */
string * func0(string *param_1)
{
streambuf *psVar1;
int iVar2;
char *pcVar3;
int *__src;
float *pfVar4;
pointer_____offset_0x40___ puVar5;
pointer_____offset_0x10___ puVar6;
istream *piVar7;
int *piVar8;
int8 *... |
3,576 | func0 |
#include <vector>
#include <algorithm>
#include <assert.h>
| int func0(const std::vector<int>& A) {
int n = A.size();
if (n == 1) {
return A[0];
}
std::vector<int> look_up(n);
look_up[0] = A[0];
look_up[1] = std::max(A[0], A[1]);
for (int i = 2; i < n; ++i) {
look_up[i] = std::max(look_up[i - 1], look_up[i - 2] + A[i]);
... | int main() {
assert(func0({1, 2, 9, 4, 5, 0, 4, 11, 6}) == 26);
assert(func0({1, 2, 9, 5, 6, 0, 5, 12, 7}) == 28);
assert(func0({1, 3, 10, 5, 6, 0, 6, 14, 21}) == 44);
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x48,%rsp
mov %rdi,-0x48(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x48(%rbp),%rax
mov %rax,%rdi
callq 17fc <_ZNKSt6vectorIiSaIiEE4sizeEv>
mov %eax,-0x34(%rbp)
cmpl ... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 58h
mov [rbp+var_58], rdi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_58]
mov rdi, rax
call _ZNKSt6vectorIiSaIiEE4sizeEv; std::vector<int>::size(void)
mov [rbp+var_3C], eax
... | long long func0(long long a1)
{
unsigned int v1; // ebx
int v2; // ebx
long long v3; // rbx
long long v4; // rax
int v5; // ebx
long long v6; // rax
int v7; // ebx
long long v8; // rbx
long long v9; // rax
int v11; // [rsp+1Ch] [rbp-44h] BYREF
int i; // [rsp+20h] [rbp-40h]
int v13; // [rsp+24h]... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x58
MOV qword ptr [RBP + -0x58],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x58]
MOV RDI,RAX
CALL 0x00101868
MOV dword ptr [RBP + -0x3c],EAX
CMP dword ptr [RBP + -0x3c],0x1
JNZ 0x00101296
MOV RAX,qword ptr [... | /* func0(std::vector<int, std::allocator<int> > const&) */
int4 func0(vector *param_1)
{
int iVar1;
int4 *puVar2;
int *piVar3;
int *piVar4;
int4 uVar5;
long in_FS_OFFSET;
int local_4c;
int local_48;
int local_44;
int *local_40;
vector<int,std::allocator<int>> local_38 [24];
long local_20;
... |
3,577 | func0 |
#include <vector>
#include <algorithm>
#include <assert.h>
| int func0(const std::vector<int>& A) {
int n = A.size();
if (n == 1) {
return A[0];
}
std::vector<int> look_up(n);
look_up[0] = A[0];
look_up[1] = std::max(A[0], A[1]);
for (int i = 2; i < n; ++i) {
look_up[i] = std::max(look_up[i - 1], look_up[i - 2] + A[i]);
... | int main() {
assert(func0({1, 2, 9, 4, 5, 0, 4, 11, 6}) == 26);
assert(func0({1, 2, 9, 5, 6, 0, 5, 12, 7}) == 28);
assert(func0({1, 3, 10, 5, 6, 0, 6, 14, 21}) == 44);
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %r12
push %rbp
push %rbx
sub $0x10,%rsp
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
mov (%rdi),%rax
mov 0x8(%rdi),%rbx
sub %rax,%rbx
sar $0x2,%rbx
cmp $0x1,%ebx
jne 1259 <_Z5func0RKSt6vectorIiSaIiEE+0x50>
mov ... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push r12
push rbp
push rbx
sub rsp, 10h
mov rax, fs:28h
mov [rsp+28h+var_20], rax
xor eax, eax
mov rax, [rdi]
mov rbx, [rdi+8]
sub rbx, rax
sar rbx, 2
cmp ebx, 1
jnz short loc_1259
mov ebx, [rax]
loc_123A:
mov rax, [rsp+28h+va... | // write access to const memory has been detected, the output may be wrong!
long long func0(unsigned int **a1)
{
unsigned int *v1; // rax
long long v2; // rbx
unsigned int v3; // ebx
unsigned long long v5; // rbp
_DWORD *v6; // r9
_DWORD *i; // rax
unsigned int *v8; // rsi
int v9; // edx
unsigned int... | func0:
ENDBR64
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x10
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RDI]
MOV RBX,qword ptr [RDI + 0x8]
SUB RBX,RAX
SAR RBX,0x2
CMP EBX,0x1
JNZ 0x00101259
MOV EBX,dword ptr [RAX]
LAB_0010123a:
MOV RAX,qword ptr [RSP + 0x8]
SUB RAX,qword ptr FS:[... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
int iVar1;
int *piVar2;
int *piVar3;
int *piVar4;
int iVar5;
ulong uVar6;
ulong uVar7;
int *piVar8;
long in_FS_OFFSET;
int lo... |
3,578 | func0 |
#include <vector>
#include <algorithm>
#include <assert.h>
| int func0(const std::vector<int>& A) {
int n = A.size();
if (n == 1) {
return A[0];
}
std::vector<int> look_up(n);
look_up[0] = A[0];
look_up[1] = std::max(A[0], A[1]);
for (int i = 2; i < n; ++i) {
look_up[i] = std::max(look_up[i - 1], look_up[i - 2] + A[i]);
... | int main() {
assert(func0({1, 2, 9, 4, 5, 0, 4, 11, 6}) == 26);
assert(func0({1, 2, 9, 5, 6, 0, 5, 12, 7}) == 28);
assert(func0({1, 3, 10, 5, 6, 0, 6, 14, 21}) == 44);
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %r12
push %rbp
push %rbx
mov (%rdi),%rax
mov 0x8(%rdi),%rbx
sub %rax,%rbx
sar $0x2,%rbx
cmp $0x1,%ebx
jne 1480 <_Z5func0RKSt6vectorIiSaIiEE+0x30>
mov (%rax),%r12d
pop %rbx
pop %rbp
mov %r12d,%eax
pop %r12
retq
nopw... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push r13
push r12
push rbp
push rbx
sub rsp, 8
mov rax, [rdi]
mov rbx, [rdi+8]
sub rbx, rax
sar rbx, 2
cmp ebx, 1
jnz short loc_1450
mov ebx, [rax]
add rsp, 8
mov eax, ebx
pop rbx
pop rbp
pop r12
pop r13
retn
loc_14... | long long func0(int **a1)
{
long long v1; // rbx
unsigned long long v3; // rbp
int *v4; // rax
int *v5; // r12
int *v6; // rcx
int v7; // eax
int *v8; // rdx
int *i; // rsi
unsigned int v10; // ebx
v1 = a1[1] - *a1;
if ( (_DWORD)v1 == 1 )
return (unsigned int)**a1;
if ( (unsigned long long... | func0:
ENDBR64
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV RAX,qword ptr [RDI]
MOV RBX,qword ptr [RDI + 0x8]
SUB RBX,RAX
SAR RBX,0x2
CMP EBX,0x1
JNZ 0x00101450
MOV EBX,dword ptr [RAX]
ADD RSP,0x8
MOV EAX,EBX
POP RBX
POP RBP
POP R12
POP R13
RET
LAB_00101450:
MOVSXD RBP,EBX
MOV RAX,RBP
SHR RAX,0x3d
JNZ 0x0010151d... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(std::vector<int, std::allocator<int> > const&) */
void * func0(vector *param_1)
{
uint uVar1;
int *piVar2;
void *pvVar3;
code *pcVar4;
int iVar5;
int *piVar6;
void *extraout_RAX;
int *piVar7;
int iVar8;
u... |
3,579 | func0 |
#include <vector>
#include <algorithm>
#include <assert.h>
| int func0(const std::vector<int>& A) {
int n = A.size();
if (n == 1) {
return A[0];
}
std::vector<int> look_up(n);
look_up[0] = A[0];
look_up[1] = std::max(A[0], A[1]);
for (int i = 2; i < n; ++i) {
look_up[i] = std::max(look_up[i - 1], look_up[i - 2] + A[i]);
... | int main() {
assert(func0({1, 2, 9, 4, 5, 0, 4, 11, 6}) == 26);
assert(func0({1, 2, 9, 5, 6, 0, 5, 12, 7}) == 28);
assert(func0({1, 3, 10, 5, 6, 0, 6, 14, 21}) == 44);
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %r13
push %r12
push %rbp
push %rbx
sub $0x8,%rsp
mov (%rdi),%rax
mov 0x8(%rdi),%rbx
sub %rax,%rbx
sar $0x2,%rbx
cmp $0x1,%ebx
jne 1458 <_Z5func0RKSt6vectorIiSaIiEE+0x38>
mov (%rax),%r12d
add $0x8,%rsp
pop %rbx
pop ... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push r13
push r12
push rbp
push rbx
sub rsp, 8
mov rax, [rdi]
mov rbx, [rdi+8]
sub rbx, rax
sar rbx, 2
cmp ebx, 1
jnz short loc_1450
mov ebx, [rax]
add rsp, 8
mov eax, ebx
pop rbx
pop rbp
pop r12
pop r13
retn
loc_14... | long long func0(int **a1)
{
long long v1; // rbx
unsigned long long v3; // rbp
int *v4; // rax
int *v5; // r12
int *v6; // rcx
int v7; // eax
int *v8; // rdx
int *i; // rsi
unsigned int v10; // ebx
v1 = a1[1] - *a1;
if ( (_DWORD)v1 == 1 )
return (unsigned int)**a1;
if ( (unsigned long long... | func0:
ENDBR64
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV RAX,qword ptr [RDI]
MOV RBX,qword ptr [RDI + 0x8]
SUB RBX,RAX
SAR RBX,0x2
CMP EBX,0x1
JNZ 0x00101450
MOV EBX,dword ptr [RAX]
ADD RSP,0x8
MOV EAX,EBX
POP RBX
POP RBP
POP R12
POP R13
RET
LAB_00101450:
MOVSXD RBP,EBX
MOV RAX,RBP
SHR RAX,0x3d
JNZ 0x0010151d... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(std::vector<int, std::allocator<int> > const&) */
void * func0(vector *param_1)
{
uint uVar1;
int *piVar2;
void *pvVar3;
code *pcVar4;
int iVar5;
int *piVar6;
void *extraout_RAX;
int *piVar7;
int iVar8;
u... |
3,580 | func0 |
#include <vector>
#include <algorithm>
#include <cassert>
bool compareByLast(const std::pair<int, int> &a, const std::pair<int, int> &b) {
return a.second < b.second;
}
| std::vector<std::pair<int, int>> func0(const std::vector<std::pair<int, int>> &tuples) {
std::vector<std::pair<int, int>> sorted_tuples = tuples;
std::sort(sorted_tuples.begin(), sorted_tuples.end(), compareByLast);
return sorted_tuples;
}
| int main() {
assert((func0({{2, 5}, {1, 2}, {4, 4}, {2, 3}, {2, 1}}) == std::vector<std::pair<int, int>>{{2, 1}, {1, 2}, {2, 3}, {4, 4}, {2, 5}}));
assert((func0({{9, 8}, {4, 7}, {3, 5}, {7, 9}, {1, 2}}) == std::vector<std::pair<int, int>>{{1, 2}, {3, 5}, {4, 7}, {9, 8}, {7, 9}}));
assert((func0({{20, 50... | O0 | cpp | func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x28,%rsp
mov %rdi,-0x28(%rbp)
mov %rsi,-0x30(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x30(%rbp),%rdx
mov -0x28(%rbp),%rax
mov %... | _Z5func0RKSt6vectorISt4pairIiiESaIS1_EE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 18h
mov [rbp+var_18], rdi
mov [rbp+var_20], rsi
mov rdx, [rbp+var_20]
mov rax, [rbp+var_18]
mov rsi, rdx
mov rdi, rax
call _ZNSt6vectorISt4pairIiiESaIS1_EEC2ERKS3_; std::vector<std::pair<int... | long long func0(long long a1, long long a2)
{
long long v2; // rbx
long long v3; // rax
std::vector<std::pair<int,int>>::vector(a1, a2);
v2 = std::vector<std::pair<int,int>>::end(a1);
v3 = std::vector<std::pair<int,int>>::begin(a1);
std::sort<__gnu_cxx::__normal_iterator<std::pair<int,int> *,std::vector<s... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x18
MOV qword ptr [RBP + -0x18],RDI
MOV qword ptr [RBP + -0x20],RSI
MOV RDX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,RDX
MOV RDI,RAX
LAB_00101271:
CALL 0x00101afc
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,RAX
CALL 0x00101d0a
MOV RBX,RAX
MOV RAX,... | /* func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&) */
vector * func0(vector *param_1)
{
__normal_iterator _Var1;
__normal_iterator _Var2;
vector *in_RSI;
std::vector<std::pair<int,int>,std::allocator<std::pair<int,int>>>::vector
((vector<std::pair<int,int>,... |
3,581 | func0 |
#include <vector>
#include <algorithm>
#include <cassert>
bool compareByLast(const std::pair<int, int> &a, const std::pair<int, int> &b) {
return a.second < b.second;
}
| std::vector<std::pair<int, int>> func0(const std::vector<std::pair<int, int>> &tuples) {
std::vector<std::pair<int, int>> sorted_tuples = tuples;
std::sort(sorted_tuples.begin(), sorted_tuples.end(), compareByLast);
return sorted_tuples;
}
| int main() {
assert((func0({{2, 5}, {1, 2}, {4, 4}, {2, 3}, {2, 1}}) == std::vector<std::pair<int, int>>{{2, 1}, {1, 2}, {2, 3}, {4, 4}, {2, 5}}));
assert((func0({{9, 8}, {4, 7}, {3, 5}, {7, 9}, {1, 2}}) == std::vector<std::pair<int, int>>{{1, 2}, {3, 5}, {4, 7}, {9, 8}, {7, 9}}));
assert((func0({{20, 50... | O1 | cpp | func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&):
endbr64
push %r13
push %r12
push %rbp
push %rbx
sub $0x8,%rsp
mov %rdi,%rbx
mov %rsi,%r13
mov 0x8(%rsi),%rbp
sub (%rsi),%rbp
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi)
movq $0x0,0x10(%rdi)
mov %rbp,%rax
sar ... | _Z5func0RKSt6vectorISt4pairIiiESaIS1_EE:
endbr64
push r13
push r12
push rbp
push rbx
sub rsp, 8
mov r12, rdi
mov r13, rsi
mov rbp, [rsi+8]
sub rbp, [rsi]
mov qword ptr [rdi], 0
mov qword ptr [rdi+8], 0
mov qword ptr [rdi+10h], 0
jz loc_12F5
mov rax, 7FFFFFFFFFFFFFF8h... | _QWORD * func0(_QWORD *a1, long long *a2)
{
unsigned long long v2; // rbp
long long v3; // rbx
long long v4; // rbp
long long v5; // rcx
long long v6; // rbp
long long v7; // rax
long long v8; // r13
int v9; // eax
unsigned long long v10; // rax
long long v11; // rbx
v2 = a2[1] - *a2;
*a1 = 0LL... | func0:
ENDBR64
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV R12,RDI
MOV R13,RSI
MOV RBP,qword ptr [RSI + 0x8]
SUB RBP,qword ptr [RSI]
MOV qword ptr [RDI],0x0
MOV qword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
JZ 0x001012f5
MOV RAX,0x7ffffffffffffff8
CMP RAX,RBP
JC 0x001012f0
MOV RDI,RBP
LAB_00101265:
C... | /* func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&) */
vector * func0(vector *param_1)
{
void *pvVar1;
long lVar2;
uint uVar3;
void *pvVar4;
long lVar5;
ulong uVar6;
long lVar7;
long *in_RSI;
__normal_iterator _Var8;
uVar6 = in_RSI[1] - *in_RSI;
*(int8 *)p... |
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.