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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
682 | func0 |
#include <cassert>
| double func0(double a) {
double perimeter = 5 * a;
return perimeter;
}
| int main() {
assert(func0(5) == 25);
assert(func0(10) == 50);
assert(func0(15) == 75);
return 0;
}
| O2 | cpp | func0(double):
endbr64
mulsd 0xebc(%rip),%xmm0
retq
nopl (%rax)
| _Z5func0d:
endbr64
mulsd xmm0, cs:qword_2008
retn | double func0(double a1)
{
return a1 * 5.0;
} | func0:
ENDBR64
MULSD XMM0,qword ptr [0x00102008]
RET | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(double) */
double func0(double param_1)
{
return param_1 * _DAT_00102008;
} |
683 | func0 |
#include <cassert>
| double func0(double a) {
double perimeter = 5 * a;
return perimeter;
}
| int main() {
assert(func0(5) == 25);
assert(func0(10) == 50);
assert(func0(15) == 75);
return 0;
}
| O3 | cpp | func0(double):
endbr64
mulsd 0xebc(%rip),%xmm0
retq
nopl (%rax)
| _Z5func0d:
endbr64
mulsd xmm0, cs:qword_2008
retn | double func0(double a1)
{
return a1 * 5.0;
} | func0:
ENDBR64
MULSD XMM0,qword ptr [0x00102008]
RET | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(double) */
double func0(double param_1)
{
return param_1 * _DAT_00102008;
} |
684 | func0 |
#include <assert.h>
#include <string>
| int func0(const std::string& s) {
int count = 0;
for (int i = 0; i < s.length() - 2; i++) {
if (s[i] == 's' && s[i + 1] == 't' && s[i + 2] == 'd') {
count++;
}
}
return count;
}
| int main() {
assert(func0("letstdlenstdporstd") == 3);
assert(func0("truststdsolensporsd") == 1);
assert(func0("makestdsostdworthit") == 2);
return 0;
}
| O0 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x28,%rsp
mov %rdi,-0x28(%rbp)
movl $0x0,-0x18(%rbp)
movl $0x0,-0x14(%rbp)
mov -0x14(%rbp),%eax
movslq %eax,%rbx
mov -0x28(%rbp),%rax
mov %rax,%rdi
call... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 28h
mov [rbp+var_28], rdi
mov [rbp+var_18], 0
mov [rbp+var_14], 0
jmp short loc_13DC
loc_136A:
mov eax, [rbp+var_14]
movsxd rdx, eax
mov rax, [rbp+var_28]
mov rsi, r... | long long func0(long long a1)
{
unsigned int v3; // [rsp+18h] [rbp-18h]
int i; // [rsp+1Ch] [rbp-14h]
v3 = 0;
for ( i = 0; i < (unsigned long long)(std::string::length(a1) - 2); ++i )
{
if ( *(_BYTE *)std::string::operator[](a1, i) == 115
&& *(_BYTE *)std::string::operator[](a1, i + 1) == 116
... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x28
MOV qword ptr [RBP + -0x28],RDI
MOV dword ptr [RBP + -0x18],0x0
MOV dword ptr [RBP + -0x14],0x0
JMP 0x001013dc
LAB_0010136a:
MOV EAX,dword ptr [RBP + -0x14]
MOVSXD RDX,EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RSI,RDX
MOV RDI,RAX
CALL 0x001011e0
MOVZX EAX,byte ptr... | /* func0(std::string const&) */
int func0(string *param_1)
{
bool bVar1;
char *pcVar2;
long lVar3;
int4 local_20;
int4 local_1c;
local_20 = 0;
local_1c = 0;
do {
lVar3 = std::string::length();
if (lVar3 - 2U <= (ulong)(long)local_1c) {
return local_20;
}
pcVar2 = (char *)std::... |
685 | func0 |
#include <assert.h>
#include <string>
| int func0(const std::string& s) {
int count = 0;
for (int i = 0; i < s.length() - 2; i++) {
if (s[i] == 's' && s[i + 1] == 't' && s[i + 2] == 'd') {
count++;
}
}
return count;
}
| int main() {
assert(func0("letstdlenstdporstd") == 3);
assert(func0("truststdsolensporsd") == 1);
assert(func0("makestdsostdworthit") == 2);
return 0;
}
| O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
mov 0x8(%rdi),%rcx
cmp $0x2,%rcx
je 1239 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x50>
mov (%rdi),%rdx
sub $0x1,%rcx
mov $0x1,%eax
mov $0x0,%edi
jmp 1213 <_Z5func0RKNSt... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
mov rcx, [rdi+8]
cmp rcx, 2
jz short loc_1254
mov rdx, [rdi]
sub rcx, 1
mov eax, 1
mov edi, 0
jmp short loc_1236
loc_122A:
add edi, 1
loc_122D:
add rax, 1
cmp rcx, rax
jz short loc_1259
loc_1236:
cm... | long long func0(long long *a1)
{
long long v1; // rcx
long long v2; // rdx
long long v3; // rcx
long long v4; // rax
unsigned int v5; // edi
v1 = a1[1];
if ( v1 == 2 )
{
return 0;
}
else
{
v2 = *a1;
v3 = v1 - 1;
v4 = 1LL;
v5 = 0;
do
{
if ( *(_BYTE *)(v2 + v4 - 1... | func0:
ENDBR64
MOV RCX,qword ptr [RDI + 0x8]
CMP RCX,0x2
JZ 0x00101254
MOV RDX,qword ptr [RDI]
SUB RCX,0x1
MOV EAX,0x1
MOV EDI,0x0
JMP 0x00101236
LAB_0010122a:
ADD EDI,0x1
LAB_0010122d:
ADD RAX,0x1
CMP RCX,RAX
JZ 0x00101259
LAB_00101236:
CMP byte ptr [RDX + RAX*0x1 + -0x1],0x73
JNZ 0x0010122d
MOVSXD RSI,EAX
CMP byte pt... | /* func0(std::string const&) */
int func0(string *param_1)
{
long lVar1;
long lVar2;
int iVar3;
if (*(long *)(param_1 + 8) == 2) {
iVar3 = 0;
}
else {
lVar1 = *(long *)param_1;
lVar2 = 1;
iVar3 = 0;
do {
if (((*(char *)(lVar1 + -1 + lVar2) == 's') && (*(char *)(lVar1 + (int)lV... |
686 | func0 |
#include <assert.h>
#include <string>
| int func0(const std::string& s) {
int count = 0;
for (int i = 0; i < s.length() - 2; i++) {
if (s[i] == 's' && s[i + 1] == 't' && s[i + 2] == 'd') {
count++;
}
}
return count;
}
| int main() {
assert(func0("letstdlenstdporstd") == 3);
assert(func0("truststdsolensporsd") == 1);
assert(func0("makestdsostdworthit") == 2);
return 0;
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
mov 0x8(%rdi),%rdx
sub $0x2,%rdx
je 13b0 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x60>
mov (%rdi),%rcx
mov $0x2,%edi
xor %r8d,%r8d
add %rcx,%rdx
mov %rcx,%rax
sub %e... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
mov rax, [rdi+8]
lea rdx, [rax-2]
cmp rax, 2
jz short loc_1398
mov rcx, [rdi]
mov edi, 2
xor r8d, r8d
add rdx, rcx
mov rax, rcx
sub edi, ecx
jmp short loc_1369
loc_1360:
add rax, 1
cmp rdx, rax
j... | long long func0(_QWORD *a1)
{
long long v1; // rax
_BYTE *v2; // rcx
unsigned int v3; // r8d
long long v4; // rdx
_BYTE *v5; // rax
int v6; // edi
v1 = a1[1];
if ( v1 == 2 )
return 0LL;
v2 = (_BYTE *)*a1;
v3 = 0;
v4 = *a1 + v1 - 2;
v5 = (_BYTE *)*a1;
v6 = 2 - *a1;
do
{
while ( *v... | func0:
ENDBR64
MOV RAX,qword ptr [RDI + 0x8]
LEA RDX,[RAX + -0x2]
CMP RAX,0x2
JZ 0x00101398
MOV RCX,qword ptr [RDI]
MOV EDI,0x2
XOR R8D,R8D
ADD RDX,RCX
MOV RAX,RCX
SUB EDI,ECX
JMP 0x00101369
LAB_00101360:
ADD RAX,0x1
CMP RDX,RAX
JZ 0x0010138d
LAB_00101369:
CMP byte ptr [RAX],0x73
JNZ 0x00101360
CMP byte ptr [RAX + 0x1]... | /* func0(std::string const&) */
int func0(string *param_1)
{
char *pcVar1;
char *pcVar2;
int iVar3;
if (*(long *)(param_1 + 8) == 2) {
return 0;
}
pcVar1 = *(char **)param_1;
iVar3 = 0;
pcVar2 = pcVar1;
do {
while (((*pcVar2 == 's' && (pcVar2[1] == 't')) &&
(pcVar1[(2 - (int)pc... |
687 | func0 |
#include <assert.h>
#include <string>
| int func0(const std::string& s) {
int count = 0;
for (int i = 0; i < s.length() - 2; i++) {
if (s[i] == 's' && s[i + 1] == 't' && s[i + 2] == 'd') {
count++;
}
}
return count;
}
| int main() {
assert(func0("letstdlenstdporstd") == 3);
assert(func0("truststdsolensporsd") == 1);
assert(func0("makestdsostdworthit") == 2);
return 0;
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
mov 0x8(%rdi),%rdx
sub $0x2,%rdx
je 13b0 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x60>
mov (%rdi),%rcx
mov $0x2,%edi
xor %r8d,%r8d
add %rcx,%rdx
mov %rcx,%rax
sub %e... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
mov rax, [rdi+8]
lea rdx, [rax-2]
cmp rax, 2
jz short loc_1398
mov rcx, [rdi]
mov edi, 2
xor r8d, r8d
add rdx, rcx
mov rax, rcx
sub edi, ecx
jmp short loc_1369
loc_1360:
add rax, 1
cmp rdx, rax
j... | long long func0(_QWORD *a1)
{
long long v1; // rax
_BYTE *v2; // rcx
unsigned int v3; // r8d
long long v4; // rdx
_BYTE *v5; // rax
int v6; // edi
v1 = a1[1];
if ( v1 == 2 )
return 0LL;
v2 = (_BYTE *)*a1;
v3 = 0;
v4 = *a1 + v1 - 2;
v5 = (_BYTE *)*a1;
v6 = 2 - *a1;
do
{
while ( *v... | func0:
ENDBR64
MOV RAX,qword ptr [RDI + 0x8]
LEA RDX,[RAX + -0x2]
CMP RAX,0x2
JZ 0x00101398
MOV RCX,qword ptr [RDI]
MOV EDI,0x2
XOR R8D,R8D
ADD RDX,RCX
MOV RAX,RCX
SUB EDI,ECX
JMP 0x00101369
LAB_00101360:
ADD RAX,0x1
CMP RDX,RAX
JZ 0x0010138d
LAB_00101369:
CMP byte ptr [RAX],0x73
JNZ 0x00101360
CMP byte ptr [RAX + 0x1]... | /* func0(std::string const&) */
int func0(string *param_1)
{
char *pcVar1;
char *pcVar2;
int iVar3;
if (*(long *)(param_1 + 8) == 2) {
return 0;
}
pcVar1 = *(char **)param_1;
iVar3 = 0;
pcVar2 = pcVar1;
do {
while (((*pcVar2 == 's' && (pcVar2[1] == 't')) &&
(pcVar1[(2 - (int)pc... |
688 | func0 |
#include <iostream>
#include <regex>
#include <cassert>
| std::string func0(const std::string& text) {
std::regex pattern("[\\W_]+");
return std::regex_replace(text, pattern, "");
}
| int main() {
assert(func0("python @#&^%$*program123") == "pythonprogram123");
assert(func0("python %^$@!^&*() programming24%$^^() language") == "pythonprogramming24language");
assert(func0("python ^%&^()(+_)(_^&67) program") == "python67program");
return 0;
}
| O0 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x48,%rsp
mov %rdi,-0x48(%rbp)
mov %rsi,-0x50(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
lea -0x40(%rbp),%rax
mov $0x10,%edx
lea ... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 48h
mov [rbp+var_48], rdi
mov [rbp+var_50], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_40]
mov edx, 10h
lea rcx, aW; "[\\W_]+"
mov ... | long long func0(long long a1, long long a2)
{
_BYTE v3[40]; // [rsp+10h] [rbp-40h] BYREF
unsigned long long v4; // [rsp+38h] [rbp-18h]
v4 = __readfsqword(0x28u);
std::basic_regex<char,std::regex_traits<char>>::basic_regex(v3, "[\\W_]+", 16LL);
std::regex_replace<std::regex_traits<char>,char,std::char_traits... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RBP + -0x48],RDI
MOV qword ptr [RBP + -0x50],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x40]
MOV EDX,0x10
LEA RCX,[0x134051]
MOV RSI,RCX
MOV RDI,RAX
LAB_00104b63:
CALL 0x00106152
MOV RAX,qword ptr ... | /* func0(std::string const&) */
string * func0(string *param_1)
{
int8 in_RSI;
long in_FS_OFFSET;
regex local_48 [40];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
std::regex::basic_regex(local_48,"[\\W_]+",0x10);
/* try { // try from 00104b84 to 00104b88 has its CatchH... |
689 | func0 |
#include <iostream>
#include <regex>
#include <cassert>
| std::string func0(const std::string& text) {
std::regex pattern("[\\W_]+");
return std::regex_replace(text, pattern, "");
}
| int main() {
assert(func0("python @#&^%$*program123") == "pythonprogram123");
assert(func0("python %^$@!^&*() programming24%$^^() language") == "pythonprogramming24language");
assert(func0("python ^%&^()(+_)(_^&67) program") == "python67program");
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... |
690 | func0 |
#include <iostream>
#include <regex>
#include <cassert>
| std::string func0(const std::string& text) {
std::regex pattern("[\\W_]+");
return std::regex_replace(text, pattern, "");
}
| int main() {
assert(func0("python @#&^%$*program123") == "pythonprogram123");
assert(func0("python %^$@!^&*() programming24%$^^() language") == "pythonprogramming24language");
assert(func0("python ^%&^()(+_)(_^&67) program") == "python67program");
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,[0x11a741]
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::... |
691 | func0 |
#include <iostream>
#include <regex>
#include <cassert>
| std::string func0(const std::string& text) {
std::regex pattern("[\\W_]+");
return std::regex_replace(text, pattern, "");
}
| int main() {
assert(func0("python @#&^%$*program123") == "pythonprogram123");
assert(func0("python %^$@!^&*() programming24%$^^() language") == "pythonprogramming24language");
assert(func0("python ^%&^()(+_)(_^&67) program") == "python67program");
return 0;
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
mov %rsi,%rbx
sub $0x40,%rsp
mov %fs:0x28,%rax
mov %rax,0x38(%rsp)
xor %eax,%eax
lea 0x8(%rsp),%rbp
lea 0x18(%rsp),%r13... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r15
push r14
lea r14, [rbp+var_E0]
push r13
push r12
mov r12, rsi
push rbx
mov rbx, rdi
sub rsp, 108h
mov rax, fs:28h
mov [rbp+var_38], rax
xor eax, eax
lea rax, [rbp+... | _QWORD * func0(_QWORD *a1, char **a2)
{
char *v3; // rax
long long v4; // r13
char *v5; // r15
char *v6; // r12
char v7; // al
long long v8; // rdx
long long v9; // rcx
long long v10; // r8
long long v11; // r9
unsigned long long v12; // rsi
long long v13; // rdi
volatile signed __int32 *v14; //... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
LEA R14,[RBP + -0xe0]
PUSH R13
PUSH R12
MOV R12,RSI
PUSH RBX
MOV RBX,RDI
SUB RSP,0x108
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x38],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0xd8]
MOV qword ptr [RBP + -0x130],R14
MOV RDI,RAX
MOV qword ptr [RBP + -0x128],RAX
CALL 0x... | /* func0(std::string const&) */
string * func0(string *param_1)
{
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
string sVar2;
string *psVar3;
long lVar4;
int8 uVar5;
bool bVar6;
char cVar7;
int iVar8;
int8 *puVar9;
string *psVar10;
long lVar11;
long *plVar12;
ulong uVar13;
ulong uVar14;
lon... |
692 | func0 |
#include <cassert>
#include <map>
#include <string>
#include <vector>
| std::map<std::string, std::vector<int>> func0(const std::vector<std::pair<std::string, int>>& l) {
std::map<std::string, std::vector<int>> result;
for (const auto& [k, v] : l) {
result[k].push_back(v);
}
return result;
}
| int main() {
// Test case 1
std::vector<std::pair<std::string, int>> input1 = {{"yellow", 1}, {"blue", 2}, {"yellow", 3}, {"blue", 4}, {"red", 1}};
std::map<std::string, std::vector<int>> expected1 = {{"yellow", {1, 3}}, {"blue", {2, 4}}, {"red", {1}}};
assert(func0(input1) == expected1);
// ... | O0 | cpp | func0(std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int> > > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x58,%rsp
mov %rdi,-0... | _Z5func0RKSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiESaIS7_EE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 58h
mov [rbp+var_58], rdi
mov [rbp+var_60], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_58]
mov rdi, rax
call... | long long func0(long long a1, long long a2)
{
long long v2; // rax
long long v4; // [rsp+18h] [rbp-48h] BYREF
_QWORD v5[2]; // [rsp+20h] [rbp-40h] BYREF
long long v6; // [rsp+30h] [rbp-30h]
long long v7; // [rsp+38h] [rbp-28h]
long long v8; // [rsp+40h] [rbp-20h]
unsigned long long v9; // [rsp+48h] [rbp-... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x58
MOV qword ptr [RBP + -0x58],RDI
MOV qword ptr [RBP + -0x60],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x58]
MOV RDI,RAX
CALL 0x00103c5c
MOV RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RBP + -0x38],RAX
MO... | /* func0(std::vector<std::pair<std::string, int>, std::allocator<std::pair<std::string, int> > >
const&) */
vector * func0(vector *param_1)
{
bool bVar1;
vector<int,std::allocator<int>> *this;
vector<std::pair<std::string,int>,std::allocator<std::pair<std::string,int>>> *in_RSI;
long in_FS_OFFSET;
int8 l... |
693 | func0 |
#include <cassert>
#include <map>
#include <string>
#include <vector>
| std::map<std::string, std::vector<int>> func0(const std::vector<std::pair<std::string, int>>& l) {
std::map<std::string, std::vector<int>> result;
for (const auto& [k, v] : l) {
result[k].push_back(v);
}
return result;
}
| int main() {
// Test case 1
std::vector<std::pair<std::string, int>> input1 = {{"yellow", 1}, {"blue", 2}, {"yellow", 3}, {"blue", 4}, {"red", 1}};
std::map<std::string, std::vector<int>> expected1 = {{"yellow", {1, 3}}, {"blue", {2, 4}}, {"red", {1}}};
assert(func0(input1) == expected1);
// ... | O1 | cpp | func0(std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int> > > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
s... | _Z5func0RKSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiESaIS7_EE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 48h
mov [rsp+78h+var_68], rdi
mov rax, fs:28h
mov [rsp+78h+var_40], rax
xor eax, eax
mov dword ptr [rdi+8], 0
mov ... | long long func0(long long a1, long long *a2)
{
long long v2; // r15
long long v4; // rbx
int v5; // edx
long long v6; // r13
long long v7; // rbp
size_t v8; // rbx
size_t v9; // rdx
size_t v10; // rbx
size_t v11; // rdx
int v12; // edx
long long v13; // r12
_DWORD *v14; // rsi
size_t v15; // ... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RSP + 0x10],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
MOV dword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
LEA RCX,[RDI + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV qword ptr [RDI + 0x18... | /* func0(std::vector<std::pair<std::string, int>, std::allocator<std::pair<std::string, int> > >
const&) */
vector * func0(vector *param_1)
{
vector *pvVar1;
int8 *puVar2;
ulong uVar3;
int4 *puVar4;
ulong uVar5;
void *__s2;
int iVar6;
_Rb_tree_iterator _Var7;
int4 extraout_var;
ulong uVar9;
l... |
694 | func0 |
#include <cassert>
#include <map>
#include <string>
#include <vector>
| std::map<std::string, std::vector<int>> func0(const std::vector<std::pair<std::string, int>>& l) {
std::map<std::string, std::vector<int>> result;
for (const auto& [k, v] : l) {
result[k].push_back(v);
}
return result;
}
| int main() {
// Test case 1
std::vector<std::pair<std::string, int>> input1 = {{"yellow", 1}, {"blue", 2}, {"yellow", 3}, {"blue", 4}, {"red", 1}};
std::map<std::string, std::vector<int>> expected1 = {{"yellow", {1, 3}}, {"blue", {2, 4}}, {"red", {1}}};
assert(func0(input1) == expected1);
// ... | O2 | cpp | func0(std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int> > > const&):
endbr64
push %r15
push %r14
push %r13
lea 0x8(%rdi),%r13
push %r12
mov... | _Z5func0RKSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiESaIS7_EE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
lea rbx, [rdi+8]
sub rsp, 28h
mov rax, [rsi+8]
mov rbp, [rsi]
mov [rdi+18h], rbx
mov [rsp+58h+var_50], rdi
mov dword ptr... | long long func0(long long a1, long long *a2)
{
long long v2; // rax
long long v3; // rbp
const void *v4; // r12
size_t v5; // r14
long long v6; // rbx
long long v7; // r15
size_t v8; // r13
size_t v9; // rdx
int v10; // eax
size_t v11; // r15
size_t v12; // rdx
int v13; // eax
long long v14; ... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
LEA RBX,[RDI + 0x8]
SUB RSP,0x28
MOV RAX,qword ptr [RSI + 0x8]
MOV RBP,qword ptr [RSI]
MOV qword ptr [RDI + 0x18],RBX
MOV qword ptr [RSP + 0x8],RDI
MOV dword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
MOV qword ptr [RSP],RBX
MOV qword ptr [RDI... | /* func0(std::vector<std::pair<std::string, int>, std::allocator<std::pair<std::string, int> > >
const&) */
vector * func0(vector *param_1)
{
_Rb_tree_node_base *p_Var1;
int8 *puVar2;
void *__s2;
ulong uVar3;
ulong uVar4;
int8 uVar5;
int iVar6;
_Rb_tree_node_base *p_Var7;
long lVar8;
ulong uVar... |
695 | func0 |
#include <cassert>
#include <map>
#include <string>
#include <vector>
| std::map<std::string, std::vector<int>> func0(const std::vector<std::pair<std::string, int>>& l) {
std::map<std::string, std::vector<int>> result;
for (const auto& [k, v] : l) {
result[k].push_back(v);
}
return result;
}
| int main() {
// Test case 1
std::vector<std::pair<std::string, int>> input1 = {{"yellow", 1}, {"blue", 2}, {"yellow", 3}, {"blue", 4}, {"red", 1}};
std::map<std::string, std::vector<int>> expected1 = {{"yellow", {1, 3}}, {"blue", {2, 4}}, {"red", {1}}};
assert(func0(input1) == expected1);
// ... | O3 | cpp | func0(std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int> > > const&):
endbr64
push %r15
push %r14
lea 0x8(%rdi),%r14
push %r13
mov %rdi,%r1... | _Z5func0RKSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiESaIS7_EE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
lea rbx, [rdi+8]
sub rsp, 38h
mov rbp, [rsi]
mov [rsp+68h+var_60], rdi
mov rax, fs:28h
mov [rsp+68h+var_40], rax
xor eax... | long long func0(long long a1, long long *a2)
{
long long v2; // rbp
long long v3; // rax
long long v4; // r15
_BYTE *v5; // r12
size_t v6; // r14
long long v7; // rbx
size_t v8; // r13
size_t v9; // rdx
int v10; // eax
size_t v11; // r15
size_t v12; // rdx
int v13; // eax
long long v14; // r1... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
LEA RBX,[RDI + 0x8]
SUB RSP,0x38
MOV RBP,qword ptr [RSI]
MOV qword ptr [RSP + 0x8],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x28],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RSI + 0x8]
MOV dword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
MO... | /* func0(std::vector<std::pair<std::string, int>, std::allocator<std::pair<std::string, int> > >
const&) */
vector * func0(vector *param_1)
{
_Rb_tree_node_base *p_Var1;
int8 *puVar2;
void *__s2;
ulong uVar3;
ulong uVar4;
int iVar5;
_Rb_tree_node_base *p_Var6;
_Rb_tree_node_base *p_Var7;
long lVa... |
696 | func0 |
#include <iostream>
#include <string>
#include <stack>
#include <map>
#include <assert.h>
| bool func0(std::string str1) {
std::stack<char> stack;
std::map<char, char> pchar = {{'(', ')'}, {'{', '}'}, {'[', ']'}};
for (char parenthese : str1) {
if (pchar.find(parenthese) != pchar.end()) {
stack.push(parenthese);
} else {
if (stack.empty() || pchar[s... | int main() {
assert(func0("(){}[]") == true);
assert(func0("()[{)}") == false);
assert(func0("()") == true);
return 0;
}
| O0 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %rbp
mov %rsp,%rbp
push %r13
push %r12
push %rbx
sub $0xd8,%rsp
mov %rdi,-0xe8(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x28(%rbp)
xor %eax,%eax
lea -0x80(%rbp),%rax
mov %rax,%rdi
callq 2c7e <_... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r13
push r12
push rbx
sub rsp, 0E8h
mov [rbp+var_F8], rdi
mov rax, fs:28h
mov [rbp+var_28], rax
xor eax, eax
lea rax, [rbp+var_80]
mov rdi, rax
call _ZNSt5stackIcSt5dequeIcSaIc... | long long func0(long long a1)
{
long long v1; // rax
_BYTE *v2; // rax
unsigned int v4; // ebx
char v6; // [rsp+1Fh] [rbp-E1h] BYREF
long long v7; // [rsp+20h] [rbp-E0h] BYREF
long long v8; // [rsp+28h] [rbp-D8h] BYREF
long long v9; // [rsp+30h] [rbp-D0h] BYREF
long long v10; // [rsp+38h] [rbp-C8h] BYR... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xe8
MOV qword ptr [RBP + -0xf8],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x80]
MOV RDI,RAX
LAB_001024fa:
CALL 0x00102c06
MOV dword ptr [RBP + -0x2e],0x0
MOV word ptr [RBP + -0x2a],0x0
MOV byte ptr ... | /* func0(std::string) */
int4 func0(int8 param_1)
{
char cVar1;
bool bVar2;
int4 uVar3;
char *pcVar4;
long in_FS_OFFSET;
char local_e9;
int8 local_e8;
int8 local_e0;
int8 local_d8;
int8 local_d0;
int8 local_c8;
int8 *local_c0;
map<char,char,std::less<char>,std::allocator<std::pair<char_const... |
697 | func0 |
#include <iostream>
#include <string>
#include <stack>
#include <map>
#include <assert.h>
| bool func0(std::string str1) {
std::stack<char> stack;
std::map<char, char> pchar = {{'(', ')'}, {'{', '}'}, {'[', ']'}};
for (char parenthese : str1) {
if (pchar.find(parenthese) != pchar.end()) {
stack.push(parenthese);
} else {
if (stack.empty() || pchar[s... | int main() {
assert(func0("(){}[]") == true);
assert(func0("()[{)}") == false);
assert(func0("()") == true);
return 0;
}
| O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0xa8,%rsp
mov %rdi,%r13
mov %fs:0x28,%rax
mov %rax,0x98(%rsp)
xor %eax,%eax
movq $0x0,0x40(%rsp)
movq $0x0,0x50(%rsp)
movq $0x... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 0D8h
mov r12, rdi
mov rax, fs:28h
mov [rsp+108h+var_40], rax
xor eax, eax
mov [rsp+108h+var_88], 0
mov [rsp+108h+var_80], 0
mov [rsp+108h... | long long func0(unsigned __int8 **a1)
{
long long v1; // rbp
_BYTE *v2; // rax
unsigned long long *v3; // rbx
long long insert_hint_unique_pos; // rax
int *v5; // rdx
int *v6; // rbp
bool v7; // r13
long long v8; // rax
unsigned __int8 *v9; // r15
unsigned __int8 *v10; // r12
long long v12; // ra... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0xd8
MOV R12,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0xc8],RAX
XOR EAX,EAX
MOV qword ptr [RSP + 0x80],0x0
MOV qword ptr [RSP + 0x88],0x0
MOV qword ptr [RSP + 0x90],0x0
MOV qword ptr [RSP + 0xa0],0x0
MOV qword ptr [RSP + 0xa8],0x0
... | /* func0(std::string) */
ulong func0(int8 *param_1)
{
_Rb_tree_node_base _Var1;
_Rb_tree_node_base _Var2;
bool bVar3;
_Rb_tree_node_base *p_Var4;
long lVar5;
void *pvVar6;
_Rb_tree_node_base *p_Var7;
_Rb_tree_node_base *p_Var8;
_Rb_tree_node_base *p_Var9;
_Rb_tree_node_base *p_Var10;
long *plVar... |
698 | func0 |
#include <iostream>
#include <string>
#include <stack>
#include <map>
#include <assert.h>
| bool func0(std::string str1) {
std::stack<char> stack;
std::map<char, char> pchar = {{'(', ')'}, {'{', '}'}, {'[', ']'}};
for (char parenthese : str1) {
if (pchar.find(parenthese) != pchar.end()) {
stack.push(parenthese);
} else {
if (stack.empty() || pchar[s... | int main() {
assert(func0("(){}[]") == true);
assert(func0("()[{)}") == false);
assert(func0("()") == true);
return 0;
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0xb8,%rsp
mov %rdi,0x8(%rsp)
mov $0x40,%edi
mov %fs:0x28,%rax
mov %rax,0xa8(%rsp)
xor %eax,%eax
movq $0x0,0x50(%rsp)
movq $0x... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 0E8h
mov [rsp+118h+var_108], rdi
mov edi, 40h ; '@'; unsigned __int64
mov rax, fs:28h
mov [rsp+118h+var_40], rax
xor eax, eax
... | long long func0(unsigned __int8 **a1)
{
_QWORD *v1; // rbx
unsigned long long v2; // rax
char *v3; // r12
long long v4; // rax
char v5; // r14
long long insert_hint_unique_pos; // rax
int *v7; // rdx
int *v8; // rbx
bool v9; // r13
unsigned int v10; // ebx
unsigned __int8 *v11; // r14
char *v12... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0xe8
MOV qword ptr [RSP + 0x10],RDI
MOV EDI,0x40
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0xd8],RAX
XOR EAX,EAX
MOVAPS xmmword ptr [RSP + 0x90],XMM0
MOV qword ptr [RSP + 0x88],0x8
MOVAPS xmmword ptr [RSP + 0xa0],XMM0
MOV... | /* func0(std::string) */
bool func0(int8 *param_1)
{
_Rb_tree_node_base *p_Var1;
_Rb_tree_node_base *p_Var2;
long lVar3;
byte bVar4;
_Rb_tree_node_base _Var5;
_Rb_tree_node_base _Var6;
_Rb_tree_node_base *p_Var7;
long *plVar8;
int8 uVar9;
int8 uVar10;
int8 uVar11;
void *pvVar12;
_Rb_tree_nod... |
699 | func0 |
#include <iostream>
#include <string>
#include <stack>
#include <map>
#include <assert.h>
| bool func0(std::string str1) {
std::stack<char> stack;
std::map<char, char> pchar = {{'(', ')'}, {'{', '}'}, {'[', ']'}};
for (char parenthese : str1) {
if (pchar.find(parenthese) != pchar.end()) {
stack.push(parenthese);
} else {
if (stack.empty() || pchar[s... | int main() {
assert(func0("(){}[]") == true);
assert(func0("()[{)}") == false);
assert(func0("()") == true);
return 0;
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %r15
mov %rdi,%r15
mov $0x40,%edi
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0xa8,%rsp
mov %fs:0x28,%rax
mov %rax,0x98(%rsp)
xor %eax,%eax
callq 1230 <_Znwm@plt>
mov $0x200,... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 0A8h
mov [rsp+0D8h+var_C0], rdi
mov edi, 40h ; '@'; unsigned __int64
mov rax, fs:28h
mov [rsp+0D8h+var_40], rax
xor eax, eax
call __Znwm; oper... | long long func0(unsigned __int8 **a1)
{
void **v1; // r14
char *v2; // rbp
void **v3; // rsi
int *v4; // rdx
char v5; // r13
long long insert_hint_unique_pos; // rax
int *v7; // rbx
bool v8; // r12
unsigned __int8 *v9; // r12
_BYTE *v10; // rbp
void **v11; // r8
unsigned int v12; // ebx
void ... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0xa8
MOV qword ptr [RSP + 0x18],RDI
MOV EDI,0x40
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x98],RAX
XOR EAX,EAX
LAB_00101a32:
CALL 0x00101220
MOV EDI,0x200
MOV qword ptr [RSP + 0x38],RAX
MOV RBX,RAX
LAB_00101a44:
CALL 0x00101220
MOV qw... | /* func0(std::string) */
bool func0(int8 *param_1)
{
_Rb_tree_node_base *p_Var1;
_Rb_tree_node_base _Var2;
byte bVar3;
_Rb_tree_node_base _Var4;
_Rb_tree_node_base *p_Var5;
_Rb_tree_node_base *p_Var6;
_Rb_tree_node_base *p_Var7;
_Rb_tree_node_base *p_Var8;
_Rb_tree_node_base *p_Var9;
_Rb_tree_node... |
700 | func0 |
#include <assert.h>
| int func0(int a, int b, int c) {
int perimeter = a + b + c;
return perimeter;
}
| int main() {
assert(func0(10, 20, 30) == 60);
assert(func0(3, 4, 5) == 12);
assert(func0(25, 35, 45) == 105);
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 -0x14(%rbp),%edx
mov -0x18(%rbp),%eax
add %eax,%edx
mov -0x1c(%rbp),%eax
add %edx,%eax
mov %eax,-0x4(%rbp)
mov -0x4(%rbp),%eax
pop %rbp
retq
| _Z5func0iii:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_14], edi
mov [rbp+var_18], esi
mov [rbp+var_1C], edx
mov edx, [rbp+var_14]
mov eax, [rbp+var_18]
add edx, eax
mov eax, [rbp+var_1C]
add eax, edx
mov [rbp+var_4], eax
mov eax, [rbp+var_4]
pop rbp
retn | long long func0(int a1, int a2, int a3)
{
return (unsigned int)(a2 + a1 + a3);
} | 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 EDX,dword ptr [RBP + -0x14]
MOV EAX,dword ptr [RBP + -0x18]
ADD EDX,EAX
MOV EAX,dword ptr [RBP + -0x1c]
ADD EAX,EDX
MOV dword ptr [RBP + -0x4],EAX
MOV EAX,dword ptr [RBP + -0x4]
POP RB... | /* func0(int, int, int) */
int func0(int param_1,int param_2,int param_3)
{
return param_3 + param_1 + param_2;
} |
701 | func0 |
#include <assert.h>
| int func0(int a, int b, int c) {
int perimeter = a + b + c;
return perimeter;
}
| int main() {
assert(func0(10, 20, 30) == 60);
assert(func0(3, 4, 5) == 12);
assert(func0(25, 35, 45) == 105);
return 0;
}
| O1 | cpp | func0(int, int, int):
endbr64
add %esi,%edi
lea (%rdi,%rdx,1),%eax
retq
| _Z5func0iii:
endbr64
add edi, esi
lea eax, [rdi+rdx]
retn | long long func0(int a1, int a2, int a3)
{
return (unsigned int)(a2 + a1 + a3);
} | func0:
ENDBR64
ADD EDI,ESI
LEA EAX,[RDI + RDX*0x1]
RET | /* func0(int, int, int) */
int func0(int param_1,int param_2,int param_3)
{
return param_1 + param_2 + param_3;
} |
702 | func0 |
#include <assert.h>
| int func0(int a, int b, int c) {
int perimeter = a + b + c;
return perimeter;
}
| int main() {
assert(func0(10, 20, 30) == 60);
assert(func0(3, 4, 5) == 12);
assert(func0(25, 35, 45) == 105);
return 0;
}
| O2 | cpp | func0(int, int, int):
endbr64
add %esi,%edi
lea (%rdi,%rdx,1),%eax
retq
nopw 0x0(%rax,%rax,1)
| _Z5func0iii:
endbr64
add edi, esi
lea eax, [rdi+rdx]
retn | long long func0(int a1, int a2, int a3)
{
return (unsigned int)(a2 + a1 + a3);
} | func0:
ENDBR64
ADD EDI,ESI
LEA EAX,[RDI + RDX*0x1]
RET | /* func0(int, int, int) */
int func0(int param_1,int param_2,int param_3)
{
return param_1 + param_2 + param_3;
} |
703 | func0 |
#include <assert.h>
| int func0(int a, int b, int c) {
int perimeter = a + b + c;
return perimeter;
}
| int main() {
assert(func0(10, 20, 30) == 60);
assert(func0(3, 4, 5) == 12);
assert(func0(25, 35, 45) == 105);
return 0;
}
| O3 | cpp | func0(int, int, int):
endbr64
add %esi,%edi
lea (%rdi,%rdx,1),%eax
retq
nopw 0x0(%rax,%rax,1)
| _Z5func0iii:
endbr64
add edi, esi
lea eax, [rdi+rdx]
retn | long long func0(int a1, int a2, int a3)
{
return (unsigned int)(a2 + a1 + a3);
} | func0:
ENDBR64
ADD EDI,ESI
LEA EAX,[RDI + RDX*0x1]
RET | /* func0(int, int, int) */
int func0(int param_1,int param_2,int param_3)
{
return param_1 + param_2 + param_3;
} |
704 | func0 |
#include <assert.h>
#include <utility>
| std::pair<int, int> func0(int L, int R) {
if (2 * L <= R) {
return std::make_pair(L, 2 * L);
} else {
return std::make_pair(-1, -1);
}
}
| int main() {
assert(func0(3, 8) == std::make_pair(3, 6));
assert(func0(2, 6) == std::make_pair(2, 4));
assert(func0(1, 3) == std::make_pair(1, 2));
return 0;
}
| O0 | cpp | func0(int, int):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x20,%rsp
mov %edi,-0x14(%rbp)
mov %esi,-0x18(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x8(%rbp)
xor %eax,%eax
mov -0x14(%rbp),%eax
add %eax,%eax
cmp %eax,-0x18(%rbp)
jl 11d1 <_Z5func0ii+0x48>
mov -0x14(%rbp),%eax
add %eax,%eax
mov... | _Z5func0ii:
endbr64
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_14], edi
mov [rbp+var_18], esi
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
mov eax, [rbp+var_14]
add eax, eax
cmp [rbp+var_18], eax
jl short loc_11B1
mov eax, [rbp+var_14]
add eax, eax
mov ... | long long func0(int a1, int a2)
{
int v3; // [rsp+Ch] [rbp-14h] BYREF
int v4; // [rsp+10h] [rbp-10h] BYREF
int v5; // [rsp+14h] [rbp-Ch] BYREF
unsigned long long v6; // [rsp+18h] [rbp-8h]
v3 = a1;
v6 = __readfsqword(0x28u);
if ( a2 < 2 * a1 )
{
v5 = -1;
v4 = -1;
return std::make_pair<int,i... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0x14],EDI
MOV dword ptr [RBP + -0x18],ESI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,EAX
CMP dword ptr [RBP + -0x18],EAX
JL 0x001011b1
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,EAX
MO... | /* func0(int, int) */
void func0(int param_1,int param_2)
{
long in_FS_OFFSET;
int local_1c [3];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_1c[0] = param_1;
if (param_2 < param_1 * 2) {
local_1c[2] = -1;
local_1c[1] = 0xffffffff;
std::make_pair<int,int>(local_1c + 1,loc... |
705 | func0 |
#include <assert.h>
#include <utility>
| std::pair<int, int> func0(int L, int R) {
if (2 * L <= R) {
return std::make_pair(L, 2 * L);
} else {
return std::make_pair(-1, -1);
}
}
| int main() {
assert(func0(3, 8) == std::make_pair(3, 6));
assert(func0(2, 6) == std::make_pair(2, 4));
assert(func0(1, 3) == std::make_pair(1, 2));
return 0;
}
| O1 | cpp | func0(int, int):
endbr64
lea (%rdi,%rdi,1),%edx
mov $0xffffffffffffffff,%rax
cmp %esi,%edx
jg 1144 <_Z5func0ii+0x1b>
shl $0x20,%rdx
mov %edi,%eax
or %rdx,%rax
retq
| _Z5func0ii:
endbr64
lea eax, [rdi+rdi]
cmp eax, esi
jle short loc_113E
mov edi, 0FFFFFFFFh
mov eax, 0FFFFFFFFh
loc_113E:
mov rdx, rax
shl rdx, 20h
mov eax, edi
or rax, rdx
retn | long long func0(unsigned int a1, int a2)
{
long long v2; // rax
v2 = 2 * a1;
if ( (int)v2 > a2 )
{
a1 = -1;
v2 = 0xFFFFFFFFLL;
}
return (v2 << 32) | a1;
} | func0:
ENDBR64
LEA EAX,[RDI + RDI*0x1]
CMP EAX,ESI
JLE 0x0010113e
MOV EDI,0xffffffff
MOV EAX,0xffffffff
LAB_0010113e:
MOV RDX,RAX
SHL RDX,0x20
MOV EAX,EDI
OR RAX,RDX
RET | /* func0(int, int) */
ulong func0(int param_1,int param_2)
{
ulong uVar1;
ulong uVar2;
uVar2 = (ulong)(uint)param_1;
uVar1 = (ulong)(uint)(param_1 * 2);
if (param_2 < param_1 * 2) {
uVar2 = 0xffffffff;
uVar1 = 0xffffffff;
}
return uVar2 | uVar1 << 0x20;
} |
706 | func0 |
#include <assert.h>
#include <utility>
| std::pair<int, int> func0(int L, int R) {
if (2 * L <= R) {
return std::make_pair(L, 2 * L);
} else {
return std::make_pair(-1, -1);
}
}
| int main() {
assert(func0(3, 8) == std::make_pair(3, 6));
assert(func0(2, 6) == std::make_pair(2, 4));
assert(func0(1, 3) == std::make_pair(1, 2));
return 0;
}
| O2 | cpp | func0(int, int):
endbr64
lea (%rdi,%rdi,1),%edx
mov $0xffffffffffffffff,%rax
cmp %esi,%edx
jg 115b <_Z5func0ii+0x1b>
shl $0x20,%rdx
mov %edi,%eax
or %rdx,%rax
retq
nopl 0x0(%rax)
| _Z5func0ii:
endbr64
lea eax, [rdi+rdi]
cmp eax, esi
jle short loc_1155
mov eax, 0FFFFFFFFh
mov edi, 0FFFFFFFFh
loc_1155:
mov edi, edi
shl rax, 20h
or rax, rdi
retn | unsigned long long func0(unsigned int a1, int a2)
{
long long v2; // rax
v2 = 2 * a1;
if ( (int)v2 > a2 )
{
v2 = 0xFFFFFFFFLL;
a1 = -1;
}
return a1 | (unsigned long long)(v2 << 32);
} | func0:
ENDBR64
LEA EAX,[RDI + RDI*0x1]
CMP EAX,ESI
JLE 0x00101155
MOV EAX,0xffffffff
MOV EDI,0xffffffff
LAB_00101155:
MOV EDI,EDI
SHL RAX,0x20
OR RAX,RDI
RET | /* func0(int, int) */
ulong func0(int param_1,int param_2)
{
ulong uVar1;
uVar1 = (ulong)(uint)(param_1 * 2);
if (param_2 < param_1 * 2) {
uVar1 = 0xffffffff;
param_1 = 0xffffffff;
}
return uVar1 << 0x20 | (ulong)(uint)param_1;
} |
707 | func0 |
#include <assert.h>
#include <utility>
| std::pair<int, int> func0(int L, int R) {
if (2 * L <= R) {
return std::make_pair(L, 2 * L);
} else {
return std::make_pair(-1, -1);
}
}
| int main() {
assert(func0(3, 8) == std::make_pair(3, 6));
assert(func0(2, 6) == std::make_pair(2, 4));
assert(func0(1, 3) == std::make_pair(1, 2));
return 0;
}
| O3 | cpp | func0(int, int):
endbr64
lea (%rdi,%rdi,1),%edx
mov $0xffffffffffffffff,%rax
cmp %esi,%edx
jg 115b <_Z5func0ii+0x1b>
shl $0x20,%rdx
mov %edi,%eax
or %rdx,%rax
retq
nopl 0x0(%rax)
| _Z5func0ii:
endbr64
lea eax, [rdi+rdi]
cmp eax, esi
jle short loc_1155
mov eax, 0FFFFFFFFh
mov edi, 0FFFFFFFFh
loc_1155:
mov edi, edi
shl rax, 20h
or rax, rdi
retn | unsigned long long func0(unsigned int a1, int a2)
{
long long v2; // rax
v2 = 2 * a1;
if ( (int)v2 > a2 )
{
v2 = 0xFFFFFFFFLL;
a1 = -1;
}
return a1 | (unsigned long long)(v2 << 32);
} | func0:
ENDBR64
LEA EAX,[RDI + RDI*0x1]
CMP EAX,ESI
JLE 0x00101155
MOV EAX,0xffffffff
MOV EDI,0xffffffff
LAB_00101155:
MOV EDI,EDI
SHL RAX,0x20
OR RAX,RDI
RET | /* func0(int, int) */
ulong func0(int param_1,int param_2)
{
ulong uVar1;
uVar1 = (ulong)(uint)(param_1 * 2);
if (param_2 < param_1 * 2) {
uVar1 = 0xffffffff;
param_1 = 0xffffffff;
}
return uVar1 << 0x20 | (ulong)(uint)param_1;
} |
708 | func0 |
#include <regex>
#include <string>
#include <assert.h>
| std::string func0(std::vector<std::string> patterns, std::string text) {
for (auto& pattern : patterns) {
if (std::regex_search(text, std::regex(pattern))) {
return "Matched!";
} else {
return "Not Matched!";
}
}
return "Not Matched!";
}
| int main() {
assert(func0({"language"}, "python language") == "Matched!");
assert(func0({"program"}, "python language") == "Not Matched!");
assert(func0({"python"}, "programming language") == "Not Matched!");
return 0;
}
| O0 | cpp | func0(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %rbp
mov %rsp,%rbp
pu... | _Z5func0St6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EES5_:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 98h
mov [rbp+var_88], rdi
mov [rbp+var_90], rsi
mov [rbp+var_98], rdx
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_90]
mov ... | long long func0(long long a1, long long a2, long long a3)
{
char v3; // bl
long long v6; // [rsp+28h] [rbp-78h] BYREF
_QWORD v7[2]; // [rsp+30h] [rbp-70h] BYREF
long long v8; // [rsp+40h] [rbp-60h]
_BYTE *v9; // [rsp+48h] [rbp-58h]
_BYTE *v10; // [rsp+50h] [rbp-50h]
_BYTE *v11; // [rsp+58h] [rbp-48h]
_... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x98
MOV qword ptr [RBP + -0x88],RDI
MOV qword ptr [RBP + -0x90],RSI
MOV qword ptr [RBP + -0x98],RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x90]
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr [RBP + -0x68... | /* func0(std::vector<std::string, std::allocator<std::string > >, std::string) */
string * func0(string *param_1,vector<std::string,std::allocator<std::string>> *param_2,
string *param_3)
{
bool bVar1;
long in_FS_OFFSET;
int8 local_80;
int8 local_78;
vector<std::string,std::allocator<std::stri... |
709 | func0 |
#include <regex>
#include <string>
#include <assert.h>
| std::string func0(std::vector<std::string> patterns, std::string text) {
for (auto& pattern : patterns) {
if (std::regex_search(text, std::regex(pattern))) {
return "Matched!";
} else {
return "Not Matched!";
}
}
return "Not Matched!";
}
| int main() {
assert(func0({"language"}, "python language") == "Matched!");
assert(func0({"program"}, "python language") == "Not Matched!");
assert(func0({"python"}, "programming language") == "Not Matched!");
return 0;
}
| O1 | cpp | func0(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %r15
push %r14
push ... | _Z5func0St6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EES5_:
endbr64
push rbp
mov rbp, rsp
push r14
push r13
push r12
push rbx
sub rsp, 50h
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_28], rax
xor eax, eax
mov r12, [rsi]
cmp r12, [rsi+8]
jz loc_4A1... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x50
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
XOR EAX,EAX
MOV R12,qword ptr [RSI]
CMP R12,qword ptr [RSI + 0x8]
JZ 0x00104a1c
MOV R14,RDX
LEA R13,[RBP + -0x70]
LEA RDI,[RBP + -0x68]
CALL 0x001046f0
MOV qword p... | /* func0(std::vector<std::string, std::allocator<std::string > >, std::string) */
long * func0(long *param_1,long *param_2,int8 *param_3)
{
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
int8 *puVar2;
_Sp_counted_base<(_Lock_policy)2> *p_Var3;
bool bVar4;
int iVar5;
long in_FS_OFFSET;
regex local_78 [8];
... | |
710 | func0 |
#include <regex>
#include <string>
#include <assert.h>
| std::string func0(std::vector<std::string> patterns, std::string text) {
for (auto& pattern : patterns) {
if (std::regex_search(text, std::regex(pattern))) {
return "Matched!";
} else {
return "Not Matched!";
}
}
return "Not Matched!";
}
| int main() {
assert(func0({"language"}, "python language") == "Matched!");
assert(func0({"program"}, "python language") == "Not Matched!");
assert(func0({"python"}, "programming language") == "Not Matched!");
return 0;
}
| O2 | cpp | func0(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %r15
push %r14
push ... | _Z5func0St6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EES5_:
endbr64
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
mov rbx, rdi
sub rsp, 58h
mov r12, [rsi]
mov rax, fs:28h
mov [rbp+var_38], rax
xor eax, eax
cmp r12, [rsi+8]
jz ... | long long func0(long long a1, _QWORD *a2, long long *a3)
{
_QWORD *v4; // r12
long long v6; // rdi
long long v7; // rsi
long long v8; // rsi
char v9; // r12
long long v10; // rdi
long long v11; // rdx
volatile signed __int32 *v12; // rcx
signed __int32 v13; // eax
long long v15; // rax
_BYTE v16[... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV RBX,RDI
SUB RSP,0x58
MOV R12,qword ptr [RSI]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x38],RAX
XOR EAX,EAX
CMP R12,qword ptr [RSI + 0x8]
JZ 0x00104dc0
LEA R13,[RBP + -0x78]
MOV R15,RDX
LEA R14,[RBP + -0x80]
MOV RDI,R13
CALL 0... | /* func0(std::vector<std::string, std::allocator<std::string > >, std::string) */
long * func0(long *param_1,long *param_2,int8 *param_3)
{
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
int8 *puVar2;
int8 uVar3;
bool bVar4;
int iVar5;
long in_FS_OFFSET;
regex local_88 [8];
int local_80 [8];
int local_7... |
711 | func0 |
#include <regex>
#include <string>
#include <assert.h>
| std::string func0(std::vector<std::string> patterns, std::string text) {
for (auto& pattern : patterns) {
if (std::regex_search(text, std::regex(pattern))) {
return "Matched!";
} else {
return "Not Matched!";
}
}
return "Not Matched!";
}
| int main() {
assert(func0({"language"}, "python language") == "Matched!");
assert(func0({"program"}, "python language") == "Not Matched!");
assert(func0({"python"}, "programming language") == "Not Matched!");
return 0;
}
| O3 | cpp | func0(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %r15
push %r14
push ... | _Z5func0St6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EES5_:
endbr64
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
mov rbx, rdi
sub rsp, 58h
mov r12, [rsi]
mov rax, fs:28h
mov [rbp+var_38], rax
xor eax, eax
cmp r12, [rsi+8]
jz ... | long long func0(long long a1, _QWORD *a2, long long *a3)
{
_QWORD *v4; // r12
long long v6; // rdi
long long v7; // rsi
long long v8; // rsi
char v9; // r15
_BYTE v11[8]; // [rsp+0h] [rbp-80h] BYREF
_BYTE v12[8]; // [rsp+8h] [rbp-78h] BYREF
__int128 v13; // [rsp+10h] [rbp-70h]
_OWORD v14[2]; // [rsp+... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV RBX,RDI
SUB RSP,0x58
MOV R12,qword ptr [RSI]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x38],RAX
XOR EAX,EAX
CMP R12,qword ptr [RSI + 0x8]
JZ 0x00105ec0
LEA R13,[RBP + -0x78]
MOV R15,RDX
LEA R14,[RBP + -0x80]
MOV RDI,R13
CALL 0... | /* func0(std::vector<std::string, std::allocator<std::string > >, std::string) */
long * func0(long *param_1,long *param_2,int8 *param_3)
{
int8 *puVar1;
bool bVar2;
long in_FS_OFFSET;
regex local_88 [8];
int local_80 [8];
int local_78 [16];
match_results local_68 [16];
int local_58 [16];
long local... |
712 | func0 |
#include <vector>
#include <assert.h>
#include <algorithm>
| bool func0(int x) {
std::vector<int> terms;
int temp = x;
int n = 0;
while (temp > 0) {
terms.push_back(temp % 10);
temp = temp / 10;
n++;
}
std::reverse(terms.begin(), terms.end());
int next_term = 0;
int i = n;
while (next_term < x) {
ne... | int main() {
assert(func0(14) == true);
assert(func0(12) == false);
assert(func0(197) == true);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x58,%rsp
mov %edi,-0x54(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
lea -0x30(%rbp),%rax
mov %rax,%rdi
callq 14d6 <_ZNSt6vectorIiSaIiEEC1Ev>
mov -0x54(%rbp),%eax
mov %eax,-0x40(%rbp)
movl $0x0,-0x3c(%rbp)
cmp... | _Z5func0i:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 58h
mov [rbp+var_54], edi
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 eax, [rbp+var_54]
mov [rbp+var_40]... | long long func0(int a1)
{
long long v1; // rbx
long long v2; // rax
_DWORD *v3; // rax
int v5; // [rsp+1Ch] [rbp-44h] BYREF
int v6; // [rsp+20h] [rbp-40h]
int v7; // [rsp+24h] [rbp-3Ch]
int v8; // [rsp+28h] [rbp-38h]
int i; // [rsp+2Ch] [rbp-34h]
_BYTE v10[24]; // [rsp+30h] [rbp-30h] BYREF
unsigned... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x58
MOV dword ptr [RBP + -0x54],EDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x30]
MOV RDI,RAX
CALL 0x001014fc
MOV EAX,dword ptr [RBP + -0x54]
MOV dword ptr [RBP + -0x40],EAX
MOV dword ptr [RBP + -0x3c],0x0
JMP 0x001012... | /* func0(int) */
ulong func0(int param_1)
{
__normal_iterator _Var1;
int8 uVar2;
int *piVar3;
long in_FS_OFFSET;
bool bVar4;
int local_4c;
int local_48;
int local_44;
int local_40;
int local_3c;
vector<int,std::allocator<int>> local_38 [24];
long local_20;
local_20 = *(long *)(in_FS_OFFSE... |
713 | func0 |
#include <vector>
#include <assert.h>
#include <algorithm>
| bool func0(int x) {
std::vector<int> terms;
int temp = x;
int n = 0;
while (temp > 0) {
terms.push_back(temp % 10);
temp = temp / 10;
n++;
}
std::reverse(terms.begin(), terms.end());
int next_term = 0;
int i = n;
while (next_term < x) {
ne... | int main() {
assert(func0(14) == true);
assert(func0(12) == false);
assert(func0(197) == true);
return 0;
}
| O1 | cpp | func0(int):
endbr64
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x30,%rsp
mov %edi,%r13d
mov %fs:0x28,%rax
mov %rax,0x28(%rsp)
xor %eax,%eax
movq $0x0,0x10(%rsp)
movq $0x0,0x18(%rsp)
movq $0x0,0x20(%rsp)
test %edi,%edi
jle 13a6 <_Z5func0i+0x17d>
mov %edi,%ebx
mov $0x... | _Z5func0i:
endbr64
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 30h
mov r13d, edi
mov rax, fs:28h
mov [rsp+58h+var_30], rax
xor eax, eax
mov [rsp+58h+var_48], 0
mov [rsp+58h+var_40], 0
mov [rsp+58h+var_38], 0
test edi, edi
jle loc_1393
mov ebx, edi
mov ... | long long func0(int a1)
{
long long v1; // rbx
int v2; // ebx
unsigned int i; // ebp
int v4; // r12d
int *v5; // rsi
int *v6; // rdx
int *v7; // rax
int v8; // ecx
long long v9; // rbp
int v10; // eax
_BYTE *v11; // rax
int v12; // ecx
int *v13; // rsi
int v15; // [rsp+Ch] [rbp-4Ch] BYREF
... | func0:
ENDBR64
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x30
MOV R13D,EDI
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
TEST EDI,EDI
JLE 0x00101393
MOV EBX,EDI
MOV EBP,0x0
LEA R14,[RSP + 0xc... | /* func0(int) */
ulong func0(int param_1)
{
bool bVar1;
int *piVar2;
long lVar3;
int *piVar4;
int iVar5;
long unaff_RBX;
uint uVar6;
uint uVar7;
long in_FS_OFFSET;
int local_4c;
int *local_48;
int *local_40;
int *local_38;
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
lo... |
714 | func0 |
#include <vector>
#include <assert.h>
#include <algorithm>
| bool func0(int x) {
std::vector<int> terms;
int temp = x;
int n = 0;
while (temp > 0) {
terms.push_back(temp % 10);
temp = temp / 10;
n++;
}
std::reverse(terms.begin(), terms.end());
int next_term = 0;
int i = n;
while (next_term < x) {
ne... | int main() {
assert(func0(14) == true);
assert(func0(12) == false);
assert(func0(197) == true);
return 0;
}
| O2 | cpp | func0(int):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x28,%rsp
mov %edi,0x4(%rsp)
test %edi,%edi
jle 15a5 <_Z5func0i+0x2f5>
mov %edi,%r12d
xor %r9d,%r9d
xor %r8d,%r8d
xor %r13d,%r13d
xor %r14d,%r14d
mov $0xcccccccd,%r15d
jmp 130b <_Z5func0i+0x5... | _Z5func0i:
endbr64
push r14
pxor xmm0, xmm0
push r13
push r12
mov r12d, edi
push rbp
push rbx
sub rsp, 30h
mov rax, fs:28h
mov [rsp+58h+var_30], rax
xor eax, eax
movaps xmmword ptr [rsp+58h+var_48], xmm0
mov [rsp+58h+var_38], 0
test edi, edi
jle loc_14C5
mov ebp, ed... | long long func0(int a1)
{
long long v1; // rbx
unsigned int v3; // ebp
unsigned int *v4; // rsi
unsigned int *v5; // rdi
unsigned int i; // r13d
unsigned int *v7; // rax
unsigned int *v8; // rdx
unsigned int v9; // esi
unsigned int v10; // edi
unsigned int *v11; // rdi
int v12; // edx
char *v13... | func0:
ENDBR64
PUSH R14
PXOR XMM0,XMM0
PUSH R13
PUSH R12
MOV R12D,EDI
PUSH RBP
PUSH RBX
SUB RSP,0x30
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x28],RAX
XOR EAX,EAX
MOVAPS xmmword ptr [RSP + 0x10],XMM0
MOV qword ptr [RSP + 0x20],0x0
TEST EDI,EDI
JLE 0x001014c5
MOV EBP,EDI
XOR ESI,ESI
XOR EDI,EDI
XOR R13D,R13D
MO... | /* func0(int) */
ulong func0(int param_1)
{
bool bVar1;
uint *puVar2;
uint *puVar3;
long lVar4;
uint uVar5;
uint *puVar6;
uint *puVar7;
long unaff_RBX;
long lVar8;
uint uVar9;
uint uVar10;
long in_FS_OFFSET;
uint local_4c;
uint *local_48;
uint *puStack_40;
uint *local_38;
long local_... |
715 | func0 |
#include <vector>
#include <assert.h>
#include <algorithm>
| bool func0(int x) {
std::vector<int> terms;
int temp = x;
int n = 0;
while (temp > 0) {
terms.push_back(temp % 10);
temp = temp / 10;
n++;
}
std::reverse(terms.begin(), terms.end());
int next_term = 0;
int i = n;
while (next_term < x) {
ne... | int main() {
assert(func0(14) == true);
assert(func0(12) == false);
assert(func0(197) == true);
return 0;
}
| O3 | cpp | func0(int):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x38,%rsp
mov %edi,0x18(%rsp)
test %edi,%edi
jle 170c <_Z5func0i+0x45c>
movl $0x0,0x4(%rsp)
mov %edi,%r12d
xor %ecx,%ecx
xor %r13d,%r13d
xor %r14d,%r14d
mov $0xcccccccd,%r15d
jmp 1318 <_Z5func... | _Z5func0i:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 48h
mov rax, fs:28h
mov [rsp+78h+var_40], rax
xor eax, eax
movaps xmmword ptr [rsp+78h+var_58], xmm0
mov [rsp+78h+var_48], 0
test edi, edi
jle loc_166F
mov r15d, edi
mov... | long long func0(int a1)
{
int v1; // ebx
unsigned int v3; // ebx
unsigned int *v4; // rcx
unsigned int *v5; // rsi
unsigned int i; // r12d
signed int v7; // r13d
char *v8; // rcx
__m128i *v9; // rdx
const __m128i *v10; // rax
unsigned long long v11; // rdi
unsigned long long v12; // r10
unsigne... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x48
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
MOVAPS xmmword ptr [RSP + 0x20],XMM0
MOV qword ptr [RSP + 0x30],0x0
TEST EDI,EDI
JLE 0x0010166f
MOV R15D,EDI
MOV EBX,EDI
XOR ECX,ECX
XOR ESI,ESI
XOR R12... | /* func0(int) */
ulong func0(int param_1)
{
int8 uVar1;
int8 uVar2;
int iVar3;
int *piVar4;
int iVar5;
int iVar6;
int *piVar7;
int *piVar8;
int8 *puVar9;
int *piVar10;
int *piVar11;
uint uVar12;
int8 unaff_RBX;
uint uVar13;
int *piVar14;
ulong uVar15;
ulong uVar16;
uint uVar17;
u... |
716 | func0 |
#include <cmath>
#include <cassert>
| double func0(double slat, double slon, double elat, double elon) {
double dist = 6371.01 * acos(sin(slat) * sin(elat) + cos(slat) * cos(elat) * cos(slon - elon));
return dist;
}
| int main() {
assert(func0(23.5, 67.5, 25.5, 69.5) == 12179.372041317429);
assert(func0(10.5, 20.5, 30.5, 40.5) == 6069.397933300514);
assert(func0(10, 20, 30, 40) == 6783.751974994595);
return 0;
}
| O0 | cpp | func0(double, double, double, double):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x40,%rsp
movsd %xmm0,-0x18(%rbp)
movsd %xmm1,-0x20(%rbp)
movsd %xmm2,-0x28(%rbp)
movsd %xmm3,-0x30(%rbp)
mov -0x18(%rbp),%rax
movq %rax,%xmm0
callq 10b0 <sin@plt>
movsd %xmm0,-0x38(%rbp)
mov -0x28(%rbp),%rax
movq %rax,%... | _Z5func0dddd:
endbr64
push rbp
mov rbp, rsp
sub rsp, 40h
movsd [rbp+x], xmm0
movsd [rbp+var_20], xmm1
movsd [rbp+var_28], xmm2
movsd [rbp+var_30], xmm3
mov rax, [rbp+x]
movq xmm0, rax; x
call _sin
movsd [rbp+var_38], xmm0
mov rax, [rbp+var_28]
movq xmm0, rax; x
call _sin
movapd ... | double func0(double a1, double a2, double a3, double a4)
{
double v4; // xmm0_8
double v6; // [rsp+0h] [rbp-40h]
double v7; // [rsp+0h] [rbp-40h]
double v8; // [rsp+8h] [rbp-38h]
double v9; // [rsp+8h] [rbp-38h]
v8 = sin(a1);
v9 = sin(a3) * v8;
v6 = cos(a1);
v7 = cos(a3) * v6;
v4 = cos(a2 - a4);
... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOVSD qword ptr [RBP + -0x18],XMM0
MOVSD qword ptr [RBP + -0x20],XMM1
MOVSD qword ptr [RBP + -0x28],XMM2
MOVSD qword ptr [RBP + -0x30],XMM3
MOV RAX,qword ptr [RBP + -0x18]
MOVQ XMM0,RAX
CALL 0x001010b0
MOVSD qword ptr [RBP + -0x38],XMM0
MOV RAX,qword ptr [RBP + -0x28]
MO... | /* func0(double, double, double, double) */
double func0(double param_1,double param_2,double param_3,double param_4)
{
double dVar1;
double dVar2;
double dVar3;
double dVar4;
double dVar5;
dVar1 = sin(param_1);
dVar2 = sin(param_3);
dVar3 = cos(param_1);
dVar4 = cos(param_3);
dVar5 = cos(param... |
717 | func0 |
#include <cmath>
#include <cassert>
| double func0(double slat, double slon, double elat, double elon) {
double dist = 6371.01 * acos(sin(slat) * sin(elat) + cos(slat) * cos(elat) * cos(slon - elon));
return dist;
}
| int main() {
assert(func0(23.5, 67.5, 25.5, 69.5) == 12179.372041317429);
assert(func0(10.5, 20.5, 30.5, 40.5) == 6069.397933300514);
assert(func0(10, 20, 30, 40) == 6783.751974994595);
return 0;
}
| O1 | cpp | func0(double, double, double, double):
endbr64
push %r13
push %r12
push %rbp
push %rbx
sub $0x38,%rsp
movsd %xmm0,0x8(%rsp)
movsd %xmm1,0x10(%rsp)
movapd %xmm2,%xmm0
movsd %xmm3,0x18(%rsp)
lea 0x28(%rsp),%r12
lea 0x20(%rsp),%r13
mov %r13,%rsi
mov %r12,%rdi
callq 1090 <sincos@plt>
mov 0x20(... | _Z5func0dddd:
endbr64
push r13
push r12
push rbp
push rbx
sub rsp, 38h
movsd [rsp+58h+x], xmm0
movsd [rsp+58h+var_48], xmm1
movapd xmm0, xmm2; x
movsd [rsp+58h+var_40], xmm3
lea r12, [rsp+58h+sinx]
lea r13, [rsp+58h+cosx]
mov rsi, r13; cosx
mov rdi, r12; sinx
call _sincos
mov ... | double func0(double a1, double a2, double a3, double a4)
{
double v4; // rbx
double v5; // rbp
double v6; // xmm1_8
double cosx; // [rsp+20h] [rbp-38h] BYREF
double sinx[6]; // [rsp+28h] [rbp-30h] BYREF
sincos(a3, sinx, &cosx);
v4 = cosx;
v5 = sinx[0];
sincos(a1, sinx, &cosx);
v6 = cos(a2 - a4);
... | func0:
ENDBR64
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x38
MOVSD qword ptr [RSP + 0x8],XMM0
MOVSD qword ptr [RSP + 0x10],XMM1
MOVAPD XMM0,XMM2
MOVSD qword ptr [RSP + 0x18],XMM3
LEA R12,[RSP + 0x28]
LEA R13,[RSP + 0x20]
MOV RSI,R13
MOV RDI,R12
CALL 0x00101090
MOV RBX,qword ptr [RSP + 0x20]
MOV RBP,qword ptr [RSP + ... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(double, double, double, double) */
double func0(double param_1,double param_2,double param_3,double param_4)
{
double dVar1;
double dVar2;
double dVar3;
double local_38;
double local_30 [2];
sincos(param_3,loc... |
718 | func0 |
#include <cmath>
#include <cassert>
| double func0(double slat, double slon, double elat, double elon) {
double dist = 6371.01 * acos(sin(slat) * sin(elat) + cos(slat) * cos(elat) * cos(slon - elon));
return dist;
}
| int main() {
assert(func0(23.5, 67.5, 25.5, 69.5) == 12179.372041317429);
assert(func0(10.5, 20.5, 30.5, 40.5) == 6069.397933300514);
assert(func0(10, 20, 30, 40) == 6783.751974994595);
return 0;
}
| O2 | cpp | func0(double, double, double, double):
endbr64
push %r12
push %rbp
sub $0x48,%rsp
lea 0x38(%rsp),%rbp
lea 0x30(%rsp),%r12
movsd %xmm0,0x28(%rsp)
movapd %xmm2,%xmm0
mov %r12,%rsi
mov %rbp,%rdi
movsd %xmm1,0x20(%rsp)
movsd %xmm3,0x8(%rsp)
callq 1090 <sincos@plt>
movsd 0x28(%rsp),%xmm4
mov %r12,... | _Z5func0dddd:
endbr64
push r14
movq r14, xmm0
movapd xmm0, xmm2; x
push rbp
push rbx
sub rsp, 30h
lea rbx, [rsp+48h+sinx]
lea rbp, [rsp+48h+cosx]
movsd [rsp+48h+var_30], xmm1
mov rsi, rbp; cosx
mov rdi, rbx; sinx
movsd [rsp+48h+var_48], xmm3
call _sincos
mov rsi, rbp; cosx
mo... | double func0(double a1, double a2, double a3, double a4)
{
double v4; // xmm0_8
double v6; // [rsp+8h] [rbp-40h]
double v7; // [rsp+10h] [rbp-38h]
double cosx; // [rsp+20h] [rbp-28h] BYREF
double sinx[4]; // [rsp+28h] [rbp-20h] BYREF
sincos(a3, sinx, &cosx);
v7 = cosx;
v6 = sinx[0];
sincos(a1, sinx,... | func0:
ENDBR64
PUSH R14
MOVQ R14,XMM0
MOVAPD XMM0,XMM2
PUSH RBP
PUSH RBX
SUB RSP,0x30
LEA RBX,[RSP + 0x28]
LEA RBP,[RSP + 0x20]
MOVSD qword ptr [RSP + 0x18],XMM1
MOV RSI,RBP
MOV RDI,RBX
MOVSD qword ptr [RSP],XMM3
CALL 0x00101090
MOV RSI,RBP
MOV RDI,RBX
MOVQ XMM0,R14
MOVSD XMM2,qword ptr [RSP + 0x20]
MOVSD XMM3,qword pt... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(double, double, double, double) */
double func0(double param_1,double param_2,double param_3,double param_4)
{
double dVar1;
double dVar2;
double dVar3;
double local_28;
double local_20;
sincos(param_3,&local_... |
719 | func0 |
#include <cmath>
#include <cassert>
| double func0(double slat, double slon, double elat, double elon) {
double dist = 6371.01 * acos(sin(slat) * sin(elat) + cos(slat) * cos(elat) * cos(slon - elon));
return dist;
}
| int main() {
assert(func0(23.5, 67.5, 25.5, 69.5) == 12179.372041317429);
assert(func0(10.5, 20.5, 30.5, 40.5) == 6069.397933300514);
assert(func0(10, 20, 30, 40) == 6783.751974994595);
return 0;
}
| O3 | cpp | func0(double, double, double, double):
endbr64
push %r12
push %rbp
sub $0x48,%rsp
lea 0x38(%rsp),%rbp
lea 0x30(%rsp),%r12
movsd %xmm0,0x28(%rsp)
movapd %xmm2,%xmm0
mov %r12,%rsi
mov %rbp,%rdi
movsd %xmm1,0x20(%rsp)
movsd %xmm3,0x8(%rsp)
callq 1090 <sincos@plt>
movsd 0x28(%rsp),%xmm4
mov %r12,... | _Z5func0dddd:
endbr64
push r14
movq r14, xmm0
movapd xmm0, xmm2; x
push rbp
push rbx
sub rsp, 30h
lea rbx, [rsp+48h+sinx]
lea rbp, [rsp+48h+cosx]
movsd [rsp+48h+var_30], xmm1
mov rsi, rbp; cosx
mov rdi, rbx; sinx
movsd [rsp+48h+var_48], xmm3
call _sincos
mov rsi, rbp; cosx
mo... | double func0(double a1, double a2, double a3, double a4)
{
double v4; // xmm0_8
double v6; // [rsp+8h] [rbp-40h]
double v7; // [rsp+10h] [rbp-38h]
double cosx; // [rsp+20h] [rbp-28h] BYREF
double sinx[4]; // [rsp+28h] [rbp-20h] BYREF
sincos(a3, sinx, &cosx);
v7 = cosx;
v6 = sinx[0];
sincos(a1, sinx,... | func0:
ENDBR64
PUSH R14
MOVQ R14,XMM0
MOVAPD XMM0,XMM2
PUSH RBP
PUSH RBX
SUB RSP,0x30
LEA RBX,[RSP + 0x28]
LEA RBP,[RSP + 0x20]
MOVSD qword ptr [RSP + 0x18],XMM1
MOV RSI,RBP
MOV RDI,RBX
MOVSD qword ptr [RSP],XMM3
CALL 0x00101090
MOV RSI,RBP
MOV RDI,RBX
MOVQ XMM0,R14
MOVSD XMM2,qword ptr [RSP + 0x20]
MOVSD XMM3,qword pt... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(double, double, double, double) */
double func0(double param_1,double param_2,double param_3,double param_4)
{
double dVar1;
double dVar2;
double dVar3;
double local_28;
double local_20;
sincos(param_3,&local_... |
720 | func0 |
#include <iostream>
#include <cassert>
#include <vector>
#include <string>
std::string common_prefix_util(const std::string& str1, const std::string& str2) {
std::string result = "";
size_t n1 = str1.length();
size_t n2 = str2.length();
size_t i = 0;
size_t j = 0;
while (i < n1 && ... | std::string func0(const std::vector<std::string>& arr, int n) {
std::string prefix = arr[0];
for (int i = 1; i < n; i++) {
prefix = common_prefix_util(prefix, arr[i]);
}
return prefix;
}
| int main() {
assert(func0({"tablets", "tables", "taxi", "tamarind"}, 4) == "ta");
assert(func0({"apples", "ape", "april"}, 3) == "ap");
assert(func0({"teens", "teenager", "teenmar"}, 3) == "teen");
return 0;
}
| O0 | cpp | func0(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x68,%rsp
mov %rdi,-0x58(%rbp)
mov %rsi,-0x60... | _Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEi:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 68h
mov [rbp+var_58], rdi
mov [rbp+var_60], rsi
mov [rbp+var_64], edx
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_60]
mov ... | long long func0(long long a1, long long a2, int a3)
{
long long v3; // rax
long long v4; // rax
int i; // [rsp+2Ch] [rbp-44h]
_BYTE v8[40]; // [rsp+30h] [rbp-40h] BYREF
unsigned long long v9; // [rsp+58h] [rbp-18h]
v9 = __readfsqword(0x28u);
v3 = std::vector<std::string>::operator[](a2, 0LL);
std::str... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x68
MOV qword ptr [RBP + -0x58],RDI
MOV qword ptr [RBP + -0x60],RSI
MOV dword ptr [RBP + -0x64],EDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x60]
MOV ESI,0x0
MOV RDI,RAX
CALL 0x00102e1a
MOV RDX,RAX
MOV RAX,qw... | /* func0(std::vector<std::string, std::allocator<std::string > > const&, int) */
vector * func0(vector *param_1,int param_2)
{
string *psVar1;
int in_EDX;
int4 in_register_00000034;
long in_FS_OFFSET;
int local_4c;
string local_48 [40];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
ps... |
721 | func0 |
#include <iostream>
#include <cassert>
#include <vector>
#include <string>
std::string common_prefix_util(const std::string& str1, const std::string& str2) {
std::string result = "";
size_t n1 = str1.length();
size_t n2 = str2.length();
size_t i = 0;
size_t j = 0;
while (i < n1 && ... | std::string func0(const std::vector<std::string>& arr, int n) {
std::string prefix = arr[0];
for (int i = 1; i < n; i++) {
prefix = common_prefix_util(prefix, arr[i]);
}
return prefix;
}
| int main() {
assert(func0({"tablets", "tables", "taxi", "tamarind"}, 4) == "ta");
assert(func0({"apples", "ape", "april"}, 3) == "ap");
assert(func0({"teens", "teenager", "teenmar"}, 3) == "teen");
return 0;
}
| O1 | cpp | func0(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, int):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x38,%rsp
mov %rd... | _Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEi:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 48h
mov rbx, rdi
mov r13, rsi
mov r12d, edx
mov rax, fs:28h
mov [rsp+78h+var_40], rax
xor eax, eax
mov rax, [rsi]
le... | void ** func0(void **a1, long long *a2, int a3)
{
long long v6; // rax
_QWORD *v7; // r14
_BYTE *v8; // r15
size_t v9; // rbp
size_t v10; // rax
long long v11; // r12
long long v12; // rbp
void *v13; // rdi
_BYTE *v14; // rax
void *v15; // rcx
char *v16; // rdx
unsigned long long v17; // rdi
_... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x48
MOV RBX,RDI
MOV R13,RSI
MOV R12D,EDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RSI]
LEA R14,[RDI + 0x10]
MOV qword ptr [RDI],R14
MOV R15,qword ptr [RAX]
MOV RBP,qword ptr [RAX + 0x8]
MOV qwo... | /* func0(std::vector<std::string, std::allocator<std::string > > const&, int) */
vector * func0(vector *param_1,int param_2)
{
vector *pvVar1;
int8 *puVar2;
vector *pvVar3;
uint uVar4;
vector *__dest;
long lVar5;
uint uVar6;
ulong uVar7;
uint in_EDX;
long lVar8;
int4 in_register_00000034;
long... |
722 | func0 |
#include <iostream>
#include <cassert>
#include <vector>
#include <string>
std::string common_prefix_util(const std::string& str1, const std::string& str2) {
std::string result = "";
size_t n1 = str1.length();
size_t n2 = str2.length();
size_t i = 0;
size_t j = 0;
while (i < n1 && ... | std::string func0(const std::vector<std::string>& arr, int n) {
std::string prefix = arr[0];
for (int i = 1; i < n; i++) {
prefix = common_prefix_util(prefix, arr[i]);
}
return prefix;
}
| int main() {
assert(func0({"tablets", "tables", "taxi", "tamarind"}, 4) == "ta");
assert(func0({"apples", "ape", "april"}, 3) == "ap");
assert(func0({"teens", "teenager", "teenmar"}, 3) == "teen");
return 0;
}
| O2 | cpp | func0(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, int):
endbr64
push %r15
lea 0x10(%rdi),%rcx
push %r14
mov %rsi,%r14
push %r13
push %r12
mov %rdi,... | _Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEi:
endbr64
push r15
lea r15, [rdi+10h]
push r14
mov r14, rsi
push r13
mov r13d, edx
push r12
push rbp
push rbx
mov rbx, rdi
sub rsp, 58h
mov rax, fs:28h
mov [rsp+88h+var_40], rax
mov rax, [r... | _QWORD * func0(_QWORD *a1, long long *a2, unsigned int a3)
{
_QWORD *v3; // r15
long long v4; // r13
long long v6; // rax
size_t v7; // rbp
_BYTE *v8; // r12
_QWORD *v9; // rax
long long v10; // r13
long long v11; // rbp
double v12; // rcx
double *v13; // rdi
size_t v14; // rdx
void *v15; // rdi... | func0:
ENDBR64
PUSH R15
LEA R15,[RDI + 0x10]
PUSH R14
MOV R14,RSI
PUSH R13
MOV R13D,EDX
PUSH R12
PUSH RBP
PUSH RBX
MOV RBX,RDI
SUB RSP,0x58
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x48],RAX
MOV RAX,qword ptr [RSI]
MOV qword ptr [RDI],R15
MOV RBP,qword ptr [RAX + 0x8]
MOV R12,qword ptr [RAX]
MOV qword ptr [RSP ... | /* func0(std::vector<std::string, std::allocator<std::string > > const&, int) */
vector * func0(vector *param_1,int param_2)
{
vector *pvVar1;
int8 *puVar2;
ulong __n;
long lVar3;
vector *pvVar4;
uint in_EDX;
long lVar5;
int4 in_register_00000034;
vector *pvVar6;
long in_FS_OFFSET;
ulong local_7... |
723 | func0 |
#include <iostream>
#include <cassert>
#include <vector>
#include <string>
std::string common_prefix_util(const std::string& str1, const std::string& str2) {
std::string result = "";
size_t n1 = str1.length();
size_t n2 = str2.length();
size_t i = 0;
size_t j = 0;
while (i < n1 && ... | std::string func0(const std::vector<std::string>& arr, int n) {
std::string prefix = arr[0];
for (int i = 1; i < n; i++) {
prefix = common_prefix_util(prefix, arr[i]);
}
return prefix;
}
| int main() {
assert(func0({"tablets", "tables", "taxi", "tamarind"}, 4) == "ta");
assert(func0({"apples", "ape", "april"}, 3) == "ap");
assert(func0({"teens", "teenager", "teenmar"}, 3) == "teen");
return 0;
}
| O3 | cpp | func0(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, int):
endbr64
push %r15
lea 0x10(%rdi),%rcx
push %r14
mov %rsi,%r14
push %r13
push %r12
mov %rdi,... | _Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEi:
endbr64
push r15
lea r15, [rdi+10h]
push r14
mov r14, rsi
push r13
mov r13d, edx
push r12
push rbp
push rbx
mov rbx, rdi
sub rsp, 58h
mov rax, fs:28h
mov [rsp+88h+var_40], rax
mov rax, [r... | _QWORD * func0(_QWORD *a1, long long *a2, unsigned int a3)
{
_QWORD *v3; // r15
long long v4; // r13
long long v6; // rax
size_t v7; // rbp
_BYTE *v8; // r12
_QWORD *v9; // rax
long long v10; // r13
long long v11; // rbp
double *v12; // rdi
size_t v13; // rdx
double v14; // rcx
void *v16; // rdi... | func0:
ENDBR64
PUSH R15
LEA R15,[RDI + 0x10]
PUSH R14
MOV R14,RSI
PUSH R13
MOV R13D,EDX
PUSH R12
PUSH RBP
PUSH RBX
MOV RBX,RDI
SUB RSP,0x58
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x48],RAX
MOV RAX,qword ptr [RSI]
MOV qword ptr [RDI],R15
MOV RBP,qword ptr [RAX + 0x8]
MOV R12,qword ptr [RAX]
MOV qword ptr [RSP ... | /* func0(std::vector<std::string, std::allocator<std::string > > const&, int) */
vector * func0(vector *param_1,int param_2)
{
vector *pvVar1;
int8 *puVar2;
ulong __n;
long lVar3;
vector *pvVar4;
uint in_EDX;
long lVar5;
int4 in_register_00000034;
vector *pvVar6;
long in_FS_OFFSET;
ulong local_7... |
724 | func0 |
#include <iostream>
#include <vector>
#include <regex>
#include <tuple>
#include <cassert>
| std::tuple<std::vector<char>, std::vector<char>, std::vector<char>, std::vector<char>> func0(const std::string& string) {
std::vector<char> uppercase_characters;
std::vector<char> lowercase_characters;
std::vector<char> numerical_characters;
std::vector<char> special_characters;
std::regex up... | int main() {
assert(func0("ThisIsGeeksforGeeks") == std::make_tuple(
std::vector<char>{'T', 'I', 'G', 'G'},
std::vector<char>{'h', 'i', 's', 's', 'e', 'e', 'k', 's', 'f', 'o', 'r', 'e', 'e', 'k', 's'},
std::vector<char>{},
std::vector<char>{}
));
assert(func0("Hithere2... | 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 $0x208,%rsp
mov %rdi,-0x208(%rbp)
mov %rsi,-0x210(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
lea -0x200(%rbp),%rax
mov %rax,%rdi
cal... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 208h
mov [rbp+var_208], rdi
mov [rbp+var_210], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_200]
mov rdi, rax
call _ZNSt6vectorIcSaIcEE... | long long func0(long long a1, long long a2)
{
long long v2; // rbx
long long v3; // rax
long long v4; // rax
long long v5; // rax
long long v6; // rbx
long long v7; // rax
long long v8; // rax
long long v9; // rax
long long v10; // rbx
long long v11; // rax
long long v12; // rax
long long v13; ... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x208
MOV qword ptr [RBP + -0x208],RDI
MOV qword ptr [RBP + -0x210],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x200]
MOV RDI,RAX
CALL 0x00106d44
LEA RAX,[RBP + -0x1e0]
MOV RDI,RAX
CALL 0x00106d44
LEA RAX,[RBP + -0x1c0... | /* func0(std::string const&) */
string * func0(string *param_1)
{
char cVar1;
__normal_iterator _Var2;
__normal_iterator _Var3;
char *pcVar4;
long in_FS_OFFSET;
vector<char,std::allocator<char>> local_208 [32];
vector<char,std::allocator<char>> local_1e8 [32];
vector<char,std::allocator<char>> local_1... |
725 | func0 |
#include <iostream>
#include <vector>
#include <regex>
#include <tuple>
#include <cassert>
| std::tuple<std::vector<char>, std::vector<char>, std::vector<char>, std::vector<char>> func0(const std::string& string) {
std::vector<char> uppercase_characters;
std::vector<char> lowercase_characters;
std::vector<char> numerical_characters;
std::vector<char> special_characters;
std::regex up... | int main() {
assert(func0("ThisIsGeeksforGeeks") == std::make_tuple(
std::vector<char>{'T', 'I', 'G', 'G'},
std::vector<char>{'h', 'i', 's', 's', 'e', 'e', 'k', 's', 'f', 'o', 'r', 'e', 'e', 'k', 's'},
std::vector<char>{},
std::vector<char>{}
));
assert(func0("Hithere2... | 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 $0x3a8,%rsp
mov %rdi,%rbx
mov %rsi,%rbp
mov %fs:0x28,%rax
mov %rax,0x398(%rsp)
xor %eax,%eax
movq $0x0,(%rsp)
movq $0x0,0x8(%rsp)
movq $0x0,0... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 378h
mov rbx, rdi
mov rbp, rsi
mov rax, fs:28h
mov [rsp+3A8h+var_40], rax
xor eax, eax
mov [rsp+3A8h+var_398], 0
mov [rsp+3A8h+var_390]... | _QWORD * func0(_QWORD *a1, _QWORD *a2)
{
long long v4; // rdx
long long v5; // rax
long long v6; // rdi
long long v7; // rdx
long long v8; // rax
long long v9; // rdi
long long v10; // rdx
long long v11; // rax
long long v12; // rdi
long long v13; // rdx
long long v14; // rax
long long v15; // r... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x378
MOV RBX,RDI
MOV RBP,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x368],RAX
XOR EAX,EAX
MOV qword ptr [RSP + 0x10],0x0
MOV qword ptr [RSP + 0x18],0x0
MOV qword ptr [RSP + 0x20],0x0
MOV qword ptr [RSP + 0x30],0x0
MOV qword ptr [RS... | /* func0(std::string const&) */
string * func0(string *param_1)
{
int *__src;
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
_Sp_counted_base<(_Lock_policy)2> *p_Var2;
char cVar3;
int8 *puVar4;
int *puVar5;
int *puVar6;
int *puVar7;
int *puVar8;
int8 uVar9;
ulong uVar10;
int8 *in_RSI;
long in_FS... |
726 | func0 |
#include <iostream>
#include <vector>
#include <regex>
#include <tuple>
#include <cassert>
| std::tuple<std::vector<char>, std::vector<char>, std::vector<char>, std::vector<char>> func0(const std::string& string) {
std::vector<char> uppercase_characters;
std::vector<char> lowercase_characters;
std::vector<char> numerical_characters;
std::vector<char> special_characters;
std::regex up... | int main() {
assert(func0("ThisIsGeeksforGeeks") == std::make_tuple(
std::vector<char>{'T', 'I', 'G', 'G'},
std::vector<char>{'h', 'i', 's', 's', 'e', 'e', 'k', 's', 'f', 'o', 'r', 'e', 'e', 'k', 's'},
std::vector<char>{},
std::vector<char>{}
));
assert(func0("Hithere2... | O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x418,%rsp
mov %rdi,0x18(%rsp)
lea 0x230(%rsp),%rbx
mov %rsi,0x38(%rsp)
mov %rbx,%rdi
mov %fs:0x28,%rax
mov %rax,0x408(... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
pxor xmm0, xmm0
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
lea rbx, [rbp+var_348]
sub rsp, 418h
mov [rbp+var_3F0], rdi
mov rdi, rbx; this
mov [rbp+var_408], rsi
mov rax, fs:28... | long long func0(long long a1, unsigned long long *a2)
{
__m128i v2; // xmm0
long long v3; // rdi
__m128i v4; // xmm0
long long v5; // rdi
__m128i v6; // xmm0
long long v7; // rdi
__m128i v8; // xmm0
long long v9; // rdi
unsigned long long v10; // rax
unsigned long long v11; // rdx
char *v12; // r... | func0:
ENDBR64
PUSH RBP
PXOR XMM0,XMM0
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
LEA RBX,[RBP + -0x348]
SUB RSP,0x418
MOV qword ptr [RBP + -0x3f0],RDI
MOV RDI,RBX
MOV qword ptr [RBP + -0x408],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x38],RAX
XOR EAX,EAX
MOVAPS xmmword ptr [RBP + -0x3d0],XMM... | /* func0(std::string const&) */
string * func0(string *param_1)
{
int *puVar1;
int8 __src;
int8 __src_00;
int8 __src_01;
int8 uVar2;
int auVar3 [16];
bool bVar4;
char cVar5;
int8 *puVar6;
long *in_RSI;
regex_iterator<__normal_iterator<char_const*,std::string>,char,std::regex_traits<char>> *prVar... |
727 | func0 |
#include <iostream>
#include <vector>
#include <regex>
#include <tuple>
#include <cassert>
| std::tuple<std::vector<char>, std::vector<char>, std::vector<char>, std::vector<char>> func0(const std::string& string) {
std::vector<char> uppercase_characters;
std::vector<char> lowercase_characters;
std::vector<char> numerical_characters;
std::vector<char> special_characters;
std::regex up... | int main() {
assert(func0("ThisIsGeeksforGeeks") == std::make_tuple(
std::vector<char>{'T', 'I', 'G', 'G'},
std::vector<char>{'h', 'i', 's', 's', 'e', 'e', 'k', 's', 'f', 'o', 'r', 'e', 'e', 'k', 's'},
std::vector<char>{},
std::vector<char>{}
));
assert(func0("Hithere2... | O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r15
pxor %xmm0,%xmm0
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x388,%rsp
mov %rdi,0x10(%rsp)
lea 0x1a0(%rsp),%r13
lea 0xe8(%rsp),%rbx
mov %rsi,0x20(%rsp)
mov %r13,%r... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 3F8h
mov [rsp+428h+var_3E0], rdi
lea rbx, [rsp+428h+var_310]
mov [rsp+428h+var_3D8], rsi
mov rdi, rbx; this
mov rax, fs:28h
... | long long func0(long long a1, _QWORD *a2)
{
__m128i v2; // xmm0
long long v3; // rdi
void *v4; // rdi
void **v5; // rbx
unsigned long long v6; // rbp
void *v7; // rdi
long long v8; // rsi
__m128i v9; // xmm0
long long v10; // rdi
void *v11; // rdi
void **v12; // r12
unsigned long long v13; // r... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x3f8
MOV qword ptr [RSP + 0x48],RDI
LEA RBX,[RSP + 0x118]
MOV qword ptr [RSP + 0x50],RSI
MOV RDI,RBX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x3e8],RAX
XOR EAX,EAX
MOVAPS xmmword ptr [RSP + 0x90],XMM0
MOVAPS xmmword pt... | /* func0(std::string const&) */
string * func0(string *param_1)
{
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
int *puVar2;
int8 uVar3;
int auVar4 [16];
char cVar5;
int iVar6;
int8 *puVar7;
int8 *puVar8;
int8 *in_RSI;
ulong uVar9;
long in_FS_OFFSET;
vector<char,std::allocator<char>> local_398 [8... |
728 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int arr[], int n, int k) {
int count = 0;
for (int i = 0; i < n; i++) {
for (int j = i + 1; j < n; j++) {
if (arr[i] - arr[j] == k || arr[j] - arr[i] == k) {
count += 1;
}
}
}
return count;
}
| int main() {
int arr1[] = {1, 5, 3, 4, 2};
assert(func0(arr1, 5, 3) == 2);
int arr2[] = {8, 12, 16, 4, 0, 20};
assert(func0(arr2, 6, 4) == 5);
int arr3[] = {2, 4, 1, 3, 4};
assert(func0(arr3, 5, 2) == 3);
return 0;
}
| O0 | cpp | func0(int*, int, int):
endbr64
push %rbp
mov %rsp,%rbp
mov %rdi,-0x18(%rbp)
mov %esi,-0x1c(%rbp)
mov %edx,-0x20(%rbp)
movl $0x0,-0xc(%rbp)
movl $0x0,-0x8(%rbp)
mov -0x8(%rbp),%eax
cmp -0x1c(%rbp),%eax
jge 1263 <_Z5func0Piii+0xba>
mov -0x8(%rbp),%eax
add $0x1,%eax
mov %eax,-0x4(%rbp)
... | _Z5func0Piii:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_18], rdi
mov [rbp+var_1C], esi
mov [rbp+var_20], edx
mov [rbp+var_C], 0
mov [rbp+var_8], 0
jmp loc_1213
loc_118E:
mov eax, [rbp+var_8]
add eax, 1
mov [rbp+var_4], eax
jmp short loc_1207
loc_1199:
mov eax, [rbp+va... | long long func0(int *a1, int a2, int a3)
{
unsigned int v4; // [rsp+14h] [rbp-Ch]
int i; // [rsp+18h] [rbp-8h]
int j; // [rsp+1Ch] [rbp-4h]
v4 = 0;
for ( i = 0; i < a2; ++i )
{
for ( j = i + 1; j < a2; ++j )
{
if ( a3 == a1[i] - a1[j] || a3 == a1[j] - a1[i] )
++v4;
}
}
return... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x1c],ESI
MOV dword ptr [RBP + -0x20],EDX
MOV dword ptr [RBP + -0xc],0x0
MOV dword ptr [RBP + -0x8],0x0
JMP 0x00101213
LAB_0010118e:
MOV EAX,dword ptr [RBP + -0x8]
ADD EAX,0x1
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00101207
LAB_0010... | /* func0(int*, int, int) */
int func0(int *param_1,int param_2,int param_3)
{
int local_14;
int local_10;
int local_c;
local_14 = 0;
for (local_10 = 0; local_c = local_10, local_10 < param_2; local_10 = local_10 + 1) {
while (local_c = local_c + 1, local_c < param_2) {
if ((param_3 == param_1[l... |
729 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int arr[], int n, int k) {
int count = 0;
for (int i = 0; i < n; i++) {
for (int j = i + 1; j < n; j++) {
if (arr[i] - arr[j] == k || arr[j] - arr[i] == k) {
count += 1;
}
}
}
return count;
}
| int main() {
int arr1[] = {1, 5, 3, 4, 2};
assert(func0(arr1, 5, 3) == 2);
int arr2[] = {8, 12, 16, 4, 0, 20};
assert(func0(arr2, 6, 4) == 5);
int arr3[] = {2, 4, 1, 3, 4};
assert(func0(arr3, 5, 2) == 3);
return 0;
}
| O1 | cpp | func0(int*, int, int):
endbr64
test %esi,%esi
jle 11fd <_Z5func0Piii+0x54>
push %rbx
lea -0x1(%rsi),%ebx
add $0x1,%rbx
mov $0x1,%r11d
mov $0x0,%r10d
jmp 11ee <_Z5func0Piii+0x45>
add $0x1,%r10d
add $0x1,%rax
cmp %eax,%esi
jle 11ea <_Z5func0Piii+0x41>
mov (%rdi,%rax,4),%ecx
mov %r9... | _Z5func0Piii:
endbr64
test esi, esi
jle short loc_11C6
push rbp
push rbx
mov r10, rdi
mov ebx, esi
movsxd rbp, esi
mov r11d, 1
mov r9d, 0
jmp short loc_11B7
loc_1189:
add r9d, 1
loc_118D:
add rax, 1
cmp esi, eax
jle short loc_11AB
loc_1195:
mov ecx, [r10+rax*4]
mov ... | long long func0(int *a1, int a2, int a3)
{
long long v3; // r11
unsigned int v4; // r9d
long long v5; // rax
int v6; // ecx
int v7; // r8d
if ( a2 <= 0 )
return 0LL;
v3 = 1LL;
v4 = 0;
while ( v3 != a2 )
{
v7 = a1[v3 - 1];
v5 = v3;
do
{
v6 = a1[v5];
if ( v7 - v6 == a... | func0:
ENDBR64
TEST ESI,ESI
JLE 0x001011c6
PUSH RBP
PUSH RBX
MOV R10,RDI
MOV EBX,ESI
MOVSXD RBP,ESI
MOV R11D,0x1
MOV R9D,0x0
JMP 0x001011b7
LAB_00101189:
ADD R9D,0x1
LAB_0010118d:
ADD RAX,0x1
CMP ESI,EAX
JLE 0x001011ab
LAB_00101195:
MOV ECX,dword ptr [R10 + RAX*0x4]
MOV EDI,R8D
SUB EDI,ECX
CMP EDI,EDX
JZ 0x00101189
SUB... | /* func0(int*, int, int) */
int func0(int *param_1,int param_2,int param_3)
{
ulong uVar1;
int iVar2;
ulong uVar3;
bool bVar4;
if (param_2 < 1) {
return 0;
}
iVar2 = 0;
uVar3 = 1;
do {
if (uVar3 == (uint)param_2) {
return iVar2;
}
uVar1 = uVar3;
do {
if ((param_1[u... |
730 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int arr[], int n, int k) {
int count = 0;
for (int i = 0; i < n; i++) {
for (int j = i + 1; j < n; j++) {
if (arr[i] - arr[j] == k || arr[j] - arr[i] == k) {
count += 1;
}
}
}
return count;
}
| int main() {
int arr1[] = {1, 5, 3, 4, 2};
assert(func0(arr1, 5, 3) == 2);
int arr2[] = {8, 12, 16, 4, 0, 20};
assert(func0(arr2, 6, 4) == 5);
int arr3[] = {2, 4, 1, 3, 4};
assert(func0(arr3, 5, 2) == 3);
return 0;
}
| O2 | cpp | func0(int*, int, int):
endbr64
test %esi,%esi
jle 1487 <_Z5func0Piii+0x67>
push %rbx
lea -0x1(%rsi),%ebx
mov $0x1,%r11d
xor %r10d,%r10d
add $0x1,%rbx
cmp %rbx,%r11
je 1482 <_Z5func0Piii+0x62>
xchg %ax,%ax
mov -0x4(%rdi,%r11,4),%r9d
mov %r11,%rax
jmp 145f <_Z5func0Piii+0x3f>
nopw 0... | _Z5func0Piii:
endbr64
test esi, esi
jle short loc_12F7
push rbx
mov r11d, 1
mov ebx, esi
xor r10d, r10d
cmp esi, 1
jz short loc_12F2
nop dword ptr [rax+00000000h]
loc_12B0:
mov r9d, [rdi+r11*4-4]
mov rax, r11
jmp short loc_12CF
loc_12C0:
sub ecx, r9d
cmp edx, ecx
j... | long long func0(int *a1, int a2, int a3)
{
long long v3; // r11
unsigned int v4; // r10d
int v5; // r9d
long long v6; // rax
int v7; // ecx
if ( a2 <= 0 )
return 0LL;
v3 = 1LL;
v4 = 0;
if ( a2 != 1 )
{
do
{
v5 = a1[v3 - 1];
v6 = v3;
do
{
while ( 1 )
... | func0:
ENDBR64
TEST ESI,ESI
JLE 0x001012f7
PUSH RBX
MOV R11D,0x1
MOV EBX,ESI
XOR R10D,R10D
CMP ESI,0x1
JZ 0x001012f2
NOP dword ptr [RAX]
LAB_001012b0:
MOV R9D,dword ptr [RDI + R11*0x4 + -0x4]
MOV RAX,R11
JMP 0x001012cf
LAB_001012c0:
SUB ECX,R9D
CMP EDX,ECX
JZ 0x001012dd
ADD RAX,0x1
CMP ESI,EAX
JLE 0x001012e9
LAB_001012... | /* func0(int*, int, int) */
int func0(int *param_1,int param_2,int param_3)
{
ulong uVar1;
int iVar2;
ulong uVar3;
if (param_2 < 1) {
return 0;
}
uVar3 = 1;
iVar2 = 0;
if (param_2 != 1) {
do {
uVar1 = uVar3;
do {
while ((param_3 == param_1[uVar3 - 1] - param_1[uVar1] ||
... |
731 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int arr[], int n, int k) {
int count = 0;
for (int i = 0; i < n; i++) {
for (int j = i + 1; j < n; j++) {
if (arr[i] - arr[j] == k || arr[j] - arr[i] == k) {
count += 1;
}
}
}
return count;
}
| int main() {
int arr1[] = {1, 5, 3, 4, 2};
assert(func0(arr1, 5, 3) == 2);
int arr2[] = {8, 12, 16, 4, 0, 20};
assert(func0(arr2, 6, 4) == 5);
int arr3[] = {2, 4, 1, 3, 4};
assert(func0(arr3, 5, 2) == 3);
return 0;
}
| O3 | cpp | func0(int*, int, int):
endbr64
push %r13
push %r12
push %rbp
push %rbx
test %esi,%esi
jle 157e <_Z5func0Piii+0x19e>
cmp $0x1,%esi
je 157e <_Z5func0Piii+0x19e>
movd %edx,%xmm6
lea 0x4(%rdi),%r11
xor %r12d,%r12d
mov $0x1,%ebx
pshufd $0x0,%xmm6,%xmm4
mov $0x1,%r8d
lea -0x1(%rsi),%ebp
p... | _Z5func0Piii:
endbr64
test esi, esi
jle loc_14AD
cmp esi, 1
jz loc_14AD
movd xmm7, edx
push r13
mov r11d, edx
lea r9, [rdi+4]
push r12
xor r10d, r10d
mov ecx, 1
lea r12d, [rsi-1]
push rbp
pshufd xmm4, xmm7, 0
mov ebp, 1
push rbx
mov rbx, rdi
nop
loc_1370:
mov ... | long long func0(int *a1, int a2, unsigned int a3)
{
int *v4; // r9
unsigned int v5; // r10d
int v6; // ecx
__m128i v7; // xmm4
unsigned int v9; // r8d
unsigned int v10; // edi
__m128i v11; // xmm2
const __m128i *v12; // rax
__m128i v13; // xmm3
__m128i v14; // xmm5
__m128i v15; // xmm2
int v16;... | func0:
ENDBR64
TEST ESI,ESI
JLE 0x001014ad
CMP ESI,0x1
JZ 0x001014ad
MOVD XMM7,EDX
PUSH R13
MOV R11D,EDX
LEA R9,[RDI + 0x4]
PUSH R12
XOR R10D,R10D
MOV ECX,0x1
LEA R12D,[RSI + -0x1]
PUSH RBP
PSHUFD XMM4,XMM7,0x0
MOV EBP,0x1
PUSH RBX
MOV RBX,RDI
NOP
LAB_00101370:
MOV EDI,ESI
MOV EAX,R12D
MOV R8D,dword ptr [R9 + -0x4]
SUB... | /* func0(int*, int, int) */
int func0(int *param_1,int param_2,int param_3)
{
int iVar1;
uint uVar2;
int iVar3;
int *piVar4;
int *piVar5;
int *piVar6;
int *piVar7;
int iVar8;
int *piVar9;
int iVar10;
int iVar11;
int iVar12;
int iVar13;
int iVar14;
if ((param_2 < 1) || (param_2 == 1)) ... |
732 | func0 |
#include <vector>
#include <assert.h>
| bool func0(const std::vector<int>& list, int num) {
for (int x : list) {
if (x < num) {
return false;
}
}
return true;
}
| int main() {
assert(func0({220, 330, 500}, 200) == true);
assert(func0({12, 17, 21}, 20) == false);
assert(func0({1, 2, 3, 4}, 10) == false);
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> > const&, int):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x40,%rsp
mov %rdi,-0x38(%rbp)
mov %esi,-0x3c(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x8(%rbp)
xor %eax,%eax
mov -0x38(%rbp),%rax
mov %rax,-0x10(%rbp)
mov -0x10(%rbp),%rax
mov %rax,%rdi
callq 1... | _Z5func0RKSt6vectorIiSaIiEEi:
endbr64
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_38], rdi
mov [rbp+var_3C], esi
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
mov rax, [rbp+var_38]
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov rdi, rax
call _ZNKSt6vectorIiSaIi... | long long func0(long long a1, int a2)
{
long long v3; // [rsp+20h] [rbp-20h] BYREF
_QWORD v4[3]; // [rsp+28h] [rbp-18h] BYREF
v4[2] = __readfsqword(0x28u);
v4[1] = a1;
v3 = std::vector<int>::begin(a1);
v4[0] = std::vector<int>::end(a1);
while ( (unsigned __int8)__gnu_cxx::operator!=<int const*,std::vect... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x38],RDI
MOV dword ptr [RBP + -0x3c],ESI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,RAX
CALL 0x001015fe
MOV qword pt... | /* func0(std::vector<int, std::allocator<int> > const&, int) */
int8 func0(vector *param_1,int param_2)
{
bool bVar1;
int *piVar2;
int8 uVar3;
long in_FS_OFFSET;
int8 local_28;
int8 local_20;
vector<int,std::allocator<int>> *local_18;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
lo... |
733 | func0 |
#include <vector>
#include <assert.h>
| bool func0(const std::vector<int>& list, int num) {
for (int x : list) {
if (x < num) {
return false;
}
}
return true;
}
| int main() {
assert(func0({220, 330, 500}, 200) == true);
assert(func0({12, 17, 21}, 20) == false);
assert(func0({1, 2, 3, 4}, 10) == false);
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> > const&, int):
endbr64
mov (%rdi),%rax
mov 0x8(%rdi),%rdx
cmp %rdx,%rax
je 122c <_Z5func0RKSt6vectorIiSaIiEEi+0x23>
cmp %esi,(%rax)
jl 1232 <_Z5func0RKSt6vectorIiSaIiEEi+0x29>
add $0x4,%rax
cmp %rax,%rdx
jne 1219 <_Z5func0RKSt6vectorIiSaIiEEi+0x10... | _Z5func0RKSt6vectorIiSaIiEEi:
endbr64
mov rax, [rdi]
mov rdx, [rdi+8]
cmp rdx, rax
jz short loc_122C
loc_1219:
cmp [rax], esi
jl short loc_1232
add rax, 4
cmp rdx, rax
jnz short loc_1219
mov eax, 1
retn
loc_122C:
mov eax, 1
retn
loc_1232:
mov eax, 0
retn | long long func0(long long a1, int a2)
{
_DWORD *v2; // rax
_DWORD *v3; // rdx
v2 = *(_DWORD **)a1;
v3 = *(_DWORD **)(a1 + 8);
if ( v3 == *(_DWORD **)a1 )
return 1LL;
while ( *v2 >= a2 )
{
if ( v3 == ++v2 )
return 1LL;
}
return 0LL;
} | func0:
ENDBR64
MOV RAX,qword ptr [RDI]
MOV RDX,qword ptr [RDI + 0x8]
CMP RDX,RAX
JZ 0x0010122c
LAB_00101219:
CMP dword ptr [RAX],ESI
JL 0x00101232
ADD RAX,0x4
CMP RDX,RAX
JNZ 0x00101219
MOV EAX,0x1
RET
LAB_0010122c:
MOV EAX,0x1
RET
LAB_00101232:
MOV EAX,0x0
RET | /* func0(std::vector<int, std::allocator<int> > const&, int) */
int8 func0(vector *param_1,int param_2)
{
int *piVar1;
piVar1 = *(int **)param_1;
if (*(int **)(param_1 + 8) == piVar1) {
return 1;
}
do {
if (*piVar1 < param_2) {
return 0;
}
piVar1 = piVar1 + 1;
} while (*(int **)(p... |
734 | func0 |
#include <vector>
#include <assert.h>
| bool func0(const std::vector<int>& list, int num) {
for (int x : list) {
if (x < num) {
return false;
}
}
return true;
}
| int main() {
assert(func0({220, 330, 500}, 200) == true);
assert(func0({12, 17, 21}, 20) == false);
assert(func0({1, 2, 3, 4}, 10) == false);
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> > const&, int):
endbr64
mov (%rdi),%rax
mov 0x8(%rdi),%rdx
cmp %rdx,%rax
jne 1401 <_Z5func0RKSt6vectorIiSaIiEEi+0x21>
jmp 1410 <_Z5func0RKSt6vectorIiSaIiEEi+0x30>
nopw 0x0(%rax,%rax,1)
add $0x4,%rax
cmp %rax,%rdx
je 1410 <_Z5func0RKSt6vectorIiSaIiEEi... | _Z5func0RKSt6vectorIiSaIiEEi:
endbr64
mov rax, [rdi]
mov rdx, [rdi+8]
cmp rdx, rax
jnz short loc_13E1
jmp short loc_13F0
loc_13D8:
add rax, 4
cmp rdx, rax
jz short loc_13F0
loc_13E1:
cmp [rax], esi
jge short loc_13D8
xor eax, eax
retn
loc_13F0:
mov eax, 1
retn | long long func0(long long a1, int a2)
{
_DWORD *v2; // rax
_DWORD *v3; // rdx
v2 = *(_DWORD **)a1;
v3 = *(_DWORD **)(a1 + 8);
if ( v3 == *(_DWORD **)a1 )
return 1LL;
while ( *v2 >= a2 )
{
if ( v3 == ++v2 )
return 1LL;
}
return 0LL;
} | func0:
ENDBR64
MOV RAX,qword ptr [RDI]
MOV RDX,qword ptr [RDI + 0x8]
CMP RDX,RAX
JNZ 0x001013e1
JMP 0x001013f0
LAB_001013d8:
ADD RAX,0x4
CMP RDX,RAX
JZ 0x001013f0
LAB_001013e1:
CMP dword ptr [RAX],ESI
JGE 0x001013d8
XOR EAX,EAX
RET
LAB_001013f0:
MOV EAX,0x1
RET | /* func0(std::vector<int, std::allocator<int> > const&, int) */
int8 func0(vector *param_1,int param_2)
{
int *piVar1;
piVar1 = *(int **)param_1;
while( true ) {
if (*(int **)(param_1 + 8) == piVar1) {
return 1;
}
if (*piVar1 < param_2) break;
piVar1 = piVar1 + 1;
}
return 0;
} |
735 | func0 |
#include <vector>
#include <assert.h>
| bool func0(const std::vector<int>& list, int num) {
for (int x : list) {
if (x < num) {
return false;
}
}
return true;
}
| int main() {
assert(func0({220, 330, 500}, 200) == true);
assert(func0({12, 17, 21}, 20) == false);
assert(func0({1, 2, 3, 4}, 10) == false);
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> > const&, int):
endbr64
mov (%rdi),%rax
mov 0x8(%rdi),%rdx
cmp %rdx,%rax
jne 13f1 <_Z5func0RKSt6vectorIiSaIiEEi+0x21>
jmp 1400 <_Z5func0RKSt6vectorIiSaIiEEi+0x30>
nopw 0x0(%rax,%rax,1)
add $0x4,%rax
cmp %rax,%rdx
je 1400 <_Z5func0RKSt6vectorIiSaIiEEi... | _Z5func0RKSt6vectorIiSaIiEEi:
endbr64
mov rax, [rdi]
mov rdx, [rdi+8]
cmp rdx, rax
jnz short loc_13E1
jmp short loc_13F0
loc_13D8:
add rax, 4
cmp rdx, rax
jz short loc_13F0
loc_13E1:
cmp [rax], esi
jge short loc_13D8
xor eax, eax
retn
loc_13F0:
mov eax, 1
retn | long long func0(long long a1, int a2)
{
_DWORD *v2; // rax
_DWORD *v3; // rdx
v2 = *(_DWORD **)a1;
v3 = *(_DWORD **)(a1 + 8);
if ( v3 == *(_DWORD **)a1 )
return 1LL;
while ( *v2 >= a2 )
{
if ( v3 == ++v2 )
return 1LL;
}
return 0LL;
} | func0:
ENDBR64
MOV RAX,qword ptr [RDI]
MOV RDX,qword ptr [RDI + 0x8]
CMP RDX,RAX
JNZ 0x001013e1
JMP 0x001013f0
LAB_001013d8:
ADD RAX,0x4
CMP RDX,RAX
JZ 0x001013f0
LAB_001013e1:
CMP dword ptr [RAX],ESI
JGE 0x001013d8
XOR EAX,EAX
RET
LAB_001013f0:
MOV EAX,0x1
RET | /* func0(std::vector<int, std::allocator<int> > const&, int) */
int8 func0(vector *param_1,int param_2)
{
int *piVar1;
piVar1 = *(int **)param_1;
while( true ) {
if (*(int **)(param_1 + 8) == piVar1) {
return 1;
}
if (*piVar1 < param_2) break;
piVar1 = piVar1 + 1;
}
return 0;
} |
736 | func0 |
#include <assert.h>
#include <tuple>
| std::tuple<double, double> func0(double a, double b, double c) {
double x = -b / (2 * a);
double y = ((4 * a * c) - (b * b) + 1) / (4 * a);
return {x, y};
}
| int main() {
assert(func0(5, 3, 2) == std::make_tuple(-0.3, 1.6));
assert(func0(9, 8, 4) == std::make_tuple(-0.4444444444444444, 2.25));
assert(func0(2, 4, 6) == std::make_tuple(-1.0, 4.125));
return 0;
}
| O0 | cpp | func0(double, double, double):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x40,%rsp
mov %rdi,-0x28(%rbp)
movsd %xmm0,-0x30(%rbp)
movsd %xmm1,-0x38(%rbp)
movsd %xmm2,-0x40(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x8(%rbp)
xor %eax,%eax
movsd -0x38(%rbp),%xmm0
movq 0xf4c(%rip),%xmm1
xorpd %xmm0,%xmm1
movsd... | _Z5func0ddd:
endbr64
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_28], rdi
movsd [rbp+var_30], xmm0
movsd [rbp+var_38], xmm1
movsd [rbp+var_40], xmm2
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
movsd xmm0, [rbp+var_38]
movq xmm1, cs:qword_20F0
xorpd xmm1, xmm0
movsd xm... | long long func0(
double a1,
double a2,
double a3,
long long a4,
long long a5,
long long a6,
long long a7,
long long a8,
long long a9)
{
double v10; // [rsp+28h] [rbp-18h] BYREF
double v11[2]; // [rsp+30h] [rbp-10h] BYREF
*(_QWORD *)&v11[1] ... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x28],RDI
MOVSD qword ptr [RBP + -0x30],XMM0
MOVSD qword ptr [RBP + -0x38],XMM1
MOVSD qword ptr [RBP + -0x40],XMM2
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
MOVSD XMM0,qword ptr [RBP + -0x38]
MOVQ XMM1,qword ptr [0x00102... | /* func0(double, double, double) */
tuple<double,double> * func0(double param_1,double param_2,double param_3)
{
tuple<double,double> *in_RDI;
long in_FS_OFFSET;
double local_20;
double local_18;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_20 = (double)(DAT_001020f0 ^ (ulong)param... |
737 | func0 |
#include <assert.h>
#include <tuple>
| std::tuple<double, double> func0(double a, double b, double c) {
double x = -b / (2 * a);
double y = ((4 * a * c) - (b * b) + 1) / (4 * a);
return {x, y};
}
| int main() {
assert(func0(5, 3, 2) == std::make_tuple(-0.3, 1.6));
assert(func0(9, 8, 4) == std::make_tuple(-0.4444444444444444, 2.25));
assert(func0(2, 4, 6) == std::make_tuple(-1.0, 4.125));
return 0;
}
| O1 | cpp | func0(double, double, double):
endbr64
mov %rdi,%rax
movapd %xmm0,%xmm3
mulsd 0xecc(%rip),%xmm3
mulsd %xmm3,%xmm2
movapd %xmm1,%xmm4
mulsd %xmm1,%xmm4
subsd %xmm4,%xmm2
addsd 0xebc(%rip),%xmm2
divsd %xmm3,%xmm2
movsd %xmm2,(%rdi)
xorpd 0xebc(%rip),%xmm1
addsd %xmm0,%xmm0
divsd %xmm0,%xmm1
movsd %xmm1,0x8(... | _Z5func0ddd:
endbr64
mov rax, rdi
movapd xmm3, xmm0
mulsd xmm3, cs:qword_2008
mulsd xmm2, xmm3
movapd xmm4, xmm1
mulsd xmm4, xmm1
subsd xmm2, xmm4
addsd xmm2, cs:qword_2010
divsd xmm2, xmm3
movsd qword ptr [rdi], xmm2
xorpd xmm1, cs:xmmword_2020
addsd xmm0, xmm0
divsd xmm1, xmm0
movsd qword ... | double * func0(double a1, double a2, double a3, double *a4)
{
double *result; // rax
result = a4;
*a4 = (a3 * (a1 * 4.0) - a2 * a2 + 1.0) / (a1 * 4.0);
a4[1] = -a2 / (a1 + a1);
return result;
} | func0:
ENDBR64
MOV RAX,RDI
MOVAPD XMM3,XMM0
MULSD XMM3,qword ptr [0x00102008]
MULSD XMM2,XMM3
MOVAPD XMM4,XMM1
MULSD XMM4,XMM1
SUBSD XMM2,XMM4
ADDSD XMM2,qword ptr [0x00102010]
DIVSD XMM2,XMM3
MOVSD qword ptr [RDI],XMM2
XORPD XMM1,xmmword ptr [0x00102020]
ADDSD XMM0,XMM0
DIVSD XMM1,XMM0
MOVSD qword ptr [RDI + 0x8],XMM1... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(double, double, double) */
void func0(double param_1,double param_2,double param_3)
{
double *in_RDI;
*in_RDI = ((param_3 * param_1 * _DAT_00102008 - param_2 * param_2) + _DAT_00102010) /
(param_1 * _DAT_0... |
738 | func0 |
#include <assert.h>
#include <tuple>
| std::tuple<double, double> func0(double a, double b, double c) {
double x = -b / (2 * a);
double y = ((4 * a * c) - (b * b) + 1) / (4 * a);
return {x, y};
}
| int main() {
assert(func0(5, 3, 2) == std::make_tuple(-0.3, 1.6));
assert(func0(9, 8, 4) == std::make_tuple(-0.4444444444444444, 2.25));
assert(func0(2, 4, 6) == std::make_tuple(-1.0, 4.125));
return 0;
}
| O2 | cpp | func0(double, double, double):
endbr64
movsd 0xebc(%rip),%xmm3
movapd %xmm1,%xmm4
mov %rdi,%rax
mulsd %xmm1,%xmm4
xorpd 0xec1(%rip),%xmm1
mulsd %xmm0,%xmm3
addsd %xmm0,%xmm0
divsd %xmm0,%xmm1
mulsd %xmm3,%xmm2
subsd %xmm4,%xmm2
addsd 0xe95(%rip),%xmm2
divsd %xmm3,%xmm2
movsd %xmm1,0x8(%rdi)
movsd %xmm2,(... | _Z5func0ddd:
endbr64
unpcklpd xmm0, xmm0
mov rax, rdi
mulpd xmm0, cs:xmmword_2010
movapd xmm3, xmm0
mulsd xmm3, xmm2
movapd xmm2, xmm1
mulsd xmm2, xmm1
xorpd xmm1, cs:xmmword_2020
subsd xmm3, xmm2
addsd xmm3, cs:qword_2030
unpcklpd xmm3, xmm1
divpd xmm3, xmm0
movups xmmword ptr [rdi], xmm3
retn | __m128d * func0(__m128d a1, __m128d a2, double a3, __m128d *a4)
{
__m128d *result; // rax
__m128d v5; // xmm0
__m128d v6; // xmm3
result = a4;
v5 = _mm_mul_pd(_mm_unpacklo_pd(a1, a1), (__m128d)xmmword_2010);
v6.m128d_f64[1] = v5.m128d_f64[1];
v6.m128d_f64[0] = v5.m128d_f64[0] * a3 - a2.m128d_f64[0] * a2.... | func0:
ENDBR64
UNPCKLPD XMM0,XMM0
MOV RAX,RDI
MULPD XMM0,xmmword ptr [0x00102010]
MOVAPD XMM3,XMM0
MULSD XMM3,XMM2
MOVAPD XMM2,XMM1
MULSD XMM2,XMM1
XORPD XMM1,xmmword ptr [0x00102020]
SUBSD XMM3,XMM2
ADDSD XMM3,qword ptr [0x00102030]
UNPCKLPD XMM3,XMM1
DIVPD XMM3,XMM0
MOVUPS xmmword ptr [RDI],XMM3
RET | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(double, double, double) */
void func0(double param_1,double param_2,double param_3)
{
int (*in_RDI) [16];
int auVar1 [16];
int auVar2 [16];
auVar1._0_8_ = (param_1 * _DAT_00102010 * param_3 - param_2 * param_2) + ... |
739 | func0 |
#include <assert.h>
#include <tuple>
| std::tuple<double, double> func0(double a, double b, double c) {
double x = -b / (2 * a);
double y = ((4 * a * c) - (b * b) + 1) / (4 * a);
return {x, y};
}
| int main() {
assert(func0(5, 3, 2) == std::make_tuple(-0.3, 1.6));
assert(func0(9, 8, 4) == std::make_tuple(-0.4444444444444444, 2.25));
assert(func0(2, 4, 6) == std::make_tuple(-1.0, 4.125));
return 0;
}
| O3 | cpp | func0(double, double, double):
endbr64
movsd 0xebc(%rip),%xmm3
movapd %xmm1,%xmm4
mov %rdi,%rax
mulsd %xmm1,%xmm4
xorpd 0xec1(%rip),%xmm1
mulsd %xmm0,%xmm3
addsd %xmm0,%xmm0
divsd %xmm0,%xmm1
mulsd %xmm3,%xmm2
subsd %xmm4,%xmm2
addsd 0xe95(%rip),%xmm2
divsd %xmm3,%xmm2
movsd %xmm1,0x8(%rdi)
movsd %xmm2,(... | _Z5func0ddd:
endbr64
unpcklpd xmm0, xmm0
mov rax, rdi
mulpd xmm0, cs:xmmword_2010
movapd xmm3, xmm0
mulsd xmm3, xmm2
movapd xmm2, xmm1
mulsd xmm2, xmm1
xorpd xmm1, cs:xmmword_2020
subsd xmm3, xmm2
addsd xmm3, cs:qword_2030
unpcklpd xmm3, xmm1
divpd xmm3, xmm0
movups xmmword ptr [rdi], xmm3
retn | __m128d * func0(__m128d a1, __m128d a2, double a3, __m128d *a4)
{
__m128d *result; // rax
__m128d v5; // xmm0
__m128d v6; // xmm3
result = a4;
v5 = _mm_mul_pd(_mm_unpacklo_pd(a1, a1), (__m128d)xmmword_2010);
v6.m128d_f64[1] = v5.m128d_f64[1];
v6.m128d_f64[0] = v5.m128d_f64[0] * a3 - a2.m128d_f64[0] * a2.... | func0:
ENDBR64
UNPCKLPD XMM0,XMM0
MOV RAX,RDI
MULPD XMM0,xmmword ptr [0x00102010]
MOVAPD XMM3,XMM0
MULSD XMM3,XMM2
MOVAPD XMM2,XMM1
MULSD XMM2,XMM1
XORPD XMM1,xmmword ptr [0x00102020]
SUBSD XMM3,XMM2
ADDSD XMM3,qword ptr [0x00102030]
UNPCKLPD XMM3,XMM1
DIVPD XMM3,XMM0
MOVUPS xmmword ptr [RDI],XMM3
RET | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(double, double, double) */
void func0(double param_1,double param_2,double param_3)
{
int (*in_RDI) [16];
int auVar1 [16];
int auVar2 [16];
auVar1._0_8_ = (param_1 * _DAT_00102010 * param_3 - param_2 * param_2) + ... |
740 | func0 |
#include <iostream>
#include <regex>
#include <assert.h>
| std::string func0(std::string text, std::vector<std::string> patterns) {
for (auto& pattern : patterns) {
if (std::regex_search(text, std::regex(pattern))) {
return "Matched!";
} else {
return "Not Matched!";
}
}
return "Not Matched!"; // In case patt... | int main() {
assert(func0("The quick brown fox jumps over the lazy dog.", {"fox"}) == "Matched!");
assert(func0("The quick brown fox jumps over the lazy dog.", {"horse"}) == "Not Matched!");
assert(func0("The quick brown fox jumps over the lazy dog.", {"lazy"}) == "Matched!");
std::cout << "All te... | O0 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >):
endbr64
push %rbp
mov %rsp,%rbp
pu... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS4_SaIS4_EE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 98h
mov [rbp+var_88], rdi
mov [rbp+var_90], rsi
mov [rbp+var_98], rdx
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_98]
mov ... | long long func0(long long a1, long long a2, long long a3)
{
char v3; // bl
long long v5; // [rsp+28h] [rbp-78h] BYREF
long long v6; // [rsp+30h] [rbp-70h] BYREF
long long v7; // [rsp+38h] [rbp-68h]
long long v8; // [rsp+40h] [rbp-60h]
_BYTE *v9; // [rsp+48h] [rbp-58h]
_BYTE *v10; // [rsp+50h] [rbp-50h]
... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x98
MOV qword ptr [RBP + -0x88],RDI
MOV qword ptr [RBP + -0x90],RSI
MOV qword ptr [RBP + -0x98],RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x98]
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr [RBP + -0x68... | /* func0(std::string, std::vector<std::string, std::allocator<std::string > >) */
string * func0(string *param_1,string *param_2,
vector<std::string,std::allocator<std::string>> *param_3)
{
bool bVar1;
long in_FS_OFFSET;
int8 local_80;
int8 local_78;
vector<std::string,std::allocator<std::stri... |
741 | func0 |
#include <iostream>
#include <regex>
#include <assert.h>
| std::string func0(std::string text, std::vector<std::string> patterns) {
for (auto& pattern : patterns) {
if (std::regex_search(text, std::regex(pattern))) {
return "Matched!";
} else {
return "Not Matched!";
}
}
return "Not Matched!"; // In case patt... | int main() {
assert(func0("The quick brown fox jumps over the lazy dog.", {"fox"}) == "Matched!");
assert(func0("The quick brown fox jumps over the lazy dog.", {"horse"}) == "Not Matched!");
assert(func0("The quick brown fox jumps over the lazy dog.", {"lazy"}) == "Matched!");
std::cout << "All te... | O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >):
endbr64
push %r15
push %r14
push ... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS4_SaIS4_EE:
endbr64
push rbp
mov rbp, rsp
push r14
push r13
push r12
push rbx
sub rsp, 50h
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_28], rax
xor eax, eax
mov r12, [rdx]
cmp r12, [rdx+8]
jz loc_49D... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x50
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
XOR EAX,EAX
MOV R12,qword ptr [RDX]
CMP R12,qword ptr [RDX + 0x8]
JZ 0x001049db
MOV R14,RSI
LEA R13,[RBP + -0x70]
LEA RDI,[RBP + -0x68]
CALL 0x00104730
MOV qword p... | /* func0(std::string, std::vector<std::string, std::allocator<std::string > >) */
long * func0(long *param_1,int8 *param_2,long *param_3)
{
int8 *puVar1;
bool bVar2;
long in_FS_OFFSET;
regex local_78 [8];
int local_70 [8];
int8 local_68;
_Sp_counted_base<(_Lock_policy)2> *local_60;
void *local_58;
i... | |
742 | func0 |
#include <iostream>
#include <regex>
#include <assert.h>
| std::string func0(std::string text, std::vector<std::string> patterns) {
for (auto& pattern : patterns) {
if (std::regex_search(text, std::regex(pattern))) {
return "Matched!";
} else {
return "Not Matched!";
}
}
return "Not Matched!"; // In case patt... | int main() {
assert(func0("The quick brown fox jumps over the lazy dog.", {"fox"}) == "Matched!");
assert(func0("The quick brown fox jumps over the lazy dog.", {"horse"}) == "Not Matched!");
assert(func0("The quick brown fox jumps over the lazy dog.", {"lazy"}) == "Matched!");
std::cout << "All te... | O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >):
endbr64
push %r15
push %r14
push ... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS4_SaIS4_EE:
endbr64
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
mov rbx, rdi
sub rsp, 58h
mov r12, [rdx]
mov rax, fs:28h
mov [rbp+var_38], rax
xor eax, eax
cmp r12, [rdx+8]
jz ... | long long func0(long long a1, long long *a2, _QWORD *a3)
{
_QWORD *v4; // r12
long long v5; // rdi
long long v6; // rsi
long long v7; // rsi
char v8; // r12
long long v9; // rdi
long long v10; // rdx
volatile signed __int32 *v11; // rcx
signed __int32 v12; // eax
long long v14; // rax
_BYTE v15[8... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV RBX,RDI
SUB RSP,0x58
MOV R12,qword ptr [RDX]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x38],RAX
XOR EAX,EAX
CMP R12,qword ptr [RDX + 0x8]
JZ 0x00105ea0
LEA R13,[RBP + -0x78]
MOV R15,RSI
LEA R14,[RBP + -0x80]
MOV RDI,R13
CALL 0... | /* func0(std::string, std::vector<std::string, std::allocator<std::string > >) */
long * func0(long *param_1,int8 *param_2,long *param_3)
{
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
int8 *puVar2;
int8 uVar3;
bool bVar4;
int iVar5;
long in_FS_OFFSET;
regex local_88 [8];
int local_80 [8];
int local_7... |
743 | func0 |
#include <iostream>
#include <regex>
#include <assert.h>
| std::string func0(std::string text, std::vector<std::string> patterns) {
for (auto& pattern : patterns) {
if (std::regex_search(text, std::regex(pattern))) {
return "Matched!";
} else {
return "Not Matched!";
}
}
return "Not Matched!"; // In case patt... | int main() {
assert(func0("The quick brown fox jumps over the lazy dog.", {"fox"}) == "Matched!");
assert(func0("The quick brown fox jumps over the lazy dog.", {"horse"}) == "Not Matched!");
assert(func0("The quick brown fox jumps over the lazy dog.", {"lazy"}) == "Matched!");
std::cout << "All te... | O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >):
endbr64
push %r15
push %r14
push ... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS4_SaIS4_EE:
endbr64
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
mov rbx, rdi
sub rsp, 58h
mov r12, [rdx]
mov rax, fs:28h
mov [rbp+var_38], rax
xor eax, eax
cmp r12, [rdx+8]
jz ... | long long func0(long long a1, long long *a2, _QWORD *a3)
{
_QWORD *v4; // r12
long long v5; // rdi
long long v6; // rsi
long long v7; // rsi
char v8; // r15
_BYTE v10[8]; // [rsp+0h] [rbp-80h] BYREF
_BYTE v11[8]; // [rsp+8h] [rbp-78h] BYREF
__int128 v12; // [rsp+10h] [rbp-70h]
_OWORD v13[2]; // [rsp+... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV RBX,RDI
SUB RSP,0x58
MOV R12,qword ptr [RDX]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x38],RAX
XOR EAX,EAX
CMP R12,qword ptr [RDX + 0x8]
JZ 0x00105fb0
LEA R13,[RBP + -0x78]
MOV R15,RSI
LEA R14,[RBP + -0x80]
MOV RDI,R13
CALL 0... | /* func0(std::string, std::vector<std::string, std::allocator<std::string > >) */
long * func0(long *param_1,int8 *param_2,long *param_3)
{
int8 *puVar1;
bool bVar2;
long in_FS_OFFSET;
regex local_88 [8];
int local_80 [8];
int local_78 [16];
match_results local_68 [16];
int local_58 [16];
long local... |
744 | func0 |
#include <iostream>
#include <assert.h>
using namespace std;
| int func0(string X, string Y, int m, int n) {
if (m == 0 || n == 0) {
return 0;
} else if (X[m - 1] == Y[n - 1]) {
return 1 + func0(X, Y, m - 1, n - 1);
} else {
return max(func0(X, Y, m, n - 1), func0(X, Y, m - 1, n));
}
}
| int main() {
assert(func0("AGGTAB", "GXTXAYB", 6, 7) == 4);
assert(func0("ABCDGH", "AEDFHR", 6, 6) == 3);
assert(func0("AXYT", "AYZX", 4, 4) == 2);
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> >, int, int):
endbr64
push %rbp
mov %rsp,%rbp
push %r12
push %rbx
sub $0xc0,%rsp
mov %rdi,-0xb8(%rbp)
mov %rsi,-0xc0(%rbp)
mov %edx,-0... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_ii:
endbr64
push rbp
mov rbp, rsp
push r12
push rbx
sub rsp, 0C0h
mov [rbp+var_B8], rdi
mov [rbp+var_C0], rsi
mov [rbp+var_C4], edx
mov [rbp+var_C8], ecx
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
cmp ... | long long func0(long long a1, long long a2, unsigned int a3, unsigned int a4)
{
unsigned int v4; // ebx
char v5; // bl
int v9; // [rsp+28h] [rbp-A8h] BYREF
int v10; // [rsp+2Ch] [rbp-A4h] BYREF
_BYTE v11[32]; // [rsp+30h] [rbp-A0h] BYREF
_BYTE v12[32]; // [rsp+50h] [rbp-80h] BYREF
_BYTE v13[32]; // [rsp+... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R12
PUSH RBX
SUB RSP,0xc0
MOV qword ptr [RBP + -0xb8],RDI
MOV qword ptr [RBP + -0xc0],RSI
MOV dword ptr [RBP + -0xc4],EDX
MOV dword ptr [RBP + -0xc8],ECX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
CMP dword ptr [RBP + -0xc4],0x0
JZ 0x00101396
CMP dwo... | /* func0(std::string, std::string, int, int) */
int func0(string *param_1,string *param_2,int param_3,int param_4)
{
char cVar1;
int iVar2;
char *pcVar3;
int *piVar4;
long in_FS_OFFSET;
int local_b0;
int local_ac;
string local_a8 [32];
string local_88 [32];
string local_68 [32];
string local_48 ... |
745 | func0 |
#include <iostream>
#include <assert.h>
using namespace std;
| int func0(string X, string Y, int m, int n) {
if (m == 0 || n == 0) {
return 0;
} else if (X[m - 1] == Y[n - 1]) {
return 1 + func0(X, Y, m - 1, n - 1);
} else {
return max(func0(X, Y, m, n - 1), func0(X, Y, m - 1, n));
}
}
| int main() {
assert(func0("AGGTAB", "GXTXAYB", 6, 7) == 4);
assert(func0("ABCDGH", "AEDFHR", 6, 6) == 3);
assert(func0("AXYT", "AYZX", 4, 4) == 2);
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> >, int, int):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x98,%rsp
mov %fs:0x28,%rax
mov %rax,0x88(%rsp)... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_ii:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 98h
mov rax, fs:28h
mov [rsp+0C8h+var_40], rax
xor eax, eax
test edx, edx
jz loc_1488
mov rbx, rdi
mov rbp, rsi
mov r12d, edx
mo... | long long func0(_QWORD *a1, _QWORD *a2, int a3, int a4)
{
int v7; // r15d
int v8; // r14d
long long v9; // rsi
int v10; // r8d
int v11; // r9d
int v12; // r8d
int v13; // r9d
unsigned int v14; // r13d
int v15; // r8d
int v16; // r9d
int v17; // eax
void *v19; // [rsp+0h] [rbp-C8h] BYREF
int v... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x98
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x88],RAX
XOR EAX,EAX
TEST EDX,EDX
JZ 0x00101488
MOV RBX,RDI
MOV RBP,RSI
MOV R12D,EDX
MOV R13D,ECX
TEST ECX,ECX
JZ 0x00101488
LEA R15D,[RDX + -0x1]
LEA R14D,[RCX + -0x1]
MOV RSI,qword ptr [... | /* func0(std::string, std::string, int, int) */
int func0(long *param_1,int8 *param_2,int param_3,int param_4)
{
char *pcVar1;
int iVar2;
int iVar3;
long in_FS_OFFSET;
long *local_c8 [2];
long local_b8 [2];
long *local_a8 [2];
long local_98 [2];
long *local_88 [2];
long local_78 [2];
long *local... |
746 | func0 |
#include <iostream>
#include <assert.h>
using namespace std;
| int func0(string X, string Y, int m, int n) {
if (m == 0 || n == 0) {
return 0;
} else if (X[m - 1] == Y[n - 1]) {
return 1 + func0(X, Y, m - 1, n - 1);
} else {
return max(func0(X, Y, m, n - 1), func0(X, Y, m - 1, n));
}
}
| int main() {
assert(func0("AGGTAB", "GXTXAYB", 6, 7) == 4);
assert(func0("ABCDGH", "AEDFHR", 6, 6) == 3);
assert(func0("AXYT", "AYZX", 4, 4) == 2);
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> >, int, int):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0xb8,%rsp
mov %fs:0x28,%rax
mov %rax,0xa8(%rsp)... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_ii:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 0C8h
mov rax, fs:28h
mov [rsp+0F8h+var_40], rax
xor eax, eax
test edx, edx
jz loc_1810
mov r13d, ecx
test ecx, ecx
jz loc_1810
m... | long long func0(long long *a1, long long *a2, int a3, int a4)
{
long long v7; // rsi
long long v9; // rdi
long long v10; // rsi
long long v11; // rdx
int v12; // r8d
int v13; // r9d
int v14; // eax
long long v15; // rsi
long long v16; // rdx
long long v17; // rsi
long long v18; // rdx
int v19; ... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0xc8
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0xb8],RAX
XOR EAX,EAX
TEST EDX,EDX
JZ 0x00101810
MOV R13D,ECX
TEST ECX,ECX
JZ 0x00101810
MOV RBX,RDI
MOV RBP,RSI
LEA EAX,[RDX + -0x1]
MOV RSI,qword ptr [RSI]
LEA R8D,[RCX + -0x1]
MOV RDI,qw... | /* func0(std::string, std::string, int, int) */
int func0(long *param_1,int8 *param_2,int param_3,int param_4)
{
char *pcVar1;
int iVar2;
int iVar3;
forward_iterator_tag fVar4;
long in_FS_OFFSET;
long *local_c8 [2];
long local_b8 [2];
long *local_a8 [2];
long local_98 [2];
long *local_88 [2];
lo... |
747 | func0 |
#include <iostream>
#include <assert.h>
using namespace std;
| int func0(string X, string Y, int m, int n) {
if (m == 0 || n == 0) {
return 0;
} else if (X[m - 1] == Y[n - 1]) {
return 1 + func0(X, Y, m - 1, n - 1);
} else {
return max(func0(X, Y, m, n - 1), func0(X, Y, m - 1, n));
}
}
| int main() {
assert(func0("AGGTAB", "GXTXAYB", 6, 7) == 4);
assert(func0("ABCDGH", "AEDFHR", 6, 6) == 3);
assert(func0("AXYT", "AYZX", 4, 4) == 2);
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> >, int, int):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0xd8,%rsp
mov %fs:0x28,%rax
mov %rax,0xc8(%rsp)... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_ii:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 0E8h
mov rax, fs:28h
mov [rsp+118h+var_40], rax
xor eax, eax
test edx, edx
jz loc_1A50
mov r13d, ecx
test ecx, ecx
jz loc_1A50
l... | long long func0(_QWORD *a1, long long a2, unsigned int a3, unsigned int a4)
{
unsigned int v5; // eax
size_t v6; // r14
_BYTE *v7; // rcx
unsigned int v8; // r15d
bool v11; // zf
_QWORD *v12; // rax
size_t v13; // r14
_BYTE *v14; // rax
_QWORD *v15; // rax
unsigned int v16; // eax
_BYTE *v17; // ... | func0:
ENDBR64
PUSH R15
PUSH R14
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
TEST EDX,EDX
JZ 0x00101a50
MOV R13D,ECX
TEST ECX,ECX
JZ 0x00101a50
LEA EAX,[RCX + -0x1]
MOV R14,qword ptr [RSI + 0x8]
MOV RCX,qword ptr [RSI]
MOV RBP,RSI
LEA R15D,[RDX... | /* func0(std::string, std::string, int, int) */
int func0(long *param_1,int8 *param_2,int param_3,int param_4)
{
ulong uVar1;
int *puVar2;
int iVar3;
int iVar4;
long in_FS_OFFSET;
ulong local_d0;
ulong *local_c8;
ulong local_c0;
ulong local_b8 [2];
ulong *local_a8;
ulong local_a0;
ulong local_... |
748 | func0 |
#include <iostream>
#include <assert.h>
| bool func0(int n) {
for (int i = 2; i < (n + 1); ++i) {
if (i * i < (n + 1)) {
for (int j = 2; j < n + 1; ++j) {
if ((i * i * j * j) == n) {
return true;
}
}
}
}
return false;
}
| int main() {
assert(func0(25) == false);
assert(func0(30) == false);
assert(func0(16) == true);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
movl $0x2,-0x8(%rbp)
mov -0x14(%rbp),%eax
cmp -0x8(%rbp),%eax
jl 11e3 <_Z5func0i+0x5a>
mov -0x8(%rbp),%eax
imul %eax,%eax
cmp %eax,-0x14(%rbp)
jl 11dd <_Z5func0i+0x54>
movl $0x2,-0x4(%rbp)
mov -0x14(%rbp),%eax
cmp -... | _Z5func0i:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_14], edi
mov [rbp+var_8], 2
jmp short loc_119B
loc_115D:
mov eax, [rbp+var_8]
imul eax, eax
cmp [rbp+var_14], eax
jl short loc_1197
mov [rbp+var_4], 2
jmp short loc_118F
loc_1171:
mov eax, [rbp+var_8]
imul eax, eax
i... | long long func0(int a1)
{
int i; // [rsp+Ch] [rbp-8h]
int j; // [rsp+10h] [rbp-4h]
for ( i = 2; a1 >= i; ++i )
{
if ( a1 >= i * i )
{
for ( j = 2; a1 >= j; ++j )
{
if ( a1 == j * j * i * i )
return 1LL;
}
}
}
return 0LL;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x14],EDI
MOV dword ptr [RBP + -0x8],0x2
JMP 0x0010119b
LAB_0010115d:
MOV EAX,dword ptr [RBP + -0x8]
IMUL EAX,EAX
CMP dword ptr [RBP + -0x14],EAX
JL 0x00101197
MOV dword ptr [RBP + -0x4],0x2
JMP 0x0010118f
LAB_00101171:
MOV EAX,dword ptr [RBP + -0x8]
IMUL EAX,EA... | /* func0(int) */
int8 func0(int param_1)
{
int local_10;
int local_c;
local_10 = 2;
do {
if (param_1 < local_10) {
return 0;
}
if (local_10 * local_10 <= param_1) {
for (local_c = 2; local_c <= param_1; local_c = local_c + 1) {
if (param_1 == local_10 * local_10 * local_c * ... |
749 | func0 |
#include <iostream>
#include <assert.h>
| bool func0(int n) {
for (int i = 2; i < (n + 1); ++i) {
if (i * i < (n + 1)) {
for (int j = 2; j < n + 1; ++j) {
if ((i * i * j * j) == n) {
return true;
}
}
}
}
return false;
}
| int main() {
assert(func0(25) == false);
assert(func0(30) == false);
assert(func0(16) == true);
return 0;
}
| O1 | cpp | func0(int):
endbr64
cmp $0x1,%edi
jle 11de <_Z5func0i+0x55>
mov $0x2,%ecx
jmp 11a0 <_Z5func0i+0x17>
add $0x1,%ecx
cmp %ecx,%edi
jl 11d8 <_Z5func0i+0x4f>
mov %ecx,%eax
imul %ecx,%eax
cmp %edi,%eax
jg 1199 <_Z5func0i+0x10>
lea 0x0(,%rax,4),%edx
cmp %edx,%edi
je 11e4 <_Z5func0i+... | _Z5func0i:
endbr64
cmp edi, 1
jle short loc_119D
mov esi, 2
jmp short loc_1160
loc_1159:
add esi, 1
cmp edi, esi
jl short loc_1197
loc_1160:
mov ecx, esi
imul ecx, esi
cmp ecx, edi
jg short loc_1159
lea eax, ds:0[rcx*4]
cmp edi, eax
jz short loc_11A3
lea edx... | long long func0(int a1)
{
int v1; // esi
int v2; // ecx
int v3; // edx
int v4; // eax
int v5; // r8d
if ( a1 <= 1 )
return 0LL;
v1 = 2;
while ( 1 )
{
v2 = v1 * v1;
if ( v1 * v1 <= a1 )
break;
LABEL_3:
if ( a1 < ++v1 )
return 0LL;
}
if ( a1 != 4 * v2 )
{
v3 = 3 *... | func0:
ENDBR64
CMP EDI,0x1
JLE 0x0010119d
MOV ESI,0x2
JMP 0x00101160
LAB_00101159:
ADD ESI,0x1
CMP EDI,ESI
JL 0x00101197
LAB_00101160:
MOV ECX,ESI
IMUL ECX,ESI
CMP ECX,EDI
JG 0x00101159
LEA EAX,[RCX*0x4]
CMP EDI,EAX
JZ 0x001011a3
LEA EDX,[RCX + RCX*0x2]
MOV EAX,0x2
LAB_0010117c:
ADD EAX,0x1
CMP EDI,EAX
JL 0x00101159
MO... | /* func0(int) */
int8 func0(int param_1)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
if (param_1 < 2) {
return 0;
}
iVar4 = 2;
do {
iVar2 = iVar4 * iVar4;
if (iVar2 <= param_1) {
if (param_1 == iVar2 * 4) {
return 1;
}
iVar3 = iVar2 * 3;
iV... |
750 | func0 |
#include <iostream>
#include <assert.h>
| bool func0(int n) {
for (int i = 2; i < (n + 1); ++i) {
if (i * i < (n + 1)) {
for (int j = 2; j < n + 1; ++j) {
if ((i * i * j * j) == n) {
return true;
}
}
}
}
return false;
}
| int main() {
assert(func0(25) == false);
assert(func0(30) == false);
assert(func0(16) == true);
return 0;
}
| O2 | cpp | func0(int):
endbr64
cmp $0x1,%edi
jle 12f8 <_Z5func0i+0x58>
mov $0x2,%ecx
jmp 12b7 <_Z5func0i+0x17>
add $0x1,%ecx
cmp %ecx,%edi
jl 12f8 <_Z5func0i+0x58>
mov %ecx,%esi
imul %ecx,%esi
cmp %edi,%esi
jg 12b0 <_Z5func0i+0x10>
lea 0x0(,%rsi,4),%eax
cmp %eax,%edi
je 12ed <_Z5func0i+... | _Z5func0i:
endbr64
cmp edi, 1
jle short loc_1248
mov esi, 2
jmp short loc_1207
loc_1200:
add esi, 1
cmp edi, esi
jl short loc_1248
loc_1207:
mov ecx, esi
imul ecx, esi
cmp ecx, edi
jg short loc_1200
lea eax, ds:0[rcx*4]
cmp edi, eax
jz short loc_123D
lea edx... | long long func0(int a1)
{
int i; // esi
int v2; // ecx
int v3; // edx
int v4; // eax
int v5; // r8d
if ( a1 > 1 )
{
for ( i = 2; a1 >= i; ++i )
{
v2 = i * i;
if ( i * i <= a1 )
{
if ( a1 == 4 * v2 )
return 1LL;
v3 = 3 * v2;
v4 = 2;
whil... | func0:
ENDBR64
CMP EDI,0x1
JLE 0x00101248
MOV ESI,0x2
JMP 0x00101207
LAB_00101200:
ADD ESI,0x1
CMP EDI,ESI
JL 0x00101248
LAB_00101207:
MOV ECX,ESI
IMUL ECX,ESI
CMP ECX,EDI
JG 0x00101200
LEA EAX,[RCX*0x4]
CMP EDI,EAX
JZ 0x0010123d
LEA EDX,[RCX + RCX*0x2]
MOV EAX,0x2
NOP dword ptr [RAX + RAX*0x1]
LAB_00101228:
ADD EAX,0x... | /* func0(int) */
int8 func0(int param_1)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
if (1 < param_1) {
iVar4 = 2;
do {
iVar3 = iVar4 * iVar4;
if (iVar3 <= param_1) {
if (param_1 == iVar3 * 4) {
return 1;
}
iVar2 = 2;
iVar1 = iV... |
751 | func0 |
#include <iostream>
#include <assert.h>
| bool func0(int n) {
for (int i = 2; i < (n + 1); ++i) {
if (i * i < (n + 1)) {
for (int j = 2; j < n + 1; ++j) {
if ((i * i * j * j) == n) {
return true;
}
}
}
}
return false;
}
| int main() {
assert(func0(25) == false);
assert(func0(30) == false);
assert(func0(16) == true);
return 0;
}
| O3 | cpp | func0(int):
endbr64
cmp $0x1,%edi
jle 12f8 <_Z5func0i+0x58>
mov $0x2,%ecx
jmp 12b7 <_Z5func0i+0x17>
add $0x1,%ecx
cmp %ecx,%edi
jl 12f8 <_Z5func0i+0x58>
mov %ecx,%esi
imul %ecx,%esi
cmp %edi,%esi
jg 12b0 <_Z5func0i+0x10>
lea 0x0(,%rsi,4),%eax
cmp %eax,%edi
je 12ed <_Z5func0i+... | _Z5func0i:
endbr64
cmp edi, 1
jle short loc_1198
mov esi, 2
jmp short loc_1157
loc_1150:
add esi, 1
cmp edi, esi
jl short loc_1198
loc_1157:
mov ecx, esi
imul ecx, esi
cmp ecx, edi
jg short loc_1150
lea eax, ds:0[rcx*4]
cmp edi, eax
jz short loc_118D
lea edx... | long long func0(int a1)
{
int i; // esi
int v2; // ecx
int v3; // edx
int v4; // eax
int v5; // r8d
if ( a1 > 1 )
{
for ( i = 2; a1 >= i; ++i )
{
v2 = i * i;
if ( i * i <= a1 )
{
if ( a1 == 4 * v2 )
return 1LL;
v3 = 3 * v2;
v4 = 2;
whil... | func0:
ENDBR64
CMP EDI,0x1
JLE 0x00101198
MOV ESI,0x2
JMP 0x00101157
LAB_00101150:
ADD ESI,0x1
CMP EDI,ESI
JL 0x00101198
LAB_00101157:
MOV ECX,ESI
IMUL ECX,ESI
CMP ECX,EDI
JG 0x00101150
LEA EAX,[RCX*0x4]
CMP EDI,EAX
JZ 0x0010118d
LEA EDX,[RCX + RCX*0x2]
MOV EAX,0x2
NOP dword ptr [RAX + RAX*0x1]
LAB_00101178:
ADD EAX,0x... | /* func0(int) */
int8 func0(int param_1)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
if (1 < param_1) {
iVar4 = 2;
do {
iVar3 = iVar4 * iVar4;
if (iVar3 <= param_1) {
if (param_1 == iVar3 * 4) {
return 1;
}
iVar2 = 2;
iVar1 = iV... |
752 | func0 |
#include <iostream>
#include <vector>
#include <assert.h>
| int func0(std::vector<int>& arr, int n) {
int ptr = 0;
for (int i = 0; i < n; i++) {
if (arr[i] == 1) {
ptr = 1;
break;
}
}
if (ptr == 0) {
return 1;
}
for (int i = 0; i < n; i++) {
if (arr[i] <= 0 || arr[i] > n) {
... | int main() {
std::vector<int> arr1 = {1, 2, 3, -1, 5};
std::vector<int> arr2 = {0, -1, -2, 1, 5, 8};
std::vector<int> arr3 = {0, 1, 2, 5, -8};
assert(func0(arr1, 5) == 4);
assert(func0(arr2, 6) == 2);
assert(func0(arr3, 5) == 3);
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> >&, int):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x30,%rsp
mov %rdi,-0x28(%rbp)
mov %esi,-0x2c(%rbp)
movl $0x0,-0x14(%rbp)
movl $0x0,-0x10(%rbp)
mov -0x10(%rbp),%eax
cmp -0x2c(%rbp),%eax
jge 12c2 <_Z5func0RSt6vectorIiSaIiEEi+0x59>
mov -0x10(%rbp),%e... | _Z5func0RSt6vectorIiSaIiEEi:
endbr64
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_28], rdi
mov [rbp+var_2C], esi
mov [rbp+var_14], 0
mov [rbp+var_10], 0
jmp short loc_129A
loc_126C:
mov eax, [rbp+var_10]
movsxd rdx, eax
mov rax, [rbp+var_28]
mov rsi, rdx
mov rdi, rax
c... | long long func0(long long a1, int a2)
{
_DWORD *v4; // rax
_DWORD *v5; // rax
int v6; // [rsp+1Ch] [rbp-14h]
int i; // [rsp+20h] [rbp-10h]
int j; // [rsp+24h] [rbp-Ch]
int k; // [rsp+28h] [rbp-8h]
int m; // [rsp+2Ch] [rbp-4h]
v6 = 0;
for ( i = 0; i < a2; ++i )
{
if ( *(_DWORD *)std::vector<int... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x28],RDI
MOV dword ptr [RBP + -0x2c],ESI
MOV dword ptr [RBP + -0x14],0x0
MOV dword ptr [RBP + -0x10],0x0
JMP 0x0010129a
LAB_0010126c:
MOV EAX,dword ptr [RBP + -0x10]
MOVSXD RDX,EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RSI,RDX
MOV RDI,RAX
CALL 0x0010... | /* func0(std::vector<int, std::allocator<int> >&, int) */
int func0(vector *param_1,int param_2)
{
bool bVar1;
int iVar2;
int4 *puVar3;
int *piVar4;
int local_18;
int local_14;
int local_10;
int local_c;
bVar1 = false;
local_18 = 0;
do {
if (param_2 <= local_18) {
LAB_001012a2:
if (... |
753 | func0 |
#include <iostream>
#include <vector>
#include <assert.h>
| int func0(std::vector<int>& arr, int n) {
int ptr = 0;
for (int i = 0; i < n; i++) {
if (arr[i] == 1) {
ptr = 1;
break;
}
}
if (ptr == 0) {
return 1;
}
for (int i = 0; i < n; i++) {
if (arr[i] <= 0 || arr[i] > n) {
... | int main() {
std::vector<int> arr1 = {1, 2, 3, -1, 5};
std::vector<int> arr2 = {0, -1, -2, 1, 5, 8};
std::vector<int> arr3 = {0, 1, 2, 5, -8};
assert(func0(arr1, 5) == 4);
assert(func0(arr2, 6) == 2);
assert(func0(arr3, 5) == 3);
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> >&, int):
endbr64
test %esi,%esi
jle 12ec <_Z5func0RSt6vectorIiSaIiEEi+0xa3>
mov (%rdi),%rax
lea -0x1(%rsi),%r9d
lea 0x4(%rax,%r9,4),%rdx
cmpl $0x1,(%rax)
je 1275 <_Z5func0RSt6vectorIiSaIiEEi+0x2c>
add $0x4,%rax
cmp %rdx,%rax
jne 1261 <_Z5func0RSt6... | _Z5func0RSt6vectorIiSaIiEEi:
endbr64
mov r8, rdi
mov ecx, esi
test esi, esi
jle loc_12A6
mov rax, [rdi]
movsxd r9, esi
lea r10, ds:0[r9*4]
lea rdx, [rax+r10]
loc_122C:
cmp dword ptr [rax], 1
jz short loc_1240
add rax, 4
cmp rax, rdx
jnz short loc_122C
mov eax, 1
retn... | long long func0(_DWORD **a1, int a2)
{
_DWORD *v3; // rax
long long v4; // r9
long long v5; // r10
unsigned long long v7; // rax
int *v8; // rdx
unsigned long long v9; // rsi
long long v10; // rdx
long long v11; // rax
if ( a2 <= 0 )
return 1LL;
v3 = *a1;
v4 = a2;
v5 = 4LL * a2;
while ( ... | func0:
ENDBR64
MOV R8,RDI
MOV ECX,ESI
TEST ESI,ESI
JLE 0x001012a6
MOV RAX,qword ptr [RDI]
MOVSXD R9,ESI
LEA R10,[R9*0x4]
LEA RDX,[RAX + R10*0x1]
LAB_0010122c:
CMP dword ptr [RAX],0x1
JZ 0x00101240
ADD RAX,0x4
CMP RAX,RDX
JNZ 0x0010122c
MOV EAX,0x1
RET
LAB_00101240:
MOV EAX,0x0
JMP 0x00101256
LAB_00101247:
MOV dword ptr... | /* func0(std::vector<int, std::allocator<int> >&, int) */
int func0(vector *param_1,int param_2)
{
int *piVar1;
int iVar2;
int *piVar3;
long lVar4;
long lVar5;
if (param_2 < 1) {
return 1;
}
piVar3 = *(int **)param_1;
lVar5 = (long)param_2;
piVar1 = piVar3 + lVar5;
do {
if (*piVar3 ==... |
754 | func0 |
#include <iostream>
#include <vector>
#include <assert.h>
| int func0(std::vector<int>& arr, int n) {
int ptr = 0;
for (int i = 0; i < n; i++) {
if (arr[i] == 1) {
ptr = 1;
break;
}
}
if (ptr == 0) {
return 1;
}
for (int i = 0; i < n; i++) {
if (arr[i] <= 0 || arr[i] > n) {
... | int main() {
std::vector<int> arr1 = {1, 2, 3, -1, 5};
std::vector<int> arr2 = {0, -1, -2, 1, 5, 8};
std::vector<int> arr3 = {0, 1, 2, 5, -8};
assert(func0(arr1, 5) == 4);
assert(func0(arr2, 6) == 2);
assert(func0(arr3, 5) == 3);
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> >&, int):
endbr64
test %esi,%esi
jle 1560 <_Z5func0RSt6vectorIiSaIiEEi+0xa0>
mov (%rdi),%rdi
lea -0x1(%rsi),%r9d
mov %rdi,%rcx
lea 0x4(%rdi,%r9,4),%r8
mov %rdi,%rax
jmp 14e9 <_Z5func0RSt6vectorIiSaIiEEi+0x29>
add $0x4,%rax
cmp %rax,%r8
je 1560 ... | _Z5func0RSt6vectorIiSaIiEEi:
endbr64
mov ecx, esi
test esi, esi
jle loc_1488
mov rdi, [rdi]
movsxd r9, ecx
mov rsi, rdi
lea r8, [rdi+r9*4]
mov rax, rdi
jmp short loc_1419
loc_1410:
add rax, 4
cmp r8, rax
jz short loc_1488
loc_1419:
cmp dword ptr [rax], 1
jnz short lo... | long long func0(int **a1, int a2)
{
int *v3; // rdi
int *v4; // rsi
int *v5; // r8
int *v6; // rax
int *v7; // rax
int v8; // eax
long long result; // rax
if ( a2 <= 0 )
return 1LL;
v3 = *a1;
v4 = v3;
v5 = &v3[a2];
v6 = v3;
while ( *v6 != 1 )
{
if ( v5 == ++v6 )
return 1LL;
... | func0:
ENDBR64
MOV ECX,ESI
TEST ESI,ESI
JLE 0x00101488
MOV RDI,qword ptr [RDI]
MOVSXD R9,ECX
MOV RSI,RDI
LEA R8,[RDI + R9*0x4]
MOV RAX,RDI
JMP 0x00101419
LAB_00101410:
ADD RAX,0x4
CMP R8,RAX
JZ 0x00101488
LAB_00101419:
CMP dword ptr [RAX],0x1
JNZ 0x00101410
MOV RAX,RDI
NOP dword ptr [RAX]
LAB_00101428:
MOV EDX,dword pt... | /* func0(std::vector<int, std::allocator<int> >&, int) */
ulong func0(vector *param_1,int param_2)
{
int *piVar1;
int iVar2;
int *piVar3;
int *piVar4;
int *piVar5;
ulong uVar6;
bool bVar7;
if (0 < param_2) {
piVar3 = *(int **)param_1;
piVar1 = piVar3 + param_2;
piVar4 = piVar3;
do {... |
755 | func0 |
#include <iostream>
#include <vector>
#include <assert.h>
| int func0(std::vector<int>& arr, int n) {
int ptr = 0;
for (int i = 0; i < n; i++) {
if (arr[i] == 1) {
ptr = 1;
break;
}
}
if (ptr == 0) {
return 1;
}
for (int i = 0; i < n; i++) {
if (arr[i] <= 0 || arr[i] > n) {
... | int main() {
std::vector<int> arr1 = {1, 2, 3, -1, 5};
std::vector<int> arr2 = {0, -1, -2, 1, 5, 8};
std::vector<int> arr3 = {0, 1, 2, 5, -8};
assert(func0(arr1, 5) == 4);
assert(func0(arr2, 6) == 2);
assert(func0(arr3, 5) == 3);
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> >&, int):
endbr64
test %esi,%esi
jle 1530 <_Z5func0RSt6vectorIiSaIiEEi+0xa0>
mov (%rdi),%rdi
lea -0x1(%rsi),%r9d
mov %rdi,%rcx
lea 0x4(%rdi,%r9,4),%r8
mov %rdi,%rax
jmp 14b9 <_Z5func0RSt6vectorIiSaIiEEi+0x29>
add $0x4,%rax
cmp %rax,%r8
je 1530 ... | _Z5func0RSt6vectorIiSaIiEEi:
endbr64
mov ecx, esi
test esi, esi
jle loc_1488
mov rdi, [rdi]
movsxd r9, ecx
mov rsi, rdi
lea r8, [rdi+r9*4]
mov rax, rdi
jmp short loc_1419
loc_1410:
add rax, 4
cmp r8, rax
jz short loc_1488
loc_1419:
cmp dword ptr [rax], 1
jnz short lo... | long long func0(int **a1, int a2)
{
int *v3; // rdi
int *v4; // rsi
int *v5; // r8
int *v6; // rax
int *v7; // rax
int v8; // eax
long long result; // rax
if ( a2 <= 0 )
return 1LL;
v3 = *a1;
v4 = v3;
v5 = &v3[a2];
v6 = v3;
while ( *v6 != 1 )
{
if ( v5 == ++v6 )
return 1LL;
... | func0:
ENDBR64
MOV ECX,ESI
TEST ESI,ESI
JLE 0x00101488
MOV RDI,qword ptr [RDI]
MOVSXD R9,ECX
MOV RSI,RDI
LEA R8,[RDI + R9*0x4]
MOV RAX,RDI
JMP 0x00101419
LAB_00101410:
ADD RAX,0x4
CMP R8,RAX
JZ 0x00101488
LAB_00101419:
CMP dword ptr [RAX],0x1
JNZ 0x00101410
MOV RAX,RDI
NOP dword ptr [RAX]
LAB_00101428:
MOV EDX,dword pt... | /* func0(std::vector<int, std::allocator<int> >&, int) */
ulong func0(vector *param_1,int param_2)
{
int *piVar1;
int iVar2;
int *piVar3;
int *piVar4;
int *piVar5;
ulong uVar6;
bool bVar7;
if (0 < param_2) {
piVar3 = *(int **)param_1;
piVar1 = piVar3 + param_2;
piVar4 = piVar3;
do {... |
756 | func0 | #include <assert.h>
| int func0(int x1, int y1, int x2, int y2) {
return ((y2 - y1 - 1) * (x2 - x1 - 1));
}
| int main() {
assert(func0(1,1,4,4) == 4);
assert(func0(1,2,1,2) == 1);
assert(func0(4,2,6,4) == 1);
return 0;
}
| O0 | cpp | func0(int, int, int, int):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x4(%rbp)
mov %esi,-0x8(%rbp)
mov %edx,-0xc(%rbp)
mov %ecx,-0x10(%rbp)
mov -0x10(%rbp),%eax
sub -0x8(%rbp),%eax
lea -0x1(%rax),%edx
mov -0xc(%rbp),%eax
sub -0x4(%rbp),%eax
sub $0x1,%eax
imul %edx,%eax
pop %rbp
r... | _Z5func0iiii:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_4], edi
mov [rbp+var_8], esi
mov [rbp+var_C], edx
mov [rbp+var_10], ecx
mov eax, [rbp+var_10]
sub eax, [rbp+var_8]
lea edx, [rax-1]
mov eax, [rbp+var_C]
sub eax, [rbp+var_4]
sub eax, 1
imul eax, edx
pop rbp
re... | long long func0(int a1, int a2, int a3, int a4)
{
return (unsigned int)((a4 - a2 - 1) * (a3 - a1 - 1));
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x4],EDI
MOV dword ptr [RBP + -0x8],ESI
MOV dword ptr [RBP + -0xc],EDX
MOV dword ptr [RBP + -0x10],ECX
MOV EAX,dword ptr [RBP + -0x10]
SUB EAX,dword ptr [RBP + -0x8]
LEA EDX,[RAX + -0x1]
MOV EAX,dword ptr [RBP + -0xc]
SUB EAX,dword ptr [RBP + -0x4]
SUB EAX,0x1
I... | /* func0(int, int, int, int) */
int func0(int param_1,int param_2,int param_3,int param_4)
{
return ((param_3 - param_1) + -1) * ((param_4 - param_2) + -1);
} |
757 | func0 | #include <assert.h>
| int func0(int x1, int y1, int x2, int y2) {
return ((y2 - y1 - 1) * (x2 - x1 - 1));
}
| int main() {
assert(func0(1,1,4,4) == 4);
assert(func0(1,2,1,2) == 1);
assert(func0(4,2,6,4) == 1);
return 0;
}
| O1 | cpp | func0(int, int, int, int):
endbr64
sub %esi,%ecx
lea -0x1(%rcx),%eax
sub %edi,%edx
lea -0x1(%rdx),%ecx
imul %ecx,%eax
retq
| _Z5func0iiii:
endbr64
sub ecx, esi
lea eax, [rcx-1]
sub edx, edi
sub edx, 1
imul eax, edx
retn | long long func0(int a1, int a2, int a3, int a4)
{
return (unsigned int)((a3 - a1 - 1) * (a4 - a2 - 1));
} | func0:
ENDBR64
SUB ECX,ESI
LEA EAX,[RCX + -0x1]
SUB EDX,EDI
SUB EDX,0x1
IMUL EAX,EDX
RET | /* func0(int, int, int, int) */
int func0(int param_1,int param_2,int param_3,int param_4)
{
return ((param_4 - param_2) + -1) * ((param_3 - param_1) + -1);
} |
758 | func0 | #include <assert.h>
| int func0(int x1, int y1, int x2, int y2) {
return ((y2 - y1 - 1) * (x2 - x1 - 1));
}
| int main() {
assert(func0(1,1,4,4) == 4);
assert(func0(1,2,1,2) == 1);
assert(func0(4,2,6,4) == 1);
return 0;
}
| O2 | cpp | func0(int, int, int, int):
endbr64
sub %esi,%ecx
sub %edi,%edx
lea -0x1(%rcx),%eax
lea -0x1(%rdx),%ecx
imul %ecx,%eax
retq
nopw %cs:0x0(%rax,%rax,1)
nopl 0x0(%rax)
| _Z5func0iiii:
endbr64
sub ecx, esi
sub edx, edi
lea eax, [rcx-1]
sub edx, 1
imul eax, edx
retn | long long func0(int a1, int a2, int a3, int a4)
{
return (unsigned int)((a3 - a1 - 1) * (a4 - a2 - 1));
} | func0:
ENDBR64
SUB ECX,ESI
SUB EDX,EDI
LEA EAX,[RCX + -0x1]
SUB EDX,0x1
IMUL EAX,EDX
RET | /* func0(int, int, int, int) */
int func0(int param_1,int param_2,int param_3,int param_4)
{
return ((param_4 - param_2) + -1) * ((param_3 - param_1) + -1);
} |
759 | func0 | #include <assert.h>
| int func0(int x1, int y1, int x2, int y2) {
return ((y2 - y1 - 1) * (x2 - x1 - 1));
}
| int main() {
assert(func0(1,1,4,4) == 4);
assert(func0(1,2,1,2) == 1);
assert(func0(4,2,6,4) == 1);
return 0;
}
| O3 | cpp | func0(int, int, int, int):
endbr64
sub %esi,%ecx
sub %edi,%edx
lea -0x1(%rcx),%eax
lea -0x1(%rdx),%ecx
imul %ecx,%eax
retq
nopw %cs:0x0(%rax,%rax,1)
nopl 0x0(%rax)
| _Z5func0iiii:
endbr64
sub ecx, esi
sub edx, edi
lea eax, [rcx-1]
sub edx, 1
imul eax, edx
retn | long long func0(int a1, int a2, int a3, int a4)
{
return (unsigned int)((a3 - a1 - 1) * (a4 - a2 - 1));
} | func0:
ENDBR64
SUB ECX,ESI
SUB EDX,EDI
LEA EAX,[RCX + -0x1]
SUB EDX,0x1
IMUL EAX,EDX
RET | /* func0(int, int, int, int) */
int func0(int param_1,int param_2,int param_3,int param_4)
{
return ((param_4 - param_2) + -1) * ((param_3 - param_1) + -1);
} |
760 | func0 |
#include <string>
#include <assert.h>
| bool func0(std::string monthname3) {
if (monthname3 == "April" || monthname3 == "June" || monthname3 == "September" || monthname3 == "November") {
return true;
} else {
return false;
}
}
| int main() {
assert(func0("February") == false);
assert(func0("June") == true);
assert(func0("April") == true);
return 0;
}
| O0 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x10,%rsp
mov %rdi,-0x8(%rbp)
mov -0x8(%rbp),%rax
lea 0xc24(%rip),%rsi
mov %rax,%rdi
callq 173b <_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_>... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
lea rdx, aApril; "April"
mov rsi, rdx
mov rdi, rax
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::... | _BOOL8 func0(long long a1)
{
return (unsigned __int8)std::operator==<char>(a1, "April")
|| (unsigned __int8)std::operator==<char>(a1, "June")
|| (unsigned __int8)std::operator==<char>(a1, "September")
|| (unsigned __int8)std::operator==<char>(a1, "November");
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
LEA RDX,[0x102008]
MOV RSI,RDX
MOV RDI,RAX
CALL 0x0010184c
TEST AL,AL
JNZ 0x001013e1
MOV RAX,qword ptr [RBP + -0x8]
LEA RDX,[0x10200e]
MOV RSI,RDX
MOV RDI,RAX
CALL 0x0010184c
TEST AL,AL
JNZ 0x001013e1
MOV RAX,... | /* func0(std::string) */
int func0(string *param_1)
{
int uVar1;
bool bVar2;
bVar2 = std::operator==(param_1,"April");
if ((((bVar2) || (bVar2 = std::operator==(param_1,"June"), bVar2)) ||
(bVar2 = std::operator==(param_1,"September"), bVar2)) ||
(bVar2 = std::operator==(param_1,"November"), bVa... |
761 | func0 |
#include <string>
#include <assert.h>
| bool func0(std::string monthname3) {
if (monthname3 == "April" || monthname3 == "June" || monthname3 == "September" || monthname3 == "November") {
return true;
} else {
return false;
}
}
| int main() {
assert(func0("February") == false);
assert(func0("June") == true);
assert(func0("April") == true);
return 0;
}
| O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %rbx
mov %rdi,%rbx
lea 0xdec(%rip),%rsi
callq 10b0 <_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc@plt>
mov %eax,%edx
mov $0x1,%eax
test %edx,%edx
jne 122a <_Z5func0NSt7__cxx1112b... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
sub rsp, 8
mov rax, [rdi+8]
cmp rax, 5
jz short loc_1254
cmp rax, 4
jz short loc_1272
cmp rax, 9
jz short loc_128D
cmp rax, 8
jz short loc_12A8
mov eax, 0
jmp short loc_126D
loc_1254:
mov rdi, [... | bool func0(long long a1)
{
long long v1; // rax
v1 = *(_QWORD *)(a1 + 8);
switch ( v1 )
{
case 5LL:
return memcmp(*(const void **)a1, "April", 5uLL) == 0;
case 4LL:
return memcmp(*(const void **)a1, "June", 4uLL) == 0;
case 9LL:
return memcmp(*(const void **)a1, "September", 9uLL... | func0:
ENDBR64
SUB RSP,0x8
MOV RAX,qword ptr [RDI + 0x8]
CMP RAX,0x5
JZ 0x00101254
CMP RAX,0x4
JZ 0x00101272
CMP RAX,0x9
JZ 0x0010128d
CMP RAX,0x8
JZ 0x001012a8
MOV EAX,0x0
JMP 0x0010126d
LAB_00101254:
MOV RDI,qword ptr [RDI]
MOV EDX,0x5
LEA RSI,[0x102004]
CALL 0x001010d0
TEST EAX,EAX
SETZ AL
LAB_0010126d:
ADD RSP,0x8
... | /* func0(std::string) */
int8 func0(int8 *param_1)
{
long lVar1;
int iVar2;
int8 uVar3;
int4 extraout_var;
int4 extraout_var_00;
int4 extraout_var_01;
int4 extraout_var_02;
lVar1 = param_1[1];
if (lVar1 == 5) {
iVar2 = memcmp((void *)*param_1,"April",5);
uVar3 = CONCAT71((int7)(CONCAT44(e... |
762 | func0 |
#include <string>
#include <assert.h>
| bool func0(std::string monthname3) {
if (monthname3 == "April" || monthname3 == "June" || monthname3 == "September" || monthname3 == "November") {
return true;
} else {
return false;
}
}
| int main() {
assert(func0("February") == false);
assert(func0("June") == true);
assert(func0("April") == true);
return 0;
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %rbp
lea 0xc88(%rip),%rsi
mov %rdi,%rbp
callq 10c0 <_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc@plt>
test %eax,%eax
jne 1390 <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaI... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
mov rax, [rdi+8]
cmp rax, 5
jz short loc_1370
cmp rax, 4
jnz short loc_1348
mov rax, [rdi]
cmp dword ptr [rax], 656E754Ah
setz al
retn
loc_1348:
cmp rax, 9
jnz short loc_1398
mov rdx, 65626D6574706553h
mov ... | bool func0(_QWORD *a1)
{
long long v1; // rax
int v3; // eax
v1 = a1[1];
switch ( v1 )
{
case 5LL:
if ( *(_DWORD *)*a1 == 1769107521 && *(_BYTE *)(*a1 + 4LL) == 108 )
{
v3 = 0;
return v3 == 0;
}
LABEL_6:
v3 = 1;
return v3 == 0;
case 4LL:
return *(_... | func0:
ENDBR64
MOV RAX,qword ptr [RDI + 0x8]
CMP RAX,0x5
JZ 0x00101370
CMP RAX,0x4
JNZ 0x00101348
MOV RAX,qword ptr [RDI]
CMP dword ptr [RAX],0x656e754a
SETZ AL
RET
LAB_00101348:
CMP RAX,0x9
JNZ 0x00101398
MOV RDX,0x65626d6574706553
MOV RAX,qword ptr [RDI]
CMP qword ptr [RAX],RDX
JZ 0x00101388
LAB_00101360:
MOV EAX,0x1... | /* func0(std::string) */
ulong func0(long *param_1)
{
long lVar1;
bool bVar2;
lVar1 = param_1[1];
if (lVar1 == 5) {
if ((*(int *)*param_1 == 0x69727041) && (*(char *)((int *)*param_1 + 1) == 'l')) {
bVar2 = false;
goto LAB_00101365;
}
}
else {
if (lVar1 == 4) {
return CONC... |
763 | func0 |
#include <string>
#include <assert.h>
| bool func0(std::string monthname3) {
if (monthname3 == "April" || monthname3 == "June" || monthname3 == "September" || monthname3 == "November") {
return true;
} else {
return false;
}
}
| int main() {
assert(func0("February") == false);
assert(func0("June") == true);
assert(func0("April") == true);
return 0;
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %rbp
lea 0xc88(%rip),%rsi
mov %rdi,%rbp
callq 10c0 <_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc@plt>
test %eax,%eax
jne 1390 <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaI... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
mov rax, [rdi+8]
cmp rax, 5
jz short loc_1370
cmp rax, 4
jnz short loc_1348
mov rax, [rdi]
cmp dword ptr [rax], 656E754Ah
setz al
retn
loc_1348:
cmp rax, 9
jnz short loc_1398
mov rdx, 65626D6574706553h
mov ... | bool func0(_QWORD *a1)
{
long long v1; // rax
int v3; // eax
v1 = a1[1];
switch ( v1 )
{
case 5LL:
if ( *(_DWORD *)*a1 == 1769107521 && *(_BYTE *)(*a1 + 4LL) == 108 )
{
v3 = 0;
return v3 == 0;
}
LABEL_6:
v3 = 1;
return v3 == 0;
case 4LL:
return *(_... | func0:
ENDBR64
MOV RAX,qword ptr [RDI + 0x8]
CMP RAX,0x5
JZ 0x00101370
CMP RAX,0x4
JNZ 0x00101348
MOV RAX,qword ptr [RDI]
CMP dword ptr [RAX],0x656e754a
SETZ AL
RET
LAB_00101348:
CMP RAX,0x9
JNZ 0x00101398
MOV RDX,0x65626d6574706553
MOV RAX,qword ptr [RDI]
CMP qword ptr [RAX],RDX
JZ 0x00101388
LAB_00101360:
MOV EAX,0x1... | /* func0(std::string) */
ulong func0(long *param_1)
{
long lVar1;
bool bVar2;
lVar1 = param_1[1];
if (lVar1 == 5) {
if ((*(int *)*param_1 == 0x69727041) && (*(char *)((int *)*param_1 + 1) == 'l')) {
bVar2 = false;
goto LAB_00101365;
}
}
else {
if (lVar1 == 4) {
return CONC... |
764 | func0 |
#include <string>
#include <cctype>
#include <cassert>
| bool func0(std::string str) {
bool flag_l = false;
bool flag_n = false;
for (char i : str) {
if (isalpha(i)) {
flag_l = true;
}
if (isdigit(i)) {
flag_n = true;
}
}
return flag_l && flag_n;
}
| int main() {
assert(func0("thishasboth29") == true);
assert(func0("python") == false);
assert(func0("string") == false);
return 0;
}
| O0 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x40,%rsp
mov %rdi,-0x38(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x8(%rbp)
xor %eax,%eax
movb $0x0,-0x23(%rbp)
movb $0x0,-0x22(%rbp)
mov -0x38(%rbp),%rax
mov %rax,-0x10(%r... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_38], rdi
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
mov [rbp+var_23], 0
mov [rbp+var_22], 0
mov rax, [rbp+var_38]
mov [rbp+var_10], rax
mov rax, [rb... | _BOOL8 func0(long long a1)
{
char v2; // [rsp+1Dh] [rbp-23h]
char v3; // [rsp+1Eh] [rbp-22h]
char v4; // [rsp+1Fh] [rbp-21h]
long long v5; // [rsp+20h] [rbp-20h] BYREF
_QWORD v6[3]; // [rsp+28h] [rbp-18h] BYREF
v6[2] = __readfsqword(0x28u);
v2 = 0;
v3 = 0;
v6[1] = a1;
v5 = std::string::begin(a1);
... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x38],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
MOV byte ptr [RBP + -0x23],0x0
MOV byte ptr [RBP + -0x22],0x0
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,RA... | /* func0(std::string) */
int8 func0(int8 param_1)
{
char cVar1;
bool bVar2;
bool bVar3;
bool bVar4;
int iVar5;
char *pcVar6;
int8 uVar7;
long in_FS_OFFSET;
int8 local_28;
int8 local_20;
int8 local_18;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
bVar2 = false;
bVar3 = fal... |
765 | func0 |
#include <string>
#include <cctype>
#include <cassert>
| bool func0(std::string str) {
bool flag_l = false;
bool flag_n = false;
for (char i : str) {
if (isalpha(i)) {
flag_l = true;
}
if (isdigit(i)) {
flag_n = true;
}
}
return flag_l && flag_n;
}
| int main() {
assert(func0("thishasboth29") == true);
assert(func0("python") == false);
assert(func0("string") == false);
return 0;
}
| O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x8,%rsp
mov (%rdi),%rbp
mov %rbp,%r15
add 0x8(%rdi),%r15
cmp %rbp,%r15
je 1279 <_Z5func0NSt7__cxx1112basic_stringIcSt11char_tra... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 8
mov rbp, [rdi]
mov r15, rbp
add r15, [rdi+8]
cmp r15, rbp
jz short loc_1299
mov r13d, 0
mov r12d, 0
mov r14d, 1
loc_125C:
movzx ... | long long func0(char **a1)
{
char *v1; // rbp
char *v2; // r15
int v3; // r13d
int v4; // r12d
char v5; // bl
v1 = *a1;
v2 = &(*a1)[(_QWORD)a1[1]];
if ( v2 == *a1 )
{
v3 = 0;
v4 = 0;
}
else
{
v3 = 0;
v4 = 0;
do
{
v5 = *v1;
if ( isalpha(*v1) )
v4 = 1;... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV RBP,qword ptr [RDI]
MOV R15,RBP
ADD R15,qword ptr [RDI + 0x8]
CMP R15,RBP
JZ 0x00101299
MOV R13D,0x0
MOV R12D,0x0
MOV R14D,0x1
LAB_0010125c:
MOVZX EBX,byte ptr [RBP]
MOVSX EDI,BL
CALL 0x00101120
TEST EAX,EAX
CMOVNZ R12D,R14D
MOVSX EBX,... | /* func0(std::string) */
uint func0(int8 *param_1)
{
char cVar1;
int iVar2;
char *pcVar3;
uint uVar4;
uint uVar5;
char *pcVar6;
pcVar3 = (char *)*param_1;
pcVar6 = pcVar3 + param_1[1];
if (pcVar6 == pcVar3) {
uVar5 = 0;
uVar4 = 0;
}
else {
uVar5 = 0;
uVar4 = 0;
do {
... |
766 | func0 |
#include <string>
#include <cctype>
#include <cassert>
| bool func0(std::string str) {
bool flag_l = false;
bool flag_n = false;
for (char i : str) {
if (isalpha(i)) {
flag_l = true;
}
if (isdigit(i)) {
flag_n = true;
}
}
return flag_l && flag_n;
}
| int main() {
assert(func0("thishasboth29") == true);
assert(func0("python") == false);
assert(func0("string") == false);
return 0;
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x8,%rsp
mov (%rdi),%rbp
mov 0x8(%rdi),%r13
add %rbp,%r13
cmp %rbp,%r13
je 13e0 <_Z5func0NSt7__cxx1112basic_stringIcSt11char_tra... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 8
mov rbp, [rdi]
mov r13, [rdi+8]
add r13, rbp
cmp r13, rbp
jz short loc_13C0
xor r14d, r14d
xor r12d, r12d
mov r15d, 1
nop dwor... | long long func0(char **a1)
{
char *v1; // rbp
char *v2; // r13
int v3; // r14d
int v4; // r12d
int v5; // ebx
v1 = *a1;
v2 = &a1[1][(_QWORD)*a1];
if ( v2 == *a1 )
return 0LL;
v3 = 0;
v4 = 0;
do
{
v5 = *v1;
if ( isalpha(v5) )
v4 = 1;
if ( (unsigned int)(v5 - 48) <= 9 )
... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV RBP,qword ptr [RDI]
MOV R13,qword ptr [RDI + 0x8]
ADD R13,RBP
CMP R13,RBP
JZ 0x001013c0
XOR R14D,R14D
XOR R12D,R12D
MOV R15D,0x1
NOP dword ptr [RAX]
LAB_00101380:
MOVSX EBX,byte ptr [RBP]
MOV EDI,EBX
CALL 0x00101120
TEST EAX,EAX
CMOVNZ... | /* func0(std::string) */
uint func0(int8 *param_1)
{
char cVar1;
int iVar2;
char *pcVar3;
uint uVar4;
char *pcVar5;
uint uVar6;
pcVar3 = (char *)*param_1;
pcVar5 = pcVar3 + param_1[1];
if (pcVar5 != pcVar3) {
uVar6 = 0;
uVar4 = 0;
do {
cVar1 = *pcVar3;
iVar2 = isalpha((int... |
767 | func0 |
#include <string>
#include <cctype>
#include <cassert>
| bool func0(std::string str) {
bool flag_l = false;
bool flag_n = false;
for (char i : str) {
if (isalpha(i)) {
flag_l = true;
}
if (isdigit(i)) {
flag_n = true;
}
}
return flag_l && flag_n;
}
| int main() {
assert(func0("thishasboth29") == true);
assert(func0("python") == false);
assert(func0("string") == false);
return 0;
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x8,%rsp
mov (%rdi),%rbp
mov 0x8(%rdi),%r13
add %rbp,%r13
cmp %rbp,%r13
je 13e0 <_Z5func0NSt7__cxx1112basic_stringIcSt11char_tra... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 8
mov rbp, [rdi]
mov r13, [rdi+8]
add r13, rbp
cmp r13, rbp
jz short loc_13C0
xor r14d, r14d
xor r12d, r12d
mov r15d, 1
nop dwor... | long long func0(char **a1)
{
char *v1; // rbp
char *v2; // r13
int v3; // r14d
int v4; // r12d
int v5; // ebx
v1 = *a1;
v2 = &a1[1][(_QWORD)*a1];
if ( v2 == *a1 )
return 0LL;
v3 = 0;
v4 = 0;
do
{
v5 = *v1;
if ( isalpha(v5) )
v4 = 1;
if ( (unsigned int)(v5 - 48) <= 9 )
... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV RBP,qword ptr [RDI]
MOV R13,qword ptr [RDI + 0x8]
ADD R13,RBP
CMP R13,RBP
JZ 0x001013c0
XOR R14D,R14D
XOR R12D,R12D
MOV R15D,0x1
NOP dword ptr [RAX]
LAB_00101380:
MOVSX EBX,byte ptr [RBP]
MOV EDI,EBX
CALL 0x00101120
TEST EAX,EAX
CMOVNZ... | /* func0(std::string) */
uint func0(int8 *param_1)
{
char cVar1;
int iVar2;
char *pcVar3;
uint uVar4;
char *pcVar5;
uint uVar6;
pcVar3 = (char *)*param_1;
pcVar5 = pcVar3 + param_1[1];
if (pcVar5 != pcVar3) {
uVar6 = 0;
uVar4 = 0;
do {
cVar1 = *pcVar3;
iVar2 = isalpha((int... |
768 | func0 |
#include <iostream>
#include <vector>
#include <algorithm>
#include <set>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& test_vec) {
std::set<int> unique_elements(test_vec.begin(), test_vec.end());
std::vector<int> res(unique_elements.begin(), unique_elements.end());
return res;
}
| int main() {
assert((func0({1, 3, 5, 2, 3, 5, 1, 1, 3}) == std::vector<int>{1, 2, 3, 5}));
assert((func0({2, 3, 4, 4, 5, 6, 6, 7, 8, 8}) == std::vector<int>{2, 3, 4, 5, 6, 7, 8}));
assert((func0({11, 12, 13, 11, 11, 12, 14, 13}) == std::vector<int>{11, 12, 13, 14}));
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x68,%rsp
mov %rdi,-0x68(%rbp)
mov %rsi,-0x70(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x70(%rbp),%rax
mov %rax,%rdi
callq 1c66 <_ZNKSt6vectorIiSaIiEE3endEv>
mov ... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 68h
mov [rbp+var_68], rdi
mov [rbp+var_70], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_70]
mov rdi, rax
call _ZNKSt6vectorIiSaIiEE3endEv; std::vector<int>::end(void)
mo... | long long func0(long long a1, long long a2)
{
long long v2; // rbx
long long v3; // rax
long long v4; // rbx
long long v5; // rax
char v7; // [rsp+17h] [rbp-59h] BYREF
char *v8; // [rsp+18h] [rbp-58h]
_BYTE v9[56]; // [rsp+20h] [rbp-50h] BYREF
unsigned long long v10; // [rsp+58h] [rbp-18h]
v10 = __r... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x68
MOV qword ptr [RBP + -0x68],RDI
MOV qword ptr [RBP + -0x70],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x70]
MOV RDI,RAX
CALL 0x00101c08
MOV RBX,RAX
MOV RAX,qword ptr [RBP + -0x70]
MOV RDI,RAX
CALL 0x001... | /* func0(std::vector<int, std::allocator<int> > const&) */
vector * func0(vector *param_1)
{
__normal_iterator _Var1;
__normal_iterator _Var2;
_Rb_tree_const_iterator _Var3;
_Rb_tree_const_iterator _Var4;
vector<int,std::allocator<int>> *in_RSI;
long in_FS_OFFSET;
allocator local_61;
allocator *local_... |
769 | func0 |
#include <iostream>
#include <vector>
#include <algorithm>
#include <set>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& test_vec) {
std::set<int> unique_elements(test_vec.begin(), test_vec.end());
std::vector<int> res(unique_elements.begin(), unique_elements.end());
return res;
}
| int main() {
assert((func0({1, 3, 5, 2, 3, 5, 1, 1, 3}) == std::vector<int>{1, 2, 3, 5}));
assert((func0({2, 3, 4, 4, 5, 6, 6, 7, 8, 8}) == std::vector<int>{2, 3, 4, 5, 6, 7, 8}));
assert((func0({11, 12, 13, 11, 11, 12, 14, 13}) == std::vector<int>{11, 12, 13, 14}));
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x58,%rsp
mov %rdi,%rbx
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
mov 0x8(%rsi),%r14
mov (%rsi),%rbp
movl $0x0,0x18(%rsp)
movq $0x0,0x20(%rsp)
lea... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 58h
mov [rsp+88h+var_80], rdi
mov rax, fs:28h
mov [rsp+88h+var_40], rax
xor eax, eax
mov r14, [rsi+8]
mov rbx, [rsi]
mov [rsp+88h+var_70], 0
mov [rsp+88h+var_68], 0
l... | _QWORD * func0(_QWORD *a1, long long a2)
{
_DWORD *v2; // r14
_DWORD *v3; // rbx
long long insert_hint_unique_pos; // rax
int *v5; // rdx
int *v6; // rbp
bool v7; // r12
long long v8; // rax
int *v9; // rbx
int *v10; // rdi
unsigned long long v11; // rbp
unsigned long long v12; // r12
_DWORD *v1... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x58
MOV qword ptr [RSP + 0x8],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x48],RAX
XOR EAX,EAX
MOV R14,qword ptr [RSI + 0x8]
MOV RBX,qword ptr [RSI]
MOV dword ptr [RSP + 0x18],0x0
MOV qword ptr [RSP + 0x20],0x0
LEA RAX,[RSP + 0x18]
... | /* func0(std::vector<int, std::allocator<int> > const&) */
vector * func0(vector *param_1)
{
int *piVar1;
_Rb_tree_node_base *p_Var2;
int4 *puVar3;
int8 uVar4;
_Rb_tree_node_base *p_Var5;
int *piVar6;
ulong uVar7;
long *in_RSI;
bool bVar8;
long in_FS_OFFSET;
bool bVar9;
int auVar10 [16];
_Rb... |
770 | func0 |
#include <iostream>
#include <vector>
#include <algorithm>
#include <set>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& test_vec) {
std::set<int> unique_elements(test_vec.begin(), test_vec.end());
std::vector<int> res(unique_elements.begin(), unique_elements.end());
return res;
}
| int main() {
assert((func0({1, 3, 5, 2, 3, 5, 1, 1, 3}) == std::vector<int>{1, 2, 3, 5}));
assert((func0({2, 3, 4, 4, 5, 6, 6, 7, 8, 8}) == std::vector<int>{2, 3, 4, 5, 6, 7, 8}));
assert((func0({11, 12, 13, 11, 11, 12, 14, 13}) == std::vector<int>{11, 12, 13, 14}));
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x58,%rsp
mov 0x8(%rsi),%r15
mov (%rsi),%rbx
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
lea 0x18(%rsp),%rbp
lea 0x10(%rsp),%r14
mov... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 58h
mov r14, [rsi+8]
mov rbp, [rsi]
mov [rsp+88h+var_80], rdi
lea r13, [rsp+88h+var_70]
mov rax, fs:28h
mov [rsp+88h+var_40], rax
xor eax, eax
mov [rsp+88h+var_70], 0... | _QWORD * func0(_QWORD *a1, signed int **a2)
{
signed int *v2; // r14
signed int *v3; // rbp
long long v4; // rax
signed int v5; // r15d
int *v6; // rbx
long long insert_unique_pos; // rax
int *v8; // rdx
bool v9; // al
bool v10; // r12
long long v11; // rax
int *v12; // rbx
int *v13; // rdi
lo... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x58
MOV R14,qword ptr [RSI + 0x8]
MOV RBP,qword ptr [RSI]
MOV qword ptr [RSP + 0x8],RDI
LEA R13,[RSP + 0x18]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x48],RAX
XOR EAX,EAX
MOV dword ptr [RSP + 0x18],0x0
MOV qword ptr [RSP + 0x20],0x0
... | /* func0(std::vector<int, std::allocator<int> > const&) */
vector * func0(vector *param_1)
{
uint uVar1;
uint *puVar2;
void *pvVar3;
_Rb_tree_node_base *p_Var4;
int4 *puVar5;
_Rb_tree_node_base *p_Var6;
uint *puVar7;
int4 *puVar8;
int8 *in_RSI;
long lVar9;
void *pvVar10;
long in_FS_OFFSET;
b... |
771 | func0 |
#include <iostream>
#include <vector>
#include <algorithm>
#include <set>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& test_vec) {
std::set<int> unique_elements(test_vec.begin(), test_vec.end());
std::vector<int> res(unique_elements.begin(), unique_elements.end());
return res;
}
| int main() {
assert((func0({1, 3, 5, 2, 3, 5, 1, 1, 3}) == std::vector<int>{1, 2, 3, 5}));
assert((func0({2, 3, 4, 4, 5, 6, 6, 7, 8, 8}) == std::vector<int>{2, 3, 4, 5, 6, 7, 8}));
assert((func0({11, 12, 13, 11, 11, 12, 14, 13}) == std::vector<int>{11, 12, 13, 14}));
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %r15
push %r14
push %r13
mov %rdi,%r13
push %r12
push %rbp
push %rbx
sub $0x48,%rsp
mov 0x8(%rsi),%r15
mov (%rsi),%rbx
mov %fs:0x28,%rax
mov %rax,0x38(%rsp)
xor %eax,%eax
lea 0x8(%rsp),%rbp
movl $0x0,0x8(%rsp)
movq ... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push r15
push r14
push r13
push r12
mov r12, rdi
push rbp
push rbx
sub rsp, 58h
mov r14, [rsi+8]
mov r13, [rsi]
mov rax, fs:28h
mov [rsp+88h+var_40], rax
xor eax, eax
lea rbp, [rsp+88h+var_70]
mov [rsp+88h+var_70], 0
mov [rsp... | _QWORD * func0(_QWORD *a1, int **a2)
{
int *v3; // r14
int *v4; // r13
long long v5; // r15
int v6; // ecx
int *v7; // rbx
bool v8; // r15
long long v9; // rax
int *v10; // rbx
int *v11; // rdi
long long v12; // r14
unsigned long long v13; // r14
long long v14; // rax
_QWORD *v15; // r15
lon... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
MOV R12,RDI
PUSH RBP
PUSH RBX
SUB RSP,0x58
MOV R14,qword ptr [RSI + 0x8]
MOV R13,qword ptr [RSI]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x48],RAX
XOR EAX,EAX
LEA RBP,[RSP + 0x18]
MOV dword ptr [RSP + 0x18],0x0
MOV qword ptr [RSP + 0x20],0x0
MOV qword ptr [RSP... | /* func0(std::vector<int, std::allocator<int> > const&) */
vector * func0(vector *param_1)
{
int iVar1;
int *piVar2;
_Rb_tree_node_base *p_Var3;
int4 *puVar4;
_Rb_tree_node_base *p_Var5;
long lVar6;
int iVar7;
int8 *in_RSI;
int *piVar8;
int4 *puVar9;
long lVar10;
bool bVar11;
long in_FS_OFFS... |
772 | func0 |
#include <assert.h>
| int func0(int n) {
int num = n;
int dec_value = 0;
int base = 1;
int temp = num;
while (temp) {
int last_digit = temp % 10;
temp = temp / 10;
dec_value += last_digit * base;
base = base * 8;
}
return dec_value;
}
| int main() {
assert(func0(25) == 21);
assert(func0(30) == 24);
assert(func0(40) == 32);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x24(%rbp)
mov -0x24(%rbp),%eax
mov %eax,-0x8(%rbp)
movl $0x0,-0x14(%rbp)
movl $0x1,-0x10(%rbp)
mov -0x8(%rbp),%eax
mov %eax,-0xc(%rbp)
cmpl $0x0,-0xc(%rbp)
je 11cf <_Z5func0i+0x86>
mov -0xc(%rbp),%edx
movslq %edx,%rax
imul $0x6666... | _Z5func0i:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_24], edi
mov eax, [rbp+var_24]
mov [rbp+var_8], eax
mov [rbp+var_14], 0
mov [rbp+var_10], 1
mov eax, [rbp+var_8]
mov [rbp+var_C], eax
jmp short loc_11C7
loc_1170:
mov edx, [rbp+var_C]
movsxd rax, edx
imul rax, 66666667h... | long long func0(int a1)
{
unsigned int v2; // [rsp+10h] [rbp-14h]
int v3; // [rsp+14h] [rbp-10h]
int v5; // [rsp+20h] [rbp-4h]
v2 = 0;
v3 = 1;
while ( a1 )
{
v5 = a1 % 10;
a1 /= 10;
v2 += v3 * v5;
v3 *= 8;
}
return v2;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x24],EDI
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x8],EAX
MOV dword ptr [RBP + -0x14],0x0
MOV dword ptr [RBP + -0x10],0x1
MOV EAX,dword ptr [RBP + -0x8]
MOV dword ptr [RBP + -0xc],EAX
JMP 0x001011c7
LAB_00101170:
MOV EDX,dword ptr [RBP + -0xc]
MOV... | /* func0(int) */
int func0(int param_1)
{
int4 local_1c;
int4 local_18;
int4 local_14;
local_1c = 0;
local_18 = 1;
for (local_14 = param_1; local_14 != 0; local_14 = local_14 / 10) {
local_1c = local_1c + (local_14 % 10) * local_18;
local_18 = local_18 << 3;
}
return local_1c;
} |
773 | func0 |
#include <assert.h>
| int func0(int n) {
int num = n;
int dec_value = 0;
int base = 1;
int temp = num;
while (temp) {
int last_digit = temp % 10;
temp = temp / 10;
dec_value += last_digit * base;
base = base * 8;
}
return dec_value;
}
| int main() {
assert(func0(25) == 21);
assert(func0(30) == 24);
assert(func0(40) == 32);
return 0;
}
| O1 | cpp | func0(int):
endbr64
test %edi,%edi
je 118c <_Z5func0i+0x43>
mov $0x1,%edx
mov $0x0,%esi
movslq %edi,%rax
imul $0x66666667,%rax,%rax
sar $0x22,%rax
mov %edi,%ecx
sar $0x1f,%ecx
sub %ecx,%eax
mov %eax,%ecx
lea (%rax,%rax,4),%eax
add %eax,%eax
sub %eax,%edi
mov %edi,%eax
mov %ec... | _Z5func0i:
endbr64
test edi, edi
jz short loc_118F
mov ecx, 1
mov r8d, 0
loc_115C:
movsxd rax, edi
imul rax, 66666667h
sar rax, 22h
mov edx, edi
sar edx, 1Fh
sub eax, edx
mov esi, eax
lea edx, [rax+rax*4]
add edx, edx
mov eax, edi
sub eax, edx
mov edi, esi
imu... | long long func0(int a1)
{
int v1; // ecx
unsigned int v2; // r8d
int v3; // eax
if ( a1 )
{
v1 = 1;
v2 = 0;
do
{
v3 = a1 % 10;
a1 /= 10;
v2 += v1 * v3;
v1 *= 8;
}
while ( a1 );
}
else
{
return 0;
}
return v2;
} | func0:
ENDBR64
TEST EDI,EDI
JZ 0x0010118f
MOV ECX,0x1
MOV R8D,0x0
LAB_0010115c:
MOVSXD RAX,EDI
IMUL RAX,RAX,0x66666667
SAR RAX,0x22
MOV EDX,EDI
SAR EDX,0x1f
SUB EAX,EDX
MOV ESI,EAX
LEA EDX,[RAX + RAX*0x4]
ADD EDX,EDX
MOV EAX,EDI
SUB EAX,EDX
MOV EDI,ESI
IMUL EAX,ECX
ADD R8D,EAX
SHL ECX,0x3
TEST ESI,ESI
JNZ 0x0010115c
LA... | /* func0(int) */
int func0(int param_1)
{
int iVar1;
int iVar2;
int iVar3;
if (param_1 == 0) {
iVar3 = 0;
}
else {
iVar2 = 1;
iVar3 = 0;
do {
iVar1 = param_1 / 10;
iVar3 = iVar3 + (param_1 % 10) * iVar2;
iVar2 = iVar2 << 3;
param_1 = iVar1;
} while (iVar1 != ... |
774 | func0 |
#include <assert.h>
| int func0(int n) {
int num = n;
int dec_value = 0;
int base = 1;
int temp = num;
while (temp) {
int last_digit = temp % 10;
temp = temp / 10;
dec_value += last_digit * base;
base = base * 8;
}
return dec_value;
}
| int main() {
assert(func0(25) == 21);
assert(func0(30) == 24);
assert(func0(40) == 32);
return 0;
}
| O2 | cpp | func0(int):
endbr64
test %edi,%edi
je 1188 <_Z5func0i+0x48>
mov $0x1,%ecx
xor %r8d,%r8d
movslq %edi,%rax
mov %edi,%edx
imul $0x66666667,%rax,%rax
sar $0x1f,%edx
sar $0x22,%rax
sub %edx,%eax
mov %eax,%edx
lea (%rax,%rax,4),%eax
add %eax,%eax
sub %eax,%edi
mov %edi,%eax
mov %ed... | _Z5func0i:
endbr64
test edi, edi
jz short loc_1188
mov esi, 1
xor r8d, r8d
loc_1150:
movsxd rax, edi
mov edx, edi
imul rax, 66666667h
sar edx, 1Fh
sar rax, 22h
sub eax, edx
lea ecx, [rax+rax*4]
mov edx, eax
mov eax, edi
add ecx, ecx
mov edi, edx
sub eax, ecx
i... | long long func0(int a1)
{
int v1; // esi
unsigned int v2; // r8d
int v3; // eax
int v4; // ecx
int v5; // eax
if ( !a1 )
return 0LL;
v1 = 1;
v2 = 0;
do
{
v3 = a1;
v4 = 10 * (a1 / 10);
a1 /= 10;
v5 = v1 * (v3 - v4);
v1 *= 8;
v2 += v5;
}
while ( a1 );
return v2;
} | func0:
ENDBR64
TEST EDI,EDI
JZ 0x00101188
MOV ESI,0x1
XOR R8D,R8D
LAB_00101150:
MOVSXD RAX,EDI
MOV EDX,EDI
IMUL RAX,RAX,0x66666667
SAR EDX,0x1f
SAR RAX,0x22
SUB EAX,EDX
LEA ECX,[RAX + RAX*0x4]
MOV EDX,EAX
MOV EAX,EDI
ADD ECX,ECX
MOV EDI,EDX
SUB EAX,ECX
IMUL EAX,ESI
SHL ESI,0x3
ADD R8D,EAX
TEST EDX,EDX
JNZ 0x00101150
MO... | /* func0(int) */
int func0(int param_1)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
if (param_1 != 0) {
iVar3 = 1;
iVar4 = 0;
do {
iVar1 = param_1 / 10;
iVar2 = (param_1 % 10) * iVar3;
iVar3 = iVar3 << 3;
iVar4 = iVar4 + iVar2;
param_1 = iVar1;
} while (iVa... |
775 | func0 |
#include <assert.h>
| int func0(int n) {
int num = n;
int dec_value = 0;
int base = 1;
int temp = num;
while (temp) {
int last_digit = temp % 10;
temp = temp / 10;
dec_value += last_digit * base;
base = base * 8;
}
return dec_value;
}
| int main() {
assert(func0(25) == 21);
assert(func0(30) == 24);
assert(func0(40) == 32);
return 0;
}
| O3 | cpp | func0(int):
endbr64
test %edi,%edi
je 1188 <_Z5func0i+0x48>
mov $0x1,%ecx
xor %r8d,%r8d
movslq %edi,%rax
mov %edi,%edx
imul $0x66666667,%rax,%rax
sar $0x1f,%edx
sar $0x22,%rax
sub %edx,%eax
mov %eax,%edx
lea (%rax,%rax,4),%eax
add %eax,%eax
sub %eax,%edi
mov %edi,%eax
mov %ed... | _Z5func0i:
endbr64
test edi, edi
jz short loc_1188
mov esi, 1
xor r8d, r8d
loc_1150:
movsxd rax, edi
mov edx, edi
imul rax, 66666667h
sar edx, 1Fh
sar rax, 22h
sub eax, edx
lea ecx, [rax+rax*4]
mov edx, eax
mov eax, edi
add ecx, ecx
mov edi, edx
sub eax, ecx
i... | long long func0(int a1)
{
int v1; // esi
unsigned int v2; // r8d
int v3; // eax
int v4; // ecx
int v5; // eax
if ( !a1 )
return 0LL;
v1 = 1;
v2 = 0;
do
{
v3 = a1;
v4 = 10 * (a1 / 10);
a1 /= 10;
v5 = v1 * (v3 - v4);
v1 *= 8;
v2 += v5;
}
while ( a1 );
return v2;
} | func0:
ENDBR64
TEST EDI,EDI
JZ 0x00101188
MOV ESI,0x1
XOR R8D,R8D
LAB_00101150:
MOVSXD RAX,EDI
MOV EDX,EDI
IMUL RAX,RAX,0x66666667
SAR EDX,0x1f
SAR RAX,0x22
SUB EAX,EDX
LEA ECX,[RAX + RAX*0x4]
MOV EDX,EAX
MOV EAX,EDI
ADD ECX,ECX
MOV EDI,EDX
SUB EAX,ECX
IMUL EAX,ESI
SHL ESI,0x3
ADD R8D,EAX
TEST EDX,EDX
JNZ 0x00101150
MO... | /* func0(int) */
int func0(int param_1)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
if (param_1 != 0) {
iVar3 = 1;
iVar4 = 0;
do {
iVar1 = param_1 / 10;
iVar2 = (param_1 % 10) * iVar3;
iVar3 = iVar3 << 3;
iVar4 = iVar4 + iVar2;
param_1 = iVar1;
} while (iVa... |
776 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int arr[], int x, int n) {
int low = 0;
int high = n - 1;
int res = -1;
while (low <= high) {
int mid = (low + high) / 2;
if (arr[mid] > x) {
high = mid - 1;
} else if (arr[mid] < x) {
low = mid + 1;
} else {
... | int main() {
int arr1[] = {1, 2, 3, 4, 5, 6, 6};
assert(func0(arr1, 6, 7) == 5);
int arr2[] = {1, 2, 2, 2, 3, 2, 2, 4, 2};
assert(func0(arr2, 2, 9) == 1);
int arr3[] = {1, 2, 3};
assert(func0(arr3, 1, 3) == 0);
std::cout << "All test cases passed!" << std::endl;
... | O0 | cpp | func0(int*, int, int):
endbr64
push %rbp
mov %rsp,%rbp
mov %rdi,-0x18(%rbp)
mov %esi,-0x1c(%rbp)
mov %edx,-0x20(%rbp)
movl $0x0,-0x10(%rbp)
mov -0x20(%rbp),%eax
sub $0x1,%eax
mov %eax,-0xc(%rbp)
movl $0xffffffff,-0x8(%rbp)
mov -0x10(%rbp),%eax
cmp -0xc(%rbp),%eax
jg 128b <_Z5func0Pi... | _Z5func0Piii:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_18], rdi
mov [rbp+var_1C], esi
mov [rbp+var_20], edx
mov [rbp+var_10], 0
mov eax, [rbp+var_20]
sub eax, 1
mov [rbp+var_C], eax
mov [rbp+var_8], 0FFFFFFFFh
jmp short loc_1243
loc_11D4:
mov edx, [rbp+var_10]
mov ea... | long long func0(int *a1, int a2, int a3)
{
int v4; // [rsp+10h] [rbp-10h]
int v5; // [rsp+14h] [rbp-Ch]
unsigned int v6; // [rsp+18h] [rbp-8h]
int v7; // [rsp+1Ch] [rbp-4h]
v4 = 0;
v5 = a3 - 1;
v6 = -1;
while ( v4 <= v5 )
{
v7 = (v4 + v5) / 2;
if ( a2 >= a1[v7] )
{
if ( a2 <= a1[v7... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x1c],ESI
MOV dword ptr [RBP + -0x20],EDX
MOV dword ptr [RBP + -0x10],0x0
MOV EAX,dword ptr [RBP + -0x20]
SUB EAX,0x1
MOV dword ptr [RBP + -0xc],EAX
MOV dword ptr [RBP + -0x8],0xffffffff
JMP 0x00101243
LAB_001011d4:
MOV EDX,dword ... | /* func0(int*, int, int) */
int func0(int *param_1,int param_2,int param_3)
{
int iVar1;
int local_18;
int local_14;
int local_10;
local_18 = 0;
local_14 = param_3 + -1;
local_10 = -1;
while (local_18 <= local_14) {
iVar1 = (local_14 + local_18) / 2;
if (param_2 < param_1[iVar1]) {
lo... |
777 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int arr[], int x, int n) {
int low = 0;
int high = n - 1;
int res = -1;
while (low <= high) {
int mid = (low + high) / 2;
if (arr[mid] > x) {
high = mid - 1;
} else if (arr[mid] < x) {
low = mid + 1;
} else {
... | int main() {
int arr1[] = {1, 2, 3, 4, 5, 6, 6};
assert(func0(arr1, 6, 7) == 5);
int arr2[] = {1, 2, 2, 2, 3, 2, 2, 4, 2};
assert(func0(arr2, 2, 9) == 1);
int arr3[] = {1, 2, 3};
assert(func0(arr3, 1, 3) == 0);
std::cout << "All test cases passed!" << std::endl;
... | O1 | cpp | func0(int*, int, int):
endbr64
sub $0x1,%edx
js 122f <_Z5func0Piii+0x46>
mov $0xffffffff,%r9d
mov $0x0,%r8d
jmp 120b <_Z5func0Piii+0x22>
jge 1227 <_Z5func0Piii+0x3e>
lea 0x1(%rax),%r8d
cmp %edx,%r8d
jg 1235 <_Z5func0Piii+0x4c>
lea (%r8,%rdx,1),%ecx
mov %ecx,%eax
shr $0x1f,%eax
add ... | _Z5func0Piii:
endbr64
sub edx, 1
js short loc_11EF
mov r9d, 0FFFFFFFFh
mov r8d, 0
jmp short loc_11CB
loc_11C0:
jge short loc_11E7
lea r8d, [rax+1]
loc_11C6:
cmp r8d, edx
jg short loc_11F5
loc_11CB:
lea ecx, [r8+rdx]
mov eax, ecx
shr eax, 1Fh
add eax, ecx
sar eax... | long long func0(int *a1, int a2, int a3)
{
int v3; // edx
unsigned int v4; // r9d
int v5; // r8d
int v6; // eax
int v7; // ecx
v3 = a3 - 1;
if ( v3 < 0 )
{
return (unsigned int)-1;
}
else
{
v4 = -1;
v5 = 0;
do
{
v6 = (v5 + v3) / 2;
v7 = a1[v6];
if ( v7 <= a2... | func0:
ENDBR64
SUB EDX,0x1
JS 0x001011ef
MOV R9D,0xffffffff
MOV R8D,0x0
JMP 0x001011cb
LAB_001011c0:
JGE 0x001011e7
LEA R8D,[RAX + 0x1]
LAB_001011c6:
CMP R8D,EDX
JG 0x001011f5
LAB_001011cb:
LEA ECX,[R8 + RDX*0x1]
MOV EAX,ECX
SHR EAX,0x1f
ADD EAX,ECX
SAR EAX,0x1
MOVSXD RCX,EAX
MOV ECX,dword ptr [RDI + RCX*0x4]
CMP ECX,E... | /* func0(int*, int, int) */
int func0(int *param_1,int param_2,int param_3)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
iVar2 = param_3 + -1;
if (iVar2 < 0) {
iVar1 = -1;
}
else {
iVar3 = 0;
iVar4 = -1;
do {
iVar1 = (iVar3 + iVar2) / 2;
if (param_2 < param_1[iVar1]) {
... |
778 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int arr[], int x, int n) {
int low = 0;
int high = n - 1;
int res = -1;
while (low <= high) {
int mid = (low + high) / 2;
if (arr[mid] > x) {
high = mid - 1;
} else if (arr[mid] < x) {
low = mid + 1;
} else {
... | int main() {
int arr1[] = {1, 2, 3, 4, 5, 6, 6};
assert(func0(arr1, 6, 7) == 5);
int arr2[] = {1, 2, 2, 2, 3, 2, 2, 4, 2};
assert(func0(arr2, 2, 9) == 1);
int arr3[] = {1, 2, 3};
assert(func0(arr3, 1, 3) == 0);
std::cout << "All test cases passed!" << std::endl;
... | O2 | cpp | func0(int*, int, int):
endbr64
mov $0xffffffff,%r9d
sub $0x1,%edx
js 1496 <_Z5func0Piii+0x36>
xor %ecx,%ecx
jmp 147f <_Z5func0Piii+0x1f>
nopl 0x0(%rax,%rax,1)
lea -0x1(%rax),%edx
cmp %ecx,%edx
jl 1496 <_Z5func0Piii+0x36>
lea (%rdx,%rcx,1),%eax
sar %eax
movslq %eax,%r8
cmp %esi,(%rdi... | _Z5func0Piii:
endbr64
mov r9d, 0FFFFFFFFh
sub edx, 1
js short loc_1420
xor r8d, r8d
jmp short loc_1400
loc_13F8:
lea edx, [rax-1]
loc_13FB:
cmp r8d, edx
jg short loc_1420
loc_1400:
lea ecx, [r8+rdx]
mov eax, ecx
shr eax, 1Fh
add eax, ecx
sar eax, 1
movsxd rcx, eax
... | long long func0(int *a1, int a2, int a3)
{
unsigned int v3; // r9d
int v4; // edx
int v5; // r8d
int v6; // eax
v3 = -1;
v4 = a3 - 1;
if ( v4 >= 0 )
{
v5 = 0;
do
{
while ( 1 )
{
v6 = (v5 + v4) / 2;
if ( a2 >= a1[v6] )
break;
v4 = v6 - 1;
LABEL_... | func0:
ENDBR64
MOV R9D,0xffffffff
SUB EDX,0x1
JS 0x00101420
XOR R8D,R8D
JMP 0x00101400
LAB_001013f8:
LEA EDX,[RAX + -0x1]
LAB_001013fb:
CMP R8D,EDX
JG 0x00101420
LAB_00101400:
LEA ECX,[R8 + RDX*0x1]
MOV EAX,ECX
SHR EAX,0x1f
ADD EAX,ECX
SAR EAX,0x1
MOVSXD RCX,EAX
CMP ESI,dword ptr [RDI + RCX*0x4]
JL 0x001013f8
JLE 0x001... | /* func0(int*, int, int) */
int func0(int *param_1,int param_2,int param_3)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
iVar5 = -1;
iVar2 = param_3 + -1;
if (-1 < iVar2) {
iVar3 = 0;
do {
while( true ) {
iVar1 = (iVar3 + iVar2) / 2;
iVar4 = iVar5;
... |
779 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int arr[], int x, int n) {
int low = 0;
int high = n - 1;
int res = -1;
while (low <= high) {
int mid = (low + high) / 2;
if (arr[mid] > x) {
high = mid - 1;
} else if (arr[mid] < x) {
low = mid + 1;
} else {
... | int main() {
int arr1[] = {1, 2, 3, 4, 5, 6, 6};
assert(func0(arr1, 6, 7) == 5);
int arr2[] = {1, 2, 2, 2, 3, 2, 2, 4, 2};
assert(func0(arr2, 2, 9) == 1);
int arr3[] = {1, 2, 3};
assert(func0(arr3, 1, 3) == 0);
std::cout << "All test cases passed!" << std::endl;
... | O3 | cpp | func0(int*, int, int):
endbr64
mov $0xffffffff,%r9d
sub $0x1,%edx
js 1466 <_Z5func0Piii+0x36>
xor %ecx,%ecx
jmp 144f <_Z5func0Piii+0x1f>
nopl 0x0(%rax,%rax,1)
lea -0x1(%rax),%edx
cmp %edx,%ecx
jg 1466 <_Z5func0Piii+0x36>
lea (%rdx,%rcx,1),%eax
sar %eax
movslq %eax,%r8
cmp (%rdi,%r8,... | _Z5func0Piii:
endbr64
mov r9d, 0FFFFFFFFh
sub edx, 1
js short loc_14C0
xor r8d, r8d
jmp short loc_14A0
loc_1498:
lea edx, [rax-1]
loc_149B:
cmp r8d, edx
jg short loc_14C0
loc_14A0:
lea ecx, [rdx+r8]
mov eax, ecx
shr eax, 1Fh
add eax, ecx
sar eax, 1
movsxd rcx, eax
... | long long func0(int *a1, int a2, int a3)
{
unsigned int v3; // r9d
int v4; // edx
int v5; // r8d
int v6; // eax
v3 = -1;
v4 = a3 - 1;
if ( v4 >= 0 )
{
v5 = 0;
do
{
while ( 1 )
{
v6 = (v4 + v5) / 2;
if ( a2 >= a1[v6] )
break;
v4 = v6 - 1;
LABEL_... | func0:
ENDBR64
MOV R9D,0xffffffff
SUB EDX,0x1
JS 0x001014c0
XOR R8D,R8D
JMP 0x001014a0
LAB_00101498:
LEA EDX,[RAX + -0x1]
LAB_0010149b:
CMP R8D,EDX
JG 0x001014c0
LAB_001014a0:
LEA ECX,[RDX + R8*0x1]
MOV EAX,ECX
SHR EAX,0x1f
ADD EAX,ECX
SAR EAX,0x1
MOVSXD RCX,EAX
CMP ESI,dword ptr [RDI + RCX*0x4]
JL 0x00101498
JLE 0x001... | /* func0(int*, int, int) */
int func0(int *param_1,int param_2,int param_3)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
iVar5 = -1;
iVar2 = param_3 + -1;
if (-1 < iVar2) {
iVar3 = 0;
do {
while( true ) {
iVar1 = (iVar2 + iVar3) / 2;
iVar4 = iVar5;
... |
780 | func0 |
#include <iostream>
#include <vector>
#include <tuple>
#include <assert.h>
| std::vector<std::vector<int>> func0(const std::vector<std::vector<int>>& test_list, int K) {
std::vector<std::vector<int>> res;
for (const auto& ele : test_list) {
if (ele.size() != K) {
res.push_back(ele);
}
}
return res;
}
| int main() {
// Test cases
assert((func0({{4, 5}, {4}, {8, 6, 7}, {1}, {3, 4, 6, 7}}, 1) == std::vector<std::vector<int>>{{4, 5}, {8, 6, 7}, {3, 4, 6, 7}}));
assert((func0({{4, 5}, {4, 5}, {6, 7}, {1, 2, 3}, {3, 4, 6, 7}}, 2) == std::vector<std::vector<int>>{{1, 2, 3}, {3, 4, 6, 7}}));
assert((func0... | O0 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, 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 %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor ... | _Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EEi:
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 rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_48]
mov rdi, rax
call _ZNSt6vectorIS_IiSaIi... | long long func0(long long a1, long long a2, int a3)
{
long long v5; // [rsp+28h] [rbp-38h] BYREF
_QWORD v6[2]; // [rsp+30h] [rbp-30h] BYREF
long long v7; // [rsp+40h] [rbp-20h]
unsigned long long v8; // [rsp+48h] [rbp-18h]
v8 = __readfsqword(0x28u);
std::vector<std::vector<int>>::vector(a1);
v6[1] = a2;... | 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 RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x48]
MOV RDI,RAX
CALL 0x00102892
MOV RAX,qword ptr [RBP + -0x50]
MO... | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > > const&, int) */
vector * func0(vector *param_1,int param_2)
{
bool bVar1;
long lVar2;
int in_EDX;
int4 in_register_00000034;
long in_FS_OFFSET;
int8 local_40;
int8 local_38;
vector... |
781 | func0 |
#include <iostream>
#include <vector>
#include <tuple>
#include <assert.h>
| std::vector<std::vector<int>> func0(const std::vector<std::vector<int>>& test_list, int K) {
std::vector<std::vector<int>> res;
for (const auto& ele : test_list) {
if (ele.size() != K) {
res.push_back(ele);
}
}
return res;
}
| int main() {
// Test cases
assert((func0({{4, 5}, {4}, {8, 6, 7}, {1}, {3, 4, 6, 7}}, 1) == std::vector<std::vector<int>>{{4, 5}, {8, 6, 7}, {3, 4, 6, 7}}));
assert((func0({{4, 5}, {4, 5}, {6, 7}, {1, 2, 3}, {3, 4, 6, 7}}, 2) == std::vector<std::vector<int>>{{1, 2, 3}, {3, 4, 6, 7}}));
assert((func0... | O1 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, int):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x18,%rsp
mov %rdi,%r14
mov %edx,0xc(%rsp)
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi)
movq $0x0,... | _Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EEi:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 18h
mov r14, rdi
mov [rsp+48h+var_3C], edx
mov qword ptr [rdi], 0
mov qword ptr [rdi+8], 0
mov qword ptr [rdi+10h], 0
mov rbx, [rsi]
mov r15, [rsi+8]
cmp ... | _QWORD * func0(_QWORD *a1, long long a2, int a3)
{
_QWORD *v3; // rbx
_QWORD *v4; // r15
struct _Unwind_Exception *v6; // rbx
_DWORD *v7; // r13
_DWORD *v8; // rsi
long long v9; // rbp
signed long long v10; // rbp
_QWORD *v11; // r12
*a1 = 0LL;
a1[1] = 0LL;
a1[2] = 0LL;
v3 = *(_QWORD **)a2;
v... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x18
MOV R14,RDI
MOV dword ptr [RSP + 0xc],EDX
MOV qword ptr [RDI],0x0
MOV qword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
MOV RBX,qword ptr [RSI]
MOV R15,qword ptr [RSI + 0x8]
CMP R15,RBX
JNZ 0x00101380
LAB_00101305:
MOV RAX,R14
ADD ... | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > > const&, int) */
vector * func0(vector *param_1,int param_2)
{
vector *pvVar1;
int4 *__src;
int8 *puVar2;
int8 uVar3;
int4 *__dest;
int in_EDX;
vector *pvVar4;
size_t __n;
ulong u... |
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.