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
882
func0
#include <vector> #include <cassert>
int func0(std::vector<int> nums) { for (int el : nums) { if (el % 2 == 0) { return el; } } return -1; }
int main() { assert(func0({1, 3, 5, 7, 4, 1, 6, 8}) == 4); assert(func0({2, 3, 4}) == 2); assert(func0({5, 6, 7}) == 6); return 0; }
O2
cpp
func0(std::vector<int, std::allocator<int> >): endbr64 mov (%rdi),%rax mov 0x8(%rdi),%rdx cmp %rdx,%rax jne 1441 <_Z5func0St6vectorIiSaIiEE+0x21> jmp 1450 <_Z5func0St6vectorIiSaIiEE+0x30> nopw 0x0(%rax,%rax,1) add $0x4,%rax cmp %rax,%rdx je 1450 <_Z5func0St6vectorIiSaIiEE+0x30> mov (%rax),...
_Z5func0St6vectorIiSaIiEE: endbr64 mov rax, [rdi] mov rcx, [rdi+8] cmp rcx, rax jnz short loc_1401 jmp short loc_1410 loc_13F8: add rax, 4 cmp rcx, rax jz short loc_1410 loc_1401: mov edx, [rax] test dl, 1 jnz short loc_13F8 mov eax, edx retn loc_1410: mov edx, 0FFFFF...
long long func0(unsigned int **a1) { unsigned int *v1; // rax unsigned int *v2; // rcx v1 = *a1; v2 = a1[1]; if ( v2 == *a1 ) return 0xFFFFFFFFLL; while ( (*v1 & 1) != 0 ) { if ( v2 == ++v1 ) return 0xFFFFFFFFLL; } return *v1; }
func0: ENDBR64 MOV RAX,qword ptr [RDI] MOV RCX,qword ptr [RDI + 0x8] CMP RCX,RAX JNZ 0x00101401 JMP 0x00101410 LAB_001013f8: ADD RAX,0x4 CMP RCX,RAX JZ 0x00101410 LAB_00101401: MOV EDX,dword ptr [RAX] TEST DL,0x1 JNZ 0x001013f8 MOV EAX,EDX RET LAB_00101410: MOV EDX,0xffffffff MOV EAX,EDX RET
/* func0(std::vector<int, std::allocator<int> >) */ uint func0(vector param_1) { uint *puVar1; int4 in_register_0000003c; puVar1 = *(uint **)CONCAT44(in_register_0000003c,param_1); while( true ) { if (*(uint **)(CONCAT44(in_register_0000003c,param_1) + 8) == puVar1) { return 0xffffffff; } ...
883
func0
#include <vector> #include <cassert>
int func0(std::vector<int> nums) { for (int el : nums) { if (el % 2 == 0) { return el; } } return -1; }
int main() { assert(func0({1, 3, 5, 7, 4, 1, 6, 8}) == 4); assert(func0({2, 3, 4}) == 2); assert(func0({5, 6, 7}) == 6); return 0; }
O3
cpp
func0(std::vector<int, std::allocator<int> >): endbr64 mov (%rdi),%rax mov 0x8(%rdi),%rdx cmp %rdx,%rax jne 1421 <_Z5func0St6vectorIiSaIiEE+0x21> jmp 1430 <_Z5func0St6vectorIiSaIiEE+0x30> nopw 0x0(%rax,%rax,1) add $0x4,%rax cmp %rax,%rdx je 1430 <_Z5func0St6vectorIiSaIiEE+0x30> mov (%rax),...
_Z5func0St6vectorIiSaIiEE: endbr64 mov rax, [rdi] mov rcx, [rdi+8] cmp rcx, rax jnz short loc_1401 jmp short loc_1410 loc_13F8: add rax, 4 cmp rcx, rax jz short loc_1410 loc_1401: mov edx, [rax] test dl, 1 jnz short loc_13F8 mov eax, edx retn loc_1410: mov edx, 0FFFFF...
long long func0(unsigned int **a1) { unsigned int *v1; // rax unsigned int *v2; // rcx v1 = *a1; v2 = a1[1]; if ( v2 == *a1 ) return 0xFFFFFFFFLL; while ( (*v1 & 1) != 0 ) { if ( v2 == ++v1 ) return 0xFFFFFFFFLL; } return *v1; }
func0: ENDBR64 MOV RAX,qword ptr [RDI] MOV RCX,qword ptr [RDI + 0x8] CMP RCX,RAX JNZ 0x00101401 JMP 0x00101410 LAB_001013f8: ADD RAX,0x4 CMP RCX,RAX JZ 0x00101410 LAB_00101401: MOV EDX,dword ptr [RAX] TEST DL,0x1 JNZ 0x001013f8 MOV EAX,EDX RET LAB_00101410: MOV EDX,0xffffffff MOV EAX,EDX RET
/* func0(std::vector<int, std::allocator<int> >) */ uint func0(vector param_1) { uint *puVar1; int4 in_register_0000003c; puVar1 = *(uint **)CONCAT44(in_register_0000003c,param_1); while( true ) { if (*(uint **)(CONCAT44(in_register_0000003c,param_1) + 8) == puVar1) { return 0xffffffff; } ...
884
func0
#include <iostream> #include <tuple> #include <assert.h> #include <typeinfo> template<typename T, typename... Args>
bool func0(const std::tuple<T, Args...>& test_tuple) { const size_t num_elements = sizeof...(Args) + 1; const std::type_info& first_type = typeid(T); return std::apply([&](auto&&... args) { return ((typeid(args) == first_type) && ...); }, test_tuple); }
int main() { assert(func0(std::make_tuple(5, 6, 7, 3, 5, 6)) == true); assert(func0(std::make_tuple(1, 2, "4")) == false); assert(func0(std::make_tuple(3, 2, 1, 4, 5)) == true); return 0; }
O0
cpp
_ZZ5func0IiJiiiiiEEbRKSt5tupleIJT_DpT0_EEENKUlDpOT_E_clIJRKiSD_SD_SD_SD_SD_EEEDaS9_: endbr64 push %rbp mov %rsp,%rbp sub $0x30,%rsp mov %rdi,-0x8(%rbp) mov %rsi,-0x10(%rbp) mov %rdx,-0x18(%rbp) mov %rcx,-0x20(%rbp) mov %r8,-0x28(%rbp) mov %r9,-0x30(%rbp) lea 0x57eb(%rip),%rsi lea 0x57e4(...
_ZZ5func0IiJiiiiiEEbRKSt5tupleIJT_DpT0_EEENKUlDpOT_E_clIJRKiSD_SD_SD_SD_SD_EEEDaS9_: endbr64 push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov [rbp+var_30], r9 lea rax, _ZTIi@CXXABI_1_...
_BOOL8 func0<int,int,int,int,int,int>(std::tuple<int,int,int,int,int,int> const&)::{lambda(int &&)#1}::operator()<int const&,int const,int const,int const,int const,int const>( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6) { long l...
__apply_impl<func0<int,int,int,int,int,int>(std::tuple<int,int,int,int,int,int>const&)::{lambda((auto:1&&)...)#1},std::tuple<int,int,int,int,int,int>const&,0ul,1ul,2ul,3ul,4ul,5ul>: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV qword ptr [RBP + -0x38],RDI MOV qword ptr [RBP ...
/* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* decltype(auto) std::__apply_impl<func0<int, int, int, int, int, int>(std::tuple<int, int, int, int, int, int> const&)::{lambda((auto:1&&)...)#1}, std::tuple<int, int, int, int, int, int> const&, 0ul, 1ul, 2ul, 3ul, 4ul, 5ul>(func0<int...
885
func0
#include <iostream> #include <tuple> #include <assert.h> #include <typeinfo> template<typename T, typename... Args>
bool func0(const std::tuple<T, Args...>& test_tuple) { const size_t num_elements = sizeof...(Args) + 1; const std::type_info& first_type = typeid(T); return std::apply([&](auto&&... args) { return ((typeid(args) == first_type) && ...); }, test_tuple); }
int main() { assert(func0(std::make_tuple(5, 6, 7, 3, 5, 6)) == true); assert(func0(std::make_tuple(1, 2, "4")) == false); assert(func0(std::make_tuple(3, 2, 1, 4, 5)) == true); return 0; }
O1
cpp
_Z5func0IiJiPKcEEbRKSt5tupleIJT_DpT0_EE: endbr64 mov rsi, cs:qword_3D68 mov rdi, cs:s1; s1 cmp rsi, rdi jz short loc_1246 mov eax, 0 cmp byte ptr [rdi], 2Ah ; '*' jz short locret_124C sub rsp, 8 cmp byte ptr [rsi], 2Ah ; '*' setz al movzx eax, al add rsi, rax; s2 call _...
long long func0<int,int,char const*>() { return 1LL; }
func0<int,int,char_const*>: ENDBR64 MOV RSI,qword ptr [0x00103d68] MOV RDI,qword ptr [0x00103d88] CMP RSI,RDI JZ 0x00101246 MOV EAX,0x0 CMP byte ptr [RDI],0x2a JZ 0x0010124c SUB RSP,0x8 CMP byte ptr [RSI],0x2a SETZ AL MOVZX EAX,AL ADD RSI,RAX CALL 0x00101090 TEST EAX,EAX SETZ AL ADD RSP,0x8 RET LAB_00101246: MOV EAX,0x...
/* bool func0<int, int, char const*>(std::tuple<int, int, char const*> const&) */ bool func0<int,int,char_const*>(tuple *param_1) { int iVar1; if (int::typeinfo._8_8_ == char_const*::typeinfo._8_8_) { return true; } if (*(char *)char_const*::typeinfo._8_8_ != '*') { iVar1 = strcmp((char *)char_cons...
886
func0
#include <iostream> #include <tuple> #include <assert.h> #include <typeinfo> template<typename T, typename... Args>
bool func0(const std::tuple<T, Args...>& test_tuple) { const size_t num_elements = sizeof...(Args) + 1; const std::type_info& first_type = typeid(T); return std::apply([&](auto&&... args) { return ((typeid(args) == first_type) && ...); }, test_tuple); }
int main() { assert(func0(std::make_tuple(5, 6, 7, 3, 5, 6)) == true); assert(func0(std::make_tuple(1, 2, "4")) == false); assert(func0(std::make_tuple(3, 2, 1, 4, 5)) == true); return 0; }
O2
cpp
887
func0
#include <iostream> #include <tuple> #include <assert.h> #include <typeinfo> template<typename T, typename... Args>
bool func0(const std::tuple<T, Args...>& test_tuple) { const size_t num_elements = sizeof...(Args) + 1; const std::type_info& first_type = typeid(T); return std::apply([&](auto&&... args) { return ((typeid(args) == first_type) && ...); }, test_tuple); }
int main() { assert(func0(std::make_tuple(5, 6, 7, 3, 5, 6)) == true); assert(func0(std::make_tuple(1, 2, "4")) == false); assert(func0(std::make_tuple(3, 2, 1, 4, 5)) == true); return 0; }
O3
cpp
888
func0
#include <assert.h> int binary_search(int arr[], int low, int high, int x) { if (high >= low) { int mid = (low + high) / 2; if ((mid == 0 || x > arr[mid-1]) && arr[mid] == x) { return mid; } else if (x > arr[mid]) { return binary_search(arr, mid + 1, high, ...
bool func0(int arr[], int n, int x) { int i = binary_search(arr, 0, n-1, x); if (i == -1) { return false; } if ((i + n/2) <= (n -1) && arr[i + n/2] == x) { return true; } else { return false; } }
int main() { int arr1[] = {1, 2, 3, 3, 3, 3, 10}; int arr2[] = {1, 1, 2, 4, 4, 4, 6, 6}; int arr3[] = {1, 1, 1, 2, 2}; assert(func0(arr1, 7, 3) == true); assert(func0(arr2, 8, 4) == false); assert(func0(arr3, 5, 1) == true); return 0; }
O0
cpp
func0(int*, int, int): endbr64 push %rbp mov %rsp,%rbp sub $0x20,%rsp mov %rdi,-0x18(%rbp) mov %esi,-0x1c(%rbp) mov %edx,-0x20(%rbp) mov -0x1c(%rbp),%eax lea -0x1(%rax),%esi mov -0x20(%rbp),%edx mov -0x18(%rbp),%rax mov %edx,%ecx mov %esi,%edx mov $0x0,%esi mov %rax,%rdi callq ...
_Z5func0Piii: endbr64 push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_18], rdi mov [rbp+var_1C], esi mov [rbp+var_20], edx mov eax, [rbp+var_1C] lea esi, [rax-1] mov edx, [rbp+var_20] mov rax, [rbp+var_18] mov ecx, edx; int mov edx, esi; int mov esi, 0; int mov rdi...
_BOOL8 func0(int *a1, int a2, int a3) { int v5; // [rsp+1Ch] [rbp-4h] v5 = binary_search(a1, 0, a2 - 1, a3); if ( v5 == -1 ) return 0LL; return a2 > a2 / 2 + v5 && a3 == a1[a2 / 2 + v5]; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x18],RDI MOV dword ptr [RBP + -0x1c],ESI MOV dword ptr [RBP + -0x20],EDX MOV EAX,dword ptr [RBP + -0x1c] LEA ESI,[RAX + -0x1] MOV EDX,dword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x18] MOV ECX,EDX MOV EDX,ESI MOV ESI,0x0 MOV RDI,RAX CALL 0x001...
/* func0(int*, int, int) */ int8 func0(int *param_1,int param_2,int param_3) { int iVar1; int8 uVar2; iVar1 = binary_search(param_1,0,param_2 + -1,param_3); if (iVar1 == -1) { uVar2 = 0; } else if ((iVar1 + param_2 / 2 < param_2) && (param_3 == param_1[iVar1 + param_2 / 2])) { uVar2 = 1; } ...
889
func0
#include <assert.h> int binary_search(int arr[], int low, int high, int x) { if (high >= low) { int mid = (low + high) / 2; if ((mid == 0 || x > arr[mid-1]) && arr[mid] == x) { return mid; } else if (x > arr[mid]) { return binary_search(arr, mid + 1, high, ...
bool func0(int arr[], int n, int x) { int i = binary_search(arr, 0, n-1, x); if (i == -1) { return false; } if ((i + n/2) <= (n -1) && arr[i + n/2] == x) { return true; } else { return false; } }
int main() { int arr1[] = {1, 2, 3, 3, 3, 3, 10}; int arr2[] = {1, 1, 2, 4, 4, 4, 6, 6}; int arr3[] = {1, 1, 1, 2, 2}; assert(func0(arr1, 7, 3) == true); assert(func0(arr2, 8, 4) == false); assert(func0(arr3, 5, 1) == true); return 0; }
O1
cpp
func0(int*, int, int): endbr64 push %r12 push %rbp push %rbx mov %rdi,%r12 mov %esi,%ebx mov %edx,%ebp lea -0x1(%rsi),%edx mov %ebp,%ecx mov $0x0,%esi callq 1169 <_Z13binary_searchPiiii> mov $0x0,%ecx cmp $0xffffffff,%eax je 1207 <_Z5func0Piii+0x42> mov %eax,%edx mov %ebx,%eax s...
_Z5func0Piii: endbr64 push r12 push rbp push rbx mov r12, rdi mov ebx, esi mov ebp, edx lea edx, [rsi-1]; int mov ecx, ebp; int mov esi, 0; int call _Z13binary_searchPiiii; binary_search(int *,int,int,int) mov edx, 0 cmp eax, 0FFFFFFFFh jz short loc_1209 mov edx, ebx...
long long func0(int *a1, int a2, int a3) { int v4; // eax unsigned int v5; // edx int v6; // eax v4 = binary_search(a1, 0, a2 - 1, a3); v5 = 0; if ( v4 != -1 ) { v6 = a2 / 2 + v4; v5 = 0; if ( v6 < a2 ) LOBYTE(v5) = a1[v6] == a3; } return v5; }
func0: ENDBR64 PUSH R12 PUSH RBP PUSH RBX MOV R12,RDI MOV EBX,ESI MOV EBP,EDX LEA EDX,[RSI + -0x1] MOV ECX,EBP MOV ESI,0x0 CALL 0x00101169 MOV EDX,0x0 CMP EAX,-0x1 JZ 0x00101209 MOV EDX,EBX SHR EDX,0x1f ADD EDX,EBX SAR EDX,0x1 ADD EAX,EDX MOV EDX,0x0 CMP EAX,EBX JGE 0x00101209 CDQE CMP dword ptr [R12 + RAX*0x4],EBP SET...
/* func0(int*, int, int) */ bool func0(int *param_1,int param_2,int param_3) { int iVar1; bool bVar2; iVar1 = binary_search(param_1,0,param_2 + -1,param_3); bVar2 = false; if (iVar1 != -1) { iVar1 = iVar1 + param_2 / 2; bVar2 = false; if (iVar1 < param_2) { bVar2 = param_1[iVar1] == par...
890
func0
#include <assert.h> int binary_search(int arr[], int low, int high, int x) { if (high >= low) { int mid = (low + high) / 2; if ((mid == 0 || x > arr[mid-1]) && arr[mid] == x) { return mid; } else if (x > arr[mid]) { return binary_search(arr, mid + 1, high, ...
bool func0(int arr[], int n, int x) { int i = binary_search(arr, 0, n-1, x); if (i == -1) { return false; } if ((i + n/2) <= (n -1) && arr[i + n/2] == x) { return true; } else { return false; } }
int main() { int arr1[] = {1, 2, 3, 3, 3, 3, 10}; int arr2[] = {1, 1, 2, 4, 4, 4, 6, 6}; int arr3[] = {1, 1, 1, 2, 2}; assert(func0(arr1, 7, 3) == true); assert(func0(arr2, 8, 4) == false); assert(func0(arr3, 5, 1) == true); return 0; }
O2
cpp
func0(int*, int, int): endbr64 mov %esi,%r11d mov %edx,%ecx lea -0x1(%rsi),%edx xor %esi,%esi callq 12c0 <_Z13binary_searchPiiii> xor %r8d,%r8d mov %eax,%edx cmp $0xffffffff,%eax je 1358 <_Z5func0Piii+0x38> mov %r11d,%eax shr $0x1f,%eax add %r11d,%eax sar %eax add %edx,%eax cmp ...
_Z5func0Piii: endbr64 push rbx mov ecx, edx; int mov r11d, esi lea edx, [rsi-1]; int xor esi, esi; int mov rbx, rdi call _Z13binary_searchPiiii; binary_search(int *,int,int,int) xor esi, esi cmp eax, 0FFFFFFFFh jz short loc_1339 mov edx, r11d shr edx, 1Fh add edx, r11d...
long long func0(int *a1, int a2, int a3) { int v3; // eax int v4; // ecx int v5; // r11d unsigned int v6; // esi int v7; // eax v3 = binary_search(a1, 0, a2 - 1, a3); v6 = 0; if ( v3 != -1 ) { v7 = v5 / 2 + v3; if ( v7 < v5 ) LOBYTE(v6) = a1[v7] == v4; } return v6; }
func0: ENDBR64 PUSH RBX MOV ECX,EDX MOV R11D,ESI LEA EDX,[RSI + -0x1] XOR ESI,ESI MOV RBX,RDI CALL 0x001012a0 XOR ESI,ESI CMP EAX,-0x1 JZ 0x00101339 MOV EDX,R11D SHR EDX,0x1f ADD EDX,R11D SAR EDX,0x1 ADD EAX,EDX CMP EAX,R11D JGE 0x00101339 CDQE CMP dword ptr [RBX + RAX*0x4],ECX SETZ SIL LAB_00101339: MOV EAX,ESI POP RB...
/* func0(int*, int, int) */ bool func0(int *param_1,int param_2,int param_3) { int iVar1; ulong uVar2; bool bVar3; uVar2 = (ulong)(uint)param_2; iVar1 = binary_search(param_1,0,param_2 + -1,param_3); bVar3 = false; if ((iVar1 != -1) && (iVar1 = iVar1 + ((int)(((uint)(uVar2 >> 0x1f) & 1) + (int)u...
891
func0
#include <assert.h> int binary_search(int arr[], int low, int high, int x) { if (high >= low) { int mid = (low + high) / 2; if ((mid == 0 || x > arr[mid-1]) && arr[mid] == x) { return mid; } else if (x > arr[mid]) { return binary_search(arr, mid + 1, high, ...
bool func0(int arr[], int n, int x) { int i = binary_search(arr, 0, n-1, x); if (i == -1) { return false; } if ((i + n/2) <= (n -1) && arr[i + n/2] == x) { return true; } else { return false; } }
int main() { int arr1[] = {1, 2, 3, 3, 3, 3, 10}; int arr2[] = {1, 1, 2, 4, 4, 4, 6, 6}; int arr3[] = {1, 1, 1, 2, 2}; assert(func0(arr1, 7, 3) == true); assert(func0(arr2, 8, 4) == false); assert(func0(arr3, 5, 1) == true); return 0; }
O3
cpp
func0(int*, int, int): endbr64 mov %esi,%r8d xor %r9d,%r9d sub $0x1,%r8d js 133f <_Z5func0Piii+0x3f> lea (%r9,%r8,1),%eax sar %eax mov %eax,%ecx cltq lea 0x0(,%rax,4),%r10 mov (%rdi,%rax,4),%eax je 132e <_Z5func0Piii+0x2e> cmp -0x4(%rdi,%r10,1),%edx jle 1332 <_Z5func0Piii+0x32> cmp...
_Z5func0Piii: endbr64 mov r8, rdi mov r10d, esi mov ecx, edx xor edi, edi sub esi, 1 js short loc_134B nop dword ptr [rax+rax+00h] loc_1318: lea edx, [rsi+rdi] mov eax, edx shr eax, 1Fh add eax, edx sar eax, 1 movsxd rdx, eax lea r9, ds:0[rdx*4] mov edx, [r8+rdx...
long long func0(int *a1, int a2, int a3) { int v6; // edi int v7; // esi int v8; // eax long long v9; // r9 int v10; // edx int v12; // eax unsigned int v13; // edx v6 = 0; v7 = a2 - 1; if ( v7 < 0 ) return 0LL; while ( 1 ) { v8 = (v7 + v6) / 2; v9 = v8; v10 = a1[v9]; if ( ...
func0: ENDBR64 MOV R8,RDI MOV R10D,ESI MOV ECX,EDX XOR EDI,EDI SUB ESI,0x1 JS 0x0010134b NOP dword ptr [RAX + RAX*0x1] LAB_00101318: LEA EDX,[RSI + RDI*0x1] MOV EAX,EDX SHR EAX,0x1f ADD EAX,EDX SAR EAX,0x1 MOVSXD RDX,EAX LEA R9,[RDX*0x4] MOV EDX,dword ptr [R8 + RDX*0x4] JZ 0x0010133c CMP ECX,dword ptr [R8 + R9*0x1 + -0...
/* func0(int*, int, int) */ bool func0(int *param_1,int param_2,int param_3) { int iVar1; int iVar2; int iVar3; iVar3 = 0; iVar2 = param_2 + -1; if (-1 < iVar2) { do { while( true ) { iVar1 = (iVar2 + iVar3) / 2; if (((iVar1 == 0) || (param_1[(long)iVar1 + -1] < param_3)) && (...
892
func0
#include <assert.h>
int func0(int n) { int count = 0; while (n) { count += n & 1; n >>= 1; } return count; }
int main() { assert(func0(2) == 1); assert(func0(4) == 1); assert(func0(6) == 2); return 0; }
O0
cpp
func0(int): endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x14(%rbp) movl $0x0,-0x4(%rbp) cmpl $0x0,-0x14(%rbp) je 116f <_Z5func0i+0x26> mov -0x14(%rbp),%eax and $0x1,%eax add %eax,-0x4(%rbp) sarl -0x14(%rbp) jmp 115b <_Z5func0i+0x12> mov -0x4(%rbp),%eax pop %rbp retq
_Z5func0i: endbr64 push rbp mov rbp, rsp mov [rbp+var_14], edi mov [rbp+var_4], 0 jmp short loc_1169 loc_115D: mov eax, [rbp+var_14] and eax, 1 add [rbp+var_4], eax sar [rbp+var_14], 1 loc_1169: cmp [rbp+var_14], 0 jnz short loc_115D mov eax, [rbp+var_4] pop rbp retn
long long func0(int a1) { unsigned int v3; // [rsp+10h] [rbp-4h] v3 = 0; while ( a1 ) { v3 += a1 & 1; a1 >>= 1; } return v3; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x14],EDI MOV dword ptr [RBP + -0x4],0x0 JMP 0x00101169 LAB_0010115d: MOV EAX,dword ptr [RBP + -0x14] AND EAX,0x1 ADD dword ptr [RBP + -0x4],EAX SAR dword ptr [RBP + -0x14],0x1 LAB_00101169: CMP dword ptr [RBP + -0x14],0x0 JNZ 0x0010115d MOV EAX,dword ptr [RBP +...
/* func0(int) */ int func0(int param_1) { int4 local_1c; int4 local_c; local_c = 0; for (local_1c = param_1; local_1c != 0; local_1c = (int)local_1c >> 1) { local_c = local_c + (local_1c & 1); } return local_c; }
893
func0
#include <assert.h>
int func0(int n) { int count = 0; while (n) { count += n & 1; n >>= 1; } return count; }
int main() { assert(func0(2) == 1); assert(func0(4) == 1); assert(func0(6) == 2); return 0; }
O1
cpp
func0(int): endbr64 test %edi,%edi je 1162 <_Z5func0i+0x19> mov $0x0,%eax mov %edi,%edx and $0x1,%edx add %edx,%eax sar %edi jne 1156 <_Z5func0i+0xd> retq mov %edi,%eax retq
_Z5func0i: endbr64 test edi, edi jz short loc_1162 mov eax, 0 loc_1156: mov edx, edi and edx, 1 add eax, edx sar edi, 1 jnz short loc_1156 retn loc_1162: mov eax, edi retn
long long func0(int a1) { long long result; // rax if ( !a1 ) return 0LL; LODWORD(result) = 0; do { result = (a1 & 1) + (unsigned int)result; a1 >>= 1; } while ( a1 ); return result; }
func0: ENDBR64 TEST EDI,EDI JZ 0x00101162 MOV EAX,0x0 LAB_00101156: MOV EDX,EDI AND EDX,0x1 ADD EAX,EDX SAR EDI,0x1 JNZ 0x00101156 RET LAB_00101162: MOV EAX,EDI RET
/* func0(int) */ int func0(int param_1) { int iVar1; if (param_1 != 0) { iVar1 = 0; do { iVar1 = iVar1 + (param_1 & 1U); param_1 = param_1 >> 1; } while (param_1 != 0); return iVar1; } return 0; }
894
func0
#include <assert.h>
int func0(int n) { int count = 0; while (n) { count += n & 1; n >>= 1; } return count; }
int main() { assert(func0(2) == 1); assert(func0(4) == 1); assert(func0(6) == 2); return 0; }
O2
cpp
func0(int): endbr64 xor %eax,%eax test %edi,%edi je 1160 <_Z5func0i+0x20> nopw 0x0(%rax,%rax,1) mov %edi,%edx and $0x1,%edx add %edx,%eax sar %edi jne 1150 <_Z5func0i+0x10> retq nopl 0x0(%rax) retq nopw %cs:0x0(%rax,%rax,1) nopl 0x0(%rax,%rax,1)
_Z5func0i: endbr64 xor eax, eax test edi, edi jz short locret_1160 nop word ptr [rax+rax+00h] loc_1150: mov edx, edi and edx, 1 add eax, edx sar edi, 1 jnz short loc_1150 retn locret_1160: retn
long long func0(int a1) { long long result; // rax for ( result = 0LL; a1; a1 >>= 1 ) result = (a1 & 1) + (unsigned int)result; return result; }
func0: ENDBR64 XOR EAX,EAX TEST EDI,EDI JZ 0x00101160 NOP word ptr [RAX + RAX*0x1] LAB_00101150: MOV EDX,EDI AND EDX,0x1 ADD EAX,EDX SAR EDI,0x1 JNZ 0x00101150 RET LAB_00101160: RET
/* func0(int) */ int func0(int param_1) { int iVar1; iVar1 = 0; if (param_1 == 0) { return 0; } do { iVar1 = iVar1 + (param_1 & 1U); param_1 = param_1 >> 1; } while (param_1 != 0); return iVar1; }
895
func0
#include <assert.h>
int func0(int n) { int count = 0; while (n) { count += n & 1; n >>= 1; } return count; }
int main() { assert(func0(2) == 1); assert(func0(4) == 1); assert(func0(6) == 2); return 0; }
O3
cpp
func0(int): endbr64 xor %eax,%eax test %edi,%edi je 1160 <_Z5func0i+0x20> nopw 0x0(%rax,%rax,1) mov %edi,%edx and $0x1,%edx add %edx,%eax sar %edi jne 1150 <_Z5func0i+0x10> retq nopl 0x0(%rax) retq nopw %cs:0x0(%rax,%rax,1) nopl 0x0(%rax,%rax,1)
_Z5func0i: endbr64 xor eax, eax test edi, edi jz short locret_1160 nop word ptr [rax+rax+00h] loc_1150: mov edx, edi and edx, 1 add eax, edx sar edi, 1 jnz short loc_1150 retn locret_1160: retn
long long func0(int a1) { long long result; // rax for ( result = 0LL; a1; a1 >>= 1 ) result = (a1 & 1) + (unsigned int)result; return result; }
func0: ENDBR64 XOR EAX,EAX TEST EDI,EDI JZ 0x00101160 NOP word ptr [RAX + RAX*0x1] LAB_00101150: MOV EDX,EDI AND EDX,0x1 ADD EAX,EDX SAR EDI,0x1 JNZ 0x00101150 RET LAB_00101160: RET
/* func0(int) */ int func0(int param_1) { int iVar1; iVar1 = 0; if (param_1 == 0) { return 0; } do { iVar1 = iVar1 + (param_1 & 1U); param_1 = param_1 >> 1; } while (param_1 != 0); return iVar1; }
896
func0
#include <iostream> #include <vector> #include <assert.h>
int func0(const std::vector<int>& arr, int low, int high) { while (low < high) { int mid = low + (high - low) / 2; if (arr[mid] == arr[high]) { high -= 1; } else if (arr[mid] > arr[high]) { low = mid + 1; } else { high = mid; } ...
int main() { assert(func0({1,2,3,4,5}, 0, 4) == 1); assert(func0({4,6,8}, 0, 2) == 4); assert(func0({2,3,5,7,9}, 0, 4) == 2); return 0; }
O0
cpp
func0(std::vector<int, std::allocator<int> > const&, int, int): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x28,%rsp mov %rdi,-0x28(%rbp) mov %esi,-0x2c(%rbp) mov %edx,-0x30(%rbp) mov -0x2c(%rbp),%eax cmp -0x30(%rbp),%eax jge 1332 <_Z5func0RKSt6vectorIiSaIiEEii+0xc9> mov -0x30(%rbp),%...
_Z5func0RKSt6vectorIiSaIiEEii: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 28h mov [rbp+var_28], rdi mov [rbp+var_2C], esi mov [rbp+var_30], edx jmp loc_1303 loc_1265: mov eax, [rbp+var_30] sub eax, [rbp+var_2C] mov edx, eax shr edx, 1Fh add eax, edx sar eax, 1 ...
long long func0(long long a1, int a2, int a3) { int v3; // ebx int v4; // ebx int v8; // [rsp+1Ch] [rbp-14h] while ( a2 < a3 ) { v8 = (a3 - a2) / 2 + a2; v3 = *(_DWORD *)std::vector<int>::operator[](a1, v8); if ( v3 == *(_DWORD *)std::vector<int>::operator[](a1, a3) ) { --a3; } ...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x28 MOV qword ptr [RBP + -0x28],RDI MOV dword ptr [RBP + -0x2c],ESI MOV dword ptr [RBP + -0x30],EDX JMP 0x00101303 LAB_00101265: MOV EAX,dword ptr [RBP + -0x30] SUB EAX,dword ptr [RBP + -0x2c] MOV EDX,EAX SHR EDX,0x1f ADD EAX,EDX SAR EAX,0x1 MOV EDX,EAX MOV EAX,dwor...
/* func0(std::vector<int, std::allocator<int> > const&, int, int) */ int4 func0(vector *param_1,int param_2,int param_3) { int iVar1; int iVar2; int *piVar3; int4 *puVar4; int local_38; int local_34; iVar2 = param_3; local_34 = param_2; while (local_38 = iVar2, local_34 < local_38) { iVar2 = ...
897
func0
#include <iostream> #include <vector> #include <assert.h>
int func0(const std::vector<int>& arr, int low, int high) { while (low < high) { int mid = low + (high - low) / 2; if (arr[mid] == arr[high]) { high -= 1; } else if (arr[mid] > arr[high]) { low = mid + 1; } else { high = mid; } ...
int main() { assert(func0({1,2,3,4,5}, 0, 4) == 1); assert(func0({4,6,8}, 0, 2) == 4); assert(func0({2,3,5,7,9}, 0, 4) == 2); return 0; }
O1
cpp
func0(std::vector<int, std::allocator<int> > const&, int, int): endbr64 cmp %edx,%esi jge 128a <_Z5func0RKSt6vectorIiSaIiEEii+0x41> mov (%rdi),%r9 jmp 1261 <_Z5func0RKSt6vectorIiSaIiEEii+0x18> mov %eax,%edx jmp 125d <_Z5func0RKSt6vectorIiSaIiEEii+0x14> sub $0x1,%edx cmp %esi,%edx jle 128a <_Z...
_Z5func0RKSt6vectorIiSaIiEEii: endbr64 mov r8, rdi cmp esi, edx jge short loc_124C mov r9, [rdi] jmp short loc_1220 loc_1219: sub edx, 1 loc_121C: cmp esi, edx jge short loc_124C loc_1220: mov ecx, edx sub ecx, esi mov eax, ecx shr eax, 1Fh add eax, ecx sar eax, 1...
long long func0(long long *a1, int a2, int a3) { long long v4; // r9 int v5; // eax int v6; // edi int v7; // ecx if ( a2 < a3 ) { v4 = *a1; do { v5 = a2 + (a3 - a2) / 2; v6 = *(_DWORD *)(v4 + 4LL * v5); v7 = *(_DWORD *)(v4 + 4LL * a3); if ( v6 == v7 ) { -...
func0: ENDBR64 MOV R8,RDI CMP ESI,EDX JGE 0x0010124c MOV R9,qword ptr [RDI] JMP 0x00101220 LAB_00101219: SUB EDX,0x1 LAB_0010121c: CMP ESI,EDX JGE 0x0010124c LAB_00101220: MOV ECX,EDX SUB ECX,ESI MOV EAX,ECX SHR EAX,0x1f ADD EAX,ECX SAR EAX,0x1 ADD EAX,ESI MOVSXD RCX,EAX MOV EDI,dword ptr [R9 + RCX*0x4] MOVSXD RCX,EDX ...
/* func0(std::vector<int, std::allocator<int> > const&, int, int) */ int4 func0(vector *param_1,int param_2,int param_3) { int iVar1; int iVar2; int iVar3; if (param_2 < param_3) { do { iVar3 = (param_3 - param_2) / 2 + param_2; iVar1 = *(int *)(*(long *)param_1 + (long)iVar3 * 4); iV...
898
func0
#include <iostream> #include <vector> #include <assert.h>
int func0(const std::vector<int>& arr, int low, int high) { while (low < high) { int mid = low + (high - low) / 2; if (arr[mid] == arr[high]) { high -= 1; } else if (arr[mid] > arr[high]) { low = mid + 1; } else { high = mid; } ...
int main() { assert(func0({1,2,3,4,5}, 0, 4) == 1); assert(func0({4,6,8}, 0, 2) == 4); assert(func0({2,3,5,7,9}, 0, 4) == 2); return 0; }
O2
cpp
func0(std::vector<int, std::allocator<int> > const&, int, int): endbr64 mov (%rdi),%rdi movslq %edx,%rax mov (%rdi,%rax,4),%r8d cmp %edx,%esi jl 1471 <_Z5func0RKSt6vectorIiSaIiEEii+0x21> jmp 1492 <_Z5func0RKSt6vectorIiSaIiEEii+0x42> nopl 0x0(%rax) jle 14a0 <_Z5func0RKSt6vectorIiSaIiEEii+0x50> lea ...
_Z5func0RKSt6vectorIiSaIiEEii: endbr64 mov r8, [rdi] cmp esi, edx jl short loc_13AC jmp short loc_13F0 loc_13A0: jle short loc_13E8 lea esi, [rax+1] mov r9, r10 loc_13A8: cmp esi, edx jge short loc_13DF loc_13AC: mov eax, edx movsxd rcx, edx sub eax, esi lea r10, ds:0[r...
long long func0(long long *a1, int a2, int a3) { long long v3; // r8 long long v4; // r9 long long v5; // r10 int v6; // ecx int v7; // eax v3 = *a1; if ( a2 >= a3 ) return *(unsigned int *)(v3 + 4LL * a3); do { while ( 1 ) { v5 = 4LL * a3; v6 = *(_DWORD *)(v3 + v5); v7...
func0: ENDBR64 MOV R8,qword ptr [RDI] CMP ESI,EDX JL 0x001013ac JMP 0x001013f0 LAB_001013a0: JLE 0x001013e8 LEA ESI,[RAX + 0x1] MOV R9,R10 LAB_001013a8: CMP ESI,EDX JGE 0x001013df LAB_001013ac: MOV EAX,EDX MOVSXD RCX,EDX SUB EAX,ESI LEA R10,[RCX*0x4] MOV ECX,dword ptr [R8 + RCX*0x4] SAR EAX,0x1 ADD EAX,ESI MOVSXD RDI,E...
/* func0(std::vector<int, std::allocator<int> > const&, int, int) */ int4 func0(vector *param_1,int param_2,int param_3) { long lVar1; int iVar2; int iVar3; long lVar4; int iVar5; long lVar6; lVar4 = *(long *)param_1; if (param_3 <= param_2) { return *(int4 *)(lVar4 + (long)param_3 * 4); } ...
899
func0
#include <iostream> #include <vector> #include <assert.h>
int func0(const std::vector<int>& arr, int low, int high) { while (low < high) { int mid = low + (high - low) / 2; if (arr[mid] == arr[high]) { high -= 1; } else if (arr[mid] > arr[high]) { low = mid + 1; } else { high = mid; } ...
int main() { assert(func0({1,2,3,4,5}, 0, 4) == 1); assert(func0({4,6,8}, 0, 2) == 4); assert(func0({2,3,5,7,9}, 0, 4) == 2); return 0; }
O3
cpp
func0(std::vector<int, std::allocator<int> > const&, int, int): endbr64 mov (%rdi),%rdi movslq %edx,%rax mov (%rdi,%rax,4),%r8d cmp %edx,%esi jl 1451 <_Z5func0RKSt6vectorIiSaIiEEii+0x21> jmp 1472 <_Z5func0RKSt6vectorIiSaIiEEii+0x42> nopl 0x0(%rax) jle 1480 <_Z5func0RKSt6vectorIiSaIiEEii+0x50> lea ...
_Z5func0RKSt6vectorIiSaIiEEii: endbr64 mov r8, [rdi] cmp esi, edx jl short loc_13AC jmp short loc_13F0 loc_13A0: jge short loc_13E8 lea esi, [rax+1] mov r9, r10 loc_13A8: cmp edx, esi jle short loc_13DF loc_13AC: mov eax, edx movsxd rdi, edx sub eax, esi lea r10, ds:0[r...
long long func0(long long *a1, int a2, int a3) { long long v3; // r8 long long v4; // r9 long long v5; // r10 int v6; // eax int v7; // ecx v3 = *a1; if ( a2 >= a3 ) return *(unsigned int *)(v3 + 4LL * a3); do { while ( 1 ) { v5 = 4LL * a3; v6 = a2 + ((a3 - a2) >> 1); v...
func0: ENDBR64 MOV R8,qword ptr [RDI] CMP ESI,EDX JL 0x001013ac JMP 0x001013f0 LAB_001013a0: JGE 0x001013e8 LEA ESI,[RAX + 0x1] MOV R9,R10 LAB_001013a8: CMP EDX,ESI JLE 0x001013df LAB_001013ac: MOV EAX,EDX MOVSXD RDI,EDX SUB EAX,ESI LEA R10,[RDI*0x4] SAR EAX,0x1 ADD EAX,ESI MOVSXD RCX,EAX LEA R9,[RCX*0x4] MOV ECX,dword...
/* func0(std::vector<int, std::allocator<int> > const&, int, int) */ int4 func0(vector *param_1,int param_2,int param_3) { long lVar1; int iVar2; int iVar3; long lVar4; int iVar5; long lVar6; lVar4 = *(long *)param_1; if (param_3 <= param_2) { return *(int4 *)(lVar4 + (long)param_3 * 4); } ...
900
func0
#include <string> #include <cassert>
std::string func0(const std::string& str) { std::string result; for (size_t i = 0; i < str.length(); i++) { if (i % 2 == 0) { result += str[i]; } } return result; }
int main() { assert(func0("abcdef") == "ace"); assert(func0("python") == "pto"); assert(func0("data") == "dt"); return 0; }
O0
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x28,%rsp mov %rdi,-0x28(%rbp) mov %rsi,-0x30(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax mov -0x28(%rbp),%rax mov %rax,%rdi callq ...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 28h mov [rbp+var_28], rdi mov [rbp+var_30], rsi mov rax, [rbp+var_28] mov rdi, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(v...
long long func0(long long a1, long long a2) { char *v2; // rax unsigned long long i; // [rsp+18h] [rbp-18h] std::string::basic_string(a1); for ( i = 0LL; i < std::string::length(a2); ++i ) { if ( (i & 1) == 0 ) { v2 = (char *)std::string::operator[](a2, i); std::string::operator+=(a1, (u...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x28 MOV qword ptr [RBP + -0x28],RDI MOV qword ptr [RBP + -0x30],RSI MOV RAX,qword ptr [RBP + -0x28] MOV RDI,RAX CALL 0x001022b0 MOV qword ptr [RBP + -0x18],0x0 JMP 0x0010244c LAB_00102414: MOV RAX,qword ptr [RBP + -0x18] AND EAX,0x1 TEST RAX,RAX JNZ 0x00102447 MOV R...
/* func0(std::string const&) */ string * func0(string *param_1) { char *pcVar1; ulong uVar2; ulong in_RSI; int8 local_20; std::string::string(param_1); local_20 = 0; while( true ) { uVar2 = std::string::length(); if (uVar2 <= local_20) break; if ((local_20 & 1) == 0) { pcVar1 = (cha...
901
func0
#include <string> #include <cassert>
std::string func0(const std::string& str) { std::string result; for (size_t i = 0; i < str.length(); i++) { if (i % 2 == 0) { result += str[i]; } } return result; }
int main() { assert(func0("abcdef") == "ace"); assert(func0("python") == "pto"); assert(func0("data") == "dt"); return 0; }
O1
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x18,%rsp mov %rdi,%rbp lea 0x10(%rdi),%rax mov %rax,0x8(%rsp) mov %rax,(%rdi) movq $0x0,0x8(%rdi) movb $0x0,0x10(%rdi) c...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 18h mov rbp, rdi lea rax, [rdi+10h] mov [rsp+48h+var_40], rax mov [rdi], rax mov qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 cmp qwo...
_QWORD * func0(_QWORD *a1, _QWORD *a2) { unsigned long long v2; // rbx unsigned long long v3; // rax char v4; // r15 long long v5; // r13 unsigned long long v6; // r14 *a1 = a1 + 2; a1[1] = 0LL; *((_BYTE *)a1 + 16) = 0; if ( a2[1] ) { v2 = 0LL; do { if ( (v2 & 1) == 0 ) { ...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x18 MOV RBP,RDI LEA RAX,[RDI + 0x10] MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RDI],RAX MOV qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 CMP qword ptr [RSI + 0x8],0x0 JZ 0x00101331 MOV R12,RSI MOV EBX,0x0 JMP 0x001012d3 LAB_0010...
/* func0(std::string const&) */ string * func0(string *param_1) { int uVar1; ulong uVar2; ulong uVar3; ulong uVar4; long *in_RSI; *(string **)param_1 = param_1 + 0x10; *(int8 *)(param_1 + 8) = 0; param_1[0x10] = (string)0x0; if (in_RSI[1] != 0) { uVar4 = 0; do { if ((uVar4 & 1) == 0...
902
func0
#include <string> #include <cassert>
std::string func0(const std::string& str) { std::string result; for (size_t i = 0; i < str.length(); i++) { if (i % 2 == 0) { result += str[i]; } } return result; }
int main() { assert(func0("abcdef") == "ace"); assert(func0("python") == "pto"); assert(func0("data") == "dt"); return 0; }
O2
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 push %r15 lea 0x10(%rdi),%rax push %r14 push %r13 push %r12 mov %rdi,%r12 push %rbp push %rbx sub $0x18,%rsp movq $0x0,0x8(%rdi) movb $0x0,0x10(%rdi) cmpq $0x0,0x8(%rsi) mov %rax,0x8(%rsp...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push r15 lea rax, [rdi+10h] push r14 push r13 push r12 push rbp mov rbp, rdi push rbx sub rsp, 18h mov qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 cmp qword ptr [rsi+8], 0 mov [rsp+48h+var_40], rax m...
_QWORD * func0(_QWORD *a1, _QWORD *a2) { bool v2; // zf unsigned long long v3; // rbx long long v4; // r13 char v5; // r15 unsigned long long v6; // r14 long long v7; // rax unsigned long long v8; // rdx long long v9; // rax a1[1] = 0LL; *((_BYTE *)a1 + 16) = 0; v2 = a2[1] == 0LL; *a1 = a1 + 2;...
func0: ENDBR64 PUSH R15 LEA RAX,[RDI + 0x10] PUSH R14 PUSH R13 PUSH R12 PUSH RBP MOV RBP,RDI PUSH RBX SUB RSP,0x18 MOV qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 CMP qword ptr [RSI + 0x8],0x0 MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RDI],RAX JZ 0x001014e2 MOV R12,RSI XOR EBX,EBX JMP 0x0010149b LAB_0010...
/* func0(std::string const&) */ string * func0(string *param_1) { string sVar1; ulong uVar2; long lVar3; string *psVar4; ulong uVar5; ulong uVar6; long *in_RSI; *(int8 *)(param_1 + 8) = 0; param_1[0x10] = (string)0x0; lVar3 = in_RSI[1]; *(string **)param_1 = param_1 + 0x10; if (lVar3 != 0) ...
903
func0
#include <string> #include <cassert>
std::string func0(const std::string& str) { std::string result; for (size_t i = 0; i < str.length(); i++) { if (i % 2 == 0) { result += str[i]; } } return result; }
int main() { assert(func0("abcdef") == "ace"); assert(func0("python") == "pto"); assert(func0("data") == "dt"); return 0; }
O3
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 push %r15 lea 0x10(%rdi),%rax push %r14 push %r13 push %r12 mov %rdi,%r12 push %rbp push %rbx sub $0x18,%rsp mov %rax,(%rdi) mov %rax,0x8(%rsp) movq $0x0,0x8(%rdi) movb $0x0,0x10(%rdi) m...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push r15 lea rax, [rdi+10h] push r14 push r13 push r12 push rbp mov rbp, rdi push rbx sub rsp, 18h mov [rdi], rax mov [rsp+48h+var_40], rax mov qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 mov rax...
_QWORD * func0(_QWORD *a1, _QWORD *a2) { unsigned long long v2; // rax unsigned long long v3; // rbx long long v4; // r12 char v5; // r15 unsigned long long v6; // r14 long long v7; // rax unsigned long long v8; // rdx long long v9; // rax *a1 = a1 + 2; a1[1] = 0LL; *((_BYTE *)a1 + 16) = 0; v2 ...
func0: ENDBR64 PUSH R15 LEA RAX,[RDI + 0x10] PUSH R14 PUSH R13 PUSH R12 PUSH RBP MOV RBP,RDI PUSH RBX SUB RSP,0x18 MOV qword ptr [RDI],RAX MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 MOV RAX,qword ptr [RSI + 0x8] TEST RAX,RAX JZ 0x001014e3 MOV R13,RSI XOR EBX,EBX JMP 0x0010...
/* func0(std::string const&) */ string * func0(string *param_1) { string sVar1; ulong uVar2; string *psVar3; ulong uVar4; ulong uVar5; long *in_RSI; *(string **)param_1 = param_1 + 0x10; *(int8 *)(param_1 + 8) = 0; param_1[0x10] = (string)0x0; uVar2 = in_RSI[1]; if (uVar2 != 0) { uVar5 = ...
904
func0
#include <assert.h>
int func0(int a, int b, int c) { int smallest; if ((a <= b) && (a <= c)) { smallest = a; } else if ((b <= a) && (b <= c)) { smallest = b; } else { smallest = c; } return smallest; }
int main() { assert(func0(10, 20, 0) == 0); assert(func0(19, 15, 18) == 15); assert(func0(-10, -20, -30) == -30); return 0; }
O0
cpp
func0(int, int, int): endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x14(%rbp) mov %esi,-0x18(%rbp) mov %edx,-0x1c(%rbp) mov -0x14(%rbp),%eax cmp -0x18(%rbp),%eax jg 1172 <_Z5func0iii+0x29> mov -0x14(%rbp),%eax cmp -0x1c(%rbp),%eax jg 1172 <_Z5func0iii+0x29> mov -0x14(%rbp),%eax mov ...
_Z5func0iii: endbr64 push rbp mov rbp, rsp mov [rbp+var_14], edi mov [rbp+var_18], esi mov [rbp+var_1C], edx mov eax, [rbp+var_14] cmp eax, [rbp+var_18] jg short loc_1172 mov eax, [rbp+var_14] cmp eax, [rbp+var_1C] jg short loc_1172 mov eax, [rbp+var_14] mov [rbp+var...
long long func0(signed int a1, signed int a2, signed int a3) { if ( a1 > a2 || a1 > a3 ) { if ( a2 > a1 || a2 > a3 ) return (unsigned int)a3; else return (unsigned int)a2; } else { return (unsigned int)a1; } }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x14],EDI MOV dword ptr [RBP + -0x18],ESI MOV dword ptr [RBP + -0x1c],EDX MOV EAX,dword ptr [RBP + -0x14] CMP EAX,dword ptr [RBP + -0x18] JG 0x00101172 MOV EAX,dword ptr [RBP + -0x14] CMP EAX,dword ptr [RBP + -0x1c] JG 0x00101172 MOV EAX,dword ptr [RBP + -0x14] ...
/* func0(int, int, int) */ int func0(int param_1,int param_2,int param_3) { int local_c; if ((((param_2 < param_1) || (local_c = param_1, param_3 < param_1)) && (local_c = param_3, param_2 <= param_1)) && (param_2 <= param_3)) { local_c = param_2; } return local_c; }
905
func0
#include <assert.h>
int func0(int a, int b, int c) { int smallest; if ((a <= b) && (a <= c)) { smallest = a; } else if ((b <= a) && (b <= c)) { smallest = b; } else { smallest = c; } return smallest; }
int main() { assert(func0(10, 20, 0) == 0); assert(func0(19, 15, 18) == 15); assert(func0(-10, -20, -30) == -30); return 0; }
O1
cpp
func0(int, int, int): endbr64 mov %edi,%eax cmp %edx,%esi mov %edx,%ecx cmovle %esi,%ecx cmp %ecx,%edi jle 1146 <_Z5func0iii+0x1d> cmp %edx,%edi cmovg %edx,%eax cmp %eax,%esi mov %edx,%eax cmovle %esi,%eax retq
_Z5func0iii: endbr64 mov eax, edi cmp esi, edx mov ecx, edx cmovle ecx, esi cmp edi, ecx jle short locret_1146 cmp edi, edx cmovg eax, edx cmp esi, eax mov eax, esi cmovg eax, edx locret_1146: retn
long long func0(int a1, int a2, int a3) { long long result; // rax int v4; // ecx bool v5; // cc result = (unsigned int)a1; v4 = a3; if ( a2 <= a3 ) v4 = a2; if ( a1 > v4 ) { if ( a1 > a3 ) LODWORD(result) = a3; v5 = a2 <= (int)result; result = (unsigned int)a2; if ( !v5 ) ...
func0: ENDBR64 MOV EAX,EDI CMP ESI,EDX MOV ECX,EDX CMOVLE ECX,ESI CMP EDI,ECX JLE 0x00101146 CMP EDI,EDX CMOVG EAX,EDX CMP ESI,EAX MOV EAX,ESI CMOVG EAX,EDX LAB_00101146: RET
/* func0(int, int, int) */ int func0(int param_1,int param_2,int param_3) { bool bVar1; int iVar2; iVar2 = param_3; if (param_2 <= param_3) { iVar2 = param_2; } if (iVar2 < param_1) { if (param_3 < param_1) { param_1 = param_3; } bVar1 = param_1 < param_2; param_1 = param_2; ...
906
func0
#include <assert.h>
int func0(int a, int b, int c) { int smallest; if ((a <= b) && (a <= c)) { smallest = a; } else if ((b <= a) && (b <= c)) { smallest = b; } else { smallest = c; } return smallest; }
int main() { assert(func0(10, 20, 0) == 0); assert(func0(19, 15, 18) == 15); assert(func0(-10, -20, -30) == -30); return 0; }
O2
cpp
func0(int, int, int): endbr64 cmp %edx,%esi mov %edx,%ecx mov %edi,%eax cmovle %esi,%ecx cmp %ecx,%edi jle 115d <_Z5func0iii+0x1d> cmp %edx,%edi cmovg %edx,%eax cmp %eax,%esi mov %edx,%eax cmovle %esi,%eax retq xchg %ax,%ax
_Z5func0iii: endbr64 cmp esi, edx mov ecx, edx mov eax, edi cmovle ecx, esi cmp edi, ecx jle short locret_115D cmp edi, edx cmovg eax, edx cmp esi, eax mov eax, esi cmovg eax, edx locret_115D: retn
long long func0(int a1, int a2, int a3) { int v3; // ecx long long result; // rax bool v5; // cc v3 = a3; result = (unsigned int)a1; if ( a2 <= a3 ) v3 = a2; if ( a1 > v3 ) { if ( a1 > a3 ) LODWORD(result) = a3; v5 = a2 <= (int)result; result = (unsigned int)a2; if ( !v5 ) ...
func0: ENDBR64 CMP ESI,EDX MOV ECX,EDX MOV EAX,EDI CMOVLE ECX,ESI CMP EDI,ECX JLE 0x0010115d CMP EDI,EDX CMOVG EAX,EDX CMP ESI,EAX MOV EAX,ESI CMOVG EAX,EDX LAB_0010115d: RET
/* func0(int, int, int) */ int func0(int param_1,int param_2,int param_3) { bool bVar1; int iVar2; iVar2 = param_3; if (param_2 <= param_3) { iVar2 = param_2; } if (iVar2 < param_1) { if (param_3 < param_1) { param_1 = param_3; } bVar1 = param_1 < param_2; param_1 = param_2; ...
907
func0
#include <assert.h>
int func0(int a, int b, int c) { int smallest; if ((a <= b) && (a <= c)) { smallest = a; } else if ((b <= a) && (b <= c)) { smallest = b; } else { smallest = c; } return smallest; }
int main() { assert(func0(10, 20, 0) == 0); assert(func0(19, 15, 18) == 15); assert(func0(-10, -20, -30) == -30); return 0; }
O3
cpp
func0(int, int, int): endbr64 cmp %edx,%esi mov %edx,%ecx mov %edi,%eax cmovle %esi,%ecx cmp %ecx,%edi jle 115d <_Z5func0iii+0x1d> cmp %edx,%edi cmovg %edx,%eax cmp %eax,%esi mov %edx,%eax cmovle %esi,%eax retq xchg %ax,%ax
_Z5func0iii: endbr64 cmp esi, edx mov ecx, edx mov eax, edi cmovle ecx, esi cmp edi, ecx jle short locret_115D cmp edi, edx cmovg eax, edx cmp esi, eax mov eax, esi cmovg eax, edx locret_115D: retn
long long func0(int a1, int a2, int a3) { int v3; // ecx long long result; // rax bool v5; // cc v3 = a3; result = (unsigned int)a1; if ( a2 <= a3 ) v3 = a2; if ( a1 > v3 ) { if ( a1 > a3 ) LODWORD(result) = a3; v5 = a2 <= (int)result; result = (unsigned int)a2; if ( !v5 ) ...
func0: ENDBR64 CMP ESI,EDX MOV ECX,EDX MOV EAX,EDI CMOVLE ECX,ESI CMP EDI,ECX JLE 0x0010115d CMP EDI,EDX CMOVG EAX,EDX CMP ESI,EAX MOV EAX,ESI CMOVG EAX,EDX LAB_0010115d: RET
/* func0(int, int, int) */ int func0(int param_1,int param_2,int param_3) { bool bVar1; int iVar2; iVar2 = param_3; if (param_2 <= param_3) { iVar2 = param_2; } if (iVar2 < param_1) { if (param_3 < param_1) { param_1 = param_3; } bVar1 = param_1 < param_2; param_1 = param_2; ...
908
func0
#include <cassert>
bool func0(int n, int l, int r) { int num = (((1 << r) - 1) ^ ((1 << (l - 1)) - 1)); int new_num = n & num; if (new_num == 0) { return true; } return false; }
int main() { assert(func0(4, 1, 2) == true); assert(func0(17, 2, 4) == true); assert(func0(39, 4, 6) == false); }
O0
cpp
func0(int, int, int): endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x14(%rbp) mov %esi,-0x18(%rbp) mov %edx,-0x1c(%rbp) mov -0x1c(%rbp),%eax mov $0x1,%edx mov %eax,%ecx shl %cl,%edx mov %edx,%eax lea -0x1(%rax),%edx mov -0x18(%rbp),%eax sub $0x1,%eax mov $0x1,%esi mov %eax,%ecx ...
_Z5func0iii: endbr64 push rbp mov rbp, rsp mov [rbp+var_14], edi mov [rbp+var_18], esi mov [rbp+var_1C], edx mov eax, [rbp+var_1C] mov edx, 1 mov ecx, eax shl edx, cl mov eax, edx lea edx, [rax-1] mov eax, [rbp+var_18] sub eax, 1 mov esi, 1 mov ecx, eax shl ...
_BOOL8 func0(int a1, char a2, char a3) { return ((((1 << a3) - 1) ^ ((1 << (a2 - 1)) - 1)) & a1) == 0; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x14],EDI MOV dword ptr [RBP + -0x18],ESI MOV dword ptr [RBP + -0x1c],EDX MOV EAX,dword ptr [RBP + -0x1c] MOV EDX,0x1 MOV ECX,EAX SHL EDX,CL MOV EAX,EDX LEA EDX,[RAX + -0x1] MOV EAX,dword ptr [RBP + -0x18] SUB EAX,0x1 MOV ESI,0x1 MOV ECX,EAX SHL ESI,CL MOV EAX,E...
/* func0(int, int, int) */ bool func0(int param_1,int param_2,int param_3) { return (param_1 & ((1 << ((char)param_2 - 1U & 0x1f)) - 1U ^ (1 << ((byte)param_3 & 0x1f)) - 1U)) == 0; }
909
func0
#include <cassert>
bool func0(int n, int l, int r) { int num = (((1 << r) - 1) ^ ((1 << (l - 1)) - 1)); int new_num = n & num; if (new_num == 0) { return true; } return false; }
int main() { assert(func0(4, 1, 2) == true); assert(func0(17, 2, 4) == true); assert(func0(39, 4, 6) == false); }
O1
cpp
func0(int, int, int): endbr64 lea -0x1(%rsi),%ecx mov $0x1,%eax mov %eax,%esi shl %cl,%esi sub $0x1,%esi mov %edx,%ecx shl %cl,%eax sub $0x1,%eax xor %esi,%eax test %edi,%eax sete %al retq
_Z5func0iii: endbr64 lea ecx, [rsi-1] mov eax, 1 mov esi, eax shl esi, cl sub esi, 1 mov ecx, edx shl eax, cl sub eax, 1 xor esi, eax test esi, edi setz al retn
bool func0(int a1, char a2, char a3) { return (a1 & (((1 << a3) - 1) ^ ((1 << (a2 - 1)) - 1))) == 0; }
func0: ENDBR64 LEA ECX,[RSI + -0x1] MOV EAX,0x1 MOV ESI,EAX SHL ESI,CL SUB ESI,0x1 MOV ECX,EDX SHL EAX,CL SUB EAX,0x1 XOR ESI,EAX TEST ESI,EDI SETZ AL RET
/* func0(int, int, int) */ int4 func0(int param_1,int param_2,int param_3) { uint uVar1; uVar1 = (1 << ((byte)param_3 & 0x1f)) - 1; return CONCAT31((int3)(uVar1 >> 8), (((1 << ((char)param_2 - 1U & 0x1f)) - 1U ^ uVar1) & param_1) == 0); }
910
func0
#include <cassert>
bool func0(int n, int l, int r) { int num = (((1 << r) - 1) ^ ((1 << (l - 1)) - 1)); int new_num = n & num; if (new_num == 0) { return true; } return false; }
int main() { assert(func0(4, 1, 2) == true); assert(func0(17, 2, 4) == true); assert(func0(39, 4, 6) == false); }
O2
cpp
func0(int, int, int): endbr64 mov $0x1,%eax lea -0x1(%rsi),%ecx mov %eax,%esi shl %cl,%esi mov %edx,%ecx shl %cl,%eax sub $0x1,%esi sub $0x1,%eax xor %esi,%eax test %edi,%eax sete %al retq nopw %cs:0x0(%rax,%rax,1) nopl 0x0(%rax)
_Z5func0iii: endbr64 mov eax, 1 lea ecx, [rsi-1] mov esi, eax shl esi, cl mov ecx, edx shl eax, cl sub esi, 1 sub eax, 1 xor esi, eax test esi, edi setz al retn
bool func0(int a1, char a2, char a3) { return (a1 & (((1 << a3) - 1) ^ ((1 << (a2 - 1)) - 1))) == 0; }
func0: ENDBR64 MOV EAX,0x1 LEA ECX,[RSI + -0x1] MOV ESI,EAX SHL ESI,CL MOV ECX,EDX SHL EAX,CL SUB ESI,0x1 SUB EAX,0x1 XOR ESI,EAX TEST ESI,EDI SETZ AL RET
/* func0(int, int, int) */ int4 func0(int param_1,int param_2,int param_3) { uint uVar1; uVar1 = (1 << ((byte)param_3 & 0x1f)) - 1; return CONCAT31((int3)(uVar1 >> 8), (((1 << ((char)param_2 - 1U & 0x1f)) - 1U ^ uVar1) & param_1) == 0); }
911
func0
#include <cassert>
bool func0(int n, int l, int r) { int num = (((1 << r) - 1) ^ ((1 << (l - 1)) - 1)); int new_num = n & num; if (new_num == 0) { return true; } return false; }
int main() { assert(func0(4, 1, 2) == true); assert(func0(17, 2, 4) == true); assert(func0(39, 4, 6) == false); }
O3
cpp
func0(int, int, int): endbr64 mov $0x1,%eax lea -0x1(%rsi),%ecx mov %eax,%esi shl %cl,%esi mov %edx,%ecx shl %cl,%eax sub $0x1,%esi sub $0x1,%eax xor %esi,%eax test %edi,%eax sete %al retq nopw %cs:0x0(%rax,%rax,1) nopl 0x0(%rax)
_Z5func0iii: endbr64 mov eax, 1 lea ecx, [rsi-1] mov esi, eax shl esi, cl mov ecx, edx shl eax, cl sub esi, 1 sub eax, 1 xor esi, eax test esi, edi setz al retn
bool func0(int a1, char a2, char a3) { return (a1 & (((1 << a3) - 1) ^ ((1 << (a2 - 1)) - 1))) == 0; }
func0: ENDBR64 MOV EAX,0x1 LEA ECX,[RSI + -0x1] MOV ESI,EAX SHL ESI,CL MOV ECX,EDX SHL EAX,CL SUB ESI,0x1 SUB EAX,0x1 XOR ESI,EAX TEST ESI,EDI SETZ AL RET
/* func0(int, int, int) */ int4 func0(int param_1,int param_2,int param_3) { uint uVar1; uVar1 = (1 << ((byte)param_3 & 0x1f)) - 1; return CONCAT31((int3)(uVar1 >> 8), (((1 << ((char)param_2 - 1U & 0x1f)) - 1U ^ uVar1) & param_1) == 0); }
912
func0
#include <vector> #include <assert.h>
std::vector<int> func0(std::vector<int>& arr, int n) { int j = 0; for (int i = 0; i < n; i++) { if (arr[i] < 0) { int temp = arr[i]; arr[i] = arr[j]; arr[j] = temp; j++; } } return arr; }
int main() { std::vector<int> arr1 = {-1, 2, -3, 4, 5, 6, -7, 8, 9}; std::vector<int> arr2 = {12, -14, -26, 13, 15}; std::vector<int> arr3 = {10, 24, 36, -42, -39, -78, 85}; assert(func0(arr1, 9) == std::vector<int>({-1, -3, -7, 4, 5, 6, 2, 8, 9})); assert(func0(arr2, 5) == std::vector<int>({...
O0
cpp
func0(std::vector<int, std::allocator<int> >&, int): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x38,%rsp mov %rdi,-0x28(%rbp) mov %rsi,-0x30(%rbp) mov %edx,-0x34(%rbp) movl $0x0,-0x1c(%rbp) movl $0x0,-0x18(%rbp) mov -0x18(%rbp),%eax cmp -0x34(%rbp),%eax jge 1308 <_Z5func0RSt6vectorI...
_Z5func0RSt6vectorIiSaIiEEi: 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_1C], 0 mov [rbp+var_18], 0 jmp loc_131C loc_1294: mov eax, [rbp+var_18] movsxd rdx, eax mov rax, [rbp+var_30] mov...
long long func0(long long a1, long long a2, int a3) { int v3; // ebx int v6; // [rsp+24h] [rbp-1Ch] int i; // [rsp+28h] [rbp-18h] int v8; // [rsp+2Ch] [rbp-14h] v6 = 0; for ( i = 0; i < a3; ++i ) { if ( *(int *)std::vector<int>::operator[](a2, i) < 0 ) { v8 = *(_DWORD *)std::vector<int>::o...
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 + -0x1c],0x0 MOV dword ptr [RBP + -0x18],0x0 JMP 0x0010131c LAB_00101294: MOV EAX,dword ptr [RBP + -0x18] MOVSXD RDX,EAX MOV RAX,qword ptr [RBP + -...
/* func0(std::vector<int, std::allocator<int> >&, int) */ vector * func0(vector *param_1,int param_2) { int4 uVar1; int4 uVar2; int *piVar3; int4 *puVar4; int in_EDX; int4 in_register_00000034; vector<int,std::allocator<int>> *this; int4 local_24; int4 local_20; this = (vector<int,std::allocato...
913
func0
#include <vector> #include <assert.h>
std::vector<int> func0(std::vector<int>& arr, int n) { int j = 0; for (int i = 0; i < n; i++) { if (arr[i] < 0) { int temp = arr[i]; arr[i] = arr[j]; arr[j] = temp; j++; } } return arr; }
int main() { std::vector<int> arr1 = {-1, 2, -3, 4, 5, 6, -7, 8, 9}; std::vector<int> arr2 = {12, -14, -26, 13, 15}; std::vector<int> arr3 = {10, 24, 36, -42, -39, -78, 85}; assert(func0(arr1, 9) == std::vector<int>({-1, -3, -7, 4, 5, 6, 2, 8, 9})); assert(func0(arr2, 5) == std::vector<int>({...
O1
cpp
func0(std::vector<int, std::allocator<int> >&, int): endbr64 push %r13 push %r12 push %rbp push %rbx sub $0x8,%rsp mov %rdi,%rbp mov %rsi,%rbx test %edx,%edx jle 12c3 <_Z5func0RSt6vectorIiSaIiEEi+0x5a> lea -0x1(%rdx),%eax lea 0x4(,%rax,4),%r9 mov $0x0,%eax mov $0x0,%edi jmp 12b4 <_Z...
_Z5func0RSt6vectorIiSaIiEEi: endbr64 push r13 push r12 push rbp push rbx sub rsp, 8 mov rbp, rdi mov rbx, rsi test edx, edx jle short loc_12C5 movsxd rdx, edx lea rdi, ds:0[rdx*4] mov eax, 0 mov r8d, 0 jmp short loc_12A2 loc_1299: add rax, 4 cmp rdi, rax jz s...
_QWORD * func0(_QWORD *a1, _QWORD *a2, int a3) { long long v5; // rdi long long v6; // rax int v7; // r8d int *v8; // rcx int v9; // edx unsigned long long v10; // r13 _DWORD *v11; // r12 _DWORD *v12; // rsi signed long long v13; // rbx if ( a3 > 0 ) { v5 = 4LL * a3; v6 = 0LL; v7 = 0;...
func0: ENDBR64 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x8 MOV RBP,RDI MOV RBX,RSI TEST EDX,EDX JLE 0x001012c5 MOVSXD RDX,EDX LEA RDI,[RDX*0x4] MOV EAX,0x0 MOV R8D,0x0 JMP 0x001012a2 LAB_00101299: ADD RAX,0x4 CMP RDI,RAX JZ 0x001012c5 LAB_001012a2: MOV RSI,qword ptr [RBX] LEA RCX,[RSI + RAX*0x1] MOV EDX,dword ptr [...
/* func0(std::vector<int, std::allocator<int> >&, int) */ vector * func0(vector *param_1,int param_2) { int *piVar1; int iVar2; int4 *__src; long lVar3; int4 *__dest; int in_EDX; size_t __n; int4 in_register_00000034; long *plVar4; int iVar5; ulong uVar6; plVar4 = (long *)CONCAT44(in_regist...
914
func0
#include <vector> #include <assert.h>
std::vector<int> func0(std::vector<int>& arr, int n) { int j = 0; for (int i = 0; i < n; i++) { if (arr[i] < 0) { int temp = arr[i]; arr[i] = arr[j]; arr[j] = temp; j++; } } return arr; }
int main() { std::vector<int> arr1 = {-1, 2, -3, 4, 5, 6, -7, 8, 9}; std::vector<int> arr2 = {12, -14, -26, 13, 15}; std::vector<int> arr3 = {10, 24, 36, -42, -39, -78, 85}; assert(func0(arr1, 9) == std::vector<int>({-1, -3, -7, 4, 5, 6, 2, 8, 9})); assert(func0(arr2, 5) == std::vector<int>({...
O2
cpp
func0(std::vector<int, std::allocator<int> >&, int): endbr64 push %r12 mov %rdi,%r12 push %rbp mov %rsi,%rbp push %rbx mov (%rsi),%r9 test %edx,%edx jle 1767 <_Z5func0RSt6vectorIiSaIiEEi+0x47> sub $0x1,%edx mov %r9,%rax xor %ecx,%ecx lea 0x4(%r9,%rdx,4),%r8 nopw 0x0(%rax,%rax,1) mov ...
_Z5func0RSt6vectorIiSaIiEEi: endbr64 push r12 mov r12, rsi push rbp push rbx mov rbx, rdi mov r8, [rsi] test edx, edx jle short loc_16C9 movsxd rdx, edx mov rax, r8 xor ecx, ecx lea rdi, [r8+rdx*4] nop dword ptr [rax+00000000h] loc_16A8: mov edx, [rax] test edx, edx j...
long long func0(long long a1, int **a2, int a3) { int *v5; // r8 int *v6; // rax int v7; // ecx int *v8; // rdi int v9; // edx long long v10; // rsi int *v11; // rsi int *v12; // rax unsigned long long v13; // rbp _DWORD *v14; // rcx int *v15; // rsi long long v16; // rbp long long result; //...
func0: ENDBR64 PUSH R12 MOV R12,RSI PUSH RBP PUSH RBX MOV RBX,RDI MOV R8,qword ptr [RSI] TEST EDX,EDX JLE 0x001016c9 MOVSXD RDX,EDX MOV RAX,R8 XOR ECX,ECX LEA RDI,[R8 + RDX*0x4] NOP dword ptr [RAX] LAB_001016a8: MOV EDX,dword ptr [RAX] TEST EDX,EDX JNS 0x001016c0 MOVSXD RSI,ECX ADD ECX,0x1 LEA RSI,[R8 + RSI*0x4] MOV R9...
/* func0(std::vector<int, std::allocator<int> >&, int) */ vector * func0(vector *param_1,int param_2) { int iVar1; vector *pvVar2; int4 *__src; vector *pvVar3; ulong uVar4; int4 *__dest; vector *extraout_RAX; int iVar5; int in_EDX; size_t __n; int4 in_register_00000034; int8 *puVar6; long lV...
915
func0
#include <vector> #include <assert.h>
std::vector<int> func0(std::vector<int>& arr, int n) { int j = 0; for (int i = 0; i < n; i++) { if (arr[i] < 0) { int temp = arr[i]; arr[i] = arr[j]; arr[j] = temp; j++; } } return arr; }
int main() { std::vector<int> arr1 = {-1, 2, -3, 4, 5, 6, -7, 8, 9}; std::vector<int> arr2 = {12, -14, -26, 13, 15}; std::vector<int> arr3 = {10, 24, 36, -42, -39, -78, 85}; assert(func0(arr1, 9) == std::vector<int>({-1, -3, -7, 4, 5, 6, 2, 8, 9})); assert(func0(arr2, 5) == std::vector<int>({...
O3
cpp
func0(std::vector<int, std::allocator<int> >&, int): endbr64 push %r12 mov %rdi,%r12 push %rbp mov %rsi,%rbp push %rbx mov (%rsi),%r9 test %edx,%edx jle 16c7 <_Z5func0RSt6vectorIiSaIiEEi+0x47> sub $0x1,%edx mov %r9,%rax xor %ecx,%ecx lea 0x4(%r9,%rdx,4),%r8 nopw 0x0(%rax,%rax,1) mov ...
_Z5func0RSt6vectorIiSaIiEEi: endbr64 push r12 mov r12, rsi push rbp push rbx mov rbx, rdi mov r8, [rsi] test edx, edx jle short loc_16C9 movsxd rdx, edx mov rax, r8 xor ecx, ecx lea rdi, [r8+rdx*4] nop dword ptr [rax+00000000h] loc_16A8: mov edx, [rax] test edx, edx j...
long long func0(long long a1, int **a2, int a3) { int *v5; // r8 int *v6; // rax int v7; // ecx int *v8; // rdi int v9; // edx long long v10; // rsi int *v11; // rsi int *v12; // rax unsigned long long v13; // rbp _DWORD *v14; // rcx int *v15; // rsi long long v16; // rbp long long result; //...
func0: ENDBR64 PUSH R12 MOV R12,RSI PUSH RBP PUSH RBX MOV RBX,RDI MOV R8,qword ptr [RSI] TEST EDX,EDX JLE 0x001016c9 MOVSXD RDX,EDX MOV RAX,R8 XOR ECX,ECX LEA RDI,[R8 + RDX*0x4] NOP dword ptr [RAX] LAB_001016a8: MOV EDX,dword ptr [RAX] TEST EDX,EDX JNS 0x001016c0 MOVSXD RSI,ECX ADD ECX,0x1 LEA RSI,[R8 + RSI*0x4] MOV R9...
/* func0(std::vector<int, std::allocator<int> >&, int) */ vector * func0(vector *param_1,int param_2) { int iVar1; vector *pvVar2; int4 *__src; vector *pvVar3; ulong uVar4; int4 *__dest; vector *extraout_RAX; int iVar5; int in_EDX; size_t __n; int4 in_register_00000034; int8 *puVar6; long lV...
916
func0
#include <iostream> #include <assert.h> #include <string>
std::string func0(std::string str1, char char1) { for (size_t i = 0; i < str1.length(); i++) { if (str1[i] == ' ') { str1[i] = char1; } } return str1; }
int main() { assert(func0("hello people", '@') == "hello@people"); assert(func0("python program language", '$') == "python$program$language"); assert(func0("blank space", '-') == "blank-space"); return 0; }
O0
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x38,%rsp mov %rdi,-0x28(%rbp) mov %rsi,-0x30(%rbp) mov %edx,%eax mov %al,-0x34(%rbp) movq $0x0,-0x18(%rbp) mov -0x30(%rbp),%rax mov %rax,%rdi callq ...
_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEc: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 38h mov [rbp+var_28], rdi mov [rbp+var_30], rsi mov eax, edx mov [rbp+var_34], al mov [rbp+var_18], 0 jmp short loc_242A loc_23ED: mov rdx, [rbp+var_18] mov rax, [...
long long func0(long long a1, long long a2, char a3) { unsigned long long i; // rax unsigned long long v6; // [rsp+28h] [rbp-18h] v6 = 0LL; for ( i = std::string::length(a2); v6 < i; i = std::string::length(a2) ) { if ( *(_BYTE *)std::string::operator[](a2, v6) == 32 ) *(_BYTE *)std::string::opera...
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 EAX,EDX MOV byte ptr [RBP + -0x34],AL MOV qword ptr [RBP + -0x18],0x0 JMP 0x0010242a LAB_001023ed: MOV RDX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x30] MOV RSI,RDX MOV RDI,RAX CALL 0x...
/* func0(std::string, char) */ string * func0(string *param_1,string *param_2,int param_3) { char *pcVar1; int *puVar2; ulong uVar3; int8 local_20; local_20 = 0; while( true ) { uVar3 = std::string::length(); if (uVar3 <= local_20) break; pcVar1 = (char *)std::string::operator[]((ulong)para...
917
func0
#include <iostream> #include <assert.h> #include <string>
std::string func0(std::string str1, char char1) { for (size_t i = 0; i < str1.length(); i++) { if (str1[i] == ' ') { str1[i] = char1; } } return str1; }
int main() { assert(func0("hello people", '@') == "hello@people"); assert(func0("python program language", '$') == "python$program$language"); assert(func0("blank space", '-') == "blank-space"); return 0; }
O1
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char): endbr64 mov %rdi,%rax cmpq $0x0,0x8(%rsi) je 1279 <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEc+0x30> mov $0x0,%ecx jmp 1268 <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEc+0x1f> ...
_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEc: endbr64 mov rcx, rsi cmp qword ptr [rsi+8], 0 jz loc_132A mov eax, 0 jmp short loc_124C loc_1242: add rax, 1 cmp rax, [rcx+8] jnb short loc_125B loc_124C: mov rsi, rax add rsi, [rcx] cmp byte ptr [rsi], 20h ; ' '...
char ** func0(char **a1, char **a2, char a3) { unsigned long long v4; // rax char *v5; // rsi _QWORD *v6; // rsi char *v7; // rdx char *v8; // rax char *v10; // rdx unsigned int v11; // edx unsigned long long v12; // r9 char *v13; // rsi char *v14; // r10 unsigned int v15; // edx unsigned int v1...
func0: ENDBR64 MOV RCX,RSI CMP qword ptr [RSI + 0x8],0x0 JZ 0x0010132a MOV EAX,0x0 JMP 0x0010124c LAB_00101242: ADD RAX,0x1 CMP RAX,qword ptr [RCX + 0x8] JNC 0x0010125b LAB_0010124c: MOV RSI,RAX ADD RSI,qword ptr [RCX] CMP byte ptr [RSI],0x20 JNZ 0x00101242 MOV byte ptr [RSI],DL JMP 0x00101242 LAB_0010125b: LEA RSI,[RD...
/* func0(std::string, char) */ long * func0(long *param_1,long *param_2,char param_3) { ulong uVar1; uint uVar2; long *plVar3; uint uVar4; long *plVar5; long lVar6; if (param_2[1] == 0) { *param_1 = (long)(param_1 + 2); plVar3 = (long *)*param_2; if (plVar3 == param_2 + 2) { lVar6 =...
918
func0
#include <iostream> #include <assert.h> #include <string>
std::string func0(std::string str1, char char1) { for (size_t i = 0; i < str1.length(); i++) { if (str1[i] == ' ') { str1[i] = char1; } } return str1; }
int main() { assert(func0("hello people", '@') == "hello@people"); assert(func0("python program language", '$') == "python$program$language"); assert(func0("blank space", '-') == "blank-space"); return 0; }
O2
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char): endbr64 mov 0x8(%rsi),%r9 mov %rdi,%rax test %r9,%r9 je 15e4 <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEc+0x34> xor %ecx,%ecx nopw 0x0(%rax,%rax,1) mov (%rsi),%r8 add %rcx,%r8 cmpb $0...
_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEc: endbr64 mov rcx, [rsi+8] mov r8, rdi mov rdi, rcx test rcx, rcx jz short loc_1420 xor eax, eax nop dword ptr [rax] loc_13C8: mov rdi, [rsi] add rdi, rax cmp byte ptr [rdi], 20h ; ' ' jnz short loc_13D9 mov [rd...
char ** func0(char **a1, char **a2, char a3) { unsigned long long v3; // rcx char *v5; // rdi unsigned long long i; // rax char *v7; // rdi _QWORD *v8; // r9 char *v9; // rax unsigned int v10; // ecx char *v11; // rdx char **result; // rax unsigned long long v13; // r10 char *v14; // r9 unsigned...
func0: ENDBR64 MOV RCX,qword ptr [RSI + 0x8] MOV R8,RDI MOV RDI,RCX TEST RCX,RCX JZ 0x00101420 XOR EAX,EAX NOP dword ptr [RAX] LAB_001013c8: MOV RDI,qword ptr [RSI] ADD RDI,RAX CMP byte ptr [RDI],0x20 JNZ 0x001013d9 MOV byte ptr [RDI],DL MOV RCX,qword ptr [RSI + 0x8] LAB_001013d9: ADD RAX,0x1 MOV RDI,RCX CMP RAX,RCX JC...
/* func0(std::string, char) */ long * func0(long *param_1,long *param_2,char param_3) { ulong uVar1; uint uVar2; ulong uVar3; uint uVar4; long *plVar5; long *plVar6; long lVar7; uVar3 = param_2[1]; if (uVar3 == 0) { *param_1 = (long)(param_1 + 2); plVar5 = (long *)*param_2; if (plVar5...
919
func0
#include <iostream> #include <assert.h> #include <string>
std::string func0(std::string str1, char char1) { for (size_t i = 0; i < str1.length(); i++) { if (str1[i] == ' ') { str1[i] = char1; } } return str1; }
int main() { assert(func0("hello people", '@') == "hello@people"); assert(func0("python program language", '$') == "python$program$language"); assert(func0("blank space", '-') == "blank-space"); return 0; }
O3
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char): endbr64 mov 0x8(%rsi),%r9 mov %rdi,%rax test %r9,%r9 je 1638 <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEc+0x28> xor %ecx,%ecx mov (%rsi),%r10 lea (%r10,%rcx,1),%r8 cmpb $0x20,(%r8) je ...
_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEc: endbr64 mov r9, rdi mov rdi, [rsi+8] test rdi, rdi jz loc_1550 xor eax, eax loc_14B6: mov r8, [rsi] loc_14B9: lea rcx, [r8+rax] cmp byte ptr [rcx], 20h ; ' ' jz short loc_1500 add rax, 1 cmp rax, rdi jb shor...
char ** func0(char **a1, char **a2, char a3) { unsigned long long v4; // rdi unsigned long long i; // rax char *v6; // r8 _QWORD *v7; // rcx char *v8; // rax char *v9; // rdx char **result; // rax unsigned int v11; // edi unsigned long long v12; // r8 char *v13; // rcx char *v14; // r11 unsigned...
func0: ENDBR64 MOV R9,RDI MOV RDI,qword ptr [RSI + 0x8] TEST RDI,RDI JZ 0x00101550 XOR EAX,EAX LAB_001014b6: MOV R8,qword ptr [RSI] LAB_001014b9: LEA RCX,[R8 + RAX*0x1] CMP byte ptr [RCX],0x20 JZ 0x00101500 ADD RAX,0x1 CMP RAX,RDI JC 0x001014b9 LAB_001014cb: LEA RCX,[R9 + 0x10] LEA RAX,[RSI + 0x10] MOV qword ptr [R9],R...
/* func0(std::string, char) */ long * func0(long *param_1,long *param_2,char param_3) { ulong uVar1; uint uVar2; long *plVar3; long lVar4; uint uVar5; long *plVar6; ulong uVar7; uVar7 = param_2[1]; if (uVar7 == 0) { *param_1 = (long)(param_1 + 2); plVar6 = (long *)*param_2; if (plVar6...
920
func0
#include <vector> #include <algorithm> #include <cassert> #include <iostream> using namespace std; // Function to find the maximum path sum
int func0(vector<vector<int>>& tri, int n) { if (n > 1) { tri[1][1] = tri[1][1] + tri[0][0]; tri[1][0] = tri[1][0] + tri[0][0]; } for (int i = 2; i < n; i++) { tri[i][0] = tri[i][0] + tri[i - 1][0]; tri[i][i] = tri[i][i] + tri[i - 1][i - 1]; for (int j = 1; j ...
int main() { vector<vector<int>> tri1 {{1}, {2, 1}, {3, 3, 2}}; vector<vector<int>> tri2 {{1}, {1, 2}, {4, 1, 12}}; vector<vector<int>> tri3 {{2}, {3, 2}, {13, 23, 12}}; assert(func0(tri1, 3) == 6); assert(func0(tri2, 3) == 15); assert(func0(tri3, 3) == 28); cout << "All test case...
O0
cpp
func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >&, int): endbr64 push %rbp mov %rsp,%rbp push %r12 push %rbx sub $0x30,%rsp mov %rdi,-0x38(%rbp) mov %esi,-0x3c(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax cmpl ...
_Z5func0RSt6vectorIS_IiSaIiEESaIS1_EEi: endbr64 push rbp mov rbp, rsp push r12 push rbx sub rsp, 30h mov [rbp+var_38], rdi mov [rbp+var_3C], esi mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax cmp [rbp+var_3C], 1 jle loc_13DC mov rax, [rbp+var_38] mov esi, 1 mov ...
long long func0(long long a1, int a2) { long long v2; // rax int v3; // ebx long long v4; // rax int v5; // ebx long long v6; // rax long long v7; // rax int v8; // ebx long long v9; // rax int v10; // ebx long long v11; // rax long long v12; // rax int v13; // ebx long long v14; // rax int...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R12 PUSH RBX SUB RSP,0x30 MOV qword ptr [RBP + -0x38],RDI MOV dword ptr [RBP + -0x3c],ESI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX CMP dword ptr [RBP + -0x3c],0x1 JLE 0x001013dc MOV RAX,qword ptr [RBP + -0x38] MOV ESI,0x1 MOV RDI,RAX CALL 0x00101f9...
/* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >&, int) */ int4 func0(vector *param_1,int param_2) { int iVar1; int iVar2; __normal_iterator _Var3; __normal_iterator _Var4; vector<int,std::allocator<int>> *pvVar5; int *piVar6; int ...
921
func0
#include <vector> #include <algorithm> #include <cassert> #include <iostream> using namespace std; // Function to find the maximum path sum
int func0(vector<vector<int>>& tri, int n) { if (n > 1) { tri[1][1] = tri[1][1] + tri[0][0]; tri[1][0] = tri[1][0] + tri[0][0]; } for (int i = 2; i < n; i++) { tri[i][0] = tri[i][0] + tri[i - 1][0]; tri[i][i] = tri[i][i] + tri[i - 1][i - 1]; for (int j = 1; j ...
int main() { vector<vector<int>> tri1 {{1}, {2, 1}, {3, 3, 2}}; vector<vector<int>> tri2 {{1}, {1, 2}, {4, 1, 12}}; vector<vector<int>> tri3 {{2}, {3, 2}, {13, 23, 12}}; assert(func0(tri1, 3) == 6); assert(func0(tri2, 3) == 15); assert(func0(tri3, 3) == 28); cout << "All test case...
O1
cpp
func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >&, int): endbr64 push %r14 push %r12 push %rbp push %rbx mov %esi,%r12d cmp $0x1,%esi jle 1358 <_Z5func0RSt6vectorIS_IiSaIiEESaIS1_EEi+0x2f> mov (%rdi),%rdx mov 0x18(%rdx),%rax mov ...
_Z5func0RSt6vectorIS_IiSaIiEESaIS1_EEi: endbr64 push r14 push rbx mov r9, rdi mov ebx, esi cmp esi, 1 jle loc_13AD mov rdx, [rdi] mov rax, [rdx+18h] mov rdx, [rdx] mov edx, [rdx] add [rax+4], edx mov rdx, [rdi] mov rax, [rdx+18h] mov rdx, [rdx] mov edx, [rdx] ad...
long long func0(long long a1, int a2) { long long v3; // r8 long long v4; // rdi int i; // r11d long long v6; // rax _DWORD *v7; // rdx long long v8; // rax unsigned int *v9; // rcx unsigned int *v10; // rdx unsigned int *j; // rax if ( a2 > 1 ) { *(_DWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 24LL...
func0: ENDBR64 PUSH R14 PUSH RBX MOV R9,RDI MOV EBX,ESI CMP ESI,0x1 JLE 0x001013ad MOV RDX,qword ptr [RDI] MOV RAX,qword ptr [RDX + 0x18] MOV RDX,qword ptr [RDX] MOV EDX,dword ptr [RDX] ADD dword ptr [RAX + 0x4],EDX MOV RDX,qword ptr [RDI] MOV RAX,qword ptr [RDX + 0x18] MOV RDX,qword ptr [RDX] MOV EDX,dword ptr [RDX] A...
/* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >&, int) */ int func0(vector *param_1,int param_2) { int8 *puVar1; int *piVar2; long lVar3; int *piVar4; long lVar5; int *piVar6; int *piVar7; long lVar8; long lVar9; int iVar10;...
922
func0
#include <vector> #include <algorithm> #include <cassert> #include <iostream> using namespace std; // Function to find the maximum path sum
int func0(vector<vector<int>>& tri, int n) { if (n > 1) { tri[1][1] = tri[1][1] + tri[0][0]; tri[1][0] = tri[1][0] + tri[0][0]; } for (int i = 2; i < n; i++) { tri[i][0] = tri[i][0] + tri[i - 1][0]; tri[i][i] = tri[i][i] + tri[i - 1][i - 1]; for (int j = 1; j ...
int main() { vector<vector<int>> tri1 {{1}, {2, 1}, {3, 3, 2}}; vector<vector<int>> tri2 {{1}, {1, 2}, {4, 1, 12}}; vector<vector<int>> tri3 {{2}, {3, 2}, {13, 23, 12}}; assert(func0(tri1, 3) == 6); assert(func0(tri2, 3) == 15); assert(func0(tri3, 3) == 28); cout << "All test case...
O2
cpp
func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >&, int): endbr64 push %rbx mov (%rdi),%rbx cmp $0x1,%esi jle 1898 <_Z5func0RSt6vectorIS_IiSaIiEESaIS1_EEi+0x88> mov (%rbx),%rdx mov 0x18(%rbx),%rax mov (%rdx),%ecx add %ecx,0x4(%rax)...
_Z5func0RSt6vectorIS_IiSaIiEESaIS1_EEi: endbr64 push rbp mov r11d, esi push rbx mov rbp, [rdi] cmp esi, 1 jle short loc_19E9 mov rdx, [rbp+0] mov rax, [rbp+18h] mov ecx, [rdx] add [rax+4], ecx mov edx, [rdx] add [rax], edx cmp esi, 2 jz short loc_19E9 lea r10, ...
long long func0(long long *a1, int a2) { long long v3; // rbp _DWORD *v4; // rdx _DWORD *v5; // rax _QWORD *v6; // r10 long long v7; // rbx long long v8; // r9 long long i; // r8 _DWORD *v10; // rdi _DWORD *v11; // rsi long long v12; // rax int v13; // edx unsigned int **v14; // rax unsigned ...
func0: ENDBR64 PUSH RBP MOV R11D,ESI PUSH RBX MOV RBP,qword ptr [RDI] CMP ESI,0x1 JLE 0x001019e9 MOV RDX,qword ptr [RBP] MOV RAX,qword ptr [RBP + 0x18] MOV ECX,dword ptr [RDX] ADD dword ptr [RAX + 0x4],ECX MOV EDX,dword ptr [RDX] ADD dword ptr [RAX],EDX CMP ESI,0x2 JZ 0x001019e9 LEA R10,[RBP + 0x18] MOV EBX,ESI MOV R9D...
/* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >&, int) */ int func0(vector *param_1,int param_2) { int8 *puVar1; int *piVar2; int *piVar3; int8 *puVar4; ulong uVar5; int iVar6; int *piVar7; ulong uVar8; long lVar9; puVar1...
923
func0
#include <vector> #include <algorithm> #include <cassert> #include <iostream> using namespace std; // Function to find the maximum path sum
int func0(vector<vector<int>>& tri, int n) { if (n > 1) { tri[1][1] = tri[1][1] + tri[0][0]; tri[1][0] = tri[1][0] + tri[0][0]; } for (int i = 2; i < n; i++) { tri[i][0] = tri[i][0] + tri[i - 1][0]; tri[i][i] = tri[i][i] + tri[i - 1][i - 1]; for (int j = 1; j ...
int main() { vector<vector<int>> tri1 {{1}, {2, 1}, {3, 3, 2}}; vector<vector<int>> tri2 {{1}, {1, 2}, {4, 1, 12}}; vector<vector<int>> tri3 {{2}, {3, 2}, {13, 23, 12}}; assert(func0(tri1, 3) == 6); assert(func0(tri2, 3) == 15); assert(func0(tri3, 3) == 28); cout << "All test case...
O3
cpp
func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >&, int): endbr64 push %r14 push %r13 push %r12 push %rbp push %rbx mov (%rdi),%rbx cmp $0x1,%esi jle 1a18 <_Z5func0RSt6vectorIS_IiSaIiEESaIS1_EEi+0x158> mov (%rbx),%rdx mov 0x18(%r...
_Z5func0RSt6vectorIS_IiSaIiEESaIS1_EEi: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx mov ebx, esi mov r12, [rdi] cmp esi, 1 jle loc_1ADD mov rdx, [r12] mov rax, [r12+18h] mov ecx, [rdx] add [rax+4], ecx mov edx, [rdx] add [rax], edx cmp esi,...
long long func0(long long *a1, int a2) { long long v3; // r12 _DWORD *v4; // rdx _DWORD *v5; // rax char **v6; // r11 long long v7; // rbp unsigned int v8; // r10d long long v9; // r9 long long v10; // r8 char *v11; // rcx char *v12; // rdx long long v13; // rax int v14; // esi unsigned int *...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX MOV EBX,ESI MOV R12,qword ptr [RDI] CMP ESI,0x1 JLE 0x00101add MOV RDX,qword ptr [R12] MOV RAX,qword ptr [R12 + 0x18] MOV ECX,dword ptr [RDX] ADD dword ptr [RAX + 0x4],ECX MOV EDX,dword ptr [RDX] ADD dword ptr [RAX],EDX CMP ESI,0x2 JZ 0x00101add LEA R...
/* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >&, int) */ uint func0(vector *param_1,int param_2) { uint *puVar1; int *piVar2; int *piVar3; int8 *puVar4; int *piVar5; int *piVar6; uint *puVar7; int8 *puVar8; uint *puVar9; ui...
924
func0
#include <vector> #include <queue> #include <cassert> #include <functional>
std::vector<int> func0(const std::vector<int>& list1, int n) { std::priority_queue<int> pq(list1.begin(), list1.end()); std::vector<int> largest; for (int i = 0; i < n; ++i) { largest.push_back(pq.top()); pq.pop(); } return largest; }
int main() { assert((func0({10, 20, 50, 70, 90, 20, 50, 40, 60, 80, 100}, 2) == std::vector<int>{100, 90})); assert((func0({10, 20, 50, 70, 90, 20, 50, 40, 60, 80, 100}, 5) == std::vector<int>{100, 90, 80, 70, 60})); assert((func0({10, 20, 50, 70, 90, 20, 50, 40, 60, 80, 100}, 3) == std::vector<int>{100,...
O0
cpp
func0(std::vector<int, std::allocator<int> > const&, int): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x88,%rsp mov %rdi,-0x78(%rbp) mov %rsi,-0x80(%rbp) mov %edx,-0x84(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax movq $0x0,-0x60(%rbp) movq $0x0,-0x58(%rbp) movq $0x0,...
_Z5func0RKSt6vectorIiSaIiEEi: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 68h mov [rbp+var_58], rdi mov [rbp+var_60], rsi mov [rbp+var_64], edx mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax mov rax, [rbp+var_60] mov rdi, rax call _ZNKSt6vectorIiSaIiEE3endEv; std...
long long func0(long long a1, long long a2, int a3) { long long v3; // rbx long long v4; // rax long long v5; // rax char v8; // [rsp+2Bh] [rbp-45h] BYREF int i; // [rsp+2Ch] [rbp-44h] _BYTE v10[40]; // [rsp+30h] [rbp-40h] BYREF unsigned long long v11; // [rsp+58h] [rbp-18h] v11 = __readfsqword(0x28u)...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x68 MOV qword ptr [RBP + -0x58],RDI MOV qword ptr [RBP + -0x60],RSI MOV dword ptr [RBP + -0x64],EDX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX MOV RAX,qword ptr [RBP + -0x60] MOV RDI,RAX CALL 0x00101bfc MOV RBX,RAX MOV RAX,qword ptr [RBP...
/* func0(std::vector<int, std::allocator<int> > const&, int) */ vector * func0(vector *param_1,int param_2) { __normal_iterator _Var1; less *plVar2; int *piVar3; int in_EDX; int4 in_register_00000034; long in_FS_OFFSET; int local_4c; priority_queue<int,std::vector<int,std::allocator<int>>,std::less<in...
925
func0
#include <vector> #include <queue> #include <cassert> #include <functional>
std::vector<int> func0(const std::vector<int>& list1, int n) { std::priority_queue<int> pq(list1.begin(), list1.end()); std::vector<int> largest; for (int i = 0; i < n; ++i) { largest.push_back(pq.top()); pq.pop(); } return largest; }
int main() { assert((func0({10, 20, 50, 70, 90, 20, 50, 40, 60, 80, 100}, 2) == std::vector<int>{100, 90})); assert((func0({10, 20, 50, 70, 90, 20, 50, 40, 60, 80, 100}, 5) == std::vector<int>{100, 90, 80, 70, 60})); assert((func0({10, 20, 50, 70, 90, 20, 50, 40, 60, 80, 100}, 3) == std::vector<int>{100,...
O1
cpp
func0(std::vector<int, std::allocator<int> > const&, int): endbr64 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x30,%rsp mov %rdi,%rbx mov %edx,%r12d mov %fs:0x28,%rax mov %rax,0x28(%rsp) xor %eax,%eax mov 0x8(%rsi),%rcx mov (%rsi),%rdx movq $0x0,(%rsp) movq $0x0,0x8(%rs...
_Z5func0RKSt6vectorIiSaIiEEi: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 48h mov rax, fs:28h mov [rsp+78h+var_40], rax xor eax, eax mov r13, [rsi+8] mov r15, [rsi] mov [rsp+78h+var_68], 0 mov [rsp+78h+var_60], 0 mov [rsp+78h+var_58], 0 su...
_QWORD * func0(_QWORD *a1, long long a2, int a3) { _DWORD *v3; // r15 signed long long v4; // r13 char *v6; // rax char *v7; // rbx long long i; // r15 int v9; // r15d _DWORD *v10; // rsi long long v11; // rcx char *v13; // [rsp+8h] [rbp-70h] char *v14; // [rsp+18h] [rbp-60h] v3 = *(_DWORD **)a2;...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x48 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x38],RAX XOR EAX,EAX MOV R13,qword ptr [RSI + 0x8] MOV R15,qword ptr [RSI] MOV qword ptr [RSP + 0x10],0x0 MOV qword ptr [RSP + 0x18],0x0 MOV qword ptr [RSP + 0x20],0x0 SUB R13,R15 MOV R14,...
/* func0(std::vector<int, std::allocator<int> > const&, int) */ vector * func0(vector *param_1,int param_2) { long lVar1; int iVar2; int *piVar3; int *__dest; int8 uVar4; int in_EDX; int4 in_register_00000034; _Iter_comp_iter in_R8D; ulong __n; int iVar5; long lVar6; long in_FS_OFFSET; int *...
926
func0
#include <vector> #include <queue> #include <cassert> #include <functional>
std::vector<int> func0(const std::vector<int>& list1, int n) { std::priority_queue<int> pq(list1.begin(), list1.end()); std::vector<int> largest; for (int i = 0; i < n; ++i) { largest.push_back(pq.top()); pq.pop(); } return largest; }
int main() { assert((func0({10, 20, 50, 70, 90, 20, 50, 40, 60, 80, 100}, 2) == std::vector<int>{100, 90})); assert((func0({10, 20, 50, 70, 90, 20, 50, 40, 60, 80, 100}, 5) == std::vector<int>{100, 90, 80, 70, 60})); assert((func0({10, 20, 50, 70, 90, 20, 50, 40, 60, 80, 100}, 3) == std::vector<int>{100,...
O2
cpp
func0(std::vector<int, std::allocator<int> > const&, int): endbr64 push %r15 push %r14 mov %edx,%r14d push %r13 push %r12 mov %rdi,%r12 push %rbp push %rbx sub $0x48,%rsp mov 0x8(%rsi),%rcx mov (%rsi),%rdx xor %esi,%esi mov %fs:0x28,%rax mov %rax,0x38(%rsp) xor %eax,%eax lea 0x...
_Z5func0RKSt6vectorIiSaIiEEi: endbr64 push r15 pxor xmm0, xmm0 push r14 push r13 push r12 push rbp push rbx sub rsp, 48h mov r14, [rsi+8] mov r12, [rsi] mov rax, fs:28h mov [rsp+78h+var_40], rax xor eax, eax movaps [rsp+78h+var_68], xmm0 mov rax, 7FFFFFFFFFFFFFFCh mov ...
long long func0(long long a1, long long a2, int a3) { _DWORD *v3; // r12 signed long long v4; // r14 _DWORD *v6; // rax _DWORD *v7; // rbx long long i; // r12 long long v9; // rsi long long v10; // rax int v11; // r12d long long v12; // rax long long v13; // rcx char *v15; // [rsp+0h] [rbp-70h] ...
func0: ENDBR64 PUSH R15 PXOR XMM0,XMM0 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x48 MOV R14,qword ptr [RSI + 0x8] MOV R12,qword ptr [RSI] MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x38],RAX XOR EAX,EAX MOVAPS xmmword ptr [RSP + 0x10],XMM0 MOV RAX,0x7ffffffffffffffc MOV qword ptr [RSP + 0x20],0x0 SUB...
/* func0(std::vector<int, std::allocator<int> > const&, int) */ vector * func0(vector *param_1,int param_2) { int iVar1; int *__dest; int *piVar2; vector *pvVar3; int in_CL; int extraout_DL; int in_EDX; int4 in_register_00000034; int8 *puVar4; int *piVar5; char *pcVar6; _Iter_comp_iter in_R8D;...
927
func0
#include <vector> #include <queue> #include <cassert> #include <functional>
std::vector<int> func0(const std::vector<int>& list1, int n) { std::priority_queue<int> pq(list1.begin(), list1.end()); std::vector<int> largest; for (int i = 0; i < n; ++i) { largest.push_back(pq.top()); pq.pop(); } return largest; }
int main() { assert((func0({10, 20, 50, 70, 90, 20, 50, 40, 60, 80, 100}, 2) == std::vector<int>{100, 90})); assert((func0({10, 20, 50, 70, 90, 20, 50, 40, 60, 80, 100}, 5) == std::vector<int>{100, 90, 80, 70, 60})); assert((func0({10, 20, 50, 70, 90, 20, 50, 40, 60, 80, 100}, 3) == std::vector<int>{100,...
O3
cpp
func0(std::vector<int, std::allocator<int> > const&, int): endbr64 push %r15 pxor %xmm0,%xmm0 push %r14 mov %edx,%r14d push %r13 mov %rdi,%r13 push %r12 push %rbp push %rbx sub $0x48,%rsp mov 0x8(%rsi),%rcx mov (%rsi),%rdx xor %esi,%esi mov %fs:0x28,%rax mov %rax,0x38(%rsp) xor ...
_Z5func0RKSt6vectorIiSaIiEEi: endbr64 push r15 pxor xmm0, xmm0 push r14 push r13 push r12 push rbp push rbx sub rsp, 48h mov r14, [rsi+8] mov r12, [rsi] mov rax, fs:28h mov [rsp+78h+var_40], rax xor eax, eax movaps [rsp+78h+var_68], xmm0 mov rax, 7FFFFFFFFFFFFFFCh mov ...
long long func0(long long a1, long long a2, int a3) { _DWORD *v3; // r12 signed long long v4; // r14 _DWORD *v6; // rax _DWORD *v7; // rbx long long i; // r12 long long v9; // rax long long v10; // rsi int v11; // r12d long long v12; // rsi long long v13; // rcx char *v15; // [rsp+0h] [rbp-70h] ...
func0: ENDBR64 PUSH R15 PXOR XMM0,XMM0 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x48 MOV R14,qword ptr [RSI + 0x8] MOV R12,qword ptr [RSI] MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x38],RAX XOR EAX,EAX MOVAPS xmmword ptr [RSP + 0x10],XMM0 MOV RAX,0x7ffffffffffffffc MOV qword ptr [RSP + 0x20],0x0 SUB...
/* func0(std::vector<int, std::allocator<int> > const&, int) */ vector * func0(vector *param_1,int param_2) { int iVar1; long lVar2; int *__dest; int *piVar3; int in_EDX; int4 in_register_00000034; int *piVar4; _Iter_comp_iter in_R8D; int iVar5; long lVar6; ulong __n; long in_FS_OFFSET; long...
928
func0
#include <assert.h>
double func0(double r, double h) { double lateralsurface = 2 * 3.1415 * r * h; return lateralsurface; }
int main() { assert(func0(10, 5) == 314.15000000000003); assert(func0(4, 5) == 125.66000000000001); assert(func0(4, 10) == 251.32000000000002); return 0; }
O0
cpp
func0(double, double): endbr64 push %rbp mov %rsp,%rbp movsd %xmm0,-0x18(%rbp) movsd %xmm1,-0x20(%rbp) movsd -0x18(%rbp),%xmm1 movsd 0xf70(%rip),%xmm0 mulsd %xmm1,%xmm0 movsd -0x20(%rbp),%xmm1 mulsd %xmm1,%xmm0 movsd %xmm0,-0x8(%rbp) movsd -0x8(%rbp),%xmm0 pop %rbp retq
_Z5func0dd: endbr64 push rbp mov rbp, rsp movsd [rbp+var_18], xmm0 movsd [rbp+var_20], xmm1 movsd xmm1, [rbp+var_18] movsd xmm0, cs:qword_20B8 mulsd xmm0, xmm1 movsd xmm1, [rbp+var_20] mulsd xmm0, xmm1 movsd [rbp+var_8], xmm0 movsd xmm0, [rbp+var_8] pop rbp retn
double func0(double a1, double a2) { return 6.283 * a1 * a2; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOVSD qword ptr [RBP + -0x18],XMM0 MOVSD qword ptr [RBP + -0x20],XMM1 MOVSD XMM1,qword ptr [RBP + -0x18] MOVSD XMM0,qword ptr [0x001020b8] MULSD XMM0,XMM1 MOVSD XMM1,qword ptr [RBP + -0x20] MULSD XMM0,XMM1 MOVSD qword ptr [RBP + -0x8],XMM0 MOVSD XMM0,qword ptr [RBP + -0x8] POP RBP RE...
/* func0(double, double) */ double func0(double param_1,double param_2) { return DAT_001020b8 * param_1 * param_2; }
929
func0
#include <assert.h>
double func0(double r, double h) { double lateralsurface = 2 * 3.1415 * r * h; return lateralsurface; }
int main() { assert(func0(10, 5) == 314.15000000000003); assert(func0(4, 5) == 125.66000000000001); assert(func0(4, 10) == 251.32000000000002); return 0; }
O1
cpp
func0(double, double): endbr64 mulsd 0xed3(%rip),%xmm0 mulsd %xmm1,%xmm0 retq
_Z5func0dd: endbr64 mulsd xmm0, cs:qword_2008 mulsd xmm0, xmm1 retn
double func0(double a1, double a2) { return a1 * 6.283 * a2; }
func0: ENDBR64 MULSD XMM0,qword ptr [0x00102008] MULSD XMM0,XMM1 RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* func0(double, double) */ double func0(double param_1,double param_2) { return param_1 * _DAT_00102008 * param_2; }
930
func0
#include <assert.h>
double func0(double r, double h) { double lateralsurface = 2 * 3.1415 * r * h; return lateralsurface; }
int main() { assert(func0(10, 5) == 314.15000000000003); assert(func0(4, 5) == 125.66000000000001); assert(func0(4, 10) == 251.32000000000002); return 0; }
O2
cpp
func0(double, double): endbr64 mulsd 0xebc(%rip),%xmm0 mulsd %xmm1,%xmm0 retq nopw %cs:0x0(%rax,%rax,1) nopl 0x0(%rax,%rax,1)
_Z5func0dd: endbr64 mulsd xmm0, cs:qword_2008 mulsd xmm0, xmm1 retn
double func0(double a1, double a2) { return a1 * 6.283 * a2; }
func0: ENDBR64 MULSD XMM0,qword ptr [0x00102008] MULSD XMM0,XMM1 RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* func0(double, double) */ double func0(double param_1,double param_2) { return param_1 * _DAT_00102008 * param_2; }
931
func0
#include <assert.h>
double func0(double r, double h) { double lateralsurface = 2 * 3.1415 * r * h; return lateralsurface; }
int main() { assert(func0(10, 5) == 314.15000000000003); assert(func0(4, 5) == 125.66000000000001); assert(func0(4, 10) == 251.32000000000002); return 0; }
O3
cpp
func0(double, double): endbr64 mulsd 0xebc(%rip),%xmm0 mulsd %xmm1,%xmm0 retq nopw %cs:0x0(%rax,%rax,1) nopl 0x0(%rax,%rax,1)
_Z5func0dd: endbr64 mulsd xmm0, cs:qword_2008 mulsd xmm0, xmm1 retn
double func0(double a1, double a2) { return a1 * 6.283 * a2; }
func0: ENDBR64 MULSD XMM0,qword ptr [0x00102008] MULSD XMM0,XMM1 RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* func0(double, double) */ double func0(double param_1,double param_2) { return param_1 * _DAT_00102008 * param_2; }
932
func0
#include <assert.h>
int func0(int l) { int volume = l * l * l; return volume; }
int main() { assert(func0(3) == 27); assert(func0(2) == 8); assert(func0(5) == 125); return 0; }
O0
cpp
func0(int): endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x14(%rbp) mov -0x14(%rbp),%eax imul %eax,%eax mov -0x14(%rbp),%edx imul %edx,%eax mov %eax,-0x4(%rbp) mov -0x4(%rbp),%eax pop %rbp retq
_Z5func0i: endbr64 push rbp mov rbp, rsp mov [rbp+var_14], edi mov eax, [rbp+var_14] imul eax, eax mov edx, [rbp+var_14] imul eax, edx mov [rbp+var_4], eax mov eax, [rbp+var_4] pop rbp retn
long long func0(int a1) { return (unsigned int)(a1 * a1 * a1); }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x14],EDI MOV EAX,dword ptr [RBP + -0x14] IMUL EAX,EAX MOV EDX,dword ptr [RBP + -0x14] IMUL EAX,EDX MOV dword ptr [RBP + -0x4],EAX MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
/* func0(int) */ int func0(int param_1) { return param_1 * param_1 * param_1; }
933
func0
#include <assert.h>
int func0(int l) { int volume = l * l * l; return volume; }
int main() { assert(func0(3) == 27); assert(func0(2) == 8); assert(func0(5) == 125); return 0; }
O1
cpp
func0(int): endbr64 mov %edi,%eax imul %edi,%eax imul %edi,%eax retq
_Z5func0i: endbr64 mov eax, edi imul eax, edi imul eax, edi retn
long long func0(int a1) { return (unsigned int)(a1 * a1 * a1); }
func0: ENDBR64 MOV EAX,EDI IMUL EAX,EDI IMUL EAX,EDI RET
/* func0(int) */ int func0(int param_1) { return param_1 * param_1 * param_1; }
934
func0
#include <assert.h>
int func0(int l) { int volume = l * l * l; return volume; }
int main() { assert(func0(3) == 27); assert(func0(2) == 8); assert(func0(5) == 125); return 0; }
O2
cpp
func0(int): endbr64 mov %edi,%eax imul %edi,%eax imul %edi,%eax retq nopl (%rax)
_Z5func0i: endbr64 mov eax, edi imul eax, edi imul eax, edi retn
long long func0(int a1) { return (unsigned int)(a1 * a1 * a1); }
func0: ENDBR64 MOV EAX,EDI IMUL EAX,EDI IMUL EAX,EDI RET
/* func0(int) */ int func0(int param_1) { return param_1 * param_1 * param_1; }
935
func0
#include <assert.h>
int func0(int l) { int volume = l * l * l; return volume; }
int main() { assert(func0(3) == 27); assert(func0(2) == 8); assert(func0(5) == 125); return 0; }
O3
cpp
func0(int): endbr64 mov %edi,%eax imul %edi,%eax imul %edi,%eax retq nopl (%rax)
_Z5func0i: endbr64 mov eax, edi imul eax, edi imul eax, edi retn
long long func0(int a1) { return (unsigned int)(a1 * a1 * a1); }
func0: ENDBR64 MOV EAX,EDI IMUL EAX,EDI IMUL EAX,EDI RET
/* func0(int) */ int func0(int param_1) { return param_1 * param_1 * param_1; }
936
func0
#include <cassert>
int func0(int n) { int count = 0; int res = 0; int temp = n; while (temp > 0) { if (count % 2 == 1) { res |= (1 << count); } count += 1; temp >>= 1; } return (n | res); }
int main() { assert(func0(10) == 10); assert(func0(20) == 30); assert(func0(30) == 30); }
O0
cpp
func0(int): endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x14(%rbp) movl $0x0,-0xc(%rbp) movl $0x0,-0x8(%rbp) mov -0x14(%rbp),%eax mov %eax,-0x4(%rbp) cmpl $0x0,-0x4(%rbp) jle 119b <_Z5func0i+0x52> mov -0xc(%rbp),%eax cltd shr $0x1f,%edx add %edx,%eax and $0x1,%eax sub %edx,%eax cmp ...
_Z5func0i: endbr64 push rbp mov rbp, rsp mov [rbp+var_14], edi mov [rbp+var_C], 0 mov [rbp+var_8], 0 mov eax, [rbp+var_14] mov [rbp+var_4], eax jmp short loc_119B loc_116A: mov edx, [rbp+var_C] mov eax, edx sar eax, 1Fh shr eax, 1Fh add edx, eax and edx, 1 sub ...
long long func0(int a1) { int v2; // [rsp+8h] [rbp-Ch] int v3; // [rsp+Ch] [rbp-8h] int i; // [rsp+10h] [rbp-4h] v2 = 0; v3 = 0; for ( i = a1; i > 0; i >>= 1 ) { if ( v2 % 2 == 1 ) v3 |= 1 << v2; ++v2; } return v3 | (unsigned int)a1; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x14],EDI MOV dword ptr [RBP + -0xc],0x0 MOV dword ptr [RBP + -0x8],0x0 MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x4],EAX JMP 0x0010119b LAB_0010116a: MOV EDX,dword ptr [RBP + -0xc] MOV EAX,EDX SAR EAX,0x1f SHR EAX,0x1f ADD EDX,EAX AND EDX,0x1 SUB E...
/* func0(int) */ uint func0(int param_1) { int4 local_14; int4 local_10; int4 local_c; local_14 = 0; local_10 = 0; for (local_c = param_1; 0 < local_c; local_c = local_c >> 1) { if (local_14 % 2 == 1) { local_10 = local_10 | 1 << ((byte)local_14 & 0x1f); } local_14 = local_14 + 1; }...
937
func0
#include <cassert>
int func0(int n) { int count = 0; int res = 0; int temp = n; while (temp > 0) { if (count % 2 == 1) { res |= (1 << count); } count += 1; temp >>= 1; } return (n | res); }
int main() { assert(func0(10) == 10); assert(func0(20) == 30); assert(func0(30) == 30); }
O1
cpp
func0(int): endbr64 mov %edi,%r10d test %edi,%edi jle 1193 <_Z5func0i+0x4a> mov %edi,%esi mov $0x0,%ecx mov $0x0,%eax mov $0x1,%r9d add $0x1,%ecx sar %esi test %esi,%esi jle 1198 <_Z5func0i+0x4f> mov %ecx,%r8d shr $0x1f,%r8d lea (%rcx,%r8,1),%edx and $0x1,%edx sub %r8d,%edx...
_Z5func0i: endbr64 mov eax, edi test edi, edi jle short loc_1198 mov r8d, edi mov esi, 0 mov ecx, 0 mov r11d, 1 loc_1166: mov r9d, ecx shr r9d, 1Fh lea edx, [rcx+r9] and edx, 1 sub edx, r9d mov r9d, esi mov r10d, r11d shl r10d, cl or esi, r10d cmp edx,...
long long func0(int a1) { int v1; // r8d int v2; // esi int v3; // ecx int v4; // r9d if ( a1 <= 0 ) { v2 = 0; } else { v1 = a1; v2 = 0; v3 = 0; do { v4 = v2; v2 |= 1 << v3; if ( v3 % 2 != 1 ) v2 = v4; ++v3; v1 >>= 1; } while ( v1...
func0: ENDBR64 MOV EAX,EDI TEST EDI,EDI JLE 0x00101198 MOV R8D,EDI MOV ESI,0x0 MOV ECX,0x0 MOV R11D,0x1 LAB_00101166: MOV R9D,ECX SHR R9D,0x1f LEA EDX,[RCX + R9*0x1] AND EDX,0x1 SUB EDX,R9D MOV R9D,ESI MOV R10D,R11D SHL R10D,CL OR ESI,R10D CMP EDX,0x1 CMOVNZ ESI,R9D ADD ECX,0x1 SAR R8D,0x1 TEST R8D,R8D JG 0x00101166 LA...
/* func0(int) */ uint func0(int param_1) { uint uVar1; int iVar2; uint uVar3; int iVar4; if (param_1 < 1) { uVar3 = 0; } else { uVar3 = 0; iVar2 = 0; iVar4 = param_1; do { uVar1 = uVar3 | 1 << ((byte)iVar2 & 0x1f); if (iVar2 % 2 != 1) { uVar1 = uVar3; } ...
938
func0
#include <cassert>
int func0(int n) { int count = 0; int res = 0; int temp = n; while (temp > 0) { if (count % 2 == 1) { res |= (1 << count); } count += 1; temp >>= 1; } return (n | res); }
int main() { assert(func0(10) == 10); assert(func0(20) == 30); assert(func0(30) == 30); }
O2
cpp
func0(int): endbr64 test %edi,%edi jle 1178 <_Z5func0i+0x38> mov %edi,%edx xor %ecx,%ecx xor %eax,%eax mov $0x1,%r8d add $0x1,%ecx sar %edx je 116e <_Z5func0i+0x2e> test $0x1,%cl je 1154 <_Z5func0i+0x14> mov %r8d,%esi shl %cl,%esi add $0x1,%ecx or %esi,%eax sar %edx jne ...
_Z5func0i: endbr64 test edi, edi jle short loc_1228 mov edx, edi xor esi, esi xor ecx, ecx mov eax, 1 nop dword ptr [rax+rax+00h] loc_1208: test cl, 1 jz short loc_1216 mov r8d, eax shl r8d, cl or esi, r8d loc_1216: add ecx, 1 sar edx, 1 jnz short loc_1208 mov...
long long func0(int a1) { int v1; // edx int v2; // esi char v3; // cl if ( a1 <= 0 ) return (unsigned int)a1; v1 = a1; v2 = 0; v3 = 0; do { if ( (v3 & 1) != 0 ) v2 |= 1 << v3; ++v3; v1 >>= 1; } while ( v1 ); return v2 | (unsigned int)a1; }
func0: ENDBR64 TEST EDI,EDI JLE 0x00101228 MOV EDX,EDI XOR ESI,ESI XOR ECX,ECX MOV EAX,0x1 NOP dword ptr [RAX + RAX*0x1] LAB_00101208: TEST CL,0x1 JZ 0x00101216 MOV R8D,EAX SHL R8D,CL OR ESI,R8D LAB_00101216: ADD ECX,0x1 SAR EDX,0x1 JNZ 0x00101208 MOV EAX,EDI OR EAX,ESI RET LAB_00101228: MOV EAX,EDI RET
/* func0(int) */ uint func0(int param_1) { byte bVar1; int iVar2; uint uVar3; if (0 < param_1) { uVar3 = 0; bVar1 = 0; iVar2 = param_1; do { if ((bool)(bVar1 & 1)) { uVar3 = uVar3 | 1 << (bVar1 & 0x1f); } bVar1 = bVar1 + 1; iVar2 = iVar2 >> 1; } while (iV...
939
func0
#include <cassert>
int func0(int n) { int count = 0; int res = 0; int temp = n; while (temp > 0) { if (count % 2 == 1) { res |= (1 << count); } count += 1; temp >>= 1; } return (n | res); }
int main() { assert(func0(10) == 10); assert(func0(20) == 30); assert(func0(30) == 30); }
O3
cpp
func0(int): endbr64 test %edi,%edi jle 1180 <_Z5func0i+0x40> mov %edi,%edx sar %edx je 1188 <_Z5func0i+0x48> mov $0x1,%ecx xor %eax,%eax mov $0x1,%r8d nopl 0x0(%rax,%rax,1) test $0x1,%cl je 116c <_Z5func0i+0x2c> mov %r8d,%esi shl %cl,%esi or %esi,%eax add $0x1,%ecx sar %e...
_Z5func0i: endbr64 test edi, edi jle short loc_1178 mov edx, edi xor esi, esi xor ecx, ecx mov eax, 1 nop dword ptr [rax+rax+00h] loc_1158: test cl, 1 jz short loc_1166 mov r8d, eax shl r8d, cl or esi, r8d loc_1166: add ecx, 1 sar edx, 1 jnz short loc_1158 mov...
long long func0(int a1) { int v1; // edx int v2; // esi char v3; // cl if ( a1 <= 0 ) return (unsigned int)a1; v1 = a1; v2 = 0; v3 = 0; do { if ( (v3 & 1) != 0 ) v2 |= 1 << v3; ++v3; v1 >>= 1; } while ( v1 ); return v2 | (unsigned int)a1; }
func0: ENDBR64 TEST EDI,EDI JLE 0x00101178 MOV EDX,EDI XOR ESI,ESI XOR ECX,ECX MOV EAX,0x1 NOP dword ptr [RAX + RAX*0x1] LAB_00101158: TEST CL,0x1 JZ 0x00101166 MOV R8D,EAX SHL R8D,CL OR ESI,R8D LAB_00101166: ADD ECX,0x1 SAR EDX,0x1 JNZ 0x00101158 MOV EAX,EDI OR EAX,ESI RET LAB_00101178: MOV EAX,EDI RET
/* func0(int) */ uint func0(int param_1) { byte bVar1; int iVar2; uint uVar3; if (0 < param_1) { uVar3 = 0; bVar1 = 0; iVar2 = param_1; do { if ((bool)(bVar1 & 1)) { uVar3 = uVar3 | 1 << (bVar1 & 0x1f); } bVar1 = bVar1 + 1; iVar2 = iVar2 >> 1; } while (iV...
940
func0
#include <iostream> #include <cassert>
int func0(int N, int K) { if (N < K) { return -1; } else { int Tri_up = 0; Tri_up = ((N - K + 1) * (N - K + 2)) / 2; int Tri_down = 0; if (N >= 2 * K) { Tri_down = ((N - 2 * K + 1) * (N - 2 * K + 2)) / 2; } return Tri_up + Tri_down; ...
int main() { assert(func0(4, 2) == 7); assert(func0(4, 3) == 3); assert(func0(1, 3) == -1); return 0; }
O0
cpp
func0(int, int): endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x14(%rbp) mov %esi,-0x18(%rbp) mov -0x14(%rbp),%eax cmp -0x18(%rbp),%eax jge 11a6 <_Z5func0ii+0x1d> mov $0xffffffff,%eax jmp 1212 <_Z5func0ii+0x89> movl $0x0,-0x4(%rbp) mov -0x14(%rbp),%eax sub -0x18(%rbp),%eax lea 0x1(%rax...
_Z5func0ii: endbr64 push rbp mov rbp, rsp mov [rbp+var_14], edi mov [rbp+var_18], esi mov eax, [rbp+var_14] cmp eax, [rbp+var_18] jge short loc_1166 mov eax, 0FFFFFFFFh jmp short loc_11D0 loc_1166: mov [rbp+var_4], 0 mov eax, [rbp+var_14] sub eax, [rbp+var_18] lea edx,...
long long func0(int a1, int a2) { int v3; // [rsp+10h] [rbp-8h] if ( a1 < a2 ) return 0xFFFFFFFFLL; v3 = 0; if ( a1 >= 2 * a2 ) v3 = (a1 - 2 * a2 + 1) * (a1 - 2 * a2 + 2) / 2; return (unsigned int)((a1 - a2 + 1) * (a1 - a2 + 2) / 2 + v3); }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x14],EDI MOV dword ptr [RBP + -0x18],ESI MOV EAX,dword ptr [RBP + -0x14] CMP EAX,dword ptr [RBP + -0x18] JGE 0x00101166 MOV EAX,0xffffffff JMP 0x001011d0 LAB_00101166: MOV dword ptr [RBP + -0x4],0x0 MOV EAX,dword ptr [RBP + -0x14] SUB EAX,dword ptr [RBP + -0x18...
/* func0(int, int) */ int func0(int param_1,int param_2) { int4 local_10; if (param_1 < param_2) { local_10 = -1; } else { local_10 = 0; if (param_2 * 2 <= param_1) { local_10 = ((param_1 + param_2 * -2 + 2) * (param_1 + param_2 * -2 + 1)) / 2; } local_10 = local_10 + (((param_1 -...
941
func0
#include <iostream> #include <cassert>
int func0(int N, int K) { if (N < K) { return -1; } else { int Tri_up = 0; Tri_up = ((N - K + 1) * (N - K + 2)) / 2; int Tri_down = 0; if (N >= 2 * K) { Tri_down = ((N - 2 * K + 1) * (N - 2 * K + 2)) / 2; } return Tri_up + Tri_down; ...
int main() { assert(func0(4, 2) == 7); assert(func0(4, 3) == 3); assert(func0(1, 3) == -1); return 0; }
O1
cpp
func0(int, int): endbr64 cmp %esi,%edi jl 11ae <_Z5func0ii+0x45> mov %edi,%edx sub %esi,%edx lea 0x1(%rdx),%ecx lea 0x2(%rdx),%eax imul %eax,%ecx mov %ecx,%eax shr $0x1f,%eax add %ecx,%eax sar %eax mov %eax,%ecx lea (%rsi,%rsi,1),%r8d mov $0x0,%eax cmp %edi,%r8d jg 11ab ...
_Z5func0ii: endbr64 cmp edi, esi jl short loc_116C mov ecx, edi sub ecx, esi lea eax, [rcx+1] lea edx, [rcx+2] imul eax, edx mov edx, eax shr edx, 1Fh add edx, eax sar edx, 1 lea r8d, [rsi+rsi] mov eax, 0 cmp r8d, edi jg short loc_1169 sub ecx, esi lea ...
long long func0(int a1, int a2) { int v2; // ecx int v3; // eax if ( a1 < a2 ) return 0xFFFFFFFFLL; v2 = a1 - a2; v3 = 0; if ( 2 * a2 <= a1 ) v3 = (v2 - a2 + 1) * (v2 - a2 + 2) / 2; return (unsigned int)((v2 + 2) * (v2 + 1) / 2 + v3); }
func0: ENDBR64 CMP EDI,ESI JL 0x0010116c MOV ECX,EDI SUB ECX,ESI LEA EAX,[RCX + 0x1] LEA EDX,[RCX + 0x2] IMUL EAX,EDX MOV EDX,EAX SHR EDX,0x1f ADD EDX,EAX SAR EDX,0x1 LEA R8D,[RSI + RSI*0x1] MOV EAX,0x0 CMP R8D,EDI JG 0x00101169 SUB ECX,ESI LEA EAX,[RCX + 0x1] ADD ECX,0x2 IMUL ECX,EAX MOV EAX,ECX SHR EAX,0x1f ADD EAX,E...
/* func0(int, int) */ int func0(int param_1,int param_2) { int iVar1; int iVar2; if (param_2 <= param_1) { iVar2 = param_1 - param_2; iVar1 = 0; if (param_2 * 2 <= param_1) { iVar1 = (((iVar2 - param_2) + 2) * ((iVar2 - param_2) + 1)) / 2; } return iVar1 + ((iVar2 + 1) * (iVar2 + 2)...
942
func0
#include <iostream> #include <cassert>
int func0(int N, int K) { if (N < K) { return -1; } else { int Tri_up = 0; Tri_up = ((N - K + 1) * (N - K + 2)) / 2; int Tri_down = 0; if (N >= 2 * K) { Tri_down = ((N - 2 * K + 1) * (N - 2 * K + 2)) / 2; } return Tri_up + Tri_down; ...
int main() { assert(func0(4, 2) == 7); assert(func0(4, 3) == 3); assert(func0(1, 3) == -1); return 0; }
O2
cpp
func0(int, int): endbr64 cmp %esi,%edi jl 11f0 <_Z5func0ii+0x30> mov %edi,%edx sub %esi,%edx lea 0x2(%rdx),%ecx lea 0x1(%rdx),%eax imul %ecx,%eax lea (%rsi,%rsi,1),%ecx sar %eax cmp %edi,%ecx jg 11f5 <_Z5func0ii+0x35> sub %esi,%edx lea 0x1(%rdx),%ecx add $0x2,%edx imul %ecx,...
_Z5func0ii: endbr64 cmp edi, esi jl short loc_1170 mov edx, edi sub edx, esi lea ecx, [rdx+2] lea eax, [rdx+1] imul eax, ecx lea ecx, [rsi+rsi] sar eax, 1 cmp ecx, edi jg short locret_1175 sub edx, esi lea ecx, [rdx+1] add edx, 2 imul edx, ecx sar edx, 1 a...
long long func0(int a1, int a2) { int v2; // edx long long result; // rax if ( a1 < a2 ) return 0xFFFFFFFFLL; v2 = a1 - a2; result = (unsigned int)(((v2 + 2) * (v2 + 1)) >> 1); if ( 2 * a2 <= a1 ) return (unsigned int)((((v2 - a2 + 1) * (v2 - a2 + 2)) >> 1) + result); return result; }
func0: ENDBR64 CMP EDI,ESI JL 0x00101170 MOV EDX,EDI SUB EDX,ESI LEA ECX,[RDX + 0x2] LEA EAX,[RDX + 0x1] IMUL EAX,ECX LEA ECX,[RSI + RSI*0x1] SAR EAX,0x1 CMP ECX,EDI JG 0x00101175 SUB EDX,ESI LEA ECX,[RDX + 0x1] ADD EDX,0x2 IMUL EDX,ECX SAR EDX,0x1 ADD EAX,EDX RET LAB_00101170: MOV EAX,0xffffffff LAB_00101175: RET
/* func0(int, int) */ int func0(int param_1,int param_2) { int iVar1; int iVar2; if (param_1 < param_2) { iVar1 = -1; } else { iVar2 = param_1 - param_2; iVar1 = (iVar2 + 1) * (iVar2 + 2) >> 1; if (param_2 * 2 <= param_1) { return iVar1 + (((iVar2 - param_2) + 2) * ((iVar2 - param_2...
943
func0
#include <iostream> #include <cassert>
int func0(int N, int K) { if (N < K) { return -1; } else { int Tri_up = 0; Tri_up = ((N - K + 1) * (N - K + 2)) / 2; int Tri_down = 0; if (N >= 2 * K) { Tri_down = ((N - 2 * K + 1) * (N - 2 * K + 2)) / 2; } return Tri_up + Tri_down; ...
int main() { assert(func0(4, 2) == 7); assert(func0(4, 3) == 3); assert(func0(1, 3) == -1); return 0; }
O3
cpp
func0(int, int): endbr64 cmp %esi,%edi jl 11f0 <_Z5func0ii+0x30> mov %edi,%edx sub %esi,%edx lea 0x2(%rdx),%ecx lea 0x1(%rdx),%eax imul %ecx,%eax lea (%rsi,%rsi,1),%ecx sar %eax cmp %edi,%ecx jg 11f5 <_Z5func0ii+0x35> sub %esi,%edx lea 0x1(%rdx),%ecx add $0x2,%edx imul %ecx,...
_Z5func0ii: endbr64 cmp edi, esi jl short loc_1170 mov edx, edi sub edx, esi lea ecx, [rdx+2] lea eax, [rdx+1] imul eax, ecx lea ecx, [rsi+rsi] sar eax, 1 cmp ecx, edi jg short locret_1175 sub edx, esi lea ecx, [rdx+1] add edx, 2 imul edx, ecx sar edx, 1 a...
long long func0(int a1, int a2) { int v2; // edx long long result; // rax if ( a1 < a2 ) return 0xFFFFFFFFLL; v2 = a1 - a2; result = (unsigned int)(((v2 + 2) * (v2 + 1)) >> 1); if ( 2 * a2 <= a1 ) return (unsigned int)((((v2 - a2 + 1) * (v2 - a2 + 2)) >> 1) + result); return result; }
func0: ENDBR64 CMP EDI,ESI JL 0x00101170 MOV EDX,EDI SUB EDX,ESI LEA ECX,[RDX + 0x2] LEA EAX,[RDX + 0x1] IMUL EAX,ECX LEA ECX,[RSI + RSI*0x1] SAR EAX,0x1 CMP ECX,EDI JG 0x00101175 SUB EDX,ESI LEA ECX,[RDX + 0x1] ADD EDX,0x2 IMUL EDX,ECX SAR EDX,0x1 ADD EAX,EDX RET LAB_00101170: MOV EAX,0xffffffff LAB_00101175: RET
/* func0(int, int) */ int func0(int param_1,int param_2) { int iVar1; int iVar2; if (param_1 < param_2) { iVar1 = -1; } else { iVar2 = param_1 - param_2; iVar1 = (iVar2 + 1) * (iVar2 + 2) >> 1; if (param_2 * 2 <= param_1) { return iVar1 + (((iVar2 - param_2) + 2) * ((iVar2 - param_2...
944
func0
#include <iostream> #include <vector> #include <map> #include <algorithm> #include <assert.h> using namespace std;
map<pair<int, int>, int> func0(vector<pair<int, int>>& test_list) { map<pair<int, int>, int> res; for (auto &ele : test_list) { if (ele.first > ele.second) { swap(ele.first, ele.second); } res[ele]++; } return res; }
int main() { vector<pair<int, int>> test1 = {{3, 1}, {1, 3}, {2, 5}, {5, 2}, {6, 3}}; map<pair<int, int>, int> result1 = {{make_pair(1, 3), 2}, {make_pair(2, 5), 2}, {make_pair(3, 6), 1}}; assert(func0(test1) == result1); vector<pair<int, int>> test2 = {{4, 2}, {2, 4}, {3, 6}, {6, 3}, {7, 4}};...
O0
cpp
func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > >&): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x48,%rsp mov %rdi,-0x48(%rbp) mov %rsi,-0x50(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax mov -0x48(%rbp),%rax mov %rax,%rdi callq 1e4a <_ZNSt3ma...
_Z5func0RSt6vectorISt4pairIiiESaIS1_EE: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 48h mov [rbp+var_48], rdi mov [rbp+var_50], rsi mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax mov rax, [rbp+var_48] mov rdi, rax call _ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEE...
long long func0(long long a1, long long a2) { _DWORD *v2; // rax long long v4; // [rsp+18h] [rbp-38h] BYREF _QWORD v5[2]; // [rsp+20h] [rbp-30h] BYREF _DWORD *v6; // [rsp+30h] [rbp-20h] unsigned long long v7; // [rsp+38h] [rbp-18h] v7 = __readfsqword(0x28u); std::map<std::pair<int,int>,int>::map(a1); ...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x48 MOV qword ptr [RBP + -0x48],RDI MOV qword ptr [RBP + -0x50],RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX MOV RAX,qword ptr [RBP + -0x48] MOV RDI,RAX CALL 0x00101d62 MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x28],RAX MO...
/* func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > >&) */ vector * func0(vector *param_1) { bool bVar1; int *piVar2; vector<std::pair<int,int>,std::allocator<std::pair<int,int>>> *in_RSI; long in_FS_OFFSET; int8 local_40; int8 local_38; vector<std::pair<int,int>,std::allocato...
945
func0
#include <iostream> #include <vector> #include <map> #include <algorithm> #include <assert.h> using namespace std;
map<pair<int, int>, int> func0(vector<pair<int, int>>& test_list) { map<pair<int, int>, int> res; for (auto &ele : test_list) { if (ele.first > ele.second) { swap(ele.first, ele.second); } res[ele]++; } return res; }
int main() { vector<pair<int, int>> test1 = {{3, 1}, {1, 3}, {2, 5}, {5, 2}, {6, 3}}; map<pair<int, int>, int> result1 = {{make_pair(1, 3), 2}, {make_pair(2, 5), 2}, {make_pair(3, 6), 1}}; assert(func0(test1) == result1); vector<pair<int, int>> test2 = {{4, 2}, {2, 4}, {3, 6}, {6, 3}, {7, 4}};...
O1
cpp
func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > >&): endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x28,%rsp mov %rdi,%r13 movl $0x0,0x8(%rdi) movq $0x0,0x10(%rdi) lea 0x8(%rdi),%r14 mov %r14,0x18(%rdi) mov %r14,0x20(%rdi) movq $0x0...
_Z5func0RSt6vectorISt4pairIiiESaIS1_EE: endbr64 push r14 push r13 push r12 push rbp push rbx sub rsp, 20h mov rbp, rdi mov rax, fs:28h mov [rsp+48h+var_30], rax xor eax, eax mov dword ptr [rdi+8], 0 mov qword ptr [rdi+10h], 0 lea r12, [rdi+8] mov [rdi+18h], r12 mov ...
long long func0(long long a1, int **a2) { _DWORD *v3; // r12 int *v4; // rbx int *v5; // r13 long long v6; // rdx int v7; // ecx _DWORD *v8; // rsi int v9; // edx int v10; // edx int v11; // ecx int v12; // edi char v14; // [rsp+Fh] [rbp-39h] BYREF _QWORD v15[7]; // [rsp+10h] [rbp-38h] BYREF ...
func0: ENDBR64 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x20 MOV RBP,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x18],RAX XOR EAX,EAX MOV dword ptr [RDI + 0x8],0x0 MOV qword ptr [RDI + 0x10],0x0 LEA R12,[RDI + 0x8] MOV qword ptr [RDI + 0x18],R12 MOV qword ptr [RDI + 0x20],R12 MOV qword ptr [RDI + ...
/* func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > >&) */ vector * func0(vector *param_1) { piecewise_construct_t *ppVar1; int iVar2; int *piVar3; _Rb_tree_iterator _Var4; int4 extraout_var; piecewise_construct_t *ppVar6; piecewise_construct_t *ppVar7; int *piVar8; int8 *...
946
func0
#include <iostream> #include <vector> #include <map> #include <algorithm> #include <assert.h> using namespace std;
map<pair<int, int>, int> func0(vector<pair<int, int>>& test_list) { map<pair<int, int>, int> res; for (auto &ele : test_list) { if (ele.first > ele.second) { swap(ele.first, ele.second); } res[ele]++; } return res; }
int main() { vector<pair<int, int>> test1 = {{3, 1}, {1, 3}, {2, 5}, {5, 2}, {6, 3}}; map<pair<int, int>, int> result1 = {{make_pair(1, 3), 2}, {make_pair(2, 5), 2}, {make_pair(3, 6), 1}}; assert(func0(test1) == result1); vector<pair<int, int>> test2 = {{4, 2}, {2, 4}, {3, 6}, {6, 3}, {7, 4}};...
O2
cpp
func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > >&): endbr64 push %r15 push %r14 push %r13 lea 0x8(%rdi),%r13 push %r12 mov %rdi,%r12 push %rbp push %rbx sub $0x8,%rsp mov (%rsi),%rbx mov 0x8(%rsi),%r14 mov %r13,0x18(%rdi) movl $0x0,0x8(%rdi) movq $0x0,0x10(...
_Z5func0RSt6vectorISt4pairIiiESaIS1_EE: endbr64 push r15 push r14 push r13 lea r13, [rdi+8] push r12 mov r12, rdi push rbp push rbx sub rsp, 8 mov rbp, [rsi] mov r14, [rsi+8] mov [rdi+18h], r13 mov dword ptr [rdi+8], 0 mov qword ptr [rdi+10h], 0 mov [rdi+20h], r13 m...
long long func0(long long a1, __m128i **a2) { _DWORD *v2; // r13 __m128i *v4; // rbp __m128i *v5; // r14 long long i; // rax __m128i v7; // xmm0 int v8; // edx int v9; // ecx int v10; // esi _DWORD *v11; // rbx _DWORD *v12; // r15 long long v13; // rax long long insert_hint_unique_pos; // rax ...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 LEA R13,[RDI + 0x8] PUSH R12 MOV R12,RDI PUSH RBP PUSH RBX SUB RSP,0x8 MOV RBP,qword ptr [RSI] MOV R14,qword ptr [RSI + 0x8] MOV qword ptr [RDI + 0x18],R13 MOV dword ptr [RDI + 0x8],0x0 MOV qword ptr [RDI + 0x10],0x0 MOV qword ptr [RDI + 0x20],R13 MOV qword ptr [RDI + 0x28],0x0...
/* func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > >&) */ vector * func0(vector *param_1) { _Rb_tree_node_base *p_Var1; _Rb_tree_node_base *p_Var2; int *piVar3; int8 *puVar4; int8 uVar5; _Rb_tree_node_base *p_Var6; _Rb_tree_node_base *p_Var7; int iVar8; _Rb_tree_node_base...
947
func0
#include <iostream> #include <vector> #include <map> #include <algorithm> #include <assert.h> using namespace std;
map<pair<int, int>, int> func0(vector<pair<int, int>>& test_list) { map<pair<int, int>, int> res; for (auto &ele : test_list) { if (ele.first > ele.second) { swap(ele.first, ele.second); } res[ele]++; } return res; }
int main() { vector<pair<int, int>> test1 = {{3, 1}, {1, 3}, {2, 5}, {5, 2}, {6, 3}}; map<pair<int, int>, int> result1 = {{make_pair(1, 3), 2}, {make_pair(2, 5), 2}, {make_pair(3, 6), 1}}; assert(func0(test1) == result1); vector<pair<int, int>> test2 = {{4, 2}, {2, 4}, {3, 6}, {6, 3}, {7, 4}};...
O3
cpp
func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > >&): endbr64 push %r15 push %r14 push %r13 lea 0x8(%rdi),%r13 push %r12 mov %rdi,%r12 push %rbp push %rbx sub $0x8,%rsp mov (%rsi),%rbx mov 0x8(%rsi),%r14 mov %r13,0x18(%rdi) movl $0x0,0x8(%rdi) movq $0x0,0x10(...
_Z5func0RSt6vectorISt4pairIiiESaIS1_EE: endbr64 push r15 push r14 push r13 lea r13, [rdi+8] push r12 mov r12, rdi push rbp push rbx sub rsp, 8 mov rbp, [rsi] mov r14, [rsi+8] mov [rdi+18h], r13 mov dword ptr [rdi+8], 0 mov qword ptr [rdi+10h], 0 mov [rdi+20h], r13 m...
long long func0(long long a1, __m128i **a2) { _DWORD *v2; // r13 __m128i *v4; // rbp __m128i *v5; // r14 long long i; // rax __m128i v7; // xmm0 int v8; // edx int v9; // ecx int v10; // esi _DWORD *v11; // rbx _DWORD *v12; // r15 long long v13; // rax long long insert_hint_unique_pos; // rax ...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 LEA R13,[RDI + 0x8] PUSH R12 MOV R12,RDI PUSH RBP PUSH RBX SUB RSP,0x8 MOV RBP,qword ptr [RSI] MOV R14,qword ptr [RSI + 0x8] MOV qword ptr [RDI + 0x18],R13 MOV dword ptr [RDI + 0x8],0x0 MOV qword ptr [RDI + 0x10],0x0 MOV qword ptr [RDI + 0x20],R13 MOV qword ptr [RDI + 0x28],0x0...
/* func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > >&) */ vector * func0(vector *param_1) { _Rb_tree_node_base *p_Var1; _Rb_tree_node_base *p_Var2; int *piVar3; int8 *puVar4; int8 uVar5; _Rb_tree_node_base *p_Var6; _Rb_tree_node_base *p_Var7; int iVar8; _Rb_tree_node_base...
948
func0
#include <iostream> #include <assert.h> #include <string>
int func0(const std::string& str) { int str_len = str.length(); return int(str_len * (str_len + 1) / 2); }
int main() { assert(func0("abc") == 6); assert(func0("abcd") == 10); assert(func0("abcde") == 15); return 0; }
O0
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 push %rbp mov %rsp,%rbp sub $0x20,%rsp mov %rdi,-0x18(%rbp) mov -0x18(%rbp),%rax mov %rax,%rdi callq 12b0 <_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv@plt> mov %eax,-0x4(%rbp) ...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_18], rdi mov rax, [rbp+var_18] mov rdi, rax call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv; std::string::length(void) mov [rbp+var_4], eax mov ...
long long func0(long long a1) { int v2; // [rsp+1Ch] [rbp-4h] v2 = std::string::length(a1); return (unsigned int)(v2 * (v2 + 1) / 2); }
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x18],RDI MOV RAX,qword ptr [RBP + -0x18] MOV RDI,RAX CALL 0x00101200 MOV dword ptr [RBP + -0x4],EAX MOV EAX,dword ptr [RBP + -0x4] ADD EAX,0x1 IMUL EAX,dword ptr [RBP + -0x4] MOV EDX,EAX SHR EDX,0x1f ADD EAX,EDX SAR EAX,0x1 LEAVE RET
/* func0(std::string const&) */ int func0(string *param_1) { int iVar1; iVar1 = std::string::length(); return ((iVar1 + 1) * iVar1) / 2; }
949
func0
#include <iostream> #include <assert.h> #include <string>
int func0(const std::string& str) { int str_len = str.length(); return int(str_len * (str_len + 1) / 2); }
int main() { assert(func0("abc") == 6); assert(func0("abcd") == 10); assert(func0("abcde") == 15); return 0; }
O1
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 mov 0x8(%rdi),%rdx lea 0x1(%rdx),%eax imul %eax,%edx mov %edx,%eax shr $0x1f,%eax add %edx,%eax sar %eax retq
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 mov rax, [rdi+8] lea edx, [rax+1] imul edx, eax mov eax, edx shr eax, 1Fh add eax, edx sar eax, 1 retn
long long func0(long long a1) { return (unsigned int)((int)(*(_QWORD *)(a1 + 8) * (*(_QWORD *)(a1 + 8) + 1)) / 2); }
func0: ENDBR64 MOV RAX,qword ptr [RDI + 0x8] LEA EDX,[RAX + 0x1] IMUL EDX,EAX MOV EAX,EDX SHR EAX,0x1f ADD EAX,EDX SAR EAX,0x1 RET
/* func0(std::string const&) */ int func0(string *param_1) { return (((int)*(int8 *)(param_1 + 8) + 1) * (int)*(int8 *)(param_1 + 8)) / 2; }
950
func0
#include <iostream> #include <assert.h> #include <string>
int func0(const std::string& str) { int str_len = str.length(); return int(str_len * (str_len + 1) / 2); }
int main() { assert(func0("abc") == 6); assert(func0("abcd") == 10); assert(func0("abcde") == 15); return 0; }
O2
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 mov 0x8(%rdi),%rdx lea 0x1(%rdx),%eax imul %eax,%edx mov %edx,%eax shr $0x1f,%eax add %edx,%eax sar %eax retq nopl 0x0(%rax,%rax,1)
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 mov rax, [rdi+8] lea edx, [rax+1] imul edx, eax mov eax, edx shr eax, 1Fh add eax, edx sar eax, 1 retn
long long func0(long long a1) { return (unsigned int)((int)(*(_QWORD *)(a1 + 8) * (*(_QWORD *)(a1 + 8) + 1)) / 2); }
func0: ENDBR64 MOV RAX,qword ptr [RDI + 0x8] LEA EDX,[RAX + 0x1] IMUL EDX,EAX MOV EAX,EDX SHR EAX,0x1f ADD EAX,EDX SAR EAX,0x1 RET
/* func0(std::string const&) */ int func0(string *param_1) { return (((int)*(int8 *)(param_1 + 8) + 1) * (int)*(int8 *)(param_1 + 8)) / 2; }
951
func0
#include <iostream> #include <assert.h> #include <string>
int func0(const std::string& str) { int str_len = str.length(); return int(str_len * (str_len + 1) / 2); }
int main() { assert(func0("abc") == 6); assert(func0("abcd") == 10); assert(func0("abcde") == 15); return 0; }
O3
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 mov 0x8(%rdi),%rdx lea 0x1(%rdx),%eax imul %eax,%edx mov %edx,%eax shr $0x1f,%eax add %edx,%eax sar %eax retq nopl 0x0(%rax,%rax,1)
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 mov rax, [rdi+8] lea edx, [rax+1] imul edx, eax mov eax, edx shr eax, 1Fh add eax, edx sar eax, 1 retn
long long func0(long long a1) { return (unsigned int)((int)(*(_QWORD *)(a1 + 8) * (*(_QWORD *)(a1 + 8) + 1)) / 2); }
func0: ENDBR64 MOV RAX,qword ptr [RDI + 0x8] LEA EDX,[RAX + 0x1] IMUL EDX,EAX MOV EAX,EDX SHR EAX,0x1f ADD EAX,EDX SAR EAX,0x1 RET
/* func0(std::string const&) */ int func0(string *param_1) { return (((int)*(int8 *)(param_1 + 8) + 1) * (int)*(int8 *)(param_1 + 8)) / 2; }
952
func0
#include <vector> #include <assert.h>
int func0(int m, int n) { std::vector<std::vector<int>> T(m + 1, std::vector<int>(n + 1)); for (int i = 0; i <= m; ++i) { for (int j = 0; j <= n; ++j) { if (i == 0 || j == 0) { T[i][j] = 0; } else if (i < j) { T[i][j] = 0; } els...
int main() { assert(func0(10, 4) == 4); assert(func0(5, 2) == 6); assert(func0(16, 3) == 84); return 0; }
O0
cpp
func0(int, int): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x68,%rsp mov %edi,-0x64(%rbp) mov %esi,-0x68(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax lea -0x59(%rbp),%rax mov %rax,%rdi callq 1706 <_ZNSaISt6vectorIiSaIiEEEC1Ev> lea -0x5a(%rbp),%rax mov %rax,%rdi c...
_Z5func0ii: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 78h mov [rbp+var_74], edi mov [rbp+var_78], esi mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax lea rax, [rbp+var_69] mov [rbp+var_58], rax nop nop lea rax, [rbp+var_6A] mov [rbp+var_60], rax nop nop mov ...
long long func0(int a1, int a2) { long long v2; // rax int v3; // ebx long long v4; // rax long long v5; // rax int v6; // ebx long long v7; // rax long long v8; // rax unsigned int v9; // ebx char v11; // [rsp+16h] [rbp-6Ah] BYREF char v12; // [rsp+17h] [rbp-69h] BYREF int i; // [rsp+18h] [rbp-6...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x78 MOV dword ptr [RBP + -0x74],EDI MOV dword ptr [RBP + -0x78],ESI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX LEA RAX,[RBP + -0x69] MOV qword ptr [RBP + -0x58],RAX NOP NOP LEA RAX,[RBP + -0x6a] MOV qword ptr [RBP + -0x60],RAX NOP NOP MO...
/* func0(int, int) */ int4 func0(int param_1,int param_2) { int iVar1; int iVar2; int4 uVar3; int *piVar4; vector<int,std::allocator<int>> *pvVar5; int4 *puVar6; long in_FS_OFFSET; allocator local_72; allocator local_71; int local_70; int local_6c; allocator *local_68; allocator *local_60; ...
953
func0
#include <vector> #include <assert.h>
int func0(int m, int n) { std::vector<std::vector<int>> T(m + 1, std::vector<int>(n + 1)); for (int i = 0; i <= m; ++i) { for (int j = 0; j <= n; ++j) { if (i == 0 || j == 0) { T[i][j] = 0; } else if (i < j) { T[i][j] = 0; } els...
int main() { assert(func0(10, 4) == 4); assert(func0(5, 2) == 6); assert(func0(16, 3) == 84); return 0; }
O1
cpp
func0(int, int): endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x28,%rsp mov %edi,0x1c(%rsp) mov %esi,%eax mov %esi,0x18(%rsp) add $0x1,%eax cltq movabs $0x1fffffffffffffff,%rdx cmp %rdx,%rax ja 12f7 <_Z5func0ii+0x8e> test %rax,%rax je 1303 <_Z5func0ii+...
_Z5func0ii: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 38h mov rax, fs:28h mov [rsp+68h+var_40], rax xor eax, eax lea ebp, [rsi+1] movsxd rbp, ebp mov rax, rbp shr rax, 3Dh jnz short loc_1317 mov r12d, edi mov ebx, esi test rbp, r...
long long func0(int a1, int a2) { unsigned long long v2; // rbp _DWORD *v4; // r14 _DWORD *v5; // rdx _DWORD *v6; // rax unsigned long long v7; // r15 _QWORD *v8; // rbp long long v9; // r13 _QWORD *v10; // rsi int v11; // ecx int v12; // eax long long v13; // rdx unsigned int v14; // r12d vo...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x38 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x28],RAX XOR EAX,EAX LEA EBP,[RSI + 0x1] MOVSXD RBP,EBP MOV RAX,RBP SHR RAX,0x3d JNZ 0x00101317 MOV R12D,EDI MOV EBX,ESI TEST RBP,RBP JZ 0x001014f8 LEA R15,[RBP*0x4] MOV qword ptr [RSP + 0...
/* func0(int, int) */ int4 func0(int param_1,int param_2) { int4 uVar1; void *pvVar2; int4 *puVar3; int iVar4; int8 uVar5; vector *pvVar6; vector *pvVar7; int iVar8; long lVar9; ulong uVar10; vector *pvVar11; long in_FS_OFFSET; ulong local_60; int4 *local_58; int4 *local_50; int4 *loca...
954
func0
#include <vector> #include <assert.h>
int func0(int m, int n) { std::vector<std::vector<int>> T(m + 1, std::vector<int>(n + 1)); for (int i = 0; i <= m; ++i) { for (int j = 0; j <= n; ++j) { if (i == 0 || j == 0) { T[i][j] = 0; } else if (i < j) { T[i][j] = 0; } els...
int main() { assert(func0(10, 4) == 4); assert(func0(5, 2) == 6); assert(func0(16, 3) == 84); return 0; }
O2
cpp
func0(int, int): endbr64 movabs $0x1fffffffffffffff,%rdx push %r15 mov %esi,%eax push %r14 add $0x1,%eax push %r13 cltq push %r12 push %rbp push %rbx sub $0x28,%rsp mov %edi,0x1c(%rsp) mov %esi,0xc(%rsp) cmp %rdx,%rax ja 161a <_Z5func0ii+0x2aa> test %rax,%rax je 15a8 <_Z5func0ii+...
_Z5func0ii: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx movsxd rbx, esi lea r14d, [rbx+1] movsxd r14, r14d sub rsp, 38h mov rax, fs:28h mov [rsp+68h+var_40], rax xor eax, eax mov rax, r14 shr rax, 3Dh jnz loc_1617 pxor xmm0, xmm0 mov r12d, edi...
long long func0(int a1, int a2) { long long v2; // rbx unsigned long long v3; // r14 _DWORD *v5; // rax void *v6; // r15 _DWORD *v7; // rdi unsigned long long v8; // r13 long long *v9; // rbp long long v10; // r13 long long *v11; // r9 int v12; // edi long long v13; // rsi long long v14; // rdx...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX MOVSXD RBX,ESI LEA R14D,[RBX + 0x1] MOVSXD R14,R14D SUB RSP,0x38 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x28],RAX XOR EAX,EAX MOV RAX,R14 SHR RAX,0x3d JNZ 0x00101617 PXOR XMM0,XMM0 MOV R12D,EDI MOVUPS xmmword ptr [RSP + 0x18],XMM0 TEST R14,R...
/* func0(int, int) */ int4 func0(int param_1,int param_2) { int4 *__s; ulong uVar1; int4 uVar2; long lVar3; void *pvVar4; int iVar5; int4 *puVar6; vector *pvVar7; vector *pvVar8; int8 uVar9; long lVar10; int iVar11; int4 *puVar12; vector *pvVar13; ulong uVar14; ulong uVar15; long in_...
955
func0
#include <vector> #include <assert.h>
int func0(int m, int n) { std::vector<std::vector<int>> T(m + 1, std::vector<int>(n + 1)); for (int i = 0; i <= m; ++i) { for (int j = 0; j <= n; ++j) { if (i == 0 || j == 0) { T[i][j] = 0; } else if (i < j) { T[i][j] = 0; } els...
int main() { assert(func0(10, 4) == 4); assert(func0(5, 2) == 6); assert(func0(16, 3) == 84); return 0; }
O3
cpp
func0(int, int): endbr64 movabs $0x1fffffffffffffff,%rdx push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx movslq %esi,%rbx lea 0x1(%rbx),%eax cltq sub $0x28,%rsp mov %edi,0x1c(%rsp) cmp %rdx,%rax ja 1722 <_Z5func0ii+0x382> test %rax,%rax je 1628 <_Z5func0ii+0x288> lea 0x0...
_Z5func0ii: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx movsxd rbx, esi lea r14d, [rbx+1] movsxd r14, r14d sub rsp, 38h mov rax, fs:28h mov [rsp+68h+var_40], rax xor eax, eax mov rax, r14 shr rax, 3Dh jnz loc_168A pxor xmm0, xmm0 mov r12d, edi...
long long func0(int a1, int a2) { long long v2; // rbx unsigned long long v3; // r14 _DWORD *v5; // rax void *v6; // r15 _DWORD *v7; // rdi unsigned long long v8; // r13 long long *v9; // rbp long long v10; // r13 long long *v11; // r8 long long *v12; // r11 int v13; // r9d char i; // di int ...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX MOVSXD RBX,ESI LEA R14D,[RBX + 0x1] MOVSXD R14,R14D SUB RSP,0x38 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x28],RAX XOR EAX,EAX MOV RAX,R14 SHR RAX,0x3d JNZ 0x0010168a PXOR XMM0,XMM0 MOV R12D,EDI MOVUPS xmmword ptr [RSP + 0x18],XMM0 TEST R14,R...
/* func0(int, int) */ int4 func0(int param_1,int param_2) { int4 *__s; ulong uVar1; int4 uVar2; long lVar3; void *pvVar4; bool bVar5; int iVar6; int4 *puVar7; vector *pvVar8; vector *pvVar9; int8 uVar10; long lVar11; vector *pvVar12; int iVar13; int4 *puVar14; vector *pvVar15; int iV...
956
func0
#include <cassert> #include <vector> #include <string> template <typename T>
std::vector<T> func0(std::vector<T> list1, std::vector<T> list2) { if (!list1.empty()) { list1.resize(list1.size() - 1); } list1.insert(list1.end(), list2.begin(), list2.end()); return list1; }
int main() { // First test std::vector<int> result1 = func0(std::vector<int>{1, 3, 5, 7, 9, 10}, std::vector<int>{2, 4, 6, 8}); std::vector<int> expected1{1, 3, 5, 7, 9, 2, 4, 6, 8}; assert(result1 == expected1); // Second test std::vector<int> result2 = func0(std::vector<int>{1, 2, ...
O0
cpp
std::vector<int, std::allocator<int> > func0<int>(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...
_Z5func0IiESt6vectorIT_SaIS1_EES3_S3_: 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_40] mov rdi, rax call _ZNKSt6vect...
long long func0<int>(long long a1, long long a2, long long a3) { long long v3; // rax long long v4; // r12 long long v5; // rbx long long v8; // [rsp+28h] [rbp-28h] BYREF _QWORD v9[4]; // [rsp+30h] [rbp-20h] BYREF v9[1] = __readfsqword(0x28u); if ( (unsigned __int8)std::vector<int>::empty(a2) != 1 ) {...
func0<int>: 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 + -0x40] MOV RDI,RAX CALL 0x00103e14 XOR EAX,0x1 TEST AL,...
/* std::vector<int, std::allocator<int> > func0<int>(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >) */ vector<int,std::allocator<int>> * func0<int>(vector<int,std::allocator<int>> *param_1,vector<int,std::allocator<int>> *param_2, vector<int,std::allocator<int>> *param_3) ...
957
func0
#include <cassert> #include <vector> #include <string> template <typename T>
std::vector<T> func0(std::vector<T> list1, std::vector<T> list2) { if (!list1.empty()) { list1.resize(list1.size() - 1); } list1.insert(list1.end(), list2.begin(), list2.end()); return list1; }
int main() { // First test std::vector<int> result1 = func0(std::vector<int>{1, 3, 5, 7, 9, 10}, std::vector<int>{2, 4, 6, 8}); std::vector<int> expected1{1, 3, 5, 7, 9, 2, 4, 6, 8}; assert(result1 == expected1); // Second test std::vector<int> result2 = func0(std::vector<int>{1, 2, ...
O1
cpp
std::vector<int, std::allocator<int> > func0<int>(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >): endbr64 push %rbp push %rbx sub $0x8,%rsp mov %rdi,%rbp mov %rsi,%rbx mov 0x8(%rsi),%rax cmp %rax,(%rsi) je 2249 <_Z5func0IiESt6vectorIT_SaIS1_EES3_S3_+0x21> lea -...
_Z5func0IiESt6vectorIT_SaIS1_EES3_S3_: endbr64 push rbp push rbx sub rsp, 8 mov rbp, rdi mov rbx, rsi mov rax, [rsi+8] cmp [rsi], rax jz short loc_24C2 lea rax, [rax-4] mov [rsi+8], rax loc_24C2: mov rcx, [rdx+8] mov rsi, [rbx+8] mov rdx, [rdx] mov rdi, rbx call ...
_QWORD * func0<int>(_QWORD *a1, _QWORD *a2, _QWORD *a3) { long long v3; // rax v3 = a2[1]; if ( *a2 != v3 ) a2[1] = v3 - 4; std::vector<int>::_M_range_insert<__gnu_cxx::__normal_iterator<int *,std::vector<int>>>(a2, a2[1], *a3, a3[1]); *a1 = *a2; a1[1] = a2[1]; a1[2] = a2[2]; a2[2] = 0LL; a2[1] =...
func0<int>: ENDBR64 PUSH RBP PUSH RBX SUB RSP,0x8 MOV RBP,RDI MOV RBX,RSI MOV RAX,qword ptr [RSI + 0x8] CMP qword ptr [RSI],RAX JZ 0x001024c2 LEA RAX,[RAX + -0x4] MOV qword ptr [RSI + 0x8],RAX LAB_001024c2: MOV RCX,qword ptr [RDX + 0x8] MOV RSI,qword ptr [RBX + 0x8] MOV RDX,qword ptr [RDX] MOV RDI,RBX CALL 0x001021bc M...
/* std::vector<int, std::allocator<int> > func0<int>(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >) */ long * func0<int>(long *param_1,long *param_2,int8 *param_3) { if (*param_2 != param_2[1]) { param_2[1] = param_2[1] + -4; } std::vector<int,std::allocator<int>>:: _M_...
958
func0
#include <cassert> #include <vector> #include <string> template <typename T>
std::vector<T> func0(std::vector<T> list1, std::vector<T> list2) { if (!list1.empty()) { list1.resize(list1.size() - 1); } list1.insert(list1.end(), list2.begin(), list2.end()); return list1; }
int main() { // First test std::vector<int> result1 = func0(std::vector<int>{1, 3, 5, 7, 9, 10}, std::vector<int>{2, 4, 6, 8}); std::vector<int> expected1{1, 3, 5, 7, 9, 2, 4, 6, 8}; assert(result1 == expected1); // Second test std::vector<int> result2 = func0(std::vector<int>{1, 2, ...
O2
cpp
std::vector<int, std::allocator<int> > func0<int>(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >): endbr64 push %r12 mov %rdi,%r12 push %rbx mov %rsi,%rbx sub $0x8,%rsp mov 0x8(%rsi),%rsi cmp %rsi,(%rbx) je 2332 <_Z5func0IiESt6vectorIT_SaIS1_EES3_S3_+0x22> sub $...
_Z5func0IiESt6vectorIT_SaIS1_EES3_S3_: endbr64 push r15 push r14 mov r14, rdx push r13 push r12 mov r12, rdi push rbp push rbx mov rbx, rsi sub rsp, 28h mov rbp, [rsi+8] mov r15, [rsi] mov rsi, rbp sub rsi, r15 cmp r15, rbp jz short loc_2264 test rsi, rsi jz...
char ** func0<int>(char **a1, char **a2, char **a3) { char *v6; // rbp char *v7; // r15 long long v8; // rsi size_t v9; // rdi size_t v10; // rdx char *v11; // rax char *v12; // r13 char *v13; // r8 char *v14; // r14 signed long long v15; // r13 char **result; // rax long long v17; // rax long...
func0<int>: ENDBR64 PUSH R15 PUSH R14 MOV R14,RDX PUSH R13 PUSH R12 MOV R12,RDI PUSH RBP PUSH RBX MOV RBX,RSI SUB RSP,0x28 MOV RBP,qword ptr [RSI + 0x8] MOV R15,qword ptr [RSI] MOV RSI,RBP SUB RSI,R15 CMP R15,RBP JZ 0x00102264 TEST RSI,RSI JZ 0x00102248 LEA RDI,[RSI + -0x4] MOV RDX,RSI LEA RAX,[R15 + RDI*0x1] CMP RBP,R...
/* std::vector<int, std::allocator<int> > func0<int>(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >) */ int8 * func0<int>(int8 *param_1,vector<int,std::allocator<int>> *param_2,int8 *param_3) { int4 *__dest; ulong uVar1; ulong uVar2; size_t extraout_RDX; int4 *puVar3; si...
959
func0
#include <cassert> #include <vector> #include <string> template <typename T>
std::vector<T> func0(std::vector<T> list1, std::vector<T> list2) { if (!list1.empty()) { list1.resize(list1.size() - 1); } list1.insert(list1.end(), list2.begin(), list2.end()); return list1; }
int main() { // First test std::vector<int> result1 = func0(std::vector<int>{1, 3, 5, 7, 9, 10}, std::vector<int>{2, 4, 6, 8}); std::vector<int> expected1{1, 3, 5, 7, 9, 2, 4, 6, 8}; assert(result1 == expected1); // Second test std::vector<int> result2 = func0(std::vector<int>{1, 2, ...
O3
cpp
std::vector<int, std::allocator<int> > func0<int>(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >): endbr64 push %r15 push %r14 push %r13 mov %rdi,%r13 push %r12 push %rbp push %rbx mov %rsi,%rbx sub $0x28,%rsp mov 0x8(%rsi),%r12 mov (%rsi),%rbp mov %r12,%r10...
_Z5func0IiESt6vectorIT_SaIS1_EES3_S3_: endbr64 push r15 push r14 push r13 mov r13, rdi push r12 push rbp push rbx mov rbx, rsi sub rsp, 18h mov rbp, [rsi+8] cmp [rsi], rbp jz short loc_2449 sub rbp, 4 mov [rsi+8], rbp loc_2449: mov rax, [rdx+8] mov r8, [rdx] mo...
_QWORD * func0<int>(_QWORD *a1, _QWORD *a2, long long a3) { _DWORD *v5; // rbp long long v6; // rax _DWORD *v7; // r8 char *v8; // r14 signed long long v9; // r15 _DWORD *v10; // r12 _QWORD *result; // rax long long v12; // rbp unsigned long long v13; // rsi unsigned long long v14; // r14 unsigned...
func0<int>: ENDBR64 PUSH R15 PUSH R14 PUSH R13 MOV R13,RDI PUSH R12 PUSH RBP PUSH RBX MOV RBX,RSI SUB RSP,0x18 MOV RBP,qword ptr [RSI + 0x8] CMP qword ptr [RSI],RBP JZ 0x00102449 SUB RBP,0x4 MOV qword ptr [RSI + 0x8],RBP LAB_00102449: MOV RAX,qword ptr [RDX + 0x8] MOV R8,qword ptr [RDX] MOV R14,qword ptr [RBX + 0x10] C...
/* std::vector<int, std::allocator<int> > func0<int>(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >) */ int8 * func0<int>(int8 *param_1,int (*param_2) [16],int8 *param_3) { int4 *__src; int4 *__n; ulong uVar1; int4 *puVar2; int4 *__dest; ulong uVar3; int4 *__src_00; ...
960
func0
#include <vector> #include <string> #include <assert.h>
std::vector<std::vector<std::vector<std::string>>> func0(int m, int n, int o) { std::vector<std::vector<std::vector<std::string>>> result(o, std::vector<std::vector<std::string>>(n, std::vector<std::string>(m, "*"))); return result; }
int main() { assert(func0(6, 4, 3) == std::vector<std::vector<std::vector<std::string>>>({ {{"*", "*", "*", "*", "*", "*"}, {"*", "*", "*", "*", "*", "*"}, {"*", "*", "*", "*", "*", "*"}, {"*", "*", "*", "*", "*", "*"}}, {{"*", "*", "*", "*", "*", "*"}, {"*", "*", "*", "*", "*", "*"}, {"*", "*", ...
O0
cpp
func0[abi:cxx11](int, int, int): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0xa8,%rsp mov %rdi,-0x98(%rbp) mov %esi,-0x9c(%rbp) mov %edx,-0xa0(%rbp) mov %ecx,-0xa4(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax lea -0x81(%rbp),%rax mov %rax,%rdi callq 8108 <_ZNSaISt...
_Z5func0B5cxx11iii: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 0C8h mov [rbp+var_B8], rdi mov [rbp+var_BC], esi mov [rbp+var_C0], edx mov [rbp+var_C4], ecx mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax lea rax, [rbp+var_A1] mov [rbp+var_88], rax nop nop lea ...
long long func0[abi:cxx11](long long a1, int a2, int a3, int a4) { char v7; // [rsp+2Ch] [rbp-A4h] BYREF char v8; // [rsp+2Dh] [rbp-A3h] BYREF char v9; // [rsp+2Eh] [rbp-A2h] BYREF char v10; // [rsp+2Fh] [rbp-A1h] BYREF char *v11; // [rsp+30h] [rbp-A0h] char *v12; // [rsp+38h] [rbp-98h] char *v13; // [rs...
func0[abi:cxx11]: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0xc8 MOV qword ptr [RBP + -0xb8],RDI MOV dword ptr [RBP + -0xbc],ESI MOV dword ptr [RBP + -0xc0],EDX MOV dword ptr [RBP + -0xc4],ECX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX LEA RAX,[RBP + -0xa1] MOV qword ptr [RBP + -0x88],R...
/* func0[abi:cxx11](int, int, int) */ vector<std::vector<std::vector<std::string,std::allocator<std::string>>,std::allocator<std::vector<std::string,std::allocator<std::string>>>>,std::allocator<std::vector<std::vector<std::string,std::allocator<std::string>>,std::allocator<std::vector<std::string,std::allocator<std::...
961
func0
#include <vector> #include <string> #include <assert.h>
std::vector<std::vector<std::vector<std::string>>> func0(int m, int n, int o) { std::vector<std::vector<std::vector<std::string>>> result(o, std::vector<std::vector<std::string>>(n, std::vector<std::string>(m, "*"))); return result; }
int main() { assert(func0(6, 4, 3) == std::vector<std::vector<std::vector<std::string>>>({ {{"*", "*", "*", "*", "*", "*"}, {"*", "*", "*", "*", "*", "*"}, {"*", "*", "*", "*", "*", "*"}, {"*", "*", "*", "*", "*", "*"}}, {{"*", "*", "*", "*", "*", "*"}, {"*", "*", "*", "*", "*", "*"}, {"*", "*", ...
O1
cpp
func0[abi:cxx11](int, int, int): endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0xa8,%rsp mov %rdi,(%rsp) mov %esi,%ebp mov %edx,%ebx mov %ecx,0x10(%rsp) mov %fs:0x28,%rax mov %rax,0x98(%rsp) xor %eax,%eax lea 0x70(%rsp),%rdi lea 0x80(%rsp),%rax mov ...
_Z5func0B5cxx11iii: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 98h mov r15, rdi mov ebp, esi mov ebx, edx mov r13d, ecx mov rax, fs:28h mov [rsp+0C8h+var_40], rax xor eax, eax lea rdi, [rsp+0C8h+var_68] lea rax, [rsp+0C8h+var_58] mov ...
_QWORD * func0[abi:cxx11](_QWORD *a1, int a2, int a3, int a4) { long long v7; // rbp void **v8; // r12 long long v9; // rax long long v10; // r14 long long v11; // rdi char *i; // r13 void **v13; // rbx void **j; // rbx void **v15; // rbp char *v17; // [rsp+0h] [rbp-C8h] void **v18; // [rsp+8h] [r...
func0[abi:cxx11]: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x98 MOV R15,RDI MOV EBP,ESI MOV EBX,EDX MOV R13D,ECX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x88],RAX XOR EAX,EAX LEA RDI,[RSP + 0x60] LEA RAX,[RSP + 0x70] MOV qword ptr [RSP + 0x60],RAX LEA RDX,[0x10447a] LEA RSI,[RDX + ...
/* func0[abi:cxx11](int, int, int) */ int8 * func0_abi_cxx11_(int param_1,int param_2,int param_3) { void *pvVar1; int8 *puVar2; long *plVar3; vector *pvVar4; vector *pvVar5; int8 uVar6; int in_ECX; int8 *puVar7; ulong uVar8; int4 in_register_0000003c; int8 *puVar9; long *plVar10; ulong uVar...
962
func0
#include <vector> #include <string> #include <assert.h>
std::vector<std::vector<std::vector<std::string>>> func0(int m, int n, int o) { std::vector<std::vector<std::vector<std::string>>> result(o, std::vector<std::vector<std::string>>(n, std::vector<std::string>(m, "*"))); return result; }
int main() { assert(func0(6, 4, 3) == std::vector<std::vector<std::vector<std::string>>>({ {{"*", "*", "*", "*", "*", "*"}, {"*", "*", "*", "*", "*", "*"}, {"*", "*", "*", "*", "*", "*"}, {"*", "*", "*", "*", "*", "*"}}, {{"*", "*", "*", "*", "*", "*"}, {"*", "*", "*", "*", "*", "*"}, {"*", "*", ...
O2
cpp
func0[abi:cxx11](int, int, int): endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp movslq %esi,%rbp push %rbx sub $0xb8,%rsp mov %rdi,0x18(%rsp) mov %ecx,0x8(%rsp) mov %fs:0x28,%rax mov %rax,0xa8(%rsp) xor %eax,%eax lea 0x90(%rsp),%rax movq $0x1,0x88(%rsp) mov %rax,0x30(%rs...
_Z5func0B5cxx11iii: endbr64 push r15 push r14 push r13 mov r13d, ecx push r12 push rbp movsxd rbp, esi push rbx movsxd rbx, edx lea rdx, asc_4479+1; "" lea rsi, [rdx-1] sub rsp, 0C8h mov [rsp+0F8h+var_E8], rdi lea rdi, [rsp+0F8h+var_68] mov rax, fs:28h mov [rsp+0F8h+v...
long long func0[abi:cxx11](long long a1, int a2, int a3, int a4) { unsigned long long v5; // rbx char *v6; // r12 __m128i *v7; // rax __m128i *v8; // r13 signed long long v9; // r15 long long v10; // r14 char *v11; // rbx long long v12; // rbp char *i; // r13 long long v14; // rbp long long v15; ...
func0[abi:cxx11]: ENDBR64 PUSH R15 PUSH R14 PUSH R13 MOV R13D,ECX PUSH R12 PUSH RBP MOVSXD RBP,ESI PUSH RBX MOVSXD RBX,EDX LEA RDX,[0x10447a] LEA RSI,[RDX + -0x1] SUB RSP,0xc8 MOV qword ptr [RSP + 0x10],RDI LEA RDI,[RSP + 0x90] MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0xb8],RAX XOR EAX,EAX LEA RAX,[RSP + 0xa0] ...
/* func0[abi:cxx11](int, int, int) */ int (*) [16] func0_abi_cxx11_(int param_1,int param_2,int param_3) { int8 *puVar1; string *psVar2; string *psVar3; int (*pauVar4) [16]; vector<std::string,std::allocator<std::string>> *this; int8 uVar5; int (*pauVar6) [16]; int in_ECX; ulong uVar7; vector *pvV...
963
func0
#include <vector> #include <string> #include <assert.h>
std::vector<std::vector<std::vector<std::string>>> func0(int m, int n, int o) { std::vector<std::vector<std::vector<std::string>>> result(o, std::vector<std::vector<std::string>>(n, std::vector<std::string>(m, "*"))); return result; }
int main() { assert(func0(6, 4, 3) == std::vector<std::vector<std::vector<std::string>>>({ {{"*", "*", "*", "*", "*", "*"}, {"*", "*", "*", "*", "*", "*"}, {"*", "*", "*", "*", "*", "*"}, {"*", "*", "*", "*", "*", "*"}}, {{"*", "*", "*", "*", "*", "*"}, {"*", "*", "*", "*", "*", "*"}, {"*", "*", ...
O3
cpp
func0[abi:cxx11](int, int, int): endbr64 push %r15 push %r14 push %r13 movslq %esi,%r13 push %r12 push %rbp push %rbx sub $0xd8,%rsp mov %rdi,0x20(%rsp) mov %ecx,0x10(%rsp) mov %fs:0x28,%rax mov %rax,0xc8(%rsp) xor %eax,%eax lea 0xb0(%rsp),%rax movq $0x1,0xa8(%rsp) mov %rax,0x38(%r...
_Z5func0B5cxx11iii: endbr64 push r15 push r14 push r13 push r12 push rbp movsxd rbp, esi push rbx sub rsp, 108h mov [rsp+138h+var_E0], rdi mov dword ptr [rsp+138h+var_118], ecx mov rax, fs:28h mov [rsp+138h+var_40], rax xor eax, eax lea rax, [rsp+138h+var_58] mov [rsp+...
_QWORD * func0[abi:cxx11](_QWORD *a1, int a2, int a3, int a4) { long long v4; // rbp char *v6; // r13 size_t v7; // rbx _BYTE *v8; // rdi char *v9; // r12 long long v10; // rax __m128i *v11; // rdx long long v12; // rcx long long *v13; // r15 long long *v14; // rbx char *v15; // r12 size_t v16; ...
func0[abi:cxx11]: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP MOVSXD RBP,ESI PUSH RBX SUB RSP,0x108 MOV qword ptr [RSP + 0x58],RDI MOV dword ptr [RSP + 0x20],ECX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0xf8],RAX XOR EAX,EAX LEA RAX,[RSP + 0xe0] MOV qword ptr [RSP + 0xd8],0x1 MOV qword ptr [RSP + 0x60]...
/* func0[abi:cxx11](int, int, int) */ int (*) [16] func0_abi_cxx11_(int param_1,int param_2,int param_3) { long *plVar1; void *pvVar2; ulong __n; int *puVar3; int8 *puVar4; int (*__n_00) [16]; int8 uVar5; int (*pauVar6) [16]; ulong *puVar7; ulong *__dest; vector<std::string,std::allocator<std::s...
964
func0
#include <iostream> #include <string> #include <assert.h>
int func0(std::string str1) { int total = 0; for (char i : str1) { total++; } return total; }
int main() { assert(func0("python programming") == 18); assert(func0("language") == 8); assert(func0("words") == 5); return 0; }
O0
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >): endbr64 push %rbp mov %rsp,%rbp sub $0x40,%rsp mov %rdi,-0x38(%rbp) mov %fs:0x28,%rax mov %rax,-0x8(%rbp) xor %eax,%eax movl $0x0,-0x24(%rbp) mov -0x38(%rbp),%rax mov %rax,-0x10(%rbp) mov -0x10(%rbp),%...
_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_38], rdi mov rax, fs:28h mov [rbp+var_8], rax xor eax, eax mov [rbp+var_24], 0 mov rax, [rbp+var_38] mov [rbp+var_10], rax mov rax, [rbp+var_10] mov rdi, r...
long long func0(long long a1) { unsigned int v2; // [rsp+1Ch] [rbp-24h] long long v3; // [rsp+20h] [rbp-20h] BYREF _QWORD v4[3]; // [rsp+28h] [rbp-18h] BYREF v4[2] = __readfsqword(0x28u); v2 = 0; v4[1] = a1; v3 = std::string::begin(a1); v4[0] = std::string::end(a1); while ( (unsigned __int8)__gnu_cx...
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 + -0x24],0x0 MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,RAX CALL 0x001011d0 MOV qword pt...
/* func0(std::string) */ int func0(int8 param_1) { bool bVar1; long in_FS_OFFSET; int local_2c; int8 local_28; int8 local_20; int8 local_18; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_2c = 0; local_18 = param_1; local_28 = std::string::begin(); local_20 = std::string::e...
965
func0
#include <iostream> #include <string> #include <assert.h>
int func0(std::string str1) { int total = 0; for (char i : str1) { total++; } return total; }
int main() { assert(func0("python programming") == 18); assert(func0("language") == 8); assert(func0("words") == 5); return 0; }
O1
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >): endbr64 mov (%rdi),%rdx mov 0x8(%rdi),%rax lea (%rdx,%rax,1),%rcx cmp %rcx,%rdx je 124c <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x23> mov %eax,%ecx mov $0x0,%edx add $0x1,%edx cmp %e...
_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 mov rdx, [rdi] mov rax, [rdi+8] lea rcx, [rdx+rax] cmp rdx, rcx jz short loc_122C mov ecx, eax mov edx, 0 loc_1224: add edx, 1 cmp edx, ecx jnz short loc_1224 retn loc_122C: mov eax, 0 retn
long long func0(_QWORD *a1) { long long result; // rax int v2; // edx result = a1[1]; if ( *a1 == *a1 + result ) return 0LL; v2 = 0; do ++v2; while ( v2 != (_DWORD)result ); return result; }
func0: ENDBR64 MOV RDX,qword ptr [RDI] MOV RAX,qword ptr [RDI + 0x8] LEA RCX,[RDX + RAX*0x1] CMP RDX,RCX JZ 0x0010122c MOV ECX,EAX MOV EDX,0x0 LAB_00101224: ADD EDX,0x1 CMP EDX,ECX JNZ 0x00101224 RET LAB_0010122c: MOV EAX,0x0 RET
/* func0(std::string) */ long func0(long *param_1) { long lVar1; int iVar2; lVar1 = param_1[1]; if (*param_1 != *param_1 + lVar1) { iVar2 = 0; do { iVar2 = iVar2 + 1; } while (iVar2 != (int)lVar1); return lVar1; } return 0; }
966
func0
#include <iostream> #include <string> #include <assert.h>
int func0(std::string str1) { int total = 0; for (char i : str1) { total++; } return total; }
int main() { assert(func0("python programming") == 18); assert(func0("language") == 8); assert(func0("words") == 5); return 0; }
O2
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >): endbr64 mov (%rdi),%rdx mov 0x8(%rdi),%rax lea (%rdx,%rax,1),%rcx cmp %rcx,%rdx mov $0x0,%edx cmove %edx,%eax retq nopl 0x0(%rax,%rax,1)
_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 mov rdx, [rdi+8] test rdx, rdx mov eax, edx mov edx, 0 cmovz eax, edx retn
long long func0(long long a1) { long long result; // rax result = (unsigned int)*(_QWORD *)(a1 + 8); if ( !*(_QWORD *)(a1 + 8) ) return 0LL; return result; }
func0: ENDBR64 MOV RDX,qword ptr [RDI + 0x8] TEST RDX,RDX MOV EAX,EDX MOV EDX,0x0 CMOVZ EAX,EDX RET
/* func0(std::string) */ ulong func0(long param_1) { ulong uVar1; uVar1 = *(ulong *)(param_1 + 8) & 0xffffffff; if (*(ulong *)(param_1 + 8) == 0) { uVar1 = 0; } return uVar1; }
967
func0
#include <iostream> #include <string> #include <assert.h>
int func0(std::string str1) { int total = 0; for (char i : str1) { total++; } return total; }
int main() { assert(func0("python programming") == 18); assert(func0("language") == 8); assert(func0("words") == 5); return 0; }
O3
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >): endbr64 mov (%rdi),%rdx mov 0x8(%rdi),%rax lea (%rdx,%rax,1),%rcx cmp %rcx,%rdx mov $0x0,%edx cmove %edx,%eax retq nopl 0x0(%rax,%rax,1)
_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 mov rdx, [rdi+8] test rdx, rdx mov eax, edx mov edx, 0 cmovz eax, edx retn
long long func0(long long a1) { long long result; // rax result = (unsigned int)*(_QWORD *)(a1 + 8); if ( !*(_QWORD *)(a1 + 8) ) return 0LL; return result; }
func0: ENDBR64 MOV RDX,qword ptr [RDI + 0x8] TEST RDX,RDX MOV EAX,EDX MOV EDX,0x0 CMOVZ EAX,EDX RET
/* func0(std::string) */ ulong func0(long param_1) { ulong uVar1; uVar1 = *(ulong *)(param_1 + 8) & 0xffffffff; if (*(ulong *)(param_1 + 8) == 0) { uVar1 = 0; } return uVar1; }
968
func0
#include <cassert> #include <vector> #include <string> #include <utility> #include <unordered_set> #include <iostream> using namespace std; template <typename Key, typename Value> struct Occurrence { Key key; vector<Value> uniques; int total; bool operator==(const Occurrence<Key, V...
vector<Occurrence<Key, Value>> func0(const vector<pair<Key, Value>>& lst) { // We'll preserve the order of first occurrence of each key. vector<Key> order; // Map key to all values (in order of appearance) // Using vector for each key's values. // We'll use an auxiliary vector to preserve order...
int main() { { vector<pair<int, string>> input = { {1, "Jake"}, {2, "Bob"}, {1, "Cara"} }; auto result = func0(input); vector<Occurrence<int, string>> expected = { {1, {"Jake", "Cara"}, 2}, {2, {"Bob"}, 1} }; assert(result == expected); } ...
O0
cpp
std::vector<Occurrence<int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<Occurrence<int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > func0<int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >...
_Z5func0IiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt6vectorI10OccurrenceIT_T0_ESaISA_EERKS6_ISt4pairIS8_S9_ESaISE_EE: endbr64 push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 1D8h mov [rbp+var_1E8], rdi mov [rbp+var_1F0], rsi mov rax, fs:28h ...
long long func0<int,std::string>(long long a1, long long a2) { _BYTE *i; // rbx char v4; // [rsp+2Eh] [rbp-1D2h] char v5; // [rsp+2Fh] [rbp-1D1h] long long v6; // [rsp+30h] [rbp-1D0h] BYREF long long v7; // [rsp+38h] [rbp-1C8h] BYREF long long v8; // [rsp+40h] [rbp-1C0h] BYREF long long v9; // [rsp+48h] ...
func0<int,std::string>: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x1d8 MOV qword ptr [RBP + -0x1e8],RDI MOV qword ptr [RBP + -0x1f0],RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x38],RAX XOR EAX,EAX LEA RAX,[RBP + -0x150] MOV RDI,RAX CALL 0x00103dfe LEA RAX,[RBP + -0x1...
/* std::vector<Occurrence<int, std::string >, std::allocator<Occurrence<int, std::string > > > func0<int, std::string >(std::vector<std::pair<int, std::string >, std::allocator<std::pair<int, std::string > > > const&) */ vector func0<int,std::string>(vector_conflict *param_1) { bool bVar1; bool bVar2; str...
969
func0
#include <cassert> #include <vector> #include <string> #include <utility> #include <unordered_set> #include <iostream> using namespace std; template <typename Key, typename Value> struct Occurrence { Key key; vector<Value> uniques; int total; bool operator==(const Occurrence<Key, V...
vector<Occurrence<Key, Value>> func0(const vector<pair<Key, Value>>& lst) { // We'll preserve the order of first occurrence of each key. vector<Key> order; // Map key to all values (in order of appearance) // Using vector for each key's values. // We'll use an auxiliary vector to preserve order...
int main() { { vector<pair<int, string>> input = { {1, "Jake"}, {2, "Bob"}, {1, "Cara"} }; auto result = func0(input); vector<Occurrence<int, string>> expected = { {1, {"Jake", "Cara"}, 2}, {2, {"Bob"}, 1} }; assert(result == expected); } ...
O1
cpp
std::vector<Occurrence<int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<Occurrence<int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > func0<int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >...
_Z5func0IiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt6vectorI10OccurrenceIT_T0_ESaISA_EERKS6_ISt4pairIS8_S9_ESaISE_EE: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 148h mov [rsp+178h+var_160], rdi mov rax, fs:28h mov [rsp+178h+var_40], rax xor ...
_QWORD * func0<int,std::string>(_QWORD *a1, int **a2) { int *v2; // r13 char *v3; // rax char *v4; // rbx char *v5; // r12 _QWORD *v6; // rcx char *v7; // r14 char *v8; // rax char *v9; // r12 void *v10; // r15 struct _Unwind_Exception *v11; // rbx long long v12; // rax char *v13; // rbx void ...
func0<int,std::string>: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x148 MOV qword ptr [RSP + 0x18],RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x138],RAX XOR EAX,EAX MOV qword ptr [RSP + 0x40],0x0 MOV qword ptr [RSP + 0x48],0x0 MOV qword ptr [RSP + 0x50],0x0 MOV R13,qword ptr [RSI] ...
/* std::vector<Occurrence<int, std::string >, std::allocator<Occurrence<int, std::string > > > func0<int, std::string >(std::vector<std::pair<int, std::string >, std::allocator<std::pair<int, std::string > > > const&) */ vector<Occurrence<int,std::string>,std::allocator<Occurrence<int,std::string>>> * func0<int,...
970
func0
#include <cassert> #include <vector> #include <string> #include <utility> #include <unordered_set> #include <iostream> using namespace std; template <typename Key, typename Value> struct Occurrence { Key key; vector<Value> uniques; int total; bool operator==(const Occurrence<Key, V...
vector<Occurrence<Key, Value>> func0(const vector<pair<Key, Value>>& lst) { // We'll preserve the order of first occurrence of each key. vector<Key> order; // Map key to all values (in order of appearance) // Using vector for each key's values. // We'll use an auxiliary vector to preserve order...
int main() { { vector<pair<int, string>> input = { {1, "Jake"}, {2, "Bob"}, {1, "Cara"} }; auto result = func0(input); vector<Occurrence<int, string>> expected = { {1, {"Jake", "Cara"}, 2}, {2, {"Bob"}, 1} }; assert(result == expected); } ...
O2
cpp
std::vector<Occurrence<int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<Occurrence<int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > func0<int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >...
_Z5func0IiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt6vectorI10OccurrenceIT_T0_ESaISA_EERKS6_ISt4pairIS8_S9_ESaISE_EE: endbr64 push r15 pxor xmm0, xmm0 push r14 push r13 push r12 push rbp push rbx sub rsp, 148h mov r12, [rsi] mov [rsp+178h+var_160], rdi lea rcx, [rsp+178...
long long func0<int,std::string>(long long a1, int **a2) { int *v2; // r12 int *v3; // rax int v4; // ebp long long v5; // rdx long long v6; // rbx long long v7; // r13 _QWORD *v8; // rax long long v9; // rdi long long v10; // rax __int128 v11; // kr10_16 _QWORD *v12; // r13 _QWORD *v13; // rbp...
func0<int,std::string>: ENDBR64 PUSH R15 PXOR XMM0,XMM0 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x148 MOV R12,qword ptr [RSI] MOV qword ptr [RSP + 0x18],RDI LEA RCX,[RSP + 0xf0] LEA R15,[RSP + 0x100] MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x138],RAX XOR EAX,EAX MOV RAX,qword ptr [RSI + 0x8] MOV q...
/* std::vector<Occurrence<int, std::string >, std::allocator<Occurrence<int, std::string > > > func0<int, std::string >(std::vector<std::pair<int, std::string >, std::allocator<std::pair<int, std::string > > > const&) */ vector<Occurrence<int,std::string>,std::allocator<Occurrence<int,std::string>>> * func0<int,...
971
func0
#include <cassert> #include <vector> #include <string> #include <utility> #include <unordered_set> #include <iostream> using namespace std; template <typename Key, typename Value> struct Occurrence { Key key; vector<Value> uniques; int total; bool operator==(const Occurrence<Key, V...
vector<Occurrence<Key, Value>> func0(const vector<pair<Key, Value>>& lst) { // We'll preserve the order of first occurrence of each key. vector<Key> order; // Map key to all values (in order of appearance) // Using vector for each key's values. // We'll use an auxiliary vector to preserve order...
int main() { { vector<pair<int, string>> input = { {1, "Jake"}, {2, "Bob"}, {1, "Cara"} }; auto result = func0(input); vector<Occurrence<int, string>> expected = { {1, {"Jake", "Cara"}, 2}, {2, {"Bob"}, 1} }; assert(result == expected); } ...
O3
cpp
std::vector<Occurrence<int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<Occurrence<int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > func0<int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >...
_Z5func0IiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt6vectorI10OccurrenceIT_T0_ESaISA_EERKS6_ISt4pairIS8_S9_ESaISE_EE: endbr64 push r15 pxor xmm0, xmm0 push r14 push r13 push r12 push rbp push rbx sub rsp, 178h mov rcx, [rsi+8] mov [rsp+1A8h+var_180], rdi mov rax, fs:28h...
char ** func0<int,std::string>(char **a1, int **a2) { int *v2; // rcx int *v3; // rax int *v4; // r15 char *v5; // rbx int v6; // r14d _BYTE *v7; // rbp _QWORD *v8; // rax long long v9; // rbp char *v10; // rbx long long *v11; // rbx char *v12; // r12 long long v13; // rdi void *v14; // r13 ...
func0<int,std::string>: ENDBR64 PUSH R15 PXOR XMM0,XMM0 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x178 MOV RCX,qword ptr [RSI + 0x8] MOV qword ptr [RSP + 0x28],RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x168],RAX XOR EAX,EAX MOV RAX,qword ptr [RSI] MOV qword ptr [RSP + 0x38],RCX MOV qword ptr [RS...
/* std::vector<Occurrence<int, std::string >, std::allocator<Occurrence<int, std::string > > > func0<int, std::string >(std::vector<std::pair<int, std::string >, std::allocator<std::pair<int, std::string > > > const&) */ int (*) [16] func0<int,std::string>(int (*param_1) [16],int8 *param_2) { long *plVar1; ...
972
func0
#include <cmath> #include <cassert>
int func0(int N) { int nextN = std::floor(std::sqrt(N)) + 1; return nextN * nextN; }
int main() { assert(func0(35) == 36); assert(func0(6) == 9); assert(func0(9) == 16); return 0; }
O0
cpp
func0(int): endbr64 push %rbp mov %rsp,%rbp sub $0x20,%rsp mov %edi,-0x14(%rbp) mov -0x14(%rbp),%eax mov %eax,%edi callq 125b <_ZSt4sqrtIiEN9__gnu_cxx11__enable_ifIXsrSt12__is_integerIT_E7__valueEdE6__typeES3_> callq 1080 <floor@plt> movsd 0xed9(%rip),%xmm1 addsd %xmm1,%xmm0 cvttsd2si %xmm0,%eax mo...
_Z5func0i: endbr64 push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_14], edi mov eax, [rbp+var_14] mov edi, eax call _ZSt4sqrtIiEN9__gnu_cxx11__enable_ifIXsrSt12__is_integerIT_E7__valueEdE6__typeES3_; std::sqrt<int>(int) movq rax, xmm0 movq xmm0, rax; x call _floor movsd xmm1, cs:qwo...
long long func0(unsigned int a1) { double v1; // xmm0_8 double v2; // xmm0_8 v1 = std::sqrt<int>(a1); v2 = floor(v1); return (unsigned int)((int)(v2 + 1.0) * (int)(v2 + 1.0)); }
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0x14],EDI MOV EAX,dword ptr [RBP + -0x14] MOV EDI,EAX CALL 0x00101280 MOVQ RAX,XMM0 MOVQ XMM0,RAX CALL 0x00101080 MOVSD XMM1,qword ptr [0x00102068] ADDSD XMM0,XMM1 CVTTSD2SI EAX,XMM0 MOV dword ptr [RBP + -0x4],EAX MOV EAX,dword ptr [RBP + -0x4] IMUL...
/* func0(int) */ int func0(int param_1) { double __x; double dVar1; std::sqrt<int>(param_1); dVar1 = floor(__x); return (int)(dVar1 + DAT_00102068) * (int)(dVar1 + DAT_00102068); }
973
func0
#include <cmath> #include <cassert>
int func0(int N) { int nextN = std::floor(std::sqrt(N)) + 1; return nextN * nextN; }
int main() { assert(func0(35) == 36); assert(func0(6) == 9); assert(func0(9) == 16); return 0; }
O1
cpp
func0(int): endbr64 sub $0x18,%rsp pxor %xmm0,%xmm0 cvtsi2sd %edi,%xmm0 movapd %xmm0,%xmm6 sqrtsd %xmm6,%xmm6 movsd %xmm6,0x8(%rsp) pxor %xmm1,%xmm1 ucomisd %xmm0,%xmm1 ja 1200 <_Z5func0i+0x97> movsd 0x8(%rsp),%xmm5 movapd %xmm5,%xmm0 movsd 0xefd(%rip),%xmm2 movapd %xmm5,%xmm1 andpd %xmm2,%xmm1 movsd 0x...
_Z5func0i: endbr64 sub rsp, 8 pxor xmm0, xmm0 cvtsi2sd xmm0, edi; x pxor xmm1, xmm1 ucomisd xmm1, xmm0 ja short loc_11F0 sqrtsd xmm0, xmm0 loc_1187: movapd xmm1, xmm0 movsd xmm3, cs:qword_2070 movapd xmm2, xmm0 andpd xmm2, xmm3 movsd xmm4, cs:qword_2060 ucomisd xmm4, xmm2 jbe short loc_11DC ...
long long func0(int a1) { double v1; // xmm0_8 __m128d v2; // xmm0 double v3; // xmm1_8 __m128d v4; // xmm2 v1 = (double)a1; if ( (double)a1 < 0.0 ) v2.m128d_f64[0] = sqrt(v1); else v2.m128d_f64[0] = sqrt(v1); v3 = v2.m128d_f64[0]; if ( fabs(v2.m128d_f64[0]) < 4.503599627370496e15 ) { ...
func0: ENDBR64 SUB RSP,0x8 PXOR XMM0,XMM0 CVTSI2SD XMM0,EDI PXOR XMM1,XMM1 UCOMISD XMM1,XMM0 JA 0x001011f0 SQRTSD XMM0,XMM0 LAB_00101187: MOVAPD XMM1,XMM0 MOVSD XMM3,qword ptr [0x00102070] MOVAPD XMM2,XMM0 ANDPD XMM2,XMM3 MOVSD XMM4,qword ptr [0x00102060] UCOMISD XMM4,XMM2 JBE 0x001011dc CVTTSD2SI RAX,XMM0 PXOR XMM2,XM...
/* func0(int) */ int func0(int param_1) { double dVar1; dVar1 = (double)param_1; if (dVar1 < 0.0) { dVar1 = sqrt(dVar1); } else { dVar1 = SQRT(dVar1); } if ((double)((ulong)dVar1 & DAT_00102070) < DAT_00102060) { dVar1 = (double)((ulong)((double)(long)dVar1 - (...
974
func0
#include <cmath> #include <cassert>
int func0(int N) { int nextN = std::floor(std::sqrt(N)) + 1; return nextN * nextN; }
int main() { assert(func0(35) == 36); assert(func0(6) == 9); assert(func0(9) == 16); return 0; }
O2
cpp
func0(int): endbr64 pxor %xmm0,%xmm0 pxor %xmm2,%xmm2 sub $0x18,%rsp cvtsi2sd %edi,%xmm0 ucomisd %xmm0,%xmm2 movapd %xmm0,%xmm1 sqrtsd %xmm1,%xmm1 ja 1293 <_Z5func0i+0x83> movsd 0xe66(%rip),%xmm2 movsd 0xe46(%rip),%xmm3 movapd %xmm1,%xmm0 andpd %xmm2,%xmm1 ucomisd %xmm1,%xmm3 movsd 0xe3a(%rip),%xmm3 jbe ...
_Z5func0i: endbr64 pxor xmm0, xmm0 pxor xmm1, xmm1 sub rsp, 8 cvtsi2sd xmm0, edi; x ucomisd xmm1, xmm0 ja short loc_128F sqrtsd xmm0, xmm0 loc_122E: movsd xmm2, cs:qword_2070 movsd xmm3, cs:qword_2060 movapd xmm1, xmm0 andpd xmm1, xmm2 ucomisd xmm3, xmm1 movsd xmm3, cs:qword_2068 jbe short ...
long long func0(int a1) { double v1; // xmm0_8 __m128d v2; // xmm0 __m128d v3; // xmm1 v1 = (double)a1; if ( (double)a1 < 0.0 ) v2.m128d_f64[0] = sqrt(v1); else v2.m128d_f64[0] = sqrt(v1); if ( fabs(v2.m128d_f64[0]) < 4.503599627370496e15 ) { v3 = 0LL; v3.m128d_f64[0] = (double)(int)v2...
func0: ENDBR64 PXOR XMM0,XMM0 PXOR XMM1,XMM1 SUB RSP,0x8 CVTSI2SD XMM0,EDI UCOMISD XMM1,XMM0 JA 0x0010128f SQRTSD XMM0,XMM0 LAB_0010122e: MOVSD XMM2,qword ptr [0x00102070] MOVSD XMM3,qword ptr [0x00102060] MOVAPD XMM1,XMM0 ANDPD XMM1,XMM2 UCOMISD XMM3,XMM1 MOVSD XMM3,qword ptr [0x00102068] JBE 0x0010127f CVTTSD2SI RAX,...
/* func0(int) */ int func0(int param_1) { double dVar1; dVar1 = (double)param_1; if (dVar1 < 0.0) { dVar1 = sqrt(dVar1); } else { dVar1 = SQRT(dVar1); } if ((double)((ulong)dVar1 & DAT_00102070) < DAT_00102060) { dVar1 = (double)((ulong)((double)(long)dVar1 - (...
975
func0
#include <cmath> #include <cassert>
int func0(int N) { int nextN = std::floor(std::sqrt(N)) + 1; return nextN * nextN; }
int main() { assert(func0(35) == 36); assert(func0(6) == 9); assert(func0(9) == 16); return 0; }
O3
cpp
func0(int): endbr64 pxor %xmm0,%xmm0 pxor %xmm2,%xmm2 sub $0x18,%rsp cvtsi2sd %edi,%xmm0 ucomisd %xmm0,%xmm2 movapd %xmm0,%xmm1 sqrtsd %xmm1,%xmm1 ja 1293 <_Z5func0i+0x83> movsd 0xe66(%rip),%xmm2 movsd 0xe46(%rip),%xmm3 movapd %xmm1,%xmm0 andpd %xmm2,%xmm1 ucomisd %xmm1,%xmm3 movsd 0xe3a(%rip),%xmm3 jbe ...
_Z5func0i: endbr64 pxor xmm0, xmm0 pxor xmm1, xmm1 sub rsp, 8 cvtsi2sd xmm0, edi; x ucomisd xmm1, xmm0 ja short loc_128F sqrtsd xmm0, xmm0 loc_122E: movsd xmm2, cs:qword_2078 movsd xmm3, cs:qword_2068 movapd xmm1, xmm0 andpd xmm1, xmm2 ucomisd xmm3, xmm1 movsd xmm3, cs:qword_2070 jbe short ...
long long func0(int a1) { double v1; // xmm0_8 __m128d v2; // xmm0 __m128d v3; // xmm1 v1 = (double)a1; if ( (double)a1 < 0.0 ) v2.m128d_f64[0] = sqrt(v1); else v2.m128d_f64[0] = sqrt(v1); if ( fabs(v2.m128d_f64[0]) < 4.503599627370496e15 ) { v3 = 0LL; v3.m128d_f64[0] = (double)(int)v2...
func0: ENDBR64 PXOR XMM0,XMM0 PXOR XMM1,XMM1 SUB RSP,0x8 CVTSI2SD XMM0,EDI UCOMISD XMM1,XMM0 JA 0x0010128f SQRTSD XMM0,XMM0 LAB_0010122e: MOVSD XMM2,qword ptr [0x00102078] MOVSD XMM3,qword ptr [0x00102068] MOVAPD XMM1,XMM0 ANDPD XMM1,XMM2 UCOMISD XMM3,XMM1 MOVSD XMM3,qword ptr [0x00102070] JBE 0x0010127f CVTTSD2SI RAX,...
/* func0(int) */ int func0(int param_1) { double dVar1; dVar1 = (double)param_1; if (dVar1 < 0.0) { dVar1 = sqrt(dVar1); } else { dVar1 = SQRT(dVar1); } if ((double)((ulong)dVar1 & DAT_00102078) < DAT_00102068) { dVar1 = (double)((ulong)((double)(long)dVar1 - (...
976
func0
#include <iostream> #include <vector> #include <assert.h> #include <climits>
int func0(const std::vector<int>& arr, int n) { std::vector<int> MSIBS = arr; for (int i = 0; i < n; i++) { for (int j = 0; j < i; j++) { if (arr[i] > arr[j] && MSIBS[i] < MSIBS[j] + arr[i]) { MSIBS[i] = MSIBS[j] + arr[i]; } } } std:...
int main() { assert(func0({1, 15, 51, 45, 33, 100, 12, 18, 9}, 9) == 194); assert(func0({80, 60, 30, 40, 20, 10}, 6) == 210); assert(func0({2, 3, 14, 16, 21, 23, 29, 30}, 8) == 138); return 0; }
O0
cpp
func0(std::vector<int, std::allocator<int> > const&, int): endbr64 push %rbp mov %rsp,%rbp push %r12 push %rbx sub $0x70,%rsp mov %rdi,-0x78(%rbp) mov %esi,-0x7c(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax mov -0x78(%rbp),%rdx lea -0x50(%rbp),%rax mov %rdx,%rsi mov ...
_Z5func0RKSt6vectorIiSaIiEEi: endbr64 push rbp mov rbp, rsp push r12 push rbx sub rsp, 70h mov [rbp+var_78], rdi mov [rbp+var_7C], esi mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax mov rdx, [rbp+var_78] lea rax, [rbp+var_50] mov rsi, rdx mov rdi, rax call _ZN...
long long func0(long long a1, int a2) { int v2; // ebx int v3; // ebx int v4; // r12d int v6; // ebx int v7; // ebx int v8; // ebx int v9; // ebx int v10; // r12d int v12; // ebx int v13; // ebx int v14; // ebx int v15; // ebx unsigned int v16; // ebx unsigned int v18; // [rsp+14h] [rbp-6Ch...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R12 PUSH RBX SUB RSP,0x70 MOV qword ptr [RBP + -0x78],RDI MOV dword ptr [RBP + -0x7c],ESI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX MOV RDX,qword ptr [RBP + -0x78] LEA RAX,[RBP + -0x50] MOV RSI,RDX MOV RDI,RAX LAB_0010127c: CALL 0x00101962 MOV dword...
/* func0(std::vector<int, std::allocator<int> > const&, int) */ int func0(vector *param_1,int param_2) { int iVar1; int iVar2; bool bVar3; int *piVar4; long in_FS_OFFSET; int local_74; int local_70; int local_6c; int local_68; int local_64; int local_60; int local_5c; vector<int,std::allocat...
977
func0
#include <iostream> #include <vector> #include <assert.h> #include <climits>
int func0(const std::vector<int>& arr, int n) { std::vector<int> MSIBS = arr; for (int i = 0; i < n; i++) { for (int j = 0; j < i; j++) { if (arr[i] > arr[j] && MSIBS[i] < MSIBS[j] + arr[i]) { MSIBS[i] = MSIBS[j] + arr[i]; } } } std:...
int main() { assert(func0({1, 15, 51, 45, 33, 100, 12, 18, 9}, 9) == 194); assert(func0({80, 60, 30, 40, 20, 10}, 6) == 210); assert(func0({2, 3, 14, 16, 21, 23, 29, 30}, 8) == 138); return 0; }
O1
cpp
func0(std::vector<int, std::allocator<int> > const&, int): endbr64 push %r14 push %r13 push %r12 push %rbp push %rbx mov %rdi,%r14 mov %esi,%r12d mov 0x8(%rdi),%rdi sub (%r14),%rdi mov %rdi,%rax sar $0x2,%rax je 12fc <_Z5func0RKSt6vectorIiSaIiEEi+0x73> movabs $0x1fffffffffffffff,%rdx cmp...
_Z5func0RKSt6vectorIiSaIiEEi: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 38h mov r13, rdi mov r12d, esi mov rax, fs:28h mov [rsp+68h+var_40], rax xor eax, eax mov r14, [rdi+8] sub r14, [rdi] jz loc_130F mov rax, 7FFFFFFFFFFFFFFCh cmp...
long long func0(long long a1, int a2) { unsigned long long v4; // r14 _DWORD *v5; // rbx _DWORD *v6; // rbp signed long long v7; // r15 _DWORD *v8; // rcx int v9; // r8d long long i; // rsi _DWORD *v11; // rbp char *v12; // r15 int v13; // r12d char *v14; // rax unsigned long long j; // rax i...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x38 MOV R13,RDI MOV R12D,ESI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x28],RAX XOR EAX,EAX MOV R14,qword ptr [RDI + 0x8] SUB R14,qword ptr [RDI] JZ 0x0010130f MOV RAX,0x7ffffffffffffffc CMP RAX,R14 JC 0x001012f5 MOV RDI,R14 LAB_00101...
/* func0(std::vector<int, std::allocator<int> > const&, int) */ int func0(vector *param_1,int param_2) { int *__src; int *__dest; long lVar1; int8 uVar2; long lVar3; int *piVar4; int iVar5; int iVar6; int4 *__src_00; int iVar7; long lVar8; ulong uVar9; size_t sVar10; int4 *__dest_00; lon...
978
func0
#include <iostream> #include <vector> #include <assert.h> #include <climits>
int func0(const std::vector<int>& arr, int n) { std::vector<int> MSIBS = arr; for (int i = 0; i < n; i++) { for (int j = 0; j < i; j++) { if (arr[i] > arr[j] && MSIBS[i] < MSIBS[j] + arr[i]) { MSIBS[i] = MSIBS[j] + arr[i]; } } } std:...
int main() { assert(func0({1, 15, 51, 45, 33, 100, 12, 18, 9}, 9) == 194); assert(func0({80, 60, 30, 40, 20, 10}, 6) == 210); assert(func0({2, 3, 14, 16, 21, 23, 29, 30}, 8) == 138); return 0; }
O2
cpp
func0(std::vector<int, std::allocator<int> > const&, int): endbr64 push %r15 push %r14 push %r13 push %r12 mov %rdi,%r12 push %rbp push %rbx mov %esi,%ebx sub $0x18,%rsp mov 0x8(%rdi),%r15 mov (%rdi),%r13 mov %r15,%r14 sub %r13,%r14 mov %r14,%rax sar $0x2,%rax je 1746 <_Z5func...
_Z5func0RKSt6vectorIiSaIiEEi: endbr64 push r15 push r14 mov r14, rdi push r13 push r12 push rbp mov ebp, esi push rbx sub rsp, 38h mov r15, [rdi] mov r8, [rdi+8] mov rax, fs:28h mov [rsp+68h+var_40], rax xor eax, eax sub r8, r15 mov r13, r8 jz loc_1561 mov ...
long long func0(long long a1, int a2) { char *v2; // rbx unsigned long long v3; // r12 _DWORD *v6; // r15 char *v7; // r8 unsigned long long v8; // r13 char *v9; // rax _DWORD *v10; // rcx int v11; // r9d long long v12; // rsi long long v13; // rdi unsigned long long i; // rax int v15; // edx ...
func0: ENDBR64 PUSH R15 PUSH R14 MOV R14,RDI PUSH R13 PUSH R12 PUSH RBP MOV EBP,ESI PUSH RBX SUB RSP,0x38 MOV R15,qword ptr [RDI] MOV R8,qword ptr [RDI + 0x8] MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x28],RAX XOR EAX,EAX SUB R8,R15 MOV R13,R8 JZ 0x00101561 MOV RAX,0x7ffffffffffffffc CMP RAX,R8 JC 0x001016da MO...
/* func0(std::vector<int, std::allocator<int> > const&, int) */ int func0(vector *param_1,int param_2) { long lVar1; long lVar2; long lVar3; int *piVar4; int iVar5; size_t __n; int *unaff_RBX; long lVar6; int *piVar7; int *piVar8; int iVar9; int iVar10; int *unaff_R12; int *__src; long i...
979
func0
#include <iostream> #include <vector> #include <assert.h> #include <climits>
int func0(const std::vector<int>& arr, int n) { std::vector<int> MSIBS = arr; for (int i = 0; i < n; i++) { for (int j = 0; j < i; j++) { if (arr[i] > arr[j] && MSIBS[i] < MSIBS[j] + arr[i]) { MSIBS[i] = MSIBS[j] + arr[i]; } } } std:...
int main() { assert(func0({1, 15, 51, 45, 33, 100, 12, 18, 9}, 9) == 194); assert(func0({80, 60, 30, 40, 20, 10}, 6) == 210); assert(func0({2, 3, 14, 16, 21, 23, 29, 30}, 8) == 138); return 0; }
O3
cpp
func0(std::vector<int, std::allocator<int> > const&, int): endbr64 push %r15 push %r14 push %r13 push %r12 mov %rdi,%r12 push %rbp push %rbx mov %esi,%ebx sub $0x18,%rsp mov 0x8(%rdi),%r14 mov (%rdi),%r13 mov %r14,%r15 sub %r13,%r15 mov %r15,%rax sar $0x2,%rax je 17ac <_Z5func...
_Z5func0RKSt6vectorIiSaIiEEi: endbr64 push r15 push r14 mov r14, rdi push r13 push r12 push rbp mov ebp, esi push rbx sub rsp, 38h mov r15, [rdi] mov rcx, [rdi+8] mov rax, fs:28h mov [rsp+68h+var_40], rax xor eax, eax sub rcx, r15 mov r13, rcx jz loc_1772 m...
long long func0(_QWORD *a1, int a2) { int *v2; // rbx unsigned long long v3; // r12 _QWORD *v4; // r14 _DWORD *v6; // r15 signed long long v7; // rcx unsigned long long v8; // r13 int *v9; // rax _DWORD *v10; // rdi int *v11; // r8 int v12; // esi long long v13; // rax int v14; // edx long lo...
func0: ENDBR64 PUSH R15 PUSH R14 MOV R14,RDI PUSH R13 PUSH R12 PUSH RBP MOV EBP,ESI PUSH RBX SUB RSP,0x38 MOV R15,qword ptr [RDI] MOV RCX,qword ptr [RDI + 0x8] MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x28],RAX XOR EAX,EAX SUB RCX,R15 MOV R13,RCX JZ 0x00101772 MOV RAX,0x7ffffffffffffffc CMP RAX,RCX JC 0x001017a...
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* func0(std::vector<int, std::allocator<int> > const&, int) */ uint func0(vector *param_1,int param_2) { vector *pvVar1; long lVar2; int iVar3; uint uVar4; long lVar5; vector *pvVar6; int iVar7; uint uVar8; uint uV...
980
func0
#include <assert.h> #include <cmath>
double func0(double number) { if(number == 0){ return 0; } double g = number / 2.0; double g2 = g + 1; while(fabs(g - g2) > 1e-6){ double n = number / g; g2 = g; g = (g + n) / 2; } return g; }
int main() { assert(fabs(func0(10) - 3.162277660168379) < 1e-9); assert(fabs(func0(2) - 1.414213562373095) < 1e-9); assert(fabs(func0(9) - 3.0) < 1e-9); return 0; }
O0
cpp
func0(double): endbr64 push %rbp mov %rsp,%rbp movsd %xmm0,-0x28(%rbp) pxor %xmm0,%xmm0 ucomisd -0x28(%rbp),%xmm0 jp 1175 <_Z5func0d+0x2c> pxor %xmm0,%xmm0 ucomisd -0x28(%rbp),%xmm0 jne 1175 <_Z5func0d+0x2c> pxor %xmm0,%xmm0 jmpq 11fc <_Z5func0d+0xb3> movsd -0x28(%rbp),%xmm0 movsd 0xf5e(%rip),%xm...
_Z5func0d: endbr64 push rbp mov rbp, rsp movsd [rbp+var_28], xmm0 pxor xmm0, xmm0 ucomisd xmm0, [rbp+var_28] jp short loc_1175 pxor xmm0, xmm0 ucomisd xmm0, [rbp+var_28] jnz short loc_1175 pxor xmm0, xmm0 jmp loc_11FC loc_1175: movsd xmm0, [rbp+var_28] movsd xmm1, cs:dbl_20C0 divsd ...
double func0(double a1) { double v2; // [rsp+10h] [rbp-18h] double v3; // [rsp+18h] [rbp-10h] if ( a1 == 0.0 ) return 0.0; v2 = a1 / 2.0; v3 = a1 / 2.0 + 1.0; while ( fabs(v2 - v3) > 0.000001 ) { v3 = v2; v2 = (v2 + a1 / v2) / 2.0; } return v2; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOVSD qword ptr [RBP + -0x28],XMM0 PXOR XMM0,XMM0 UCOMISD XMM0,qword ptr [RBP + -0x28] JP 0x00101175 PXOR XMM0,XMM0 UCOMISD XMM0,qword ptr [RBP + -0x28] JNZ 0x00101175 PXOR XMM0,XMM0 JMP 0x001011fc LAB_00101175: MOVSD XMM0,qword ptr [RBP + -0x28] MOVSD XMM1,qword ptr [0x001020c0] DIV...
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* func0(double) */ double func0(double param_1) { int8 local_20; int8 local_18; if (param_1 == 0.0) { local_20 = 0.0; } else { local_20 = param_1 / DAT_001020c0; local_18 = DAT_001020c8 + local_20; for (...
981
func0
#include <assert.h> #include <cmath>
double func0(double number) { if(number == 0){ return 0; } double g = number / 2.0; double g2 = g + 1; while(fabs(g - g2) > 1e-6){ double n = number / g; g2 = g; g = (g + n) / 2; } return g; }
int main() { assert(fabs(func0(10) - 3.162277660168379) < 1e-9); assert(fabs(func0(2) - 1.414213562373095) < 1e-9); assert(fabs(func0(9) - 3.0) < 1e-9); return 0; }
O1
cpp
func0(double): endbr64 movapd %xmm0,%xmm3 ucomisd 0xf7f(%rip),%xmm0 jnp 11d4 <_Z5func0d+0x8b> movapd %xmm3,%xmm0 mulsd 0xf79(%rip),%xmm0 movapd %xmm0,%xmm1 addsd 0xf75(%rip),%xmm1 movapd %xmm0,%xmm7 subsd %xmm1,%xmm7 movapd %xmm7,%xmm1 andpd 0xfa9(%rip),%xmm1 comisd 0xf61(%rip),%xmm1 jbe 11da <_Z5func0d+0x91>...
_Z5func0d: endbr64 movapd xmm2, xmm0 pxor xmm0, xmm0 ucomisd xmm2, xmm0 jp short loc_115D jz short locret_11D1 loc_115D: movapd xmm0, xmm2 mulsd xmm0, cs:qword_20B0 movapd xmm3, xmm0 addsd xmm3, cs:qword_20B8 movapd xmm1, xmm0 subsd xmm1, xmm3 andpd xmm1, cs:xmmword_2100 comisd xmm1, cs:qword_...
void func0(double a1) { double v2; // xmm0_8 double v3; // xmm3_8 if ( a1 != 0.0 ) { v2 = a1 * 0.5; if ( fabs(a1 * 0.5 - (a1 * 0.5 + 1.0)) > 0.000001 ) { do { v3 = v2; v2 = (a1 / v2 + v2) * 0.5; } while ( fabs(v2 - v3) > 0.000001 ); } } }
func0: ENDBR64 MOVAPD XMM2,XMM0 PXOR XMM0,XMM0 UCOMISD XMM2,XMM0 JP 0x0010115d JZ 0x001011d1 LAB_0010115d: MOVAPD XMM0,XMM2 MULSD XMM0,qword ptr [0x001020b0] MOVAPD XMM3,XMM0 ADDSD XMM3,qword ptr [0x001020b8] MOVAPD XMM1,XMM0 SUBSD XMM1,XMM3 ANDPD XMM1,xmmword ptr [0x00102100] COMISD XMM1,qword ptr [0x001020c0] JBE 0x0...
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* func0(double) */ void func0(double param_1) { double dVar1; double dVar2; double dVar3; if (param_1 != 0.0) { dVar1 = param_1 * DAT_001020b0; dVar3 = dVar1 - (dVar1 + _DAT_001020b8); while (DAT_001020c0 < (d...