index
int64
0
66.5k
func_name
stringlengths
2
5.36k
func_dep
stringlengths
16
2.19k
func
stringlengths
8
55.3k
test
stringlengths
0
7.07k
opt
stringclasses
4 values
language
stringclasses
2 values
asm
stringlengths
0
45.4k
ida_asm
stringlengths
0
44.7k
ida_pseudo
stringlengths
0
44.3k
ghidra_asm
stringlengths
0
49.1k
ghidra_pseudo
stringlengths
0
64.7k
2,582
func0
#include <cmath> #include <cassert>
int func0(int N, int K) { int No = 0; No = (N - K + 1); No = pow(No, 3); return No; }
int main() { assert(func0(2, 1) == 8); assert(func0(5, 2) == 64); assert(func0(1, 1) == 1); return 0; }
O2
cpp
func0(int, int): endbr64 sub %esi,%edi pxor %xmm0,%xmm0 sub $0x8,%rsp movsd 0xe92(%rip),%xmm1 add $0x1,%edi cvtsi2sd %edi,%xmm0 callq 1050 <pow@plt> add $0x8,%rsp cvttsd2si %xmm0,%eax retq nopl 0x0(%rax,%rax,1)
_Z5func0ii: endbr64 sub edi, esi pxor xmm0, xmm0 sub rsp, 8 movsd xmm1, cs:y; y add edi, 1 cvtsi2sd xmm0, edi; x call _pow add rsp, 8 cvttsd2si eax, xmm0 retn
long long func0(int a1, int a2) { return (unsigned int)(int)pow((double)(a1 - a2 + 1), 3.0); }
func0: ENDBR64 SUB EDI,ESI PXOR XMM0,XMM0 SUB RSP,0x8 MOVSD XMM1,qword ptr [0x00102008] ADD EDI,0x1 CVTSI2SD XMM0,EDI CALL 0x00101050 ADD RSP,0x8 CVTTSD2SI EAX,XMM0 RET
/* func0(int, int) */ int func0(int param_1,int param_2) { double dVar1; dVar1 = pow((double)((param_1 - param_2) + 1),DAT_00102008); return (int)dVar1; }
2,583
func0
#include <cmath> #include <cassert>
int func0(int N, int K) { int No = 0; No = (N - K + 1); No = pow(No, 3); return No; }
int main() { assert(func0(2, 1) == 8); assert(func0(5, 2) == 64); assert(func0(1, 1) == 1); return 0; }
O3
cpp
func0(int, int): endbr64 sub %esi,%edi pxor %xmm0,%xmm0 sub $0x8,%rsp movsd 0xe92(%rip),%xmm1 add $0x1,%edi cvtsi2sd %edi,%xmm0 callq 1050 <pow@plt> add $0x8,%rsp cvttsd2si %xmm0,%eax retq nopl 0x0(%rax,%rax,1)
_Z5func0ii: endbr64 sub edi, esi pxor xmm0, xmm0 sub rsp, 8 movsd xmm1, cs:y; y add edi, 1 cvtsi2sd xmm0, edi; x call _pow add rsp, 8 cvttsd2si eax, xmm0 retn
long long func0(int a1, int a2) { return (unsigned int)(int)pow((double)(a1 - a2 + 1), 3.0); }
func0: ENDBR64 SUB EDI,ESI PXOR XMM0,XMM0 SUB RSP,0x8 MOVSD XMM1,qword ptr [0x00102008] ADD EDI,0x1 CVTSI2SD XMM0,EDI CALL 0x00101050 ADD RSP,0x8 CVTTSD2SI EAX,XMM0 RET
/* func0(int, int) */ int func0(int param_1,int param_2) { double dVar1; dVar1 = pow((double)((param_1 - param_2) + 1),DAT_00102008); return (int)dVar1; }
2,584
func0
#include <iostream> #include <vector> #include <regex> #include <assert.h>
std::vector<std::string> func0(const std::string& text) { std::regex re("([A-Z][^A-Z]*)"); std::sregex_iterator next(text.begin(), text.end(), re); std::sregex_iterator end; std::vector<std::string> results; while (next != end) { std::smatch match = *next; results.push_back(ma...
int main() { std::vector<std::string> res1 = func0("PythonProgramLanguage"); assert((res1 == std::vector<std::string>{"Python","Program","Language"})); std::vector<std::string> res2 = func0("PythonProgram"); assert((res2 == std::vector<std::string>{"Python","Program"})); std::vector...
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 $0x148,%rsp mov %rdi,-0x148(%rbp) mov %rsi,-0x150(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax lea -0x140(%rbp),%rax mov $0x10,%edx le...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 148h mov [rbp+var_148], rdi mov [rbp+var_150], rsi mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax lea rax, [rbp+var_140] mov edx, 10h lea rcx, aAZAZ; "([A-Z][...
long long func0(long long a1, long long a2) { long long v2; // rbx long long v3; // rax long long v4; // rax _BYTE v6[32]; // [rsp+10h] [rbp-140h] BYREF _BYTE v7[32]; // [rsp+30h] [rbp-120h] BYREF _BYTE v8[64]; // [rsp+50h] [rbp-100h] BYREF _BYTE v9[64]; // [rsp+90h] [rbp-C0h] BYREF _BYTE v10[64]; // [...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x148 MOV qword ptr [RBP + -0x148],RDI MOV qword ptr [RBP + -0x150],RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX LEA RAX,[RBP + -0x140] MOV EDX,0x10 LEA RCX,[0x134051] MOV RSI,RCX MOV RDI,RAX LAB_00104b6f: CALL 0x00106a1c MOV RAX,qword ...
/* func0(std::string const&) */ string * func0(string *param_1) { char cVar1; __normal_iterator _Var2; __normal_iterator _Var3; match_results *pmVar4; long in_FS_OFFSET; regex local_148 [32]; match_results<__normal_iterator<char_const*,std::string>,std::allocator<std::sub_match<__normal_iterator<char_co...
2,585
func0
#include <iostream> #include <vector> #include <regex> #include <assert.h>
std::vector<std::string> func0(const std::string& text) { std::regex re("([A-Z][^A-Z]*)"); std::sregex_iterator next(text.begin(), text.end(), re); std::sregex_iterator end; std::vector<std::string> results; while (next != end) { std::smatch match = *next; results.push_back(ma...
int main() { std::vector<std::string> res1 = func0("PythonProgramLanguage"); assert((res1 == std::vector<std::string>{"Python","Program","Language"})); std::vector<std::string> res2 = func0("PythonProgram"); assert((res2 == std::vector<std::string>{"Python","Program"})); std::vector...
O1
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x258,%rsp mov %rdi,%rbp mov %rsi,%rbx mov %fs:0x28,%rax mov %rax,0x248(%rsp) xor %eax,%eax lea 0x70(%rsp),%r13 mov ...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 2B8h mov r13, rdi mov rbx, rsi mov rax, fs:28h mov [rbp+var_38], rax xor eax, eax lea rax, [rbp+var_2C8] mov r14, rax ...
_QWORD * func0(_QWORD *a1, size_t *a2) { long long v4; // rdx long long v5; // rax long long v6; // rdi size_t v7; // rsi struct _Unwind_Exception *v8; // rbx long long v9; // rax char *v10; // rdx void **v11; // rsi _QWORD *v12; // rdx char *v13; // rbx _BYTE *v14; // r12 long long v15; // r15 ...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x2b8 MOV R13,RDI MOV RBX,RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x38],RAX XOR EAX,EAX LEA RAX,[RBP + -0x2c8] MOV R14,RAX MOV RDI,RAX CALL 0x001046d0 MOV qword ptr [RBP + -0x2c0],0x0 MOV qword ptr [RBP + -0x2b8],0x0 ...
/* func0(std::string const&) */ string * func0(string *param_1) { long *plVar1; int *__src; _Sp_counted_base<(_Lock_policy)2> *this; _Sp_counted_base<(_Lock_policy)2> *p_Var2; bool bVar3; char cVar4; uint uVar5; sub_match *psVar6; int8 uVar7; ulong uVar8; sub_match *psVar9; uint uVar10; long...
2,586
func0
#include <iostream> #include <vector> #include <regex> #include <assert.h>
std::vector<std::string> func0(const std::string& text) { std::regex re("([A-Z][^A-Z]*)"); std::sregex_iterator next(text.begin(), text.end(), re); std::sregex_iterator end; std::vector<std::string> results; while (next != end) { std::smatch match = *next; results.push_back(ma...
int main() { std::vector<std::string> res1 = func0("PythonProgramLanguage"); assert((res1 == std::vector<std::string>{"Python","Program","Language"})); std::vector<std::string> res2 = func0("PythonProgram"); assert((res2 == std::vector<std::string>{"Python","Program"})); std::vector...
O2
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 push %r15 push %r14 push %r13 push %r12 mov %rdi,%r12 push %rbp push %rbx mov %rsi,%rbx sub $0x278,%rsp mov %fs:0x28,%rax mov %rax,0x268(%rsp) xor %eax,%eax lea 0x90(%rsp),%r15 mov ...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push rbp mov rbp, rsp push r15 push r14 lea r15, [rbp+var_2C8] push r13 push r12 mov r12, rdi mov rdi, r15; this push rbx mov rbx, rsi sub rsp, 2D8h mov rax, fs:28h mov [rbp+var_38], rax xor eax...
long long func0(long long a1, unsigned long long *a2) { char *v4; // rsi __m128i v5; // xmm0 long long v6; // rax signed __int32 *v7; // rdi long long v8; // rdx volatile signed __int32 *v9; // rcx signed __int32 v10; // eax long long v11; // rdi long long v12; // rdx volatile signed __int32 *v13; ...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 LEA R15,[RBP + -0x2c8] PUSH R13 PUSH R12 MOV R12,RDI MOV RDI,R15 PUSH RBX MOV RBX,RSI SUB RSP,0x2d8 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x38],RAX XOR EAX,EAX MOV qword ptr [RBP + -0x2f0],R15 CALL 0x001036d0 LEA RDX,[0x1196ad] PXOR XMM0,XMM0 LEA RDI,[RB...
/* WARNING: Restarted to delay deadcode elimination for space: stack */ /* func0(std::string const&) */ string * func0(string *param_1) { long lVar1; int *__src; int auVar2 [16]; int8 this; bool bVar3; int iVar4; _Sp_counted_base<(_Lock_policy)2> *p_Var5; long lVar6; _Sp_counted_base<(_Lock_policy)2...
2,587
func0
#include <iostream> #include <vector> #include <regex> #include <assert.h>
std::vector<std::string> func0(const std::string& text) { std::regex re("([A-Z][^A-Z]*)"); std::sregex_iterator next(text.begin(), text.end(), re); std::sregex_iterator end; std::vector<std::string> results; while (next != end) { std::smatch match = *next; results.push_back(ma...
int main() { std::vector<std::string> res1 = func0("PythonProgramLanguage"); assert((res1 == std::vector<std::string>{"Python","Program","Language"})); std::vector<std::string> res2 = func0("PythonProgram"); assert((res2 == std::vector<std::string>{"Python","Program"})); std::vector...
O3
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 push %r15 push %r14 push %r13 push %r12 mov %rdi,%r12 push %rbp mov %rsi,%rbp push %rbx sub $0x288,%rsp mov %fs:0x28,%rax mov %rax,0x278(%rsp) xor %eax,%eax lea 0xa0(%rsp),%rbx mov ...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push rbp mov rbp, rsp push r15 push r14 push r13 mov r13, rsi push r12 mov r12, rdi push rbx lea rbx, [rbp+var_2C8] mov rdi, rbx; this sub rsp, 2D8h mov rax, fs:28h mov [rbp+var_38], rax xor eax...
long long func0(long long a1, unsigned long long *a2) { signed long long v2; // r14 __m128i v4; // xmm0 long long v5; // rdi void *v6; // rdi void **v7; // rbx unsigned long long v8; // r15 void *v9; // rdi unsigned long long v10; // rax unsigned long long v11; // rdx long long v12; // rdx long l...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 MOV R13,RSI PUSH R12 MOV R12,RDI PUSH RBX LEA RBX,[RBP + -0x2c8] MOV RDI,RBX SUB RSP,0x2d8 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x38],RAX XOR EAX,EAX MOV qword ptr [RBP + -0x2f0],RBX CALL 0x00104710 LEA RDX,[0x11b6e6] PXOR XMM0,XMM0 LEA RDI,[RB...
/* WARNING: Restarted to delay deadcode elimination for space: stack */ /* func0(std::string const&) */ string * func0(string *param_1) { int *__src; int auVar1 [16]; int8 this; bool bVar2; long *plVar3; long lVar4; long *plVar5; vector<std::sub_match<__normal_iterator<char_const*,std::string>>,std::a...
2,588
func0
#include <vector> #include <cassert>
std::vector<int> func0(std::vector<int> lst) { std::vector<int> result; for (size_t i = 1; i < lst.size(); i += 2) { result.push_back(lst[i]); result.push_back(lst[i - 1]); } if (lst.size() % 2 != 0) { result.push_back(lst.back()); } return result; }
int main() { assert((func0({0, 1, 2, 3, 4, 5}) == std::vector<int>{1, 0, 3, 2, 5, 4})); assert((func0({5, 6, 7, 8, 9, 10}) == std::vector<int>{6, 5, 8, 7, 10, 9})); assert((func0({25, 35, 45, 55, 75, 95}) == std::vector<int>{35, 25, 55, 45, 95, 75})); }
O0
cpp
func0(std::vector<int, std::allocator<int> >): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x28,%rsp mov %rdi,-0x28(%rbp) mov %rsi,-0x30(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax mov -0x28(%rbp),%rax mov %rax,%rdi callq 1a48 <_ZNSt6vectorIiSaIiEEC1Ev> movq $0x1,-0x2...
_Z5func0St6vectorIiSaIiEE: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 28h mov [rbp+var_28], rdi mov [rbp+var_30], rsi mov rax, [rbp+var_28] mov rdi, rax call _ZNSt6vectorIiSaIiEEC2Ev; std::vector<int>::vector(void) mov [rbp+var_18], 1 jmp short loc_12E7 loc_1294: mov rd...
long long func0(long long a1, long long a2) { long long v2; // rax long long v3; // rax long long v4; // rax unsigned long long i; // [rsp+18h] [rbp-18h] std::vector<int>::vector(a1); for ( i = 1LL; i < std::vector<int>::size(a2); i += 2LL ) { v2 = std::vector<int>::operator[](a2, i); std::vecto...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x28 MOV qword ptr [RBP + -0x28],RDI MOV qword ptr [RBP + -0x30],RSI MOV RAX,qword ptr [RBP + -0x28] MOV RDI,RAX CALL 0x00101a94 MOV qword ptr [RBP + -0x18],0x1 JMP 0x001012e7 LAB_00101294: MOV RDX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x30] MOV RSI,RDX M...
/* func0(std::vector<int, std::allocator<int> >) */ vector<int,std::allocator<int>> * func0(vector param_1) { uint uVar1; ulong uVar2; int *piVar3; vector<int,std::allocator<int>> *in_RSI; int4 in_register_0000003c; vector<int,std::allocator<int>> *this; int8 local_20; this = (vector<int,std::alloc...
2,589
func0
#include <vector> #include <cassert>
std::vector<int> func0(std::vector<int> lst) { std::vector<int> result; for (size_t i = 1; i < lst.size(); i += 2) { result.push_back(lst[i]); result.push_back(lst[i - 1]); } if (lst.size() % 2 != 0) { result.push_back(lst.back()); } return result; }
int main() { assert((func0({0, 1, 2, 3, 4, 5}) == std::vector<int>{1, 0, 3, 2, 5, 4})); assert((func0({5, 6, 7, 8, 9, 10}) == std::vector<int>{6, 5, 8, 7, 10, 9})); assert((func0({25, 35, 45, 55, 75, 95}) == std::vector<int>{35, 25, 55, 45, 95, 75})); }
O1
cpp
func0(std::vector<int, std::allocator<int> >): endbr64 push %r13 push %r12 push %rbp push %rbx sub $0x8,%rsp mov %rdi,%rbx mov %rsi,%r12 movq $0x0,(%rdi) movq $0x0,0x8(%rdi) movq $0x0,0x10(%rdi) mov 0x8(%rsi),%rcx mov (%rsi),%rdx mov %rcx,%rax sub %rdx,%rax sar $0x2,%rax mov %ra...
_Z5func0St6vectorIiSaIiEE: endbr64 push r13 push r12 push rbp push rbx sub rsp, 8 mov rbx, rdi mov qword ptr [rdi], 0 mov qword ptr [rdi+8], 0 mov qword ptr [rdi+10h], 0 mov rax, [rsi+8] mov rdx, [rsi] mov rcx, rax sub rcx, rdx cmp rcx, 4 jbe loc_1341 mov r12,...
_QWORD * func0(_QWORD *a1, long long *a2) { long long v2; // rdx unsigned long long v3; // rcx unsigned long long v5; // rbp long long v6; // rcx unsigned long long v7; // rax _DWORD *v8; // rdx _DWORD *v9; // rsi _DWORD *v10; // rdx _DWORD *v11; // rsi _DWORD *v13; // rsi long long v14; // rdx ...
func0: ENDBR64 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x8 MOV RBX,RDI MOV qword ptr [RDI],0x0 MOV qword ptr [RDI + 0x8],0x0 MOV qword ptr [RDI + 0x10],0x0 MOV RAX,qword ptr [RSI + 0x8] MOV RDX,qword ptr [RSI] MOV RCX,RAX SUB RCX,RDX CMP RCX,0x4 JBE 0x00101341 MOV R12,RSI MOV EBP,0x1 JMP 0x001012c0 LAB_00101292: MO...
/* func0(std::vector<int, std::allocator<int> >) */ vector<int,std::allocator<int>> * func0(vector param_1) { long lVar1; int *piVar2; ulong uVar3; long lVar4; int *piVar5; ulong uVar6; long *in_RSI; int4 *puVar7; int4 in_register_0000003c; vector<int,std::allocator<int>> *this; this = (vecto...
2,590
func0
#include <vector> #include <cassert>
std::vector<int> func0(std::vector<int> lst) { std::vector<int> result; for (size_t i = 1; i < lst.size(); i += 2) { result.push_back(lst[i]); result.push_back(lst[i - 1]); } if (lst.size() % 2 != 0) { result.push_back(lst.back()); } return result; }
int main() { assert((func0({0, 1, 2, 3, 4, 5}) == std::vector<int>{1, 0, 3, 2, 5, 4})); assert((func0({5, 6, 7, 8, 9, 10}) == std::vector<int>{6, 5, 8, 7, 10, 9})); assert((func0({25, 35, 45, 55, 75, 95}) == std::vector<int>{35, 25, 55, 45, 95, 75})); }
O2
cpp
func0(std::vector<int, std::allocator<int> >): endbr64 push %r13 push %r12 mov %rdi,%r12 push %rbp push %rbx sub $0x8,%rsp movq $0x0,(%rdi) movq $0x0,0x8(%rdi) movq $0x0,0x10(%rdi) mov 0x8(%rsi),%rcx mov (%rsi),%rdx mov %rcx,%rax sub %rdx,%rax sar $0x2,%rax cmp $0x1,%rax jbe 176...
_Z5func0St6vectorIiSaIiEE: endbr64 push r13 pxor xmm0, xmm0 push r12 push rbp push rbx mov rbx, rdi sub rsp, 8 movups xmmword ptr [rdi], xmm0 mov rax, [rsi+8] mov rdx, [rsi] mov qword ptr [rdi+10h], 0 mov rcx, rax sub rcx, rdx cmp rcx, 4 jbe loc_1730 mov r12, rsi ...
long long func0(long long a1, long long *a2) { long long v2; // rax long long v3; // rdx long long v5; // rax long long v6; // rsi unsigned long long v7; // rbp long long v8; // rsi _DWORD *v9; // rcx long long v10; // rsi long long v11; // rcx unsigned long long v12; // rax long long v13; // r13...
func0: ENDBR64 PUSH R13 PXOR XMM0,XMM0 PUSH R12 PUSH RBP PUSH RBX MOV RBX,RDI SUB RSP,0x8 MOVUPS xmmword ptr [RDI],XMM0 MOV RAX,qword ptr [RSI + 0x8] MOV RDX,qword ptr [RSI] MOV qword ptr [RDI + 0x10],0x0 MOV RCX,RAX SUB RCX,RDX CMP RCX,0x4 JBE 0x00101730 MOV R12,RSI XOR EAX,EAX XOR ESI,ESI MOV EBP,0x1 JMP 0x0010169c L...
/* func0(std::vector<int, std::allocator<int> >) */ vector<int,std::allocator<int>> * func0(vector param_1) { long lVar1; int *piVar2; ulong uVar3; int *piVar4; long lVar5; ulong uVar6; long *in_RSI; int *piVar7; int4 *puVar8; int4 in_register_0000003c; vector<int,std::allocator<int>> *this; ...
2,591
func0
#include <vector> #include <cassert>
std::vector<int> func0(std::vector<int> lst) { std::vector<int> result; for (size_t i = 1; i < lst.size(); i += 2) { result.push_back(lst[i]); result.push_back(lst[i - 1]); } if (lst.size() % 2 != 0) { result.push_back(lst.back()); } return result; }
int main() { assert((func0({0, 1, 2, 3, 4, 5}) == std::vector<int>{1, 0, 3, 2, 5, 4})); assert((func0({5, 6, 7, 8, 9, 10}) == std::vector<int>{6, 5, 8, 7, 10, 9})); assert((func0({25, 35, 45, 55, 75, 95}) == std::vector<int>{35, 25, 55, 45, 95, 75})); }
O3
cpp
func0(std::vector<int, std::allocator<int> >): endbr64 push %r13 pxor %xmm0,%xmm0 push %r12 mov %rdi,%r12 push %rbp push %rbx sub $0x8,%rsp movq $0x0,0x10(%rdi) movups %xmm0,(%rdi) mov 0x8(%rsi),%rcx mov (%rsi),%rdx mov %rcx,%rax sub %rdx,%rax sar $0x2,%rax cmp $0x1,%rax jbe 16e8 ...
_Z5func0St6vectorIiSaIiEE: endbr64 push r13 pxor xmm0, xmm0 push r12 push rbp push rbx mov rbx, rdi sub rsp, 8 movups xmmword ptr [rdi], xmm0 mov rax, [rsi+8] mov rdx, [rsi] mov qword ptr [rdi+10h], 0 mov rcx, rax sub rcx, rdx cmp rcx, 4 jbe loc_1730 mov r12, rsi ...
long long func0(long long a1, long long *a2) { long long v2; // rax long long v3; // rdx long long v5; // rax long long v6; // rsi unsigned long long v7; // rbp long long v8; // rsi _DWORD *v9; // rcx long long v10; // rsi long long v11; // rcx unsigned long long v12; // rax long long v13; // r13...
func0: ENDBR64 PUSH R13 PXOR XMM0,XMM0 PUSH R12 PUSH RBP PUSH RBX MOV RBX,RDI SUB RSP,0x8 MOVUPS xmmword ptr [RDI],XMM0 MOV RAX,qword ptr [RSI + 0x8] MOV RDX,qword ptr [RSI] MOV qword ptr [RDI + 0x10],0x0 MOV RCX,RAX SUB RCX,RDX CMP RCX,0x4 JBE 0x00101730 MOV R12,RSI XOR EAX,EAX XOR ESI,ESI MOV EBP,0x1 JMP 0x0010169c L...
/* func0(std::vector<int, std::allocator<int> >) */ vector<int,std::allocator<int>> * func0(vector param_1) { long lVar1; int *piVar2; ulong uVar3; int *piVar4; long lVar5; ulong uVar6; long *in_RSI; int *piVar7; int4 *puVar8; int4 in_register_0000003c; vector<int,std::allocator<int>> *this; ...
2,592
func0
#include <vector> #include <assert.h>
int func0(const std::vector<int>& nums, int m, int n) { int sum_range = 0; for (int i = m; i <= n; i++) { sum_range += nums[i]; } return sum_range; }
int main() { assert(func0({2, 1, 5, 6, 8, 3, 4, 9, 10, 11, 8, 12}, 8, 10) == 29); assert(func0({1, 2, 3, 4, 5}, 1, 2) == 5); assert(func0({1, 0, 1, 2, 5, 6}, 4, 5) == 11); return 0; }
O0
cpp
func0(std::vector<int, std::allocator<int> > const&, int, int): endbr64 push %rbp mov %rsp,%rbp sub $0x20,%rsp mov %rdi,-0x18(%rbp) mov %esi,-0x1c(%rbp) mov %edx,-0x20(%rbp) movl $0x0,-0x8(%rbp) mov -0x1c(%rbp),%eax mov %eax,-0x4(%rbp) mov -0x4(%rbp),%eax cmp -0x20(%rbp),%eax jg 1274 ...
_Z5func0RKSt6vectorIiSaIiEEii: endbr64 push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_18], rdi mov [rbp+var_1C], esi mov [rbp+var_20], edx mov [rbp+var_8], 0 mov eax, [rbp+var_1C] mov [rbp+var_4], eax jmp short loc_128C loc_126E: mov eax, [rbp+var_4] movsxd rdx, eax mov ...
long long func0(long long a1, int a2, int a3) { unsigned int v5; // [rsp+18h] [rbp-8h] v5 = 0; while ( a2 <= a3 ) v5 += *(_DWORD *)std::vector<int>::operator[](a1, a2++); return v5; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x18],RDI MOV dword ptr [RBP + -0x1c],ESI MOV dword ptr [RBP + -0x20],EDX MOV dword ptr [RBP + -0x8],0x0 MOV EAX,dword ptr [RBP + -0x1c] MOV dword ptr [RBP + -0x4],EAX JMP 0x0010128c LAB_0010126e: MOV EAX,dword ptr [RBP + -0x4] MOVSXD RDX,EAX MOV RA...
/* func0(std::vector<int, std::allocator<int> > const&, int, int) */ int func0(vector *param_1,int param_2,int param_3) { int *piVar1; int4 local_10; int4 local_c; local_10 = 0; for (local_c = param_2; local_c <= param_3; local_c = local_c + 1) { piVar1 = (int *)std::vector<int,std::allocator<int>>::...
2,593
func0
#include <vector> #include <assert.h>
int func0(const std::vector<int>& nums, int m, int n) { int sum_range = 0; for (int i = m; i <= n; i++) { sum_range += nums[i]; } return sum_range; }
int main() { assert(func0({2, 1, 5, 6, 8, 3, 4, 9, 10, 11, 8, 12}, 8, 10) == 29); assert(func0({1, 2, 3, 4, 5}, 1, 2) == 5); assert(func0({1, 0, 1, 2, 5, 6}, 4, 5) == 11); return 0; }
O1
cpp
func0(std::vector<int, std::allocator<int> > const&, int, int): endbr64 cmp %edx,%esi jg 1238 <_Z5func0RKSt6vectorIiSaIiEEii+0x2f> mov (%rdi),%rcx movslq %esi,%rdi lea (%rcx,%rdi,4),%rax sub %esi,%edx add %rdi,%rdx lea 0x4(%rcx,%rdx,4),%rcx mov $0x0,%edx add (%rax),%edx add $0x4,%rax cmp ...
_Z5func0RKSt6vectorIiSaIiEEii: endbr64 cmp esi, edx jg short loc_1238 mov rcx, [rdi] movsxd rdi, esi lea rax, [rcx+rdi*4] sub edx, esi add rdx, rdi lea rcx, [rcx+rdx*4+4] mov edx, 0 loc_122A: add edx, [rax] add rax, 4 cmp rax, rcx jnz short loc_122A loc_1235: mov ea...
long long func0(_QWORD *a1, int a2, int a3) { _DWORD *v3; // rax unsigned long long v4; // rcx unsigned int v5; // edx if ( a2 > a3 ) { return 0; } else { v3 = (_DWORD *)(*a1 + 4LL * a2); v4 = *a1 + 4 * (a2 + (unsigned long long)(unsigned int)(a3 - a2)) + 4; v5 = 0; do v5 += ...
func0: ENDBR64 CMP ESI,EDX JG 0x00101238 MOV RCX,qword ptr [RDI] MOVSXD RDI,ESI LEA RAX,[RCX + RDI*0x4] SUB EDX,ESI ADD RDX,RDI LEA RCX,[RCX + RDX*0x4 + 0x4] MOV EDX,0x0 LAB_0010122a: ADD EDX,dword ptr [RAX] ADD RAX,0x4 CMP RAX,RCX JNZ 0x0010122a LAB_00101235: MOV EAX,EDX RET LAB_00101238: MOV EDX,0x0 JMP 0x00101235
/* func0(std::vector<int, std::allocator<int> > const&, int, int) */ int func0(vector *param_1,int param_2,int param_3) { int *piVar1; int iVar2; if (param_3 < param_2) { iVar2 = 0; } else { piVar1 = (int *)(*(long *)param_1 + (long)param_2 * 4); iVar2 = 0; do { iVar2 = iVar2 + *piV...
2,594
func0
#include <vector> #include <assert.h>
int func0(const std::vector<int>& nums, int m, int n) { int sum_range = 0; for (int i = m; i <= n; i++) { sum_range += nums[i]; } return sum_range; }
int main() { assert(func0({2, 1, 5, 6, 8, 3, 4, 9, 10, 11, 8, 12}, 8, 10) == 29); assert(func0({1, 2, 3, 4, 5}, 1, 2) == 5); assert(func0({1, 0, 1, 2, 5, 6}, 4, 5) == 11); return 0; }
O2
cpp
func0(std::vector<int, std::allocator<int> > const&, int, int): endbr64 cmp %edx,%esi jg 1410 <_Z5func0RKSt6vectorIiSaIiEEii+0x30> mov (%rdi),%rcx sub %esi,%edx movslq %esi,%rdi xor %r8d,%r8d add %rdi,%rdx lea (%rcx,%rdi,4),%rax lea 0x4(%rcx,%rdx,4),%rdx add (%rax),%r8d add $0x4,%rax cmp ...
_Z5func0RKSt6vectorIiSaIiEEii: endbr64 cmp esi, edx jg short loc_13D0 mov rcx, [rdi] sub edx, esi movsxd rdi, esi add rdx, rdi lea rax, [rcx+rdi*4] lea rcx, [rcx+rdx*4+4] xor edx, edx xchg ax, ax loc_13C0: add edx, [rax] add rax, 4 cmp rax, rcx jnz short loc_13C0 mov...
long long func0(_QWORD *a1, int a2, int a3) { _DWORD *v3; // rax unsigned long long v4; // rcx unsigned int v5; // edx if ( a2 > a3 ) return 0LL; v3 = (_DWORD *)(*a1 + 4LL * a2); v4 = *a1 + 4 * (a2 + (unsigned long long)(unsigned int)(a3 - a2)) + 4; v5 = 0; do v5 += *v3++; while ( v3 != (_DW...
func0: ENDBR64 CMP ESI,EDX JG 0x001013d0 MOV RCX,qword ptr [RDI] SUB EDX,ESI MOVSXD RDI,ESI ADD RDX,RDI LEA RAX,[RCX + RDI*0x4] LEA RCX,[RCX + RDX*0x4 + 0x4] XOR EDX,EDX NOP LAB_001013c0: ADD EDX,dword ptr [RAX] ADD RAX,0x4 CMP RAX,RCX JNZ 0x001013c0 MOV EAX,EDX RET LAB_001013d0: XOR EDX,EDX MOV EAX,EDX RET
/* func0(std::vector<int, std::allocator<int> > const&, int, int) */ int func0(vector *param_1,int param_2,int param_3) { int *piVar1; int iVar2; if (param_2 <= param_3) { piVar1 = (int *)(*(long *)param_1 + (long)param_2 * 4); iVar2 = 0; do { iVar2 = iVar2 + *piVar1; piVar1 = piVar1 ...
2,595
func0
#include <vector> #include <assert.h>
int func0(const std::vector<int>& nums, int m, int n) { int sum_range = 0; for (int i = m; i <= n; i++) { sum_range += nums[i]; } return sum_range; }
int main() { assert(func0({2, 1, 5, 6, 8, 3, 4, 9, 10, 11, 8, 12}, 8, 10) == 29); assert(func0({1, 2, 3, 4, 5}, 1, 2) == 5); assert(func0({1, 0, 1, 2, 5, 6}, 4, 5) == 11); return 0; }
O3
cpp
func0(std::vector<int, std::allocator<int> > const&, int, int): endbr64 cmp %edx,%esi jg 1450 <_Z5func0RKSt6vectorIiSaIiEEii+0xb0> mov %edx,%eax mov (%rdi),%r8 lea 0x1(%rdx),%edi sub %esi,%eax sub %esi,%edi cmp $0x3,%eax jbe 1459 <_Z5func0RKSt6vectorIiSaIiEEii+0xb9> mov %edi,%ecx movslq %...
_Z5func0RKSt6vectorIiSaIiEEii: endbr64 mov ecx, esi mov esi, edx cmp ecx, edx jg loc_1440 mov eax, edx mov r8, [rdi] sub eax, ecx lea edi, [rax+1] cmp eax, 2 jbe loc_1443 mov edx, edi movsxd rax, ecx pxor xmm0, xmm0 shr edx, 2 lea rax, [r8+rax*4] shl rdx, 4 a...
long long func0(long long *a1, int a2, int a3) { long long v5; // r8 unsigned int v6; // edi __m128i v7; // xmm0 const __m128i *v8; // rax const __m128i *v9; // rdx __m128i v10; // xmm2 __m128i v11; // xmm0 long long result; // rax long long v13; // rdi if ( a2 > a3 ) return 0LL; v5 = *a1; ...
func0: ENDBR64 MOV ECX,ESI MOV ESI,EDX CMP ECX,EDX JG 0x00101440 MOV EAX,EDX MOV R8,qword ptr [RDI] SUB EAX,ECX LEA EDI,[RAX + 0x1] CMP EAX,0x2 JBE 0x00101443 MOV EDX,EDI MOVSXD RAX,ECX PXOR XMM0,XMM0 SHR EDX,0x2 LEA RAX,[R8 + RAX*0x4] SHL RDX,0x4 ADD RDX,RAX NOP word ptr [RAX + RAX*0x1] LAB_001013e0: MOVDQU XMM2,xmmwo...
/* func0(std::vector<int, std::allocator<int> > const&, int, int) */ int func0(vector *param_1,int param_2,int param_3) { uint uVar1; long lVar2; long lVar3; int iVar4; int *piVar5; int *piVar6; int *piVar7; int *piVar8; int *piVar9; int iVar10; int iVar11; int iVar12; int iVar13; if (p...
2,596
func0
#include <iostream> #include <vector> #include <algorithm> #include <assert.h>
bool func0(std::vector<int> arr1, std::vector<int> arr2, int n, int m) { if (n != m) { return false; } sort(arr1.begin(), arr1.end()); sort(arr2.begin(), arr2.end()); for (int i = 0; i < n; ++i) { if (arr1[i] != arr2[i]) { return false; } } retu...
int main() { assert(func0({1, 2, 3}, {3, 2, 1}, 3, 3) == true); assert(func0({1, 1, 1}, {2, 2, 2}, 3, 3) == false); assert(func0({8, 9}, {4, 5, 6}, 2, 3) == false); return 0; }
O0
cpp
func0(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >, int, int): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x38,%rsp mov %rdi,-0x28(%rbp) mov %rsi,-0x30(%rbp) mov %edx,-0x34(%rbp) mov %ecx,-0x38(%rbp) mov -0x34(%rbp),%eax cmp -0x38(%rbp),%eax je 1296 ...
_Z5func0St6vectorIiSaIiEES1_ii: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 38h mov [rbp+var_28], rdi mov [rbp+var_30], rsi mov [rbp+var_34], edx mov [rbp+var_38], ecx mov eax, [rbp+var_34] cmp eax, [rbp+var_38] jz short loc_1276 mov eax, 0 jmp loc_131A loc_1276: m...
long long func0(long long a1, long long a2, int a3, int a4) { long long v5; // rbx long long v6; // rax long long v7; // rbx long long v8; // rax int v9; // ebx int i; // [rsp+2Ch] [rbp-14h] if ( a3 != a4 ) return 0LL; v5 = std::vector<int>::end(a1); v6 = std::vector<int>::begin(a1); std::sort...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x38 MOV qword ptr [RBP + -0x28],RDI MOV qword ptr [RBP + -0x30],RSI MOV dword ptr [RBP + -0x34],EDX MOV dword ptr [RBP + -0x38],ECX MOV EAX,dword ptr [RBP + -0x34] CMP EAX,dword ptr [RBP + -0x38] JZ 0x00101276 MOV EAX,0x0 JMP 0x0010131a LAB_00101276: MOV RAX,qword p...
/* func0(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >, int, int) */ int8 func0(vector param_1,vector param_2,int param_3,int param_4) { int iVar1; __normal_iterator _Var2; __normal_iterator _Var3; int8 uVar4; int *piVar5; int4 in_register_00000034; vector<int,std::a...
2,597
func0
#include <iostream> #include <vector> #include <algorithm> #include <assert.h>
bool func0(std::vector<int> arr1, std::vector<int> arr2, int n, int m) { if (n != m) { return false; } sort(arr1.begin(), arr1.end()); sort(arr2.begin(), arr2.end()); for (int i = 0; i < n; ++i) { if (arr1[i] != arr2[i]) { return false; } } retu...
int main() { assert(func0({1, 2, 3}, {3, 2, 1}, 3, 3) == true); assert(func0({1, 1, 1}, {2, 2, 2}, 3, 3) == false); assert(func0({8, 9}, {4, 5, 6}, 2, 3) == false); return 0; }
O1
cpp
func0(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >, int, int): endbr64 mov $0x0,%eax cmp %ecx,%edx je 1277 <_Z5func0St6vectorIiSaIiEES1_ii+0xe> retq push %r14 push %r13 push %r12 push %rbp push %rbx mov %rdi,%r12 mov %rsi,%rbp mov %edx,%ebx mov 0x8(%rdi)...
_Z5func0St6vectorIiSaIiEES1_ii: endbr64 mov eax, 0 cmp edx, ecx jz short loc_1237 retn loc_1237: push r14 push r13 push r12 push rbp push rbx mov r12, rdi mov rbp, rsi mov ebx, edx mov r14, [rdi+8] mov r13, [rdi] cmp r13, r14 jz short loc_128E mov rax, r14 su...
long long func0(_QWORD *a1, _QWORD *a2, int a3, int a4) { long long result; // rax long long v6; // r14 long long v7; // r13 int v8; // ecx unsigned long long v9; // rcx long long v10; // r14 long long v11; // r13 int v12; // ecx unsigned long long v13; // rcx long long v14; // rax result = 0LL;...
func0: ENDBR64 MOV EAX,0x0 CMP EDX,ECX JZ 0x00101237 RET LAB_00101237: PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX MOV R12,RDI MOV RBP,RSI MOV EBX,EDX MOV R14,qword ptr [RDI + 0x8] MOV R13,qword ptr [RDI] CMP R13,R14 JZ 0x0010128e MOV RAX,R14 SUB RAX,R13 SAR RAX,0x2 MOV ECX,0x40 JZ 0x0010126b BSR RCX,RAX XOR ECX,0x3f ...
/* func0(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >, int, int) */ int8 func0(vector param_1,vector param_2,int param_3,int param_4) { long lVar1; long lVar2; ulong uVar3; long lVar4; _Iter_less_iter _Var5; _Iter_less_iter extraout_EDX; _Iter_less_iter extraout_EDX...
2,598
func0
#include <iostream> #include <vector> #include <algorithm> #include <assert.h>
bool func0(std::vector<int> arr1, std::vector<int> arr2, int n, int m) { if (n != m) { return false; } sort(arr1.begin(), arr1.end()); sort(arr2.begin(), arr2.end()); for (int i = 0; i < n; ++i) { if (arr1[i] != arr2[i]) { return false; } } retu...
int main() { assert(func0({1, 2, 3}, {3, 2, 1}, 3, 3) == true); assert(func0({1, 1, 1}, {2, 2, 2}, 3, 3) == false); assert(func0({8, 9}, {4, 5, 6}, 2, 3) == false); return 0; }
O2
cpp
func0(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >, int, int) [clone .part.0]: push %r14 push %r13 push %r12 mov %edx,%r12d push %rbp mov %rdi,%rbp push %rbx mov 0x8(%rdi),%r14 mov %rsi,%rbx mov (%rdi),%r13 cmp %r13,%r14 je 1572 <_Z5func0St6vectorIiSaIiE...
_Z5func0St6vectorIiSaIiEES1_ii: endbr64 cmp edx, ecx jz short loc_18E0 xor eax, eax retn loc_18E0: push r14 push r13 push r12 mov r12, rdi push rbp mov rbp, rsi push rbx mov r14, [rdi+8] mov ebx, edx mov r13, [rdi] cmp r13, r14 jz short loc_192F mov rax, r14 ...
long long func0(_QWORD *a1, _QWORD *a2, int a3, int a4) { long long v5; // r14 long long v7; // r13 long long v8; // rdx unsigned long long v9; // rax long long v10; // r14 long long v11; // r13 long long v12; // rdx unsigned long long v13; // rax long long v14; // rax if ( a3 != a4 ) return 0...
func0: ENDBR64 CMP EDX,ECX JZ 0x001018e0 XOR EAX,EAX RET LAB_001018e0: PUSH R14 PUSH R13 PUSH R12 MOV R12,RDI PUSH RBP MOV RBP,RSI PUSH RBX MOV R14,qword ptr [RDI + 0x8] MOV EBX,EDX MOV R13,qword ptr [RDI] CMP R13,R14 JZ 0x0010192f MOV RAX,R14 MOV RDX,-0x2 SUB RAX,R13 SAR RAX,0x2 JZ 0x00101919 BSR RAX,RAX CDQE LEA RDX,...
/* func0(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >, int, int) */ int8 func0(vector param_1,vector param_2,int param_3,int param_4) { long lVar1; ulong uVar2; long lVar3; _Iter_less_iter extraout_EDX; _Iter_less_iter extraout_EDX_00; long lVar4; int4 in_register_0...
2,599
func0
#include <iostream> #include <vector> #include <algorithm> #include <assert.h>
bool func0(std::vector<int> arr1, std::vector<int> arr2, int n, int m) { if (n != m) { return false; } sort(arr1.begin(), arr1.end()); sort(arr2.begin(), arr2.end()); for (int i = 0; i < n; ++i) { if (arr1[i] != arr2[i]) { return false; } } retu...
int main() { assert(func0({1, 2, 3}, {3, 2, 1}, 3, 3) == true); assert(func0({1, 1, 1}, {2, 2, 2}, 3, 3) == false); assert(func0({8, 9}, {4, 5, 6}, 2, 3) == false); return 0; }
O3
cpp
func0(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >, int, int) [clone .part.0]: push %r15 push %r14 push %r13 push %r12 push %rbp mov %rdi,%rbp push %rbx mov %rsi,%rbx sub $0x18,%rsp mov 0x8(%rdi),%r15 mov (%rdi),%r12 mov %edx,0x8(%rsp) cmp %r12,%r15 je ...
_Z5func0St6vectorIiSaIiEES1_ii: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx movsxd rbx, edx sub rsp, 18h cmp ebx, ecx jz short loc_17A0 loc_1789: add rsp, 18h xor eax, eax pop rbx pop rbp pop r12 pop r13 pop r14 pop r15 retn loc_17A0: mov...
long long func0(char **a1, char **a2, int a3, int a4) { long long v4; // rbx char *v6; // r15 char *v7; // r14 unsigned long long v9; // rdx char *v10; // rcx char *v11; // r13 char *v12; // r8 int v13; // r9d char *v14; // rsi int v15; // edx char *i; // rax int v17; // ecx int v18; // edx ...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX MOVSXD RBX,EDX SUB RSP,0x18 CMP EBX,ECX JZ 0x001017a0 LAB_00101789: ADD RSP,0x18 XOR EAX,EAX POP RBX POP RBP POP R12 POP R13 POP R14 POP R15 RET LAB_001017a0: MOV R15,qword ptr [RDI + 0x8] MOV R14,qword ptr [RDI] MOV R12,RDI MOV RBP,RSI CMP R14,R15 JZ...
/* func0(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >, int, int) */ int8 func0(vector param_1,vector param_2,int param_3,int param_4,int param_5,int param_6, int param_7,int param_8,int param_9,int param_10,int4 param_11) { int iVar1; int *piVar2; int *piVar3; long l...
2,600
func0
#include <iostream> #include <set> #include <assert.h>
bool func0(const std::set<int>& test_tup1, const std::set<int>& test_tup2) { for (int elem : test_tup2) { if (test_tup1.find(elem) == test_tup1.end()) return false; } return true; }
int main() { assert(func0({10, 4, 5, 6}, {5, 10}) == true); assert(func0({1, 2, 3, 4}, {5, 6}) == false); assert(func0({7, 8, 9, 10}, {10, 8}) == true); return 0; }
O0
cpp
func0(std::set<int, std::less<int>, std::allocator<int> > const&, std::set<int, std::less<int>, std::allocator<int> > const&): endbr64 push %rbp mov %rsp,%rbp sub $0x50,%rsp mov %rdi,-0x48(%rbp) mov %rsi,-0x50(%rbp) mov %fs:0x28,%rax mov %rax,-0x8(%rbp) xor %eax,%eax mov -0x50(%rbp),%rax mov ...
_Z5func0RKSt3setIiSt4lessIiESaIiEES5_: endbr64 push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_48], rdi mov [rbp+var_50], rsi mov rax, fs:28h mov [rbp+var_8], rax xor eax, eax mov rax, [rbp+var_50] mov [rbp+var_10], rax mov rax, [rbp+var_10] mov rdi, rax call _ZNKSt3set...
long long func0(long long a1, long long a2) { int v3; // [rsp+1Ch] [rbp-34h] BYREF long long v4; // [rsp+20h] [rbp-30h] BYREF long long v5; // [rsp+28h] [rbp-28h] BYREF long long v6; // [rsp+30h] [rbp-20h] BYREF _QWORD v7[3]; // [rsp+38h] [rbp-18h] BYREF v7[2] = __readfsqword(0x28u); v7[1] = a2; v4 = ...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x48],RDI MOV qword ptr [RBP + -0x50],RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX XOR EAX,EAX MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,RAX CALL 0x001019f2 MOV qword pt...
/* func0(std::set<int, std::less<int>, std::allocator<int> > const&, std::set<int, std::less<int>, std::allocator<int> > const&) */ int8 func0(set *param_1,set *param_2) { char cVar1; int *piVar2; int8 uVar3; long in_FS_OFFSET; int local_3c; int8 local_38; int8 local_30; int8 local_28; int8 local...
2,601
func0
#include <iostream> #include <set> #include <assert.h>
bool func0(const std::set<int>& test_tup1, const std::set<int>& test_tup2) { for (int elem : test_tup2) { if (test_tup1.find(elem) == test_tup1.end()) return false; } return true; }
int main() { assert(func0({10, 4, 5, 6}, {5, 10}) == true); assert(func0({1, 2, 3, 4}, {5, 6}) == false); assert(func0({7, 8, 9, 10}, {10, 8}) == true); return 0; }
O1
cpp
func0(std::set<int, std::less<int>, std::allocator<int> > const&, std::set<int, std::less<int>, std::allocator<int> > const&): endbr64 push %r13 push %r12 push %rbp push %rbx sub $0x8,%rsp mov %rdi,%r12 mov 0x18(%rsi),%rdi lea 0x8(%rsi),%rbp cmp %rbp,%rdi je 12e6 <_Z5func0RKSt3setIiSt4lessIiE...
_Z5func0RKSt3setIiSt4lessIiESaIiEES5_: endbr64 push r12 push rbp push rbx mov rbx, rdi mov rdi, [rsi+18h] lea r12, [rsi+8] cmp r12, rdi jz short loc_1296 mov rbp, [rbx+10h] add rbx, 8 jmp short loc_12B8 loc_126B: mov rdx, [rdx+18h] loc_126F: test rdx, rdx jz short l...
long long func0(long long a1, long long a2) { long long v3; // rdi long long v4; // r12 long long v5; // rbp long long v6; // rbx long long v7; // rdx long long v8; // rsi int v10; // ecx v3 = *(_QWORD *)(a2 + 24); v4 = a2 + 8; if ( a2 + 8 == v3 ) return 1LL; v5 = *(_QWORD *)(a1 + 16); v6 ...
func0: ENDBR64 PUSH R12 PUSH RBP PUSH RBX MOV RBX,RDI MOV RDI,qword ptr [RSI + 0x18] LEA R12,[RSI + 0x8] CMP R12,RDI JZ 0x00101296 MOV RBP,qword ptr [RBX + 0x10] ADD RBX,0x8 JMP 0x001012b8 LAB_0010126b: MOV RDX,qword ptr [RDX + 0x18] LAB_0010126f: TEST RDX,RDX JZ 0x00101282 LAB_00101274: CMP ECX,dword ptr [RDX + 0x20] ...
/* func0(std::set<int, std::less<int>, std::allocator<int> > const&, std::set<int, std::less<int>, std::allocator<int> > const&) */ int8 func0(set *param_1,set *param_2) { set *psVar1; set *psVar2; set *psVar3; set *psVar4; set *psVar5; psVar2 = *(set **)(param_2 + 0x18); if (param_2 + 8 != psVar2...
2,602
func0
#include <iostream> #include <set> #include <assert.h>
bool func0(const std::set<int>& test_tup1, const std::set<int>& test_tup2) { for (int elem : test_tup2) { if (test_tup1.find(elem) == test_tup1.end()) return false; } return true; }
int main() { assert(func0({10, 4, 5, 6}, {5, 10}) == true); assert(func0({1, 2, 3, 4}, {5, 6}) == false); assert(func0({7, 8, 9, 10}, {10, 8}) == true); return 0; }
O2
cpp
func0(std::set<int, std::less<int>, std::allocator<int> > const&, std::set<int, std::less<int>, std::allocator<int> > const&): endbr64 push %r12 lea 0x8(%rsi),%r12 push %rbp push %rbx mov %rdi,%rbx mov 0x18(%rsi),%rdi cmp %r12,%rdi je 161d <_Z5func0RKSt3setIiSt4lessIiESaIiEES5_+0x6d> mov 0x10(%...
_Z5func0RKSt3setIiSt4lessIiESaIiEES5_: endbr64 push r12 push rbp lea rbp, [rsi+8] push rbx mov rax, [rsi+18h] cmp rbp, rax jz loc_1739 mov r12, [rdi+10h] xor edx, edx test r12, r12 jz short loc_170C mov r8d, [rax+20h] lea rbx, [rdi+8] nop dword ptr [rax+00h] loc_16D...
long long func0(long long a1, long long a2) { long long v2; // rbp long long v3; // rax long long v4; // r12 long long v5; // rdx int v6; // r8d long long v7; // rbx long long v8; // rdi long long v9; // rcx long long v10; // rsi v2 = a2 + 8; v3 = *(_QWORD *)(a2 + 24); if ( a2 + 8 == v3 ) { ...
func0: ENDBR64 PUSH R12 PUSH RBP LEA RBP,[RSI + 0x8] PUSH RBX MOV RAX,qword ptr [RSI + 0x18] CMP RBP,RAX JZ 0x00101739 MOV R12,qword ptr [RDI + 0x10] XOR EDX,EDX TEST R12,R12 JZ 0x0010170c MOV R8D,dword ptr [RAX + 0x20] LEA RBX,[RDI + 0x8] NOP dword ptr [RAX] LAB_001016d0: MOV RDI,RBX MOV RDX,R12 JMP 0x001016e8 LAB_001...
/* func0(std::set<int, std::less<int>, std::allocator<int> > const&, std::set<int, std::less<int>, std::allocator<int> > const&) */ ulong func0(set *param_1,set *param_2) { set *psVar1; set *psVar2; set *psVar3; _Rb_tree_node_base *p_Var4; set *psVar5; set *psVar6; set *psVar7; int iVar8; p_Va...
2,603
func0
#include <iostream> #include <set> #include <assert.h>
bool func0(const std::set<int>& test_tup1, const std::set<int>& test_tup2) { for (int elem : test_tup2) { if (test_tup1.find(elem) == test_tup1.end()) return false; } return true; }
int main() { assert(func0({10, 4, 5, 6}, {5, 10}) == true); assert(func0({1, 2, 3, 4}, {5, 6}) == false); assert(func0({7, 8, 9, 10}, {10, 8}) == true); return 0; }
O3
cpp
func0(std::set<int, std::less<int>, std::allocator<int> > const&, std::set<int, std::less<int>, std::allocator<int> > const&): endbr64 push %r12 lea 0x8(%rsi),%r12 push %rbp push %rbx mov %rdi,%rbx mov 0x18(%rsi),%rdi cmp %r12,%rdi je 156d <_Z5func0RKSt3setIiSt4lessIiESaIiEES5_+0x6d> mov 0x10(%...
_Z5func0RKSt3setIiSt4lessIiESaIiEES5_: endbr64 push r12 push rbp lea rbp, [rsi+8] push rbx mov rax, [rsi+18h] cmp rbp, rax jz short loc_180B mov r12, [rdi+10h] xor edx, edx test r12, r12 jz short loc_17EE mov r8d, [rax+20h] lea rbx, [rdi+8] nop dword ptr [rax+rax+00...
long long func0(long long a1, long long a2) { long long v2; // rbp long long v3; // rax long long v4; // r12 int v5; // r8d long long v6; // rbx long long v7; // rdi long long v8; // rdx long long v9; // rsi long long v10; // rcx v2 = a2 + 8; v3 = *(_QWORD *)(a2 + 24); if ( a2 + 8 == v3 ) ...
func0: ENDBR64 PUSH R12 PUSH RBP LEA RBP,[RSI + 0x8] PUSH RBX MOV RAX,qword ptr [RSI + 0x18] CMP RBP,RAX JZ 0x0010180b MOV R12,qword ptr [RDI + 0x10] XOR EDX,EDX TEST R12,R12 JZ 0x001017ee MOV R8D,dword ptr [RAX + 0x20] LEA RBX,[RDI + 0x8] NOP dword ptr [RAX + RAX*0x1] LAB_001017b0: MOV RDI,RBX MOV RDX,R12 JMP 0x001017...
/* func0(std::set<int, std::less<int>, std::allocator<int> > const&, std::set<int, std::less<int>, std::allocator<int> > const&) */ int8 func0(set *param_1,set *param_2) { set *psVar1; set *psVar2; set *psVar3; set *psVar4; _Rb_tree_node_base *p_Var5; set *psVar6; set *psVar7; int iVar8; p_Var...
2,604
func0
#include <vector> #include <tuple> #include <sstream> #include <assert.h> #include <iostream>
std::string func0(const std::vector<std::vector<std::tuple<int, int>>>& test_list) { std::vector<int> temp; for (const auto& sub : test_list) { for (const auto& ele : sub) { temp.push_back(std::get<0>(ele)); temp.push_back(std::get<1>(ele)); } } std::vecto...
int main() { assert(func0({{{4, 5}, {7, 8}}, {{10, 13}, {18, 17}}, {{0, 4}, {10, 1}}}) == "[(4, 7, 10, 18, 0, 10), (5, 8, 13, 17, 4, 1)]"); assert(func0({{{5, 6}, {8, 9}}, {{11, 14}, {19, 18}}, {{1, 5}, {11, 2}}}) == "[(5, 8, 11, 19, 1, 11), (6, 9, 14, 18, 5, 2)]"); assert(func0({...
O0
cpp
func0[abi:cxx11](std::vector<std::vector<std::tuple<int, int>, std::allocator<std::tuple<int, int> > >, std::allocator<std::vector<std::tuple<int, int>, std::allocator<std::tuple<int, int> > > > > const&): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x248,%rsp mov %rdi,-0x248(%rbp) mov %rsi,-0x250(%r...
_Z5func0B5cxx11RKSt6vectorIS_ISt5tupleIJiiEESaIS1_EESaIS3_EE: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 248h mov [rbp+var_248], rdi mov [rbp+var_250], rsi mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax lea rax, [rbp+var_1F0] mov rdi, rax call _ZNSt6vectorIiSaIiEEC2...
long long func0[abi:cxx11](long long a1, long long a2) { long long v2; // rax long long v3; // rax long long v4; // rax long long v5; // rax unsigned long long v6; // rax unsigned int *v7; // rax long long v8; // rax unsigned long long v9; // rax unsigned int *v10; // rax long long v11; // rax un...
func0[abi:cxx11]: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x248 MOV qword ptr [RBP + -0x248],RDI MOV qword ptr [RBP + -0x250],RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX LEA RAX,[RBP + -0x1f0] MOV RDI,RAX CALL 0x0010256a MOV RAX,qword ptr [RBP + -0x250] MOV qword ptr [RBP + -0x210]...
/* func0[abi:cxx11](std::vector<std::vector<std::tuple<int, int>, std::allocator<std::tuple<int, int> > >, std::allocator<std::vector<std::tuple<int, int>, std::allocator<std::tuple<int, int> > > > > const&) */ vector * func0_abi_cxx11_(vector *param_1) { bool bVar1; type *ptVar2; type *ptVar3; ulong uV...
2,605
func0
#include <vector> #include <tuple> #include <sstream> #include <assert.h> #include <iostream>
std::string func0(const std::vector<std::vector<std::tuple<int, int>>>& test_list) { std::vector<int> temp; for (const auto& sub : test_list) { for (const auto& ele : sub) { temp.push_back(std::get<0>(ele)); temp.push_back(std::get<1>(ele)); } } std::vecto...
int main() { assert(func0({{{4, 5}, {7, 8}}, {{10, 13}, {18, 17}}, {{0, 4}, {10, 1}}}) == "[(4, 7, 10, 18, 0, 10), (5, 8, 13, 17, 4, 1)]"); assert(func0({{{5, 6}, {8, 9}}, {{11, 14}, {19, 18}}, {{1, 5}, {11, 2}}}) == "[(5, 8, 11, 19, 1, 11), (6, 9, 14, 18, 5, 2)]"); assert(func0({...
O1
cpp
func0[abi:cxx11](std::vector<std::vector<std::tuple<int, int>, std::allocator<std::tuple<int, int> > >, std::allocator<std::vector<std::tuple<int, int>, std::allocator<std::tuple<int, int> > > > > const&): endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x1f8,%rsp mov %rdi,%r1...
_Z5func0B5cxx11RKSt6vectorIS_ISt5tupleIJiiEESaIS1_EESaIS3_EE: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 1F8h mov r14, rdi mov rax, fs:28h mov [rsp+228h+var_40], rax xor eax, eax mov [rsp+228h+var_218], 0 mov [rsp+228h+var_210], 0 mov [rsp+22...
long long func0[abi:cxx11](long long a1, long long *a2) { long long v2; // r12 long long v3; // r15 _DWORD *v4; // rbx char *v5; // rsi char *v6; // rsi _DWORD *v7; // rbp void *v8; // r15 unsigned long long v9; // r12 _DWORD *v10; // rbp unsigned long long v11; // rbx char *v12; // rsi char *v...
func0[abi:cxx11]: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x1f8 MOV R14,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x1e8],RAX XOR EAX,EAX MOV qword ptr [RSP + 0x10],0x0 MOV qword ptr [RSP + 0x18],0x0 MOV qword ptr [RSP + 0x20],0x0 MOV R12,qword ptr [RSI] MOV R15,qword ptr [RSI + ...
/* func0[abi:cxx11](std::vector<std::vector<std::tuple<int, int>, std::allocator<std::tuple<int, int> > >, std::allocator<std::vector<std::tuple<int, int>, std::allocator<std::tuple<int, int> > > > > const&) */ vector * func0_abi_cxx11_(vector *param_1) { int8 *puVar1; int *piVar2; int *piVar3; ulong uV...
2,606
func0
#include <vector> #include <tuple> #include <sstream> #include <assert.h> #include <iostream>
std::string func0(const std::vector<std::vector<std::tuple<int, int>>>& test_list) { std::vector<int> temp; for (const auto& sub : test_list) { for (const auto& ele : sub) { temp.push_back(std::get<0>(ele)); temp.push_back(std::get<1>(ele)); } } std::vecto...
int main() { assert(func0({{{4, 5}, {7, 8}}, {{10, 13}, {18, 17}}, {{0, 4}, {10, 1}}}) == "[(4, 7, 10, 18, 0, 10), (5, 8, 13, 17, 4, 1)]"); assert(func0({{{5, 6}, {8, 9}}, {{11, 14}, {19, 18}}, {{1, 5}, {11, 2}}}) == "[(5, 8, 11, 19, 1, 11), (6, 9, 14, 18, 5, 2)]"); assert(func0({...
O2
cpp
func0[abi:cxx11](std::vector<std::vector<std::tuple<int, int>, std::allocator<std::tuple<int, int> > >, std::allocator<std::vector<std::tuple<int, int>, std::allocator<std::tuple<int, int> > > > > const&): endbr64 push %r15 push %r14 push %r13 push %r12 mov %rdi,%r12 push %rbp push %rbx sub $0x208,%rs...
_Z5func0B5cxx11RKSt6vectorIS_ISt5tupleIJiiEESaIS1_EESaIS3_EE: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 238h mov r13, [rsi] mov r15, [rsi+8] xor esi, esi mov [rsp+268h+var_260], rdi lea r12, [rsp+268h+var_218] mov rax, fs:28h mov [rsp+268h+v...
long long func0[abi:cxx11](long long a1, int ***a2) { int **v2; // r13 int **v3; // r15 _DWORD *v4; // rsi int *v5; // rbx int *v6; // rbp _DWORD *v7; // rsi int v8; // eax _DWORD *v9; // rax void *v10; // r15 unsigned long long v11; // rbx int *v12; // rbp unsigned long long v13; // r12 char...
func0[abi:cxx11]: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x238 MOV R13,qword ptr [RSI] MOV R15,qword ptr [RSI + 0x8] XOR ESI,ESI MOV qword ptr [RSP + 0x8],RDI LEA R12,[RSP + 0x50] MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x228],RAX LEA RAX,[0x105bd0] MOV qword ptr [RSP + 0x60],0x0...
/* func0[abi:cxx11](std::vector<std::vector<std::tuple<int, int>, std::allocator<std::tuple<int, int> > >, std::allocator<std::vector<std::tuple<int, int>, std::allocator<std::tuple<int, int> > > > > const&) */ vector * func0_abi_cxx11_(vector *param_1) { int iVar1; long *plVar2; pointer_____offset_0x10__...
2,607
func0
#include <vector> #include <tuple> #include <sstream> #include <assert.h> #include <iostream>
std::string func0(const std::vector<std::vector<std::tuple<int, int>>>& test_list) { std::vector<int> temp; for (const auto& sub : test_list) { for (const auto& ele : sub) { temp.push_back(std::get<0>(ele)); temp.push_back(std::get<1>(ele)); } } std::vecto...
int main() { assert(func0({{{4, 5}, {7, 8}}, {{10, 13}, {18, 17}}, {{0, 4}, {10, 1}}}) == "[(4, 7, 10, 18, 0, 10), (5, 8, 13, 17, 4, 1)]"); assert(func0({{{5, 6}, {8, 9}}, {{11, 14}, {19, 18}}, {{1, 5}, {11, 2}}}) == "[(5, 8, 11, 19, 1, 11), (6, 9, 14, 18, 5, 2)]"); assert(func0({...
O3
cpp
func0[abi:cxx11](std::vector<std::vector<std::tuple<int, int>, std::allocator<std::tuple<int, int> > >, std::allocator<std::vector<std::tuple<int, int>, std::allocator<std::tuple<int, int> > > > > const&): endbr64 push %r15 pxor %xmm0,%xmm0 push %r14 push %r13 push %r12 mov %rdi,%r12 push %rbp push %rb...
_Z5func0B5cxx11RKSt6vectorIS_ISt5tupleIJiiEESaIS1_EESaIS3_EE: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 238h mov r13, [rsi] mov r15, [rsi+8] xor esi, esi mov [rsp+268h+var_260], rdi lea r12, [rsp+268h+var_218] mov rax, fs:28h mov [rsp+268h+v...
long long func0[abi:cxx11](long long a1, int ***a2) { int **v2; // r13 int **v3; // r15 _DWORD *v4; // rsi int *v5; // rbx int *v6; // rbp _DWORD *v7; // rsi int v8; // eax _DWORD *v9; // rax void *v10; // r15 unsigned long long v11; // rbx int *v12; // rbp unsigned long long v13; // r12 char...
func0[abi:cxx11]: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x238 MOV R13,qword ptr [RSI] MOV R15,qword ptr [RSI + 0x8] XOR ESI,ESI MOV qword ptr [RSP + 0x8],RDI LEA R12,[RSP + 0x50] MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x228],RAX LEA RAX,[0x105bd8] MOV qword ptr [RSP + 0x60],0x0...
/* func0[abi:cxx11](std::vector<std::vector<std::tuple<int, int>, std::allocator<std::tuple<int, int> > >, std::allocator<std::vector<std::tuple<int, int>, std::allocator<std::tuple<int, int> > > > > const&) */ vector * func0_abi_cxx11_(vector *param_1) { int iVar1; long *plVar2; pointer_____offset_0x10__...
2,608
func0
#include <map> #include <vector> #include <utility> #include <assert.h>
std::map<std::string, std::vector<int>> func0(std::vector<std::pair<std::string, int>> l) { std::map<std::string, std::vector<int>> d; for (auto& p : l) { d[p.first].push_back(p.second); } return d; }
int main() { assert((func0({{"yellow", 1}, {"blue", 2}, {"yellow", 3}, {"blue", 4}, {"red", 1}}) == std::map<std::string, std::vector<int>>{{"yellow", {1, 3}}, {"blue", {2, 4}}, {"red", {1}}})); assert((func0({{"yellow", 10}, {"blue", 20}, {"yellow", 30}, {"blue", 40}, {"red", 10}}) ...
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> > >): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x48,%rsp mov %rdi,-0x48(%rb...
2,609
func0
#include <map> #include <vector> #include <utility> #include <assert.h>
std::map<std::string, std::vector<int>> func0(std::vector<std::pair<std::string, int>> l) { std::map<std::string, std::vector<int>> d; for (auto& p : l) { d[p.first].push_back(p.second); } return d; }
int main() { assert((func0({{"yellow", 1}, {"blue", 2}, {"yellow", 3}, {"blue", 4}, {"red", 1}}) == std::map<std::string, std::vector<int>>{{"yellow", {1, 3}}, {"blue", {2, 4}}, {"red", {1}}})); assert((func0({{"yellow", 10}, {"blue", 20}, {"yellow", 30}, {"blue", 40}, {"red", 10}}) ...
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> > >): endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $...
2,610
func0
#include <map> #include <vector> #include <utility> #include <assert.h>
std::map<std::string, std::vector<int>> func0(std::vector<std::pair<std::string, int>> l) { std::map<std::string, std::vector<int>> d; for (auto& p : l) { d[p.first].push_back(p.second); } return d; }
int main() { assert((func0({{"yellow", 1}, {"blue", 2}, {"yellow", 3}, {"blue", 4}, {"red", 1}}) == std::map<std::string, std::vector<int>>{{"yellow", {1, 3}}, {"blue", {2, 4}}, {"red", {1}}})); assert((func0({{"yellow", 10}, {"blue", 20}, {"yellow", 30}, {"blue", 40}, {"red", 10}}) ...
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> > >): endbr64 push %r15 push %r14 push %r13 lea 0x8(%rdi),%r13 push %r12 mov %rd...
2,611
func0
#include <map> #include <vector> #include <utility> #include <assert.h>
std::map<std::string, std::vector<int>> func0(std::vector<std::pair<std::string, int>> l) { std::map<std::string, std::vector<int>> d; for (auto& p : l) { d[p.first].push_back(p.second); } return d; }
int main() { assert((func0({{"yellow", 1}, {"blue", 2}, {"yellow", 3}, {"blue", 4}, {"red", 1}}) == std::map<std::string, std::vector<int>>{{"yellow", {1, 3}}, {"blue", {2, 4}}, {"red", {1}}})); assert((func0({{"yellow", 10}, {"blue", 20}, {"yellow", 30}, {"blue", 40}, {"red", 10}}) ...
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> > >): endbr64 push %r15 push %r14 lea 0x8(%rdi),%r14 push %r13 mov %rdi,%r13 push ...
2,612
func0
#include <assert.h>
int func0(int l, int b) { int perimeter = 2 * (l + b); return perimeter; }
int main() { assert(func0(10, 20) == 60); assert(func0(10, 5) == 30); assert(func0(4, 2) == 12); return 0; }
O0
cpp
func0(int, int): endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x14(%rbp) mov %esi,-0x18(%rbp) mov -0x14(%rbp),%edx mov -0x18(%rbp),%eax add %edx,%eax add %eax,%eax mov %eax,-0x4(%rbp) mov -0x4(%rbp),%eax pop %rbp retq
_Z5func0ii: endbr64 push rbp mov rbp, rsp mov [rbp+var_14], edi mov [rbp+var_18], esi mov edx, [rbp+var_14] mov eax, [rbp+var_18] add eax, edx add eax, eax mov [rbp+var_4], eax mov eax, [rbp+var_4] pop rbp retn
long long func0(int a1, int a2) { return (unsigned int)(2 * (a1 + a2)); }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x14],EDI MOV dword ptr [RBP + -0x18],ESI MOV EDX,dword ptr [RBP + -0x14] MOV EAX,dword ptr [RBP + -0x18] ADD EAX,EDX ADD EAX,EAX MOV dword ptr [RBP + -0x4],EAX MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
/* func0(int, int) */ int func0(int param_1,int param_2) { return (param_2 + param_1) * 2; }
2,613
func0
#include <assert.h>
int func0(int l, int b) { int perimeter = 2 * (l + b); return perimeter; }
int main() { assert(func0(10, 20) == 60); assert(func0(10, 5) == 30); assert(func0(4, 2) == 12); return 0; }
O1
cpp
func0(int, int): endbr64 add %esi,%edi lea (%rdi,%rdi,1),%eax retq
_Z5func0ii: endbr64 add edi, esi lea eax, [rdi+rdi] retn
long long func0(int a1, int a2) { return (unsigned int)(2 * (a2 + a1)); }
func0: ENDBR64 ADD EDI,ESI LEA EAX,[RDI + RDI*0x1] RET
/* func0(int, int) */ int func0(int param_1,int param_2) { return (param_1 + param_2) * 2; }
2,614
func0
#include <assert.h>
int func0(int l, int b) { int perimeter = 2 * (l + b); return perimeter; }
int main() { assert(func0(10, 20) == 60); assert(func0(10, 5) == 30); assert(func0(4, 2) == 12); return 0; }
O2
cpp
func0(int, int): endbr64 add %esi,%edi lea (%rdi,%rdi,1),%eax retq nopw 0x0(%rax,%rax,1)
_Z5func0ii: endbr64 add edi, esi lea eax, [rdi+rdi] retn
long long func0(int a1, int a2) { return (unsigned int)(2 * (a2 + a1)); }
func0: ENDBR64 ADD EDI,ESI LEA EAX,[RDI + RDI*0x1] RET
/* func0(int, int) */ int func0(int param_1,int param_2) { return (param_1 + param_2) * 2; }
2,615
func0
#include <assert.h>
int func0(int l, int b) { int perimeter = 2 * (l + b); return perimeter; }
int main() { assert(func0(10, 20) == 60); assert(func0(10, 5) == 30); assert(func0(4, 2) == 12); return 0; }
O3
cpp
func0(int, int): endbr64 add %esi,%edi lea (%rdi,%rdi,1),%eax retq nopw 0x0(%rax,%rax,1)
_Z5func0ii: endbr64 add edi, esi lea eax, [rdi+rdi] retn
long long func0(int a1, int a2) { return (unsigned int)(2 * (a2 + a1)); }
func0: ENDBR64 ADD EDI,ESI LEA EAX,[RDI + RDI*0x1] RET
/* func0(int, int) */ int func0(int param_1,int param_2) { return (param_1 + param_2) * 2; }
2,616
func0
#include <iostream> #include <cassert>
int func0(int n) { int sm = 0; for (int i = 1; i <= n; i++) { sm = sm + (i * i * i * i * i); } return sm; }
int main() { assert(func0(2) == 33); assert(func0(4) == 1300); assert(func0(3) == 276); return 0; }
O0
cpp
func0(int): endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x14(%rbp) movl $0x0,-0x8(%rbp) movl $0x1,-0x4(%rbp) mov -0x4(%rbp),%eax cmp -0x14(%rbp),%eax jg 11c5 <_Z5func0i+0x3c> mov -0x4(%rbp),%eax imul %eax,%eax imul -0x4(%rbp),%eax imul -0x4(%rbp),%eax imul -0x4(%rbp),%eax add %eax,-0x8...
_Z5func0i: endbr64 push rbp mov rbp, rsp mov [rbp+var_14], edi mov [rbp+var_8], 0 mov [rbp+var_4], 1 jmp short loc_117D loc_1164: mov eax, [rbp+var_4] imul eax, eax imul eax, [rbp+var_4] imul eax, [rbp+var_4] imul eax, [rbp+var_4] add [rbp+var_8], eax add [rbp+var_4], 1 lo...
long long func0(int a1) { unsigned int v2; // [rsp+Ch] [rbp-8h] int i; // [rsp+10h] [rbp-4h] v2 = 0; for ( i = 1; i <= a1; ++i ) v2 += i * i * i * i * i; return v2; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x14],EDI MOV dword ptr [RBP + -0x8],0x0 MOV dword ptr [RBP + -0x4],0x1 JMP 0x0010117d LAB_00101164: MOV EAX,dword ptr [RBP + -0x4] IMUL EAX,EAX IMUL EAX,dword ptr [RBP + -0x4] IMUL EAX,dword ptr [RBP + -0x4] IMUL EAX,dword ptr [RBP + -0x4] ADD dword ptr [RBP + ...
/* func0(int) */ int func0(int param_1) { int4 local_10; int4 local_c; local_10 = 0; for (local_c = 1; local_c <= param_1; local_c = local_c + 1) { local_10 = local_10 + local_c * local_c * local_c * local_c * local_c; } return local_10; }
2,617
func0
#include <iostream> #include <cassert>
int func0(int n) { int sm = 0; for (int i = 1; i <= n; i++) { sm = sm + (i * i * i * i * i); } return sm; }
int main() { assert(func0(2) == 33); assert(func0(4) == 1300); assert(func0(3) == 276); return 0; }
O1
cpp
func0(int): endbr64 test %edi,%edi jle 11b5 <_Z5func0i+0x2c> add $0x1,%edi mov $0x1,%edx mov $0x0,%ecx mov %edx,%eax imul %edx,%eax imul %eax,%eax imul %edx,%eax add %eax,%ecx add $0x1,%edx cmp %edi,%edx jne 119e <_Z5func0i+0x15> mov %ecx,%eax retq mov $0x0,%ecx jmp 11b2 <_Z5...
_Z5func0i: endbr64 test edi, edi jle short loc_1175 add edi, 1 mov edx, 1 mov ecx, 0 loc_115E: mov eax, edx imul eax, edx imul eax, eax imul eax, edx add ecx, eax add edx, 1 cmp edx, edi jnz short loc_115E loc_1172: mov eax, ecx retn loc_1175: mov ecx, 0 jmp s...
long long func0(int a1) { int v1; // edi int v2; // edx unsigned int v3; // ecx if ( a1 <= 0 ) { return 0; } else { v1 = a1 + 1; v2 = 1; v3 = 0; do { v3 += v2 * v2 * v2 * v2 * v2; ++v2; } while ( v2 != v1 ); } return v3; }
func0: ENDBR64 TEST EDI,EDI JLE 0x00101175 ADD EDI,0x1 MOV EDX,0x1 MOV ECX,0x0 LAB_0010115e: MOV EAX,EDX IMUL EAX,EDX IMUL EAX,EAX IMUL EAX,EDX ADD ECX,EAX ADD EDX,0x1 CMP EDX,EDI JNZ 0x0010115e LAB_00101172: MOV EAX,ECX RET LAB_00101175: MOV ECX,0x0 JMP 0x00101172
/* func0(int) */ int func0(int param_1) { int iVar1; int iVar2; if (param_1 < 1) { iVar1 = 0; } else { iVar2 = 1; iVar1 = 0; do { iVar1 = iVar1 + iVar2 * iVar2 * iVar2 * iVar2 * iVar2; iVar2 = iVar2 + 1; } while (iVar2 != param_1 + 1); } return iVar1; }
2,618
func0
#include <iostream> #include <cassert>
int func0(int n) { int sm = 0; for (int i = 1; i <= n; i++) { sm = sm + (i * i * i * i * i); } return sm; }
int main() { assert(func0(2) == 33); assert(func0(4) == 1300); assert(func0(3) == 276); return 0; }
O2
cpp
func0(int): endbr64 test %edi,%edi jle 11f8 <_Z5func0i+0x38> add $0x1,%edi mov $0x1,%edx xor %r8d,%r8d nopl 0x0(%rax,%rax,1) mov %edx,%eax imul %edx,%eax imul %eax,%eax imul %edx,%eax add $0x1,%edx add %eax,%r8d cmp %edx,%edi jne 11d8 <_Z5func0i+0x18> mov %r8d,%eax retq nopl 0x...
_Z5func0i: endbr64 test edi, edi jle short loc_1170 add edi, 1 mov edx, 1 xor ecx, ecx nop word ptr [rax+rax+00h] loc_1158: mov eax, edx imul eax, edx imul eax, eax imul eax, edx add edx, 1 add ecx, eax cmp edi, edx jnz short loc_1158 mov eax, ecx retn loc_1170: x...
long long func0(int a1) { int v1; // edi int v2; // edx unsigned int v3; // ecx int v4; // eax if ( a1 <= 0 ) return 0LL; v1 = a1 + 1; v2 = 1; v3 = 0; do { v4 = v2 * v2 * v2 * v2 * v2; ++v2; v3 += v4; } while ( v1 != v2 ); return v3; }
func0: ENDBR64 TEST EDI,EDI JLE 0x00101170 ADD EDI,0x1 MOV EDX,0x1 XOR ECX,ECX NOP word ptr [RAX + RAX*0x1] LAB_00101158: MOV EAX,EDX IMUL EAX,EDX IMUL EAX,EAX IMUL EAX,EDX ADD EDX,0x1 ADD ECX,EAX CMP EDI,EDX JNZ 0x00101158 MOV EAX,ECX RET LAB_00101170: XOR ECX,ECX MOV EAX,ECX RET
/* func0(int) */ int func0(int param_1) { int iVar1; int iVar2; int iVar3; if (0 < param_1) { iVar3 = 1; iVar2 = 0; do { iVar1 = iVar3 * iVar3 * iVar3 * iVar3 * iVar3; iVar3 = iVar3 + 1; iVar2 = iVar2 + iVar1; } while (param_1 + 1 != iVar3); return iVar2; } return ...
2,619
func0
#include <iostream> #include <cassert>
int func0(int n) { int sm = 0; for (int i = 1; i <= n; i++) { sm = sm + (i * i * i * i * i); } return sm; }
int main() { assert(func0(2) == 33); assert(func0(4) == 1300); assert(func0(3) == 276); return 0; }
O3
cpp
func0(int): endbr64 test %edi,%edi jle 11f8 <_Z5func0i+0x38> add $0x1,%edi mov $0x1,%edx xor %r8d,%r8d nopl 0x0(%rax,%rax,1) mov %edx,%eax imul %edx,%eax imul %eax,%eax imul %edx,%eax add $0x1,%edx add %eax,%r8d cmp %edi,%edx jne 11d8 <_Z5func0i+0x18> mov %r8d,%eax retq nopl 0x...
_Z5func0i: endbr64 test edi, edi jle short loc_1170 add edi, 1 mov edx, 1 xor ecx, ecx nop word ptr [rax+rax+00h] loc_1158: mov eax, edx imul eax, edx imul eax, eax imul eax, edx add edx, 1 add ecx, eax cmp edx, edi jnz short loc_1158 mov eax, ecx retn loc_1170: x...
long long func0(int a1) { int v1; // edi int v2; // edx unsigned int v3; // ecx int v4; // eax if ( a1 <= 0 ) return 0LL; v1 = a1 + 1; v2 = 1; v3 = 0; do { v4 = v2 * v2 * v2 * v2 * v2; ++v2; v3 += v4; } while ( v2 != v1 ); return v3; }
func0: ENDBR64 TEST EDI,EDI JLE 0x00101170 ADD EDI,0x1 MOV EDX,0x1 XOR ECX,ECX NOP word ptr [RAX + RAX*0x1] LAB_00101158: MOV EAX,EDX IMUL EAX,EDX IMUL EAX,EAX IMUL EAX,EDX ADD EDX,0x1 ADD ECX,EAX CMP EDX,EDI JNZ 0x00101158 MOV EAX,ECX RET LAB_00101170: XOR ECX,ECX MOV EAX,ECX RET
/* func0(int) */ int func0(int param_1) { int iVar1; int iVar2; int iVar3; if (0 < param_1) { iVar3 = 1; iVar2 = 0; do { iVar1 = iVar3 * iVar3 * iVar3 * iVar3 * iVar3; iVar3 = iVar3 + 1; iVar2 = iVar2 + iVar1; } while (iVar3 != param_1 + 1); return iVar2; } return ...
2,620
func0
#include <iostream> #include <vector> #include <algorithm> #include <cmath> #include <assert.h>
int func0(std::vector<int> a, std::vector<int> b, int n) { std::sort(a.begin(), a.end()); std::sort(b.begin(), b.end()); int sum = 0; for (int i = 0; i < n; i++) { sum += std::abs(a[i] - b[i]); } return sum; }
int main() { assert(func0({3, 2, 1}, {2, 1, 3}, 3) == 0); assert(func0({1, 2, 3}, {4, 5, 6}, 3) == 9); assert(func0({4, 1, 8, 7}, {2, 3, 6, 5}, 4) == 6); return 0; }
O0
cpp
func0(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >, int): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x38,%rsp mov %rdi,-0x28(%rbp) mov %rsi,-0x30(%rbp) mov %edx,-0x34(%rbp) mov -0x28(%rbp),%rax mov %rax,%rdi callq 19a2 <_ZNSt6vectorIiSaIiEE3endEv> mov ...
_Z5func0St6vectorIiSaIiEES1_i: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 38h mov [rbp+var_28], rdi mov [rbp+var_30], rsi mov [rbp+var_34], edx mov rax, [rbp+var_28] mov rdi, rax call _ZNSt6vectorIiSaIiEE3endEv; std::vector<int>::end(void) mov rbx, rax mov rax, [rbp+var...
long long func0(long long a1, long long a2, int a3) { long long v3; // rbx long long v4; // rax long long v5; // rbx long long v6; // rax int v7; // ebx int v8; // eax unsigned int v11; // [rsp+28h] [rbp-18h] int i; // [rsp+2Ch] [rbp-14h] v3 = std::vector<int>::end(a1); v4 = std::vector<int>::begi...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x38 MOV qword ptr [RBP + -0x28],RDI MOV qword ptr [RBP + -0x30],RSI MOV dword ptr [RBP + -0x34],EDX MOV RAX,qword ptr [RBP + -0x28] MOV RDI,RAX CALL 0x00101912 MOV RBX,RAX MOV RAX,qword ptr [RBP + -0x28] MOV RDI,RAX CALL 0x001018c6 MOV RSI,RBX MOV RDI,RAX CALL 0x001...
/* func0(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >, int) */ int func0(vector param_1,vector param_2,int param_3) { __normal_iterator _Var1; __normal_iterator _Var2; int iVar3; int *piVar4; int4 in_register_00000034; vector<int,std::allocator<int>> *this; int4 in_regi...
2,621
func0
#include <iostream> #include <vector> #include <algorithm> #include <cmath> #include <assert.h>
int func0(std::vector<int> a, std::vector<int> b, int n) { std::sort(a.begin(), a.end()); std::sort(b.begin(), b.end()); int sum = 0; for (int i = 0; i < n; i++) { sum += std::abs(a[i] - b[i]); } return sum; }
int main() { assert(func0({3, 2, 1}, {2, 1, 3}, 3) == 0); assert(func0({1, 2, 3}, {4, 5, 6}, 3) == 9); assert(func0({4, 1, 8, 7}, {2, 3, 6, 5}, 4) == 6); return 0; }
O1
cpp
func0(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >, int): endbr64 push %r14 push %r13 push %r12 push %rbp push %rbx mov %rdi,%rbp mov %rsi,%rbx mov %edx,%r12d mov 0x8(%rdi),%r14 mov (%rdi),%r13 cmp %r14,%r13 je 12bf <_Z5func0St6vectorIiSaIiEES1_i+0x56> m...
_Z5func0St6vectorIiSaIiEES1_i: endbr64 push r14 push r13 push r12 push rbp push rbx mov r12, rdi mov rbp, rsi mov ebx, edx mov r14, [rdi+8] mov r13, [rdi] cmp r13, r14 jz short loc_1284 mov rax, r14 sub rax, r13 sar rax, 2 mov ecx, 40h ; '@' jz short loc_...
long long func0(_QWORD *a1, _QWORD *a2, int a3) { long long v4; // r14 long long v5; // r13 int v6; // ecx unsigned long long v7; // rcx long long v8; // r14 long long v9; // r13 int v10; // ecx unsigned long long v11; // rcx long long v12; // r9 long long v13; // r8 long long v14; // rdx unsig...
func0: ENDBR64 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX MOV R12,RDI MOV RBP,RSI MOV EBX,EDX MOV R14,qword ptr [RDI + 0x8] MOV R13,qword ptr [RDI] CMP R13,R14 JZ 0x00101284 MOV RAX,R14 SUB RAX,R13 SAR RAX,0x2 MOV ECX,0x40 JZ 0x00101261 BSR RCX,RAX XOR ECX,0x3f LAB_00101261: MOV EDX,0x3f SUB EDX,ECX MOVSXD RDX,EDX AD...
/* func0(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >, int) */ int func0(vector param_1,vector param_2,int param_3) { long lVar1; long lVar2; int iVar3; ulong uVar4; _Iter_less_iter _Var5; _Iter_less_iter extraout_EDX; _Iter_less_iter extraout_EDX_00; long lVar6; in...
2,622
func0
#include <iostream> #include <vector> #include <algorithm> #include <cmath> #include <assert.h>
int func0(std::vector<int> a, std::vector<int> b, int n) { std::sort(a.begin(), a.end()); std::sort(b.begin(), b.end()); int sum = 0; for (int i = 0; i < n; i++) { sum += std::abs(a[i] - b[i]); } return sum; }
int main() { assert(func0({3, 2, 1}, {2, 1, 3}, 3) == 0); assert(func0({1, 2, 3}, {4, 5, 6}, 3) == 9); assert(func0({4, 1, 8, 7}, {2, 3, 6, 5}, 4) == 6); return 0; }
O2
cpp
func0(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >, int): endbr64 push %r14 push %r13 push %r12 mov %edx,%r12d push %rbp mov %rdi,%rbp push %rbx mov 0x8(%rdi),%r14 mov %rsi,%rbx mov (%rdi),%r13 cmp %r14,%r13 je 15c6 <_Z5func0St6vectorIiSaIiEES1_i+0x56> m...
_Z5func0St6vectorIiSaIiEES1_i: endbr64 push r14 push r13 push r12 mov r12, rdi push rbp mov rbp, rsi push rbx mov r14, [rdi+8] mov ebx, edx mov r13, [rdi] cmp r13, r14 jz short loc_1913 mov rax, r14 mov rdx, 0FFFFFFFFFFFFFFFEh sub rax, r13 sar rax, 2 jz s...
long long func0(_QWORD *a1, _QWORD *a2, int a3) { long long v3; // r14 long long v5; // r13 long long v6; // rdx unsigned long long v7; // rax long long v8; // r14 long long v9; // r13 long long v10; // rdx unsigned long long v11; // rax long long v12; // r9 long long v13; // r8 long long v14; //...
func0: ENDBR64 PUSH R14 PUSH R13 PUSH R12 MOV R12,RDI PUSH RBP MOV RBP,RSI PUSH RBX MOV R14,qword ptr [RDI + 0x8] MOV EBX,EDX MOV R13,qword ptr [RDI] CMP R13,R14 JZ 0x00101913 MOV RAX,R14 MOV RDX,-0x2 SUB RAX,R13 SAR RAX,0x2 JZ 0x001018fd BSR RAX,RAX CDQE LEA RDX,[RAX + RAX*0x1] LAB_001018fd: MOV RSI,R14 MOV RDI,R13 CA...
/* func0(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >, int) */ int func0(vector param_1,vector param_2,int param_3) { long lVar1; int iVar2; ulong uVar3; _Iter_less_iter in_ECX; _Iter_less_iter extraout_EDX; _Iter_less_iter extraout_EDX_00; long lVar4; long lVar5; i...
2,623
func0
#include <iostream> #include <vector> #include <algorithm> #include <cmath> #include <assert.h>
int func0(std::vector<int> a, std::vector<int> b, int n) { std::sort(a.begin(), a.end()); std::sort(b.begin(), b.end()); int sum = 0; for (int i = 0; i < n; i++) { sum += std::abs(a[i] - b[i]); } return sum; }
int main() { assert(func0({3, 2, 1}, {2, 1, 3}, 3) == 0); assert(func0({1, 2, 3}, {4, 5, 6}, 3) == 9); assert(func0({4, 1, 8, 7}, {2, 3, 6, 5}, 4) == 6); return 0; }
O3
cpp
func0(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >, int): endbr64 push %r15 push %r14 push %r13 push %r12 mov %rdi,%r12 push %rbp mov %rsi,%rbp push %rbx mov %edx,%ebx sub $0x18,%rsp mov 0x8(%rdi),%r15 mov (%rdi),%r14 cmp %r15,%r14 je 167c <_Z5func0...
_Z5func0St6vectorIiSaIiEES1_i: endbr64 push r15 push r14 push r13 push r12 mov r12, rdi push rbp push rbx mov ebx, edx sub rsp, 18h mov r15, [rdi+8] mov rbp, [rdi] mov [rsp+48h+var_48], rsi cmp rbp, r15 jz loc_188C mov r14, r15 lea r13, [rbp+4] sub r14, rbp...
long long func0(char **a1, char **a2, int a3) { char *v5; // r15 char *v6; // rbp char *v7; // r13 unsigned long long v8; // rdx char *v9; // r14 int v10; // r9d char *v11; // rsi int v12; // edx char *j; // rax char *v14; // rdi int v15; // ecx int v16; // edx char *v17; // rsi char *v18; ...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 MOV R12,RDI PUSH RBP PUSH RBX MOV EBX,EDX SUB RSP,0x18 MOV R15,qword ptr [RDI + 0x8] MOV RBP,qword ptr [RDI] MOV qword ptr [RSP],RSI CMP RBP,R15 JZ 0x0010188c MOV R14,R15 LEA R13,[RBP + 0x4] SUB R14,RBP MOV RAX,R14 SAR RAX,0x2 JZ 0x00101a89 BSR RDX,RAX MOV RSI,R15 MOV ...
/* func0(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >, int) */ int func0(vector param_1,vector param_2,int param_3,int param_4,int param_5, int param_6,int param_7,int param_8,int param_9,int param_10, int4 param_11) { _Iter_less_iter _Var1; _Iter_less_iter _Var...
2,624
func0
#include <iostream> #include <assert.h>
int func0(int n) { int fact = 1; for (int i = 2; i <= n; i++) { fact *= i; while (fact % 10 == 0) fact /= 10; } while (fact >= 10) fact /= 10; return fact; }
int main() { assert(func0(5) == 1); assert(func0(10) == 3); assert(func0(7) == 5); return 0; }
O0
cpp
func0(int): endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x14(%rbp) movl $0x1,-0x8(%rbp) movl $0x2,-0x4(%rbp) mov -0x4(%rbp),%eax cmp -0x14(%rbp),%eax jg 1208 <_Z5func0i+0x7f> mov -0x8(%rbp),%eax imul -0x4(%rbp),%eax mov %eax,-0x8(%rbp) mov -0x8(%rbp),%ecx movslq %ecx,%rax imul $0x666666...
_Z5func0i: endbr64 push rbp mov rbp, rsp mov [rbp+var_14], edi mov [rbp+var_8], 1 mov [rbp+var_4], 2 jmp short loc_11C0 loc_1164: mov eax, [rbp+var_8] imul eax, [rbp+var_4] mov [rbp+var_8], eax jmp short loc_118E loc_1170: mov eax, [rbp+var_8] movsxd rdx, eax imul rdx, 6666...
long long func0(int a1) { int v2; // [rsp+Ch] [rbp-8h] int i; // [rsp+10h] [rbp-4h] v2 = 1; for ( i = 2; i <= a1; ++i ) { for ( v2 *= i; !(v2 % 10); v2 /= 10 ) ; } while ( v2 > 9 ) v2 /= 10; return (unsigned int)v2; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x14],EDI MOV dword ptr [RBP + -0x8],0x1 MOV dword ptr [RBP + -0x4],0x2 JMP 0x001011c0 LAB_00101164: MOV EAX,dword ptr [RBP + -0x8] IMUL EAX,dword ptr [RBP + -0x4] MOV dword ptr [RBP + -0x8],EAX JMP 0x0010118e LAB_00101170: MOV EAX,dword ptr [RBP + -0x8] MOVSXD ...
/* func0(int) */ int func0(int param_1) { int4 local_10; int4 local_c; local_10 = 1; for (local_c = 2; local_c <= param_1; local_c = local_c + 1) { for (local_10 = local_10 * local_c; local_10 % 10 == 0; local_10 = local_10 / 10) { } } for (; 9 < local_10; local_10 = local_10 / 10) { } retu...
2,625
func0
#include <iostream> #include <assert.h>
int func0(int n) { int fact = 1; for (int i = 2; i <= n; i++) { fact *= i; while (fact % 10 == 0) fact /= 10; } while (fact >= 10) fact /= 10; return fact; }
int main() { assert(func0(5) == 1); assert(func0(10) == 3); assert(func0(7) == 5); return 0; }
O1
cpp
func0(int): endbr64 cmp $0x1,%edi jle 1225 <_Z5func0i+0x9c> lea 0x1(%rdi),%r8d mov $0x2,%edi mov $0x2,%eax add $0x1,%edi cmp %r8d,%edi je 1202 <_Z5func0i+0x79> imul %edi,%eax movslq %eax,%rdx imul $0x66666667,%rdx,%rdx sar $0x22,%rdx mov %eax,%ecx sar $0x1f,%ecx sub %ecx,%edx le...
_Z5func0i: endbr64 cmp edi, 1 jle loc_11E6 lea r8d, [rdi+1] mov edi, 2 mov ecx, 1 loc_1164: imul ecx, edi movsxd rax, ecx imul rax, 66666667h sar rax, 22h mov edx, ecx sar edx, 1Fh sub eax, edx lea eax, [rax+rax*4] add eax, eax cmp ecx, eax jnz short loc_11B8 l...
long long func0(int a1) { int v1; // r8d int v2; // edi int v3; // ecx int v4; // edx if ( a1 <= 1 ) { return 1; } else { v1 = a1 + 1; v2 = 2; v3 = 1; do { for ( v3 *= v2; v3 == 10 * (v3 / 10); v3 /= 10 ) ; ++v2; } while ( v1 != v2 ); if ( v3 >...
func0: ENDBR64 CMP EDI,0x1 JLE 0x001011e6 LEA R8D,[RDI + 0x1] MOV EDI,0x2 MOV ECX,0x1 LAB_00101164: IMUL ECX,EDI MOVSXD RAX,ECX IMUL RAX,RAX,0x66666667 SAR RAX,0x22 MOV EDX,ECX SAR EDX,0x1f SUB EAX,EDX LEA EAX,[RAX + RAX*0x4] ADD EAX,EAX CMP ECX,EAX JNZ 0x001011b8 LAB_00101185: MOVSXD RAX,ECX IMUL RAX,RAX,0x66666667 SA...
/* func0(int) */ int func0(int param_1) { bool bVar1; int iVar2; int iVar3; if (param_1 < 2) { iVar2 = 1; } else { iVar3 = 2; iVar2 = 1; do { iVar2 = iVar2 * iVar3; if (iVar2 == (iVar2 / 10) * 10) { do { iVar2 = iVar2 / 10; } while (iVar2 == (iVar2 ...
2,626
func0
#include <iostream> #include <assert.h>
int func0(int n) { int fact = 1; for (int i = 2; i <= n; i++) { fact *= i; while (fact % 10 == 0) fact /= 10; } while (fact >= 10) fact /= 10; return fact; }
int main() { assert(func0(5) == 1); assert(func0(10) == 3); assert(func0(7) == 5); return 0; }
O2
cpp
func0(int): endbr64 lea 0x1(%rdi),%esi mov $0x2,%ecx mov $0x2,%eax cmp $0x1,%edi jle 1434 <_Z5func0i+0x84> nopw %cs:0x0(%rax,%rax,1) add $0x1,%ecx cmp %esi,%ecx je 1410 <_Z5func0i+0x60> imul %ecx,%eax nopw 0x0(%rax,%rax,1) imul $0xcccccccd,%eax,%edx add $0x19999998,%edx ror %edx c...
_Z5func0i: endbr64 cmp edi, 1 jle short loc_1273 add edi, 1 mov esi, 2 mov eax, 1 nop word ptr [rax+rax+00000000h] loc_1210: imul eax, esi jmp short loc_122F loc_1218: movsxd rdx, eax sar eax, 1Fh imul rdx, 66666667h mov ecx, eax sar rdx, 22h mov eax, edx sub eax, ...
unsigned long long func0(int a1) { int v1; // edi int v2; // esi unsigned long long result; // rax int v4; // edx if ( a1 <= 1 ) return 1LL; v1 = a1 + 1; v2 = 2; LODWORD(result) = 1; do { for ( result = (unsigned int)(v2 * result); __ROR4__(-858993459 * result + 429496728, 1) <= ...
func0: ENDBR64 CMP EDI,0x1 JLE 0x00101273 ADD EDI,0x1 MOV ESI,0x2 MOV EAX,0x1 NOP word ptr CS:[RAX + RAX*0x1] LAB_00101210: IMUL EAX,ESI JMP 0x0010122f LAB_00101218: MOVSXD RDX,EAX SAR EAX,0x1f IMUL RDX,RDX,0x66666667 MOV ECX,EAX SAR RDX,0x22 MOV EAX,EDX SUB EAX,ECX LAB_0010122f: IMUL EDX,EAX,-0x33333333 ADD EDX,0x1999...
/* func0(int) */ ulong func0(int param_1) { uint uVar1; ulong uVar2; ulong uVar3; uint uVar4; int iVar5; if (param_1 < 2) { uVar2 = 1; } else { iVar5 = 2; uVar2 = 1; do { uVar1 = (int)uVar2 * iVar5; while (uVar2 = (ulong)uVar1, uVar4 = uVar1 * -0x33333333 + 0x19999998, ...
2,627
func0
#include <iostream> #include <assert.h>
int func0(int n) { int fact = 1; for (int i = 2; i <= n; i++) { fact *= i; while (fact % 10 == 0) fact /= 10; } while (fact >= 10) fact /= 10; return fact; }
int main() { assert(func0(5) == 1); assert(func0(10) == 3); assert(func0(7) == 5); return 0; }
O3
cpp
func0(int): endbr64 cmp $0x1,%edi jle 140c <_Z5func0i+0x7c> lea 0x1(%rdi),%esi mov $0x2,%eax mov $0x3,%ecx cmp $0x2,%edi je 1412 <_Z5func0i+0x82> nopl 0x0(%rax,%rax,1) imul %ecx,%eax jmp 13cd <_Z5func0i+0x3d> nopl (%rax) movslq %eax,%rdx sar $0x1f,%eax imul $0x66666667,%rdx,%rdx sar ...
_Z5func0i: endbr64 cmp edi, 1 jle short loc_1393 add edi, 1 mov esi, 2 mov eax, 1 nop word ptr [rax+rax+00000000h] loc_1330: imul eax, esi jmp short loc_134F loc_1338: movsxd rdx, eax sar eax, 1Fh imul rdx, 66666667h mov ecx, eax sar rdx, 22h mov eax, edx sub eax, ...
unsigned long long func0(int a1) { int v1; // edi int v2; // esi unsigned long long result; // rax int v4; // edx if ( a1 <= 1 ) return 1LL; v1 = a1 + 1; v2 = 2; LODWORD(result) = 1; do { for ( result = (unsigned int)(v2 * result); __ROR4__(-858993459 * result + 429496728, 1) <= ...
func0: ENDBR64 CMP EDI,0x1 JLE 0x00101393 ADD EDI,0x1 MOV ESI,0x2 MOV EAX,0x1 NOP word ptr CS:[RAX + RAX*0x1] LAB_00101330: IMUL EAX,ESI JMP 0x0010134f LAB_00101338: MOVSXD RDX,EAX SAR EAX,0x1f IMUL RDX,RDX,0x66666667 MOV ECX,EAX SAR RDX,0x22 MOV EAX,EDX SUB EAX,ECX LAB_0010134f: IMUL EDX,EAX,-0x33333333 ADD EDX,0x1999...
/* func0(int) */ ulong func0(int param_1) { uint uVar1; ulong uVar2; ulong uVar3; uint uVar4; int iVar5; if (param_1 < 2) { uVar2 = 1; } else { iVar5 = 2; uVar2 = 1; do { uVar1 = (int)uVar2 * iVar5; while (uVar2 = (ulong)uVar1, uVar4 = uVar1 * -0x33333333 + 0x19999998, ...
2,628
func0
#include <iostream> #include <vector> #include <cassert> #include <algorithm>
int func0(std::vector<int> list1) { int max_val = 0; int result = list1[0]; for (int i = 0; i < list1.size(); ++i) { int occu = std::count(list1.begin(), list1.end(), list1[i]); if (occu > max_val) { max_val = occu; result = list1[i]; } } ret...
int main() { assert(func0({2,3,8,4,7,9,8,2,6,5,1,6,1,2,3,4,6,9,1,2}) == 2); assert(func0({1,3,5,7,1,3,13,15,17,5,7,9,1,11}) == 1); assert(func0({1,2,3,2,4,5,1,1,1}) == 1); return 0; }
O0
cpp
func0(std::vector<int, std::allocator<int> >): endbr64 push %rbp mov %rsp,%rbp push %r12 push %rbx sub $0x20,%rsp mov %rdi,-0x28(%rbp) movl $0x0,-0x20(%rbp) mov -0x28(%rbp),%rax mov $0x0,%esi mov %rax,%rdi callq 180c <_ZNSt6vectorIiSaIiEEixEm> mov (%rax),%eax mov %eax,-0x1c(%rbp) movl ...
_Z5func0St6vectorIiSaIiEE: endbr64 push rbp mov rbp, rsp push r12 push rbx sub rsp, 20h mov [rbp+var_28], rdi mov [rbp+var_20], 0 mov rax, [rbp+var_28] mov esi, 0 mov rdi, rax call _ZNSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong) mov eax, [rax] mov [rbp+var_1...
long long func0(long long a1) { long long v1; // r12 long long v2; // rbx long long v3; // rax int v5; // [rsp+10h] [rbp-20h] unsigned int v6; // [rsp+14h] [rbp-1Ch] int i; // [rsp+18h] [rbp-18h] int v8; // [rsp+1Ch] [rbp-14h] v5 = 0; v6 = *(_DWORD *)std::vector<int>::operator[](a1, 0LL); for ( i ...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R12 PUSH RBX SUB RSP,0x20 MOV qword ptr [RBP + -0x28],RDI MOV dword ptr [RBP + -0x20],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV ESI,0x0 MOV RDI,RAX CALL 0x00101796 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x1c],EAX MOV dword ptr [RBP + -0x18],0x0 JMP 0x001012f2 LAB_00101282: ...
/* func0(std::vector<int, std::allocator<int> >) */ int4 func0(vector param_1) { __normal_iterator _Var1; __normal_iterator _Var2; difference_type dVar3; int4 *puVar4; int *piVar5; ulong uVar6; int4 in_register_0000003c; vector<int,std::allocator<int>> *this; int4 local_28; int4 local_24; int4 l...
2,629
func0
#include <iostream> #include <vector> #include <cassert> #include <algorithm>
int func0(std::vector<int> list1) { int max_val = 0; int result = list1[0]; for (int i = 0; i < list1.size(); ++i) { int occu = std::count(list1.begin(), list1.end(), list1[i]); if (occu > max_val) { max_val = occu; result = list1[i]; } } ret...
int main() { assert(func0({2,3,8,4,7,9,8,2,6,5,1,6,1,2,3,4,6,9,1,2}) == 2); assert(func0({1,3,5,7,1,3,13,15,17,5,7,9,1,11}) == 1); assert(func0({1,2,3,2,4,5,1,1,1}) == 1); return 0; }
O1
cpp
func0(std::vector<int, std::allocator<int> >): endbr64 push %rbp push %rbx mov (%rdi),%r9 mov (%r9),%ebp mov 0x8(%rdi),%rsi mov %rsi,%r11 sub %r9,%r11 mov %r11,%rax shr $0x2,%rax je 12bc <_Z5func0St6vectorIiSaIiEE+0x73> mov %r9,%rbx add %r9,%r11 mov %r9,%rcx mov $0x0,%r10d jmp ...
_Z5func0St6vectorIiSaIiEE: endbr64 push rbx mov r9, [rdi] mov ebx, [r9] mov rdi, [rdi+8] mov r11, rdi sub r11, r9 sar r11, 2 cmp r9, rdi jz short loc_126C mov r8d, 0 mov r10d, 0 jmp short loc_123E loc_1235: add r8, 1 cmp r8, r11 jnb short loc_126C loc_123E: mo...
long long func0(unsigned int **a1) { unsigned int *v1; // r9 unsigned int v2; // ebx int *v3; // rdi unsigned long long v4; // r8 int v5; // r10d int *v6; // rax int v7; // edx v1 = *a1; v2 = **a1; v3 = (int *)a1[1]; if ( v1 != (unsigned int *)v3 ) { v4 = 0LL; v5 = 0; do { ...
func0: ENDBR64 PUSH RBX MOV R9,qword ptr [RDI] MOV EBX,dword ptr [R9] MOV RDI,qword ptr [RDI + 0x8] MOV R11,RDI SUB R11,R9 SAR R11,0x2 CMP R9,RDI JZ 0x0010126c MOV R8D,0x0 MOV R10D,0x0 JMP 0x0010123e LAB_00101235: ADD R8,0x1 CMP R8,R11 JNC 0x0010126c LAB_0010123e: MOV ESI,dword ptr [R9 + R8*0x4] MOV RAX,R9 MOV EDX,0x0 ...
/* func0(std::vector<int, std::allocator<int> >) */ int func0(vector param_1) { int *piVar1; int *piVar2; int *piVar3; int iVar4; int iVar5; int4 in_register_0000003c; ulong uVar6; int iVar7; piVar1 = *(int **)CONCAT44(in_register_0000003c,param_1); iVar5 = *piVar1; piVar2 = (int *)((int8 *)C...
2,630
func0
#include <iostream> #include <vector> #include <cassert> #include <algorithm>
int func0(std::vector<int> list1) { int max_val = 0; int result = list1[0]; for (int i = 0; i < list1.size(); ++i) { int occu = std::count(list1.begin(), list1.end(), list1[i]); if (occu > max_val) { max_val = occu; result = list1[i]; } } ret...
int main() { assert(func0({2,3,8,4,7,9,8,2,6,5,1,6,1,2,3,4,6,9,1,2}) == 2); assert(func0({1,3,5,7,1,3,13,15,17,5,7,9,1,11}) == 1); assert(func0({1,2,3,2,4,5,1,1,1}) == 1); return 0; }
O2
cpp
func0(std::vector<int, std::allocator<int> >): endbr64 push %r12 push %rbx mov 0x8(%rdi),%rsi mov (%rdi),%r9 mov %rsi,%r11 sub %r9,%r11 mov (%r9),%ebx mov %r11,%rax shr $0x2,%rax je 1589 <_Z5func0St6vectorIiSaIiEE+0x79> mov %r9,%r8 add %r9,%r11 mov %ebx,%r12d xor %r10d,%r10d nop...
_Z5func0St6vectorIiSaIiEE: endbr64 push rbx mov r10, [rdi] mov rdi, [rdi+8] mov r11d, [r10] mov rbx, rdi sub rbx, r10 sar rbx, 2 cmp r10, rdi jz short loc_143F xor r8d, r8d xor r9d, r9d nop dword ptr [rax+00h] loc_1408: mov esi, [r10+r8*4] mov rax, r10 xor edx...
long long func0(unsigned int **a1) { unsigned int *v1; // r10 unsigned int *v2; // rdi unsigned int v3; // r11d unsigned long long v4; // r8 int v5; // r9d unsigned int *v6; // rax int v7; // edx int v8; // ecx v1 = *a1; v2 = a1[1]; v3 = *v1; if ( v1 != v2 ) { v4 = 0LL; v5 = 0; d...
func0: ENDBR64 PUSH RBX MOV R10,qword ptr [RDI] MOV RDI,qword ptr [RDI + 0x8] MOV R11D,dword ptr [R10] MOV RBX,RDI SUB RBX,R10 SAR RBX,0x2 CMP R10,RDI JZ 0x0010143f XOR R8D,R8D XOR R9D,R9D NOP dword ptr [RAX] LAB_00101408: MOV ESI,dword ptr [R10 + R8*0x4] MOV RAX,R10 XOR EDX,EDX NOP dword ptr [RAX] LAB_00101418: XOR EC...
/* func0(std::vector<int, std::allocator<int> >) */ int func0(vector param_1) { int iVar1; int *piVar2; int *piVar3; int *piVar4; int iVar5; int4 in_register_0000003c; ulong uVar6; int iVar7; int iVar8; piVar2 = *(int **)CONCAT44(in_register_0000003c,param_1); piVar3 = (int *)((int8 *)CONCAT4...
2,631
func0
#include <iostream> #include <vector> #include <cassert> #include <algorithm>
int func0(std::vector<int> list1) { int max_val = 0; int result = list1[0]; for (int i = 0; i < list1.size(); ++i) { int occu = std::count(list1.begin(), list1.end(), list1[i]); if (occu > max_val) { max_val = occu; result = list1[i]; } } ret...
int main() { assert(func0({2,3,8,4,7,9,8,2,6,5,1,6,1,2,3,4,6,9,1,2}) == 2); assert(func0({1,3,5,7,1,3,13,15,17,5,7,9,1,11}) == 1); assert(func0({1,2,3,2,4,5,1,1,1}) == 1); return 0; }
O3
cpp
func0(std::vector<int, std::allocator<int> >): endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx mov (%rdi),%r9 mov 0x8(%rdi),%rdi mov (%r9),%r15d mov %rdi,%rbx sub %r9,%rbx mov %rbx,%rax shr $0x2,%rax je 15e0 <_Z5func0St6vectorIiSaIiEE+0x160> lea -0x4(%rdi),%r1...
_Z5func0St6vectorIiSaIiEE: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx mov r11, [rdi+8] mov r8, [rdi] mov r12, r11 sub r12, r8 mov r10d, [r8] sar r12, 2 cmp r8, r11 jz loc_1505 lea rbp, [r11-4] pxor xmm5, xmm5 sub rbp, r8 mov rbx, rbp s...
long long func0(const __m128i **a1) { unsigned long long *v1; // r11 const __m128i *v2; // r8 unsigned __int32 v3; // r10d unsigned long long v4; // r12 unsigned long long v5; // rbp unsigned long long v6; // rbx const __m128i *v7; // r9 const __m128i *v8; // rdx long long v9; // rsi signed __int32...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX MOV R11,qword ptr [RDI + 0x8] MOV R8,qword ptr [RDI] MOV R12,R11 SUB R12,R8 MOV R10D,dword ptr [R8] SAR R12,0x2 CMP R8,R11 JZ 0x00101505 LEA RBP,[R11 + -0x4] PXOR XMM5,XMM5 SUB RBP,R8 MOV RBX,RBP SHR RBX,0x2 ADD RBX,0x1 MOV RDX,RBX MOV RAX,RBX SHR RDX...
/* func0(std::vector<int, std::allocator<int> >) */ int func0(vector param_1) { int iVar1; int *piVar2; int *piVar3; int *piVar4; int *piVar5; int *piVar6; int *piVar7; ulong uVar8; ulong uVar9; ulong uVar10; int iVar11; int4 in_register_0000003c; int *piVar12; int iVar13; int iVar15; ...
2,632
func0
#include <iostream> #include <vector> #include <assert.h> #include <algorithm>
std::vector<int> func0(std::vector<int> x) { int _size = x.size(); std::vector<int> repeated; for (int i = 0; i < _size; i++) { for (int j = i + 1; j < _size; j++) { if (x[i] == x[j] && std::find(repeated.begin(), repeated.end(), x[i]) == repeated.end()) { repeated....
int main() { assert(func0({10, 20, 30, 20, 20, 30, 40, 50, -20, 60, 60, -20, -20}) == std::vector<int>({20, 30, -20, 60})); assert(func0({-1, 1, -1, 8}) == std::vector<int>({-1})); assert(func0({1, 2, 3, 1, 2}) == std::vector<int>({1, 2})); return 0; }
O0
cpp
func0(std::vector<int, std::allocator<int> >): endbr64 push %rbp mov %rsp,%rbp push %r12 push %rbx sub $0x40,%rsp mov %rdi,-0x48(%rbp) mov %rsi,-0x50(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax mov -0x50(%rbp),%rax mov %rax,%rdi callq 1bae <_ZNKSt6vectorIiSaIiEE4sizeEv> ...
_Z5func0St6vectorIiSaIiEE: endbr64 push rbp mov rbp, rsp push r12 push rbx sub rsp, 40h mov [rbp+var_48], rdi mov [rbp+var_50], rsi mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax mov rax, [rbp+var_50] mov rdi, rax call _ZNKSt6vectorIiSaIiEE4sizeEv; std::vector<int>::s...
long long func0(long long a1, long long a2) { int v2; // ebx long long v3; // r12 long long v4; // rbx long long v5; // rax long long v7; // rax int i; // [rsp+1Ch] [rbp-34h] int j; // [rsp+20h] [rbp-30h] int v11; // [rsp+24h] [rbp-2Ch] long long v12; // [rsp+28h] [rbp-28h] BYREF _QWORD v13[4]; // ...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R12 PUSH RBX SUB RSP,0x40 MOV qword ptr [RBP + -0x48],RDI MOV qword ptr [RBP + -0x50],RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX MOV RAX,qword ptr [RBP + -0x50] MOV RDI,RAX CALL 0x00101b30 MOV dword ptr [RBP + -0x2c],EAX MOV RAX,qword ptr [RBP + ...
/* func0(std::vector<int, std::allocator<int> >) */ vector<int,std::allocator<int>> * func0(vector param_1) { int iVar1; bool bVar2; int iVar3; __normal_iterator _Var4; __normal_iterator _Var5; int *piVar6; int4 extraout_var; vector<int,std::allocator<int>> *in_RSI; int4 in_register_0000003c; vect...
2,633
func0
#include <iostream> #include <vector> #include <assert.h> #include <algorithm>
std::vector<int> func0(std::vector<int> x) { int _size = x.size(); std::vector<int> repeated; for (int i = 0; i < _size; i++) { for (int j = i + 1; j < _size; j++) { if (x[i] == x[j] && std::find(repeated.begin(), repeated.end(), x[i]) == repeated.end()) { repeated....
int main() { assert(func0({10, 20, 30, 20, 20, 30, 40, 50, -20, 60, 60, -20, -20}) == std::vector<int>({20, 30, -20, 60})); assert(func0({-1, 1, -1, 8}) == std::vector<int>({-1})); assert(func0({1, 2, 3, 1, 2}) == std::vector<int>({1, 2})); return 0; }
O1
cpp
func0(std::vector<int, std::allocator<int> >): endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x18,%rsp mov %rdi,%r15 mov 0x8(%rsi),%rax sub (%rsi),%rax sar $0x2,%rax movq $0x0,(%rdi) movq $0x0,0x8(%rdi) movq $0x0,0x10(%rdi) test %eax,%eax jle 13f7 <_Z5fun...
_Z5func0St6vectorIiSaIiEE: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 18h mov r14, rdi mov rax, [rsi+8] sub rax, [rsi] sar rax, 2 mov qword ptr [rdi], 0 mov qword ptr [rdi+8], 0 mov qword ptr [rdi+10h], 0 test eax, eax jle loc_13D0 mov...
_QWORD * func0(_QWORD *a1, _QWORD *a2) { long long v3; // rax long long v4; // r15 char *v5; // rax long long v6; // rbx int v7; // edx char *v8; // rdi long long v9; // rcx char *v10; // rcx signed long long v11; // rax long long v13; // [rsp+0h] [rbp-48h] int v14; // [rsp+Ch] [rbp-3Ch] v3 = (...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x18 MOV R14,RDI MOV RAX,qword ptr [RSI + 0x8] SUB RAX,qword ptr [RSI] SAR RAX,0x2 MOV qword ptr [RDI],0x0 MOV qword ptr [RDI + 0x8],0x0 MOV qword ptr [RDI + 0x10],0x0 TEST EAX,EAX JLE 0x001013d0 MOV R13,RSI LEA EDI,[RAX + -0x1] MOV qword ptr ...
/* func0(std::vector<int, std::allocator<int> >) */ vector<int,std::allocator<int>> * func0(vector param_1) { int *piVar1; int iVar2; int *piVar3; int iVar4; int *piVar5; long lVar6; int *piVar7; long lVar8; long *in_RSI; int4 in_register_0000003c; vector<int,std::allocator<int>> *this; ulong ...
2,634
func0
#include <iostream> #include <vector> #include <assert.h> #include <algorithm>
std::vector<int> func0(std::vector<int> x) { int _size = x.size(); std::vector<int> repeated; for (int i = 0; i < _size; i++) { for (int j = i + 1; j < _size; j++) { if (x[i] == x[j] && std::find(repeated.begin(), repeated.end(), x[i]) == repeated.end()) { repeated....
int main() { assert(func0({10, 20, 30, 20, 20, 30, 40, 50, -20, 60, 60, -20, -20}) == std::vector<int>({20, 30, -20, 60})); assert(func0({-1, 1, -1, 8}) == std::vector<int>({-1})); assert(func0({1, 2, 3, 1, 2}) == std::vector<int>({1, 2})); return 0; }
O2
cpp
func0(std::vector<int, std::allocator<int> >): endbr64 push %r15 mov %rdi,%r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x18,%rsp mov 0x8(%rsi),%rax sub (%rsi),%rax movq $0x0,(%rdi) sar $0x2,%rax movq $0x0,0x8(%rdi) movq $0x0,0x10(%rdi) test %eax,%eax jle 17ce <_Z5fun...
_Z5func0St6vectorIiSaIiEE: endbr64 push r15 pxor xmm0, xmm0 push r14 mov r14, rdi push r13 push r12 push rbp push rbx sub rsp, 18h mov rax, [rsi+8] sub rax, [rsi] movups xmmword ptr [rdi], xmm0 sar rax, 2 mov qword ptr [rdi+10h], 0 test eax, eax jle loc_171E lea ...
long long func0(long long a1, _QWORD *a2) { long long v3; // rax long long v4; // rax long long v5; // r15 long long v6; // rbx long long v7; // rbp int v8; // edx _DWORD *v9; // rdi _DWORD *v10; // rax long long v11; // r8 long long v12; // rcx long long v13; // r8 long long v15; // [rsp+0h] [...
func0: ENDBR64 PUSH R15 PXOR XMM0,XMM0 PUSH R14 MOV R14,RDI PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x18 MOV RAX,qword ptr [RSI + 0x8] SUB RAX,qword ptr [RSI] MOVUPS xmmword ptr [RDI],XMM0 SAR RAX,0x2 MOV qword ptr [RDI + 0x10],0x0 TEST EAX,EAX JLE 0x0010171e LEA EDI,[RAX + -0x1] SUB EAX,0x2 MOV R13,RSI XOR R15D,R1...
/* WARNING: Type propagation algorithm not settling */ /* func0(std::vector<int, std::allocator<int> >) */ vector<int,std::allocator<int>> * func0(vector param_1) { int *piVar1; int iVar2; int *piVar3; int iVar4; int *piVar5; long lVar6; int *piVar7; long lVar8; long lVar9; long *in_RSI; int4 in...
2,635
func0
#include <iostream> #include <vector> #include <assert.h> #include <algorithm>
std::vector<int> func0(std::vector<int> x) { int _size = x.size(); std::vector<int> repeated; for (int i = 0; i < _size; i++) { for (int j = i + 1; j < _size; j++) { if (x[i] == x[j] && std::find(repeated.begin(), repeated.end(), x[i]) == repeated.end()) { repeated....
int main() { assert(func0({10, 20, 30, 20, 20, 30, 40, 50, -20, 60, 60, -20, -20}) == std::vector<int>({20, 30, -20, 60})); assert(func0({-1, 1, -1, 8}) == std::vector<int>({-1})); assert(func0({1, 2, 3, 1, 2}) == std::vector<int>({1, 2})); return 0; }
O3
cpp
func0(std::vector<int, std::allocator<int> >): endbr64 push %r15 pxor %xmm0,%xmm0 mov %rdi,%r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x18,%rsp mov 0x8(%rsi),%rax sub (%rsi),%rax movups %xmm0,(%rdi) sar $0x2,%rax movq $0x0,0x10(%rdi) test %eax,%eax jle 176e <_Z5func0...
_Z5func0St6vectorIiSaIiEE: endbr64 push r15 pxor xmm0, xmm0 push r14 mov r14, rdi push r13 push r12 push rbp push rbx sub rsp, 18h mov rax, [rsi+8] sub rax, [rsi] movups xmmword ptr [rdi], xmm0 sar rax, 2 mov qword ptr [rdi+10h], 0 test eax, eax jle loc_171E lea ...
long long func0(long long a1, _QWORD *a2) { long long v3; // rax long long v4; // rax long long v5; // r15 long long v6; // rbx long long v7; // rbp int v8; // edx _DWORD *v9; // rdi _DWORD *v10; // rax long long v11; // r8 long long v12; // rcx long long v13; // r8 long long v15; // [rsp+0h] [...
func0: ENDBR64 PUSH R15 PXOR XMM0,XMM0 PUSH R14 MOV R14,RDI PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x18 MOV RAX,qword ptr [RSI + 0x8] SUB RAX,qword ptr [RSI] MOVUPS xmmword ptr [RDI],XMM0 SAR RAX,0x2 MOV qword ptr [RDI + 0x10],0x0 TEST EAX,EAX JLE 0x0010171e LEA EDI,[RAX + -0x1] SUB EAX,0x2 MOV R13,RSI XOR R15D,R1...
/* WARNING: Type propagation algorithm not settling */ /* func0(std::vector<int, std::allocator<int> >) */ vector<int,std::allocator<int>> * func0(vector param_1) { int *piVar1; int iVar2; int *piVar3; int iVar4; int *piVar5; long lVar6; int *piVar7; long lVar8; long lVar9; long *in_RSI; int4 in...
2,636
func0
#include <cassert> #include <algorithm>
std::pair<int, int> func0(int l1, int r1, int l2, int r2) { int x = std::min(l1, l2); if (l1 == l2) x = -1; int y = std::max(r1, r2); if (r1 == r2) y = -1; return std::make_pair(x, y); }
int main() { assert(func0(5, 10, 1, 5) == std::make_pair(1, 10)); assert(func0(3, 5, 7, 9) == std::make_pair(3, 9)); assert(func0(1, 5, 2, 8) == std::make_pair(1, 8)); return 0; }
O0
cpp
func0(int, int, int, int): endbr64 push %rbp mov %rsp,%rbp sub $0x20,%rsp mov %edi,-0x14(%rbp) mov %esi,-0x18(%rbp) mov %edx,-0x1c(%rbp) mov %ecx,-0x20(%rbp) mov %fs:0x28,%rax mov %rax,-0x8(%rbp) xor %eax,%eax lea -0x1c(%rbp),%rdx lea -0x14(%rbp),%rax mov %rdx,%rsi mov %rax,%rdi...
_Z5func0iiii: endbr64 push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_14], edi mov [rbp+var_18], esi mov [rbp+var_1C], edx mov [rbp+var_20], ecx mov rax, fs:28h mov [rbp+var_8], rax xor eax, eax lea rdx, [rbp+var_1C] lea rax, [rbp+var_14] mov rsi, rdx mov rdi, rax ...
long long func0(int a1, int a2, int a3, int a4) { int v5; // [rsp+0h] [rbp-20h] BYREF int v6; // [rsp+4h] [rbp-1Ch] BYREF int v7; // [rsp+8h] [rbp-18h] BYREF int v8; // [rsp+Ch] [rbp-14h] BYREF int v9; // [rsp+10h] [rbp-10h] BYREF int v10; // [rsp+14h] [rbp-Ch] BYREF unsigned long long v11; // [rsp+18h] ...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0x14],EDI MOV dword ptr [RBP + -0x18],ESI MOV dword ptr [RBP + -0x1c],EDX MOV dword ptr [RBP + -0x20],ECX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX XOR EAX,EAX LEA RDX,[RBP + -0x1c] LEA RAX,[RBP + -0x14] MOV RSI,RDX MOV RDI,RAX CALL...
/* func0(int, int, int, int) */ void func0(int param_1,int param_2,int param_3,int param_4) { int *piVar1; long in_FS_OFFSET; int local_28; int local_24; int local_20; int local_1c; int local_18; int local_14; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_28 = param_4; loc...
2,637
func0
#include <cassert> #include <algorithm>
std::pair<int, int> func0(int l1, int r1, int l2, int r2) { int x = std::min(l1, l2); if (l1 == l2) x = -1; int y = std::max(r1, r2); if (r1 == r2) y = -1; return std::make_pair(x, y); }
int main() { assert(func0(5, 10, 1, 5) == std::make_pair(1, 10)); assert(func0(3, 5, 7, 9) == std::make_pair(3, 9)); assert(func0(1, 5, 2, 8) == std::make_pair(1, 8)); return 0; }
O1
cpp
func0(int, int, int, int): endbr64 mov $0xffffffff,%r8d cmp %edx,%edi je 113d <_Z5func0iiii+0x14> cmovle %edi,%edx mov %edx,%r8d mov $0xffffffff,%eax cmp %ecx,%esi je 114b <_Z5func0iiii+0x22> mov %ecx,%eax cmovge %esi,%eax mov %rax,%rdx shl $0x20,%rdx mov %r8d,%eax or %rdx,%rax re...
_Z5func0iiii: endbr64 cmp edi, edx mov eax, edx cmovle eax, edi mov edx, 0FFFFFFFFh cmovz eax, edx cmp esi, ecx mov edx, ecx cmovge edx, esi mov ecx, 0FFFFFFFFh cmovz edx, ecx shl rdx, 20h mov eax, eax or rax, rdx retn
long long func0(signed int a1, unsigned int a2, signed int a3, unsigned int a4) { unsigned int v4; // eax long long v5; // rdx v4 = a3; if ( a1 <= a3 ) v4 = a1; if ( a1 == a3 ) v4 = -1; v5 = a4; if ( (int)a2 >= (int)a4 ) v5 = a2; if ( a2 == a4 ) v5 = 0xFFFFFFFFLL; return (v5 << 32) |...
func0: ENDBR64 CMP EDI,EDX MOV EAX,EDX CMOVLE EAX,EDI MOV EDX,0xffffffff CMOVZ EAX,EDX CMP ESI,ECX MOV EDX,ECX CMOVGE EDX,ESI MOV ECX,0xffffffff CMOVZ EDX,ECX SHL RDX,0x20 MOV EAX,EAX OR RAX,RDX RET
/* func0(int, int, int, int) */ ulong func0(int param_1,int param_2,int param_3,int param_4) { ulong uVar1; bool bVar2; bVar2 = param_1 == param_3; if (param_1 <= param_3) { param_3 = param_1; } if (bVar2) { param_3 = 0xffffffff; } uVar1 = (ulong)(uint)param_4; if (param_4 <= param_2) { ...
2,638
func0
#include <cassert> #include <algorithm>
std::pair<int, int> func0(int l1, int r1, int l2, int r2) { int x = std::min(l1, l2); if (l1 == l2) x = -1; int y = std::max(r1, r2); if (r1 == r2) y = -1; return std::make_pair(x, y); }
int main() { assert(func0(5, 10, 1, 5) == std::make_pair(1, 10)); assert(func0(3, 5, 7, 9) == std::make_pair(3, 9)); assert(func0(1, 5, 2, 8) == std::make_pair(1, 8)); return 0; }
O2
cpp
func0(int, int, int, int): endbr64 mov %ecx,%eax cmp %edi,%edx jl 1152 <_Z5func0iiii+0x12> mov $0xffffffff,%edx cmovne %edi,%edx cmp %eax,%esi jl 115e <_Z5func0iiii+0x1e> mov $0xffffffff,%eax cmovne %esi,%eax mov %rax,%rcx mov %edx,%eax shl $0x20,%rcx or %rcx,%rax retq nopl 0x0(%ra...
_Z5func0iiii: endbr64 cmp edx, edi jl short loc_1150 mov edx, 0FFFFFFFFh cmovnz edx, edi loc_1150: cmp esi, ecx jl short loc_115C mov ecx, 0FFFFFFFFh cmovnz ecx, esi loc_115C: shl rcx, 20h mov eax, edx or rax, rcx retn
long long func0(int a1, int a2, int a3, long long a4) { bool v4; // zf bool v5; // zf v4 = a3 == a1; if ( a3 >= a1 ) { a3 = -1; if ( !v4 ) a3 = a1; } v5 = a2 == (_DWORD)a4; if ( a2 >= (int)a4 ) { a4 = 0xFFFFFFFFLL; if ( !v5 ) a4 = (unsigned int)a2; } return (a4 << 32)...
func0: ENDBR64 CMP EDX,EDI JL 0x00101150 MOV EDX,0xffffffff CMOVNZ EDX,EDI LAB_00101150: CMP ESI,ECX JL 0x0010115c MOV ECX,0xffffffff CMOVNZ ECX,ESI LAB_0010115c: SHL RCX,0x20 MOV EAX,EDX OR RAX,RCX RET
/* func0(int, int, int, int) */ ulong func0(int param_1,int param_2,int param_3,int param_4) { ulong uVar1; bool bVar2; uVar1 = (ulong)(uint)param_4; bVar2 = param_3 != param_1; if ((param_1 <= param_3) && (param_3 = 0xffffffff, bVar2)) { param_3 = param_1; } if ((param_4 <= param_2) && (uVar1 = ...
2,639
func0
#include <cassert> #include <algorithm>
std::pair<int, int> func0(int l1, int r1, int l2, int r2) { int x = std::min(l1, l2); if (l1 == l2) x = -1; int y = std::max(r1, r2); if (r1 == r2) y = -1; return std::make_pair(x, y); }
int main() { assert(func0(5, 10, 1, 5) == std::make_pair(1, 10)); assert(func0(3, 5, 7, 9) == std::make_pair(3, 9)); assert(func0(1, 5, 2, 8) == std::make_pair(1, 8)); return 0; }
O3
cpp
func0(int, int, int, int): endbr64 mov %ecx,%eax cmp %edi,%edx jl 1152 <_Z5func0iiii+0x12> mov $0xffffffff,%edx cmovne %edi,%edx cmp %eax,%esi jl 115e <_Z5func0iiii+0x1e> mov $0xffffffff,%eax cmovne %esi,%eax mov %rax,%rcx mov %edx,%eax shl $0x20,%rcx or %rcx,%rax retq nopl 0x0(%ra...
_Z5func0iiii: endbr64 cmp edx, edi jl short loc_1150 mov edx, 0FFFFFFFFh cmovnz edx, edi loc_1150: cmp esi, ecx jl short loc_115C mov ecx, 0FFFFFFFFh cmovnz ecx, esi loc_115C: shl rcx, 20h mov eax, edx or rax, rcx retn
long long func0(int a1, int a2, int a3, long long a4) { bool v4; // zf bool v5; // zf v4 = a3 == a1; if ( a3 >= a1 ) { a3 = -1; if ( !v4 ) a3 = a1; } v5 = a2 == (_DWORD)a4; if ( a2 >= (int)a4 ) { a4 = 0xFFFFFFFFLL; if ( !v5 ) a4 = (unsigned int)a2; } return (a4 << 32)...
func0: ENDBR64 CMP EDX,EDI JL 0x00101150 MOV EDX,0xffffffff CMOVNZ EDX,EDI LAB_00101150: CMP ESI,ECX JL 0x0010115c MOV ECX,0xffffffff CMOVNZ ECX,ESI LAB_0010115c: SHL RCX,0x20 MOV EAX,EDX OR RAX,RCX RET
/* func0(int, int, int, int) */ ulong func0(int param_1,int param_2,int param_3,int param_4) { ulong uVar1; bool bVar2; uVar1 = (ulong)(uint)param_4; bVar2 = param_3 != param_1; if ((param_1 <= param_3) && (param_3 = 0xffffffff, bVar2)) { param_3 = param_1; } if ((param_4 <= param_2) && (uVar1 = ...
2,640
func0
#include <vector> #include <algorithm> #include <cassert>
int func0(const std::vector<int>& arr, int n) { std::vector<int> sum(n, 0); if (n >= 1) { sum[0] = arr[0]; } if (n >= 2) { sum[1] = arr[0] + arr[1]; } if (n > 2) { sum[2] = std::max(sum[1], std::max(arr[1] + arr[2], arr[0] + arr[2])); } for (int i = 3; ...
int main() { assert(func0({100, 1000, 100, 1000, 1}, 5) == 2101); assert(func0({3000, 2000, 1000, 3, 10}, 5) == 5013); assert(func0({1, 2, 3, 4, 5, 6, 7, 8}, 8) == 27); return 0; }
O0
cpp
func0(std::vector<int, std::allocator<int> > const&, int): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x48,%rsp mov %rdi,-0x48(%rbp) mov %esi,-0x4c(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax lea -0x3c(%rbp),%rax mov %rax,%rdi callq 186a <_ZNSaIiEC1Ev> movl $0x0,-0x3...
_Z5func0RKSt6vectorIiSaIiEEi: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 58h mov [rbp+var_58], rdi mov [rbp+var_5C], esi mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax lea rax, [rbp+var_44] mov [rbp+var_38], rax nop nop mov [rbp+var_40], 0 mov eax, [rbp+var_5C]...
long long func0(long long a1, int a2) { int v2; // ebx int v3; // ebx int v4; // ebx int v5; // ebx int v6; // ebx long long v7; // rbx long long v8; // rax int v9; // ebx int v10; // ebx int v11; // ebx long long v12; // rax long long v13; // rax int v14; // ebx unsigned int v15; // ebx ...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x58 MOV qword ptr [RBP + -0x58],RDI MOV dword ptr [RBP + -0x5c],ESI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX LEA RAX,[RBP + -0x44] MOV qword ptr [RBP + -0x38],RAX NOP NOP MOV dword ptr [RBP + -0x40],0x0 MOV EAX,dword ptr [RBP + -0x5c] ...
/* func0(std::vector<int, std::allocator<int> > const&, int) */ int4 func0(vector *param_1,int param_2) { int4 uVar1; int iVar2; int iVar3; int4 *puVar4; int *piVar5; int *piVar6; long in_FS_OFFSET; int local_4c; int local_48; int local_44; int *local_40; vector<int,std::allocator<int>> local_...
2,641
func0
#include <vector> #include <algorithm> #include <cassert>
int func0(const std::vector<int>& arr, int n) { std::vector<int> sum(n, 0); if (n >= 1) { sum[0] = arr[0]; } if (n >= 2) { sum[1] = arr[0] + arr[1]; } if (n > 2) { sum[2] = std::max(sum[1], std::max(arr[1] + arr[2], arr[0] + arr[2])); } for (int i = 3; ...
int main() { assert(func0({100, 1000, 100, 1000, 1}, 5) == 2101); assert(func0({3000, 2000, 1000, 3, 10}, 5) == 5013); assert(func0({1, 2, 3, 4, 5, 6, 7, 8}, 8) == 27); return 0; }
O1
cpp
func0(std::vector<int, std::allocator<int> > const&, int): endbr64 push %r12 push %rbp push %rbx sub $0x10,%rsp mov %fs:0x28,%rax mov %rax,0x8(%rsp) xor %eax,%eax movslq %esi,%rax movabs $0x1fffffffffffffff,%rdx cmp %rdx,%rax ja 1362 <_Z5func0RKSt6vectorIiSaIiEEi+0x159> mov %rdi,%rbp mov ...
_Z5func0RKSt6vectorIiSaIiEEi: endbr64 push r12 push rbp push rbx sub rsp, 10h mov rax, fs:28h mov [rsp+28h+var_20], rax xor eax, eax movsxd rbp, esi mov rax, rbp shr rax, 3Dh jnz loc_12D1 mov r12, rdi mov ebx, esi test rbp, rbp jz loc_133A shl rbp, 2 mov rdi...
long long func0(int **a1, int a2) { unsigned long long v4; // rbp int *v5; // rax int *v6; // r9 int *v7; // rdx int *v8; // rdi int v9; // eax int v10; // eax int v11; // r8d int v12; // edx int v13; // r10d int v14; // esi int v15; // edx int *v16; // rcx _DWORD *v17; // rdi int *v18; /...
func0: ENDBR64 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x10 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x8],RAX XOR EAX,EAX MOVSXD RBP,ESI MOV RAX,RBP SHR RAX,0x3d JNZ 0x001012d1 MOV R12,RDI MOV EBX,ESI TEST RBP,RBP JZ 0x0010133a SHL RBP,0x2 MOV RDI,RBP CALL 0x001010e0 MOV R9,RAX LEA RDX,[RAX + RBP*0x1] LAB_00101256: ...
/* func0(std::vector<int, std::allocator<int> > const&, int) */ int func0(vector *param_1,int param_2) { int iVar1; int *piVar2; int *piVar3; int *piVar4; int *piVar5; int iVar6; ulong uVar7; long in_FS_OFFSET; int local_28; int local_24; long local_20; piVar4 = &local_28; local_20 = *(lo...
2,642
func0
#include <vector> #include <algorithm> #include <cassert>
int func0(const std::vector<int>& arr, int n) { std::vector<int> sum(n, 0); if (n >= 1) { sum[0] = arr[0]; } if (n >= 2) { sum[1] = arr[0] + arr[1]; } if (n > 2) { sum[2] = std::max(sum[1], std::max(arr[1] + arr[2], arr[0] + arr[2])); } for (int i = 3; ...
int main() { assert(func0({100, 1000, 100, 1000, 1}, 5) == 2101); assert(func0({3000, 2000, 1000, 3, 10}, 5) == 5013); assert(func0({1, 2, 3, 4, 5, 6, 7, 8}, 8) == 27); return 0; }
O2
cpp
func0(std::vector<int, std::allocator<int> > const&, int): endbr64 movabs $0x1fffffffffffffff,%rdx push %r12 push %rbp push %rbx sub $0x10,%rsp mov %fs:0x28,%rax mov %rax,0x8(%rsp) xor %eax,%eax movslq %esi,%rax cmp %rdx,%rax ja 158c <_Z5func0RKSt6vectorIiSaIiEEi+0x15c> test %rax,%rax je ...
_Z5func0RKSt6vectorIiSaIiEEi: endbr64 push r12 push rbp push rbx movsxd rbx, esi sub rsp, 10h mov rax, fs:28h mov [rsp+28h+var_20], rax mov rax, rbx shr rax, 3Dh jnz loc_1549 test rbx, rbx jz loc_1538 mov r12, rbx shl rbx, 2 mov rbp, rdi mov rdi, rbx; unsigned _...
long long func0(unsigned int **a1, int a2) { unsigned long long v3; // rbx void *v4; // rax _DWORD *v5; // rax unsigned int *v6; // r9 _DWORD *v7; // r8 unsigned int v8; // ebp int v9; // edi unsigned int v10; // eax int v11; // ecx int *v12; // r10 int v13; // edx unsigned int v14; // esi in...
func0: ENDBR64 PUSH R12 PUSH RBP PUSH RBX MOVSXD RBX,ESI SUB RSP,0x10 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x8],RAX MOV RAX,RBX SHR RAX,0x3d JNZ 0x00101549 TEST RBX,RBX JZ 0x00101538 MOV R12,RBX SHL RBX,0x2 MOV RBP,RDI MOV RDI,RBX CALL 0x00101100 MOV RDX,RBX XOR ESI,ESI MOV RDI,RAX CALL 0x001010d0 MOV R9,qw...
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* func0(std::vector<int, std::allocator<int> > const&, int) */ int func0(vector *param_1,int param_2) { int *piVar1; int iVar2; void *__s; int *piVar3; ulong uVar4; ulong uVar5; int iVar6; int iVar7; int iVar8; i...
2,643
func0
#include <vector> #include <algorithm> #include <cassert>
int func0(const std::vector<int>& arr, int n) { std::vector<int> sum(n, 0); if (n >= 1) { sum[0] = arr[0]; } if (n >= 2) { sum[1] = arr[0] + arr[1]; } if (n > 2) { sum[2] = std::max(sum[1], std::max(arr[1] + arr[2], arr[0] + arr[2])); } for (int i = 3; ...
int main() { assert(func0({100, 1000, 100, 1000, 1}, 5) == 2101); assert(func0({3000, 2000, 1000, 3, 10}, 5) == 5013); assert(func0({1, 2, 3, 4, 5, 6, 7, 8}, 8) == 27); return 0; }
O3
cpp
func0(std::vector<int, std::allocator<int> > const&, int): endbr64 movabs $0x1fffffffffffffff,%rdx push %r12 push %rbp push %rbx sub $0x10,%rsp mov %fs:0x28,%rax mov %rax,0x8(%rsp) xor %eax,%eax movslq %esi,%rax cmp %rdx,%rax ja 161c <_Z5func0RKSt6vectorIiSaIiEEi+0x20c> test %rax,%rax je ...
_Z5func0RKSt6vectorIiSaIiEEi: endbr64 push r12 push rbp push rbx movsxd rbx, esi mov rax, rbx shr rax, 3Dh jnz loc_15A1 test rbx, rbx jz loc_1580 mov rbp, rbx shl rbx, 2 mov r12, rdi mov rdi, rbx; unsigned __int64 call __Znwm; operator new(ulong) mov rdx, rbx; n xor ...
long long func0(unsigned int **a1, int a2) { unsigned long long v3; // rbx void *v5; // rax _DWORD *v6; // rax unsigned int *v7; // r8 _DWORD *v8; // rdi unsigned int v9; // r12d int v10; // ecx unsigned int v11; // edx int v12; // eax int v13; // r9d int v14; // edx int v15; // r10d _DWORD *...
func0: ENDBR64 PUSH R12 PUSH RBP PUSH RBX MOVSXD RBX,ESI MOV RAX,RBX SHR RAX,0x3d JNZ 0x001015a1 TEST RBX,RBX JZ 0x00101580 MOV RBP,RBX SHL RBX,0x2 MOV R12,RDI MOV RDI,RBX CALL 0x00101100 MOV RDX,RBX XOR ESI,ESI MOV RDI,RAX CALL 0x001010d0 MOV R8,qword ptr [R12] MOV RDI,RAX MOV R12D,dword ptr [R8] MOV dword ptr [RAX],R...
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* func0(std::vector<int, std::allocator<int> > const&, int) */ void * func0(vector *param_1,int param_2) { uint *puVar1; uint uVar2; int iVar3; void *pvVar4; uint *puVar5; void *extraout_RAX; uint uVar6; uint uVar7; ...
2,644
func0
#include <iostream> #include <map> #include <vector> #include <algorithm> #include <cassert> #include <string>
std::map<std::string, std::vector<int>> func0(const std::map<std::string, std::vector<int>>& dict1) { std::map<std::string, std::vector<int>> result; for (const auto& kv : dict1) { std::vector<int> sortedVec = kv.second; std::sort(sortedVec.begin(), sortedVec.end()); result[kv.first...
int main() { { std::map<std::string, std::vector<int>> input = { {"n1", {2, 3, 1}}, {"n2", {5, 1, 2}}, {"n3", {3, 2, 4}} }; std::map<std::string, std::vector<int>> expected = { {"n1", {1, 2, 3}}, {"n2", {1, 2, 5}}, ...
O0
cpp
func0(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allo...
_Z5func0RKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIiSaIiEESt4lessIS5_ESaISt4pairIKS5_S8_EEE: 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+...
long long func0(long long a1, long long a2) { long long v2; // rbx long long v3; // rax long long v4; // rax long long v6; // [rsp+10h] [rbp-50h] BYREF _QWORD v7[2]; // [rsp+18h] [rbp-48h] BYREF long long v8; // [rsp+28h] [rbp-38h] _BYTE v9[24]; // [rsp+30h] [rbp-30h] BYREF unsigned long long v10; // [...
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 0x00104682 MOV RAX,qword ptr [RBP + -0x60] MOV qword ptr [RBP + -0x40],RAX MO...
/* func0(std::map<std::string, std::vector<int, std::allocator<int> >, std::less<std::string >, std::allocator<std::pair<std::string const, std::vector<int, std::allocator<int> > > > > const&) */ map * func0(map *param_1) { char cVar1; __normal_iterator _Var2; __normal_iterator _Var3; vector<int,std::a...
2,645
func0
#include <iostream> #include <map> #include <vector> #include <algorithm> #include <cassert> #include <string>
std::map<std::string, std::vector<int>> func0(const std::map<std::string, std::vector<int>>& dict1) { std::map<std::string, std::vector<int>> result; for (const auto& kv : dict1) { std::vector<int> sortedVec = kv.second; std::sort(sortedVec.begin(), sortedVec.end()); result[kv.first...
int main() { { std::map<std::string, std::vector<int>> input = { {"n1", {2, 3, 1}}, {"n2", {5, 1, 2}}, {"n3", {3, 2, 4}} }; std::map<std::string, std::vector<int>> expected = { {"n1", {1, 2, 3}}, {"n2", {1, 2, 5}}, ...
O1
cpp
func0(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allo...
_Z5func0RKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIiSaIiEESt4lessIS5_ESaISt4pairIKS5_S8_EEE: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 68h mov [rsp+98h+var_78], rdi mov rax, fs:28h mov [rsp+98h+var_40], rax xor eax, eax mov ...
long long func0(long long a1, long long a2) { _QWORD *v2; // r13 struct _Unwind_Exception *v4; // rbx _DWORD *v5; // rsi long long v6; // rbx int *v7; // rbp unsigned long long v8; // rax int *v9; // rbx int v10; // ecx int *v11; // rax int v12; // edx int *v13; // rsi _DWORD *v14; // r14 lon...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x68 MOV qword ptr [RSP + 0x20],RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x58],RAX XOR EAX,EAX MOV dword ptr [RDI + 0x8],0x0 MOV RAX,RDI MOV qword ptr [RDI + 0x10],0x0 LEA RDI,[RDI + 0x8] MOV qword ptr [RSP + 0x18],RDI MOV qword pt...
/* func0(std::map<std::string, std::vector<int, std::allocator<int> >, std::less<std::string >, std::allocator<std::pair<std::string const, std::vector<int, std::allocator<int> > > > > const&) */ map * func0(map *param_1,int param_2,int param_3,int param_4,int param_5, int param_6,int8 param_7,int8 p...
2,646
func0
#include <iostream> #include <map> #include <vector> #include <algorithm> #include <cassert> #include <string>
std::map<std::string, std::vector<int>> func0(const std::map<std::string, std::vector<int>>& dict1) { std::map<std::string, std::vector<int>> result; for (const auto& kv : dict1) { std::vector<int> sortedVec = kv.second; std::sort(sortedVec.begin(), sortedVec.end()); result[kv.first...
int main() { { std::map<std::string, std::vector<int>> input = { {"n1", {2, 3, 1}}, {"n2", {5, 1, 2}}, {"n3", {3, 2, 4}} }; std::map<std::string, std::vector<int>> expected = { {"n1", {1, 2, 3}}, {"n2", {1, 2, 5}}, ...
O2
cpp
func0(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allo...
_Z5func0RKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIiSaIiEESt4lessIS5_ESaISt4pairIKS5_S8_EEE: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 68h mov [rsp+98h+var_78], rdi mov rax, fs:28h mov [rsp+98h+var_40], rax xor eax, eax mov ...
long long func0(long long a1, long long a2) { long long v3; // rdi _QWORD *v4; // r12 int *v5; // rax _DWORD *v6; // rsi int *v7; // r14 signed long long v8; // rcx long long v9; // rbx int *v10; // r13 unsigned long long v11; // rdx long long v12; // rdx int *v13; // rbx int v14; // ecx int ...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x68 MOV qword ptr [RSP + 0x20],RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x58],RAX XOR EAX,EAX MOV dword ptr [RDI + 0x8],0x0 MOV RAX,RDI ADD RDI,0x8 MOV qword ptr [RDI + 0x8],0x0 MOV qword ptr [RAX + 0x18],RDI MOV R12,qword ptr [RS...
/* WARNING: Type propagation algorithm not settling */ /* func0(std::map<std::string, std::vector<int, std::allocator<int> >, std::less<std::string >, std::allocator<std::pair<std::string const, std::vector<int, std::allocator<int> > > > > const&) */ map * func0(map *param_1,int param_2,int param_3,int param_4,...
2,647
func0
#include <iostream> #include <map> #include <vector> #include <algorithm> #include <cassert> #include <string>
std::map<std::string, std::vector<int>> func0(const std::map<std::string, std::vector<int>>& dict1) { std::map<std::string, std::vector<int>> result; for (const auto& kv : dict1) { std::vector<int> sortedVec = kv.second; std::sort(sortedVec.begin(), sortedVec.end()); result[kv.first...
int main() { { std::map<std::string, std::vector<int>> input = { {"n1", {2, 3, 1}}, {"n2", {5, 1, 2}}, {"n3", {3, 2, 4}} }; std::map<std::string, std::vector<int>> expected = { {"n1", {1, 2, 3}}, {"n2", {1, 2, 5}}, ...
O3
cpp
func0(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allo...
_Z5func0RKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIiSaIiEESt4lessIS5_ESaISt4pairIKS5_S8_EEE: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 78h mov [rsp+0A8h+var_90], rdi mov rax, fs:28h mov [rsp+0A8h+var_40], rax xor eax, eax mov...
long long func0(long long a1, long long a2) { long long v3; // rdi _QWORD *v4; // r13 signed long long v5; // rbp signed long long v6; // rbx _DWORD *v7; // rax _DWORD *v8; // rsi long long v9; // rbp _DWORD *v10; // r15 _DWORD *v11; // r12 int *v12; // rbx unsigned long long v13; // rdx int *v...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x78 MOV qword ptr [RSP + 0x18],RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x68],RAX XOR EAX,EAX MOV dword ptr [RDI + 0x8],0x0 MOV RAX,RDI ADD RDI,0x8 MOV qword ptr [RDI + 0x8],0x0 MOV qword ptr [RAX + 0x18],RDI MOV R13,qword ptr [RS...
/* func0(std::map<std::string, std::vector<int, std::allocator<int> >, std::less<std::string >, std::allocator<std::pair<std::string const, std::vector<int, std::allocator<int> > > > > const&) */ map * func0(map *param_1,int param_2,int param_3,int param_4,int param_5, int param_6,int8 param_7,int8 p...
2,648
func0
#include <climits> #include <cassert>
int func0(int n, int x, int y) { int ans = INT_MIN; for (int k = 0; k <= n; k++) { if (k % x == y) { ans = (ans > k) ? ans : k; } } return ((ans >= 0 && ans <= n) ? ans : -1); }
int main() { assert(func0(15, 10, 5) == 15); assert(func0(187, 10, 5) == 185); assert(func0(16, 11, 1) == 12); 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) movl $0x80000000,-0x8(%rbp) movl $0x0,-0x4(%rbp) mov -0x4(%rbp),%eax cmp -0x14(%rbp),%eax jg 1197 <_Z5func0iii+0x4e> mov -0x4(%rbp),%eax cltd idivl -0x18(%rbp) mov %edx...
_Z5func0iii: endbr64 push rbp mov rbp, rsp mov [rbp+var_14], edi mov [rbp+var_18], esi mov [rbp+var_1C], edx mov [rbp+var_8], 80000000h mov [rbp+var_4], 0 jmp short loc_118F loc_116A: mov eax, [rbp+var_4] cdq idiv [rbp+var_18] mov eax, edx cmp [rbp+var_1C], eax jnz shor...
long long func0(int a1, int a2, int a3) { int v3; // eax int v5; // [rsp+14h] [rbp-8h] int i; // [rsp+18h] [rbp-4h] v5 = 0x80000000; for ( i = 0; i <= a1; ++i ) { if ( a3 == i % a2 ) { if ( v5 <= i ) v3 = i; else v3 = v5; v5 = v3; } } if ( v5 < 0 || v5 > a...
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 dword ptr [RBP + -0x8],0x80000000 MOV dword ptr [RBP + -0x4],0x0 JMP 0x0010118f LAB_0010116a: MOV EAX,dword ptr [RBP + -0x4] CDQ IDIV dword ptr [RBP + -0x18] MOV EAX,EDX CMP dword ptr ...
/* func0(int, int, int) */ int func0(int param_1,int param_2,int param_3) { int iVar1; int local_10; int local_c; local_10 = -0x80000000; for (local_c = 0; local_c <= param_1; local_c = local_c + 1) { iVar1 = local_10; if ((param_3 == local_c % param_2) && (iVar1 = local_c, local_c < local_10)) {...
2,649
func0
#include <climits> #include <cassert>
int func0(int n, int x, int y) { int ans = INT_MIN; for (int k = 0; k <= n; k++) { if (k % x == y) { ans = (ans > k) ? ans : k; } } return ((ans >= 0 && ans <= n) ? ans : -1); }
int main() { assert(func0(15, 10, 5) == 15); assert(func0(187, 10, 5) == 185); assert(func0(16, 11, 1) == 12); return 0; }
O1
cpp
func0(int, int, int): endbr64 mov %edx,%r9d test %edi,%edi js 118e <_Z5func0iii+0x45> lea 0x1(%rdi),%r10d mov $0x0,%ecx mov $0x80000000,%r8d jmp 116d <_Z5func0iii+0x24> add $0x1,%ecx cmp %r10d,%ecx je 1180 <_Z5func0iii+0x37> mov %ecx,%eax cltd idiv %esi cmp %r9d,%edx jne 1165 <...
_Z5func0iii: endbr64 mov r9d, edx test edi, edi js short loc_118E lea r10d, [rdi+1] mov ecx, 0 mov r8d, 80000000h loc_1163: mov eax, ecx cdq idiv esi cmp r8d, ecx mov eax, ecx cmovge eax, r8d cmp edx, r9d cmovz r8d, eax add ecx, 1 cmp r10d, ecx jnz short loc_116...
long long func0(int a1, int a2, int a3) { int v3; // ecx int v4; // r8d int v5; // eax if ( a1 < 0 ) { return (unsigned int)-1; } else { v3 = 0; v4 = 0x80000000; do { v5 = v3; if ( v4 >= v3 ) v5 = v4; if ( v3 % a2 == a3 ) v4 = v5; ++v3; }...
func0: ENDBR64 MOV R9D,EDX TEST EDI,EDI JS 0x0010118e LEA R10D,[RDI + 0x1] MOV ECX,0x0 MOV R8D,0x80000000 LAB_00101163: MOV EAX,ECX CDQ IDIV ESI CMP R8D,ECX MOV EAX,ECX CMOVGE EAX,R8D CMP EDX,R9D CMOVZ R8D,EAX ADD ECX,0x1 CMP R10D,ECX JNZ 0x00101163 TEST R8D,R8D JS 0x00101196 CMP R8D,EDI JG 0x00101196 LAB_0010118a: MOV...
/* func0(int, int, int) */ int func0(int param_1,int param_2,int param_3) { int iVar1; int iVar2; int iVar3; if (param_1 < 0) { iVar3 = -1; } else { iVar2 = 0; iVar3 = -0x80000000; do { iVar1 = iVar2; if (iVar2 <= iVar3) { iVar1 = iVar3; } if (iVar2 % par...
2,650
func0
#include <climits> #include <cassert>
int func0(int n, int x, int y) { int ans = INT_MIN; for (int k = 0; k <= n; k++) { if (k % x == y) { ans = (ans > k) ? ans : k; } } return ((ans >= 0 && ans <= n) ? ans : -1); }
int main() { assert(func0(15, 10, 5) == 15); assert(func0(187, 10, 5) == 185); assert(func0(16, 11, 1) == 12); return 0; }
O2
cpp
func0(int, int, int): endbr64 mov %edx,%r9d test %edi,%edi js 12c0 <_Z5func0iii+0x50> lea 0x1(%rdi),%r10d xor %ecx,%ecx mov $0x80000000,%r8d nopw 0x0(%rax,%rax,1) mov %ecx,%eax cltd idiv %esi cmp %r9d,%edx jne 12a1 <_Z5func0iii+0x31> cmp %ecx,%r8d cmovl %ecx,%r8d add $0x1,%ecx cmp ...
_Z5func0iii: endbr64 mov r9d, edx test edi, edi js short loc_1260 lea r10d, [rdi+1] xor ecx, ecx mov r8d, 80000000h nop word ptr [rax+rax+00000000h] loc_1230: mov eax, ecx cdq idiv esi cmp r8d, ecx mov eax, ecx cmovge eax, r8d cmp r9d, edx cmovz r8d, eax add ecx, 1 ...
long long func0(int a1, int a2, int a3) { int v3; // ecx int v4; // r8d int v5; // eax if ( a1 < 0 ) return 0xFFFFFFFFLL; v3 = 0; v4 = 0x80000000; do { v5 = v3; if ( v4 >= v3 ) v5 = v4; if ( a3 == v3 % a2 ) v4 = v5; ++v3; } while ( a1 + 1 != v3 ); if ( v4 < 0 || a...
func0: ENDBR64 MOV R9D,EDX TEST EDI,EDI JS 0x00101260 LEA R10D,[RDI + 0x1] XOR ECX,ECX MOV R8D,0x80000000 NOP word ptr [RAX + RAX*0x1] LAB_00101230: MOV EAX,ECX CDQ IDIV ESI CMP R8D,ECX MOV EAX,ECX CMOVGE EAX,R8D CMP R9D,EDX CMOVZ R8D,EAX ADD ECX,0x1 CMP R10D,ECX JNZ 0x00101230 TEST R8D,R8D JS 0x00101260 CMP EDI,R8D JL...
/* func0(int, int, int) */ int func0(int param_1,int param_2,int param_3) { int iVar1; int iVar2; int iVar3; if (-1 < param_1) { iVar2 = 0; iVar3 = -0x80000000; do { iVar1 = iVar2; if (iVar2 <= iVar3) { iVar1 = iVar3; } if (param_3 == iVar2 % param_2) { i...
2,651
func0
#include <climits> #include <cassert>
int func0(int n, int x, int y) { int ans = INT_MIN; for (int k = 0; k <= n; k++) { if (k % x == y) { ans = (ans > k) ? ans : k; } } return ((ans >= 0 && ans <= n) ? ans : -1); }
int main() { assert(func0(15, 10, 5) == 15); assert(func0(187, 10, 5) == 185); assert(func0(16, 11, 1) == 12); return 0; }
O3
cpp
func0(int, int, int): endbr64 mov %edx,%r9d test %edi,%edi js 1200 <_Z5func0iii+0x50> lea 0x1(%rdi),%r10d xor %ecx,%ecx mov $0x80000000,%r8d nopw 0x0(%rax,%rax,1) mov %ecx,%eax cltd idiv %esi cmp %edx,%r9d jne 11e1 <_Z5func0iii+0x31> cmp %ecx,%r8d cmovl %ecx,%r8d add $0x1,%ecx cmp ...
_Z5func0iii: endbr64 mov r9d, edx test edi, edi js short loc_1200 lea r10d, [rdi+1] xor ecx, ecx mov r8d, 80000000h nop word ptr [rax+rax+00000000h] loc_11D0: mov eax, ecx cdq idiv esi cmp r8d, ecx mov eax, ecx cmovge eax, r8d cmp edx, r9d cmovz r8d, eax add ecx, 1 ...
long long func0(int a1, int a2, int a3) { int v3; // ecx int v4; // r8d int v5; // eax if ( a1 < 0 ) return 0xFFFFFFFFLL; v3 = 0; v4 = 0x80000000; do { v5 = v3; if ( v4 >= v3 ) v5 = v4; if ( v3 % a2 == a3 ) v4 = v5; ++v3; } while ( a1 + 1 != v3 ); if ( v4 < 0 || v...
func0: ENDBR64 MOV R9D,EDX TEST EDI,EDI JS 0x00101200 LEA R10D,[RDI + 0x1] XOR ECX,ECX MOV R8D,0x80000000 NOP word ptr [RAX + RAX*0x1] LAB_001011d0: MOV EAX,ECX CDQ IDIV ESI CMP R8D,ECX MOV EAX,ECX CMOVGE EAX,R8D CMP EDX,R9D CMOVZ R8D,EAX ADD ECX,0x1 CMP R10D,ECX JNZ 0x001011d0 TEST R8D,R8D JS 0x00101200 CMP R8D,EDI JG...
/* func0(int, int, int) */ int func0(int param_1,int param_2,int param_3) { int iVar1; int iVar2; int iVar3; if (-1 < param_1) { iVar2 = 0; iVar3 = -0x80000000; do { iVar1 = iVar2; if (iVar2 <= iVar3) { iVar1 = iVar3; } if (iVar2 % param_2 == param_3) { i...
2,652
func0
#include <iostream> #include <string> #include <assert.h>
int func0(int n) { if (n % 2 != 0) { std::cerr << "Invalid Input"; return -1; } int sm = 0; int count = 0; while (n >= 2) { count = count + 1; sm = sm + n; n = n - 2; } return sm / count; }
int main() { assert(func0(2) == 2); assert(func0(4) == 3); assert(func0(100) == 51); return 0; }
O0
cpp
func0(int): endbr64 push %rbp mov %rsp,%rbp sub $0x20,%rsp mov %edi,-0x14(%rbp) mov -0x14(%rbp),%eax and $0x1,%eax test %eax,%eax je 11dc <_Z5func0i+0x33> lea 0xe3f(%rip),%rsi lea 0x2e50(%rip),%rdi callq 10a0 <_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@plt> mov $0xffffffff,...
_Z5func0i: endbr64 push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_14], edi mov eax, [rbp+var_14] and eax, 1 test eax, eax jz short loc_11A2 lea rax, aInvalidInput; "Invalid Input" mov rsi, rax lea rax, __bss_start mov rdi, rax call __ZStlsISt11char_traitsIcEERSt13basic...
long long func0(int a1) { int v2; // [rsp+Ch] [rbp-14h] int v3; // [rsp+18h] [rbp-8h] int v4; // [rsp+1Ch] [rbp-4h] v2 = a1; if ( (a1 & 1) != 0 ) { std::operator<<<std::char_traits<char>>(&_bss_start, "Invalid Input"); return 0xFFFFFFFFLL; } else { v3 = 0; v4 = 0; while ( v2 > 1 ...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0x14],EDI MOV EAX,dword ptr [RBP + -0x14] AND EAX,0x1 TEST EAX,EAX JZ 0x001011a2 LEA RAX,[0x102008] MOV RSI,RAX LEA RAX,[0x104020] MOV RDI,RAX CALL 0x00101070 MOV EAX,0xffffffff JMP 0x001011cd LAB_001011a2: MOV dword ptr [RBP + -0x8],0x0 MOV dword p...
/* func0(int) */ ulong func0(int param_1) { ulong uVar1; int local_1c; int local_10; int local_c; if ((param_1 & 1U) == 0) { local_10 = 0; local_c = 0; for (local_1c = param_1; 1 < local_1c; local_1c = local_1c + -2) { local_c = local_c + 1; local_10 = local_10 + local_1c; } ...
2,653
func0
#include <iostream> #include <string> #include <assert.h>
int func0(int n) { if (n % 2 != 0) { std::cerr << "Invalid Input"; return -1; } int sm = 0; int count = 0; while (n >= 2) { count = count + 1; sm = sm + n; n = n - 2; } return sm / count; }
int main() { assert(func0(2) == 2); assert(func0(4) == 3); assert(func0(100) == 51); return 0; }
O1
cpp
func0(int): endbr64 test $0x1,%dil jne 11d5 <_Z5func0i+0x2c> mov %edi,%ecx cmp $0x1,%edi jle 11fb <_Z5func0i+0x52> mov $0x0,%eax add %edi,%eax sub $0x2,%edi cmp $0x1,%edi jg 11bf <_Z5func0i+0x16> sub $0x2,%ecx shr %ecx add $0x1,%ecx cltd idiv %ecx retq sub $0x8,%rsp mov $0...
_Z5func0i: endbr64 mov eax, edi and eax, 1 jnz short loc_1195 mov edx, edi cmp edi, 1 jle short loc_1191 loc_117B: add eax, edx sub edx, 2 cmp edx, 1 jg short loc_117B sub edi, 2 shr edi, 1 add edi, 1 loc_118D: cdq idiv edi retn loc_1191: mov edi, eax jmp ...
long long func0(int a1) { int v1; // eax int v2; // edx int v3; // edi v1 = a1 & 1; if ( (a1 & 1) != 0 ) { std::__ostream_insert<char,std::char_traits<char>>(&_bss_start, "Invalid Input", 13LL); return 0xFFFFFFFFLL; } else { v2 = a1; if ( a1 <= 1 ) { v3 = a1 & 1; } ...
func0: ENDBR64 MOV EAX,EDI AND EAX,0x1 JNZ 0x00101195 MOV EDX,EDI CMP EDI,0x1 JLE 0x00101191 LAB_0010117b: ADD EAX,EDX SUB EDX,0x2 CMP EDX,0x1 JG 0x0010117b SUB EDI,0x2 SHR EDI,0x1 ADD EDI,0x1 LAB_0010118d: CDQ IDIV EDI RET LAB_00101191: MOV EDI,EAX JMP 0x0010118d LAB_00101195: SUB RSP,0x8 MOV EDX,0xd LEA RSI,[0x102004...
/* func0(int) */ int [16] func0(int param_1) { int iVar1; int iVar2; int8 extraout_RDX; int auVar3 [16]; int auVar4 [16]; if ((param_1 & 1U) == 0) { iVar1 = 0; iVar2 = param_1; if (param_1 < 2) { iVar1 = 0; iVar2 = 0; } else { do { iVar1 = iVar1 + iVar2; ...
2,654
func0
#include <iostream> #include <string> #include <assert.h>
int func0(int n) { if (n % 2 != 0) { std::cerr << "Invalid Input"; return -1; } int sm = 0; int count = 0; while (n >= 2) { count = count + 1; sm = sm + n; n = n - 2; } return sm / count; }
int main() { assert(func0(2) == 2); assert(func0(4) == 3); assert(func0(100) == 51); return 0; }
O2
cpp
func0(int): endbr64 test $0x1,%dil jne 1226 <_Z5func0i+0x36> cmp $0x1,%edi jle 10a0 <_Z5func0i.cold> mov %edi,%ecx xor %eax,%eax nopw 0x0(%rax,%rax,1) add %edi,%eax sub $0x2,%edi cmp $0x1,%edi jg 1210 <_Z5func0i+0x20> sub $0x2,%ecx cltd shr %ecx add $0x1,%ecx idiv %ecx retq su...
_Z5func0i: endbr64 test dil, 1 jnz short loc_11C0 cmp edi, 1 jle short loc_11E6 lea edx, [rdi-2] mov eax, edx shr eax, 1 and eax, 1 mov ecx, eax mov eax, edi cmp edx, 1 jle short loc_11B4 test ecx, ecx jz short loc_11A8 lea eax, [rdi+rdx] lea edx, [rdi-4] c...
long long func0(int a1) { int v1; // edx int v2; // eax if ( (a1 & 1) != 0 ) { std::__ostream_insert<char,std::char_traits<char>>(&_bss_start, "Invalid Input", 13LL); return 0xFFFFFFFFLL; } else { if ( a1 <= 1 ) func0(); v1 = a1 - 2; v2 = a1; if ( a1 - 2 > 1 ) { i...
func0: ENDBR64 TEST DIL,0x1 JNZ 0x001011c0 CMP EDI,0x1 JLE 0x001011e6 LEA EDX,[RDI + -0x2] MOV EAX,EDX SHR EAX,0x1 AND EAX,0x1 MOV ECX,EAX MOV EAX,EDI CMP EDX,0x1 JLE 0x001011b4 TEST ECX,ECX JZ 0x001011a8 LEA EAX,[RDI + RDX*0x1] LEA EDX,[RDI + -0x4] CMP EDX,0x1 JLE 0x001011b4 NOP dword ptr [RAX] LAB_001011a8: LEA EAX,[...
/* func0(int) */ int [16] func0(int param_1) { int iVar1; uint uVar2; int8 extraout_RDX; int iVar3; int auVar4 [16]; int auVar5 [16]; if ((param_1 & 1U) != 0) { std::__ostream_insert<char,std::char_traits<char>>((ostream *)std::cerr,"Invalid Input",0xd); auVar5._8_8_ = extraout_RDX; auVa...
2,655
func0
#include <iostream> #include <string> #include <assert.h>
int func0(int n) { if (n % 2 != 0) { std::cerr << "Invalid Input"; return -1; } int sm = 0; int count = 0; while (n >= 2) { count = count + 1; sm = sm + n; n = n - 2; } return sm / count; }
int main() { assert(func0(2) == 2); assert(func0(4) == 3); assert(func0(100) == 51); return 0; }
O3
cpp
func0(int): endbr64 mov %edi,%eax and $0x1,%eax jne 12a4 <_Z5func0i+0xb4> cmp $0x1,%edi jle 10a0 <_Z5func0i.cold> lea -0x2(%rdi),%edx mov %edx,%ecx shr %ecx add $0x1,%ecx cmp $0x23,%edx jbe 12a0 <_Z5func0i+0xb0> movd %edi,%xmm4 mov %ecx,%edx movdqa 0xe07(%rip),%xmm3 pxor %xmm0,%x...
_Z5func0i: endbr64 mov eax, edi and eax, 1 jnz loc_1263 mov edx, edi cmp edi, 1 jle loc_1289 lea ecx, [rdi-2] mov esi, ecx shr esi, 1 add esi, 1 cmp ecx, 13h jbe short loc_1204 movd xmm4, edi mov ecx, esi movdqa xmm3, cs:xmmword_2030 xor eax, eax pshufd xmm0,...
long long func0(long long a1, long long a2) { int v2; // eax int v3; // edx int v4; // ecx signed int v5; // esi __m128i si128; // xmm3 int v7; // eax __m128i v8; // xmm0 __m128i v9; // xmm1 __m128i v10; // xmm2 __m128i v11; // xmm1 int v12; // edx v2 = a1 & 1; if ( (a1 & 1) == 0 ) { v...
func0: ENDBR64 MOV EAX,EDI AND EAX,0x1 JNZ 0x00101263 MOV EDX,EDI CMP EDI,0x1 JLE 0x00101289 LEA ECX,[RDI + -0x2] MOV ESI,ECX SHR ESI,0x1 ADD ESI,0x1 CMP ECX,0x13 JBE 0x00101204 MOVD XMM4,EDI MOV ECX,ESI MOVDQA XMM3,xmmword ptr [0x00102030] XOR EAX,EAX PSHUFD XMM0,XMM4,0x0 PADDD XMM0,xmmword ptr [0x00102020] SHR ECX,0x...
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* func0(int) */ int [16] func0(int param_1) { int iVar1; uint uVar2; int8 extraout_RDX; uint uVar3; int iVar4; int iVar5; int iVar6; int iVar7; int iVar8; int iVar9; int iVar10; int auVar11 [16]; int auVar...
2,656
func0
#include <vector> #include <cassert>
std::vector<int> func0(const std::vector<int>& num_list) { std::vector<int> a; std::vector<int> x; for (int num : num_list) { if (num == num_list[0]) { a.push_back(num); } else { x.push_back(num); } } x.insert(x.end(), a.begin(), a.end()); ...
int main() { assert((func0({1,2,3,4}) == std::vector<int>{2,3,4,1})); assert((func0({2,3,4,1,5,0}) == std::vector<int>{3,4,1,5,0,2})); assert((func0({5,4,3,2,1}) == std::vector<int>{4,3,2,1,5})); return 0; }
O0
cpp
func0(std::vector<int, std::allocator<int> > const&): endbr64 push %rbp mov %rsp,%rbp push %r12 push %rbx sub $0x50,%rsp mov %rdi,-0x58(%rbp) mov %rsi,-0x60(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax lea -0x30(%rbp),%rax mov %rax,%rdi callq 1af8 <_ZNSt6vectorIiSaIiEEC1E...
_Z5func0RKSt6vectorIiSaIiEE: endbr64 push rbp mov rbp, rsp push r12 push rbx sub rsp, 50h mov [rbp+var_58], rdi mov [rbp+var_60], rsi 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>::vec...
long long func0(long long a1, long long a2) { _DWORD *v2; // rax long long v3; // r12 long long v4; // rbx int v6; // [rsp+14h] [rbp-4Ch] BYREF long long v7; // [rsp+18h] [rbp-48h] BYREF _QWORD v8[2]; // [rsp+20h] [rbp-40h] BYREF _BYTE v9[24]; // [rsp+30h] [rbp-30h] BYREF unsigned long long v10; // [rs...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R12 PUSH RBX SUB RSP,0x50 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 LEA RAX,[RBP + -0x30] MOV RDI,RAX CALL 0x00101b7c MOV RAX,qword ptr [RBP + -0x58] MOV RDI,RAX CALL 0x00101b7c MOV RAX...
/* func0(std::vector<int, std::allocator<int> > const&) */ vector * func0(vector *param_1) { bool bVar1; int *piVar2; int8 uVar3; int8 uVar4; vector<int,std::allocator<int>> *in_RSI; long in_FS_OFFSET; int local_54; int8 local_50; int8 local_48; vector<int,std::allocator<int>> *local_40; vector<...
2,657
func0
#include <vector> #include <cassert>
std::vector<int> func0(const std::vector<int>& num_list) { std::vector<int> a; std::vector<int> x; for (int num : num_list) { if (num == num_list[0]) { a.push_back(num); } else { x.push_back(num); } } x.insert(x.end(), a.begin(), a.end()); ...
int main() { assert((func0({1,2,3,4}) == std::vector<int>{2,3,4,1})); assert((func0({2,3,4,1,5,0}) == std::vector<int>{3,4,1,5,0,2})); assert((func0({5,4,3,2,1}) == std::vector<int>{4,3,2,1,5})); return 0; }
O1
cpp
func0(std::vector<int, std::allocator<int> > const&): endbr64 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x30,%rsp mov %rdi,%rbp mov %fs:0x28,%rax mov %rax,0x28(%rsp) xor %eax,%eax movq $0x0,0x10(%rsp) movq $0x0,0x18(%rsp) movq $0x0,0x20(%rsp) movq $0x0,(%rdi) movq $0x0,0x...
_Z5func0RKSt6vectorIiSaIiEE: endbr64 push r14 push r13 push r12 push rbp push rbx sub rsp, 30h mov rbp, rdi 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 mov qword ptr [rdi], 0 mov qwo...
_QWORD * func0(_QWORD *a1, int **a2) { int *v2; // rbx int *v3; // r13 char *v5; // rsi int v6; // eax _DWORD *v7; // rsi void *v8; // rbx int v10; // [rsp+Ch] [rbp-4Ch] BYREF void *v11; // [rsp+10h] [rbp-48h] BYREF char *v12; // [rsp+18h] [rbp-40h] char *v13; // [rsp+20h] [rbp-38h] unsigned long ...
func0: ENDBR64 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x30 MOV RBP,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x28],RAX XOR EAX,EAX MOV qword ptr [RSP + 0x10],0x0 MOV qword ptr [RSP + 0x18],0x0 MOV qword ptr [RSP + 0x20],0x0 MOV qword ptr [RDI],0x0 MOV qword ptr [RDI + 0x8],0x0 MOV qword ptr [RD...
/* func0(std::vector<int, std::allocator<int> > const&) */ vector * func0(vector *param_1) { int *piVar1; int *piVar2; void *pvVar3; int *piVar4; int8 *in_RSI; long in_FS_OFFSET; int local_4c; void *local_48; int *local_40; int *local_38; long local_30; local_30 = *(long *)(in_FS_OFFSET + 0...
2,658
func0
#include <vector> #include <cassert>
std::vector<int> func0(const std::vector<int>& num_list) { std::vector<int> a; std::vector<int> x; for (int num : num_list) { if (num == num_list[0]) { a.push_back(num); } else { x.push_back(num); } } x.insert(x.end(), a.begin(), a.end()); ...
int main() { assert((func0({1,2,3,4}) == std::vector<int>{2,3,4,1})); assert((func0({2,3,4,1,5,0}) == std::vector<int>{3,4,1,5,0,2})); assert((func0({5,4,3,2,1}) == std::vector<int>{4,3,2,1,5})); return 0; }
O2
cpp
func0(std::vector<int, std::allocator<int> > const&): endbr64 push %r14 push %r13 push %r12 mov %rdi,%r12 push %rbp push %rbx sub $0x30,%rsp mov %fs:0x28,%rax mov %rax,0x28(%rsp) xor %eax,%eax movq $0x0,(%rdi) movq $0x0,0x8(%rdi) movq $0x0,0x10(%rdi) mov (%rsi),%rdx movq $0x0,0x10(%r...
_Z5func0RKSt6vectorIiSaIiEE: endbr64 push r15 pxor xmm0, xmm0 push r14 push r13 push r12 push rbp push rbx mov rbx, rdi sub rsp, 48h mov rax, fs:28h mov [rsp+78h+var_40], rax xor eax, eax mov qword ptr [rdi+10h], 0 movups xmmword ptr [rdi], xmm0 mov rdx, [rsi] mov r...
long long func0(long long a1, int **a2) { int *v3; // rdx int *v4; // r13 int *v6; // rbp _DWORD *v7; // rsi int v8; // eax char *v9; // rsi _DWORD *v10; // r13 _DWORD *v11; // rbp char *v12; // rdi char *v13; // r14 signed long long v14; // rbp unsigned long long v15; // r12 char *v16; // rd...
func0: ENDBR64 PUSH R15 PXOR XMM0,XMM0 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX MOV RBX,RDI SUB RSP,0x48 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x38],RAX XOR EAX,EAX MOV qword ptr [RDI + 0x10],0x0 MOVUPS xmmword ptr [RDI],XMM0 MOV RDX,qword ptr [RSI] MOV R13,qword ptr [RSI + 0x8] MOV qword ptr [RSP + 0x30...
/* func0(std::vector<int, std::allocator<int> > const&) */ vector * func0(vector *param_1) { int *piVar1; int4 *puVar2; long lVar3; ulong uVar4; vector *pvVar5; ulong uVar6; int extraout_DL; int *piVar7; int *piVar8; ulong __n; int uVar9; int8 *in_RSI; int4 *puVar10; ulong __n_00; char *...
2,659
func0
#include <vector> #include <cassert>
std::vector<int> func0(const std::vector<int>& num_list) { std::vector<int> a; std::vector<int> x; for (int num : num_list) { if (num == num_list[0]) { a.push_back(num); } else { x.push_back(num); } } x.insert(x.end(), a.begin(), a.end()); ...
int main() { assert((func0({1,2,3,4}) == std::vector<int>{2,3,4,1})); assert((func0({2,3,4,1,5,0}) == std::vector<int>{3,4,1,5,0,2})); assert((func0({5,4,3,2,1}) == std::vector<int>{4,3,2,1,5})); return 0; }
O3
cpp
func0(std::vector<int, std::allocator<int> > const&): endbr64 push %r14 pxor %xmm0,%xmm0 push %r13 push %r12 mov %rdi,%r12 push %rbp push %rbx sub $0x30,%rsp mov %fs:0x28,%rax mov %rax,0x28(%rsp) xor %eax,%eax movq $0x0,0x10(%rdi) movups %xmm0,(%rdi) mov (%rsi),%rdx mov 0x8(%rsi),%r13...
_Z5func0RKSt6vectorIiSaIiEE: endbr64 push r15 pxor xmm0, xmm0 push r14 push r13 push r12 push rbp push rbx mov rbx, rdi sub rsp, 48h mov rax, fs:28h mov [rsp+78h+var_40], rax xor eax, eax mov qword ptr [rdi+10h], 0 movups xmmword ptr [rdi], xmm0 mov rdx, [rsi] mov r...
long long func0(long long a1, int **a2) { int *v3; // rdx int *v4; // r13 int *v6; // rbp _DWORD *v7; // rsi int v8; // eax char *v9; // rsi _DWORD *v10; // r13 _DWORD *v11; // rbp char *v12; // rdi signed long long v13; // rbp unsigned long long v14; // r12 char *v15; // rdi _DWORD *v17; // ...
func0: ENDBR64 PUSH R15 PXOR XMM0,XMM0 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX MOV RBX,RDI SUB RSP,0x48 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x38],RAX XOR EAX,EAX MOV qword ptr [RDI + 0x10],0x0 MOVUPS xmmword ptr [RDI],XMM0 MOV RDX,qword ptr [RSI] MOV R13,qword ptr [RSI + 0x8] MOV qword ptr [RSP + 0x30...
/* func0(std::vector<int, std::allocator<int> > const&) */ vector * func0(vector *param_1) { int *piVar1; int4 *puVar2; long lVar3; ulong uVar4; vector *pvVar5; ulong uVar6; int extraout_DL; int *piVar7; int *piVar8; ulong __n; int uVar9; int8 *in_RSI; int4 *puVar10; ulong __n_00; char *...
2,660
func0
#include <iostream> #include <string> #include <assert.h>
int func0(const std::string& string, char char_to_count) { int count = 0; for (int i = 0; i < string.length(); i++) { if (string[i] == char_to_count) { count++; } } return count; }
int main() { assert(func0("Python", 'o') == 1); assert(func0("little", 't') == 2); assert(func0("assert", 's') == 2); std::cout << "All tests passed!" << std::endl; return 0; }
O0
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x28,%rsp mov %rdi,-0x28(%rbp) mov %esi,%eax mov %al,-0x2c(%rbp) movl $0x0,-0x18(%rbp) movl $0x0,-0x14(%rbp) mov -0x14(%rbp),%eax movslq %eax,%rbx...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEc: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 28h mov [rbp+var_28], rdi mov eax, esi mov [rbp+var_2C], al mov [rbp+var_18], 0 mov [rbp+var_14], 0 jmp short loc_13D9 loc_13AF: mov eax, [rbp+var_14] movsxd rdx, e...
long long func0(long long a1, char a2) { unsigned int v3; // [rsp+18h] [rbp-18h] int i; // [rsp+1Ch] [rbp-14h] v3 = 0; for ( i = 0; i < (unsigned long long)std::string::length(a1); ++i ) { if ( a2 == *(_BYTE *)std::string::operator[](a1, i) ) ++v3; } return v3; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x28 MOV qword ptr [RBP + -0x28],RDI MOV EAX,ESI MOV byte ptr [RBP + -0x2c],AL MOV dword ptr [RBP + -0x18],0x0 MOV dword ptr [RBP + -0x14],0x0 JMP 0x001013d9 LAB_001013af: MOV EAX,dword ptr [RBP + -0x14] MOVSXD RDX,EAX MOV RAX,qword ptr [RBP + -0x28] MOV RSI,RDX MOV ...
/* func0(std::string const&, char) */ int func0(string *param_1,char param_2) { char *pcVar1; ulong uVar2; int4 local_20; int4 local_1c; local_20 = 0; local_1c = 0; while( true ) { uVar2 = std::string::length(); if (uVar2 <= (ulong)(long)local_1c) break; pcVar1 = (char *)std::string::oper...
2,661
func0
#include <iostream> #include <string> #include <assert.h>
int func0(const std::string& string, char char_to_count) { int count = 0; for (int i = 0; i < string.length(); i++) { if (string[i] == char_to_count) { count++; } } return count; }
int main() { assert(func0("Python", 'o') == 1); assert(func0("little", 't') == 2); assert(func0("assert", 's') == 2); std::cout << "All tests passed!" << std::endl; return 0; }
O1
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char): endbr64 mov %rdi,%rax mov 0x8(%rdi),%rdi test %rdi,%rdi je 129b <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEc+0x32> mov (%rax),%rax add %rax,%rdi mov $0x0,%edx cmp %sil,(%rax) ...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEc: endbr64 mov rdx, [rdi+8] test rdx, rdx jz short loc_1279 mov rax, [rdi] lea rdi, [rax+rdx] mov edx, 0 loc_1262: cmp [rax], sil setz cl movzx ecx, cl add edx, ecx add rax, 1 cmp rdi, rax jnz short loc_1262 l...
long long func0(_QWORD *a1, unsigned __int8 a2) { long long v2; // rdx _BYTE *v3; // rax _BYTE *v4; // rdi unsigned int v5; // edx v2 = a1[1]; if ( v2 ) { v3 = (_BYTE *)*a1; v4 = (_BYTE *)(*a1 + v2); v5 = 0; do v5 += *v3++ == a2; while ( v4 != v3 ); } else { return 0;...
func0: ENDBR64 MOV RDX,qword ptr [RDI + 0x8] TEST RDX,RDX JZ 0x00101279 MOV RAX,qword ptr [RDI] LEA RDI,[RAX + RDX*0x1] MOV EDX,0x0 LAB_00101262: CMP byte ptr [RAX],SIL SETZ CL MOVZX ECX,CL ADD EDX,ECX ADD RAX,0x1 CMP RDI,RAX JNZ 0x00101262 LAB_00101276: MOV EAX,EDX RET LAB_00101279: MOV EDX,0x0 JMP 0x00101276
/* func0(std::string const&, char) */ int func0(string *param_1,char param_2) { char *pcVar1; char *pcVar2; int iVar3; if (*(long *)(param_1 + 8) == 0) { iVar3 = 0; } else { pcVar2 = *(char **)param_1; pcVar1 = pcVar2 + *(long *)(param_1 + 8); iVar3 = 0; do { iVar3 = iVar3 + (...
2,662
func0
#include <iostream> #include <string> #include <assert.h>
int func0(const std::string& string, char char_to_count) { int count = 0; for (int i = 0; i < string.length(); i++) { if (string[i] == char_to_count) { count++; } } return count; }
int main() { assert(func0("Python", 'o') == 1); assert(func0("little", 't') == 2); assert(func0("assert", 's') == 2); std::cout << "All tests passed!" << std::endl; return 0; }
O2
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char): endbr64 mov 0x8(%rdi),%rcx test %rcx,%rcx je 14e0 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEc+0x40> mov (%rdi),%rax xor %r8d,%r8d add %rax,%rcx nopw %cs:0x0(%rax,%rax,1) xor %...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEc: endbr64 mov rdx, [rdi+8] test rdx, rdx jz short loc_1510 mov rax, [rdi] lea rdi, [rdx+rax] xor edx, edx nop word ptr [rax+rax+00000000h] loc_14F0: xor ecx, ecx cmp sil, [rax] setz cl add rax, 1 add edx, ecx c...
long long func0(_QWORD *a1, char a2) { long long v2; // rdx _BYTE *v3; // rax _BYTE *v4; // rdi unsigned int v5; // edx int v6; // ecx v2 = a1[1]; if ( !v2 ) return 0LL; v3 = (_BYTE *)*a1; v4 = (_BYTE *)(v2 + *a1); v5 = 0; do { v6 = a2 == *v3++; v5 += v6; } while ( v4 != v3 ); ...
func0: ENDBR64 MOV RDX,qword ptr [RDI + 0x8] TEST RDX,RDX JZ 0x00101510 MOV RAX,qword ptr [RDI] LEA RDI,[RDX + RAX*0x1] XOR EDX,EDX NOP word ptr CS:[RAX + RAX*0x1] LAB_001014f0: XOR ECX,ECX CMP SIL,byte ptr [RAX] SETZ CL ADD RAX,0x1 ADD EDX,ECX CMP RDI,RAX JNZ 0x001014f0 MOV EAX,EDX RET LAB_00101510: XOR EDX,EDX MOV EA...
/* func0(std::string const&, char) */ int func0(string *param_1,char param_2) { char *pcVar1; char cVar2; char *pcVar3; int iVar4; if (*(long *)(param_1 + 8) != 0) { pcVar3 = *(char **)param_1; pcVar1 = pcVar3 + *(long *)(param_1 + 8); iVar4 = 0; do { cVar2 = *pcVar3; pcVar3 =...
2,663
func0
#include <iostream> #include <string> #include <assert.h>
int func0(const std::string& string, char char_to_count) { int count = 0; for (int i = 0; i < string.length(); i++) { if (string[i] == char_to_count) { count++; } } return count; }
int main() { assert(func0("Python", 'o') == 1); assert(func0("little", 't') == 2); assert(func0("assert", 's') == 2); std::cout << "All tests passed!" << std::endl; return 0; }
O3
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char): endbr64 mov 0x8(%rdi),%rdx test %rdx,%rdx je 1e30 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEc+0x2a0> lea -0x1(%rdx),%rax mov (%rdi),%rcx cmp $0xe,%rax jbe 1e33 <_Z5func0RKNSt7__...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEc: endbr64 mov ecx, esi mov rsi, [rdi+8] test rsi, rsi jz loc_1D48 lea rax, [rsi-1] mov rdi, [rdi] cmp rax, 0Eh jbe loc_1D4B movd xmm4, ecx mov rdx, rsi pxor xmm1, xmm1 mov rax, rdi punpcklbw xmm4, xmm4 pxor x...
long long func0(const __m128i **a1, unsigned int a2) { const __m128i *v3; // rsi const __m128i *v4; // rdi __m128i v5; // xmm4 __m128i v6; // xmm1 const __m128i *v7; // rax __m128i v8; // xmm4 unsigned long long v9; // rdx __m128i v10; // xmm4 __m128i v11; // xmm0 __m128i v12; // xmm0 __m128i v13...
func0: ENDBR64 MOV ECX,ESI MOV RSI,qword ptr [RDI + 0x8] TEST RSI,RSI JZ 0x00101d48 LEA RAX,[RSI + -0x1] MOV RDI,qword ptr [RDI] CMP RAX,0xe JBE 0x00101d4b MOVD XMM4,ECX MOV RDX,RSI PXOR XMM1,XMM1 MOV RAX,RDI PUNPCKLBW XMM4,XMM4 PXOR XMM6,XMM6 PXOR XMM5,XMM5 AND RDX,-0x10 PUNPCKLWD XMM4,XMM4 LEA R8,[RDX + RDI*0x1] PSHU...
/* func0(std::string const&, char) */ int func0(string *param_1,char param_2) { ulong uVar1; char *pcVar2; bool bVar3; bool bVar4; bool bVar5; bool bVar6; bool bVar7; bool bVar8; bool bVar9; bool bVar10; char *pcVar11; char *pcVar12; char *pcVar13; char *pcVar14; char *pcVar15; char *p...
2,664
func0
#include <string> #include <set> #include <cassert>
int func0(const std::string& string, const std::string& vowels) { std::set<char> vowelSet(vowels.begin(), vowels.end()); int count = 0; for (char ch : string) { if (vowelSet.count(ch) > 0) { count++; } } return count; }
int main() { assert(func0("corner", "AaEeIiOoUu") == 2); assert(func0("valid", "AaEeIiOoUu") == 2); assert(func0("true", "AaEeIiOoUu") == 2); return 0; }
O0
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x78,%rsp mov %rdi,-0x78(%rbp) mov %rsi,-0x80(%rbp) mov %fs:0x28,%rax m...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 78h mov [rbp+var_78], rdi mov [rbp+var_80], rsi mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax mov rax, [rbp+var_80] mov rdi, rax call __ZNKSt7__cxx1112basi...
long long func0(long long a1, long long a2) { long long v2; // rbx long long v3; // rax unsigned int v4; // ebx char v6; // [rsp+13h] [rbp-6Dh] BYREF unsigned int v7; // [rsp+14h] [rbp-6Ch] long long v8; // [rsp+18h] [rbp-68h] BYREF _QWORD v9[2]; // [rsp+20h] [rbp-60h] BYREF _BYTE v10[56]; // [rsp+30h]...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x78 MOV qword ptr [RBP + -0x78],RDI MOV qword ptr [RBP + -0x80],RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX MOV RAX,qword ptr [RBP + -0x80] MOV RDI,RAX CALL 0x00102320 MOV RBX,RAX MOV RAX,qword ptr [RBP + -0x80] MOV RDI,RAX CALL 0x001...
/* func0(std::string const&, std::string const&) */ int func0(string *param_1,string *param_2) { int iVar1; bool bVar2; __normal_iterator _Var3; __normal_iterator _Var4; char *pcVar5; long lVar6; long in_FS_OFFSET; char local_75; int local_74; int8 local_70; int8 local_68; string *local_60; ...
2,665
func0
#include <string> #include <set> #include <cassert>
int func0(const std::string& string, const std::string& vowels) { std::set<char> vowelSet(vowels.begin(), vowels.end()); int count = 0; for (char ch : string) { if (vowelSet.count(ch) > 0) { count++; } } return count; }
int main() { assert(func0("corner", "AaEeIiOoUu") == 2); assert(func0("valid", "AaEeIiOoUu") == 2); assert(func0("true", "AaEeIiOoUu") == 2); return 0; }
O1
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x58,%rsp mov %rdi,0x8(%rsp) mov %fs:0x28,%...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_: 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 rbx, [rsi] mov r14, rbx add r14, [rsi+8] mo...
long long func0(long long a1, long long a2) { _BYTE *v2; // rbx _BYTE *v3; // r14 long long insert_hint_unique_pos; // rax int *v5; // rdx int *v6; // rbp bool v7; // r12 long long v8; // rax char *v9; // rsi char *v10; // r9 unsigned int v11; // ebx long long v12; // rax char *v13; // rcx ch...
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 RBX,qword ptr [RSI] MOV R14,RBX ADD R14,qword ptr [RSI + 0x8] MOV dword ptr [RSP + 0x18],0x0 MOV qword ptr [RSP + 0x20],0x0 LEA RAX,[...
/* func0(std::string const&, std::string const&) */ int func0(string *param_1,string *param_2) { _Rb_tree_node_base *p_Var1; _Rb_tree_node *p_Var2; _Rb_tree_node *p_Var3; _Rb_tree_node *p_Var4; _Rb_tree_node_base *p_Var5; int iVar6; _Rb_tree_node_base *p_Var7; char *pcVar8; char *pcVar9; bool bVar...
2,666
func0
#include <string> #include <set> #include <cassert>
int func0(const std::string& string, const std::string& vowels) { std::set<char> vowelSet(vowels.begin(), vowels.end()); int count = 0; for (char ch : string) { if (vowelSet.count(ch) > 0) { count++; } } return count; }
int main() { assert(func0("corner", "AaEeIiOoUu") == 2); assert(func0("valid", "AaEeIiOoUu") == 2); assert(func0("true", "AaEeIiOoUu") == 2); return 0; }
O2
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x58,%rsp mov (%rsi),%rbx mov 0x8(%rsi),%r1...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 58h mov rbx, [rsi] mov r14, [rsi+8] mov [rsp+88h+var_80], rdi lea r13, [rsp+88h+var_70] add r14, rbx mov rax, fs:28h mov [rsp+88h+va...
long long func0(long long a1, unsigned __int8 **a2) { unsigned __int8 *v2; // rbx unsigned __int8 *v3; // r14 long long v4; // rax signed __int8 v5; // r15 int *v6; // rbp long long insert_unique_pos; // rax int *v8; // rdx bool v9; // al bool v10; // r12 long long v11; // rax _QWORD *v12; // rbx...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x58 MOV RBX,qword ptr [RSI] MOV R14,qword ptr [RSI + 0x8] MOV qword ptr [RSP + 0x8],RDI LEA R13,[RSP + 0x18] ADD R14,RBX 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 ...
/* func0(std::string const&, std::string const&) */ int func0(string *param_1,string *param_2) { _Rb_tree_node_base _Var1; _Rb_tree_node_base *p_Var2; _Rb_tree_node_base *p_Var3; int iVar4; _Rb_tree_node_base *p_Var5; char cVar6; char *pcVar7; char *pcVar8; _Rb_tree_node_base *p_Var9; long in_FS_O...
2,667
func0
#include <string> #include <set> #include <cassert>
int func0(const std::string& string, const std::string& vowels) { std::set<char> vowelSet(vowels.begin(), vowels.end()); int count = 0; for (char ch : string) { if (vowelSet.count(ch) > 0) { count++; } } return count; }
int main() { assert(func0("corner", "AaEeIiOoUu") == 2); assert(func0("valid", "AaEeIiOoUu") == 2); assert(func0("true", "AaEeIiOoUu") == 2); return 0; }
O3
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x58,%rsp mov (%rsi),%rbx mov 0x8(%rsi),%r1...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_: endbr64 push r15 push r14 mov r14, rdi push r13 push r12 push rbp push rbx sub rsp, 58h mov r12, [rsi] mov r13, [rsi+8] mov rax, fs:28h mov [rsp+88h+var_40], rax xor eax, eax lea rbp, [rsp+88h+var_70] mo...
long long func0(long long a1, long long a2) { char *v2; // r12 long long v3; // r13 char *v4; // r13 long long v5; // r15 char v6; // cl int *v7; // rbx bool v8; // r15 long long v9; // rax char *v10; // r8 unsigned int v11; // r12d _QWORD *v12; // rbx char *v13; // r9 char v15; // dl int *...
func0: ENDBR64 PUSH R15 PUSH R14 MOV R14,RDI PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x58 MOV R12,qword ptr [RSI] MOV R13,qword ptr [RSI + 0x8] 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 ADD R13,R12 MOV qword ptr [RSP + 0x28],RBP MOV qw...
/* func0(std::string const&, std::string const&) */ int func0(string *param_1,string *param_2) { _Rb_tree_node_base _Var1; _Rb_tree_node_base *p_Var2; long lVar3; _Rb_tree_node_base _Var4; _Rb_tree_node_base *p_Var5; char cVar6; char *pcVar7; char *pcVar8; int iVar9; _Rb_tree_node_base *p_Var10; ...
2,668
func0
#include <cassert> #include <regex> #include <string>
std::string func0(const std::string& string, char charToReplace) { std::string pattern = std::string(1, charToReplace) + "{2,}"; std::string replacement = std::string(1, charToReplace); return std::regex_replace(string, std::regex(pattern), replacement); }
int main() { assert(func0("peep", 'e') == "pep"); assert(func0("Greek", 'e') == "Grek"); assert(func0("Moon", 'o') == "Mon"); }
O0
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x98,%rsp mov %rdi,-0x88(%rbp) mov %rsi,-0x90(%rbp) mov %edx,%eax mov %al,-0x94(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax le...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEc: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 0A8h mov [rbp+var_98], rdi mov [rbp+var_A0], rsi mov eax, edx mov [rbp+var_A4], al mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax lea rax, [rbp+var_80] mov ...
long long func0(long long a1, long long a2, char a3) { _BYTE v5[32]; // [rsp+30h] [rbp-80h] BYREF _BYTE v6[32]; // [rsp+50h] [rbp-60h] BYREF _BYTE v7[40]; // [rsp+70h] [rbp-40h] BYREF unsigned long long v8; // [rsp+98h] [rbp-18h] v8 = __readfsqword(0x28u); std::string::basic_string<std::allocator<char>>(v...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0xa8 MOV qword ptr [RBP + -0x98],RDI MOV qword ptr [RBP + -0xa0],RSI MOV EAX,EDX MOV byte ptr [RBP + -0xa4],AL MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX LEA RAX,[RBP + -0x80] MOV qword ptr [RBP + -0x90],RAX NOP NOP MOVSX EDX,byte ptr [RB...
/* func0(std::string const&, char) */ string * func0(string *param_1,char param_2) { char in_DL; int7 in_register_00000031; long in_FS_OFFSET; allocator local_88 [32]; string local_68 [32]; string local_48 [40]; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); /* try { ...
2,669
func0
#include <cassert> #include <regex> #include <string>
std::string func0(const std::string& string, char charToReplace) { std::string pattern = std::string(1, charToReplace) + "{2,}"; std::string replacement = std::string(1, charToReplace); return std::regex_replace(string, std::regex(pattern), replacement); }
int main() { assert(func0("peep", 'e') == "pep"); assert(func0("Greek", 'e') == "Grek"); assert(func0("Moon", 'o') == "Mon"); }
O1
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char): endbr64 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x210,%rsp mov %rdi,%rbx mov %rsi,%r12 mov %fs:0x28,%rax mov %rax,0x208(%rsp) xor %eax,%eax movsbl %dl,%ebp lea 0x70(%rsp),%r...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEc: endbr64 push rbp mov rbp, rsp push r14 push r12 push rbx sub rsp, 208h mov rbx, rdi mov r12, rsi mov rax, fs:28h mov [rbp+var_28], rax xor eax, eax lea rdi, [rbp+var_1C0] lea rax, [rbp+var_1B0] mov [rbp+...
long long func0(long long a1, long long a2, char a3) { unsigned int v5; // r14d long long v6; // rax long long v7; // rdx long long v8; // rsi _DWORD *v9; // r9 _DWORD *v10; // rcx long long v11; // rdi unsigned int v12; // ecx long long v13; // rdx long long v14; // rax long long v15; // rdi i...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x208 MOV RBX,RDI MOV R12,RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x28],RAX XOR EAX,EAX LEA RDI,[RBP + -0x1c0] LEA RAX,[RBP + -0x1b0] MOV qword ptr [RBP + -0x1c0],RAX MOVSX EAX,DL MOV R14D,EAX MOV EDX,EAX MOV ESI,0x1 LAB_00104874: CALL...
/* func0(std::string const&, char) */ string * func0(string *param_1,char param_2) { long *plVar1; ulong uVar2; __normal_iterator _Var3; _Sp_counted_base<(_Lock_policy)2> *this; _Sp_counted_base<(_Lock_policy)2> *p_Var4; long *plVar5; int8 uVar6; uint uVar7; long *plVar8; int7 in_register_00000031...
2,670
func0
#include <cassert> #include <regex> #include <string>
std::string func0(const std::string& string, char charToReplace) { std::string pattern = std::string(1, charToReplace) + "{2,}"; std::string replacement = std::string(1, charToReplace); return std::regex_replace(string, std::regex(pattern), replacement); }
int main() { assert(func0("peep", 'e') == "pep"); assert(func0("Greek", 'e') == "Grek"); assert(func0("Moon", 'o') == "Mon"); }
O2
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char): endbr64 push %r15 push %r14 push %r13 movsbl %dl,%r13d push %r12 mov %r13d,%edx mov %rdi,%r12 push %rbp push %rbx mov %rsi,%rbx mov $0x1,%esi sub $0x238,%rsp lea 0x90(%rsp),%rbp lea 0xa0...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEc: endbr64 push rbp mov rbp, rsp push r15 push r14 push r13 lea r13, [rbp+var_1C0] push r12 movsx r12d, dl push rbx lea rbx, [rbp+var_1D0] mov edx, r12d sub rsp, 348h mov [rbp+var_318], rdi mov rdi, rbx mov ...
_QWORD * func0(_QWORD *a1, unsigned long long *a2, char a3) { unsigned int v3; // r12d long long v4; // rax long long v5; // rsi long long v6; // rdx _QWORD *v7; // rdi void *v8; // rsi __m128i v9; // xmm0 volatile signed __int32 *v10; // rbx volatile signed __int32 *v11; // rdx signed __int32 v12; ...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 LEA R13,[RBP + -0x1c0] PUSH R12 MOVSX R12D,DL PUSH RBX LEA RBX,[RBP + -0x1d0] MOV EDX,R12D SUB RSP,0x348 MOV qword ptr [RBP + -0x318],RDI MOV RDI,RBX MOV qword ptr [RBP + -0x2d8],RSI MOV ESI,0x1 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x38],RAX XO...
/* func0(std::string const&, char) */ string * func0(string *param_1,char param_2) { long *plVar1; _Sp_counted_base<(_Lock_policy)2> *p_Var2; string sVar3; int8 uVar4; int auVar5 [16]; bool bVar6; char cVar7; int iVar8; long *plVar9; int8 *puVar10; string *psVar11; long lVar12; string *psVar...
2,671
func0
#include <cassert> #include <regex> #include <string>
std::string func0(const std::string& string, char charToReplace) { std::string pattern = std::string(1, charToReplace) + "{2,}"; std::string replacement = std::string(1, charToReplace); return std::regex_replace(string, std::regex(pattern), replacement); }
int main() { assert(func0("peep", 'e') == "pep"); assert(func0("Greek", 'e') == "Grek"); assert(func0("Moon", 'o') == "Mon"); }
O3
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char): endbr64 push %r15 push %r14 push %r13 movsbl %dl,%r13d push %r12 mov %r13d,%edx mov %rdi,%r12 push %rbp push %rbx mov %rsi,%rbx mov $0x1,%esi sub $0x238,%rsp lea 0x90(%rsp),%rbp lea 0xa0...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEc: endbr64 push rbp mov rbp, rsp push r15 push r14 push r13 movsx r13d, dl push r12 mov edx, r13d mov r12, rsi mov esi, 1 push rbx mov rbx, rdi lea rdi, [rbp+var_1D0] mov r14, rdi sub rsp, 318h mov rax,...
_QWORD * func0(_QWORD *a1, char **a2, char a3) { unsigned int v3; // r13d long long v6; // rax long long v7; // rsi long long v8; // rdx __m128i v9; // xmm0 long long v10; // rdi void *v11; // rdi unsigned long long v12; // r13 void **v13; // rax void **v14; // r14 char *v15; // rdx char *v16; /...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 MOVSX R13D,DL PUSH R12 MOV EDX,R13D MOV R12,RSI MOV ESI,0x1 PUSH RBX MOV RBX,RDI LEA RDI,[RBP + -0x1d0] MOV R14,RDI SUB RSP,0x318 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x38],RAX XOR EAX,EAX LEA RAX,[RBP + -0x1c0] MOV qword ptr [RBP + -0x1d0],RAX...
/* func0(std::string const&, char) */ string * func0(string *param_1,char param_2) { string *psVar1; string sVar2; string *psVar3; int8 this; string *psVar4; int auVar5 [16]; bool bVar6; char cVar7; int iVar8; long *plVar9; int8 *puVar10; long lVar11; ulong uVar12; string *psVar13; strin...
2,672
func0
#include <iostream> #include <regex> #include <cassert>
std::string func0(const std::string& Ip) { std::regex regex("^(25[0-5]|2[0-4][0-9]|[0-1]?[0-9][0-9]?)\\." "(25[0-5]|2[0-4][0-9]|[0-1]?[0-9][0-9]?)\\." "(25[0-5]|2[0-4][0-9]|[0-1]?[0-9][0-9]?)\\." "(25[0-5]|2[0-4][0-9]|[0-1]?[0-9][0-9]?)$"); if ...
int main() { assert(func0("192.168.0.1") == "Valid IP address"); assert(func0("110.234.52.124") == "Valid IP address"); assert(func0("366.1.2.2") == "Invalid IP address"); return 0; }
O0
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x58,%rsp mov %rdi,-0x58(%rbp) mov %rsi,-0x60(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax lea -0x40(%rbp),%rax mov $0x10,%edx lea ...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 68h mov [rbp+var_68], rdi mov [rbp+var_70], rsi mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax lea rax, [rbp+var_40] mov edx, 10h lea rcx, a25052040901090; "^...
long long func0(long long a1, long long a2) { char v3; // [rsp+1Fh] [rbp-51h] BYREF char *v4; // [rsp+20h] [rbp-50h] char *v5; // [rsp+28h] [rbp-48h] _BYTE v6[40]; // [rsp+30h] [rbp-40h] BYREF unsigned long long v7; // [rsp+58h] [rbp-18h] v7 = __readfsqword(0x28u); std::basic_regex<char,std::regex_trait...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x68 MOV qword ptr [RBP + -0x68],RDI MOV qword ptr [RBP + -0x70],RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX LEA RAX,[RBP + -0x40] MOV EDX,0x10 LEA RCX,[0x132058] MOV RSI,RCX MOV RDI,RAX LAB_00104b43: CALL 0x001061ba LEA RCX,[RBP + -0x...
/* func0(std::string const&) */ string * func0(string *param_1) { bool bVar1; string *in_RSI; long in_FS_OFFSET; allocator local_59; allocator *local_58; allocator *local_50; regex local_48 [40]; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); std::regex::basic_regex (loca...
2,673
func0
#include <iostream> #include <regex> #include <cassert>
std::string func0(const std::string& Ip) { std::regex regex("^(25[0-5]|2[0-4][0-9]|[0-1]?[0-9][0-9]?)\\." "(25[0-5]|2[0-4][0-9]|[0-1]?[0-9][0-9]?)\\." "(25[0-5]|2[0-4][0-9]|[0-1]?[0-9][0-9]?)\\." "(25[0-5]|2[0-4][0-9]|[0-1]?[0-9][0-9]?)$"); if ...
int main() { assert(func0("192.168.0.1") == "Valid IP address"); assert(func0("110.234.52.124") == "Valid IP address"); assert(func0("366.1.2.2") == "Invalid IP address"); return 0; }
O1
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 push %r13 push %r12 push %rbp push %rbx sub $0x58,%rsp mov %rdi,%rbx mov %rsi,%rbp mov %fs:0x28,%rax mov %rax,0x48(%rsp) xor %eax,%eax lea 0x20(%rsp),%r13 mov %r13,%rdi callq 4730 <_ZN...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push rbp mov rbp, rsp push r14 push r12 push rbx sub rsp, 58h mov rbx, rdi mov r14, rsi mov rax, fs:28h mov [rbp+var_28], rax xor eax, eax lea r12, [rbp+var_70] lea rdi, [rbp+var_68]; this call __Z...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x58 MOV RBX,RDI MOV R14,RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x28],RAX XOR EAX,EAX LEA R12,[RBP + -0x70] LEA RDI,[RBP + -0x68] CALL 0x001046f0 MOV qword ptr [RBP + -0x60],0x0 MOV qword ptr [RBP + -0x58],0x0 MOV ECX,0x10 LEA RDX,[0x...
/* func0(std::string const&) */ string * func0(string *param_1) { _Sp_counted_base<(_Lock_policy)2> *p_Var1; _Sp_counted_base<(_Lock_policy)2> *p_Var2; bool bVar3; int iVar4; int8 *in_RSI; long in_FS_OFFSET; regex local_78 [8]; int local_70 [8]; int8 local_68; _Sp_counted_base<(_Lock_policy)2> *lo...
2,674
func0
#include <iostream> #include <regex> #include <cassert>
std::string func0(const std::string& Ip) { std::regex regex("^(25[0-5]|2[0-4][0-9]|[0-1]?[0-9][0-9]?)\\." "(25[0-5]|2[0-4][0-9]|[0-1]?[0-9][0-9]?)\\." "(25[0-5]|2[0-4][0-9]|[0-1]?[0-9][0-9]?)\\." "(25[0-5]|2[0-4][0-9]|[0-1]?[0-9][0-9]?)$"); if ...
int main() { assert(func0("192.168.0.1") == "Valid IP address"); assert(func0("110.234.52.124") == "Valid IP address"); assert(func0("366.1.2.2") == "Invalid IP address"); return 0; }
O2
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 push %r14 push %r13 push %r12 mov %rdi,%r12 push %rbp push %rbx mov %rsi,%rbx sub $0x50,%rsp mov %fs:0x28,%rax mov %rax,0x48(%rsp) xor %eax,%eax lea 0x20(%rsp),%r13 lea 0x8(%rsp),%rbp...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push rbp mov rbp, rsp push r15 mov r15, rsi push r14 push r13 lea r13, [rbp+var_80] push r12 lea r12, [rbp+var_78] push rbx mov rbx, rdi mov rdi, r12; this sub rsp, 58h mov rax, fs:28h mov [rbp+...
long long * func0(long long *a1, long long *a2) { long long v3; // rdi long long v4; // rsi char v5; // r15 long long v6; // rax void *v7; // rdx __m128i si128; // xmm0 _BYTE *v9; // rax long long v10; // rdx long long v11; // rdi long long v12; // rdx volatile signed __int32 *v13; // rcx signed...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R15 MOV R15,RSI PUSH R14 PUSH R13 LEA R13,[RBP + -0x80] PUSH R12 LEA R12,[RBP + -0x78] PUSH RBX MOV RBX,RDI MOV RDI,R12 SUB RSP,0x58 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x38],RAX XOR EAX,EAX CALL 0x001036d0 LEA RDX,[0x11850c] PXOR XMM0,XMM0 MOV RDI,R13 MOV ECX,0x10...
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* func0(std::string const&) */ string * func0(string *param_1) { _Sp_counted_base<(_Lock_policy)2> *p_Var1; int8 uVar2; int8 uVar3; bool bVar4; int iVar5; int8 *puVar6; int8 *in_RSI; long in_FS_OFFSET; regex local_...
2,675
func0
#include <iostream> #include <regex> #include <cassert>
std::string func0(const std::string& Ip) { std::regex regex("^(25[0-5]|2[0-4][0-9]|[0-1]?[0-9][0-9]?)\\." "(25[0-5]|2[0-4][0-9]|[0-1]?[0-9][0-9]?)\\." "(25[0-5]|2[0-4][0-9]|[0-1]?[0-9][0-9]?)\\." "(25[0-5]|2[0-4][0-9]|[0-1]?[0-9][0-9]?)$"); if ...
int main() { assert(func0("192.168.0.1") == "Valid IP address"); assert(func0("110.234.52.124") == "Valid IP address"); assert(func0("366.1.2.2") == "Invalid IP address"); return 0; }
O3
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 push %r14 push %r13 push %r12 mov %rdi,%r12 push %rbp push %rbx mov %rsi,%rbx sub $0x50,%rsp mov %fs:0x28,%rax mov %rax,0x48(%rsp) xor %eax,%eax lea 0x20(%rsp),%rbp lea 0x8(%rsp),%r13...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push r15 mov r15, rsi push r14 push r13 push r12 push rbp push rbx mov rbx, rdi sub rsp, 2B8h mov rax, fs:28h mov [rsp+2E8h+var_40], rax xor eax, eax lea r14, [rsp+2E8h+var_2A0] mov rdi, r14; this c...
long long * func0(long long *a1, unsigned long long *a2) { __m128i v3; // xmm0 long long v4; // rdi void *v5; // rdi void **v6; // rbp unsigned long long v7; // r12 void *v8; // rdi unsigned long long v9; // r13 unsigned long long v10; // r12 long long v11; // rax long long v12; // rcx unsigned lo...
func0: ENDBR64 PUSH R15 MOV R15,RSI PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX MOV RBX,RDI SUB RSP,0x2b8 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x2a8],RAX XOR EAX,EAX LEA R14,[RSP + 0x48] MOV RDI,R14 CALL 0x00104730 LEA RDX,[0x11a50c] PXOR XMM0,XMM0 LEA RDI,[RSP + 0x110] MOV R8D,0x10 MOV RCX,R14 MOVAPS xmmw...
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* func0(std::string const&) */ string * func0(string *param_1) { ulong uVar1; int8 uVar2; ulong uVar3; int auVar4 [16]; bool bVar5; int8 uVar6; char cVar7; long lVar8; int8 *puVar9; ulong uVar10; int8 *puVar11;...
2,676
func0
#include <vector> #include <algorithm> #include <assert.h>
bool func0(std::vector<int> nums) { if (std::is_sorted(nums.begin(), nums.end())) { return true; } else { return false; } }
int main() { assert(func0({-4, -3, -2, -1}) == true); assert(func0({1, 2, 3}) == true); assert(func0({3, 2, 1}) == false); return 0; }
O0
cpp
func0(std::vector<int, std::allocator<int> >): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x18,%rsp mov %rdi,-0x18(%rbp) mov -0x18(%rbp),%rax mov %rax,%rdi callq 15dc <_ZNSt6vectorIiSaIiEE3endEv> mov %rax,%rbx mov -0x18(%rbp),%rax mov %rax,%rdi callq 1590 <_ZNSt6vectorIiSaIiEE5beginEv>...
_Z5func0St6vectorIiSaIiEE: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 18h mov [rbp+var_18], rdi mov rax, [rbp+var_18] mov rdi, rax call _ZNSt6vectorIiSaIiEE3endEv; std::vector<int>::end(void) mov rbx, rax mov rax, [rbp+var_18] mov rdi, rax call _ZNSt6vectorIiSaIiEE5begin...
_BOOL8 func0(long long a1) { long long v1; // rbx long long v2; // rax v1 = std::vector<int>::end(a1); v2 = std::vector<int>::begin(a1); return (unsigned __int8)std::is_sorted<__gnu_cxx::__normal_iterator<int *,std::vector<int>>>(v2, v1) != 0; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x18 MOV qword ptr [RBP + -0x18],RDI MOV RAX,qword ptr [RBP + -0x18] MOV RDI,RAX CALL 0x0010162a MOV RBX,RAX MOV RAX,qword ptr [RBP + -0x18] MOV RDI,RAX CALL 0x001015de MOV RSI,RBX MOV RDI,RAX CALL 0x0010167a TEST AL,AL JZ 0x0010128b MOV EAX,0x1 JMP 0x00101290 LAB_00...
/* func0(std::vector<int, std::allocator<int> >) */ bool func0(vector param_1) { bool bVar1; __normal_iterator _Var2; __normal_iterator _Var3; int4 in_register_0000003c; _Var2 = std::vector<int,std::allocator<int>>::end ((vector<int,std::allocator<int>> *)CONCAT44(in_register_0000003c...
2,677
func0
#include <vector> #include <algorithm> #include <assert.h>
bool func0(std::vector<int> nums) { if (std::is_sorted(nums.begin(), nums.end())) { return true; } else { return false; } }
int main() { assert(func0({-4, -3, -2, -1}) == true); assert(func0({1, 2, 3}) == true); assert(func0({3, 2, 1}) == false); return 0; }
O1
cpp
func0(std::vector<int, std::allocator<int> >): endbr64 mov 0x8(%rdi),%rdx mov (%rdi),%rcx mov %rdx,%rax cmp %rdx,%rcx je 1235 <_Z5func0St6vectorIiSaIiEE+0x2c> lea 0x4(%rcx),%rax cmp %rax,%rdx je 1235 <_Z5func0St6vectorIiSaIiEE+0x2c> mov -0x4(%rax),%esi cmp %esi,(%rax) jl 1235 <_Z5fun...
_Z5func0St6vectorIiSaIiEE: endbr64 mov rdx, [rdi+8] mov rcx, [rdi] mov rax, rdx cmp rcx, rdx jz short loc_1235 lea rax, [rcx+4] cmp rdx, rax jz short loc_1235 loc_1225: mov esi, [rax-4] cmp [rax], esi jl short loc_1235 add rax, 4 cmp rdx, rax jnz short loc_1225...
bool func0(_QWORD *a1) { _DWORD *v1; // rdx _DWORD *v2; // rcx _DWORD *i; // rax v1 = (_DWORD *)a1[1]; v2 = (_DWORD *)*a1; i = v1; if ( (_DWORD *)*a1 != v1 ) { for ( i = v2 + 1; v1 != i; ++i ) { if ( *i < *(i - 1) ) break; } } return v1 == i; }
func0: ENDBR64 MOV RDX,qword ptr [RDI + 0x8] MOV RCX,qword ptr [RDI] MOV RAX,RDX CMP RCX,RDX JZ 0x00101235 LEA RAX,[RCX + 0x4] CMP RDX,RAX JZ 0x00101235 LAB_00101225: MOV ESI,dword ptr [RAX + -0x4] CMP dword ptr [RAX],ESI JL 0x00101235 ADD RAX,0x4 CMP RDX,RAX JNZ 0x00101225 LAB_00101235: CMP RDX,RAX SETZ AL RET
/* func0(std::vector<int, std::allocator<int> >) */ int8 func0(vector param_1) { int iVar1; int *piVar2; int *piVar3; int *piVar4; int4 in_register_0000003c; piVar2 = *(int **)(CONCAT44(in_register_0000003c,param_1) + 8); piVar4 = piVar2; piVar3 = *(int **)CONCAT44(in_register_0000003c,param_1); ...
2,678
func0
#include <vector> #include <algorithm> #include <assert.h>
bool func0(std::vector<int> nums) { if (std::is_sorted(nums.begin(), nums.end())) { return true; } else { return false; } }
int main() { assert(func0({-4, -3, -2, -1}) == true); assert(func0({1, 2, 3}) == true); assert(func0({3, 2, 1}) == false); return 0; }
O2
cpp
func0(std::vector<int, std::allocator<int> >): endbr64 mov 0x8(%rdi),%rsi mov (%rdi),%rdx mov $0x1,%r8d cmp %rsi,%rdx je 1430 <_Z5func0St6vectorIiSaIiEE+0x40> lea 0x4(%rdx),%rax cmp %rsi,%rax je 1430 <_Z5func0St6vectorIiSaIiEE+0x40> mov (%rdx),%edx jmp 1421 <_Z5func0St6vectorIiSaIiEE+0x3...
_Z5func0St6vectorIiSaIiEE: endbr64 mov rsi, [rdi+8] mov rdx, [rdi] mov eax, 1 cmp rdx, rsi jz short locret_13AF lea rax, [rdx+4] cmp rsi, rax jz short loc_13A9 mov edx, [rdx] jmp short loc_13A1 loc_1398: add rax, 4 cmp rsi, rax jz short loc_13A9 loc_13A1: mov e...
bool func0(int **a1) { int *v1; // rsi int *v2; // rdx bool result; // al int *v4; // rax int v5; // edx int v6; // ecx v1 = a1[1]; v2 = *a1; result = 1; if ( *a1 != v1 ) { v4 = v2 + 1; if ( v1 != v2 + 1 ) { v5 = *v2; do { v6 = v5; v5 = *v4; ...
func0: ENDBR64 MOV RSI,qword ptr [RDI + 0x8] MOV RDX,qword ptr [RDI] MOV EAX,0x1 CMP RDX,RSI JZ 0x001013af LEA RAX,[RDX + 0x4] CMP RSI,RAX JZ 0x001013a9 MOV EDX,dword ptr [RDX] JMP 0x001013a1 LAB_00101398: ADD RAX,0x4 CMP RSI,RAX JZ 0x001013a9 LAB_001013a1: MOV ECX,EDX MOV EDX,dword ptr [RAX] CMP ECX,EDX JLE 0x00101398...
/* func0(std::vector<int, std::allocator<int> >) */ int8 func0(vector param_1) { int iVar1; int *piVar2; int *piVar3; int8 uVar4; int *piVar5; int iVar6; int4 in_register_0000003c; piVar2 = *(int **)(CONCAT44(in_register_0000003c,param_1) + 8); piVar3 = *(int **)CONCAT44(in_register_0000003c,para...
2,679
func0
#include <vector> #include <algorithm> #include <assert.h>
bool func0(std::vector<int> nums) { if (std::is_sorted(nums.begin(), nums.end())) { return true; } else { return false; } }
int main() { assert(func0({-4, -3, -2, -1}) == true); assert(func0({1, 2, 3}) == true); assert(func0({3, 2, 1}) == false); return 0; }
O3
cpp
func0(std::vector<int, std::allocator<int> >): endbr64 mov 0x8(%rdi),%rsi mov (%rdi),%rdx mov $0x1,%r8d cmp %rsi,%rdx je 1430 <_Z5func0St6vectorIiSaIiEE+0x40> lea 0x4(%rdx),%rax cmp %rsi,%rax je 1430 <_Z5func0St6vectorIiSaIiEE+0x40> mov (%rdx),%edx jmp 1421 <_Z5func0St6vectorIiSaIiEE+0x3...
_Z5func0St6vectorIiSaIiEE: endbr64 mov rsi, [rdi+8] mov rdx, [rdi] mov ecx, 1 cmp rdx, rsi jz short loc_141F lea rax, [rdx+4] cmp rax, rsi jz short loc_141F mov edx, [rdx] jmp short loc_1411 loc_1408: add rax, 4 cmp rsi, rax jz short loc_1428 loc_1411: mov ecx,...
long long func0(unsigned int **a1) { unsigned int *v1; // rsi unsigned int *v2; // rdx unsigned int v3; // ecx unsigned int *v4; // rax unsigned int v5; // edx v1 = a1[1]; v2 = *a1; v3 = 1; if ( *a1 == v1 ) return v3; v4 = v2 + 1; if ( v2 + 1 == v1 ) return v3; v5 = *v2; do { v...
func0: ENDBR64 MOV RSI,qword ptr [RDI + 0x8] MOV RDX,qword ptr [RDI] MOV ECX,0x1 CMP RDX,RSI JZ 0x0010141f LEA RAX,[RDX + 0x4] CMP RAX,RSI JZ 0x0010141f MOV EDX,dword ptr [RDX] JMP 0x00101411 LAB_00101408: ADD RAX,0x4 CMP RSI,RAX JZ 0x00101428 LAB_00101411: MOV ECX,EDX MOV EDX,dword ptr [RAX] CMP ECX,EDX JLE 0x00101408...
/* func0(std::vector<int, std::allocator<int> >) */ int4 func0(vector param_1) { int iVar1; int *piVar2; int *piVar3; int *piVar4; int4 uVar5; int iVar6; int4 in_register_0000003c; piVar2 = *(int **)(CONCAT44(in_register_0000003c,param_1) + 8); piVar3 = *(int **)CONCAT44(in_register_0000003c,para...
2,680
func0
#include <cmath> #include <cassert>
int func0(int n) { if (n == 0) { return 1; } if ((n & (n + 1)) == 0) { return n; } int pos = int(log2((~n) & -(~n)) + 1); // int pos = get_Pos_Of_Right_most_Set_Bit(~n); return ((1 << (pos - 1)) | n); }
int main() { assert(func0(21) == 23); assert(func0(11) == 15); assert(func0(15) == 15); return 0; }
O0
cpp
func0(int): endbr64 push %rbp mov %rsp,%rbp sub $0x20,%rsp mov %edi,-0x14(%rbp) cmpl $0x0,-0x14(%rbp) jne 1185 <_Z5func0i+0x1c> mov $0x1,%eax jmp 11d6 <_Z5func0i+0x6d> mov -0x14(%rbp),%eax add $0x1,%eax and -0x14(%rbp),%eax test %eax,%eax jne 1197 <_Z5func0i+0x2e> mov -0x14(%rbp),...
_Z5func0i: endbr64 push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_14], edi cmp [rbp+var_14], 0 jnz short loc_1185 mov eax, 1 jmp short locret_11E4 loc_1185: mov eax, [rbp+var_14] add eax, 1 and eax, [rbp+var_14] test eax, eax jnz short loc_1197 mov eax, [rbp+var_14...
long long func0(unsigned int a1) { if ( !a1 ) return 1LL; if ( (a1 & (a1 + 1)) != 0 ) return a1 | (1 << ((int)(log2((double)(int)(~a1 & (a1 + 1))) + 1.0) - 1)); return a1; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0x14],EDI CMP dword ptr [RBP + -0x14],0x0 JNZ 0x00101185 MOV EAX,0x1 JMP 0x001011e4 LAB_00101185: MOV EAX,dword ptr [RBP + -0x14] ADD EAX,0x1 AND EAX,dword ptr [RBP + -0x14] TEST EAX,EAX JNZ 0x00101197 MOV EAX,dword ptr [RBP + -0x14] JMP 0x001011e4 ...
/* func0(int) */ int func0(int param_1) { double dVar1; if (param_1 == 0) { param_1 = 1; } else if ((param_1 + 1U & param_1) != 0) { dVar1 = log2((double)(int)(param_1 + 1U & ~param_1)); param_1 = 1 << ((char)(int)(dVar1 + DAT_00102070) - 1U & 0x1f) | param_1; } return param_1; }
2,681
func0
#include <cmath> #include <cassert>
int func0(int n) { if (n == 0) { return 1; } if ((n & (n + 1)) == 0) { return n; } int pos = int(log2((~n) & -(~n)) + 1); // int pos = get_Pos_Of_Right_most_Set_Bit(~n); return ((1 << (pos - 1)) | n); }
int main() { assert(func0(21) == 23); assert(func0(11) == 15); assert(func0(15) == 15); return 0; }
O1
cpp
func0(int): endbr64 mov $0x1,%eax test %edi,%edi je 11ab <_Z5func0i+0x42> push %rbx mov %edi,%ebx lea 0x1(%rdi),%edx mov %edi,%eax test %edi,%edx jne 1184 <_Z5func0i+0x1b> pop %rbx retq not %eax and %edx,%eax pxor %xmm0,%xmm0 cvtsi2sd %eax,%xmm0 callq 1060 <log2@plt> addsd 0xeeb(%r...
_Z5func0i: endbr64 mov eax, 1 test edi, edi jz short locret_11AB push rbx mov ebx, edi lea edx, [rdi+1] mov eax, edi test edx, edi jnz short loc_1184 loc_1182: pop rbx retn loc_1184: not eax and eax, edx pxor xmm0, xmm0 cvtsi2sd xmm0, eax; x call _log2 addsd xmm0, c...
int func0(int a1) { int result; // eax double v2; // xmm0_8 result = 1; if ( a1 ) { result = a1; if ( (a1 & (a1 + 1)) != 0 ) { v2 = log2((double)((a1 + 1) & ~a1)); result = a1; _bittestandset(&result, (int)(v2 + 1.0) - 1); } } return result; }
func0: ENDBR64 MOV EAX,0x1 TEST EDI,EDI JZ 0x001011ab PUSH RBX MOV EBX,EDI LEA EDX,[RDI + 0x1] MOV EAX,EDI TEST EDX,EDI JNZ 0x00101184 LAB_00101182: POP RBX RET LAB_00101184: NOT EAX AND EAX,EDX PXOR XMM0,XMM0 CVTSI2SD XMM0,EAX CALL 0x00101060 ADDSD XMM0,qword ptr [0x00102060] CVTTSD2SI EDX,XMM0 SUB EDX,0x1 MOV EAX,EBX...
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* func0(int) */ int func0(int param_1) { double dVar1; if (param_1 != 0) { if ((param_1 + 1U & param_1) != 0) { dVar1 = log2((double)(int)(~param_1 & param_1 + 1U)); param_1 = param_1 | 1 << ((int)(dVar1 + _DA...