index
int64
0
66.5k
func_name
stringlengths
2
5.36k
func_dep
stringlengths
16
2.19k
func
stringlengths
8
55.3k
test
stringlengths
0
7.07k
opt
stringclasses
4 values
language
stringclasses
2 values
asm
stringlengths
0
45.4k
ida_asm
stringlengths
0
44.7k
ida_pseudo
stringlengths
0
44.3k
ghidra_asm
stringlengths
0
49.1k
ghidra_pseudo
stringlengths
0
64.7k
3,682
func0
#include <vector> #include <cassert> using namespace std;
vector<vector<int>> func0(const vector<int>& test_tup, int N) { vector<vector<int>> res; for (size_t i = 0; i < test_tup.size(); i += N) { vector<int> chunk; for (size_t j = i; j < i + N && j < test_tup.size(); j++) { chunk.push_back(test_tup[j]); } res.push_ba...
int main() { { vector<vector<int>> expected = { {10, 4, 5}, {6, 7, 6}, {8, 3, 4} }; assert(func0({10, 4, 5, 6, 7, 6, 8, 3, 4}, 3) == expected); } { vector<vector<int>> expected = { {1, 2}, {3, 4}, {5, 6}, {7, 8}, {9} }; assert(func0({1, 2, 3, 4, 5, 6, 7, 8, 9}, 2) == e...
O2
cpp
func0(std::vector<int, std::allocator<int> > const&, int): endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x48,%rsp mov %rdi,0x8(%rsp) mov %fs:0x28,%rax mov %rax,0x38(%rsp) xor %eax,%eax movslq %edx,%rax movq $0x0,(%rdi) mov %rax,0x18(%rsp) mov 0x8(%rsi),%rax...
_Z5func0RKSt6vectorIiSaIiEEi: endbr64 push r15 pxor xmm0, xmm0 push r14 mov r14, rdi push r13 push r12 push rbp push rbx sub rsp, 48h mov rax, fs:28h mov [rsp+78h+var_40], rax xor eax, eax mov qword ptr [rdi+10h], 0 mov rax, [rsi+8] movups xmmword ptr [rdi], xmm0 movsxd...
long long func0(long long a1, _QWORD *a2, int a3) { long long v4; // rax unsigned long long v6; // rbp unsigned long long v7; // r12 char *v8; // rsi _DWORD *v9; // rdx _QWORD *v10; // r12 _QWORD *v11; // rsi _DWORD *v12; // r13 _BYTE *v13; // rax _DWORD *v14; // rax size_t v15; // rdx _DWORD *...
func0: ENDBR64 PUSH R15 PXOR XMM0,XMM0 PUSH R14 MOV R14,RDI PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x48 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x38],RAX XOR EAX,EAX MOV qword ptr [RDI + 0x10],0x0 MOV RAX,qword ptr [RSI + 0x8] MOVUPS xmmword ptr [RDI],XMM0 MOVSXD RDI,EDX MOV qword ptr [RSP + 0x18],RDI CMP...
/* WARNING: Type propagation algorithm not settling */ /* func0(std::vector<int, std::allocator<int> > const&, int) */ vector * func0(vector *param_1,int param_2) { int *piVar1; int (*pauVar2) [16]; long lVar3; vector<int,std::allocator<int>> *__n; vector<int,std::allocator<int>> *__dest; int (*pauVar4) [...
3,683
func0
#include <vector> #include <cassert> using namespace std;
vector<vector<int>> func0(const vector<int>& test_tup, int N) { vector<vector<int>> res; for (size_t i = 0; i < test_tup.size(); i += N) { vector<int> chunk; for (size_t j = i; j < i + N && j < test_tup.size(); j++) { chunk.push_back(test_tup[j]); } res.push_ba...
int main() { { vector<vector<int>> expected = { {10, 4, 5}, {6, 7, 6}, {8, 3, 4} }; assert(func0({10, 4, 5, 6, 7, 6, 8, 3, 4}, 3) == expected); } { vector<vector<int>> expected = { {1, 2}, {3, 4}, {5, 6}, {7, 8}, {9} }; assert(func0({1, 2, 3, 4, 5, 6, 7, 8, 9}, 2) == e...
O3
cpp
func0(std::vector<int, std::allocator<int> > const&, int): endbr64 push %r15 pxor %xmm0,%xmm0 push %r14 push %r13 push %r12 push %rbp mov %rsi,%rbp movslq %edx,%rsi push %rbx sub $0x58,%rsp mov 0x0(%rbp),%rdx mov %rdi,0x10(%rsp) mov %fs:0x28,%rax mov %rax,0x48(%rsp) xor %eax,%eax mov ...
_Z5func0RKSt6vectorIiSaIiEEi: endbr64 push r15 pxor xmm0, xmm0 push r14 mov r14, rdi movsxd rdi, edx push r13 push r12 push rbp push rbx sub rsp, 48h mov rdx, [rsi] mov rax, fs:28h mov [rsp+78h+var_40], rax xor eax, eax mov rax, [rsi+8] mov qword ptr [r14+10h], 0 mo...
long long func0(long long a1, long long *a2, int a3) { long long v4; // rdi long long v5; // rdx long long v6; // rax unsigned long long i; // r12 unsigned long long v9; // rbp char *v10; // rsi _DWORD *v11; // rdx _QWORD *v12; // r12 _QWORD *v13; // rsi _DWORD *v14; // r13 _BYTE *v15; // rax s...
func0: ENDBR64 PUSH R15 PXOR XMM0,XMM0 PUSH R14 MOV R14,RDI MOVSXD RDI,EDX PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x48 MOV RDX,qword ptr [RSI] MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x38],RAX XOR EAX,EAX MOV RAX,qword ptr [RSI + 0x8] MOV qword ptr [R14 + 0x10],0x0 MOV qword ptr [RSP + 0x18],RDI MOVUPS xm...
/* func0(std::vector<int, std::allocator<int> > const&, int) */ vector * func0(vector *param_1,int param_2) { ulong uVar1; int *piVar2; int (*pauVar3) [16]; long lVar4; int4 *__n; int4 *__dest; int (*pauVar5) [16]; ulong in_RCX; int in_EDX; long lVar6; int4 in_register_00000034; long *plVar7; ...
3,684
func0
#include <vector> #include <assert.h>
std::pair<int, int> func0(const std::vector<int>& arr) { int arr_len = arr.size(); if (arr_len < 2) { return std::make_pair(0,0); // Return a pair of zeros if less than two elements } int x = arr[0]; int y = arr[1]; for (int i = 0; i < arr_len; i++) { for (int...
int main() { assert(func0({1, 2, 3, 4, 7, 0, 8, 4}) == std::make_pair(7, 8)); assert(func0({0, -1, -2, -4, 5, 0, -6}) == std::make_pair(-4, -6)); assert(func0({1, 3, 5, 6, 8, 9}) == std::make_pair(8,9)); return 0; }
O0
cpp
func0(std::vector<int, std::allocator<int> > const&): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x38,%rsp mov %rdi,-0x38(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax mov -0x38(%rbp),%rax mov %rax,%rdi callq 17ea <_ZNKSt6vectorIiSaIiEE4sizeEv> mov %eax,-0x1c(%rbp) cmpl ...
_Z5func0RKSt6vectorIiSaIiEE: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 38h mov [rbp+var_38], rdi mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax mov rax, [rbp+var_38] mov rdi, rax call _ZNKSt6vectorIiSaIiEE4sizeEv; std::vector<int>::size(void) mov [rbp+var_1C], eax ...
long long func0(long long a1) { int v2; // ebx int v3; // [rsp+14h] [rbp-2Ch] BYREF int v4; // [rsp+18h] [rbp-28h] BYREF int i; // [rsp+1Ch] [rbp-24h] int j; // [rsp+20h] [rbp-20h] int v7; // [rsp+24h] [rbp-1Ch] unsigned long long v8; // [rsp+28h] [rbp-18h] v8 = __readfsqword(0x28u); v7 = std::vecto...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x38 MOV qword ptr [RBP + -0x38],RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX MOV RAX,qword ptr [RBP + -0x38] MOV RDI,RAX CALL 0x00101856 MOV dword ptr [RBP + -0x1c],EAX CMP dword ptr [RBP + -0x1c],0x1 JG 0x001012a4 MOV dword ptr [RBP +...
/* func0(std::vector<int, std::allocator<int> > const&) */ void func0(vector *param_1) { int iVar1; int iVar2; int *piVar3; long in_FS_OFFSET; int local_34; int local_30; int local_2c; int local_28; int local_24; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); local_24 = std::vect...
3,685
func0
#include <vector> #include <assert.h>
std::pair<int, int> func0(const std::vector<int>& arr) { int arr_len = arr.size(); if (arr_len < 2) { return std::make_pair(0,0); // Return a pair of zeros if less than two elements } int x = arr[0]; int y = arr[1]; for (int i = 0; i < arr_len; i++) { for (int...
int main() { assert(func0({1, 2, 3, 4, 7, 0, 8, 4}) == std::make_pair(7, 8)); assert(func0({0, -1, -2, -4, 5, 0, -6}) == std::make_pair(-4, -6)); assert(func0({1, 3, 5, 6, 8, 9}) == std::make_pair(8,9)); return 0; }
O1
cpp
func0(std::vector<int, std::allocator<int> > const&): endbr64 mov (%rdi),%r10 mov 0x8(%rdi),%rax sub %r10,%rax sar $0x2,%rax cmp $0x1,%eax jle 123d <_Z5func0RKSt6vectorIiSaIiEE+0x34> push %rbp push %rbx mov %eax,%r11d mov (%r10),%edx mov 0x4(%r10),%ecx mov $0x0,%ebx mov $0x1,%ebp mo...
_Z5func0RKSt6vectorIiSaIiEE: endbr64 mov r10, [rdi] mov rax, [rdi+8] sub rax, r10 sar rax, 2 cmp eax, 1 jle short loc_1285 push r12 push rbp push rbx mov r11d, eax mov edx, [r10] mov ecx, [r10+4] lea ebp, [rax-1] lea r12, [rbp+1] add rbp, 2 mov ebx, 1 loc_123...
long long func0(unsigned int **a1) { unsigned int *v1; // r10 long long v2; // rax unsigned int v3; // edx long long v4; // rcx long long v5; // rbp long long v6; // r12 long long v7; // rbp long long v8; // rbx unsigned int v9; // r9d long long v10; // rax unsigned int v11; // r8d int v12; // ...
func0: ENDBR64 MOV R10,qword ptr [RDI] MOV RAX,qword ptr [RDI + 0x8] SUB RAX,R10 SAR RAX,0x2 CMP EAX,0x1 JLE 0x00101285 PUSH R12 PUSH RBP PUSH RBX MOV R11D,EAX MOV EDX,dword ptr [R10] MOV ECX,dword ptr [R10 + 0x4] LEA EBP,[RAX + -0x1] LEA R12,[RBP + 0x1] ADD RBP,0x2 MOV EBX,0x1 LAB_0010123e: CMP R12,RBX JZ 0x00101277 M...
/* func0(std::vector<int, std::allocator<int> > const&) */ int8 func0(vector *param_1) { int *piVar1; int iVar2; long lVar3; int iVar4; int iVar5; long lVar6; piVar1 = *(int **)param_1; iVar2 = (int)(*(long *)(param_1 + 8) - (long)piVar1 >> 2); if (iVar2 < 2) { return 0; } iVar5 = *piVar1...
3,686
func0
#include <vector> #include <assert.h>
std::pair<int, int> func0(const std::vector<int>& arr) { int arr_len = arr.size(); if (arr_len < 2) { return std::make_pair(0,0); // Return a pair of zeros if less than two elements } int x = arr[0]; int y = arr[1]; for (int i = 0; i < arr_len; i++) { for (int...
int main() { assert(func0({1, 2, 3, 4, 7, 0, 8, 4}) == std::make_pair(7, 8)); assert(func0({0, -1, -2, -4, 5, 0, -6}) == std::make_pair(-4, -6)); assert(func0({1, 3, 5, 6, 8, 9}) == std::make_pair(8,9)); return 0; }
O2
cpp
func0(std::vector<int, std::allocator<int> > const&): endbr64 mov (%rdi),%r10 mov 0x8(%rdi),%rax sub %r10,%rax sar $0x2,%rax cmp $0x1,%eax jle 146b <_Z5func0RKSt6vectorIiSaIiEE+0x7b> push %rbx mov (%r10),%edx mov %eax,%r11d mov $0x1,%ebx mov 0x4(%r10),%ecx mov $0x1,%eax mov %edx,%r...
_Z5func0RKSt6vectorIiSaIiEE: endbr64 mov r10, [rdi] mov rax, [rdi+8] sub rax, r10 sar rax, 2 cmp eax, 1 jle short loc_1419 push rbp lea ebp, [rax-2] mov r11d, eax push rbx mov edx, [r10] add rbp, 2 mov ebx, 1 mov ecx, [r10+4] nop loc_13D0: mov edi, [r10+rbx*4-4]...
long long func0(unsigned int **a1) { unsigned int *v1; // r10 long long v2; // rax int v3; // r11d unsigned int v4; // edx long long v5; // rbp long long v6; // rbx long long v7; // rcx unsigned int v8; // edi long long v9; // rax unsigned int v10; // esi int v11; // r8d v1 = *a1; v2 = a1[1]...
func0: ENDBR64 MOV R10,qword ptr [RDI] MOV RAX,qword ptr [RDI + 0x8] SUB RAX,R10 SAR RAX,0x2 CMP EAX,0x1 JLE 0x00101419 PUSH RBP LEA EBP,[RAX + -0x2] MOV R11D,EAX PUSH RBX MOV EDX,dword ptr [R10] ADD RBP,0x2 MOV EBX,0x1 MOV ECX,dword ptr [R10 + 0x4] NOP LAB_001013d0: MOV EDI,dword ptr [R10 + RBX*0x4 + -0x4] MOV RAX,RBX...
/* func0(std::vector<int, std::allocator<int> > const&) */ int8 func0(vector *param_1) { int *piVar1; int iVar2; long lVar3; int iVar4; int iVar5; long lVar6; piVar1 = *(int **)param_1; iVar2 = (int)(*(long *)(param_1 + 8) - (long)piVar1 >> 2); if (iVar2 < 2) { return 0; } iVar5 = *piVar1...
3,687
func0
#include <vector> #include <assert.h>
std::pair<int, int> func0(const std::vector<int>& arr) { int arr_len = arr.size(); if (arr_len < 2) { return std::make_pair(0,0); // Return a pair of zeros if less than two elements } int x = arr[0]; int y = arr[1]; for (int i = 0; i < arr_len; i++) { for (int...
int main() { assert(func0({1, 2, 3, 4, 7, 0, 8, 4}) == std::make_pair(7, 8)); assert(func0({0, -1, -2, -4, 5, 0, -6}) == std::make_pair(-4, -6)); assert(func0({1, 3, 5, 6, 8, 9}) == std::make_pair(8,9)); return 0; }
O3
cpp
func0(std::vector<int, std::allocator<int> > const&): endbr64 mov (%rdi),%r10 mov 0x8(%rdi),%rax sub %r10,%rax sar $0x2,%rax cmp $0x1,%eax jle 143b <_Z5func0RKSt6vectorIiSaIiEE+0x7b> push %rbx mov (%r10),%edx mov %eax,%r11d mov $0x1,%ebx mov 0x4(%r10),%ecx mov $0x1,%eax mov %edx,%r...
_Z5func0RKSt6vectorIiSaIiEE: endbr64 mov r10, [rdi] mov rax, [rdi+8] sub rax, r10 sar rax, 2 cmp eax, 1 jle short loc_1419 push rbp lea ebp, [rax-2] mov r11d, eax push rbx mov edx, [r10] add rbp, 2 mov ebx, 1 mov ecx, [r10+4] nop loc_13D0: mov edi, [r10+rbx*4-4]...
long long func0(unsigned int **a1) { unsigned int *v1; // r10 long long v2; // rax int v3; // r11d unsigned int v4; // edx long long v5; // rbp long long v6; // rbx long long v7; // rcx unsigned int v8; // edi long long v9; // rax unsigned int v10; // esi int v11; // r8d v1 = *a1; v2 = a1[1]...
func0: ENDBR64 MOV R10,qword ptr [RDI] MOV RAX,qword ptr [RDI + 0x8] SUB RAX,R10 SAR RAX,0x2 CMP EAX,0x1 JLE 0x00101419 PUSH RBP LEA EBP,[RAX + -0x2] MOV R11D,EAX PUSH RBX MOV EDX,dword ptr [R10] ADD RBP,0x2 MOV EBX,0x1 MOV ECX,dword ptr [R10 + 0x4] NOP LAB_001013d0: MOV EDI,dword ptr [R10 + RBX*0x4 + -0x4] MOV RAX,RBX...
/* func0(std::vector<int, std::allocator<int> > const&) */ int8 func0(vector *param_1) { int *piVar1; int iVar2; long lVar3; int iVar4; int iVar5; long lVar6; piVar1 = *(int **)param_1; iVar2 = (int)(*(long *)(param_1 + 8) - (long)piVar1 >> 2); if (iVar2 < 2) { return 0; } iVar5 = *piVar1...
3,688
func0
#include <iostream> #include <cassert>
int func0(const std::string& X, const std::string& Y, int m, int n) { if (m == 0) { return n; } if (n == 0) { return m; } if (X[m - 1] == Y[n - 1]) { return 1 + func0(X, Y, m - 1, n - 1); } return 1 + std::min(func0(X, Y, m - 1, n), func0(X, Y, m, n - 1)); ...
int main() { assert(func0("AGGTAB", "GXTXAYB", 6, 7) == 9); assert(func0("feek", "eke", 4, 3) == 5); assert(func0("PARRT", "RTA", 5, 3) == 6); 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&, int, int): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x38,%rsp mov %rdi,-0x28(%rbp) mov %rsi,-0x30(%rbp) mov %edx,...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_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 rax, fs:28h mov [rbp+var_18], rax xor eax, eax cmp [rbp+var_3...
long long func0(long long a1, long long a2, unsigned int a3, unsigned int a4) { char v5; // bl int v8; // [rsp+20h] [rbp-20h] BYREF int v9; // [rsp+24h] [rbp-1Ch] BYREF unsigned long long v10; // [rsp+28h] [rbp-18h] v10 = __readfsqword(0x28u); if ( !a3 ) return a4; if ( !a4 ) return a3; v5 = *...
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 RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX CMP dword ptr [RBP + -0x34],0x0 JNZ 0x00101361 MOV EAX,dword p...
/* func0(std::string const&, std::string const&, int, int) */ int func0(string *param_1,string *param_2,int param_3,int param_4) { char cVar1; int iVar2; char *pcVar3; int *piVar4; long in_FS_OFFSET; int local_28; int local_24; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); iVar2 = p...
3,689
func0
#include <iostream> #include <cassert>
int func0(const std::string& X, const std::string& Y, int m, int n) { if (m == 0) { return n; } if (n == 0) { return m; } if (X[m - 1] == Y[n - 1]) { return 1 + func0(X, Y, m - 1, n - 1); } return 1 + std::min(func0(X, Y, m - 1, n), func0(X, Y, m, n - 1)); ...
int main() { assert(func0("AGGTAB", "GXTXAYB", 6, 7) == 9); assert(func0("feek", "eke", 4, 3) == 5); assert(func0("PARRT", "RTA", 5, 3) == 6); 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&, int, int): endbr64 mov %ecx,%eax test %edx,%edx je 12ca <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_ii+0x81...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_ii: endbr64 mov eax, ecx test edx, edx jz short locret_12A8 push r14 push r13 push r12 push rbp push rbx mov r12, rdi mov r13, rsi mov ebp, ecx mov eax, edx test ecx, ecx jz short loc_128C lea r14d, [...
long long func0(_QWORD *a1, _QWORD *a2, long long a3, unsigned int a4) { long long result; // rax unsigned int v5; // r14d int v6; // ebx int v7; // eax result = a4; if ( (_DWORD)a3 ) { result = (unsigned int)a3; if ( a4 ) { v5 = a3 - 1; if ( *(_BYTE *)(*a1 + (int)a3 - 1) == *(_B...
func0: ENDBR64 MOV EAX,ECX TEST EDX,EDX JZ 0x001012a8 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX MOV R12,RDI MOV R13,RSI MOV EBP,ECX MOV EAX,EDX TEST ECX,ECX JZ 0x0010128c LEA R14D,[RDX + -0x1] LEA ECX,[RCX + -0x1] MOVSXD RDI,R14D MOV R8,qword ptr [R12] MOVSXD RAX,ECX MOV RSI,qword ptr [RSI] MOVZX EAX,byte ptr [RSI +...
/* func0(std::string const&, std::string const&, int, int) */ int func0(string *param_1,string *param_2,int param_3,int param_4) { int iVar1; int iVar2; int iVar3; if (param_3 != 0) { if (param_4 != 0) { iVar3 = param_3 + -1; iVar2 = param_4 + -1; if (*(char *)(*(long *)param_1 + (lon...
3,690
func0
#include <iostream> #include <cassert>
int func0(const std::string& X, const std::string& Y, int m, int n) { if (m == 0) { return n; } if (n == 0) { return m; } if (X[m - 1] == Y[n - 1]) { return 1 + func0(X, Y, m - 1, n - 1); } return 1 + std::min(func0(X, Y, m - 1, n), func0(X, Y, m, n - 1)); ...
int main() { assert(func0("AGGTAB", "GXTXAYB", 6, 7) == 9); assert(func0("feek", "eke", 4, 3) == 5); assert(func0("PARRT", "RTA", 5, 3) == 6); 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&, int, int): endbr64 movslq %edx,%rax test %eax,%eax je 15ca <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_ii+0xda...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_ii: endbr64 push r15 push r14 push r13 push r12 push rbp mov rbp, rdi movsxd rdi, edx push rbx sub rsp, 8 test edi, edi jz loc_150C test ecx, ecx jz loc_1510 mov r12, rsi lea eax, [rdi-1] movsxd rdx, ecx...
long long func0(_QWORD *a1, _QWORD *a2, unsigned int a3, long long a4) { long long v4; // rax int v5; // ebx long long v6; // rdx unsigned int v7; // r14d unsigned int v8; // r13d int v9; // r15d int v10; // eax if ( !a3 ) return (unsigned int)a4; if ( !(_DWORD)a4 ) return a3; v4 = (int)(a...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP MOV RBP,RDI MOVSXD RDI,EDX PUSH RBX SUB RSP,0x8 TEST EDI,EDI JZ 0x0010150c TEST ECX,ECX JZ 0x00101510 MOV R12,RSI LEA EAX,[RDI + -0x1] MOVSXD RDX,ECX MOV RSI,qword ptr [RBP] SUB RDX,RDI CDQE XOR EBX,EBX ADD RDX,qword ptr [R12] JMP 0x00101487 LAB_00101478: ADD ...
/* func0(std::string const&, std::string const&, int, int) */ int func0(string *param_1,string *param_2,int param_3,int param_4) { int iVar1; int iVar2; long lVar3; int iVar4; int iVar5; iVar2 = param_4; if ((param_3 != 0) && (iVar2 = param_3, param_4 != 0)) { lVar3 = (long)(param_3 + -1); iV...
3,691
func0
#include <iostream> #include <cassert>
int func0(const std::string& X, const std::string& Y, int m, int n) { if (m == 0) { return n; } if (n == 0) { return m; } if (X[m - 1] == Y[n - 1]) { return 1 + func0(X, Y, m - 1, n - 1); } return 1 + std::min(func0(X, Y, m - 1, n), func0(X, Y, m, n - 1)); ...
int main() { assert(func0("AGGTAB", "GXTXAYB", 6, 7) == 9); assert(func0("feek", "eke", 4, 3) == 5); assert(func0("PARRT", "RTA", 5, 3) == 6); 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&, int, int): endbr64 movslq %edx,%rax test %eax,%eax je 165a <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_ii+0xda...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_ii: endbr64 push r15 push r14 push r13 mov r13d, ecx push r12 push rbp push rbx sub rsp, 48h mov [rsp+78h+var_78], rdi test edx, edx jz loc_1B85 test ecx, ecx jz loc_1B89 lea eax, [rdx-1] mov r11, [rsi...
long long func0(long long *a1, long long *a2, unsigned int a3, int a4) { int v4; // r13d long long v5; // r11 long long v6; // rbp long long v7; // rax int v8; // ebx long long v9; // rcx char v10; // dl char v11; // r8 int v12; // r14d long long v13; // r15 int v14; // r12d int v15; // r9d l...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 MOV R13D,ECX PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x48 MOV qword ptr [RSP],RDI TEST EDX,EDX JZ 0x00101b85 TEST ECX,ECX JZ 0x00101b89 LEA EAX,[RDX + -0x1] MOV R11,qword ptr [RSI] MOVSXD RCX,ECX MOVSXD RDX,EDX SUB RCX,RDX MOV RBP,qword ptr [RDI] CDQE XOR EBX,EBX ADD RCX,R11 JMP 0x0...
/* func0(std::string const&, std::string const&, int, int) */ int func0(string *param_1,string *param_2,int param_3,int param_4) { long lVar1; long lVar2; int iVar3; int iVar4; int iVar5; long lVar6; int iVar7; int iVar8; uint uVar9; char cVar10; uint uVar11; ulong uVar12; long lVar13; int...
3,692
func0
#include <assert.h>
int func0(int x, int y) { if (x > y) { return x; } return y; }
int main() { assert(func0(10, 20) == 20); assert(func0(19, 15) == 19); assert(func0(-10, -20) == -10); return 0; }
O0
cpp
func0(int, int): endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x4(%rbp) mov %esi,-0x8(%rbp) mov -0x4(%rbp),%eax cmp -0x8(%rbp),%eax jle 1164 <_Z5func0ii+0x1b> mov -0x4(%rbp),%eax jmp 1167 <_Z5func0ii+0x1e> mov -0x8(%rbp),%eax pop %rbp retq
_Z5func0ii: endbr64 push rbp mov rbp, rsp mov [rbp+var_4], edi mov [rbp+var_8], esi mov eax, [rbp+var_4] cmp eax, [rbp+var_8] jle short loc_1164 mov eax, [rbp+var_4] jmp short loc_1167 loc_1164: mov eax, [rbp+var_8] loc_1167: pop rbp retn
long long func0(unsigned int a1, unsigned int a2) { if ( (int)a1 <= (int)a2 ) return a2; else return a1; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x4],EDI MOV dword ptr [RBP + -0x8],ESI MOV EAX,dword ptr [RBP + -0x4] CMP EAX,dword ptr [RBP + -0x8] JLE 0x00101164 MOV EAX,dword ptr [RBP + -0x4] JMP 0x00101167 LAB_00101164: MOV EAX,dword ptr [RBP + -0x8] LAB_00101167: POP RBP RET
/* func0(int, int) */ int func0(int param_1,int param_2) { if (param_2 < param_1) { param_2 = param_1; } return param_2; }
3,693
func0
#include <assert.h>
int func0(int x, int y) { if (x > y) { return x; } return y; }
int main() { assert(func0(10, 20) == 20); assert(func0(19, 15) == 19); assert(func0(-10, -20) == -10); return 0; }
O1
cpp
func0(int, int): endbr64 cmp %esi,%edi mov %esi,%eax cmovge %edi,%eax retq
_Z5func0ii: endbr64 cmp edi, esi mov eax, esi cmovge eax, edi retn
long long func0(unsigned int a1, unsigned int a2) { long long result; // rax result = a2; if ( (int)a1 >= (int)a2 ) return a1; return result; }
func0: ENDBR64 CMP EDI,ESI MOV EAX,ESI CMOVGE EAX,EDI RET
/* func0(int, int) */ int func0(int param_1,int param_2) { if (param_2 <= param_1) { param_2 = param_1; } return param_2; }
3,694
func0
#include <assert.h>
int func0(int x, int y) { if (x > y) { return x; } return y; }
int main() { assert(func0(10, 20) == 20); assert(func0(19, 15) == 19); assert(func0(-10, -20) == -10); return 0; }
O2
cpp
func0(int, int): endbr64 cmp %esi,%edi mov %esi,%eax cmovge %edi,%eax retq nopl 0x0(%rax)
_Z5func0ii: endbr64 cmp edi, esi mov eax, esi cmovge eax, edi retn
long long func0(unsigned int a1, unsigned int a2) { long long result; // rax result = a2; if ( (int)a1 >= (int)a2 ) return a1; return result; }
func0: ENDBR64 CMP EDI,ESI MOV EAX,ESI CMOVGE EAX,EDI RET
/* func0(int, int) */ int func0(int param_1,int param_2) { if (param_2 <= param_1) { param_2 = param_1; } return param_2; }
3,695
func0
#include <assert.h>
int func0(int x, int y) { if (x > y) { return x; } return y; }
int main() { assert(func0(10, 20) == 20); assert(func0(19, 15) == 19); assert(func0(-10, -20) == -10); return 0; }
O3
cpp
func0(int, int): endbr64 cmp %esi,%edi mov %esi,%eax cmovge %edi,%eax retq nopl 0x0(%rax)
_Z5func0ii: endbr64 cmp edi, esi mov eax, esi cmovge eax, edi retn
long long func0(unsigned int a1, unsigned int a2) { long long result; // rax result = a2; if ( (int)a1 >= (int)a2 ) return a1; return result; }
func0: ENDBR64 CMP EDI,ESI MOV EAX,ESI CMOVGE EAX,EDI RET
/* func0(int, int) */ int func0(int param_1,int param_2) { if (param_2 <= param_1) { param_2 = param_1; } return param_2; }
3,696
func0
#include <assert.h> #include <tuple>
int func0(const std::tuple<int, int, int>& nums) { int product = 1; product *= std::get<0>(nums); product *= std::get<1>(nums); product *= std::get<2>(nums); return product; }
int main() { assert(func0(std::make_tuple(1, 2, 3)) == 6); assert(func0(std::make_tuple(-2, -4, -6)) == -48); return 0; }
O0
cpp
func0(std::tuple<int, int, int> const&): endbr64 push %rbp mov %rsp,%rbp sub $0x20,%rsp mov %rdi,-0x18(%rbp) movl $0x1,-0x4(%rbp) mov -0x18(%rbp),%rax mov %rax,%rdi callq 12ba <_ZSt3getILm0EJiiiEERKNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERKS4_> mov (%rax),%eax mov -0x4(%rbp),%edx imul ...
_Z5func0RKSt5tupleIJiiiEE: endbr64 push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_18], rdi mov [rbp+var_4], 1 mov rax, [rbp+var_18] mov rdi, rax call _ZSt3getILm0EJiiiEERKNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERKS4_; std::get<0ul,int,int,int>(std::tuple<int,int,int> const&) mov ...
long long func0(long long a1) { int v2; // [rsp+1Ch] [rbp-4h] int v3; // [rsp+1Ch] [rbp-4h] v2 = *(_DWORD *)std::get<0ul,int,int,int>(a1); v3 = v2 * *(_DWORD *)std::get<1ul,int,int,int>(a1); return (unsigned int)(v3 * *(_DWORD *)std::get<2ul,int,int,int>(a1)); }
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x18],RDI MOV dword ptr [RBP + -0x4],0x1 MOV RAX,qword ptr [RBP + -0x18] MOV RDI,RAX CALL 0x001012cc MOV EAX,dword ptr [RAX] MOV EDX,dword ptr [RBP + -0x4] IMUL EAX,EDX MOV dword ptr [RBP + -0x4],EAX MOV RAX,qword ptr [RBP + -0x18] MOV RDI,RAX CALL ...
/* func0(std::tuple<int, int, int> const&) */ int func0(tuple *param_1) { int iVar1; int iVar2; type *ptVar3; type *ptVar4; type *ptVar5; ptVar3 = std::get<0ul,int,int,int>(param_1); iVar1 = *(int *)ptVar3; ptVar4 = std::get<1ul,int,int,int>(param_1); iVar2 = *(int *)ptVar4; ptVar5 = std::get<2...
3,697
func0
#include <assert.h> #include <tuple>
int func0(const std::tuple<int, int, int>& nums) { int product = 1; product *= std::get<0>(nums); product *= std::get<1>(nums); product *= std::get<2>(nums); return product; }
int main() { assert(func0(std::make_tuple(1, 2, 3)) == 6); assert(func0(std::make_tuple(-2, -4, -6)) == -48); return 0; }
O1
cpp
func0(std::tuple<int, int, int> const&): endbr64 mov 0x8(%rdi),%eax imul 0x4(%rdi),%eax imul (%rdi),%eax retq
_Z5func0RKSt5tupleIJiiiEE: endbr64 mov eax, [rdi+8] imul eax, [rdi+4] imul eax, [rdi] retn
long long func0(_DWORD *a1) { return (unsigned int)(*a1 * a1[1] * a1[2]); }
func0: ENDBR64 MOV EAX,dword ptr [RDI + 0x8] IMUL EAX,dword ptr [RDI + 0x4] IMUL EAX,dword ptr [RDI] RET
/* func0(std::tuple<int, int, int> const&) */ int func0(tuple *param_1) { return *(int *)(param_1 + 8) * *(int *)(param_1 + 4) * *(int *)param_1; }
3,698
func0
#include <assert.h> #include <tuple>
int func0(const std::tuple<int, int, int>& nums) { int product = 1; product *= std::get<0>(nums); product *= std::get<1>(nums); product *= std::get<2>(nums); return product; }
int main() { assert(func0(std::make_tuple(1, 2, 3)) == 6); assert(func0(std::make_tuple(-2, -4, -6)) == -48); return 0; }
O2
cpp
func0(std::tuple<int, int, int> const&): endbr64 mov 0x8(%rdi),%eax imul 0x4(%rdi),%eax imul (%rdi),%eax retq
_Z5func0RKSt5tupleIJiiiEE: endbr64 mov eax, [rdi+8] imul eax, [rdi+4] imul eax, [rdi] retn
long long func0(_DWORD *a1) { return (unsigned int)(*a1 * a1[1] * a1[2]); }
func0: ENDBR64 MOV EAX,dword ptr [RDI + 0x8] IMUL EAX,dword ptr [RDI + 0x4] IMUL EAX,dword ptr [RDI] RET
/* func0(std::tuple<int, int, int> const&) */ int func0(tuple *param_1) { return *(int *)(param_1 + 8) * *(int *)(param_1 + 4) * *(int *)param_1; }
3,699
func0
#include <assert.h> #include <tuple>
int func0(const std::tuple<int, int, int>& nums) { int product = 1; product *= std::get<0>(nums); product *= std::get<1>(nums); product *= std::get<2>(nums); return product; }
int main() { assert(func0(std::make_tuple(1, 2, 3)) == 6); assert(func0(std::make_tuple(-2, -4, -6)) == -48); return 0; }
O3
cpp
func0(std::tuple<int, int, int> const&): endbr64 mov 0x8(%rdi),%eax imul 0x4(%rdi),%eax imul (%rdi),%eax retq
_Z5func0RKSt5tupleIJiiiEE: endbr64 mov eax, [rdi+8] imul eax, [rdi+4] imul eax, [rdi] retn
long long func0(_DWORD *a1) { return (unsigned int)(*a1 * a1[1] * a1[2]); }
func0: ENDBR64 MOV EAX,dword ptr [RDI + 0x8] IMUL EAX,dword ptr [RDI + 0x4] IMUL EAX,dword ptr [RDI] RET
/* func0(std::tuple<int, int, int> const&) */ int func0(tuple *param_1) { return *(int *)(param_1 + 8) * *(int *)(param_1 + 4) * *(int *)param_1; }
3,700
func0
#include <iostream> #include <assert.h> int binomial_coeffi(int n, int k) { if (k == 0 || k == n) return 1; return binomial_coeffi(n - 1, k - 1) + binomial_coeffi(n - 1, k); }
int func0(int n, int m) { if (n == 0 && m == 0) return 1; if (n == 1 && m == 0) return 0; if (m == 0) return ((n - 1) * (func0(n - 1, 0) + func0(n - 2, 0))); return binomial_coeffi(n, m) * func0(n - m, 0); }
int main() { assert(func0(7, 2) == 924); assert(func0(3, 0) == 2); assert(func0(3, 1) == 3); std::cout << "All test cases passed." << std::endl; return 0; }
O0
cpp
func0(int, int): endbr64 push %rbp mov %rsp,%rbp push %r12 push %rbx sub $0x10,%rsp mov %edi,-0x14(%rbp) mov %esi,-0x18(%rbp) cmpl $0x0,-0x14(%rbp) jne 124b <_Z5func0ii+0x28> cmpl $0x0,-0x18(%rbp) jne 124b <_Z5func0ii+0x28> mov $0x1,%eax jmp 12bf <_Z5func0ii+0x9c> cmpl $0x1,-0x14(%rb...
_Z5func0ii: endbr64 push rbp mov rbp, rsp push r12 push rbx sub rsp, 10h mov [rbp+var_14], edi mov [rbp+var_18], esi cmp [rbp+var_14], 0 jnz short loc_120A cmp [rbp+var_18], 0 jnz short loc_120A mov eax, 1 jmp short loc_127E loc_120A: cmp [rbp+var_14], 1 jnz shor...
long long func0(int a1, int a2) { int v3; // ebx int v4; // ebx if ( !a1 && !a2 ) return 1LL; if ( a1 == 1 && !a2 ) return 0LL; if ( a2 ) { v4 = binomial_coeffi(a1, a2); return v4 * (unsigned int)func0(a1 - a2, 0); } else { v3 = func0(a1 - 1, 0); return (a1 - 1) * (v3 + (unsi...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R12 PUSH RBX SUB RSP,0x10 MOV dword ptr [RBP + -0x14],EDI MOV dword ptr [RBP + -0x18],ESI CMP dword ptr [RBP + -0x14],0x0 JNZ 0x0010120a CMP dword ptr [RBP + -0x18],0x0 JNZ 0x0010120a MOV EAX,0x1 JMP 0x0010127e LAB_0010120a: CMP dword ptr [RBP + -0x14],0x1 JNZ 0x0010121d CMP dwo...
/* func0(int, int) */ int func0(int param_1,int param_2) { int iVar1; int iVar2; if ((param_1 == 0) && (param_2 == 0)) { iVar2 = 1; } else if ((param_1 == 1) && (param_2 == 0)) { iVar2 = 0; } else if (param_2 == 0) { iVar1 = func0(param_1 + -1,0); iVar2 = func0(param_1 + -2,0); iV...
3,701
func0
#include <iostream> #include <assert.h> int binomial_coeffi(int n, int k) { if (k == 0 || k == n) return 1; return binomial_coeffi(n - 1, k - 1) + binomial_coeffi(n - 1, k); }
int func0(int n, int m) { if (n == 0 && m == 0) return 1; if (n == 1 && m == 0) return 0; if (m == 0) return ((n - 1) * (func0(n - 1, 0) + func0(n - 2, 0))); return binomial_coeffi(n, m) * func0(n - m, 0); }
int main() { assert(func0(7, 2) == 924); assert(func0(3, 0) == 2); assert(func0(3, 1) == 3); std::cout << "All test cases passed." << std::endl; return 0; }
O1
cpp
func0(int, int): endbr64 mov $0x1,%eax mov %edi,%edx or %esi,%edx je 127d <_Z5func0ii+0x76> push %r12 push %rbp push %rbx mov %edi,%ebx mov %esi,%ebp cmp $0x1,%edi jne 1231 <_Z5func0ii+0x2a> mov $0x0,%eax test %esi,%esi jne 1231 <_Z5func0ii+0x2a> pop %rbx pop %rbp pop %r...
_Z5func0ii: endbr64 mov eax, 1 mov edx, edi or edx, esi jz short locret_123D push r12 push rbp push rbx mov ebx, edi mov ebp, esi cmp edi, 1 jnz short loc_11F1 mov eax, 0 test esi, esi jnz short loc_11F1 loc_11EC: pop rbx pop rbp pop r12 retn loc_11F1: t...
long long func0(int a1, int a2) { long long result; // rax int v3; // ebp int v4; // r12d result = 1LL; if ( a2 | a1 ) { if ( a1 != 1 || (result = 0LL, a2) ) { if ( a2 ) { v4 = binomial_coeffi(a1, a2); return v4 * (unsigned int)func0(a1 - a2, 0); } else ...
func0: ENDBR64 MOV EAX,0x1 MOV EDX,EDI OR EDX,ESI JZ 0x0010123d PUSH R12 PUSH RBP PUSH RBX MOV EBX,EDI MOV EBP,ESI CMP EDI,0x1 JNZ 0x001011f1 MOV EAX,0x0 TEST ESI,ESI JNZ 0x001011f1 LAB_001011ec: POP RBX POP RBP POP R12 RET LAB_001011f1: TEST EBP,EBP JNZ 0x0010121d LEA R12D,[RBX + -0x1] MOV ESI,0x0 MOV EDI,R12D CALL 0x...
/* func0(int, int) */ int func0(int param_1,int param_2) { int iVar1; int iVar2; if (param_1 != 0 || param_2 != 0) { if ((param_1 != 1) || (iVar1 = 0, param_2 != 0)) { if (param_2 == 0) { iVar1 = func0(param_1 + -1,0); iVar2 = func0(param_1 + -2,0); iVar1 = (iVar2 + iVar1) *...
3,702
func0
#include <iostream> #include <assert.h> int binomial_coeffi(int n, int k) { if (k == 0 || k == n) return 1; return binomial_coeffi(n - 1, k - 1) + binomial_coeffi(n - 1, k); }
int func0(int n, int m) { if (n == 0 && m == 0) return 1; if (n == 1 && m == 0) return 0; if (m == 0) return ((n - 1) * (func0(n - 1, 0) + func0(n - 2, 0))); return binomial_coeffi(n, m) * func0(n - m, 0); }
int main() { assert(func0(7, 2) == 924); assert(func0(3, 0) == 2); assert(func0(3, 1) == 3); std::cout << "All test cases passed." << std::endl; return 0; }
O2
cpp
func0(int, int): endbr64 push %r13 mov %edi,%eax push %r12 push %rbp push %rbx sub $0x8,%rsp or %esi,%eax je 13d0 <_Z5func0ii+0x80> mov %edi,%ebx mov %esi,%edx cmp $0x1,%edi jne 13c0 <_Z5func0ii+0x70> test %esi,%esi je 13e8 <_Z5func0ii+0x98> mov %ebx,%edi mov %edx,%esi xor ...
_Z5func0ii: endbr64 mov eax, edi push r14 or eax, esi push r13 push r12 push rbp push rbx jz loc_17A8 mov r12d, edi mov r13d, esi cmp edi, 1 jnz short loc_1788 test esi, esi jz loc_17C0 loc_1719: cmp r12d, r13d jz short loc_1798 lea r14d, [r13-1] mov ...
long long func0(int a1, int a2) { int v2; // r12d int v3; // ebx int v4; // ebp int v5; // ebp unsigned int v6; // ebx int v7; // r13d int v8; // eax if ( a2 | a1 ) { v2 = a1; if ( a1 == 1 ) { if ( !a2 ) return 0; } else if ( !a2 ) { v6 = 0; v5 = 1; ...
func0: ENDBR64 MOV EAX,EDI PUSH R14 OR EAX,ESI PUSH R13 PUSH R12 PUSH RBP PUSH RBX JZ 0x001017a8 MOV R12D,EDI MOV R13D,ESI CMP EDI,0x1 JNZ 0x00101788 TEST ESI,ESI JZ 0x001017c0 LAB_00101719: CMP R12D,R13D JZ 0x00101798 LEA R14D,[R13 + -0x1] MOV EBX,R12D XOR EBP,EBP LAB_00101727: SUB EBX,0x1 MOV ESI,R14D MOV EDI,EBX CAL...
/* func0(int, int) */ int func0(int param_1,int param_2) { int iVar1; int iVar2; int iVar3; int iVar4; if (param_1 == 0 && param_2 == 0) { return 1; } if (param_1 == 1) { if (param_2 == 0) { return 0; } } else if (param_2 == 0) { iVar3 = 0; iVar4 = 1; goto LAB_001017...
3,703
func0
#include <iostream> #include <assert.h> int binomial_coeffi(int n, int k) { if (k == 0 || k == n) return 1; return binomial_coeffi(n - 1, k - 1) + binomial_coeffi(n - 1, k); }
int func0(int n, int m) { if (n == 0 && m == 0) return 1; if (n == 1 && m == 0) return 0; if (m == 0) return ((n - 1) * (func0(n - 1, 0) + func0(n - 2, 0))); return binomial_coeffi(n, m) * func0(n - m, 0); }
int main() { assert(func0(7, 2) == 924); assert(func0(3, 0) == 2); assert(func0(3, 1) == 3); std::cout << "All test cases passed." << std::endl; return 0; }
O3
cpp
func0(int, int): endbr64 push %r13 mov %edi,%eax push %r12 push %rbp push %rbx sub $0x8,%rsp or %esi,%eax je 1400 <_Z5func0ii+0xb0> test %esi,%esi mov %edi,%ebx mov %esi,%ecx sete %dl mov %edx,%eax cmp $0x1,%edi jne 137c <_Z5func0ii+0x2c> test %dl,%dl jne 13f8 <_Z5func0ii+0...
_Z5func0ii: endbr64 mov eax, edi push r14 or eax, esi push r13 push r12 push rbp push rbx jz loc_1798 mov r12d, edi mov r13d, esi cmp edi, 1 jnz short loc_1778 test esi, esi jz loc_17B0 loc_1709: cmp r12d, r13d jz short loc_1788 lea r14d, [r13-1] mov ...
long long func0(int a1, int a2) { int v2; // r12d int v3; // ebx int v4; // ebp int v5; // ebp unsigned int v6; // ebx int v7; // r13d int v8; // eax if ( a2 | a1 ) { v2 = a1; if ( a1 == 1 ) { if ( !a2 ) return 0; } else if ( !a2 ) { v6 = 0; v5 = 1; ...
func0: ENDBR64 MOV EAX,EDI PUSH R14 OR EAX,ESI PUSH R13 PUSH R12 PUSH RBP PUSH RBX JZ 0x00101798 MOV R12D,EDI MOV R13D,ESI CMP EDI,0x1 JNZ 0x00101778 TEST ESI,ESI JZ 0x001017b0 LAB_00101709: CMP R12D,R13D JZ 0x00101788 LEA R14D,[R13 + -0x1] MOV EBX,R12D XOR EBP,EBP LAB_00101717: SUB EBX,0x1 MOV ESI,R14D MOV EDI,EBX CAL...
/* func0(int, int) */ int func0(int param_1,int param_2) { int iVar1; int iVar2; int iVar3; int iVar4; if (param_1 == 0 && param_2 == 0) { return 1; } if (param_1 == 1) { if (param_2 == 0) { return 0; } } else if (param_2 == 0) { iVar3 = 0; iVar4 = 1; goto LAB_001017...
3,704
func0
#include <assert.h> struct Node { int data; Node* left; Node* right; Node(int data) { this->data = data; this->left = nullptr; this->right = nullptr; } };
int func0(Node* node) { if (node == nullptr) { return 0; } else { int left_height = func0(node->left); int right_height = func0(node->right); return (left_height > right_height) ? left_height + 1 : right_height + 1; } }
int main() { Node* root = new Node(1); root->left = new Node(2); root->right = new Node(3); root->left->left = new Node(4); root->left->right = new Node(5); Node* root1 = new Node(1); root1->left = new Node(2); root1->right = new Node(3); root1->left->left = new Node(4); ...
O0
cpp
func0(Node*): endbr64 push %rbp mov %rsp,%rbp sub $0x20,%rsp mov %rdi,-0x18(%rbp) cmpq $0x0,-0x18(%rbp) jne 1187 <_Z5func0P4Node+0x1e> mov $0x0,%eax jmp 11c4 <_Z5func0P4Node+0x5b> mov -0x18(%rbp),%rax mov 0x8(%rax),%rax mov %rax,%rdi callq 1169 <_Z5func0P4Node> mov %eax,-0x8(%rbp) mov...
_Z5func0P4Node: endbr64 push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_18], rdi cmp [rbp+var_18], 0 jnz short loc_1187 mov eax, 0 jmp short locret_11C4 loc_1187: mov rax, [rbp+var_18] mov rax, [rax+8] mov rdi, rax call _Z5func0P4Node; func0(Node *) mov [rbp+var_8], eax...
long long func0(Node **a1) { int v2; // [rsp+18h] [rbp-8h] int v3; // [rsp+1Ch] [rbp-4h] if ( !a1 ) return 0LL; v2 = func0(a1[1]); v3 = func0(a1[2]); if ( v2 <= v3 ) return (unsigned int)(v3 + 1); else return (unsigned int)(v2 + 1); }
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x18],RDI CMP qword ptr [RBP + -0x18],0x0 JNZ 0x00101187 MOV EAX,0x0 JMP 0x001011c4 LAB_00101187: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x8] MOV RDI,RAX CALL 0x00101169 MOV dword ptr [RBP + -0x8],EAX MOV RAX,qword ptr [RBP + -0x18...
/* func0(Node*) */ int func0(Node *param_1) { int iVar1; int iVar2; if (param_1 == (Node *)0x0) { iVar1 = 0; } else { iVar1 = func0(*(Node **)(param_1 + 8)); iVar2 = func0(*(Node **)(param_1 + 0x10)); if (iVar2 < iVar1) { iVar1 = iVar1 + 1; } else { iVar1 = iVar2 + 1; ...
3,705
func0
#include <assert.h> struct Node { int data; Node* left; Node* right; Node(int data) { this->data = data; this->left = nullptr; this->right = nullptr; } };
int func0(Node* node) { if (node == nullptr) { return 0; } else { int left_height = func0(node->left); int right_height = func0(node->right); return (left_height > right_height) ? left_height + 1 : right_height + 1; } }
int main() { Node* root = new Node(1); root->left = new Node(2); root->right = new Node(3); root->left->left = new Node(4); root->left->right = new Node(5); Node* root1 = new Node(1); root1->left = new Node(2); root1->right = new Node(3); root1->left->left = new Node(4); ...
O1
cpp
func0(Node*): endbr64 mov $0x0,%eax test %rdi,%rdi je 11a8 <_Z5func0P4Node+0x3f> push %rbp push %rbx sub $0x8,%rsp mov %rdi,%rbx mov 0x8(%rdi),%rdi callq 1169 <_Z5func0P4Node> mov %eax,%ebp mov 0x10(%rbx),%rdi callq 1169 <_Z5func0P4Node> mov %eax,%edx lea 0x1(%rbp),%ecx lea 0x1(%r...
_Z5func0P4Node: endbr64 mov eax, 0 test rdi, rdi jz short locret_11A8 push rbp push rbx sub rsp, 8 mov rbx, rdi mov rdi, [rdi+8] call _Z5func0P4Node; func0(Node *) mov ebp, eax mov rdi, [rbx+10h] call _Z5func0P4Node; func0(Node *) lea ecx, [rbp+1] lea edx, [rax+1] cmp...
long long func0(long long a1) { long long result; // rax int v2; // ebp int v3; // eax unsigned int v4; // edx bool v5; // cc result = 0LL; if ( a1 ) { v2 = func0(*(_QWORD *)(a1 + 8)); v3 = func0(*(_QWORD *)(a1 + 16)); v4 = v3 + 1; v5 = v2 <= v3; result = (unsigned int)(v2 + 1); ...
func0: ENDBR64 MOV EAX,0x0 TEST RDI,RDI JZ 0x001011a8 PUSH RBP PUSH RBX SUB RSP,0x8 MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x8] CALL 0x00101169 MOV EBP,EAX MOV RDI,qword ptr [RBX + 0x10] CALL 0x00101169 LEA ECX,[RBP + 0x1] LEA EDX,[RAX + 0x1] CMP EBP,EAX MOV EAX,ECX CMOVLE EAX,EDX ADD RSP,0x8 POP RBX POP RBP RET LAB_0010...
/* func0(Node*) */ int func0(Node *param_1) { int iVar1; int iVar2; if (param_1 != (Node *)0x0) { iVar1 = func0(*(Node **)(param_1 + 8)); iVar2 = func0(*(Node **)(param_1 + 0x10)); if (iVar1 <= iVar2) { iVar1 = iVar2; } return iVar1 + 1; } return 0; }
3,706
func0
#include <assert.h> struct Node { int data; Node* left; Node* right; Node(int data) { this->data = data; this->left = nullptr; this->right = nullptr; } };
int func0(Node* node) { if (node == nullptr) { return 0; } else { int left_height = func0(node->left); int right_height = func0(node->right); return (left_height > right_height) ? left_height + 1 : right_height + 1; } }
int main() { Node* root = new Node(1); root->left = new Node(2); root->right = new Node(3); root->left->left = new Node(4); root->left->right = new Node(5); Node* root1 = new Node(1); root1->left = new Node(2); root1->right = new Node(3); root1->left->left = new Node(4); ...
O2
cpp
func0(Node*): endbr64 test %rdi,%rdi je 1480 <_Z5func0P4Node+0x10> jmp 1490 <_Z5func0P4Node.part.0> nopl 0x0(%rax,%rax,1) xor %eax,%eax retq data16 nopw %cs:0x0(%rax,%rax,1) xchg %ax,%ax
_Z5func0P4Node_part_0: push r14 push r13 push r12 push rbp push rbx mov rbp, [rdi+8] mov rbx, rdi test rbp, rbp jz loc_14F8 mov r12, [rbp+8] test r12, r12 jz loc_14D0 mov r13, [r12+8] test r13, r13 jz loc_1710 mov rdi, [r13+8] test rdi, rdi jz loc_17A0 ...
long long func0(long long a1, long long a2, long long a3) { long long v3; // rbp long long v5; // r12 long long v6; // r13 int v7; // r14d int v8; // eax long long v9; // r12 int v10; // eax long long v11; // rbp long long v12; // r13 long long v13; // rdi int v14; // eax long long v15; // rdi ...
func0: PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX MOV RBP,qword ptr [RDI + 0x8] MOV RBX,RDI TEST RBP,RBP JZ 0x001014f8 MOV R12,qword ptr [RBP + 0x8] TEST R12,R12 JZ 0x001014d0 MOV R13,qword ptr [R12 + 0x8] TEST R13,R13 JZ 0x00101710 MOV RDI,qword ptr [R13 + 0x8] TEST RDI,RDI JZ 0x001017a0 CALL 0x001013b0 MOV RDI,qwor...
/* func0(Node*) [clone .part.0] */ int func0(Node *param_1) { long lVar1; int iVar2; int iVar3; int iVar4; int iVar5; int iVar6; long lVar7; long lVar8; Node *pNVar9; lVar8 = *(long *)(param_1 + 8); if (lVar8 == 0) { lVar8 = *(long *)(param_1 + 0x10); iVar2 = 0; if (lVar8 == 0) { ...
3,707
func0
#include <assert.h> struct Node { int data; Node* left; Node* right; Node(int data) { this->data = data; this->left = nullptr; this->right = nullptr; } };
int func0(Node* node) { if (node == nullptr) { return 0; } else { int left_height = func0(node->left); int right_height = func0(node->right); return (left_height > right_height) ? left_height + 1 : right_height + 1; } }
int main() { Node* root = new Node(1); root->left = new Node(2); root->right = new Node(3); root->left->left = new Node(4); root->left->right = new Node(5); Node* root1 = new Node(1); root1->left = new Node(2); root1->right = new Node(3); root1->left->left = new Node(4); ...
O3
cpp
func0(Node*) [clone .part.0]: push %rbp push %rbx mov %rdi,%rbx sub $0x8,%rsp mov 0x8(%rdi),%rdi test %rdi,%rdi je 1460 <_Z5func0P4Node.part.0+0x40> callq 1420 <_Z5func0P4Node.part.0> mov 0x10(%rbx),%rdi xor %edx,%edx mov %eax,%ebp test %rdi,%rdi je 144b <_Z5func0P4Node.part.0+0x2b> c...
_Z5func0P4Node_part_0: push r14 push r13 push r12 push rbp push rbx mov rbp, [rdi+8] mov rbx, rdi test rbp, rbp jz loc_14F8 mov r12, [rbp+8] test r12, r12 jz loc_14D0 mov r13, [r12+8] test r13, r13 jz loc_1710 mov rdi, [r13+8] test rdi, rdi jz loc_17A0 ...
long long func0(long long a1, long long a2, long long a3) { long long v3; // rbp long long v5; // r12 long long v6; // r13 int v7; // r14d int v8; // eax long long v9; // r12 int v10; // eax long long v11; // rbp long long v12; // r13 long long v13; // rdi int v14; // eax long long v15; // rdi ...
func0: PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX MOV RBP,qword ptr [RDI + 0x8] MOV RBX,RDI TEST RBP,RBP JZ 0x001014f8 MOV R12,qword ptr [RBP + 0x8] TEST R12,R12 JZ 0x001014d0 MOV R13,qword ptr [R12 + 0x8] TEST R13,R13 JZ 0x00101710 MOV RDI,qword ptr [R13 + 0x8] TEST RDI,RDI JZ 0x001017a0 CALL 0x001013b0 MOV RDI,qwor...
/* func0(Node*) [clone .part.0] */ int func0(Node *param_1) { long lVar1; int iVar2; int iVar3; int iVar4; int iVar5; int iVar6; long lVar7; long lVar8; Node *pNVar9; lVar8 = *(long *)(param_1 + 8); if (lVar8 == 0) { lVar8 = *(long *)(param_1 + 0x10); iVar2 = 0; if (lVar8 == 0) { ...
3,708
func0
#include <iostream> #include <string> #include <regex> #include <cassert>
std::string func0(const std::string &dt) { std::regex datePattern(R"((\d{4})-(\d{1,2})-(\d{1,2}))"); return std::regex_replace(dt, datePattern, "$3-$2-$1"); }
int main() { assert(func0("2026-01-02") == "02-01-2026"); assert(func0("2021-01-04") == "04-01-2021"); assert(func0("2030-06-06") == "06-06-2030"); return 0; }
O0
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x48,%rsp mov %rdi,-0x48(%rbp) mov %rsi,-0x50(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax lea -0x40(%rbp),%rax mov $0x10,%edx lea ...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 48h mov [rbp+var_48], rdi mov [rbp+var_50], rsi mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax lea rax, [rbp+var_40] mov edx, 10h lea rcx, aD4D12D12; "(\\d{4}...
long long func0(long long a1, long long a2) { _BYTE v3[40]; // [rsp+10h] [rbp-40h] BYREF unsigned long long v4; // [rsp+38h] [rbp-18h] v4 = __readfsqword(0x28u); std::basic_regex<char,std::regex_traits<char>>::basic_regex(v3, "(\\d{4})-(\\d{1,2})-(\\d{1,2})", 16LL); std::regex_replace<std::regex_traits<char...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x48 MOV qword ptr [RBP + -0x48],RDI MOV qword ptr [RBP + -0x50],RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX LEA RAX,[RBP + -0x40] MOV EDX,0x10 LEA RCX,[0x134051] MOV RSI,RCX MOV RDI,RAX LAB_00104b63: CALL 0x00106152 MOV RAX,qword ptr ...
/* func0(std::string const&) */ string * func0(string *param_1) { int8 in_RSI; long in_FS_OFFSET; regex local_48 [40]; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); std::regex::basic_regex(local_48,"(\\d{4})-(\\d{1,2})-(\\d{1,2})",0x10); /* try { // try from 00104b84 to ...
3,709
func0
#include <iostream> #include <string> #include <regex> #include <cassert>
std::string func0(const std::string &dt) { std::regex datePattern(R"((\d{4})-(\d{1,2})-(\d{1,2}))"); return std::regex_replace(dt, datePattern, "$3-$2-$1"); }
int main() { assert(func0("2026-01-02") == "02-01-2026"); assert(func0("2021-01-04") == "04-01-2021"); assert(func0("2030-06-06") == "06-06-2030"); return 0; }
O1
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 push %r13 push %r12 push %rbp push %rbx sub $0x48,%rsp mov %rdi,%rbx mov %rsi,%rbp mov %fs:0x28,%rax mov %rax,0x38(%rsp) xor %eax,%eax lea 0x8(%rsp),%r13 mov %r13,%rdi callq 4730 <_ZNS...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push rbp mov rbp, rsp push r14 push r12 push rbx sub rsp, 38h mov rbx, rdi mov r14, rsi mov rax, fs:28h mov [rbp+var_28], rax xor eax, eax lea r12, [rbp+var_50] lea rdi, [rbp+var_48]; this call __Z...
long long func0(long long a1, long long *a2) { long long v4; // rsi _DWORD *v5; // rdi volatile signed __int32 *v6; // rcx long long v7; // rdx signed __int32 v8; // eax _BYTE v10[8]; // [rsp+0h] [rbp-50h] BYREF _BYTE v11[8]; // [rsp+8h] [rbp-48h] BYREF long long v12; // [rsp+10h] [rbp-40h] long long...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x38 MOV RBX,RDI MOV R14,RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x28],RAX XOR EAX,EAX LEA R12,[RBP + -0x50] LEA RDI,[RBP + -0x48] CALL 0x00104710 MOV qword ptr [RBP + -0x40],0x0 MOV qword ptr [RBP + -0x38],0x0 MOV ECX,0x10 LEA RDX,[0x...
/* func0(std::string const&) */ string * func0(string *param_1) { _Sp_counted_base<(_Lock_policy)2> *p_Var1; _Sp_counted_base<(_Lock_policy)2> *p_Var2; int iVar3; int8 *in_RSI; long in_FS_OFFSET; regex local_58 [8]; int local_50 [8]; int8 local_48; _Sp_counted_base<(_Lock_policy)2> *local_40; long...
3,710
func0
#include <iostream> #include <string> #include <regex> #include <cassert>
std::string func0(const std::string &dt) { std::regex datePattern(R"((\d{4})-(\d{1,2})-(\d{1,2}))"); return std::regex_replace(dt, datePattern, "$3-$2-$1"); }
int main() { assert(func0("2026-01-02") == "02-01-2026"); assert(func0("2021-01-04") == "04-01-2021"); assert(func0("2030-06-06") == "06-06-2030"); return 0; }
O2
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 push %r14 push %r13 push %r12 mov %rdi,%r12 push %rbp push %rbx mov %rsi,%rbx sub $0x40,%rsp mov %fs:0x28,%rax mov %rax,0x38(%rsp) xor %eax,%eax lea 0x8(%rsp),%rbp lea 0x18(%rsp),%r13...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push rbp mov rbp, rsp push r14 mov r14, rsi push r13 lea r13, [rbp+var_50] push r12 lea r12, [rbp+var_48] push rbx mov rbx, rdi mov rdi, r12; this sub rsp, 30h mov rax, fs:28h mov [rbp+var_28], rax...
long long func0(long long a1, long long *a2) { long long v3; // rsi long long v4; // rdi long long v5; // rdx volatile signed __int32 *v6; // rcx signed __int32 v7; // eax long long v9; // rax _BYTE v10[8]; // [rsp+0h] [rbp-50h] BYREF _BYTE v11[8]; // [rsp+8h] [rbp-48h] BYREF __int128 v12; // [rsp+10...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R14 MOV R14,RSI PUSH R13 LEA R13,[RBP + -0x50] PUSH R12 LEA R12,[RBP + -0x48] PUSH RBX MOV RBX,RDI MOV RDI,R12 SUB RSP,0x30 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x28],RAX XOR EAX,EAX CALL 0x001046f0 LEA RDX,[0x11a66e] PXOR XMM0,XMM0 MOV RDI,R13 MOV ECX,0x10 LEA RSI,...
/* func0(std::string const&) */ string * func0(string *param_1) { _Sp_counted_base<(_Lock_policy)2> *p_Var1; int8 uVar2; int iVar3; int8 *in_RSI; long in_FS_OFFSET; regex local_58 [8]; int local_50 [8]; int local_48 [24]; long local_30; local_30 = *(long *)(in_FS_OFFSET + 0x28); std::locale::...
3,711
func0
#include <iostream> #include <string> #include <regex> #include <cassert>
std::string func0(const std::string &dt) { std::regex datePattern(R"((\d{4})-(\d{1,2})-(\d{1,2}))"); return std::regex_replace(dt, datePattern, "$3-$2-$1"); }
int main() { assert(func0("2026-01-02") == "02-01-2026"); assert(func0("2021-01-04") == "04-01-2021"); assert(func0("2030-06-06") == "06-06-2030"); return 0; }
O3
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 push %r14 push %r13 push %r12 mov %rdi,%r12 push %rbp push %rbx mov %rsi,%rbx sub $0x40,%rsp mov %fs:0x28,%rax mov %rax,0x38(%rsp) xor %eax,%eax lea 0x8(%rsp),%rbp lea 0x18(%rsp),%r13...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push rbp mov rbp, rsp push r15 push r14 push r13 push r12 mov r12, rsi push rbx lea rbx, [rbp+var_E0] sub rsp, 128h mov [rbp+var_F8], rdi mov rax, fs:28h mov [rbp+var_38], rax xor eax, eax lea r...
long long * func0(long long a1, char **a2) { char *v2; // rbx long long v3; // r13 char *v4; // r12 char v5; // al long long v6; // rdx long long v7; // rcx long long v8; // r8 long long v9; // r9 unsigned long long v10; // rsi long long v11; // rbx volatile signed __int32 *v12; // rdx signed __...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 MOV R12,RSI PUSH RBX LEA RBX,[RBP + -0xe0] SUB RSP,0x128 MOV qword ptr [RBP + -0xf8],RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x38],RAX XOR EAX,EAX LEA RAX,[RBP + -0xd8] MOV qword ptr [RBP + -0x138],RBX MOV RDI,RAX MOV qword ptr [RBP +...
/* func0(std::string const&) */ string * func0(string *param_1) { string *psVar1; _Sp_counted_base<(_Lock_policy)2> *p_Var2; string sVar3; int8 uVar4; bool bVar5; char cVar6; int iVar7; int8 *puVar8; string *psVar9; long lVar10; ulong uVar11; string *psVar12; long *plVar13; long lVar14; ...
3,712
func0
#include <iostream> #include <vector> #include <assert.h>
int func0(const std::vector<int>& tuplex, int value) { int count = 0; for (int elem : tuplex) { if (elem == value) { count++; } } return count; }
int main() { assert(func0({2, 4, 5, 6, 2, 3, 4, 4, 7}, 4) == 3); assert(func0({2, 4, 5, 6, 2, 3, 4, 4, 7}, 2) == 2); assert(func0({2, 4, 7, 7, 7, 3, 4, 4, 7}, 7) == 4); return 0; }
O0
cpp
func0(std::vector<int, std::allocator<int> > const&, int): endbr64 push %rbp mov %rsp,%rbp sub $0x40,%rsp mov %rdi,-0x38(%rbp) mov %esi,-0x3c(%rbp) mov %fs:0x28,%rax mov %rax,-0x8(%rbp) xor %eax,%eax movl $0x0,-0x28(%rbp) mov -0x38(%rbp),%rax mov %rax,-0x10(%rbp) mov -0x10(%rbp),%rax m...
_Z5func0RKSt6vectorIiSaIiEEi: endbr64 push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_38], rdi mov [rbp+var_3C], esi mov rax, fs:28h mov [rbp+var_8], rax xor eax, eax mov [rbp+var_28], 0 mov rax, [rbp+var_38] mov [rbp+var_10], rax mov rax, [rbp+var_10] mov rdi, rax cal...
long long func0(long long a1, int a2) { unsigned int v3; // [rsp+18h] [rbp-28h] long long v4; // [rsp+20h] [rbp-20h] BYREF _QWORD v5[3]; // [rsp+28h] [rbp-18h] BYREF v5[2] = __readfsqword(0x28u); v3 = 0; v5[1] = a1; v4 = std::vector<int>::begin(a1); v5[0] = std::vector<int>::end(a1); while ( (unsign...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x38],RDI MOV dword ptr [RBP + -0x3c],ESI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX XOR EAX,EAX MOV dword ptr [RBP + -0x28],0x0 MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,...
/* func0(std::vector<int, std::allocator<int> > const&, int) */ int func0(vector *param_1,int param_2) { bool bVar1; int *piVar2; long in_FS_OFFSET; int local_30; int8 local_28; int8 local_20; vector<int,std::allocator<int>> *local_18; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); l...
3,713
func0
#include <iostream> #include <vector> #include <assert.h>
int func0(const std::vector<int>& tuplex, int value) { int count = 0; for (int elem : tuplex) { if (elem == value) { count++; } } return count; }
int main() { assert(func0({2, 4, 5, 6, 2, 3, 4, 4, 7}, 4) == 3); assert(func0({2, 4, 5, 6, 2, 3, 4, 4, 7}, 2) == 2); assert(func0({2, 4, 7, 7, 7, 3, 4, 4, 7}, 7) == 4); return 0; }
O1
cpp
func0(std::vector<int, std::allocator<int> > const&, int): endbr64 mov (%rdi),%rax mov 0x8(%rdi),%rdi cmp %rdi,%rax je 1274 <_Z5func0RKSt6vectorIiSaIiEEi+0x2b> mov $0x0,%edx cmp %esi,(%rax) sete %cl movzbl %cl,%ecx add %ecx,%edx add $0x4,%rax cmp %rax,%rdi jne 125e <_Z5func0RKSt6vectorI...
_Z5func0RKSt6vectorIiSaIiEEi: endbr64 mov rax, [rdi] mov rdi, [rdi+8] cmp rdi, rax jz short loc_1234 mov edx, 0 loc_121E: cmp [rax], esi setz cl movzx ecx, cl add edx, ecx add rax, 4 cmp rax, rdi jnz short loc_121E loc_1231: mov eax, edx retn loc_1234: mov edx, 0 jm...
long long func0(long long a1, int a2) { _DWORD *v2; // rax _DWORD *v3; // rdi unsigned int v4; // edx v2 = *(_DWORD **)a1; v3 = *(_DWORD **)(a1 + 8); if ( v3 == v2 ) { return 0; } else { v4 = 0; do v4 += *v2++ == a2; while ( v2 != v3 ); } return v4; }
func0: ENDBR64 MOV RAX,qword ptr [RDI] MOV RDI,qword ptr [RDI + 0x8] CMP RDI,RAX JZ 0x00101234 MOV EDX,0x0 LAB_0010121e: CMP dword ptr [RAX],ESI SETZ CL MOVZX ECX,CL ADD EDX,ECX ADD RAX,0x4 CMP RAX,RDI JNZ 0x0010121e LAB_00101231: MOV EAX,EDX RET LAB_00101234: MOV EDX,0x0 JMP 0x00101231
/* func0(std::vector<int, std::allocator<int> > const&, int) */ int func0(vector *param_1,int param_2) { int *piVar1; int iVar2; piVar1 = *(int **)param_1; if (*(int **)(param_1 + 8) == piVar1) { iVar2 = 0; } else { iVar2 = 0; do { iVar2 = iVar2 + (uint)(*piVar1 == param_2); piV...
3,714
func0
#include <iostream> #include <vector> #include <assert.h>
int func0(const std::vector<int>& tuplex, int value) { int count = 0; for (int elem : tuplex) { if (elem == value) { count++; } } return count; }
int main() { assert(func0({2, 4, 5, 6, 2, 3, 4, 4, 7}, 4) == 3); assert(func0({2, 4, 5, 6, 2, 3, 4, 4, 7}, 2) == 2); assert(func0({2, 4, 7, 7, 7, 3, 4, 4, 7}, 7) == 4); return 0; }
O2
cpp
func0(std::vector<int, std::allocator<int> > const&, int): endbr64 mov (%rdi),%rax mov 0x8(%rdi),%rcx xor %r8d,%r8d cmp %rcx,%rax je 152b <_Z5func0RKSt6vectorIiSaIiEEi+0x2b> nopl 0x0(%rax,%rax,1) xor %edx,%edx cmp %esi,(%rax) sete %dl add $0x4,%rax add %edx,%r8d cmp %rax,%rcx jne 1...
_Z5func0RKSt6vectorIiSaIiEEi: endbr64 mov rax, [rdi] mov rdi, [rdi+8] xor edx, edx cmp rdi, rax jz short loc_143A nop word ptr [rax+rax+00h] loc_1428: xor ecx, ecx cmp esi, [rax] setz cl add rax, 4 add edx, ecx cmp rdi, rax jnz short loc_1428 loc_143A: mov eax, ed...
long long func0(long long a1, int a2) { _DWORD *v2; // rax _DWORD *v3; // rdi unsigned int i; // edx int v5; // ecx v2 = *(_DWORD **)a1; v3 = *(_DWORD **)(a1 + 8); for ( i = 0; v3 != v2; i += v5 ) v5 = a2 == *v2++; return i; }
func0: ENDBR64 MOV RAX,qword ptr [RDI] MOV RDI,qword ptr [RDI + 0x8] XOR EDX,EDX CMP RDI,RAX JZ 0x0010143a NOP word ptr [RAX + RAX*0x1] LAB_00101428: XOR ECX,ECX CMP ESI,dword ptr [RAX] SETZ CL ADD RAX,0x4 ADD EDX,ECX CMP RDI,RAX JNZ 0x00101428 LAB_0010143a: MOV EAX,EDX RET
/* func0(std::vector<int, std::allocator<int> > const&, int) */ int func0(vector *param_1,int param_2) { int *piVar1; int iVar2; iVar2 = 0; for (piVar1 = *(int **)param_1; *(int **)(param_1 + 8) != piVar1; piVar1 = piVar1 + 1) { iVar2 = iVar2 + (uint)(param_2 == *piVar1); } return iVar2; }
3,715
func0
#include <iostream> #include <vector> #include <assert.h>
int func0(const std::vector<int>& tuplex, int value) { int count = 0; for (int elem : tuplex) { if (elem == value) { count++; } } return count; }
int main() { assert(func0({2, 4, 5, 6, 2, 3, 4, 4, 7}, 4) == 3); assert(func0({2, 4, 5, 6, 2, 3, 4, 4, 7}, 2) == 2); assert(func0({2, 4, 7, 7, 7, 3, 4, 4, 7}, 7) == 4); return 0; }
O3
cpp
func0(std::vector<int, std::allocator<int> > const&, int): endbr64 mov (%rdi),%rdx mov 0x8(%rdi),%rdi cmp %rdi,%rdx je 17f0 <_Z5func0RKSt6vectorIiSaIiEEi+0xe0> lea -0x4(%rdi),%rcx mov %rdx,%rax movabs $0x3ffffffffffffffc,%r9 sub %rdx,%rcx shr $0x2,%rcx lea 0x1(%rcx),%r8 test %r9,%rcx je ...
_Z5func0RKSt6vectorIiSaIiEEi: endbr64 mov rdx, [rdi] mov r8, [rdi+8] cmp r8, rdx jz loc_1758 lea rcx, [r8-4] mov rax, rdx sub rcx, rdx mov rdi, rcx shr rdi, 2 add rdi, 1 cmp rcx, 8 jbe loc_175B mov rcx, rdi movd xmm3, esi pxor xmm0, xmm0 shr rcx, 2 pshufd ...
long long func0(long long a1, unsigned int a2) { const __m128i *v2; // rdx unsigned long long *v3; // r8 const __m128i *v4; // rax unsigned long long v5; // rdi __m128i v6; // xmm0 __m128i v7; // xmm2 __m128i v8; // xmm1 __m128i v9; // xmm0 long long result; // rax v2 = *(const __m128i **)a1; v3...
func0: ENDBR64 MOV RDX,qword ptr [RDI] MOV R8,qword ptr [RDI + 0x8] CMP R8,RDX JZ 0x00101758 LEA RCX,[R8 + -0x4] MOV RAX,RDX SUB RCX,RDX MOV RDI,RCX SHR RDI,0x2 ADD RDI,0x1 CMP RCX,0x8 JBE 0x0010175b MOV RCX,RDI MOVD XMM3,ESI PXOR XMM0,XMM0 SHR RCX,0x2 PSHUFD XMM2,XMM3,0x0 SHL RCX,0x4 ADD RCX,RDX NOP LAB_001016d0: MOVD...
/* func0(std::vector<int, std::allocator<int> > const&, int) */ int func0(vector *param_1,int param_2) { int *piVar1; int iVar2; int *piVar3; int *piVar4; int *piVar5; int *piVar6; ulong uVar7; int *piVar8; ulong uVar9; int iVar10; int iVar11; int iVar12; int iVar13; piVar8 = *(int **)p...
3,716
func0
#include <iostream> #include <regex> #include <cassert> using namespace std;
string func0(const string &text) { regex pattern("ab*?"); if (regex_search(text, pattern)) { return "Found a match!"; } else { return "Not matched!"; } }
int main() { assert(func0("msb") == "Not matched!"); assert(func0("a0c") == "Found a match!"); assert(func0("abbc") == "Found a match!"); return 0; }
O0
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x58,%rsp mov %rdi,-0x58(%rbp) mov %rsi,-0x60(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax lea -0x40(%rbp),%rax mov $0x10,%edx lea ...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 68h mov [rbp+var_68], rdi mov [rbp+var_70], rsi mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax lea rax, [rbp+var_40] mov edx, 10h lea rcx, aAb; "ab*?" mov ...
long long func0(long long a1, long long a2) { char v3; // [rsp+1Fh] [rbp-51h] BYREF char *v4; // [rsp+20h] [rbp-50h] char *v5; // [rsp+28h] [rbp-48h] _BYTE v6[40]; // [rsp+30h] [rbp-40h] BYREF unsigned long long v7; // [rsp+58h] [rbp-18h] v7 = __readfsqword(0x28u); std::basic_regex<char,std::regex_trait...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x68 MOV qword ptr [RBP + -0x68],RDI MOV qword ptr [RBP + -0x70],RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX LEA RAX,[RBP + -0x40] MOV EDX,0x10 LEA RCX,[0x132051] MOV RSI,RCX MOV RDI,RAX LAB_00104b43: CALL 0x001061ba LEA RCX,[RBP + -0x...
/* func0(std::string const&) */ string * func0(string *param_1) { bool bVar1; string *in_RSI; long in_FS_OFFSET; allocator local_59; allocator *local_58; allocator *local_50; regex local_48 [40]; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); std::regex::basic_regex(local_48,"ab*?",0...
3,717
func0
#include <iostream> #include <regex> #include <cassert> using namespace std;
string func0(const string &text) { regex pattern("ab*?"); if (regex_search(text, pattern)) { return "Found a match!"; } else { return "Not matched!"; } }
int main() { assert(func0("msb") == "Not matched!"); assert(func0("a0c") == "Found a match!"); assert(func0("abbc") == "Found a match!"); return 0; }
O1
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 push %r13 push %r12 push %rbp push %rbx sub $0x58,%rsp mov %rdi,%rbx mov %rsi,%rbp mov %fs:0x28,%rax mov %rax,0x48(%rsp) xor %eax,%eax lea 0x20(%rsp),%r13 mov %r13,%rdi callq 4730 <_ZN...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push rbp mov rbp, rsp push r14 push r12 push rbx sub rsp, 58h mov rbx, rdi mov r14, rsi mov rax, fs:28h mov [rbp+var_28], rax xor eax, eax lea r12, [rbp+var_70] lea rdi, [rbp+var_68]; this call __Z...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x58 MOV RBX,RDI MOV R14,RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x28],RAX XOR EAX,EAX LEA R12,[RBP + -0x70] LEA RDI,[RBP + -0x68] CALL 0x001046f0 MOV qword ptr [RBP + -0x60],0x0 MOV qword ptr [RBP + -0x58],0x0 MOV ECX,0x10 LEA RDX,[0x...
/* func0(std::string const&) */ string * func0(string *param_1) { _Sp_counted_base<(_Lock_policy)2> *p_Var1; _Sp_counted_base<(_Lock_policy)2> *p_Var2; bool bVar3; int iVar4; int8 *in_RSI; long in_FS_OFFSET; regex local_78 [8]; int local_70 [8]; int8 local_68; _Sp_counted_base<(_Lock_policy)2> *lo...
3,718
func0
#include <iostream> #include <regex> #include <cassert> using namespace std;
string func0(const string &text) { regex pattern("ab*?"); if (regex_search(text, pattern)) { return "Found a match!"; } else { return "Not matched!"; } }
int main() { assert(func0("msb") == "Not matched!"); assert(func0("a0c") == "Found a match!"); assert(func0("abbc") == "Found a match!"); return 0; }
O2
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 push %r14 push %r13 push %r12 mov %rdi,%r12 push %rbp push %rbx mov %rsi,%rbx sub $0x50,%rsp mov %fs:0x28,%rax mov %rax,0x48(%rsp) xor %eax,%eax lea 0x20(%rsp),%r13 lea 0x8(%rsp),%rbp...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push rbp mov rbp, rsp push r14 mov r14, rsi push r13 lea r13, [rbp+var_70] push r12 lea r12, [rbp+var_68] push rbx mov rbx, rdi mov rdi, r12; this sub rsp, 50h mov rax, fs:28h mov [rbp+var_28], rax...
long long func0(long long a1, long long *a2) { long long v3; // rdi long long v4; // rsi long long v5; // rsi char v6; // r13 long long v7; // rdi long long v8; // rdx volatile signed __int32 *v9; // rcx signed __int32 v10; // eax long long v12; // rax _BYTE v13[8]; // [rsp+0h] [rbp-70h] BYREF _B...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R14 MOV R14,RSI PUSH R13 LEA R13,[RBP + -0x70] PUSH R12 LEA R12,[RBP + -0x68] PUSH RBX MOV RBX,RDI MOV RDI,R12 SUB RSP,0x50 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x28],RAX XOR EAX,EAX CALL 0x001036d0 LEA RDX,[0x11864f] PXOR XMM0,XMM0 MOV RDI,R13 MOV ECX,0x10 LEA RSI,...
/* func0(std::string const&) */ string * func0(string *param_1) { _Sp_counted_base<(_Lock_policy)2> *p_Var1; int8 uVar2; bool bVar3; int iVar4; int8 *in_RSI; long in_FS_OFFSET; regex local_78 [8]; int local_70 [8]; int local_68 [16]; int local_58 [16]; int local_48 [16]; long local_30; lo...
3,719
func0
#include <iostream> #include <regex> #include <cassert> using namespace std;
string func0(const string &text) { regex pattern("ab*?"); if (regex_search(text, pattern)) { return "Found a match!"; } else { return "Not matched!"; } }
int main() { assert(func0("msb") == "Not matched!"); assert(func0("a0c") == "Found a match!"); assert(func0("abbc") == "Found a match!"); return 0; }
O3
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 push %r14 push %r13 push %r12 mov %rdi,%r12 push %rbp push %rbx mov %rsi,%rbx sub $0x50,%rsp mov %fs:0x28,%rax mov %rax,0x48(%rsp) xor %eax,%eax lea 0x20(%rsp),%r13 lea 0x8(%rsp),%rbp...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push r15 mov r15, rsi push r14 push r13 push r12 push rbp push rbx mov rbx, rdi sub rsp, 2B8h mov rax, fs:28h mov [rsp+2E8h+var_40], rax xor eax, eax lea r14, [rsp+2E8h+var_2A0] mov rdi, r14; this c...
long long func0(long long a1, unsigned long long *a2) { __m128i v3; // xmm0 long long v4; // rdi void *v5; // rdi void **v6; // rbp unsigned long long v7; // r12 void *v8; // rdi unsigned long long v9; // r13 unsigned long long v10; // rbp long long v11; // rax long long v12; // rcx unsigned long...
func0: ENDBR64 PUSH R15 MOV R15,RSI PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX MOV RBX,RDI SUB RSP,0x2b8 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x2a8],RAX XOR EAX,EAX LEA R14,[RSP + 0x48] MOV RDI,R14 CALL 0x00104730 LEA RDX,[0x11a694] PXOR XMM0,XMM0 LEA RDI,[RSP + 0x110] MOV R8D,0x10 MOV RCX,R14 LEA RSI,[RD...
/* func0(std::string const&) */ string * func0(string *param_1) { ulong uVar1; int8 uVar2; ulong uVar3; int auVar4 [16]; bool bVar5; char cVar6; long lVar7; int8 *puVar8; int8 *puVar9; ulong uVar10; ulong *puVar11; long lVar12; ulong uVar13; ulong *in_RSI; uint *puVar14; _Match_mode _V...
3,720
func0
#include <cmath> #include <cassert>
double func0(int number) { double total = 0; total = pow((number * (number + 1)) / 2, 2); return total; }
int main() { assert(func0(7) == 784); assert(func0(5) == 225); assert(func0(15) == 14400); return 0; }
O0
cpp
func0(int): endbr64 push %rbp mov %rsp,%rbp sub $0x20,%rsp mov %edi,-0x14(%rbp) pxor %xmm0,%xmm0 movsd %xmm0,-0x8(%rbp) mov -0x14(%rbp),%eax add $0x1,%eax imul -0x14(%rbp),%eax mov %eax,%edx shr $0x1f,%edx add %edx,%eax sar %eax cvtsi2sd %eax,%xmm0 movsd 0xef0(%rip),%xmm1 callq 1060 ...
_Z5func0i: endbr64 push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_14], edi pxor xmm0, xmm0 movsd [rbp+var_8], xmm0 mov eax, [rbp+var_14] add eax, 1 imul eax, [rbp+var_14] mov edx, eax shr edx, 1Fh add eax, edx sar eax, 1 pxor xmm2, xmm2 cvtsi2sd xmm2, eax movq rax, ...
long long func0(int a1) { return pow((double)(a1 * (a1 + 1) / 2), 2.0); }
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0x14],EDI PXOR XMM0,XMM0 MOVSD qword ptr [RBP + -0x8],XMM0 MOV EAX,dword ptr [RBP + -0x14] ADD EAX,0x1 IMUL EAX,dword ptr [RBP + -0x14] MOV EDX,EAX SHR EDX,0x1f ADD EAX,EDX SAR EAX,0x1 PXOR XMM2,XMM2 CVTSI2SD XMM2,EAX MOVQ RAX,XMM2 MOVSD XMM0,qword ...
/* func0(int) */ double func0(int param_1) { double dVar1; dVar1 = pow((double)(((param_1 + 1) * param_1) / 2),DAT_00102070); return dVar1; }
3,721
func0
#include <cmath> #include <cassert>
double func0(int number) { double total = 0; total = pow((number * (number + 1)) / 2, 2); return total; }
int main() { assert(func0(7) == 784); assert(func0(5) == 225); assert(func0(15) == 14400); return 0; }
O1
cpp
func0(int): endbr64 mov %edi,%eax lea 0x1(%rdi),%edi imul %edi,%eax mov %eax,%edi shr $0x1f,%edi add %eax,%edi sar %edi pxor %xmm0,%xmm0 cvtsi2sd %edi,%xmm0 mulsd %xmm0,%xmm0 retq
_Z5func0i: endbr64 lea edx, [rdi+1] imul edx, edi mov eax, edx shr eax, 1Fh add eax, edx sar eax, 1 pxor xmm0, xmm0 cvtsi2sd xmm0, eax mulsd xmm0, xmm0 retn
double func0(int a1) { return (double)(a1 * (a1 + 1) / 2) * (double)(a1 * (a1 + 1) / 2); }
func0: ENDBR64 LEA EDX,[RDI + 0x1] IMUL EDX,EDI MOV EAX,EDX SHR EAX,0x1f ADD EAX,EDX SAR EAX,0x1 PXOR XMM0,XMM0 CVTSI2SD XMM0,EAX MULSD XMM0,XMM0 RET
/* func0(int) */ double func0(int param_1) { double dVar1; dVar1 = (double)(((param_1 + 1) * param_1) / 2); return dVar1 * dVar1; }
3,722
func0
#include <cmath> #include <cassert>
double func0(int number) { double total = 0; total = pow((number * (number + 1)) / 2, 2); return total; }
int main() { assert(func0(7) == 784); assert(func0(5) == 225); assert(func0(15) == 14400); return 0; }
O2
cpp
func0(int): endbr64 mov %edi,%eax lea 0x1(%rdi),%edi pxor %xmm0,%xmm0 imul %edi,%eax mov %eax,%edi shr $0x1f,%edi add %eax,%edi sar %edi cvtsi2sd %edi,%xmm0 mulsd %xmm0,%xmm0 retq nopw %cs:0x0(%rax,%rax,1) nopl 0x0(%rax)
_Z5func0i: endbr64 lea edx, [rdi+1] pxor xmm0, xmm0 imul edx, edi mov eax, edx shr eax, 1Fh add eax, edx sar eax, 1 cvtsi2sd xmm0, eax mulsd xmm0, xmm0 retn
double func0(int a1) { return (double)(a1 * (a1 + 1) / 2) * (double)(a1 * (a1 + 1) / 2); }
func0: ENDBR64 LEA EDX,[RDI + 0x1] PXOR XMM0,XMM0 IMUL EDX,EDI MOV EAX,EDX SHR EAX,0x1f ADD EAX,EDX SAR EAX,0x1 CVTSI2SD XMM0,EAX MULSD XMM0,XMM0 RET
/* func0(int) */ double func0(int param_1) { double dVar1; dVar1 = (double)(((param_1 + 1) * param_1) / 2); return dVar1 * dVar1; }
3,723
func0
#include <cmath> #include <cassert>
double func0(int number) { double total = 0; total = pow((number * (number + 1)) / 2, 2); return total; }
int main() { assert(func0(7) == 784); assert(func0(5) == 225); assert(func0(15) == 14400); return 0; }
O3
cpp
func0(int): endbr64 mov %edi,%eax lea 0x1(%rdi),%edi pxor %xmm0,%xmm0 imul %edi,%eax mov %eax,%edi shr $0x1f,%edi add %eax,%edi sar %edi cvtsi2sd %edi,%xmm0 mulsd %xmm0,%xmm0 retq nopw %cs:0x0(%rax,%rax,1) nopl 0x0(%rax)
_Z5func0i: endbr64 lea edx, [rdi+1] pxor xmm0, xmm0 imul edx, edi mov eax, edx shr eax, 1Fh add eax, edx sar eax, 1 cvtsi2sd xmm0, eax mulsd xmm0, xmm0 retn
double func0(int a1) { return (double)(a1 * (a1 + 1) / 2) * (double)(a1 * (a1 + 1) / 2); }
func0: ENDBR64 LEA EDX,[RDI + 0x1] PXOR XMM0,XMM0 IMUL EDX,EDI MOV EAX,EDX SHR EAX,0x1f ADD EAX,EDX SAR EAX,0x1 CVTSI2SD XMM0,EAX MULSD XMM0,XMM0 RET
/* func0(int) */ double func0(int param_1) { double dVar1; dVar1 = (double)(((param_1 + 1) * param_1) / 2); return dVar1 * dVar1; }
3,724
func0
#include <iostream> #include <vector> #include <string> #include <assert.h>
std::vector<std::string> func0(std::vector<std::string> l) { std::vector<std::string> temp; for(auto x : l) { bool found = false; for(auto y : temp) { if (x == y) { found = true; break; } } if (!found) { ...
int main() { assert((func0({"Python", "Exercises", "Practice", "Solution", "Exercises"}) == std::vector<std::string>{"Python", "Exercises", "Practice", "Solution"})); assert((func0({"Python", "Exercises", "Practice", "Solution", "Exercises","Java"}) == std::vector<std::string>{"Python", "Exercises", "Practice...
O0
cpp
func0(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0xa8,%rsp mov %rdi,-0xa8(%rbp) mov %rsi,-0xb0(%rbp) mov ...
_Z5func0St6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 0A8h mov [rbp+var_A8], rdi mov [rbp+var_B0], rsi mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax mov rax, [rbp+var_A8] mov rdi, rax call _ZNSt6v...
long long func0(long long a1, long long a2) { long long v2; // rax long long v3; // rax int v4; // ebx char v6; // [rsp+1Fh] [rbp-91h] long long v7; // [rsp+20h] [rbp-90h] BYREF long long v8; // [rsp+28h] [rbp-88h] BYREF long long v9; // [rsp+30h] [rbp-80h] BYREF _QWORD v10[2]; // [rsp+38h] [rbp-78h] B...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0xa8 MOV qword ptr [RBP + -0xa8],RDI MOV qword ptr [RBP + -0xb0],RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX MOV RAX,qword ptr [RBP + -0xa8] MOV RDI,RAX CALL 0x001033ee MOV RAX,qword ptr [RBP + -0xb0] MOV qword ptr [RBP + -0x70],RAX MO...
/* func0(std::vector<std::string, std::allocator<std::string > >) */ vector<std::string,std::allocator<std::string>> * func0(vector param_1) { bool bVar1; bool bVar2; string *psVar3; vector<std::string,std::allocator<std::string>> *in_RSI; int4 in_register_0000003c; vector<std::string,std::allocator<std::...
3,725
func0
#include <iostream> #include <vector> #include <string> #include <assert.h>
std::vector<std::string> func0(std::vector<std::string> l) { std::vector<std::string> temp; for(auto x : l) { bool found = false; for(auto y : temp) { if (x == y) { found = true; break; } } if (!found) { ...
int main() { assert((func0({"Python", "Exercises", "Practice", "Solution", "Exercises"}) == std::vector<std::string>{"Python", "Exercises", "Practice", "Solution"})); assert((func0({"Python", "Exercises", "Practice", "Solution", "Exercises","Java"}) == std::vector<std::string>{"Python", "Exercises", "Practice...
O1
cpp
func0(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >): endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x68,%rsp mov %rdi,%r15 mov ...
_Z5func0St6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 68h mov r15, rdi mov rax, fs:28h mov [rsp+98h+var_40], rax xor eax, eax mov qword ptr [rdi], 0 mov qword ptr [rdi+8], 0 mov...
_QWORD * func0(_QWORD *a1, _QWORD *a2) { _QWORD *v3; // r14 _QWORD *v4; // rbx _QWORD *v5; // rbp _QWORD *v6; // r13 _QWORD *v7; // rdi _QWORD *v9; // [rsp+8h] [rbp-90h] void *s1; // [rsp+10h] [rbp-88h] BYREF size_t n; // [rsp+18h] [rbp-80h] _QWORD v12[2]; // [rsp+20h] [rbp-78h] BYREF void *s2[2]; /...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x68 MOV R15,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x58],RAX XOR EAX,EAX MOV qword ptr [RDI],0x0 MOV qword ptr [RDI + 0x8],0x0 MOV qword ptr [RDI + 0x10],0x0 MOV R14,qword ptr [RSI] MOV RAX,qword ptr [RSI + 0x8] MOV qword ptr [R...
/* func0(std::vector<std::string, std::allocator<std::string > >) */ vector<std::string,std::allocator<std::string>> * func0(vector param_1) { int8 *puVar1; int8 *puVar2; long *plVar3; int iVar4; int8 *puVar5; long *in_RSI; int4 in_register_0000003c; vector<std::string,std::allocator<std::string>> *th...
3,726
func0
#include <iostream> #include <vector> #include <string> #include <assert.h>
std::vector<std::string> func0(std::vector<std::string> l) { std::vector<std::string> temp; for(auto x : l) { bool found = false; for(auto y : temp) { if (x == y) { found = true; break; } } if (!found) { ...
int main() { assert((func0({"Python", "Exercises", "Practice", "Solution", "Exercises"}) == std::vector<std::string>{"Python", "Exercises", "Practice", "Solution"})); assert((func0({"Python", "Exercises", "Practice", "Solution", "Exercises","Java"}) == std::vector<std::string>{"Python", "Exercises", "Practice...
O2
cpp
func0(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >): endbr64 push %r15 mov %rdi,%r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x88,%rsp mov ...
_Z5func0St6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE: endbr64 push r15 pxor xmm0, xmm0 mov r15, rdi push r14 push r13 push r12 push rbp push rbx sub rsp, 88h mov rax, fs:28h mov [rsp+0B8h+var_40], rax xor eax, eax mov qword ptr [rdi+10h], 0 lea ...
long long func0(long long a1, _QWORD *a2) { _QWORD *v3; // r14 long long v4; // rdx _QWORD *v5; // rbx _QWORD *v6; // r12 _QWORD *v7; // rcx _QWORD *v8; // rdi int v9; // eax size_t v11; // rdx _QWORD *v12; // [rsp+0h] [rbp-B0h] _QWORD *v13; // [rsp+8h] [rbp-A8h] _QWORD *v14; // [rsp+20h] [rbp-90...
func0: ENDBR64 PUSH R15 PXOR XMM0,XMM0 MOV R15,RDI PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x88 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x78],RAX XOR EAX,EAX MOV qword ptr [RDI + 0x10],0x0 LEA RCX,[RSP + 0x40] MOVUPS xmmword ptr [RDI],XMM0 MOV RAX,qword ptr [RSI + 0x8] MOV R14,qword ptr [RSI] LEA ...
/* func0(std::vector<std::string, std::allocator<std::string > >) */ vector<std::string,std::allocator<std::string>> * func0(vector param_1) { int8 *puVar1; long *plVar2; int iVar3; long *plVar4; long *in_RSI; int4 in_register_0000003c; vector<std::string,std::allocator<std::string>> *this; long *plVa...
3,727
func0
#include <iostream> #include <vector> #include <string> #include <assert.h>
std::vector<std::string> func0(std::vector<std::string> l) { std::vector<std::string> temp; for(auto x : l) { bool found = false; for(auto y : temp) { if (x == y) { found = true; break; } } if (!found) { ...
int main() { assert((func0({"Python", "Exercises", "Practice", "Solution", "Exercises"}) == std::vector<std::string>{"Python", "Exercises", "Practice", "Solution"})); assert((func0({"Python", "Exercises", "Practice", "Solution", "Exercises","Java"}) == std::vector<std::string>{"Python", "Exercises", "Practice...
O3
cpp
func0(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >): endbr64 push %r15 pxor %xmm0,%xmm0 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x88,%rsp mov...
_Z5func0St6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE: endbr64 push r15 pxor xmm0, xmm0 push r14 push r13 push r12 push rbp push rbx sub rsp, 98h mov [rsp+0C8h+var_B8], rdi lea rcx, [rsp+0C8h+s1] mov rax, fs:28h mov [rsp+0C8h+var_40], rax xor eax, ea...
long long * func0(long long *a1, long long *a2) { long long v2; // r15 size_t v3; // rbx _BYTE *v4; // rbp _QWORD *v5; // rax long long v6; // rbp long long v7; // r14 size_t v8; // rbx _BYTE *v9; // r13 _QWORD *v10; // rax _QWORD *v11; // rbx size_t v12; // rbx _BYTE *v13; // rdi void *v14; /...
func0: ENDBR64 PUSH R15 PXOR XMM0,XMM0 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x98 MOV qword ptr [RSP + 0x10],RDI LEA RCX,[RSP + 0x40] MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x88],RAX XOR EAX,EAX MOV qword ptr [RDI + 0x10],0x0 MOVUPS xmmword ptr [RDI],XMM0 MOV RAX,qword ptr [RSI + 0x8] MOV R15,q...
/* func0(std::vector<std::string, std::allocator<std::string > >) */ vector<std::string,std::allocator<std::string>> * func0(vector param_1) { int8 *puVar1; ulong uVar2; int *puVar3; ulong *puVar4; ulong *puVar5; int iVar6; ulong *puVar7; ulong *puVar8; int8 *in_RSI; int4 in_register_0000003c; v...
3,728
func0
#include <string> #include <regex> #include <algorithm> #include <cassert>
std::string func0(const std::string& text) { std::string str1 = std::regex_replace(text, std::regex("(.)([A-Z][a-z]+)"), "$1_$2"); str1 = std::regex_replace(str1, std::regex("([a-z0-9])([A-Z])"), "$1_$2"); std::transform(str1.begin(), str1.end(), str1.begin(), ::tolower); return str1; }
int main() { assert(func0("GoogleAssistant") == "google_assistant"); assert(func0("ChromeCast") == "chrome_cast"); assert(func0("QuadCore") == "quad_core"); 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 %r12 push %rbx sub $0x60,%rsp mov %rdi,-0x68(%rbp) mov %rsi,-0x70(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax lea -0x60(%rbp),%rax mov $0x10...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push rbp mov rbp, rsp push r12 push rbx sub rsp, 60h 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_60] mov edx, 10h lea rcx, aAZAZ; ...
long long func0(long long a1, long long a2) { long long v2; // r12 long long v3; // rbx long long v4; // rax _BYTE v6[32]; // [rsp+10h] [rbp-60h] BYREF _BYTE v7[40]; // [rsp+30h] [rbp-40h] BYREF unsigned long long v8; // [rsp+58h] [rbp-18h] v8 = __readfsqword(0x28u); std::basic_regex<char,std::regex_t...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R12 PUSH RBX SUB RSP,0x60 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 + -0x60] MOV EDX,0x10 LEA RCX,[0x134051] MOV RSI,RCX MOV RDI,RAX LAB_00104b65: CALL 0x00106248 MOV RAX,q...
/* func0(std::string const&) */ string * func0(string *param_1) { __normal_iterator _Var1; __normal_iterator _Var2; __normal_iterator _Var3; int8 in_RSI; long in_FS_OFFSET; regex local_68 [32]; string local_48 [40]; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); std::regex::basic_reg...
3,729
func0
#include <string> #include <regex> #include <algorithm> #include <cassert>
std::string func0(const std::string& text) { std::string str1 = std::regex_replace(text, std::regex("(.)([A-Z][a-z]+)"), "$1_$2"); str1 = std::regex_replace(str1, std::regex("([a-z0-9])([A-Z])"), "$1_$2"); std::transform(str1.begin(), str1.end(), str1.begin(), ::tolower); return str1; }
int main() { assert(func0("GoogleAssistant") == "google_assistant"); assert(func0("ChromeCast") == "chrome_cast"); assert(func0("QuadCore") == "quad_core"); 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 $0x1d8,%rsp mov %rdi,%rbx mov %rsi,%rbp mov %fs:0x28,%rax mov %rax,0x1c8(%rsp) xor %eax,%eax lea 0x8(%rsp),%r13 mov %r13,%rdi callq 4710 <_Z...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push rbp mov rbp, rsp push r14 push r12 push rbx sub rsp, 1C8h mov r14, rdi mov rbx, rsi mov rax, fs:28h mov [rbp+var_28], rax xor eax, eax lea r12, [rbp+var_1D8] mov rdi, r12; this call __ZNSt6loc...
long long func0(long long a1, long long a2) { long long v3; // rdx long long v4; // rax long long v5; // rdi long long v6; // rdx long long v7; // rax long long v8; // rdi _BYTE *v9; // rax long long v10; // rcx _BYTE *v11; // rbx _BYTE *v12; // r12 long long v14; // rdx unsigned long long v15;...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x1c8 MOV R14,RDI MOV RBX,RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x28],RAX XOR EAX,EAX LEA R12,[RBP + -0x1d8] MOV RDI,R12 CALL 0x00104730 MOV qword ptr [RBP + -0x1d0],0x0 MOV qword ptr [RBP + -0x1c8],0x0 LEA RDI,[RBP + -0x1c0] MOV R8D...
/* func0(std::string const&) */ string * func0(string *param_1) { string *psVar1; _Sp_counted_base<(_Lock_policy)2> *p_Var2; _Sp_counted_base<(_Lock_policy)2> *p_Var3; int iVar4; uint uVar5; long lVar6; uint uVar7; ulong uVar8; char *pcVar9; int8 *in_RSI; char *pcVar10; long in_FS_OFFSET; in...
3,730
func0
#include <string> #include <regex> #include <algorithm> #include <cassert>
std::string func0(const std::string& text) { std::string str1 = std::regex_replace(text, std::regex("(.)([A-Z][a-z]+)"), "$1_$2"); str1 = std::regex_replace(str1, std::regex("([a-z0-9])([A-Z])"), "$1_$2"); std::transform(str1.begin(), str1.end(), str1.begin(), ::tolower); return str1; }
int main() { assert(func0("GoogleAssistant") == "google_assistant"); assert(func0("ChromeCast") == "chrome_cast"); assert(func0("QuadCore") == "quad_core"); return 0; }
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 $0x208,%rsp mov %fs:0x28,%rax mov %rax,0x1f8(%rsp) xor %eax,%eax lea 0x38(%rsp),%r13 lea ...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push rbp mov rbp, rsp push r15 push r14 lea r14, [rbp+var_1E8] push r13 lea r13, [rbp+var_1D0] push r12 mov r12, rsi push rbx mov rbx, rdi mov rdi, r14; this sub rsp, 1E8h mov rax, fs:28h mov [r...
long long func0(long long a1) { char *v2; // rsi __m128i v3; // xmm0 volatile signed __int32 *v4; // r14 long long v5; // rdx volatile signed __int32 *v6; // rcx signed __int32 v7; // eax char *v8; // rsi __m128i v9; // xmm0 volatile signed __int32 *v10; // rdi long long v11; // rdx volatile sign...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 LEA R14,[RBP + -0x1e8] PUSH R13 LEA R13,[RBP + -0x1d0] PUSH R12 MOV R12,RSI PUSH RBX MOV RBX,RDI MOV RDI,R14 SUB RSP,0x1e8 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x38],RAX XOR EAX,EAX MOV qword ptr [RBP + -0x1f8],R14 CALL 0x00104710 PXOR XMM0,XMM0 MOV RCX...
/* func0(std::string const&) */ string * func0(string *param_1) { _Sp_counted_base<(_Lock_policy)2> *p_Var1; int8 uVar2; ulong uVar3; long lVar4; long lVar5; int auVar6 [16]; int8 uVar7; int iVar8; int8 *in_RSI; string *__dest; char *pcVar9; long in_FS_OFFSET; int4 local_1f8 [2]; locale lo...
3,731
func0
#include <string> #include <regex> #include <algorithm> #include <cassert>
std::string func0(const std::string& text) { std::string str1 = std::regex_replace(text, std::regex("(.)([A-Z][a-z]+)"), "$1_$2"); str1 = std::regex_replace(str1, std::regex("([a-z0-9])([A-Z])"), "$1_$2"); std::transform(str1.begin(), str1.end(), str1.begin(), ::tolower); return str1; }
int main() { assert(func0("GoogleAssistant") == "google_assistant"); assert(func0("ChromeCast") == "chrome_cast"); assert(func0("QuadCore") == "quad_core"); return 0; }
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 push %rbx sub $0x208,%rsp mov %rsi,0x8(%rsp) lea 0x38(%rsp),%r13 lea 0x48(%rsp),%rbp mov %r13,%rdi lea 0x60(%rsp),%r14 m...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push r15 push r14 push r13 push r12 push rbp mov rbp, rsi push rbx mov rbx, rdi sub rsp, 1D8h mov rax, fs:28h mov [rsp+208h+var_40], rax xor eax, eax lea r12, [rsp+208h+var_1F0] lea r13, [rsp+208h+v...
char ** func0(char **a1, long long *a2) { __m128i v4; // xmm0 long long v5; // rdi void *v6; // rdi void **v7; // r14 unsigned long long v8; // r15 void *v9; // rdi long long v10; // rsi __m128i v11; // xmm0 long long v12; // rdi void *v13; // rdi void **v14; // r15 unsigned long long v15; // rb...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP MOV RBP,RSI PUSH RBX MOV RBX,RDI SUB RSP,0x1d8 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x1c8],RAX XOR EAX,EAX LEA R12,[RSP + 0x18] LEA R13,[RSP + 0x30] MOV RDI,R12 CALL 0x00104730 PXOR XMM0,XMM0 MOV RCX,R12 MOV RDI,R13 LEA RDX,[0x11b65e] MOV R8D,0x10 ...
/* func0(std::string const&) */ string * func0(string *param_1) { int8 uVar1; int auVar2 [16]; int iVar3; char *pcVar4; int8 *in_RSI; ulong in_R9; char *pcVar5; int8 *puVar6; int8 *puVar7; long in_FS_OFFSET; match_flag_type mVar8; int *puVar9; int4 local_1f8 [2]; locale local_1f0 [2]; in...
3,732
func0
#include <assert.h>
int func0(int n, int m) { if (m == 0 || n == 0) { return 1; } return func0(n, m - 1) + func0(n - 1, m - 1) + func0(n - 1, m); }
int main() { assert(func0(3, 4) == 129); assert(func0(3, 3) == 63); assert(func0(4, 5) == 681); return 0; }
O0
cpp
func0(int, int): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x18,%rsp mov %edi,-0x14(%rbp) mov %esi,-0x18(%rbp) cmpl $0x0,-0x18(%rbp) je 1168 <_Z5func0ii+0x1f> cmpl $0x0,-0x14(%rbp) jne 116f <_Z5func0ii+0x26> mov $0x1,%eax jmp 11ae <_Z5func0ii+0x65> mov -0x18(%rbp),%eax lea -0...
_Z5func0ii: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 18h mov [rbp+var_14], edi mov [rbp+var_18], esi cmp [rbp+var_18], 0 jz short loc_1168 cmp [rbp+var_14], 0 jnz short loc_116F loc_1168: mov eax, 1 jmp short loc_11AE loc_116F: mov eax, [rbp+var_18] lea edx,...
long long func0(int a1, int a2) { int v3; // ebx int v4; // ebx if ( !a2 || !a1 ) return 1LL; v3 = func0(a1, a2 - 1); v4 = func0(a1 - 1, a2 - 1) + v3; return v4 + (unsigned int)func0(a1 - 1, a2); }
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x18 MOV dword ptr [RBP + -0x14],EDI MOV dword ptr [RBP + -0x18],ESI CMP dword ptr [RBP + -0x18],0x0 JZ 0x00101168 CMP dword ptr [RBP + -0x14],0x0 JNZ 0x0010116f LAB_00101168: MOV EAX,0x1 JMP 0x001011ae LAB_0010116f: MOV EAX,dword ptr [RBP + -0x18] LEA EDX,[RAX + -0x...
/* func0(int, int) */ int func0(int param_1,int param_2) { int iVar1; int iVar2; int iVar3; if ((param_2 == 0) || (param_1 == 0)) { iVar3 = 1; } else { iVar1 = func0(param_1,param_2 + -1); iVar2 = func0(param_1 + -1,param_2 + -1); iVar3 = func0(param_1 + -1,param_2); iVar3 = iVar3 +...
3,733
func0
#include <assert.h>
int func0(int n, int m) { if (m == 0 || n == 0) { return 1; } return func0(n, m - 1) + func0(n - 1, m - 1) + func0(n - 1, m); }
int main() { assert(func0(3, 4) == 129); assert(func0(3, 3) == 63); assert(func0(4, 5) == 681); return 0; }
O1
cpp
func0(int, int): endbr64 test %esi,%esi je 119e <_Z5func0ii+0x55> push %r13 push %r12 push %rbp push %rbx sub $0x8,%rsp mov %edi,%ebx mov %esi,%ebp mov $0x1,%eax test %edi,%edi je 1193 <_Z5func0ii+0x4a> lea -0x1(%rsi),%r13d mov %r13d,%esi callq 1149 <_Z5func0ii> mov %eax,%r12d ...
_Z5func0ii: endbr64 test esi, esi jz short loc_119E push r13 push r12 push rbp push rbx sub rsp, 8 mov ebx, edi mov ebp, esi mov eax, 1 test edi, edi jz short loc_1193 lea r13d, [rsi-1] mov esi, r13d; int call _Z5func0ii; func0(int,int) mov r12d, eax sub eb...
long long func0(int a1, int a2) { long long result; // rax int v3; // r12d int v4; // r12d if ( !a2 ) return 1LL; result = 1LL; if ( a1 ) { v3 = func0(a1, a2 - 1); v4 = func0(a1 - 1, a2 - 1) + v3; return v4 + (unsigned int)func0(a1 - 1, a2); } return result; }
func0: ENDBR64 TEST ESI,ESI JZ 0x0010119e PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x8 MOV EBX,EDI MOV EBP,ESI MOV EAX,0x1 TEST EDI,EDI JZ 0x00101193 LEA R13D,[RSI + -0x1] MOV ESI,R13D CALL 0x00101149 MOV R12D,EAX SUB EBX,0x1 MOV ESI,R13D MOV EDI,EBX CALL 0x00101149 ADD R12D,EAX MOV ESI,EBP MOV EDI,EBX CALL 0x001011...
/* func0(int, int) */ int func0(int param_1,int param_2) { int iVar1; int iVar2; int iVar3; if (param_2 != 0) { iVar3 = 1; if (param_1 != 0) { iVar1 = func0(param_1,param_2 + -1); iVar2 = func0(param_1 + -1,param_2 + -1); iVar3 = func0(param_1 + -1,param_2); iVar3 = iVar3 + ...
3,734
func0
#include <assert.h>
int func0(int n, int m) { if (m == 0 || n == 0) { return 1; } return func0(n, m - 1) + func0(n - 1, m - 1) + func0(n - 1, m); }
int main() { assert(func0(3, 4) == 129); assert(func0(3, 3) == 63); assert(func0(4, 5) == 681); return 0; }
O2
cpp
func0(int, int): endbr64 test %esi,%esi je 1270 <_Z5func0ii+0x70> push %r13 push %r12 lea -0x1(%rsi),%r12d push %rbp push %rbx mov %edi,%ebx sub $0x8,%rsp test %edi,%edi sete %al xor %r13d,%r13d test %al,%al jne 1258 <_Z5func0ii+0x58> mov %ebx,%edi mov %r12d,%esi sub $0x1,%eb...
_Z5func0ii: endbr64 test esi, esi jz loc_1B50 push r15 push r14 push r13 push r12 mov r12d, edi push rbp push rbx sub rsp, 48h test edi, edi jz loc_1B13 lea r15d, [rdi-1] mov r9d, esi xor eax, eax mov ebp, r15d cmp esi, 1 jnz short loc_1261 test r15b,...
long long func0(int a1, int a2) { int v2; // r12d int v3; // eax int v4; // ebp int v5; // eax int v7; // ebx int v8; // r13d int v9; // r10d int v10; // r14d int v11; // eax int v12; // r9d int v13; // eax int v14; // ebp int v15; // r15d int v16; // edx int v17; // esi int v18; // edx...
func0: ENDBR64 TEST ESI,ESI JZ 0x00101b50 PUSH R15 PUSH R14 PUSH R13 PUSH R12 MOV R12D,EDI PUSH RBP PUSH RBX SUB RSP,0x48 TEST EDI,EDI JZ 0x00101b13 LEA R15D,[RDI + -0x1] MOV R9D,ESI XOR EAX,EAX MOV EBP,R15D CMP ESI,0x1 JNZ 0x00101261 TEST R15B,0x1 JZ 0x00101244 MOV EAX,0x2 LEA EBP,[RDI + -0x2] LAB_00101244: ADD EAX,0x...
/* func0(int, int) */ int func0(int param_1,int param_2) { int iVar1; int iVar2; int iVar3; int iVar4; int iVar5; int iVar6; int iVar7; int iVar8; uint uVar9; int iVar10; uint uVar11; uint uVar12; uint uVar13; uint uVar14; int iVar15; int iVar16; uint uVar17; uint uVar18; uint uV...
3,735
func0
#include <assert.h>
int func0(int n, int m) { if (m == 0 || n == 0) { return 1; } return func0(n, m - 1) + func0(n - 1, m - 1) + func0(n - 1, m); }
int main() { assert(func0(3, 4) == 129); assert(func0(3, 3) == 63); assert(func0(4, 5) == 681); return 0; }
O3
cpp
func0(int, int): endbr64 test %esi,%esi je 1270 <_Z5func0ii+0x70> push %r13 push %r12 lea -0x1(%rsi),%r12d push %rbp push %rbx mov %edi,%ebx sub $0x8,%rsp test %edi,%edi sete %al xor %r13d,%r13d test %al,%al jne 1258 <_Z5func0ii+0x58> mov %ebx,%edi mov %r12d,%esi sub $0x1,%eb...
_Z5func0ii: endbr64 test esi, esi jz loc_1B78 push r15 push r14 push r13 push r12 mov r12d, edi push rbp push rbx sub rsp, 48h test edi, edi jz loc_1B39 lea r15d, [rdi-1] mov r9d, esi xor eax, eax mov ebp, r15d cmp esi, 1 jnz short loc_12A1 test r15b,...
long long func0(int a1, int a2) { int v2; // r12d int v3; // eax int v4; // ebp int v5; // eax int v7; // ebx int v8; // r13d int v9; // r10d int v10; // r14d int v11; // eax int v12; // r9d int v13; // eax int v14; // ebp int v15; // r15d int v16; // edx int v17; // esi int v18; // edx...
func0: ENDBR64 TEST ESI,ESI JZ 0x00101b78 PUSH R15 PUSH R14 PUSH R13 PUSH R12 MOV R12D,EDI PUSH RBP PUSH RBX SUB RSP,0x48 TEST EDI,EDI JZ 0x00101b39 LEA R15D,[RDI + -0x1] MOV R9D,ESI XOR EAX,EAX MOV EBP,R15D CMP ESI,0x1 JNZ 0x001012a1 TEST R15B,0x1 JZ 0x00101284 MOV EAX,0x2 LEA EBP,[RDI + -0x2] LAB_00101284: ADD EAX,0x...
/* func0(int, int) */ int func0(int param_1,int param_2) { int iVar1; int iVar2; int iVar3; int iVar4; int iVar5; int iVar6; int iVar7; int iVar8; uint uVar9; int iVar10; int iVar11; uint uVar12; uint uVar13; uint uVar14; uint uVar15; int iVar16; uint uVar17; uint uVar18; uint uV...
3,736
func0
#include <assert.h>
int func0(int number) { int total = (number * (number + 1) * (2 * number + 1)) / 6; return total; }
int main() { assert(func0(6) == 91); assert(func0(7) == 140); assert(func0(12) == 650); return 0; }
O0
cpp
func0(int): endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x14(%rbp) mov -0x14(%rbp),%eax add $0x1,%eax imul -0x14(%rbp),%eax mov -0x14(%rbp),%edx add %edx,%edx add $0x1,%edx imul %edx,%eax movslq %eax,%rdx imul $0x2aaaaaab,%rdx,%rdx shr $0x20,%rdx sar $0x1f,%eax mov %edx,%ecx sub %...
_Z5func0i: endbr64 push rbp mov rbp, rsp mov [rbp+var_14], edi mov eax, [rbp+var_14] add eax, 1 imul eax, [rbp+var_14] mov edx, [rbp+var_14] add edx, edx add edx, 1 imul eax, edx movsxd rdx, eax imul rdx, 2AAAAAABh mov rcx, rdx shr rcx, 20h cdq mov eax, ecx sub e...
long long func0(int a1) { return (unsigned int)((2 * a1 + 1) * a1 * (a1 + 1) / 6); }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x14],EDI MOV EAX,dword ptr [RBP + -0x14] ADD EAX,0x1 IMUL EAX,dword ptr [RBP + -0x14] MOV EDX,dword ptr [RBP + -0x14] ADD EDX,EDX ADD EDX,0x1 IMUL EAX,EDX MOVSXD RDX,EAX IMUL RDX,RDX,0x2aaaaaab MOV RCX,RDX SHR RCX,0x20 CDQ MOV EAX,ECX SUB EAX,EDX MOV dword ptr ...
/* func0(int) */ int func0(int param_1) { return ((param_1 + 1) * param_1 * (param_1 * 2 + 1)) / 6; }
3,737
func0
#include <assert.h>
int func0(int number) { int total = (number * (number + 1) * (2 * number + 1)) / 6; return total; }
int main() { assert(func0(6) == 91); assert(func0(7) == 140); assert(func0(12) == 650); return 0; }
O1
cpp
func0(int): endbr64 lea 0x1(%rdi),%edx imul %edi,%edx lea 0x1(%rdi,%rdi,1),%eax imul %eax,%edx movslq %edx,%rax imul $0x2aaaaaab,%rax,%rax shr $0x20,%rax sar $0x1f,%edx sub %edx,%eax retq
_Z5func0i: endbr64 lea edx, [rdi+1] imul edx, edi lea eax, [rdi+rdi+1] imul edx, eax movsxd rax, edx imul rax, 2AAAAAABh shr rax, 20h sar edx, 1Fh sub eax, edx retn
long long func0(int a1) { return (unsigned int)((2 * a1 + 1) * a1 * (a1 + 1) / 6); }
func0: ENDBR64 LEA EDX,[RDI + 0x1] IMUL EDX,EDI LEA EAX,[RDI + RDI*0x1 + 0x1] IMUL EDX,EAX MOVSXD RAX,EDX IMUL RAX,RAX,0x2aaaaaab SHR RAX,0x20 SAR EDX,0x1f SUB EAX,EDX RET
/* func0(int) */ int func0(int param_1) { return ((param_1 + 1) * param_1 * (param_1 * 2 + 1)) / 6; }
3,738
func0
#include <assert.h>
int func0(int number) { int total = (number * (number + 1) * (2 * number + 1)) / 6; return total; }
int main() { assert(func0(6) == 91); assert(func0(7) == 140); assert(func0(12) == 650); return 0; }
O2
cpp
func0(int): endbr64 lea 0x1(%rdi),%edx lea 0x1(%rdi,%rdi,1),%eax imul %edi,%edx imul %eax,%edx movslq %edx,%rax sar $0x1f,%edx imul $0x2aaaaaab,%rax,%rax shr $0x20,%rax sub %edx,%eax retq nopw %cs:0x0(%rax,%rax,1)
_Z5func0i: endbr64 lea edx, [rdi+1] lea eax, [rdi+rdi+1] imul edx, edi imul edx, eax movsxd rax, edx sar edx, 1Fh imul rax, 2AAAAAABh shr rax, 20h sub eax, edx retn
long long func0(int a1) { return (unsigned int)((2 * a1 + 1) * a1 * (a1 + 1) / 6); }
func0: ENDBR64 LEA EDX,[RDI + 0x1] LEA EAX,[RDI + RDI*0x1 + 0x1] IMUL EDX,EDI IMUL EDX,EAX MOVSXD RAX,EDX SAR EDX,0x1f IMUL RAX,RAX,0x2aaaaaab SHR RAX,0x20 SUB EAX,EDX RET
/* func0(int) */ int func0(int param_1) { return ((param_1 + 1) * param_1 * (param_1 * 2 + 1)) / 6; }
3,739
func0
#include <assert.h>
int func0(int number) { int total = (number * (number + 1) * (2 * number + 1)) / 6; return total; }
int main() { assert(func0(6) == 91); assert(func0(7) == 140); assert(func0(12) == 650); return 0; }
O3
cpp
func0(int): endbr64 lea 0x1(%rdi),%edx lea 0x1(%rdi,%rdi,1),%eax imul %edi,%edx imul %eax,%edx movslq %edx,%rax sar $0x1f,%edx imul $0x2aaaaaab,%rax,%rax shr $0x20,%rax sub %edx,%eax retq nopw %cs:0x0(%rax,%rax,1)
_Z5func0i: endbr64 lea edx, [rdi+1] lea eax, [rdi+rdi+1] imul edx, edi imul edx, eax movsxd rax, edx sar edx, 1Fh imul rax, 2AAAAAABh shr rax, 20h sub eax, edx retn
long long func0(int a1) { return (unsigned int)((2 * a1 + 1) * a1 * (a1 + 1) / 6); }
func0: ENDBR64 LEA EDX,[RDI + 0x1] LEA EAX,[RDI + RDI*0x1 + 0x1] IMUL EDX,EDI IMUL EDX,EAX MOVSXD RAX,EDX SAR EDX,0x1f IMUL RAX,RAX,0x2aaaaaab SHR RAX,0x20 SUB EAX,EDX RET
/* func0(int) */ int func0(int param_1) { return ((param_1 + 1) * param_1 * (param_1 * 2 + 1)) / 6; }
3,740
func0
#include <vector> #include <utility> #include <map> #include <cassert>
std::vector<std::pair<int, int>> func0(const std::vector<std::pair<int, int>>& test_list, const std::vector<int>& ord_list) { std::map<int, int> temp; for (const auto& p : test_list) { temp[p.first] = p.second; } std::vector<std::pair<int, int>> res; for (int key : ord_list) { ...
int main() { assert((func0({{4, 3}, {1, 9}, {2, 10}, {3, 2}}, {1, 4, 2, 3}) == std::vector<std::pair<int, int>>{{1, 9}, {4, 3}, {2, 10}, {3, 2}})); assert((func0({{5, 4}, {2, 10}, {3, 11}, {4, 3}}, {3, 4, 2, 3}) == std::vector<std::pair<int, int>>{{3, 11}, {4, 3}, {2, 10}, {3, 11}})); assert((func0({{6, ...
O0
cpp
func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&, std::vector<int, std::allocator<int> > const&): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0xa8,%rsp mov %rdi,-0x98(%rbp) mov %rsi,-0xa0(%rbp) mov %rdx,-0xa8(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xo...
_Z5func0RKSt6vectorISt4pairIiiESaIS1_EERKS_IiSaIiEE: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 0A8h mov [rbp+var_98], rdi mov [rbp+var_A0], rsi mov [rbp+var_A8], rdx mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax lea rax, [rbp+var_50] mov rdi, rax call _ZNSt3ma...
long long func0(long long a1, long long a2, long long a3) { int v3; // ebx long long v4; // rax int v7; // [rsp+2Ch] [rbp-84h] BYREF long long v8; // [rsp+30h] [rbp-80h] BYREF _QWORD v9[2]; // [rsp+38h] [rbp-78h] BYREF long long v10; // [rsp+48h] [rbp-68h] long long v11; // [rsp+50h] [rbp-60h] long lon...
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 qword ptr [RBP + -0xa8],RDX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX LEA RAX,[RBP + -0x50] MOV RDI,RAX CALL 0x00101fca MOV RAX,qword ptr [RBP + -0xa0] MOV qword pt...
/* func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&, std::vector<int, std::allocator<int> > const&) */ vector * func0(vector *param_1,vector *param_2) { int iVar1; bool bVar2; int *piVar3; vector<int,std::allocator<int>> *in_RDX; long in_FS_OFFSET; int local_8c; in...
3,741
func0
#include <vector> #include <utility> #include <map> #include <cassert>
std::vector<std::pair<int, int>> func0(const std::vector<std::pair<int, int>>& test_list, const std::vector<int>& ord_list) { std::map<int, int> temp; for (const auto& p : test_list) { temp[p.first] = p.second; } std::vector<std::pair<int, int>> res; for (int key : ord_list) { ...
int main() { assert((func0({{4, 3}, {1, 9}, {2, 10}, {3, 2}}, {1, 4, 2, 3}) == std::vector<std::pair<int, int>>{{1, 9}, {4, 3}, {2, 10}, {3, 2}})); assert((func0({{5, 4}, {2, 10}, {3, 11}, {4, 3}}, {3, 4, 2, 3}) == std::vector<std::pair<int, int>>{{3, 11}, {4, 3}, {2, 10}, {3, 11}})); assert((func0({{6, ...
O1
cpp
func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&, std::vector<int, std::allocator<int> > const&): endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x58,%rsp mov %rdi,%rbp mov %rdx,%r15 mov %fs:0x28,%rax mov %rax,0x48(%rsp) xor %ea...
_Z5func0RKSt6vectorISt4pairIiiESaIS1_EERKS_IiSaIiEE: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 68h mov rbp, rdi mov r15, rdx mov rax, fs:28h mov [rsp+98h+var_40], rax xor eax, eax mov [rsp+98h+var_70], 0 mov [rsp+98h+var_68], 0 lea rax, ...
_QWORD * func0(_QWORD *a1, _QWORD *a2, int **a3) { _DWORD *v4; // rbx _DWORD *v5; // r13 long long v6; // rax int *v7; // rsi int v8; // r12d int v9; // edx int *v10; // rbx int *v11; // r12 long long v12; // rdx int *v13; // rsi _QWORD *v14; // rsi int v15; // ecx char v17; // [rsp+Eh] [rbp-8...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x68 MOV RBP,RDI MOV R15,RDX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x58],RAX XOR EAX,EAX MOV dword ptr [RSP + 0x28],0x0 MOV qword ptr [RSP + 0x30],0x0 LEA RAX,[RSP + 0x28] MOV qword ptr [RSP + 0x38],RAX MOV qword ptr [RSP + 0x40],RA...
/* func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&, std::vector<int, std::allocator<int> > const&) */ vector * func0(vector *param_1,vector *param_2) { int iVar1; int *piVar2; int8 *puVar3; ulong uVar4; _Rb_tree_iterator _Var5; _Rb_tree_node *p_Var6; _Rb_tree_node...
3,742
func0
#include <vector> #include <utility> #include <map> #include <cassert>
std::vector<std::pair<int, int>> func0(const std::vector<std::pair<int, int>>& test_list, const std::vector<int>& ord_list) { std::map<int, int> temp; for (const auto& p : test_list) { temp[p.first] = p.second; } std::vector<std::pair<int, int>> res; for (int key : ord_list) { ...
int main() { assert((func0({{4, 3}, {1, 9}, {2, 10}, {3, 2}}, {1, 4, 2, 3}) == std::vector<std::pair<int, int>>{{1, 9}, {4, 3}, {2, 10}, {3, 2}})); assert((func0({{5, 4}, {2, 10}, {3, 11}, {4, 3}}, {3, 4, 2, 3}) == std::vector<std::pair<int, int>>{{3, 11}, {4, 3}, {2, 10}, {3, 11}})); assert((func0({{6, ...
O2
cpp
func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&, std::vector<int, std::allocator<int> > const&): endbr64 push %r15 push %r14 push %r13 push %r12 mov %rdi,%r12 push %rbp push %rbx sub $0x68,%rsp mov (%rsi),%rbx mov %rdx,0x8(%rsp) lea 0x28(%rsp),%rbp lea ...
_Z5func0RKSt6vectorISt4pairIiiESaIS1_EERKS_IiSaIiEE: endbr64 push r15 push r14 push r13 push r12 mov r12, rdi push rbp push rbx sub rsp, 68h mov rbx, [rsi] mov r14, [rsi+8] mov [rsp+98h+var_90], rdx lea rbp, [rsp+98h+var_70] mov rax, fs:28h mov [rsp+98h+var_40], rax xor...
long long func0(long long a1, _QWORD *a2, signed int **a3) { _DWORD *v4; // rbx _DWORD *v5; // r14 long long v6; // r15 int v7; // r13d int v8; // eax long long v9; // rcx int *v10; // rsi long long v11; // rdi long long v12; // r8 long long v13; // rax signed int *v14; // rbx signed int *v15; ...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 MOV R12,RDI PUSH RBP PUSH RBX SUB RSP,0x68 MOV RBX,qword ptr [RSI] MOV R14,qword ptr [RSI + 0x8] MOV qword ptr [RSP + 0x8],RDX LEA RBP,[RSP + 0x28] MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x58],RAX XOR EAX,EAX MOV dword ptr [RSP + 0x28],0x0 MOV qword ptr [RSP ...
/* func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&, std::vector<int, std::allocator<int> > const&) */ vector * func0(vector *param_1,vector *param_2) { int iVar1; int *piVar2; tuple *ptVar3; int8 *puVar4; _Rb_tree_iterator _Var5; int4 extraout_var; int4 extraout_v...
3,743
func0
#include <vector> #include <utility> #include <map> #include <cassert>
std::vector<std::pair<int, int>> func0(const std::vector<std::pair<int, int>>& test_list, const std::vector<int>& ord_list) { std::map<int, int> temp; for (const auto& p : test_list) { temp[p.first] = p.second; } std::vector<std::pair<int, int>> res; for (int key : ord_list) { ...
int main() { assert((func0({{4, 3}, {1, 9}, {2, 10}, {3, 2}}, {1, 4, 2, 3}) == std::vector<std::pair<int, int>>{{1, 9}, {4, 3}, {2, 10}, {3, 2}})); assert((func0({{5, 4}, {2, 10}, {3, 11}, {4, 3}}, {3, 4, 2, 3}) == std::vector<std::pair<int, int>>{{3, 11}, {4, 3}, {2, 10}, {3, 11}})); assert((func0({{6, ...
O3
cpp
func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&, std::vector<int, std::allocator<int> > const&): endbr64 push %r15 push %r14 push %r13 push %r12 mov %rdi,%r12 push %rbp push %rbx sub $0x78,%rsp mov (%rsi),%rbx mov %rdx,0x18(%rsp) lea 0x38(%rsp),%rbp mov ...
_Z5func0RKSt6vectorISt4pairIiiESaIS1_EERKS_IiSaIiEE: endbr64 push r15 push r14 push r13 push r12 mov r12, rdi push rbp push rbx sub rsp, 68h mov rbx, [rsi] mov r14, [rsi+8] mov [rsp+98h+var_90], rdx lea rbp, [rsp+98h+var_70] mov rax, fs:28h mov [rsp+98h+var_40], rax xor...
long long func0(long long a1, _QWORD *a2, signed int **a3, long long a4, int *a5) { _DWORD *v6; // rbx _DWORD *v7; // r14 int *v8; // r15 int v9; // r13d int v10; // edi int *v11; // rsi int *v12; // rdx long long v13; // rax long long v14; // rax signed int *v15; // rbx signed int *v16; // r13 ...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 MOV R12,RDI PUSH RBP PUSH RBX SUB RSP,0x68 MOV RBX,qword ptr [RSI] MOV R14,qword ptr [RSI + 0x8] MOV qword ptr [RSP + 0x8],RDX LEA RBP,[RSP + 0x28] MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x58],RAX XOR EAX,EAX MOV dword ptr [RSP + 0x28],0x0 MOV qword ptr [RSP ...
/* func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&, std::vector<int, std::allocator<int> > const&) */ vector * func0(vector *param_1,vector *param_2) { int iVar1; int8 *puVar2; piecewise_construct_t *ppVar3; piecewise_construct_t *ppVar4; piecewise_construct_t *ppVar5...
3,744
func0
#include <iostream> #include <string> #include <unordered_map> #include <cassert>
char func0(const std::string &str1) { std::unordered_map<char, int> temp; for (char ch : str1) { temp[ch]++; } char max_char = '\0'; int max_count = 0; for (auto &p : temp) { if (p.second > max_count) { max_count = p.second; max_char ...
int main() { assert(func0("hello world") == 'l'); assert(func0("hello ") == 'l'); assert(func0("python pr") == 'p'); 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 $0x88,%rsp mov %rdi,-0x88(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax lea -0x50(%rbp),%rax mov %rax,%rdi callq 2b04 <_ZNSt13unordered_m...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 88h mov [rbp+var_88], rdi mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax lea rax, [rbp+var_50] mov rdi, rax call _ZNSt13unordered_mapIciSt4hashIcESt8equal_toIcESaI...
long long func0(long long a1) { _DWORD *v1; // rax unsigned int v2; // ebx char v4; // [rsp+12h] [rbp-7Eh] BYREF unsigned __int8 v5; // [rsp+13h] [rbp-7Dh] int v6; // [rsp+14h] [rbp-7Ch] long long v7; // [rsp+18h] [rbp-78h] BYREF _QWORD v8[2]; // [rsp+20h] [rbp-70h] BYREF _BYTE *v9; // [rsp+30h] [rbp-6...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x88 MOV qword ptr [RBP + -0x88],RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX LEA RAX,[RBP + -0x50] MOV RDI,RAX CALL 0x00102ae0 MOV RAX,qword ptr [RBP + -0x88] MOV qword ptr [RBP + -0x68],RAX MOV RAX,qword ptr [RBP + -0x68] MOV RDI,RAX ...
/* func0(std::string const&) */ int func0(string *param_1) { int uVar1; bool bVar2; char cVar3; char *pcVar4; int *piVar5; long in_FS_OFFSET; char local_86; int local_85; int local_84; int8 local_80; int8 local_78; string *local_70; unordered_map<char,int,std::hash<char>,std::equal_to<char>,...
3,745
func0
#include <iostream> #include <string> #include <unordered_map> #include <cassert>
char func0(const std::string &str1) { std::unordered_map<char, int> temp; for (char ch : str1) { temp[ch]++; } char max_char = '\0'; int max_count = 0; for (auto &p : temp) { if (p.second > max_count) { max_count = p.second; max_char ...
int main() { assert(func0("hello world") == 'l'); assert(func0("hello ") == 'l'); assert(func0("python pr") == 'p'); return 0; }
O1
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 push %r12 push %rbp push %rbx sub $0x50,%rsp mov %fs:0x28,%rax mov %rax,0x48(%rsp) xor %eax,%eax lea 0x40(%rsp),%rax mov %rax,0x10(%rsp) movq $0x1,0x18(%rsp) movq $0x0,0x20(%rsp) movq $0x...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push r12 push rbp push rbx sub rsp, 50h mov rax, fs:28h mov [rsp+68h+var_20], rax xor eax, eax lea rax, [rsp+68h+var_28] mov [rsp+68h+var_58], rax mov [rsp+68h+var_50], 1 mov [rsp+68h+var_48], 0 mov [rsp...
long long func0(long long a1, char *a2, long long a3, long long a4) { char *v4; // rbx char *v5; // rbp _DWORD *v6; // rax long long **v7; // rax unsigned int v8; // ebx char v10; // [rsp+Fh] [rbp-59h] BYREF _QWORD v11[2]; // [rsp+10h] [rbp-58h] BYREF long long **v12; // [rsp+20h] [rbp-48h] long long...
func0: ENDBR64 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x50 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x48],RAX XOR EAX,EAX LEA RAX,[RSP + 0x40] MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RSP + 0x18],0x1 MOV qword ptr [RSP + 0x20],0x0 MOV qword ptr [RSP + 0x28],0x0 MOV dword ptr [RSP + 0x30],0x3f800000 MOV qword p...
/* func0(std::string const&) */ int func0(string *param_1) { int *piVar1; long *plVar2; int iVar3; int uVar4; char *pcVar5; char *pcVar6; long in_FS_OFFSET; char local_59; int8 *local_58; int8 local_50; long *local_48; int8 local_40; int4 local_38; int8 local_30; int8 local_28; long lo...
3,746
func0
#include <iostream> #include <string> #include <unordered_map> #include <cassert>
char func0(const std::string &str1) { std::unordered_map<char, int> temp; for (char ch : str1) { temp[ch]++; } char max_char = '\0'; int max_count = 0; for (auto &p : temp) { if (p.second > max_count) { max_count = p.second; max_char ...
int main() { assert(func0("hello world") == 'l'); assert(func0("hello ") == 'l'); assert(func0("python pr") == 'p'); return 0; }
O2
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x68,%rsp mov (%rdi),%rbx mov 0x8(%rdi),%r15 mov %fs:0x28,%rax mov %rax,0x58(%rsp) xor %eax,%eax lea 0x50(%rsp),%rsi mo...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push r13 push r12 push rbp push rbx sub rsp, 58h mov rbx, [rdi] mov r12, [rdi+8] mov rax, fs:28h mov [rsp+78h+var_30], rax xor eax, eax lea rax, [rsp+78h+var_38] lea rbp, [rsp+78h+var_68] mov [rsp+78h...
long long func0(long long a1, char *a2, long long a3, long long a4) { char *v4; // rbx long long v5; // r12 char *v6; // r12 _DWORD *v7; // rax long long **v8; // rax unsigned int v9; // ebx char v11; // [rsp+Fh] [rbp-69h] BYREF _QWORD v12[2]; // [rsp+10h] [rbp-68h] BYREF long long **v13; // [rsp+20h...
func0: ENDBR64 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x58 MOV RBX,qword ptr [RDI] MOV R12,qword ptr [RDI + 0x8] MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x48],RAX XOR EAX,EAX LEA RAX,[RSP + 0x40] LEA RBP,[RSP + 0x10] MOV qword ptr [RSP + 0x18],0x1 ADD R12,RBX MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [...
/* func0(std::string const&) */ int func0(string *param_1) { int *piVar1; long *plVar2; int iVar3; int uVar4; char *pcVar5; char *pcVar6; long in_FS_OFFSET; char local_69; int8 *local_68; int8 local_60; long *local_58; int8 local_50; int4 local_48; int8 local_40; int8 local_38; long lo...
3,747
func0
#include <iostream> #include <string> #include <unordered_map> #include <cassert>
char func0(const std::string &str1) { std::unordered_map<char, int> temp; for (char ch : str1) { temp[ch]++; } char max_char = '\0'; int max_count = 0; for (auto &p : temp) { if (p.second > max_count) { max_count = p.second; max_char ...
int main() { assert(func0("hello world") == 'l'); assert(func0("hello ") == 'l'); assert(func0("python pr") == 'p'); return 0; }
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 push %rbp push %rbx sub $0x68,%rsp mov (%rdi),%rbx mov 0x8(%rdi),%r15 mov %fs:0x28,%rax mov %rax,0x58(%rsp) xor %eax,%eax lea 0x50(%rsp),%rax mo...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 68h mov r12, [rdi] mov r15, [rdi+8] mov rax, fs:28h mov [rsp+98h+var_40], rax xor eax, eax lea r8, [rsp+98h+s] mov [rsp+98h+var_58], 3F...
long long func0(char **a1) { char *v1; // r12 char *v2; // r15 _QWORD *v3; // r8 char *v4; // r15 unsigned long long i; // rdi unsigned long long v6; // r13 char v7; // bp long long **v8; // r9 long long *v9; // rax char v10; // cl long long v11; // rax _DWORD *v12; // rbx unsigned long long ...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x68 MOV R12,qword ptr [RDI] MOV R15,qword ptr [RDI + 0x8] MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x58],RAX XOR EAX,EAX LEA R8,[RSP + 0x50] MOV dword ptr [RSP + 0x40],0x3f800000 ADD R15,R12 MOV qword ptr [RSP + 0x18],R8 MOV qword ptr...
/* func0(std::string const&) */ int func0(string *param_1) { int *piVar1; long *plVar2; char cVar3; char cVar4; long *plVar5; long *plVar6; void *__s; int8 *puVar7; int iVar8; ulong uVar9; ulong extraout_RDX; int uVar10; long *plVar11; ulong uVar12; char *pcVar13; char *pcVar14; long...
3,748
func0
#include <limits.h> #include <assert.h> #include <tuple>
std::tuple<int, int, int> func0(int A[], int B[], int C[], int p, int q, int r) { int diff = INT_MAX; int res_i = 0; int res_j = 0; int res_k = 0; int i = 0; int j = 0; int k = 0; while(i < p && j < q && k < r) { int minimum = std::min(A[i], std::min(B[j], C[k])); int maximum = std::max(A[i], std:...
int main() { int A1[] = {1, 4, 10}; int B1[] = {2, 15, 20}; int C1[] = {10, 12}; int A2[] = {20, 24, 100}; int B2[] = {2, 19, 22, 79, 800}; int C2[] = {10, 12, 23, 24, 119}; int A3[] = {2, 5, 11}; int B3[] = {3, 16, 21}; int C3[] = {11, 13}; assert(func0(A1, B1, C1, 3, 3, 2) == std::make_tuple(10,...
O0
cpp
func0(int*, int*, int*, int, int, int): endbr64 push %rbp mov %rsp,%rbp sub $0x60,%rsp mov %rdi,-0x38(%rbp) mov %rsi,-0x40(%rbp) mov %rdx,-0x48(%rbp) mov %rcx,-0x50(%rbp) mov %r8d,-0x54(%rbp) mov %r9d,-0x58(%rbp) movl $0x7fffffff,-0x24(%rbp) movl $0x0,-0x20(%rbp) movl $0x0,-0x1c(%rbp) mo...
3,749
func0
#include <limits.h> #include <assert.h> #include <tuple>
std::tuple<int, int, int> func0(int A[], int B[], int C[], int p, int q, int r) { int diff = INT_MAX; int res_i = 0; int res_j = 0; int res_k = 0; int i = 0; int j = 0; int k = 0; while(i < p && j < q && k < r) { int minimum = std::min(A[i], std::min(B[j], C[k])); int maximum = std::max(A[i], std:...
int main() { int A1[] = {1, 4, 10}; int B1[] = {2, 15, 20}; int C1[] = {10, 12}; int A2[] = {20, 24, 100}; int B2[] = {2, 19, 22, 79, 800}; int C2[] = {10, 12, 23, 24, 119}; int A3[] = {2, 5, 11}; int B3[] = {3, 16, 21}; int C3[] = {11, 13}; assert(func0(A1, B1, C1, 3, 3, 2) == std::make_tuple(10,...
O1
cpp
func0(int*, int*, int*, int, int, int): endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx mov %rdi,-0x8(%rsp) mov %r8d,-0x18(%rsp) test %r9d,%r9d setle %dil cmpl $0x0,0x38(%rsp) setle %al or %al,%dil jne 127b <_Z5func0PiS_S_iii+0x112> test %r8d,%r8d jle 127b <_Z5fun...
3,750
func0
#include <limits.h> #include <assert.h> #include <tuple>
std::tuple<int, int, int> func0(int A[], int B[], int C[], int p, int q, int r) { int diff = INT_MAX; int res_i = 0; int res_j = 0; int res_k = 0; int i = 0; int j = 0; int k = 0; while(i < p && j < q && k < r) { int minimum = std::min(A[i], std::min(B[j], C[k])); int maximum = std::max(A[i], std:...
int main() { int A1[] = {1, 4, 10}; int B1[] = {2, 15, 20}; int C1[] = {10, 12}; int A2[] = {20, 24, 100}; int B2[] = {2, 19, 22, 79, 800}; int C2[] = {10, 12, 23, 24, 119}; int A3[] = {2, 5, 11}; int B3[] = {3, 16, 21}; int C3[] = {11, 13}; assert(func0(A1, B1, C1, 3, 3, 2) == std::make_tuple(10,...
O2
cpp
func0(int*, int*, int*, int, int, int): endbr64 push %r15 test %r9d,%r9d push %r14 push %r13 push %r12 push %rbp push %rbx mov 0x38(%rsp),%eax mov (%rcx),%r10d mov %rdi,-0x8(%rsp) setle %dil test %eax,%eax setle %al mov %r8d,-0x18(%rsp) or %al,%dil jne 14fe <_Z5func0PiS_S_iii+0x14e>...
3,751
func0
#include <limits.h> #include <assert.h> #include <tuple>
std::tuple<int, int, int> func0(int A[], int B[], int C[], int p, int q, int r) { int diff = INT_MAX; int res_i = 0; int res_j = 0; int res_k = 0; int i = 0; int j = 0; int k = 0; while(i < p && j < q && k < r) { int minimum = std::min(A[i], std::min(B[j], C[k])); int maximum = std::max(A[i], std:...
int main() { int A1[] = {1, 4, 10}; int B1[] = {2, 15, 20}; int C1[] = {10, 12}; int A2[] = {20, 24, 100}; int B2[] = {2, 19, 22, 79, 800}; int C2[] = {10, 12, 23, 24, 119}; int A3[] = {2, 5, 11}; int B3[] = {3, 16, 21}; int C3[] = {11, 13}; assert(func0(A1, B1, C1, 3, 3, 2) == std::make_tuple(10,...
O3
cpp
func0(int*, int*, int*, int, int, int): endbr64 push %r15 test %r9d,%r9d push %r14 push %r13 push %r12 push %rbp push %rbx mov 0x38(%rsp),%eax mov (%rcx),%r11d mov %rdi,-0x8(%rsp) setle %dil test %eax,%eax setle %al mov %r8d,-0x18(%rsp) or %al,%dil jne 14de <_Z5func0PiS_S_iii+0x14e>...
3,752
func0
#include <vector> #include <string> #include <algorithm> #include <cassert> struct Model { std::string make; int model; std::string color; bool operator==(const Model& other) const { return make == other.make && model == other.model && color == other.color; } };
std::vector<Model> func0(const std::vector<Model>& models) { std::vector<Model> sorted = models; std::sort(sorted.begin(), sorted.end(), [](const Model& a, const Model& b) { return a.color < b.color; }); return sorted; }
int main() { std::vector<Model> test1 = { {"Nokia", 216, "Black"}, {"Mi Max", 2, "Gold"}, {"Samsung", 7, "Blue"} }; std::vector<Model> expected1 = { {"Nokia", 216, "Black"}, {"Samsung", 7, "Blue"}, {"Mi Max", 2, "Gold"} }; assert(func0(test1) == expected1); std::vector<Model> test2 = { {"Vivo", 20...
O0
cpp
func0(std::vector<Model, std::allocator<Model> > const&)::{lambda(Model const&, Model const&)#1}::operator()(Model const&, Model const&) const: push %rbp mov %rsp,%rbp sub $0x20,%rsp mov %rdi,-0x8(%rbp) mov %rsi,-0x10(%rbp) mov %rdx,-0x18(%rbp) mov -0x18(%rbp),%rax lea 0x28(%rax),%rdx mov -0x1...
_ZZ5func0RKSt6vectorI5ModelSaIS0_EEENKUlRKS0_S6_E_clES6_S6_: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_18] lea rdx, [rax+28h] mov rax, [rbp+var_10] add rax, 28h ; '(' mov rsi, rdx mov rdi, rax call...
long long func0(std::vector<Model> const&)::{lambda(Model const&,Model const&)#1}::operator()( long long a1, long long a2, long long a3) { return std::operator<<char>(a2 + 40, a3 + 40); }
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x18 MOV qword ptr [RBP + -0x18],RDI MOV qword ptr [RBP + -0x20],RSI MOV RDX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x18] MOV RSI,RDX MOV RDI,RAX LAB_0010253e: CALL 0x0010501e MOV RAX,qword ptr [RBP + -0x18] MOV RDI,RAX CALL 0x0010522c MOV RBX,RAX MOV RAX,...
/* func0(std::vector<Model, std::allocator<Model> > const&) */ vector * func0(vector *param_1) { __normal_iterator _Var1; __normal_iterator _Var2; _lambda_Model_const__Model_const___1_ extraout_EDX; vector *in_RSI; std::vector<Model,std::allocator<Model>>::vector ((vector<Model,std::allocator...
3,753
func0
#include <vector> #include <string> #include <algorithm> #include <cassert> struct Model { std::string make; int model; std::string color; bool operator==(const Model& other) const { return make == other.make && model == other.model && color == other.color; } };
std::vector<Model> func0(const std::vector<Model>& models) { std::vector<Model> sorted = models; std::sort(sorted.begin(), sorted.end(), [](const Model& a, const Model& b) { return a.color < b.color; }); return sorted; }
int main() { std::vector<Model> test1 = { {"Nokia", 216, "Black"}, {"Mi Max", 2, "Gold"}, {"Samsung", 7, "Blue"} }; std::vector<Model> expected1 = { {"Nokia", 216, "Black"}, {"Samsung", 7, "Blue"}, {"Mi Max", 2, "Gold"} }; assert(func0(test1) == expected1); std::vector<Model> test2 = { {"Vivo", 20...
O1
cpp
void std::__unguarded_linear_insert<__gnu_cxx::__normal_iterator<Model*, std::vector<Model, std::allocator<Model> > >, __gnu_cxx::__ops::_Val_comp_iter<func0(std::vector<Model, std::allocator<Model> > const&)::{lambda(Model const&, Model const&)#1}> >(__gnu_cxx::__normal_iterator<Model*, std::vector<Model, std::allocat...
_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP5ModelSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_comp_iterIZ5func0RKS6_EUlRKS2_SD_E_EEEvT_T0_: push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 58h mov rbp, rdi mov rax, fs:28h mov [rsp+88h+var_40], rax xor ...
unsigned long long std::__unguarded_linear_insert<__gnu_cxx::__normal_iterator<Model *,std::vector<Model>>,__gnu_cxx::__ops::_Val_comp_iter<func0(std::vector<Model> const&)::{lambda(Model const&,Model const&)#1}>>( long long a1) { long long v1; // rax long long v2; // rax long long i; // rbp long long ...
__unguarded_linear_insert<__normal_iterator<Model*,std::vector<Model,std::allocator<Model>>>,__ops::_Val_comp_iter<func0(std::vector<Model,std::allocator<Model>>const&)::{lambda(Model_const&,Model_const&)#1}>>: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x58 MOV RBP,RDI MOV RAX,qword ptr FS:[0x28] MO...
/* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* void std::__unguarded_linear_insert<__normal_iterator<Model*, std::vector<Model, std::allocator<Model> > >, __ops::_Val_comp_iter<func0(std::vector<Model, std::allocator<Model> > const&)::{lambda(Model const&, Model const&)#1}> >(__no...
3,754
func0
#include <vector> #include <string> #include <algorithm> #include <cassert> struct Model { std::string make; int model; std::string color; bool operator==(const Model& other) const { return make == other.make && model == other.model && color == other.color; } };
std::vector<Model> func0(const std::vector<Model>& models) { std::vector<Model> sorted = models; std::sort(sorted.begin(), sorted.end(), [](const Model& a, const Model& b) { return a.color < b.color; }); return sorted; }
int main() { std::vector<Model> test1 = { {"Nokia", 216, "Black"}, {"Mi Max", 2, "Gold"}, {"Samsung", 7, "Blue"} }; std::vector<Model> expected1 = { {"Nokia", 216, "Black"}, {"Samsung", 7, "Blue"}, {"Mi Max", 2, "Gold"} }; assert(func0(test1) == expected1); std::vector<Model> test2 = { {"Vivo", 20...
O2
cpp
void std::__unguarded_linear_insert<__gnu_cxx::__normal_iterator<Model*, std::vector<Model, std::allocator<Model> > >, __gnu_cxx::__ops::_Val_comp_iter<func0(std::vector<Model, std::allocator<Model> > const&)::{lambda(Model const&, Model const&)#1}> >(__gnu_cxx::__normal_iterator<Model*, std::vector<Model, std::allocat...
_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP5ModelSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_comp_iterIZ5func0RKS6_EUlRKS2_SD_E_EEEvT_T0__isra_0: push r15 lea r15, [rdi+10h] push r14 push r13 push r12 push rbp push rbx mov rbx, rdi sub rsp, 68h mov rdx, [rdi+8] mov ...
unsigned long long std::__unguarded_linear_insert<__gnu_cxx::__normal_iterator<Model *,std::vector<Model>>,__gnu_cxx::__ops::_Val_comp_iter<func0(std::vector<Model> const&)::{lambda(Model const&,Model const&)#1}>>( long long a1) { double *v1; // r15 size_t v3; // rdx int v4; // eax long long *v5; // rd...
__unguarded_linear_insert<__normal_iterator<Model*,std::vector<Model,std::allocator<Model>>>,__ops::_Val_comp_iter<func0(std::vector<Model,std::allocator<Model>>const&)::{lambda(Model_const&,Model_const&)#1}>>: PUSH R15 LEA R15,[RDI + 0x10] PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX MOV RBX,RDI SUB RSP,0x68 MOV RDX,q...
/* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* void std::__unguarded_linear_insert<__normal_iterator<Model*, std::vector<Model, std::allocator<Model> > >, __ops::_Val_comp_iter<func0(std::vector<Model, std::allocator<Model> > const&)::{lambda(Model const&, Model const&)#1}> >(__no...
3,755
func0
#include <vector> #include <string> #include <algorithm> #include <cassert> struct Model { std::string make; int model; std::string color; bool operator==(const Model& other) const { return make == other.make && model == other.model && color == other.color; } };
std::vector<Model> func0(const std::vector<Model>& models) { std::vector<Model> sorted = models; std::sort(sorted.begin(), sorted.end(), [](const Model& a, const Model& b) { return a.color < b.color; }); return sorted; }
int main() { std::vector<Model> test1 = { {"Nokia", 216, "Black"}, {"Mi Max", 2, "Gold"}, {"Samsung", 7, "Blue"} }; std::vector<Model> expected1 = { {"Nokia", 216, "Black"}, {"Samsung", 7, "Blue"}, {"Mi Max", 2, "Gold"} }; assert(func0(test1) == expected1); std::vector<Model> test2 = { {"Vivo", 20...
O3
cpp
void std::__unguarded_linear_insert<__gnu_cxx::__normal_iterator<Model*, std::vector<Model, std::allocator<Model> > >, __gnu_cxx::__ops::_Val_comp_iter<func0(std::vector<Model, std::allocator<Model> > const&)::{lambda(Model const&, Model const&)#1}> >(__gnu_cxx::__normal_iterator<Model*, std::vector<Model, std::allocat...
_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP5ModelSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_comp_iterIZ5func0RKS6_EUlRKS2_SD_E_EEEvT_T0__isra_0: push r15 lea r15, [rdi+10h] push r14 push r13 push r12 push rbp push rbx mov rbx, rdi sub rsp, 68h mov rdx, [rdi+8] mov ...
unsigned long long std::__unguarded_linear_insert<__gnu_cxx::__normal_iterator<Model *,std::vector<Model>>,__gnu_cxx::__ops::_Val_comp_iter<func0(std::vector<Model> const&)::{lambda(Model const&,Model const&)#1}>>( long long a1) { double *v1; // r15 size_t v3; // rdx int v4; // eax long long *v5; // rd...
__unguarded_linear_insert<__normal_iterator<Model*,std::vector<Model,std::allocator<Model>>>,__ops::_Val_comp_iter<func0(std::vector<Model,std::allocator<Model>>const&)::{lambda(Model_const&,Model_const&)#1}>>: PUSH R15 LEA R15,[RDI + 0x10] PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX MOV RBX,RDI SUB RSP,0x68 MOV RDX,q...
/* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* void std::__unguarded_linear_insert<__normal_iterator<Model*, std::vector<Model, std::allocator<Model> > >, __ops::_Val_comp_iter<func0(std::vector<Model, std::allocator<Model> > const&)::{lambda(Model const&, Model const&)#1}> >(__no...
3,756
func0
#include <vector> #include <cassert> void shift_down(std::vector<int>& arr, int start, int end) { int root = start; while (root * 2 + 1 <= end) { int child = root * 2 + 1; if (child + 1 <= end && arr[child] < arr[child + 1]) { child += 1; } if (child <= e...
std::vector<int> func0(std::vector<int>& arr) { heapify(arr); int end = arr.size() - 1; while (end > 0) { std::swap(arr[end], arr[0]); shift_down(arr, 0, end - 1); end -= 1; } return arr; }
int main() { std::vector<int> vec1 = {12, 2, 4, 5, 2, 3}; std::vector<int> vec2 = {32, 14, 5, 6, 7, 19}; std::vector<int> vec3 = {21, 15, 29, 78, 65}; assert(func0(vec1) == std::vector<int>({2, 2, 3, 4, 5, 12})); assert(func0(vec2) == std::vector<int>({5, 6, 7, 14, 19, 32})); assert(func...
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 -0x30(%rbp),%rax mov %rax,%rdi callq 1365 <_Z7heapifyRSt6vectorIiSaIiEE> mov -0x30(%rbp),%rax mov %rax,%rdi callq 1b44 <_ZNKSt6vectorIiSaIi...
_Z5func0RSt6vectorIiSaIiEE: 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_30] mov rdi, rax call _Z7heapifyRSt6vectorIiSaIiEE; heapify(std::vector<int> &) mov rax, [rbp+var_30] mov rdi, rax call _ZNKSt6vectorI...
long long func0(long long a1, long long a2) { long long v2; // rbx long long v3; // rax int i; // [rsp+1Ch] [rbp-14h] heapify(a2); for ( i = std::vector<int>::size(a2) - 1; i > 0; --i ) { v2 = std::vector<int>::operator[](a2, 0LL); v3 = std::vector<int>::operator[](a2, i); std::swap<int>(v3, v...
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 + -0x30] MOV RDI,RAX CALL 0x00101386 MOV RAX,qword ptr [RBP + -0x30] MOV RDI,RAX CALL 0x00101b86 SUB EAX,0x1 MOV dword ptr [RBP + -0x14],EAX JMP 0x0010145e LAB_0010140f: MOV R...
/* func0(std::vector<int, std::allocator<int> >&) */ vector * func0(vector *param_1) { int iVar1; int *piVar2; int *piVar3; vector *in_RSI; int4 local_1c; heapify(in_RSI); iVar1 = std::vector<int,std::allocator<int>>::size((vector<int,std::allocator<int>> *)in_RSI); while (local_1c = iVar1 + -1, 0 ...
3,757
func0
#include <vector> #include <cassert> void shift_down(std::vector<int>& arr, int start, int end) { int root = start; while (root * 2 + 1 <= end) { int child = root * 2 + 1; if (child + 1 <= end && arr[child] < arr[child + 1]) { child += 1; } if (child <= e...
std::vector<int> func0(std::vector<int>& arr) { heapify(arr); int end = arr.size() - 1; while (end > 0) { std::swap(arr[end], arr[0]); shift_down(arr, 0, end - 1); end -= 1; } return arr; }
int main() { std::vector<int> vec1 = {12, 2, 4, 5, 2, 3}; std::vector<int> vec2 = {32, 14, 5, 6, 7, 19}; std::vector<int> vec3 = {21, 15, 29, 78, 65}; assert(func0(vec1) == std::vector<int>({2, 2, 3, 4, 5, 12})); assert(func0(vec2) == std::vector<int>({5, 6, 7, 14, 19, 32})); assert(func...
O1
cpp
func0(std::vector<int, std::allocator<int> >&): endbr64 push %r13 push %r12 push %rbp push %rbx sub $0x8,%rsp mov %rdi,%r13 mov %rsi,%r12 mov %rsi,%rdi callq 12c8 <_Z7heapifyRSt6vectorIiSaIiEE> mov 0x8(%r12),%rbx sub (%r12),%rbx sar $0x2,%rbx sub $0x1,%ebx test %ebx,%ebx jle 136a <...
_Z5func0RSt6vectorIiSaIiEE: endbr64 push r13 push r12 push rbp push rbx sub rsp, 8 mov r13, rdi mov r12, rsi mov rdi, rsi call _Z7heapifyRSt6vectorIiSaIiEE; heapify(std::vector<int> &) mov rbx, [r12+8] sub rbx, [r12] sar rbx, 2 sub ebx, 1 test ebx, ebx jle short loc...
int ** func0(int **a1, long long a2) { int v3; // ebx long long v4; // rbp _DWORD *v5; // rax int *v6; // rdx int v7; // ecx unsigned long long v8; // rbp int *v9; // rbx int *v10; // rsi long long v11; // rbp heapify(a2); v3 = ((long long)(*(_QWORD *)(a2 + 8) - *(_QWORD *)a2) >> 2) - 1; if ( v...
func0: ENDBR64 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x8 MOV R13,RDI MOV R12,RSI MOV RDI,RSI CALL 0x001012ca MOV RBX,qword ptr [R12 + 0x8] SUB RBX,qword ptr [R12] SAR RBX,0x2 SUB EBX,0x1 TEST EBX,EBX JLE 0x0010136c MOVSXD RBP,EBX SHL RBP,0x2 LAB_00101342: MOV RAX,qword ptr [R12] LEA RDX,[RAX + RBP*0x1] MOV ECX,dw...
/* func0(std::vector<int, std::allocator<int> >&) */ vector * func0(vector *param_1) { int4 uVar1; int4 *__src; int4 *puVar2; int iVar3; long lVar4; ulong uVar5; size_t __n; vector *in_RSI; heapify(in_RSI); iVar3 = (int)(*(long *)(in_RSI + 8) - *(long *)in_RSI >> 2) + -1; if (0 < iVar3) { ...
3,758
func0
#include <vector> #include <cassert> void shift_down(std::vector<int>& arr, int start, int end) { int root = start; while (root * 2 + 1 <= end) { int child = root * 2 + 1; if (child + 1 <= end && arr[child] < arr[child + 1]) { child += 1; } if (child <= e...
std::vector<int> func0(std::vector<int>& arr) { heapify(arr); int end = arr.size() - 1; while (end > 0) { std::swap(arr[end], arr[0]); shift_down(arr, 0, end - 1); end -= 1; } return arr; }
int main() { std::vector<int> vec1 = {12, 2, 4, 5, 2, 3}; std::vector<int> vec2 = {32, 14, 5, 6, 7, 19}; std::vector<int> vec3 = {21, 15, 29, 78, 65}; assert(func0(vec1) == std::vector<int>({2, 2, 3, 4, 5, 12})); assert(func0(vec2) == std::vector<int>({5, 6, 7, 14, 19, 32})); assert(func...
O2
cpp
func0(std::vector<int, std::allocator<int> >&): endbr64 push %r12 mov %rdi,%r12 mov %rsi,%rdi push %rbp mov %rsi,%rbp push %rbx callq 1730 <_Z7heapifyRSt6vectorIiSaIiEE> mov 0x0(%rbp),%rax mov 0x8(%rbp),%rbx sub %rax,%rbx mov %rbx,%rcx sar $0x2,%rcx lea -0x1(%rcx),%edx test %edx,%edx...
_Z5func0RSt6vectorIiSaIiEE: endbr64 push r15 push r14 push r13 push r12 mov r12, rdi push rbp mov rbp, rsi push rbx sub rsp, 18h mov r14, [rsi] mov rax, [rsi+8] sub rax, r14 mov r15, rax mov [rsp+48h+var_40], rax sar r15, 2 mov rdx, r15 mov [rsp+48h+var_48],...
long long func0(long long a1, long long a2) { _DWORD *v3; // r14 long long v4; // rbx unsigned int v5; // r13d int v7; // edx _DWORD *v8; // rcx _DWORD *v9; // rsi long long v10; // rbx long long result; // rax unsigned long long v12; // [rsp+0h] [rbp-48h] signed long long v13; // [rsp+8h] [rbp-40h...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 MOV R12,RDI PUSH RBP MOV RBP,RSI PUSH RBX SUB RSP,0x18 MOV R14,qword ptr [RSI] MOV RAX,qword ptr [RSI + 0x8] SUB RAX,R14 MOV R15,RAX MOV qword ptr [RSP + 0x8],RAX SAR R15,0x2 MOV RDX,R15 MOV qword ptr [RSP],R15 LEA EBX,[R15 + -0x1] SHR RDX,0x1 TEST EDX,EDX JS 0x0010177...
/* func0(std::vector<int, std::allocator<int> >&) */ vector * func0(vector *param_1) { int4 uVar1; int4 *__src; vector *pvVar2; int4 *puVar3; vector *extraout_RAX; uint uVar4; ulong uVar5; size_t __n; vector *in_RSI; int iVar6; ulong uVar7; ulong uVar8; int8 *local_48; puVar3 = *(int4 *...
3,759
func0
#include <vector> #include <cassert> void shift_down(std::vector<int>& arr, int start, int end) { int root = start; while (root * 2 + 1 <= end) { int child = root * 2 + 1; if (child + 1 <= end && arr[child] < arr[child + 1]) { child += 1; } if (child <= e...
std::vector<int> func0(std::vector<int>& arr) { heapify(arr); int end = arr.size() - 1; while (end > 0) { std::swap(arr[end], arr[0]); shift_down(arr, 0, end - 1); end -= 1; } return arr; }
int main() { std::vector<int> vec1 = {12, 2, 4, 5, 2, 3}; std::vector<int> vec2 = {32, 14, 5, 6, 7, 19}; std::vector<int> vec3 = {21, 15, 29, 78, 65}; assert(func0(vec1) == std::vector<int>({2, 2, 3, 4, 5, 12})); assert(func0(vec2) == std::vector<int>({5, 6, 7, 14, 19, 32})); assert(func...
O3
cpp
func0(std::vector<int, std::allocator<int> >&): endbr64 push %r14 push %r13 push %r12 mov %rdi,%r12 push %rbp push %rbx mov (%rsi),%rax mov %rsi,%rbx mov 0x8(%rsi),%rbp sub %rax,%rbp mov %rbp,%rsi sar $0x2,%rsi mov %rsi,%rdx lea -0x1(%rsi),%r9d shr %rdx test %edx,%edx js 18...
_Z5func0RSt6vectorIiSaIiEE: endbr64 push r14 push r13 push r12 push rbp mov rbp, rsi push rbx mov rdx, [rsi] mov rbx, rdi mov r8, [rsi+8] sub r8, rdx mov r13, r8 sar r13, 2 mov r10, r13 lea esi, [r13-1] shr r10, 1 test r10d, r10d js loc_18FC mov r11d, r...
long long func0(unsigned long long a1, long long a2) { int *v3; // rdx _DWORD *v4; // rbx signed long long v5; // r8 long long v6; // r13 long long v7; // rsi unsigned long long v8; // r10 int v9; // r11d long long v10; // r12 int v11; // r10d long long v12; // rcx int *v13; // r9 int *v14; // ...
func0: ENDBR64 PUSH R14 PUSH R13 PUSH R12 PUSH RBP MOV RBP,RSI PUSH RBX MOV RDX,qword ptr [RSI] MOV RBX,RDI MOV R8,qword ptr [RSI + 0x8] SUB R8,RDX MOV R13,R8 SAR R13,0x2 MOV R10,R13 LEA ESI,[R13 + -0x1] SHR R10,0x1 TEST R10D,R10D JS 0x001018fc MOV R11D,R10D MOV R12,R13 ADD R10D,R10D NOP LAB_00101780: MOV EDI,R10D MOVS...
/* func0(std::vector<int, std::allocator<int> >&) */ vector * func0(vector *param_1) { uint uVar1; int4 uVar2; int iVar3; int4 *__src; vector *pvVar4; uint uVar5; uint uVar6; int iVar7; int4 *puVar8; vector *extraout_RAX; long lVar9; size_t __n; uint uVar10; int iVar11; int8 *in_RSI; v...
3,760
func0
#include <cassert> #include <vector> #include <tuple>
int func0(const std::vector<std::tuple<int, int>>& num) { int count_elim = 0; for (const auto& n : num) { break; count_elim += 1; } return count_elim; }
int main() { assert(func0({ std::tuple<int, int>(10, 20), std::tuple<int, int>(30, 40) }) == 0); assert(func0({ std::tuple<int, int>(10, 20), std::tuple<int, int>(20, 30), std::tuple<int, int>(10, 20), std::tuple<int, int>(40, 50) }) == 0); assert(func0({ std::tuple<int, int>(10, 20) }) == 0); retur...
O0
cpp
func0(std::vector<std::tuple<int, int>, std::allocator<std::tuple<int, int> > > const&): endbr64 push %rbp mov %rsp,%rbp sub $0x40,%rsp mov %rdi,-0x38(%rbp) mov %fs:0x28,%rax mov %rax,-0x8(%rbp) xor %eax,%eax movl $0x0,-0x2c(%rbp) mov -0x38(%rbp),%rax mov %rax,-0x18(%rbp) mov -0x18(%rbp),...
_Z5func0RKSt6vectorISt5tupleIJiiEESaIS1_EE: endbr64 push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_38], rdi mov rax, fs:28h mov [rbp+var_8], rax xor eax, eax mov [rbp+var_2C], 0 mov rax, [rbp+var_38] mov [rbp+var_18], rax mov rax, [rbp+var_18] mov rdi, rax call _ZNKSt6...
long long func0(long long a1) { long long v2; // [rsp+18h] [rbp-28h] BYREF _QWORD v3[4]; // [rsp+20h] [rbp-20h] BYREF v3[3] = __readfsqword(0x28u); v3[1] = a1; v2 = std::vector<std::tuple<int,int>>::begin(a1); v3[0] = std::vector<std::tuple<int,int>>::end(a1); if ( (unsigned __int8)__gnu_cxx::operator!=...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x38],RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX XOR EAX,EAX MOV dword ptr [RBP + -0x2c],0x0 MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RDI,RAX CALL 0x001015e4 MOV qword pt...
/* func0(std::vector<std::tuple<int, int>, std::allocator<std::tuple<int, int> > > const&) */ int4 func0(vector *param_1) { bool bVar1; long in_FS_OFFSET; int8 local_30; int8 local_28; vector<std::tuple<int,int>,std::allocator<std::tuple<int,int>>> *local_20; int8 local_18; long local_10; local_10 ...
3,761
func0
#include <cassert> #include <vector> #include <tuple>
int func0(const std::vector<std::tuple<int, int>>& num) { int count_elim = 0; for (const auto& n : num) { break; count_elim += 1; } return count_elim; }
int main() { assert(func0({ std::tuple<int, int>(10, 20), std::tuple<int, int>(30, 40) }) == 0); assert(func0({ std::tuple<int, int>(10, 20), std::tuple<int, int>(20, 30), std::tuple<int, int>(10, 20), std::tuple<int, int>(40, 50) }) == 0); assert(func0({ std::tuple<int, int>(10, 20) }) == 0); retur...
O1
cpp
func0(std::vector<std::tuple<int, int>, std::allocator<std::tuple<int, int> > > const&): endbr64 mov $0x0,%eax retq
_Z5func0RKSt6vectorISt5tupleIJiiEESaIS1_EE: endbr64 mov eax, 0 retn
long long func0() { return 0LL; }
func0: ENDBR64 MOV EAX,0x0 RET
/* func0(std::vector<std::tuple<int, int>, std::allocator<std::tuple<int, int> > > const&) */ int8 func0(vector *param_1) { return 0; }
3,762
func0
#include <cassert> #include <vector> #include <tuple>
int func0(const std::vector<std::tuple<int, int>>& num) { int count_elim = 0; for (const auto& n : num) { break; count_elim += 1; } return count_elim; }
int main() { assert(func0({ std::tuple<int, int>(10, 20), std::tuple<int, int>(30, 40) }) == 0); assert(func0({ std::tuple<int, int>(10, 20), std::tuple<int, int>(20, 30), std::tuple<int, int>(10, 20), std::tuple<int, int>(40, 50) }) == 0); assert(func0({ std::tuple<int, int>(10, 20) }) == 0); retur...
O2
cpp
func0(std::vector<std::tuple<int, int>, std::allocator<std::tuple<int, int> > > const&): endbr64 xor %eax,%eax retq nopw 0x0(%rax,%rax,1)
_Z5func0RKSt6vectorISt5tupleIJiiEESaIS1_EE: endbr64 xor eax, eax retn
long long func0() { return 0LL; }
func0: ENDBR64 XOR EAX,EAX RET
/* func0(std::vector<std::tuple<int, int>, std::allocator<std::tuple<int, int> > > const&) */ int8 func0(vector *param_1) { return 0; }
3,763
func0
#include <cassert> #include <vector> #include <tuple>
int func0(const std::vector<std::tuple<int, int>>& num) { int count_elim = 0; for (const auto& n : num) { break; count_elim += 1; } return count_elim; }
int main() { assert(func0({ std::tuple<int, int>(10, 20), std::tuple<int, int>(30, 40) }) == 0); assert(func0({ std::tuple<int, int>(10, 20), std::tuple<int, int>(20, 30), std::tuple<int, int>(10, 20), std::tuple<int, int>(40, 50) }) == 0); assert(func0({ std::tuple<int, int>(10, 20) }) == 0); retur...
O3
cpp
func0(std::vector<std::tuple<int, int>, std::allocator<std::tuple<int, int> > > const&): endbr64 xor %eax,%eax retq nopw 0x0(%rax,%rax,1)
_Z5func0RKSt6vectorISt5tupleIJiiEESaIS1_EE: endbr64 xor eax, eax retn
long long func0() { return 0LL; }
func0: ENDBR64 XOR EAX,EAX RET
/* func0(std::vector<std::tuple<int, int>, std::allocator<std::tuple<int, int> > > const&) */ int8 func0(vector *param_1) { return 0; }
3,764
func0
#include <iostream> #include <vector> #include <algorithm> #include <assert.h>
bool func0(std::vector<int> test_vec, std::vector<int> check_list) { bool res = false; for (int ele : check_list) { if (std::find(test_vec.begin(), test_vec.end(), ele) != test_vec.end()) { res = true; break; } } return res; }
int main() { assert(func0({4, 5, 7, 9, 3}, {6, 7, 10, 11}) == true); assert(func0({1, 2, 3, 4}, {4, 6, 7, 8, 9}) == true); assert(func0({3, 2, 1, 4, 5}, {9, 8, 7, 6}) == false); return 0; }
O0
cpp
func0(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >): 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 movb $0x0,-0x45(%rbp) mov -0x60(%rbp),%rax mov %...
_Z5func0St6vectorIiSaIiEES1_: 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 [rbp+var_45], 0 mov rax, [rbp+var_60] mov [rbp+var_20], rax mov rax, [rbp+var_20] mov ...
long long func0(long long a1, long long a2) { long long v2; // rbx long long v3; // rax unsigned __int8 v5; // [rsp+1Bh] [rbp-45h] int v6; // [rsp+1Ch] [rbp-44h] BYREF long long v7; // [rsp+20h] [rbp-40h] BYREF long long v8; // [rsp+28h] [rbp-38h] BYREF long long v9; // [rsp+30h] [rbp-30h] BYREF _QWORD...
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 byte ptr [RBP + -0x45],0x0 MOV RAX,qword ptr [RBP + -0x60] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20]...
/* func0(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >) */ int func0(vector param_1,vector param_2) { bool bVar1; int4 *puVar2; int8 uVar3; int8 uVar4; int4 in_register_00000034; int4 in_register_0000003c; vector<int,std::allocator<int>> *this; long in_FS_OFFSET; int...
3,765
func0
#include <iostream> #include <vector> #include <algorithm> #include <assert.h>
bool func0(std::vector<int> test_vec, std::vector<int> check_list) { bool res = false; for (int ele : check_list) { if (std::find(test_vec.begin(), test_vec.end(), ele) != test_vec.end()) { res = true; break; } } return res; }
int main() { assert(func0({4, 5, 7, 9, 3}, {6, 7, 10, 11}) == true); assert(func0({1, 2, 3, 4}, {4, 6, 7, 8, 9}) == true); assert(func0({3, 2, 1, 4, 5}, {9, 8, 7, 6}) == false); return 0; }
O1
cpp
func0(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >): endbr64 mov %rsi,%rax mov (%rsi),%rsi mov 0x8(%rax),%r9 cmp %r9,%rsi jne 1278 <_Z5func0St6vectorIiSaIiEES1_+0x2f> mov $0x0,%eax retq add $0x4,%rax cmp %r8,%rax jne 12f9 <_Z5func0St6vectorIiSaIiEES1_+0xb0> a...
_Z5func0St6vectorIiSaIiEES1_: endbr64 mov rax, rsi mov rsi, [rsi] mov r9, [rax+8] cmp r9, rsi jz loc_12BF mov r8, [rdi+8] mov rdi, [rdi] mov rcx, r8 sub rcx, rdi mov r10, rcx sar r10, 4 and rcx, 0FFFFFFFFFFFFFFF0h add rcx, rdi jmp short loc_124F loc_123D: add ...
long long func0(char **a1, int **a2) { int *v3; // rsi int *v4; // r9 char *v5; // r8 char *v6; // rdi char *v7; // rax int v8; // edx signed long long v9; // r11 v3 = *a2; v4 = a2[1]; if ( v4 == v3 ) return 0LL; v5 = a1[1]; v6 = *a1; while ( 1 ) { v8 = *v3; if ( (v5 - v6) >> 4...
func0: ENDBR64 MOV RAX,RSI MOV RSI,qword ptr [RSI] MOV R9,qword ptr [RAX + 0x8] CMP R9,RSI JZ 0x001012bf MOV R8,qword ptr [RDI + 0x8] MOV RDI,qword ptr [RDI] MOV RCX,R8 SUB RCX,RDI MOV R10,RCX SAR R10,0x4 AND RCX,-0x10 ADD RCX,RDI JMP 0x0010124f LAB_0010123d: ADD RAX,0x4 LAB_00101241: CMP RAX,R8 JNZ 0x001012c5 LAB_0010...
/* func0(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >) */ int8 func0(vector param_1,vector param_2) { int iVar1; int *piVar2; int *piVar3; int *piVar4; int *piVar5; int *piVar6; int *piVar7; int4 in_register_00000034; int *piVar8; int4 in_register_0000003c; long...
3,766
func0
#include <iostream> #include <vector> #include <algorithm> #include <assert.h>
bool func0(std::vector<int> test_vec, std::vector<int> check_list) { bool res = false; for (int ele : check_list) { if (std::find(test_vec.begin(), test_vec.end(), ele) != test_vec.end()) { res = true; break; } } return res; }
int main() { assert(func0({4, 5, 7, 9, 3}, {6, 7, 10, 11}) == true); assert(func0({1, 2, 3, 4}, {4, 6, 7, 8, 9}) == true); assert(func0({3, 2, 1, 4, 5}, {9, 8, 7, 6}) == false); return 0; }
O2
cpp
func0(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >): endbr64 mov (%rsi),%rcx mov 0x8(%rsi),%r10 cmp %r10,%rcx je 15e3 <_Z5func0St6vectorIiSaIiEES1_+0x73> mov 0x8(%rdi),%r8 mov (%rdi),%r9 mov %r8,%rdi sub %r9,%rdi mov %rdi,%r11 sar $0x4,%rdi sar $0x2,%r...
_Z5func0St6vectorIiSaIiEES1_: endbr64 mov rax, rsi mov rsi, [rsi] mov r9, [rax+8] cmp r9, rsi jz loc_1560 push rbx mov r8, [rdi+8] mov rdi, [rdi] mov rcx, r8 sub rcx, rdi mov rbx, rcx mov r10, rcx and rcx, 0FFFFFFFFFFFFFFF0h sar rbx, 2 sar r10, 4 add rcx, ...
long long func0(char **a1, int **a2) { int *v3; // rsi int *v4; // r9 char *v5; // r8 char *v6; // rdi int v7; // edx char *v8; // rax long long v10; // r11 v3 = *a2; v4 = a2[1]; if ( v4 != v3 ) { v5 = a1[1]; v6 = *a1; while ( 1 ) { v7 = *v3; if ( (v5 - v6) >> 4 <= 0 ...
func0: ENDBR64 MOV RAX,RSI MOV RSI,qword ptr [RSI] MOV R9,qword ptr [RAX + 0x8] CMP R9,RSI JZ 0x00101560 PUSH RBX MOV R8,qword ptr [RDI + 0x8] MOV RDI,qword ptr [RDI] MOV RCX,R8 SUB RCX,RDI MOV RBX,RCX MOV R10,RCX AND RCX,-0x10 SAR RBX,0x2 SAR R10,0x4 ADD RCX,RDI NOP word ptr [RAX + RAX*0x1] LAB_001014b0: MOV EDX,dword...
/* func0(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >) */ int8 func0(vector param_1,vector param_2) { int iVar1; int *piVar2; int *piVar3; int *piVar4; ulong uVar5; int *piVar6; ulong uVar7; int4 in_register_00000034; int *piVar8; int4 in_register_0000003c; long...
3,767
func0
#include <iostream> #include <vector> #include <algorithm> #include <assert.h>
bool func0(std::vector<int> test_vec, std::vector<int> check_list) { bool res = false; for (int ele : check_list) { if (std::find(test_vec.begin(), test_vec.end(), ele) != test_vec.end()) { res = true; break; } } return res; }
int main() { assert(func0({4, 5, 7, 9, 3}, {6, 7, 10, 11}) == true); assert(func0({1, 2, 3, 4}, {4, 6, 7, 8, 9}) == true); assert(func0({3, 2, 1, 4, 5}, {9, 8, 7, 6}) == false); return 0; }
O3
cpp
func0(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >): endbr64 mov (%rsi),%rcx mov 0x8(%rsi),%r10 cmp %r10,%rcx je 1583 <_Z5func0St6vectorIiSaIiEES1_+0x73> mov 0x8(%rdi),%r8 mov (%rdi),%r9 mov %r8,%rdi sub %r9,%rdi mov %rdi,%r11 sar $0x4,%rdi sar $0x2,%r...
_Z5func0St6vectorIiSaIiEES1_: endbr64 mov rax, rsi mov rsi, [rsi] mov r9, [rax+8] cmp r9, rsi jz loc_1560 push rbx mov r8, [rdi+8] mov rdi, [rdi] mov rcx, r8 sub rcx, rdi mov rbx, rcx mov r10, rcx and rcx, 0FFFFFFFFFFFFFFF0h sar rbx, 2 sar r10, 4 add rcx, ...
long long func0(char **a1, int **a2) { int *v3; // rsi int *v4; // r9 char *v5; // r8 char *v6; // rdi int v7; // edx char *v8; // rax long long v10; // r11 v3 = *a2; v4 = a2[1]; if ( v4 != v3 ) { v5 = a1[1]; v6 = *a1; while ( 1 ) { v7 = *v3; if ( (v5 - v6) >> 4 <= 0 ...
func0: ENDBR64 MOV RAX,RSI MOV RSI,qword ptr [RSI] MOV R9,qword ptr [RAX + 0x8] CMP R9,RSI JZ 0x00101560 PUSH RBX MOV R8,qword ptr [RDI + 0x8] MOV RDI,qword ptr [RDI] MOV RCX,R8 SUB RCX,RDI MOV RBX,RCX MOV R10,RCX AND RCX,-0x10 SAR RBX,0x2 SAR R10,0x4 ADD RCX,RDI NOP word ptr [RAX + RAX*0x1] LAB_001014b0: MOV EDX,dword...
/* func0(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >) */ int8 func0(vector param_1,vector param_2) { int iVar1; int *piVar2; int *piVar3; int *piVar4; ulong uVar5; int *piVar6; ulong uVar7; int4 in_register_00000034; int *piVar8; int4 in_register_0000003c; long...
3,768
func0
#include <vector> #include <algorithm> #include <assert.h>
std::vector<int> func0(std::vector<int> num1, std::vector<int> num2) { std::vector<int> combined; combined.reserve(num1.size() + num2.size()); // reserve memory for the total size of both vectors combined.insert(combined.end(), num1.begin(), num1.end()); // insert elements from num1 combined.insert(...
int main() { assert((func0({1, 3, 5, 7, 9, 11}, {0, 2, 4, 6, 8, 10}) == std::vector<int>{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11})); assert((func0({1, 3, 5, 6, 8, 9}, {2, 5, 7, 11}) == std::vector<int>{1, 2, 3, 5, 5, 6, 7, 8, 9, 11})); assert((func0({1, 3, 7}, {2, 4, 6}) == std::vector<int>{1, 2, 3, 4, 6, 7...
O0
cpp
func0(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >): endbr64 push %rbp mov %rsp,%rbp push %r12 push %rbx sub $0x40,%rsp mov %rdi,-0x38(%rbp) mov %rsi,-0x40(%rbp) mov %rdx,-0x48(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax mov -0x38(%rbp),%...
_Z5func0St6vectorIiSaIiEES1_: endbr64 push rbp mov rbp, rsp push r12 push rbx sub rsp, 40h mov [rbp+var_38], rdi mov [rbp+var_40], rsi mov [rbp+var_48], rdx mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax mov rax, [rbp+var_38] mov rdi, rax call _ZNSt6vectorIiSaIiEE...
long long func0(long long a1, long long a2, long long a3) { long long v3; // rbx long long v4; // rax long long v5; // r12 long long v6; // rbx long long v7; // r12 long long v8; // rbx long long v9; // rbx long long v10; // rax long long v13; // [rsp+28h] [rbp-28h] BYREF _QWORD v14[4]; // [rsp+30h...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R12 PUSH RBX SUB RSP,0x40 MOV qword ptr [RBP + -0x38],RDI MOV qword ptr [RBP + -0x40],RSI MOV qword ptr [RBP + -0x48],RDX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX MOV RAX,qword ptr [RBP + -0x38] MOV RDI,RAX CALL 0x00101e84 MOV RAX,qword ptr [RBP + ...
/* func0(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >) */ vector<int,std::allocator<int>> * func0(vector param_1,vector param_2) { long lVar1; long lVar2; int8 uVar3; int8 uVar4; vector<int,std::allocator<int>> *in_RDX; int4 in_register_00000034; vector<int,std::allocat...
3,769
func0
#include <vector> #include <algorithm> #include <assert.h>
std::vector<int> func0(std::vector<int> num1, std::vector<int> num2) { std::vector<int> combined; combined.reserve(num1.size() + num2.size()); // reserve memory for the total size of both vectors combined.insert(combined.end(), num1.begin(), num1.end()); // insert elements from num1 combined.insert(...
int main() { assert((func0({1, 3, 5, 7, 9, 11}, {0, 2, 4, 6, 8, 10}) == std::vector<int>{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11})); assert((func0({1, 3, 5, 6, 8, 9}, {2, 5, 7, 11}) == std::vector<int>{1, 2, 3, 5, 5, 6, 7, 8, 9, 11})); assert((func0({1, 3, 7}, {2, 4, 6}) == std::vector<int>{1, 2, 3, 4, 6, 7...
O1
cpp
func0(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >): endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x8,%rsp mov %rdi,%rbx mov %rdx,%rbp movq $0x0,(%rdi) movq $0x0,0x8(%rdi) movq $0x0,0x10(%rdi) mov 0x8(%rdx),%rax sub (%rdx),%r...
_Z5func0St6vectorIiSaIiEES1_: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 8 mov rbx, rdi mov rbp, rdx mov qword ptr [rdi], 0 mov qword ptr [rdi+8], 0 mov qword ptr [rdi+10h], 0 mov rax, [rdx+8] sub rax, [rdx] sar rax, 2 mov rdx, [rsi+8...
char ** func0(char **a1, _QWORD *a2, _QWORD *a3) { unsigned long long v5; // rax long long v7; // r13 char *v8; // rax char *v9; // r14 char *v10; // r15 unsigned long long v11; // rsi char *v12; // r13 char *v13; // rbp int v14; // eax unsigned long long v15; // rax char *v16; // rdi char *v17;...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x8 MOV RBX,RDI MOV RBP,RDX MOV qword ptr [RDI],0x0 MOV qword ptr [RDI + 0x8],0x0 MOV qword ptr [RDI + 0x10],0x0 MOV RAX,qword ptr [RDX + 0x8] SUB RAX,qword ptr [RDX] SAR RAX,0x2 MOV RDX,qword ptr [RSI + 0x8] SUB RDX,qword ptr [RSI] SAR RDX,0x...
/* func0(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >) */ vector<int,std::allocator<int>> * func0(vector param_1,vector param_2) { int iVar1; int iVar2; void *__src; int *piVar3; long lVar4; int *piVar5; int *piVar6; int *piVar7; uint uVar8; ulong uVar9; void *_...
3,770
func0
#include <vector> #include <algorithm> #include <assert.h>
std::vector<int> func0(std::vector<int> num1, std::vector<int> num2) { std::vector<int> combined; combined.reserve(num1.size() + num2.size()); // reserve memory for the total size of both vectors combined.insert(combined.end(), num1.begin(), num1.end()); // insert elements from num1 combined.insert(...
int main() { assert((func0({1, 3, 5, 7, 9, 11}, {0, 2, 4, 6, 8, 10}) == std::vector<int>{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11})); assert((func0({1, 3, 5, 6, 8, 9}, {2, 5, 7, 11}) == std::vector<int>{1, 2, 3, 5, 5, 6, 7, 8, 9, 11})); assert((func0({1, 3, 7}, {2, 4, 6}) == std::vector<int>{1, 2, 3, 4, 6, 7...
O2
cpp
func0(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >): endbr64 push %r15 push %r14 push %r13 push %r12 mov %rdi,%r12 push %rbp push %rbx mov %rdx,%rbx sub $0x8,%rsp movq $0x0,(%rdi) movq $0x0,0x8(%rdi) movq $0x0,0x10(%rdi) mov 0x8(%rdx),%rax mov 0x8(%rsi)...
_Z5func0St6vectorIiSaIiEES1_: endbr64 push r15 pxor xmm0, xmm0 push r14 push r13 push r12 mov r12, rsi push rbp mov rbp, rdi push rbx mov rbx, rdx sub rsp, 18h movups xmmword ptr [rdi], xmm0 mov rcx, [rsi+8] mov rsi, [rsi] mov rax, [rdx+8] sub rax, [rdx] mov qwo...
char ** func0(char **a1, long long *a2, _QWORD *a3) { long long v5; // rcx long long v6; // rsi long long v7; // rax unsigned long long v8; // rax char *v9; // r14 char *v10; // r13 char *v11; // r12 long long v12; // rdx unsigned long long v13; // rax char *v14; // rbx int v15; // ecx int v16; ...
func0: MOV RDI,RBP CALL 0x00102050 MOV RDI,RBX LAB_0010116b: CALL 0x00101150
/* func0(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >) [clone .cold] */ void func0(vector param_1,vector param_2) { vector<int,std::allocator<int>> *unaff_RBP; std::vector<int,std::allocator<int>>::~vector(unaff_RBP); /* WARNING: Subroutine does not retu...
3,771
func0
#include <vector> #include <algorithm> #include <assert.h>
std::vector<int> func0(std::vector<int> num1, std::vector<int> num2) { std::vector<int> combined; combined.reserve(num1.size() + num2.size()); // reserve memory for the total size of both vectors combined.insert(combined.end(), num1.begin(), num1.end()); // insert elements from num1 combined.insert(...
int main() { assert((func0({1, 3, 5, 7, 9, 11}, {0, 2, 4, 6, 8, 10}) == std::vector<int>{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11})); assert((func0({1, 3, 5, 6, 8, 9}, {2, 5, 7, 11}) == std::vector<int>{1, 2, 3, 5, 5, 6, 7, 8, 9, 11})); assert((func0({1, 3, 7}, {2, 4, 6}) == std::vector<int>{1, 2, 3, 4, 6, 7...
O3
cpp
func0(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >): endbr64 push %r15 pxor %xmm0,%xmm0 push %r14 push %r13 push %r12 mov %rdi,%r12 push %rbp push %rbx mov %rdx,%rbx sub $0x8,%rsp movq $0x0,0x10(%rdi) movups %xmm0,(%rdi) mov 0x8(%rdx),%rax mov 0x8(%rsi),%...
_Z5func0St6vectorIiSaIiEES1_: endbr64 push r15 pxor xmm0, xmm0 push r14 push r13 push r12 mov r12, rsi push rbp mov rbp, rdx push rbx mov rbx, rdi sub rsp, 18h movups xmmword ptr [rdi], xmm0 mov rcx, [rsi+8] mov rsi, [rsi] mov rax, [rdx+8] sub rax, [rdx] mov qwo...
char ** func0(char **a1, long long *a2, _QWORD *a3) { long long v5; // rcx long long v6; // rsi long long v7; // rax unsigned long long v8; // rax char *v9; // r14 char *v10; // r15 char *v11; // r12 char *v12; // rbp unsigned long long v13; // rdx char *v14; // r14 int v15; // r13d char *v16; /...
func0: MOV RDI,RBX CALL 0x00102080 MOV RDI,RBP LAB_0010116b: CALL 0x00101150
/* func0(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >) [clone .cold] */ void func0(vector param_1,vector param_2) { vector<int,std::allocator<int>> *unaff_RBX; std::vector<int,std::allocator<int>>::~vector(unaff_RBX); /* WARNING: Subroutine does not retu...
3,772
func0
#include <iostream> #include <regex> #include <assert.h>
int func0(std::string text) { std::regex digits("\\d+"); std::smatch match; if (std::regex_search(text, match, digits)) { return match.position(); } return -1; // Return -1 if no digits found }
int main() { assert(func0("there are 70 flats in this apartment") == 10); assert(func0("every adult have 32 teeth") == 17); assert(func0("isha has 79 chocolates in her bag") == 9); return 0; }
O0
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x68,%rsp mov %rdi,-0x68(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax lea -0x60(%rbp),%rax mov $0x10,%edx lea 0x2b3f0(%rip),%rsi mov %rax...
_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 68h mov [rbp+var_68], rdi mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax lea rax, [rbp+var_60] mov edx, 10h lea rcx, aD; "\\d+" mov rsi, rcx mov rdi, rax ca...
long long func0(long long a1) { unsigned int v1; // ebx _BYTE v3[32]; // [rsp+10h] [rbp-60h] BYREF _BYTE v4[40]; // [rsp+30h] [rbp-40h] BYREF unsigned long long v5; // [rsp+58h] [rbp-18h] v5 = __readfsqword(0x28u); std::basic_regex<char,std::regex_traits<char>>::basic_regex(v3, "\\d+", 16LL); std::match...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x68 MOV qword ptr [RBP + -0x68],RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX LEA RAX,[RBP + -0x60] MOV EDX,0x10 LEA RCX,[0x132051] MOV RSI,RCX MOV RDI,RAX LAB_00104b3f: CALL 0x001060cc LEA RAX,[RBP + -0x40] MOV RDI,RAX CALL 0x0010619e ...
/* func0(std::string) */ int4 func0(string *param_1) { bool bVar1; int4 uVar2; long in_FS_OFFSET; regex local_68 [32]; match_results<__normal_iterator<char_const*,std::string>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::string>>>> local_48 [40]; long local_20; local_20 = *(long...
3,773
func0
#include <iostream> #include <regex> #include <assert.h>
int func0(std::string text) { std::regex digits("\\d+"); std::smatch match; if (std::regex_search(text, match, digits)) { return match.position(); } return -1; // Return -1 if no digits found }
int main() { assert(func0("there are 70 flats in this apartment") == 10); assert(func0("every adult have 32 teeth") == 17); assert(func0("isha has 79 chocolates in her bag") == 9); return 0; }
O1
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >): endbr64 push %r12 push %rbp push %rbx sub $0x1e0,%rsp mov %rdi,%rbx mov %fs:0x28,%rax mov %rax,0x1d8(%rsp) xor %eax,%eax lea 0x20(%rsp),%r12 mov %r12,%rdi callq 4730 <_ZNSt6localeC1Ev@plt> movl $0x10,(%...
_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push rbp mov rbp, rsp push r14 push rbx sub rsp, 1E0h mov rbx, rdi mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax lea rax, [rbp+var_1E8] mov r14, rax mov rdi, rax; this call __ZNSt6localeC1Ev; std::...
long long func0(_QWORD *a1) { char *v2; // rsi long long v3; // rdx long long v4; // rax long long v5; // rcx signed __int32 *v6; // rdi volatile signed __int32 *v7; // rcx long long v8; // rdx signed __int32 v9; // eax long long v10; // rsi _QWORD *v12; // rax unsigned int v13; // r14d _DWORD ...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0x1e0 MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX LEA RAX,[RBP + -0x1e8] MOV R14,RAX MOV RDI,RAX CALL 0x001046f0 MOV qword ptr [RBP + -0x1e0],0x0 MOV qword ptr [RBP + -0x1d8],0x0 LEA RDI,[RBP + -0x1b0] MOV R8D,0x10 MOV...
/* func0(std::string) */ int func0(int8 *param_1) { _Sp_counted_base<(_Lock_policy)2> *p_Var1; _Sp_counted_base<(_Lock_policy)2> *p_Var2; bool bVar3; int iVar4; int iVar5; int8 *puVar6; long in_FS_OFFSET; int4 local_1f8 [2]; locale local_1f0 [2]; int8 local_1e8; _Sp_counted_base<(_Lock_policy)2>...
3,774
func0
#include <iostream> #include <regex> #include <assert.h>
int func0(std::string text) { std::regex digits("\\d+"); std::smatch match; if (std::regex_search(text, match, digits)) { return match.position(); } return -1; // Return -1 if no digits found }
int main() { assert(func0("there are 70 flats in this apartment") == 10); assert(func0("every adult have 32 teeth") == 17); assert(func0("isha has 79 chocolates in her bag") == 9); return 0; }
O2
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >): endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx mov %rdi,%rbx sub $0x1e8,%rsp mov %fs:0x28,%rax mov %rax,0x1d8(%rsp) xor %eax,%eax lea 0x20(%rsp),%r12 lea 0x8(%rsp),%r13 mov %r...
_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push rbp mov rbp, rsp push r14 push r12 lea r12, [rbp+var_1F8] push rbx mov rbx, rdi mov rdi, r12; this sub rsp, 1E8h mov rax, fs:28h mov [rbp+var_28], rax xor eax, eax call __ZNSt6localeC1Ev; std::local...
long long func0(long long *a1) { char *v2; // rsi __m128i v3; // xmm0 long long v4; // rax signed __int32 *v5; // rdi long long v6; // rdx volatile signed __int32 *v7; // rcx signed __int32 v8; // eax long long v9; // rdi long long v10; // rdx volatile signed __int32 *v11; // rcx signed __int32 v...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R14 PUSH R12 LEA R12,[RBP + -0x1f8] PUSH RBX MOV RBX,RDI MOV RDI,R12 SUB RSP,0x1e8 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x28],RAX XOR EAX,EAX CALL 0x001036d0 LEA RDX,[0x1186ca] PXOR XMM0,XMM0 LEA RDI,[RBP + -0x1c0] MOV R8D,0x10 MOV RCX,R12 LEA RSI,[RDX + -0x3] MOVAP...
/* func0(std::string) */ int func0(int8 *param_1) { _Sp_counted_base<(_Lock_policy)2> *p_Var1; int8 uVar2; int8 uVar3; bool bVar4; int iVar5; int iVar6; int8 *puVar7; long in_FS_OFFSET; int4 local_208 [2]; locale local_200 [2]; int local_1f8 [16]; int local_1e8 [16]; int local_1d8 [16]; _C...
3,775
func0
#include <iostream> #include <regex> #include <assert.h>
int func0(std::string text) { std::regex digits("\\d+"); std::smatch match; if (std::regex_search(text, match, digits)) { return match.position(); } return -1; // Return -1 if no digits found }
int main() { assert(func0("there are 70 flats in this apartment") == 10); assert(func0("every adult have 32 teeth") == 17); assert(func0("isha has 79 chocolates in her bag") == 9); return 0; }
O3
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >): endbr64 push %r14 push %r13 push %r12 push %rbp mov %rdi,%rbp push %rbx sub $0x1e0,%rsp mov %fs:0x28,%rax mov %rax,0x1d8(%rsp) xor %eax,%eax lea 0x20(%rsp),%r12 lea 0x8(%rsp),%r13 mov %r12,%rdi call...
_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push rbp mov rbp, rsp push r14 push r13 lea r13, [rbp+var_1F8] push r12 mov r12, rdi mov rdi, r13; this push rbx sub rsp, 1E0h mov rax, fs:28h mov [rbp+var_28], rax xor eax, eax call __ZNSt6localeC1Ev...
long long func0(long long *a1) { __m128i v2; // xmm0 long long v3; // rdi void *v4; // rdi void **v5; // rbx unsigned long long v6; // r14 void *v7; // rdi long long v8; // rdi long long v9; // rsi _QWORD *v10; // rax unsigned int v11; // ebx int v13; // [rsp+0h] [rbp-200h] BYREF char v14[8]; /...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R14 PUSH R13 LEA R13,[RBP + -0x1f8] PUSH R12 MOV R12,RDI MOV RDI,R13 PUSH RBX SUB RSP,0x1e0 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x28],RAX XOR EAX,EAX CALL 0x00104710 LEA RDX,[0x11a70f] PXOR XMM0,XMM0 LEA RDI,[RBP + -0x1c0] MOV R8D,0x10 MOV RCX,R13 LEA RSI,[RDX + -0...
/* func0(std::string) */ int func0(int8 *param_1) { int8 this; int auVar1 [16]; bool bVar2; int8 *puVar3; int iVar4; long in_FS_OFFSET; int4 local_208 [2]; locale local_200 [2]; int local_1f8 [16]; int local_1e8 [16]; int local_1d8 [16]; _Compiler<std::regex_traits<char>> local_1c8 [208]; lo...
3,776
func0
#include <cassert> #include <set> #include <string> #include <initializer_list>
std::set<std::string> func0(std::initializer_list<std::string> t) { return std::set<std::string>(t.begin(), t.end()); }
int main() { assert(func0({"x", "y", "z"}) == std::set<std::string>({"y", "x", "z"})); assert(func0({"a", "b", "c"}) == std::set<std::string>({"c", "a", "b"})); assert(func0({"z", "d", "e"}) == std::set<std::string>({"d", "e", "z"})); return 0; }
O0
cpp
func0(std::initializer_list<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x28,%rsp mov %rdi,-0x18(%rbp) mov %rdx,%rcx mov %rsi,%rax mov %rdi,%rdx mov %rcx,%rdx mov %rax,-0x30(%rbp) mov %rdx,-0x28(%rbp) l...
_Z5func0St16initializer_listINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 28h mov [rbp+var_18], rdi mov rcx, rdx mov rax, rsi mov rdx, rdi mov rdx, rcx mov [rbp+var_30], rax mov [rbp+var_28], rdx lea rax, [rbp+var_30...
long long func0(long long a1, long long a2, long long a3) { long long v3; // rbx long long v4; // rax _QWORD v6[3]; // [rsp+0h] [rbp-30h] BYREF long long v7; // [rsp+18h] [rbp-18h] v7 = a1; v6[0] = a2; v6[1] = a3; v3 = std::initializer_list<std::string>::end(v6); v4 = std::initializer_list<std::stri...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x28 MOV qword ptr [RBP + -0x18],RDI MOV RCX,RDX MOV RAX,RSI MOV RDX,RDI MOV RDX,RCX MOV qword ptr [RBP + -0x30],RAX MOV qword ptr [RBP + -0x28],RDX LEA RAX,[RBP + -0x30] MOV RDI,RAX CALL 0x00103434 MOV RBX,RAX LEA RAX,[RBP + -0x30] MOV RDI,RAX CALL 0x0010341e MOV RC...
/* func0(std::initializer_list<std::string >) */ set<std::string,std::less<std::string>,std::allocator<std::string>> * func0(initializer_list param_1) { string *psVar1; string *psVar2; int4 in_register_0000003c; initializer_list<std::string> local_38 [24]; set<std::string,std::less<std::string>,std::allocat...
3,777
func0
#include <cassert> #include <set> #include <string> #include <initializer_list>
std::set<std::string> func0(std::initializer_list<std::string> t) { return std::set<std::string>(t.begin(), t.end()); }
int main() { assert(func0({"x", "y", "z"}) == std::set<std::string>({"y", "x", "z"})); assert(func0({"a", "b", "c"}) == std::set<std::string>({"c", "a", "b"})); assert(func0({"z", "d", "e"}) == std::set<std::string>({"d", "e", "z"})); return 0; }
O1
cpp
func0(std::initializer_list<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >): endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x18,%rsp mov %rdi,%rbx mov %fs:0x28,%rax mov %rax,0x8(%rsp) xor %eax,%eax shl $0x5,%rdx lea (%rsi,%rd...
_Z5func0St16initializer_listINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE: endbr64 push r14 push r13 push r12 push rbp push rbx sub rsp, 10h mov rbp, rdi mov rax, fs:28h mov [rsp+38h+var_30], rax xor eax, eax shl rdx, 5 lea r12, [rsi+rdx] mov dword ptr [rdi+8], 0 ...
long long func0(long long a1, long long a2, long long a3) { long long v3; // rdx long long v4; // r12 long long v5; // rbx _QWORD v7[7]; // [rsp+0h] [rbp-38h] BYREF v7[1] = __readfsqword(0x28u); v3 = 32 * a3; v4 = a2 + v3; *(_DWORD *)(a1 + 8) = 0; *(_QWORD *)(a1 + 16) = 0LL; *(_QWORD *)(a1 + 24) =...
func0: ENDBR64 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x10 MOV RBP,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x8],RAX XOR EAX,EAX SHL RDX,0x5 LEA R12,[RSI + RDX*0x1] MOV dword ptr [RDI + 0x8],0x0 MOV qword ptr [RDI + 0x10],0x0 LEA R13,[RDI + 0x8] MOV qword ptr [RDI + 0x18],R13 MOV qword ptr [RD...
/* func0(std::initializer_list<std::string >) */ long func0(initializer_list param_1) { string *psVar1; _Alloc_node *p_Var2; long lVar3; long in_RDX; _Alloc_node *in_RSI; int4 in_register_0000003c; long lVar4; long in_FS_OFFSET; lVar4 = CONCAT44(in_register_0000003c,param_1); lVar3 = *(long *)(...
3,778
func0
#include <cassert> #include <set> #include <string> #include <initializer_list>
std::set<std::string> func0(std::initializer_list<std::string> t) { return std::set<std::string>(t.begin(), t.end()); }
int main() { assert(func0({"x", "y", "z"}) == std::set<std::string>({"y", "x", "z"})); assert(func0({"a", "b", "c"}) == std::set<std::string>({"c", "a", "b"})); assert(func0({"z", "d", "e"}) == std::set<std::string>({"d", "e", "z"})); return 0; }
O2
cpp
func0(std::initializer_list<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >): endbr64 push %r14 shl $0x5,%rdx push %r13 lea 0x8(%rdi),%r13 push %r12 mov %rdi,%r12 push %rbp lea (%rsi,%rdx,1),%rbp push %rbx sub $0x10,%rsp mov %fs:0x28,%rax mov %rax,0x8(%rs...
_Z5func0St16initializer_listINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE: endbr64 push rbp lea rax, [rdi+8] shl rdx, 5 push rbx add rdx, rsi mov rbx, rdi sub rsp, 8 mov dword ptr [rdi+8], 0 mov qword ptr [rdi+10h], 0 mov [rdi+18h], rax mov [rdi+20h], rax mov qword...
long long func0(long long a1, long long a2, long long a3) { *(_DWORD *)(a1 + 8) = 0; *(_QWORD *)(a1 + 16) = 0LL; *(_QWORD *)(a1 + 24) = a1 + 8; *(_QWORD *)(a1 + 32) = a1 + 8; *(_QWORD *)(a1 + 40) = 0LL; std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<...
func0: ENDBR64 PUSH RBP LEA RAX,[RDI + 0x8] SHL RDX,0x5 PUSH RBX ADD RDX,RSI MOV RBX,RDI SUB RSP,0x8 MOV dword ptr [RDI + 0x8],0x0 MOV qword ptr [RDI + 0x10],0x0 MOV qword ptr [RDI + 0x18],RAX MOV qword ptr [RDI + 0x20],RAX MOV qword ptr [RDI + 0x28],0x0 LAB_00101ca7: CALL 0x00102150 ADD RSP,0x8 MOV RAX,RBX POP RBX POP...
/* func0(std::initializer_list<std::string >) */ int8 func0(initializer_list param_1) { long lVar1; long in_RDX; string *in_RSI; int4 in_register_0000003c; lVar1 = CONCAT44(in_register_0000003c,param_1) + 8; *(int4 *)(CONCAT44(in_register_0000003c,param_1) + 8) = 0; *(int8 *)(CONCAT44(in_register_000...
3,779
func0
#include <cassert> #include <set> #include <string> #include <initializer_list>
std::set<std::string> func0(std::initializer_list<std::string> t) { return std::set<std::string>(t.begin(), t.end()); }
int main() { assert(func0({"x", "y", "z"}) == std::set<std::string>({"y", "x", "z"})); assert(func0({"a", "b", "c"}) == std::set<std::string>({"c", "a", "b"})); assert(func0({"z", "d", "e"}) == std::set<std::string>({"d", "e", "z"})); return 0; }
O3
cpp
func0(std::initializer_list<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >): endbr64 push %r12 shl $0x5,%rdx mov %rdi,%r12 add %rsi,%rdx callq 1f00 <_ZNSt3setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIS5_ESaIS5_EEC1IPKS5_EET_SD_> mov %r12,%rax pop %...
_Z5func0St16initializer_listINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE: endbr64 push rbx shl rdx, 5 mov rbx, rdi add rdx, rsi call _ZNSt3setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIS5_ESaIS5_EEC2IPKS5_EET_SD_; std::set<std::string>::set<std::string const*>(std::string c...
long long func0(long long a1, long long a2, long long a3) { std::set<std::string>::set<std::string const*>(a1, a2, a2 + 32 * a3); return a1; }
func0: ENDBR64 PUSH RBX SHL RDX,0x5 MOV RBX,RDI ADD RDX,RSI CALL 0x001024e0 MOV RAX,RBX POP RBX RET
/* func0(std::initializer_list<std::string >) */ int8 func0(initializer_list param_1) { long in_RDX; string *in_RSI; int4 in_register_0000003c; std::set<std::string,std::less<std::string>,std::allocator<std::string>>::set<std::string_const*> ((set<std::string,std::less<std::string>,std::allocat...
3,780
func0
#include <cassert> #include <vector> #include <string> #include <unordered_map> #include <algorithm> #include <utility> using namespace std;
vector<pair<char, int>> func0(const string &s, int a) { // Map to store frequency and first occurrence index unordered_map<char, pair<int, int>> freq; // key: character, value: {count, first_index} for (int i = 0; i < s.size(); ++i) { char c = s[i]; if (freq.find(c) == freq.end()) { ...
int main(){ { vector<pair<char, int>> expected = {{'s', 4}, {'e', 3}, {'f', 3}}; assert(func0("lkseropewdssafsdfafkpwe", 3) == expected); } { vector<pair<char, int>> expected = {{'s', 4}, {'e', 3}}; assert(func0("lkseropewdssafsdfafkpwe", 2) == expected); } {...
O0
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)::{lambda(std::tuple<char, int, int> const&, std::tuple<char, int, int> const&)#1}::operator()(std::tuple<char, int, int> const&, std::tuple<char, int, int> const&) const: push %rbp mov %rsp,%rbp sub $0x30,%rsp mov...
_ZZ5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiENKUlRKSt5tupleIJciiEESA_E_clESA_SA_: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_18], rdi mov [rbp+var_20], rsi mov [rbp+var_28], rdx mov rax, [rbp+var_20] mov rdi, rax call _ZSt3getILm1EJciiEERKNSt13tuple_elementIXT_...
bool func0(std::string const&,int)::{lambda(std::tuple<char,int,int> const&,std::tuple<char,int,int> const&)#1}::operator()( long long a1, long long a2, long long a3) { int v5; // [rsp+20h] [rbp-10h] int v6; // [rsp+24h] [rbp-Ch] int v7; // [rsp+28h] [rbp-8h] int v8; // [rsp+2Ch] [rbp-4...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0xc8 MOV qword ptr [RBP + -0xb8],RDI MOV qword ptr [RBP + -0xc0],RSI MOV dword ptr [RBP + -0xc4],EDX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX LEA RAX,[RBP + -0x50] MOV RDI,RAX CALL 0x0010419c MOV dword ptr [RBP + -0x98],0x0 JMP 0x001026...
/* func0(std::string const&, int) */ string * func0(string *param_1,int param_2) { bool bVar1; char cVar2; __normal_iterator _Var3; __normal_iterator _Var4; int *puVar5; pair<int,int> *this; int *piVar6; ulong uVar7; tuple *ptVar8; type *ptVar9; type *ptVar10; int in_EDX; _lambda_std__tuple<...
3,781
func0
#include <cassert> #include <vector> #include <string> #include <unordered_map> #include <algorithm> #include <utility> using namespace std;
vector<pair<char, int>> func0(const string &s, int a) { // Map to store frequency and first occurrence index unordered_map<char, pair<int, int>> freq; // key: character, value: {count, first_index} for (int i = 0; i < s.size(); ++i) { char c = s[i]; if (freq.find(c) == freq.end()) { ...
int main(){ { vector<pair<char, int>> expected = {{'s', 4}, {'e', 3}, {'f', 3}}; assert(func0("lkseropewdssafsdfafkpwe", 3) == expected); } { vector<pair<char, int>> expected = {{'s', 4}, {'e', 3}}; assert(func0("lkseropewdssafsdfafkpwe", 2) == expected); } {...
O1
cpp
void std::__unguarded_linear_insert<__gnu_cxx::__normal_iterator<std::tuple<char, int, int>*, std::vector<std::tuple<char, int, int>, std::allocator<std::tuple<char, int, int> > > >, __gnu_cxx::__ops::_Val_comp_iter<func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)::{lam...
_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIPSt5tupleIJciiEESt6vectorIS3_SaIS3_EEEENS0_5__ops14_Val_comp_iterIZ5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiEUlRKS3_SK_E_EEEvT_T0_: mov r9d, [rdi] mov r8d, [rdi+4] movzx r10d, byte ptr [rdi+8] jmp short loc_138D loc_1377: c...
int * std::__unguarded_linear_insert<__gnu_cxx::__normal_iterator<std::tuple<char,int,int> *,std::vector<std::tuple<char,int,int>>>,__gnu_cxx::__ops::_Val_comp_iter<func0(std::string const&,int)::{lambda(std::tuple<char,int,int> const&,std::tuple<char,int,int> const&)#1}>>( int *a1) { int v1; // r9d int v2;...
__unguarded_linear_insert<__normal_iterator<std::tuple<char,int,int>*,std::vector<std::tuple<char,int,int>,std::allocator<std::tuple<char,int,int>>>>,__ops::_Val_comp_iter<func0(std::string_const&,int)::{lambda(std::tuple<char,int,int>const&,std::tuple<char,int,int>const&)#1}>>: MOV R9D,dword ptr [RDI] MOV R8D,dword pt...
/* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* void std::__unguarded_linear_insert<__normal_iterator<std::tuple<char, int, int>*, std::vector<std::tuple<char, int, int>, std::allocator<std::tuple<char, int, int> > > >, __ops::_Val_comp_iter<func0(std::string const&, int)::{lambda(...