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
482
func0
#include <iostream> #include <assert.h>
bool func0(int A[], int n, int sum, int count) { if (count == 3 && sum == 0) { return true; } if (count == 3 || n == 0 || sum < 0) { return false; } return func0(A, n - 1, sum - A[n - 1], count + 1) || func0(A, n - 1, sum, count); }
int main() { int arr1[] = {2, 7, 4, 0, 9, 5, 1, 3}; assert(func0(arr1, 8, 6, 0) == true); int arr2[] = {1, 4, 5, 6, 7, 8, 5, 9}; assert(func0(arr2, 8, 6, 0) == false); int arr3[] = {10, 4, 2, 3, 5}; assert(func0(arr3, 5, 15, 0) == true); std::cout << "All tests passe...
O2
cpp
func0(int*, int, int, int): endbr64 cmp $0x3,%ecx sete %r8b test %edx,%edx sete %al and %r8b,%al jne 1400 <_Z5func0Piiii+0x30> test %esi,%esi mov %edx,%r9d sete %r10b shr $0x1f,%r9d or %r9b,%r10b jne 1400 <_Z5func0Piiii+0x30> test %r8b,%r8b jne 1400 <_Z5func0Piiii+0x30> jmp 1410 ...
_Z5func0Piiii: endbr64 cmp ecx, 3 push r14 setz al test edx, edx push r13 push r12 mov r12d, edx setz dl and dl, al push rbp mov ebp, edx push rbx jnz short loc_142A mov edx, r12d sub esi, 1 mov r14, rdi mov r13d, ecx shr edx, 1Fh movsxd rbx, esi or ...
long long func0(int *a1, int a2, int a3, int a4) { int v4; // r12d unsigned int v5; // ebp long long v7; // rbx int v8; // esi int v9; // edx unsigned int v10; // eax v4 = a3; LOBYTE(a3) = a4 == 3 && a3 == 0; v5 = a3; if ( !(_BYTE)a3 ) { v7 = a2 - 1; if ( v4 >= 0 && a4 != 3 ) { ...
func0: ENDBR64 CMP ECX,0x3 PUSH R14 SETZ AL TEST EDX,EDX PUSH R13 PUSH R12 MOV R12D,EDX SETZ DL AND DL,AL PUSH RBP MOV EBP,EDX PUSH RBX JNZ 0x0010142a MOV EDX,R12D SUB ESI,0x1 MOV R14,RDI MOV R13D,ECX SHR EDX,0x1f MOVSXD RBX,ESI OR AL,DL JNZ 0x0010142a LAB_00101406: CMP EBX,-0x1 JZ 0x0010142a MOV ESI,EBX LEA ECX,[R13 +...
/* func0(int*, int, int, int) */ char func0(int *param_1,int param_2,int param_3,int param_4) { int *piVar1; char cVar2; bool bVar3; int iVar4; long lVar5; bool bVar6; bVar6 = param_4 == 3; bVar3 = param_3 == 0 && bVar6; cVar2 = bVar3; if ((param_3 != 0 || !bVar6) && (lVar5 = (long)(param_2 + -...
483
func0
#include <iostream> #include <assert.h>
bool func0(int A[], int n, int sum, int count) { if (count == 3 && sum == 0) { return true; } if (count == 3 || n == 0 || sum < 0) { return false; } return func0(A, n - 1, sum - A[n - 1], count + 1) || func0(A, n - 1, sum, count); }
int main() { int arr1[] = {2, 7, 4, 0, 9, 5, 1, 3}; assert(func0(arr1, 8, 6, 0) == true); int arr2[] = {1, 4, 5, 6, 7, 8, 5, 9}; assert(func0(arr2, 8, 6, 0) == false); int arr3[] = {10, 4, 2, 3, 5}; assert(func0(arr3, 5, 15, 0) == true); std::cout << "All tests passe...
O3
cpp
func0(int*, int, int, int) [clone .part.0]: push %r15 lea 0x1(%rcx),%r15d push %r14 mov %edx,%r14d push %r13 shr $0x1f,%r14d mov %ecx,%r13d push %r12 mov %rdi,%r12 push %rbp mov %edx,%ebp push %rbx mov %esi,%ebx sub $0x18,%rsp movslq %ebx,%rax cmp $0x3,%r15d mov %ebp,%r9d sete ...
_Z5func0Piiii: endbr64 push r15 push r14 push r13 push r12 mov r12d, edx push rbp push rbx sub rsp, 18h cmp ecx, 3 setz al test edx, edx setz dl mov ebx, edx and bl, al jnz loc_145D test esi, esi mov r13d, ecx mov ecx, r12d setz dl shr ecx, 1Fh or ...
long long func0(int *a1, int a2, int a3, int a4) { int v4; // r12d unsigned int v5; // ebx int v7; // r8d long long v8; // rbp bool v9; // r15 int v10; // r9d unsigned int v11; // eax int v13; // [rsp+8h] [rbp-40h] int v14; // [rsp+Ch] [rbp-3Ch] v4 = a3; LOBYTE(a3) = a3 == 0; v5 = a3; LOBYTE...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 MOV R12D,EDX PUSH RBP PUSH RBX SUB RSP,0x18 CMP ECX,0x3 SETZ AL TEST EDX,EDX SETZ DL MOV EBX,EDX AND BL,AL JNZ 0x0010145d TEST ESI,ESI MOV R13D,ECX MOV ECX,R12D SETZ DL SHR ECX,0x1f OR DL,CL JNZ 0x0010145d TEST AL,AL JNZ 0x0010145d CMP R13D,0x2 LEA R8D,[R13 + 0x1] MOVS...
/* func0(int*, int, int, int) */ ulong func0(int *param_1,int param_2,int param_3,int param_4) { uint3 uVar1; uint uVar2; uint7 uVar3; uint7 extraout_var; ulong uVar4; long lVar5; int iVar6; int iVar7; bool bVar8; bVar8 = param_4 == 3; uVar1 = (uint3)((uint)param_3 >> 8); uVar3 = (uint7)uVa...
484
func0
#include <iostream> #include <vector> #include <assert.h> #include <algorithm> const int MAX = 3000;
int func0(int n) { std::vector<int> primes(MAX, 0); std::vector<int> result; for (int i = 2; i < MAX; ++i) { if (primes[i] == 0) { primes[i] = 1; int j = i * 2; while (j < MAX) { primes[j] -= 1; if (primes[j] + 3 == 0) { ...
int main() { assert(func0(1) == 30); assert(func0(50) == 273); assert(func0(1000) == 2664); return 0; }
O0
cpp
func0(int): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x68,%rsp mov %edi,-0x64(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax lea -0x58(%rbp),%rax mov %rax,%rdi callq 1676 <_ZNSaIiEC1Ev> movl $0x0,-0x30(%rbp) lea -0x58(%rbp),%rcx lea -0x30(%rbp),%rdx lea -0x50(%r...
_Z5func0i: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 68h mov [rbp+var_64], edi mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax lea rax, [rbp+var_60] mov [rbp+var_58], rax nop nop mov [rbp+var_30], 0 lea rcx, [rbp+var_60] lea rdx, [rbp+var_30] lea rax, [rbp+...
long long func0(int a1) { _DWORD *v1; // rax long long v2; // rbx long long v3; // rax int j; // [rsp+10h] [rbp-60h] BYREF int i; // [rsp+14h] [rbp-5Ch] int *v7; // [rsp+18h] [rbp-58h] _BYTE v8[32]; // [rsp+20h] [rbp-50h] BYREF _DWORD v9[6]; // [rsp+40h] [rbp-30h] BYREF unsigned long long v10; // [rs...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x68 MOV dword ptr [RBP + -0x64],EDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX LEA RAX,[RBP + -0x60] MOV qword ptr [RBP + -0x58],RAX NOP NOP MOV dword ptr [RBP + -0x30],0x0 LEA RCX,[RBP + -0x60] LEA RDX,[RBP + -0x30] LEA RAX,[RBP + -0x50...
/* func0(int) */ int4 func0(int param_1) { int4 uVar1; __normal_iterator _Var2; __normal_iterator _Var3; int *piVar4; int4 *puVar5; long in_FS_OFFSET; int local_68; int local_64; int *local_60; vector<int,std::allocator<int>> local_58 [32]; int local_38 [6]; long local_20; local_20 = *(lo...
485
func0
#include <iostream> #include <vector> #include <assert.h> #include <algorithm> const int MAX = 3000;
int func0(int n) { std::vector<int> primes(MAX, 0); std::vector<int> result; for (int i = 2; i < MAX; ++i) { if (primes[i] == 0) { primes[i] = 1; int j = i * 2; while (j < MAX) { primes[j] -= 1; if (primes[j] + 3 == 0) { ...
int main() { assert(func0(1) == 30); assert(func0(50) == 273); assert(func0(1000) == 2664); return 0; }
O1
cpp
func0(int): endbr64 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x30,%rsp mov %edi,%r14d mov %fs:0x28,%rax mov %rax,0x28(%rsp) xor %eax,%eax mov $0x2ee0,%edi callq 1130 <_Znwm@plt> mov %rax,%rbp lea 0x2ee0(%rax),%rdx movl $0x0,(%rax) add $0x4,%rax cmp %rdx,%rax jne ...
_Z5func0i: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 68h mov [rsp+98h+var_8C], edi mov rax, fs:28h mov [rsp+98h+var_40], rax xor eax, eax mov edi, 2EE0h; unsigned __int64 call __Znwm; operator new(ulong) mov r13, rax mov [rsp+98h+var_78],...
long long func0(int a1) { _DWORD *v1; // rax _DWORD *v2; // r13 _DWORD *v3; // rdx long long i; // r12 long long v5; // rbx int v6; // eax char *v7; // rsi char *v8; // rbp char *v9; // rbx long long v10; // r12 unsigned long long v11; // rcx int v12; // eax unsigned long long v13; // rax c...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x68 MOV dword ptr [RSP + 0xc],EDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x58],RAX XOR EAX,EAX MOV EDI,0x2ee0 LAB_00101254: CALL 0x001010f0 MOV R13,RAX MOV qword ptr [RSP + 0x20],RAX LEA RDX,[RAX + 0x2ee0] MOV qword ptr [RSP + 0x30]...
/* func0(int) */ int func0(int param_1,int param_2,int param_3,int param_4,int param_5, int param_6,int param_7,int param_8,int param_9,int param_10, int4 param_11,int8 param_12,int8 param_13) { int iVar1; int iVar2; int *piVar3; int *piVar4; int *piVar5; int *piVar6; int *piVar7; ui...
486
func0
#include <iostream> #include <vector> #include <assert.h> #include <algorithm> const int MAX = 3000;
int func0(int n) { std::vector<int> primes(MAX, 0); std::vector<int> result; for (int i = 2; i < MAX; ++i) { if (primes[i] == 0) { primes[i] = 1; int j = i * 2; while (j < MAX) { primes[j] -= 1; if (primes[j] + 3 == 0) { ...
int main() { assert(func0(1) == 30); assert(func0(50) == 273); assert(func0(1000) == 2664); return 0; }
O2
cpp
func0(int): endbr64 push %r15 push %r14 mov %edi,%r14d mov $0x2ee0,%edi push %r13 push %r12 push %rbp push %rbx sub $0x38,%rsp mov %fs:0x28,%rax mov %rax,0x28(%rsp) xor %eax,%eax callq 1130 <_Znwm@plt> mov %rax,%rbp lea 0x2ee0(%rax),%rdx nopl 0x0(%rax) movl $0x0,(%rax) add $0...
_Z5func0i: endbr64 push r15 push r14 push r13 push r12 mov r12d, 2 push rbp push rbx sub rsp, 68h mov [rsp+98h+var_8C], edi mov edi, 2EE0h; unsigned __int64 mov rax, fs:28h mov [rsp+98h+var_40], rax xor eax, eax call __Znwm; operator new(ulong) mov edx, 2EE0h; n xor ...
long long func0(int a1) { long long v1; // r12 char *v2; // rax char *v3; // rbx _DWORD *v4; // r13 long long v5; // rbx int v6; // ebp int v7; // eax char *v8; // rsi char *v9; // r12 char *v10; // rbp long long v11; // rdx signed long long v12; // rbx unsigned long long v13; // rax char *...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 MOV R12D,0x2 PUSH RBP PUSH RBX SUB RSP,0x68 MOV dword ptr [RSP + 0xc],EDI MOV EDI,0x2ee0 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x58],RAX XOR EAX,EAX LAB_001016f1: CALL 0x00101110 MOV EDX,0x2ee0 XOR ESI,ESI LEA RBX,[RAX + 0x2ee0] MOV RDI,RAX MOV qword ptr [RS...
/* func0(int) */ int func0(int param_1,int param_2,int param_3,int param_4,int param_5, int param_6,int param_7,int param_8,int param_9,int param_10, int4 param_11,int8 param_12,int8 param_13) { int *piVar1; int8 uVar2; int8 uVar3; int iVar4; void *__s; ulong uVar5; int *piVar6; int7...
487
func0
#include <iostream> #include <vector> #include <assert.h> #include <algorithm> const int MAX = 3000;
int func0(int n) { std::vector<int> primes(MAX, 0); std::vector<int> result; for (int i = 2; i < MAX; ++i) { if (primes[i] == 0) { primes[i] = 1; int j = i * 2; while (j < MAX) { primes[j] -= 1; if (primes[j] + 3 == 0) { ...
int main() { assert(func0(1) == 30); assert(func0(50) == 273); assert(func0(1000) == 2664); return 0; }
O3
cpp
func0(int): endbr64 push %r15 xor %r15d,%r15d push %r14 push %r13 push %r12 push %rbp push %rbx mov $0x2,%ebx sub $0x48,%rsp mov %edi,0xc(%rsp) mov $0x2ee0,%edi lea 0x1c(%rsp),%r13 mov %fs:0x28,%rax mov %rax,0x38(%rsp) xor %eax,%eax callq 1150 <_Znwm@plt> mov $0x2ee0,%edx xor ...
_Z5func0i: endbr64 push r15 push r14 push r13 push r12 mov r12d, 2 push rbp push rbx sub rsp, 68h mov [rsp+98h+var_8C], edi mov edi, 2EE0h; unsigned __int64 mov rax, fs:28h mov [rsp+98h+var_40], rax xor eax, eax call __Znwm; operator new(ulong) mov edx, 2EE0h; n xor ...
long long func0(int a1) { long long v1; // r12 char *v2; // rax char *v3; // rbx _DWORD *v4; // r13 long long v5; // rbx int v6; // ebp int v7; // eax char *v8; // rsi int *v9; // r12 int *v10; // rbx int *v11; // r15 signed long long v12; // rbp unsigned long long v13; // rdx int *v14; // ...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 MOV R12D,0x2 PUSH RBP PUSH RBX SUB RSP,0x68 MOV dword ptr [RSP + 0xc],EDI MOV EDI,0x2ee0 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x58],RAX XOR EAX,EAX LAB_00101611: CALL 0x00101110 MOV EDX,0x2ee0 XOR ESI,ESI LEA RBX,[RAX + 0x2ee0] MOV RDI,RAX MOV qword ptr [RS...
/* func0(int) */ int func0(int param_1,int param_2,int param_3,int param_4,int param_5, int param_6,int param_7,int param_8,int param_9,int param_10, int4 param_11,int8 param_12,int8 param_13) { int8 __src; int8 uVar1; int iVar2; void *__s; int *piVar3; int7 in_register_00000009; int8 ...
488
func0
#include <iostream> #include <set> #include <assert.h>
int func0(int limit) { if (limit < 1) { throw std::invalid_argument("Input must be bigger than 0!"); } std::set<int> amicables; for (int num = 2; num <= limit; num++) { if (amicables.find(num) != amicables.end()) { continue; } int sum_fact = 0; ...
int main() { assert(func0(999) == 504); assert(func0(9999) == 31626); assert(func0(99) == 0); return 0; }
O0
cpp
func0(int): endbr64 push %rbp mov %rsp,%rbp push %r12 push %rbx sub $0x90,%rsp mov %edi,-0x94(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax cmpl $0x0,-0x94(%rbp) jg 136e <_Z5func0i+0x65> mov $0x10,%edi callq 1150 <__cxa_allocate_exception@plt> mov %rax,%rbx lea 0x1cb...
_Z5func0i: endbr64 push rbp mov rbp, rsp push r12 push rbx add rsp, 0FFFFFFFFFFFFFF80h mov [rbp+var_84], edi mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax cmp [rbp+var_84], 0 jg short loc_1365 mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax...
long long func0(int a1) { std::invalid_argument *exception; // rbx unsigned int v2; // ebx int i; // [rsp+10h] [rbp-80h] BYREF int v5; // [rsp+14h] [rbp-7Ch] int j; // [rsp+18h] [rbp-78h] int k; // [rsp+1Ch] [rbp-74h] unsigned int v8; // [rsp+20h] [rbp-70h] int v9; // [rsp+24h] [rbp-6Ch] long long v1...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R12 PUSH RBX ADD RSP,-0x80 MOV dword ptr [RBP + -0x84],EDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX CMP dword ptr [RBP + -0x84],0x0 JG 0x00101365 MOV EDI,0x10 CALL 0x00101140 MOV RBX,RAX LEA RAX,[0x103008] MOV RSI,RAX MOV RDI,RBX LAB_00101330: CALL...
/* func0(int) */ int func0(int param_1) { int iVar1; char cVar2; invalid_argument *this; int *piVar3; long in_FS_OFFSET; int local_88; int local_84; int local_80; int local_7c; int local_78; int local_74; int8 local_70; ulong local_68; set<int,std::less<int>,std::allocator<int>> *local_60;...
489
func0
#include <iostream> #include <set> #include <assert.h>
int func0(int limit) { if (limit < 1) { throw std::invalid_argument("Input must be bigger than 0!"); } std::set<int> amicables; for (int num = 2; num <= limit; num++) { if (amicables.find(num) != amicables.end()) { continue; } int sum_fact = 0; ...
int main() { assert(func0(999) == 504); assert(func0(9999) == 31626); assert(func0(99) == 0); return 0; }
O1
cpp
func0(int): endbr64 push %r13 push %r12 push %rbp push %rbx sub $0x58,%rsp mov %fs:0x28,%rax mov %rax,0x48(%rsp) xor %eax,%eax test %edi,%edi jle 135f <_Z5func0i+0x76> mov %edi,%ebx movl $0x0,0x18(%rsp) movq $0x0,0x20(%rsp) lea 0x18(%rsp),%rax mov %rax,0x28(%rsp) mov %rax,0x30(%...
_Z5func0i: endbr64 push r14 push r13 push r12 push rbp push rbx sub rsp, 50h mov rax, fs:28h mov [rsp+78h+var_30], rax xor eax, eax test edi, edi jle short loc_1325 mov ebp, edi mov [rsp+78h+var_60], 0 mov [rsp+78h+var_58], 0 lea rax, [rsp+78h+var_60] mov [rsp+7...
long long func0(int a1) { int i; // ebx std::invalid_argument *exception; // rbx long long v4; // rax int *v5; // rdx int v6; // edi char v7; // r8 int j; // esi int *v9; // rdi unsigned int v10; // ebx int v12; // esi int v13; // ecx int v14; // [rsp+8h] [rbp-70h] BYREF int v15; // [rsp+Ch] ...
func0: ENDBR64 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x50 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x48],RAX XOR EAX,EAX TEST EDI,EDI JLE 0x00101325 MOV EBP,EDI MOV dword ptr [RSP + 0x18],0x0 MOV qword ptr [RSP + 0x20],0x0 LEA RAX,[RSP + 0x18] MOV qword ptr [RSP + 0x28],RAX MOV qword ptr [RSP + 0...
/* func0(int) */ int func0(int param_1) { bool bVar1; invalid_argument *this; _Rb_tree_node *p_Var2; _Rb_tree_node *p_Var3; _Rb_tree_node_base *p_Var4; _Rb_tree_node *p_Var5; int iVar6; int iVar7; int iVar8; int iVar9; long in_FS_OFFSET; int local_70; int local_6c; _Rb_tree<int,int,std::_I...
490
func0
#include <iostream> #include <set> #include <assert.h>
int func0(int limit) { if (limit < 1) { throw std::invalid_argument("Input must be bigger than 0!"); } std::set<int> amicables; for (int num = 2; num <= limit; num++) { if (amicables.find(num) != amicables.end()) { continue; } int sum_fact = 0; ...
int main() { assert(func0(999) == 504); assert(func0(9999) == 31626); assert(func0(99) == 0); return 0; }
O2
cpp
func0(int): endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x58,%rsp mov %fs:0x28,%rax mov %rax,0x48(%rsp) xor %eax,%eax test %edi,%edi jle 1200 <_Z5func0i.cold> lea 0x18(%rsp),%rbx mov %edi,%ebp xor %r15d,%r15d movl $0x0,0x18(%rsp) movq $0x0,0x20(%rsp...
_Z5func0i: endbr64 push r13 push r12 push rbp push rbx sub rsp, 58h mov rax, fs:28h mov [rsp+78h+var_30], rax xor eax, eax test edi, edi jle _Z5func0i_cold; func0(int) [clone] lea rbp, [rsp+78h+var_60] mov r12d, edi xor r13d, r13d mov ebx, 2 mov [rsp+78h+var_60], 0...
long long func0( int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8, int a9, int a10, int a11, int a12, int a13, int a14, long long a15) { _QWORD *v16; // r13 int v17; // ebx _QWORD...
func0: ENDBR64 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x58 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x48],RAX XOR EAX,EAX TEST EDI,EDI JLE 0x001011c0 LEA RBP,[RSP + 0x18] MOV R12D,EDI XOR R13D,R13D MOV EBX,0x2 MOV dword ptr [RSP + 0x18],0x0 MOV qword ptr [RSP + 0x20],0x0 MOV qword ptr [RSP + 0x28],RBP MOV ...
/* func0(int) */ int func0(int param_1) { bool bVar1; invalid_argument *this; _Rb_tree_node_base *p_Var2; _Rb_tree_node_base *p_Var3; int iVar4; int iVar5; int iVar6; _Rb_tree_node_base *p_Var7; int iVar8; _Rb_tree_node_base *p_Var9; long in_FS_OFFSET; int local_70; int local_6c; _Rb_tree<...
491
func0
#include <iostream> #include <set> #include <assert.h>
int func0(int limit) { if (limit < 1) { throw std::invalid_argument("Input must be bigger than 0!"); } std::set<int> amicables; for (int num = 2; num <= limit; num++) { if (amicables.find(num) != amicables.end()) { continue; } int sum_fact = 0; ...
int main() { assert(func0(999) == 504); assert(func0(9999) == 31626); assert(func0(99) == 0); return 0; }
O3
cpp
func0(int): endbr64 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x50,%rsp mov %fs:0x28,%rax mov %rax,0x48(%rsp) xor %eax,%eax test %edi,%edi jle 1200 <_Z5func0i.cold> lea 0x18(%rsp),%rbx mov %edi,%ebp xor %r14d,%r14d mov $0x2,%ecx mov %rbx,0x28(%rsp) lea 0x8(%rsp)...
_Z5func0i: endbr64 push r13 push r12 push rbp push rbx sub rsp, 58h mov rax, fs:28h mov [rsp+78h+var_30], rax xor eax, eax test edi, edi jle _Z5func0i_cold; func0(int) [clone] lea rbp, [rsp+78h+var_60] mov r12d, edi xor r13d, r13d mov ebx, 2 mov [rsp+78h+var_60], 0...
long long func0( int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8, int a9, int a10, int a11, int a12, int a13, int a14, long long a15) { int *v16; // r13 int v17; // ebx int *v18;...
func0: ENDBR64 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x58 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x48],RAX XOR EAX,EAX TEST EDI,EDI JLE 0x001011c0 LEA RBP,[RSP + 0x18] MOV R12D,EDI XOR R13D,R13D MOV EBX,0x2 MOV dword ptr [RSP + 0x18],0x0 MOV qword ptr [RSP + 0x20],0x0 MOV qword ptr [RSP + 0x28],RBP MOV ...
/* func0(int) */ int func0(int param_1) { bool bVar1; _Rb_tree_node_base *p_Var2; _Rb_tree_node_base *p_Var3; _Rb_tree_node_base *p_Var4; _Rb_tree_node_base *p_Var5; invalid_argument *this; _Rb_tree_node_base *p_Var6; _Rb_tree_node_base *p_Var7; int iVar8; int iVar9; int iVar10; int iVar11; ...
492
func0
#include <iostream> #include <complex> #include <cmath> #include <cassert>
double func0(double a, double b) { std::complex<double> cn(a, b); double angle = std::arg(cn); return angle; }
int main() { assert(fabs(func0(0, 1) - 1.5707963267948966) < 1e-12); assert(fabs(func0(2, 1) - 0.4636476090008061) < 1e-12); assert(fabs(func0(0, 2) - 1.5707963267948966) < 1e-12); return 0; }
O0
cpp
func0(double, double): endbr64 push %rbp mov %rsp,%rbp sub $0x40,%rsp movsd %xmm0,-0x38(%rbp) movsd %xmm1,-0x40(%rbp) mov %fs:0x28,%rax mov %rax,-0x8(%rbp) xor %eax,%eax movsd -0x40(%rbp),%xmm0 mov -0x38(%rbp),%rdx lea -0x20(%rbp),%rax movapd %xmm0,%xmm1 movq %rdx,%xmm0 mov %rax,%rdi call...
_Z5func0dd: endbr64 push rbp mov rbp, rsp sub rsp, 40h movsd [rbp+var_38], xmm0 movsd [rbp+var_40], xmm1 mov rax, fs:28h mov [rbp+var_8], rax xor eax, eax movsd xmm0, [rbp+var_40] mov rdx, [rbp+var_38] lea rax, [rbp+var_20] movapd xmm1, xmm0 movq xmm0, rdx mov rdi, rax call ...
unsigned long long func0(double a1, double a2) { _BYTE v3[24]; // [rsp+20h] [rbp-20h] BYREF unsigned long long v4; // [rsp+38h] [rbp-8h] v4 = __readfsqword(0x28u); std::complex<double>::complex(v3, a1, a2); std::arg<double>(v3); return v4 - __readfsqword(0x28u); }
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOVSD qword ptr [RBP + -0x38],XMM0 MOVSD qword ptr [RBP + -0x40],XMM1 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX XOR EAX,EAX MOVSD XMM0,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RBP + -0x38] LEA RAX,[RBP + -0x20] MOVAPD XMM1,XMM0 MOVQ XMM0,RDX MOV RDI,RA...
/* func0(double, double) */ double func0(double param_1,double param_2) { long in_FS_OFFSET; double dVar1; complex<double> local_28 [24]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); std::complex<double>::complex(local_28,param_1,param_2); dVar1 = std::arg<double>((complex *)local_28); ...
493
func0
#include <iostream> #include <complex> #include <cmath> #include <cassert>
double func0(double a, double b) { std::complex<double> cn(a, b); double angle = std::arg(cn); return angle; }
int main() { assert(fabs(func0(0, 1) - 1.5707963267948966) < 1e-12); assert(fabs(func0(2, 1) - 0.4636476090008061) < 1e-12); assert(fabs(func0(0, 2) - 1.5707963267948966) < 1e-12); return 0; }
O1
cpp
func0(double, double): endbr64 sub $0x8,%rsp movapd %xmm0,%xmm2 movapd %xmm1,%xmm0 movapd %xmm2,%xmm1 callq 1070 <atan2@plt> add $0x8,%rsp retq
_Z5func0dd: endbr64 sub rsp, 8 movapd xmm2, xmm1 movapd xmm1, xmm0; x movapd xmm0, xmm2; y call _atan2 add rsp, 8 retn
double func0(double a1, double a2) { return atan2(a2, a1); }
func0: ENDBR64 SUB RSP,0x8 MOVAPD XMM2,XMM1 MOVAPD XMM1,XMM0 MOVAPD XMM0,XMM2 CALL 0x00101050 ADD RSP,0x8 RET
/* func0(double, double) */ void func0(double param_1,double param_2) { atan2(param_2,param_1); return; }
494
func0
#include <iostream> #include <complex> #include <cmath> #include <cassert>
double func0(double a, double b) { std::complex<double> cn(a, b); double angle = std::arg(cn); return angle; }
int main() { assert(fabs(func0(0, 1) - 1.5707963267948966) < 1e-12); assert(fabs(func0(2, 1) - 0.4636476090008061) < 1e-12); assert(fabs(func0(0, 2) - 1.5707963267948966) < 1e-12); return 0; }
O2
cpp
func0(double, double): endbr64 movapd %xmm0,%xmm2 movapd %xmm1,%xmm0 movapd %xmm2,%xmm1 jmpq 1070 <atan2@plt> nopw %cs:0x0(%rax,%rax,1)
_Z5func0dd: endbr64 movapd xmm2, xmm1 movapd xmm1, xmm0; x movapd xmm0, xmm2; y jmp _atan2
double func0(double a1, double a2) { return atan2(a2, a1); }
func0: ENDBR64 MOVAPD XMM2,XMM1 MOVAPD XMM1,XMM0 MOVAPD XMM0,XMM2 JMP 0x00101050
/* func0(double, double) */ void func0(double param_1,double param_2) { atan2(param_2,param_1); return; }
495
func0
#include <iostream> #include <complex> #include <cmath> #include <cassert>
double func0(double a, double b) { std::complex<double> cn(a, b); double angle = std::arg(cn); return angle; }
int main() { assert(fabs(func0(0, 1) - 1.5707963267948966) < 1e-12); assert(fabs(func0(2, 1) - 0.4636476090008061) < 1e-12); assert(fabs(func0(0, 2) - 1.5707963267948966) < 1e-12); return 0; }
O3
cpp
func0(double, double): endbr64 movapd %xmm0,%xmm2 movapd %xmm1,%xmm0 movapd %xmm2,%xmm1 jmpq 1070 <atan2@plt> nopw %cs:0x0(%rax,%rax,1)
_Z5func0dd: endbr64 movapd xmm2, xmm1 movapd xmm1, xmm0; x movapd xmm0, xmm2; y jmp _atan2
double func0(double a1, double a2) { return atan2(a2, a1); }
func0: ENDBR64 MOVAPD XMM2,XMM1 MOVAPD XMM1,XMM0 MOVAPD XMM0,XMM2 JMP 0x00101050
/* func0(double, double) */ void func0(double param_1,double param_2) { atan2(param_2,param_1); return; }
496
func0
#include <iostream> #include <cassert>
int func0(const std::string& string, int n) { int current_sum = 0; int max_sum = 0; for (int i = 0; i < n; i++) { current_sum += (string[i] == '0' ? 1 : -1); if (current_sum < 0) { current_sum = 0; } max_sum = std::max(current_sum, max_sum); } r...
int main() { assert(func0("11000010001", 11) == 6); assert(func0("10111", 5) == 1); assert(func0("11011101100101", 14) == 2); return 0; }
O0
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int): endbr64 push %rbp mov %rsp,%rbp sub $0x30,%rsp mov %rdi,-0x28(%rbp) mov %esi,-0x2c(%rbp) mov %fs:0x28,%rax mov %rax,-0x8(%rbp) xor %eax,%eax movl $0x0,-0x14(%rbp) movl $0x0,-0x10(%rbp) movl $...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi: endbr64 push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_28], rdi mov [rbp+var_2C], esi mov rax, fs:28h mov [rbp+var_8], rax xor eax, eax mov [rbp+var_14], 0 mov [rbp+var_10], 0 mov [rbp+var_C], 0 jmp short lo...
long long func0(long long a1, int a2) { int v2; // edx int v4; // [rsp+1Ch] [rbp-14h] BYREF unsigned int v5; // [rsp+20h] [rbp-10h] BYREF int i; // [rsp+24h] [rbp-Ch] unsigned long long v7; // [rsp+28h] [rbp-8h] v7 = __readfsqword(0x28u); v4 = 0; v5 = 0; for ( i = 0; i < a2; ++i ) { if ( *(_BY...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x28],RDI MOV dword ptr [RBP + -0x2c],ESI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX XOR EAX,EAX MOV dword ptr [RBP + -0x14],0x0 MOV dword ptr [RBP + -0x10],0x0 MOV dword ptr [RBP + -0xc],0x0 JMP 0x001013bc LAB_00101362: MOV EAX,dwor...
/* func0(std::string const&, int) */ int func0(string *param_1,int param_2) { char *pcVar1; int *piVar2; int iVar3; long in_FS_OFFSET; int local_1c; int local_18; int local_14; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_1c = 0; local_18 = 0; for (local_14 = 0; local_14 ...
497
func0
#include <iostream> #include <cassert>
int func0(const std::string& string, int n) { int current_sum = 0; int max_sum = 0; for (int i = 0; i < n; i++) { current_sum += (string[i] == '0' ? 1 : -1); if (current_sum < 0) { current_sum = 0; } max_sum = std::max(current_sum, max_sum); } r...
int main() { assert(func0("11000010001", 11) == 6); assert(func0("10111", 5) == 1); assert(func0("11011101100101", 14) == 2); return 0; }
O1
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int): endbr64 test %esi,%esi jle 1270 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi+0x47> mov (%rdi),%rdx lea -0x1(%rsi),%eax lea 0x1(%rdx,%rax,1),%r8 mov $0x0,%ecx mov $0x0,%eax mov $...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi: endbr64 test esi, esi jle short loc_1249 mov rdx, [rdi] movsxd rsi, esi add rsi, rdx mov ecx, 0 mov eax, 0 jmp short loc_123F loc_1226: sub eax, 1 mov edi, 0 cmovs eax, edi loc_1231: cmp ecx, eax cmovl ecx, eax ...
long long func0(_BYTE **a1, int a2) { _BYTE *v2; // rdx _BYTE *v3; // rsi unsigned int v4; // ecx int v5; // eax if ( a2 <= 0 ) { return 0; } else { v2 = *a1; v3 = &(*a1)[a2]; v4 = 0; v5 = 0; do { if ( *v2 == 48 ) { ++v5; } else if ( --v5 <...
func0: ENDBR64 TEST ESI,ESI JLE 0x00101249 MOV RDX,qword ptr [RDI] MOVSXD RSI,ESI ADD RSI,RDX MOV ECX,0x0 MOV EAX,0x0 JMP 0x0010123f LAB_00101226: SUB EAX,0x1 MOV EDI,0x0 CMOVS EAX,EDI LAB_00101231: CMP ECX,EAX CMOVL ECX,EAX ADD RDX,0x1 CMP RSI,RDX JZ 0x0010124e LAB_0010123f: CMP byte ptr [RDX],0x30 JNZ 0x00101226 ADD ...
/* func0(std::string const&, int) */ int func0(string *param_1,int param_2) { int iVar1; int iVar2; char *pcVar3; char *pcVar4; if (param_2 < 1) { iVar2 = 0; } else { pcVar3 = *(char **)param_1; pcVar4 = pcVar3 + param_2; iVar2 = 0; iVar1 = 0; do { if (*pcVar3 == '0') { ...
498
func0
#include <iostream> #include <cassert>
int func0(const std::string& string, int n) { int current_sum = 0; int max_sum = 0; for (int i = 0; i < n; i++) { current_sum += (string[i] == '0' ? 1 : -1); if (current_sum < 0) { current_sum = 0; } max_sum = std::max(current_sum, max_sum); } r...
int main() { assert(func0("11000010001", 11) == 6); assert(func0("10111", 5) == 1); assert(func0("11011101100101", 14) == 2); return 0; }
O2
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int): endbr64 test %esi,%esi jle 1430 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi+0x50> mov (%rdi),%rcx sub $0x1,%esi xor %r8d,%r8d xor %eax,%eax xor %edi,%edi lea 0x1(%rcx),%rdx add...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi: endbr64 test esi, esi jle short loc_1398 mov rdx, [rdi] movsxd rsi, esi xor ecx, ecx xor eax, eax add rsi, rdx jmp short loc_1379 loc_1360: sub eax, 1 mov edi, 0 cmovs eax, edi cmp ecx, eax cmovl ecx, eax add ...
long long func0(_BYTE **a1, int a2) { _BYTE *v2; // rdx unsigned int v3; // ecx int v4; // eax _BYTE *v5; // rsi if ( a2 <= 0 ) return 0LL; v2 = *a1; v3 = 0; v4 = 0; v5 = &(*a1)[a2]; do { while ( *v2 == 48 ) { if ( (int)v3 < ++v4 ) v3 = v4; if ( v5 == ++v2 ) ...
func0: ENDBR64 TEST ESI,ESI JLE 0x00101398 MOV RDX,qword ptr [RDI] MOVSXD RSI,ESI XOR ECX,ECX XOR EAX,EAX ADD RSI,RDX JMP 0x00101379 LAB_00101360: SUB EAX,0x1 MOV EDI,0x0 CMOVS EAX,EDI CMP ECX,EAX CMOVL ECX,EAX ADD RDX,0x1 CMP RSI,RDX JZ 0x0010138f LAB_00101379: CMP byte ptr [RDX],0x30 JNZ 0x00101360 ADD EAX,0x1 CMP EC...
/* func0(std::string const&, int) */ int func0(string *param_1,int param_2) { int iVar1; int iVar2; char *pcVar3; char *pcVar4; if (param_2 < 1) { return 0; } pcVar3 = *(char **)param_1; iVar2 = 0; iVar1 = 0; pcVar4 = pcVar3 + param_2; do { while (*pcVar3 == '0') { iVar1 = iVar1...
499
func0
#include <iostream> #include <cassert>
int func0(const std::string& string, int n) { int current_sum = 0; int max_sum = 0; for (int i = 0; i < n; i++) { current_sum += (string[i] == '0' ? 1 : -1); if (current_sum < 0) { current_sum = 0; } max_sum = std::max(current_sum, max_sum); } r...
int main() { assert(func0("11000010001", 11) == 6); assert(func0("10111", 5) == 1); assert(func0("11011101100101", 14) == 2); return 0; }
O3
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int): endbr64 test %esi,%esi jle 1438 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi+0x58> mov (%rdi),%rcx sub $0x1,%esi xor %r8d,%r8d xor %eax,%eax xor %edi,%edi lea 0x1(%rcx),%rdx add...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi: endbr64 test esi, esi jle short loc_1398 mov rdx, [rdi] movsxd rsi, esi xor ecx, ecx xor eax, eax add rsi, rdx nop dword ptr [rax] loc_1358: cmp byte ptr [rdx], 30h ; '0' jz short loc_1380 sub eax, 1 mov edi, 0...
long long func0(_BYTE **a1, int a2) { _BYTE *v2; // rdx unsigned int v3; // ecx int v4; // eax _BYTE *v5; // rsi if ( a2 <= 0 ) return 0LL; v2 = *a1; v3 = 0; v4 = 0; v5 = &(*a1)[a2]; do { while ( *v2 != 48 ) { if ( --v4 < 0 ) v4 = 0; if ( (int)v3 < v4 ) v3...
func0: ENDBR64 TEST ESI,ESI JLE 0x00101398 MOV RDX,qword ptr [RDI] MOVSXD RSI,ESI XOR ECX,ECX XOR EAX,EAX ADD RSI,RDX NOP dword ptr [RAX] LAB_00101358: CMP byte ptr [RDX],0x30 JZ 0x00101380 SUB EAX,0x1 MOV EDI,0x0 CMOVS EAX,EDI CMP ECX,EAX CMOVL ECX,EAX ADD RDX,0x1 CMP RSI,RDX JNZ 0x00101358 MOV EAX,ECX RET LAB_0010138...
/* func0(std::string const&, int) */ int func0(string *param_1,int param_2) { int iVar1; int iVar2; char *pcVar3; char *pcVar4; if (param_2 < 1) { return 0; } pcVar3 = *(char **)param_1; iVar2 = 0; iVar1 = 0; pcVar4 = pcVar3 + param_2; do { while (*pcVar3 == '0') { iVar1 = iVar1...
500
func0
#include <iostream> #include <cassert>
int func0(int a, int b) { int sum = 0; for (int i = 1; i < std::min(a, b); i++) { if (a % i == 0 && b % i == 0) { sum += i; } } return sum; }
int main() { assert(func0(10, 15) == 6); assert(func0(100, 150) == 93); assert(func0(4, 6) == 3); return 0; }
O0
cpp
func0(int, int): endbr64 push %rbp mov %rsp,%rbp sub $0x20,%rsp mov %edi,-0x14(%rbp) mov %esi,-0x18(%rbp) movl $0x0,-0x8(%rbp) movl $0x1,-0x4(%rbp) lea -0x18(%rbp),%rdx lea -0x14(%rbp),%rax mov %rdx,%rsi mov %rax,%rdi callq 1301 <_ZSt3minIiERKT_S2_S2_> mov (%rax),%eax cmp %eax,-0x4(...
_Z5func0ii: endbr64 push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_14], edi mov [rbp+var_18], esi mov [rbp+var_8], 0 mov [rbp+var_4], 1 jmp short loc_118F loc_116B: mov eax, [rbp+var_14] cdq idiv [rbp+var_4] mov eax, edx test eax, eax jnz short loc_118B mov eax, [rb...
long long func0(int a1, int a2) { int *v2; // rax int v4; // [rsp+8h] [rbp-18h] BYREF _DWORD v5[3]; // [rsp+Ch] [rbp-14h] BYREF unsigned int v6; // [rsp+18h] [rbp-8h] int i; // [rsp+1Ch] [rbp-4h] v5[0] = a1; v4 = a2; v6 = 0; for ( i = 1; ; ++i ) { v2 = (int *)std::min<int>(v5, &v4); if ( i...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0x14],EDI MOV dword ptr [RBP + -0x18],ESI MOV dword ptr [RBP + -0x8],0x0 MOV dword ptr [RBP + -0x4],0x1 JMP 0x0010118f LAB_0010116b: MOV EAX,dword ptr [RBP + -0x14] CDQ IDIV dword ptr [RBP + -0x4] MOV EAX,EDX TEST EAX,EAX JNZ 0x0010118b MOV EAX,dwor...
/* func0(int, int) */ int func0(int param_1,int param_2) { int *piVar1; int local_20; int local_1c [3]; int local_10; int local_c; local_10 = 0; local_c = 1; local_20 = param_2; local_1c[0] = param_1; while( true ) { piVar1 = std::min<int>(local_1c,&local_20); if (*piVar1 <= local_c) br...
501
func0
#include <iostream> #include <cassert>
int func0(int a, int b) { int sum = 0; for (int i = 1; i < std::min(a, b); i++) { if (a % i == 0 && b % i == 0) { sum += i; } } return sum; }
int main() { assert(func0(10, 15) == 6); assert(func0(100, 150) == 93); assert(func0(4, 6) == 3); return 0; }
O1
cpp
func0(int, int): endbr64 cmp %esi,%edi mov %esi,%r9d cmovle %edi,%r9d cmp $0x1,%r9d jle 11cb <_Z5func0ii+0x42> mov $0x1,%ecx mov $0x0,%r8d jmp 11b1 <_Z5func0ii+0x28> add $0x1,%ecx cmp %r9d,%ecx je 11d1 <_Z5func0ii+0x48> mov %edi,%eax cltd idiv %ecx test %edx,%edx jne 11a9 <_Z5fu...
_Z5func0ii: endbr64 cmp edi, esi mov r9d, esi cmovle r9d, edi cmp r9d, 1 jle short loc_118B mov ecx, 1 mov r8d, 0 jmp short loc_1171 loc_1169: add ecx, 1 cmp ecx, r9d jz short loc_1191 loc_1171: mov eax, edi cdq idiv ecx test edx, edx jnz short loc_1169 mov ea...
long long func0(int a1, int a2) { int v2; // r9d int v3; // ecx unsigned int v4; // r8d v2 = a2; if ( a1 <= a2 ) v2 = a1; if ( v2 <= 1 ) { return 0; } else { v3 = 1; v4 = 0; do { if ( !(a1 % v3) && !(a2 % v3) ) v4 += v3; ++v3; } while ( v3 != v2 ...
func0: ENDBR64 CMP EDI,ESI MOV R9D,ESI CMOVLE R9D,EDI CMP R9D,0x1 JLE 0x0010118b MOV ECX,0x1 MOV R8D,0x0 JMP 0x00101171 LAB_00101169: ADD ECX,0x1 CMP ECX,R9D JZ 0x00101191 LAB_00101171: MOV EAX,EDI CDQ IDIV ECX TEST EDX,EDX JNZ 0x00101169 MOV EAX,ESI CDQ IDIV ECX LEA EAX,[R8 + RCX*0x1] TEST EDX,EDX CMOVZ R8D,EAX JMP 0x...
/* func0(int, int) */ int func0(int param_1,int param_2) { int iVar1; int iVar2; int iVar3; iVar3 = param_2; if (param_1 <= param_2) { iVar3 = param_1; } if (iVar3 < 2) { iVar2 = 0; } else { iVar1 = 1; iVar2 = 0; do { if ((param_1 % iVar1 == 0) && (param_2 % iVar1 == 0))...
502
func0
#include <iostream> #include <cassert>
int func0(int a, int b) { int sum = 0; for (int i = 1; i < std::min(a, b); i++) { if (a % i == 0 && b % i == 0) { sum += i; } } return sum; }
int main() { assert(func0(10, 15) == 6); assert(func0(100, 150) == 93); assert(func0(4, 6) == 3); return 0; }
O2
cpp
func0(int, int): endbr64 cmp %esi,%edi mov %esi,%r9d cmovle %edi,%r9d cmp $0x1,%r9d jle 12e8 <_Z5func0ii+0x48> mov $0x1,%ecx xor %r8d,%r8d nopl 0x0(%rax,%rax,1) mov %edi,%eax cltd idiv %ecx test %edx,%edx jne 12d8 <_Z5func0ii+0x38> mov %esi,%eax cltd idiv %ecx lea (%r8,%rcx,1),%eax...
_Z5func0ii: endbr64 cmp edi, esi mov r9d, esi cmovle r9d, edi cmp r9d, 1 jle short loc_1248 mov ecx, 1 xor r8d, r8d nop dword ptr [rax+rax+00h] loc_1220: mov eax, edi cdq idiv ecx test edx, edx jnz short loc_1238 mov eax, esi cdq idiv ecx lea eax, [r8+rcx] test e...
long long func0(int a1, int a2) { int v2; // r9d int v3; // ecx unsigned int v4; // r8d v2 = a2; if ( a1 <= a2 ) v2 = a1; if ( v2 <= 1 ) return 0LL; v3 = 1; v4 = 0; do { if ( !(a1 % v3) && !(a2 % v3) ) v4 += v3; ++v3; } while ( v3 != v2 ); return v4; }
func0: ENDBR64 CMP EDI,ESI MOV R9D,ESI CMOVLE R9D,EDI CMP R9D,0x1 JLE 0x00101248 MOV ECX,0x1 XOR R8D,R8D NOP dword ptr [RAX + RAX*0x1] LAB_00101220: MOV EAX,EDI CDQ IDIV ECX TEST EDX,EDX JNZ 0x00101238 MOV EAX,ESI CDQ IDIV ECX LEA EAX,[R8 + RCX*0x1] TEST EDX,EDX CMOVZ R8D,EAX LAB_00101238: ADD ECX,0x1 CMP ECX,R9D JNZ 0...
/* func0(int, int) */ int func0(int param_1,int param_2) { int iVar1; int iVar2; int iVar3; iVar3 = param_2; if (param_1 <= param_2) { iVar3 = param_1; } if (1 < iVar3) { iVar1 = 1; iVar2 = 0; do { if (param_1 % iVar1 == 0) { if (param_2 % iVar1 == 0) { iVar2 =...
503
func0
#include <iostream> #include <cassert>
int func0(int a, int b) { int sum = 0; for (int i = 1; i < std::min(a, b); i++) { if (a % i == 0 && b % i == 0) { sum += i; } } return sum; }
int main() { assert(func0(10, 15) == 6); assert(func0(100, 150) == 93); assert(func0(4, 6) == 3); return 0; }
O3
cpp
func0(int, int): endbr64 cmp %esi,%edi mov %esi,%r9d cmovle %edi,%r9d cmp $0x1,%r9d jle 1288 <_Z5func0ii+0x48> mov $0x1,%ecx xor %r8d,%r8d nopl 0x0(%rax,%rax,1) mov %edi,%eax cltd idiv %ecx test %edx,%edx jne 1278 <_Z5func0ii+0x38> mov %esi,%eax cltd idiv %ecx lea (%r8,%rcx,1),%eax...
_Z5func0ii: endbr64 cmp edi, esi mov r9d, esi cmovle r9d, edi cmp r9d, 1 jle short loc_11F8 mov ecx, 1 xor r8d, r8d nop dword ptr [rax+rax+00h] loc_11D0: mov eax, edi cdq idiv ecx test edx, edx jnz short loc_11E8 mov eax, esi cdq idiv ecx lea eax, [r8+rcx] test e...
long long func0(int a1, int a2) { int v2; // r9d int v3; // ecx unsigned int v4; // r8d v2 = a2; if ( a1 <= a2 ) v2 = a1; if ( v2 <= 1 ) return 0LL; v3 = 1; v4 = 0; do { if ( !(a1 % v3) && !(a2 % v3) ) v4 += v3; ++v3; } while ( v3 != v2 ); return v4; }
func0: ENDBR64 CMP EDI,ESI MOV R9D,ESI CMOVLE R9D,EDI CMP R9D,0x1 JLE 0x001011f8 MOV ECX,0x1 XOR R8D,R8D NOP dword ptr [RAX + RAX*0x1] LAB_001011d0: MOV EAX,EDI CDQ IDIV ECX TEST EDX,EDX JNZ 0x001011e8 MOV EAX,ESI CDQ IDIV ECX LEA EAX,[R8 + RCX*0x1] TEST EDX,EDX CMOVZ R8D,EAX LAB_001011e8: ADD ECX,0x1 CMP ECX,R9D JNZ 0...
/* func0(int, int) */ int func0(int param_1,int param_2) { int iVar1; int iVar2; int iVar3; iVar3 = param_2; if (param_1 <= param_2) { iVar3 = param_1; } if (1 < iVar3) { iVar1 = 1; iVar2 = 0; do { if (param_1 % iVar1 == 0) { if (param_2 % iVar1 == 0) { iVar2 =...
504
func0
#include <cassert>
int func0(int x, int y) { if (y < 0) { return -func0(x, -y); } else if (y == 0) { return 0; } else if (y == 1) { return x; } else { return x + func0(x, y - 1); } }
int main() { assert(func0(10, 20) == 200); assert(func0(5, 10) == 50); assert(func0(4, 8) == 32); return 0; }
O0
cpp
func0(int, int): endbr64 push %rbp mov %rsp,%rbp sub $0x10,%rsp mov %edi,-0x4(%rbp) mov %esi,-0x8(%rbp) cmpl $0x0,-0x8(%rbp) jns 1178 <_Z5func0ii+0x2f> mov -0x8(%rbp),%eax neg %eax mov %eax,%edx mov -0x4(%rbp),%eax mov %edx,%esi mov %eax,%edi callq 1149 <_Z5func0ii> neg %eax jmp...
_Z5func0ii: endbr64 push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_4], edi mov [rbp+var_8], esi cmp [rbp+var_8], 0 jns short loc_1178 mov eax, [rbp+var_8] neg eax mov edx, eax mov eax, [rbp+var_4] mov esi, edx; int mov edi, eax; int call _Z5func0ii; func0(int,int) ...
long long func0(unsigned int a1, int a2) { if ( a2 < 0 ) return (unsigned int)-func0(a1, -a2); if ( !a2 ) return 0LL; if ( a2 == 1 ) return a1; return a1 + (unsigned int)func0(a1, a2 - 1); }
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV dword ptr [RBP + -0x4],EDI MOV dword ptr [RBP + -0x8],ESI CMP dword ptr [RBP + -0x8],0x0 JNS 0x00101178 MOV EAX,dword ptr [RBP + -0x8] NEG EAX MOV EDX,EAX MOV EAX,dword ptr [RBP + -0x4] MOV ESI,EDX MOV EDI,EAX CALL 0x00101149 NEG EAX JMP 0x001011a7 LAB_00101178: CMP ...
/* func0(int, int) */ int func0(int param_1,int param_2) { int iVar1; if (param_2 < 0) { iVar1 = func0(param_1,-param_2); param_1 = -iVar1; } else if (param_2 == 0) { param_1 = 0; } else if (param_2 != 1) { iVar1 = func0(param_1,param_2 + -1); param_1 = iVar1 + param_1; } return...
505
func0
#include <cassert>
int func0(int x, int y) { if (y < 0) { return -func0(x, -y); } else if (y == 0) { return 0; } else if (y == 1) { return x; } else { return x + func0(x, y - 1); } }
int main() { assert(func0(10, 20) == 200); assert(func0(5, 10) == 50); assert(func0(4, 8) == 32); return 0; }
O1
cpp
func0(int, int): endbr64 push %rbx mov %edi,%ebx test %esi,%esi js 116b <_Z5func0ii+0x22> mov %esi,%eax je 1169 <_Z5func0ii+0x20> mov %edi,%eax cmp $0x1,%esi je 1169 <_Z5func0ii+0x20> sub $0x1,%esi callq 1149 <_Z5func0ii> add %ebx,%eax pop %rbx retq neg %esi callq 1149 <_Z5func...
_Z5func0ii: endbr64 push rbx mov ebx, edi test esi, esi js short loc_116B mov eax, esi jz short loc_1169 mov eax, edi cmp esi, 1 jz short loc_1169 sub esi, 1; int call _Z5func0ii; func0(int,int) add eax, ebx loc_1169: pop rbx retn loc_116B: neg esi; int call _Z...
long long func0(unsigned int a1, int a2) { long long result; // rax if ( a2 < 0 ) return (unsigned int)-func0(a1, -a2); result = (unsigned int)a2; if ( a2 ) { result = a1; if ( a2 != 1 ) return a1 + (unsigned int)func0(a1, a2 - 1); } return result; }
func0: ENDBR64 PUSH RBX MOV EBX,EDI TEST ESI,ESI JS 0x0010116b MOV EAX,ESI JZ 0x00101169 MOV EAX,EDI CMP ESI,0x1 JZ 0x00101169 SUB ESI,0x1 CALL 0x00101149 ADD EAX,EBX LAB_00101169: POP RBX RET LAB_0010116b: NEG ESI CALL 0x00101149 NEG EAX JMP 0x00101169
/* func0(int, int) */ int func0(int param_1,int param_2) { int iVar1; if (param_2 < 0) { iVar1 = func0(param_1,-param_2); iVar1 = -iVar1; } else { iVar1 = param_2; if ((param_2 != 0) && (iVar1 = param_1, param_2 != 1)) { iVar1 = func0(param_1,param_2 + -1); iVar1 = iVar1 + param...
506
func0
#include <cassert>
int func0(int x, int y) { if (y < 0) { return -func0(x, -y); } else if (y == 0) { return 0; } else if (y == 1) { return x; } else { return x + func0(x, y - 1); } }
int main() { assert(func0(10, 20) == 200); assert(func0(5, 10) == 50); assert(func0(4, 8) == 32); return 0; }
O2
cpp
func0(int, int): endbr64 mov $0x1,%eax xor %r8d,%r8d nopl 0x0(%rax) test %esi,%esi js 12ba <_Z5func0ii+0x2a> je 12c0 <_Z5func0ii+0x30> mov %eax,%edx imul %edi,%edx add %edx,%r8d cmp $0x1,%esi je 12c0 <_Z5func0ii+0x30> sub $0x1,%esi test %esi,%esi jns 12a4 <_Z5func0ii+0x14> neg ...
_Z5func0ii: endbr64 mov ecx, edi mov eax, esi test esi, esi jns short loc_1240 neg eax mov edi, 0FFFFFFFFh mov edx, eax xor eax, eax loc_1217: imul edi, ecx lea ecx, [rdx-1] test dl, 1 jnz short loc_1235 mov eax, edi mov edx, ecx jmp short loc_1235 loc_1230: add ...
long long func0(int a1, int a2) { long long result; // rax int v4; // edi int v5; // edx int v6; // eax int v7; // edi result = (unsigned int)a2; if ( a2 >= 0 ) { if ( !a2 ) return result; v5 = a2; v4 = 1; v6 = 0; } else { v4 = -1; v5 = -a2; v6 = 0; } v7 = a...
func0: ENDBR64 MOV ECX,EDI MOV EAX,ESI TEST ESI,ESI JNS 0x00101240 NEG EAX MOV EDI,0xffffffff MOV EDX,EAX XOR EAX,EAX LAB_00101217: IMUL EDI,ECX LEA ECX,[RDX + -0x1] TEST DL,0x1 JNZ 0x00101235 MOV EAX,EDI MOV EDX,ECX JMP 0x00101235 LAB_00101230: ADD EAX,EDI SUB EDX,0x2 LAB_00101235: ADD EAX,EDI CMP EDX,0x1 JNZ 0x001012...
/* func0(int, int) */ int func0(int param_1,int param_2) { int iVar1; int iVar2; if (param_2 < 0) { param_2 = -param_2; iVar2 = -1; } else { if (param_2 == 0) { return 0; } iVar2 = 1; } iVar2 = iVar2 * param_1; iVar1 = 0; if ((param_2 & 1U) == 0) { param_2 = param_2 ...
507
func0
#include <cassert>
int func0(int x, int y) { if (y < 0) { return -func0(x, -y); } else if (y == 0) { return 0; } else if (y == 1) { return x; } else { return x + func0(x, y - 1); } }
int main() { assert(func0(10, 20) == 200); assert(func0(5, 10) == 50); assert(func0(4, 8) == 32); return 0; }
O3
cpp
func0(int, int): endbr64 mov $0x1,%eax xor %r8d,%r8d nopl 0x0(%rax) test %esi,%esi js 12ba <_Z5func0ii+0x2a> je 12c0 <_Z5func0ii+0x30> mov %eax,%edx imul %edi,%edx add %edx,%r8d cmp $0x1,%esi je 12c0 <_Z5func0ii+0x30> sub $0x1,%esi test %esi,%esi jns 12a4 <_Z5func0ii+0x14> neg ...
_Z5func0ii: endbr64 mov eax, esi test esi, esi jns short loc_1180 neg eax mov ecx, 0FFFFFFFFh mov edx, eax xor eax, eax loc_1155: imul edi, ecx lea ecx, [rdx-1] test dl, 1 jnz short loc_1175 mov eax, edi mov edx, ecx jmp short loc_1175 loc_1170: add eax, edi sub ...
long long func0(int a1, int a2) { long long result; // rax int v3; // ecx int v4; // edx int v5; // eax int v6; // edi result = (unsigned int)a2; if ( a2 >= 0 ) { if ( !a2 ) return result; v4 = a2; v3 = 1; v5 = 0; } else { v3 = -1; v4 = -a2; v5 = 0; } v6 = v...
func0: ENDBR64 MOV EAX,ESI TEST ESI,ESI JNS 0x00101180 NEG EAX MOV ECX,0xffffffff MOV EDX,EAX XOR EAX,EAX LAB_00101155: IMUL EDI,ECX LEA ECX,[RDX + -0x1] TEST DL,0x1 JNZ 0x00101175 MOV EAX,EDI MOV EDX,ECX JMP 0x00101175 LAB_00101170: ADD EAX,EDI SUB EDX,0x2 LAB_00101175: ADD EAX,EDI CMP EDX,0x1 JNZ 0x00101170 LAB_00101...
/* func0(int, int) */ int func0(int param_1,int param_2) { int iVar1; int iVar2; if (param_2 < 0) { param_2 = -param_2; iVar2 = -1; } else { if (param_2 == 0) { return 0; } iVar2 = 1; } iVar2 = param_1 * iVar2; iVar1 = 0; if ((param_2 & 1U) == 0) { param_2 = param_2 ...
508
func0
#include <iostream> #include <vector> #include <string> #include <assert.h> #include <sstream>
std::vector<std::string> func0(int n, std::string str) { std::vector<std::string> word_len; std::string temp; std::istringstream iss(str); while (iss >> temp) { if (temp.size() > n) { word_len.push_back(temp); } } return word_len; }
int main() { std::vector<std::string> result; result = func0(3, "python is a programming language"); assert((result == std::vector<std::string>{"python", "programming", "language"})); result = func0(2, "writing a program"); assert((result == std::vector<std::string>{"writing", "program"}));...
O0
cpp
func0(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x1d8,%rsp mov %rdi,-0x1c8(%rbp) mov %esi,-0x1cc(%rbp) mov %rdx,-0x1d8(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax mov -0x1c8(%rbp),%r...
_Z5func0iNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 1D8h mov [rbp+var_1C8], rdi mov [rbp+var_1CC], esi mov [rbp+var_1D8], rdx mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax mov rax, [rbp+var_1C8] mov rdi, rax ca...
long long func0(long long a1, int a2, long long a3) { _QWORD *v3; // rax _BYTE v6[32]; // [rsp+20h] [rbp-1C0h] BYREF _BYTE v7[392]; // [rsp+40h] [rbp-1A0h] BYREF unsigned long long v8; // [rsp+1C8h] [rbp-18h] v8 = __readfsqword(0x28u); std::vector<std::string>::vector(a1); std::string::basic_string(v6);...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x1d8 MOV qword ptr [RBP + -0x1c8],RDI MOV dword ptr [RBP + -0x1cc],ESI MOV qword ptr [RBP + -0x1d8],RDX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX MOV RAX,qword ptr [RBP + -0x1c8] MOV RDI,RAX CALL 0x00103152 LEA RAX,[RBP + -0x1c0] MOV RD...
/* func0(int, std::string) */ vector<std::string,std::allocator<std::string>> * func0(vector<std::string,std::allocator<std::string>> *param_1,int param_2,string *param_3) { bool bVar1; ulong uVar2; istream *piVar3; long in_FS_OFFSET; string local_1c8 [32]; istringstream local_1a8 [392]; long local_20; ...
509
func0
#include <iostream> #include <vector> #include <string> #include <assert.h> #include <sstream>
std::vector<std::string> func0(int n, std::string str) { std::vector<std::string> word_len; std::string temp; std::istringstream iss(str); while (iss >> temp) { if (temp.size() > n) { word_len.push_back(temp); } } return word_len; }
int main() { std::vector<std::string> result; result = func0(3, "python is a programming language"); assert((result == std::vector<std::string>{"python", "programming", "language"})); result = func0(2, "writing a program"); assert((result == std::vector<std::string>{"writing", "program"}));...
O1
cpp
func0(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >): endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x1b8,%rsp mov %rdi,%r12 mov %esi,%ebx mov %rdx,%rbp mov %fs:0x28,%rax mov %rax,0x1a8(%rsp) xor %eax,%eax movq $0x0,(%r...
_Z5func0iNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 1B8h mov r12, rdi mov ebx, esi mov rbp, rdx mov rax, fs:28h mov [rsp+1E8h+var_40], rax xor eax, eax mov qword ptr [rdi], 0 mov qword...
_QWORD * func0(_QWORD *a1, int a2, long long *a3) { long long v6; // rdx long long v7; // rsi _QWORD *v8; // rdi _QWORD *v9; // rax void *v11; // [rsp+0h] [rbp-1E8h] BYREF unsigned long long v12; // [rsp+8h] [rbp-1E0h] _QWORD v13[2]; // [rsp+10h] [rbp-1D8h] BYREF int *v14; // [rsp+20h] [rbp-1C8h] BYREF ...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x1b8 MOV R12,RDI MOV EBX,ESI MOV RBP,RDX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x1a8],RAX XOR EAX,EAX MOV qword ptr [RDI],0x0 MOV qword ptr [RDI + 0x8],0x0 MOV qword ptr [RDI + 0x10],0x0 LEA RAX,[RSP + 0x10] MOV qword ptr [RSP],RAX...
/* func0(int, std::string) */ vector<std::string,std::allocator<std::string>> * func0(vector<std::string,std::allocator<std::string>> *param_1,int param_2,int8 *param_3) { char *pcVar1; long *plVar2; int8 uVar3; int8 uVar4; int8 uVar5; istream *piVar6; long in_FS_OFFSET; char *local_1e8; ulong local...
510
func0
#include <iostream> #include <vector> #include <string> #include <assert.h> #include <sstream>
std::vector<std::string> func0(int n, std::string str) { std::vector<std::string> word_len; std::string temp; std::istringstream iss(str); while (iss >> temp) { if (temp.size() > n) { word_len.push_back(temp); } } return word_len; }
int main() { std::vector<std::string> result; result = func0(3, "python is a programming language"); assert((result == std::vector<std::string>{"python", "programming", "language"})); result = func0(2, "writing a program"); assert((result == std::vector<std::string>{"writing", "program"}));...
O2
cpp
func0(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >): endbr64 push %r15 push %r14 push %r13 mov %rdi,%r13 push %r12 mov %rdx,%r12 push %rbp push %rbx movslq %esi,%rbx sub $0x1d8,%rsp mov %fs:0x28,%rax mov %rax,0x1c8(%rsp) xor %eax,%eax movq $0x0,(%r...
_Z5func0iNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push r15 pxor xmm0, xmm0 push r14 push r13 mov r13, rdi push r12 mov r12, rdx push rbp push rbx sub rsp, 1E8h mov [rsp+218h+var_204], esi lea rbx, [rsp+218h+var_1C8] mov rax, fs:28h mov [rsp+218h+var_...
long long func0(long long a1, int a2, long long a3) { char *v5; // rbp _BYTE *v6; // r12 _QWORD *v7; // rax unsigned long long v8; // rdx _QWORD *v9; // rax _QWORD *v11; // rdi _QWORD *v12; // rdi char *v13; // [rsp+28h] [rbp-1F0h] BYREF void *v14; // [rsp+30h] [rbp-1E8h] BYREF unsigned long long v...
func0: ENDBR64 PUSH R15 PXOR XMM0,XMM0 PUSH R14 PUSH R13 MOV R13,RDI PUSH R12 MOV R12,RDX PUSH RBP PUSH RBX SUB RSP,0x1e8 MOV dword ptr [RSP + 0x14],ESI LEA RBX,[RSP + 0x50] MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x1d8],RAX XOR EAX,EAX LEA RAX,[RSP + 0x40] MOV qword ptr [RDI + 0x10],0x0 MOV qword ptr [RSP + 0...
/* func0(int, std::string) */ vector<std::string,std::allocator<std::string>> * func0(vector<std::string,std::allocator<std::string>> *param_1,int param_2,int8 *param_3) { ulong __n; int *__src; long *plVar1; istream *piVar2; int8 uVar3; long in_FS_OFFSET; ulong local_1f0; char *local_1e8; ulong loc...
511
func0
#include <iostream> #include <vector> #include <string> #include <assert.h> #include <sstream>
std::vector<std::string> func0(int n, std::string str) { std::vector<std::string> word_len; std::string temp; std::istringstream iss(str); while (iss >> temp) { if (temp.size() > n) { word_len.push_back(temp); } } return word_len; }
int main() { std::vector<std::string> result; result = func0(3, "python is a programming language"); assert((result == std::vector<std::string>{"python", "programming", "language"})); result = func0(2, "writing a program"); assert((result == std::vector<std::string>{"writing", "program"}));...
O3
cpp
func0(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >): endbr64 push %r15 pxor %xmm0,%xmm0 mov %esi,%r15d push %r14 push %r13 mov %rdi,%r13 push %r12 push %rbp push %rbx mov %rdx,%rbx sub $0x1f8,%rsp mov %fs:0x28,%rax mov %rax,0x1e8(%rsp) xor %eax,...
_Z5func0iNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push r15 pxor xmm0, xmm0 push r14 mov r14, rdi push r13 mov r13, rdx push r12 push rbp movsxd rbp, esi push rbx sub rsp, 1F8h mov rax, fs:28h mov [rsp+228h+var_40], rax xor eax, eax lea rax, [rsp+228...
long long func0(long long a1, int a2, long long a3) { char *v5; // rbx _BYTE *v6; // r13 _QWORD *v7; // rax size_t v8; // rbx _QWORD *v9; // rax _QWORD *v11; // rdi long long *v12; // r15 void *v13; // rdi long long v14; // rax const void *src; // [rsp+20h] [rbp-200h] char *v16; // [rsp+30h] [rbp...
func0: ENDBR64 PUSH R15 PXOR XMM0,XMM0 PUSH R14 MOV R14,RDI PUSH R13 MOV R13,RDX PUSH R12 PUSH RBP MOVSXD RBP,ESI PUSH RBX SUB RSP,0x1f8 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x1e8],RAX XOR EAX,EAX LEA RAX,[RSP + 0x50] MOVUPS xmmword ptr [RDI],XMM0 LEA R12,[RSP + 0x60] MOV qword ptr [RDI + 0x10],0x0 MOV qwor...
/* func0(int, std::string) */ vector<std::string,std::allocator<std::string>> * func0(vector<std::string,std::allocator<std::string>> *param_1,int param_2,int8 *param_3) { ulong uVar1; int *puVar2; ulong *puVar3; istream *piVar4; ulong *__dest; int8 uVar5; long in_FS_OFFSET; ulong local_1f0; int *lo...
512
func0
#include <vector> #include <set> #include <cassert>
bool func0(const std::vector<std::vector<int>>& my_matrix) { int iSize = my_matrix[0].size(); std::vector<int> sum_list; for (const auto& lines : my_matrix) { int line_sum = 0; for (int num : lines) { line_sum += num; } sum_list.push_back(line_sum); }...
int main() { assert(func0({{7, 12, 1, 14}, {2, 13, 8, 11}, {16, 3, 10, 5}, {9, 6, 15, 4}}) == true); assert(func0({{2, 7, 6}, {9, 5, 1}, {4, 3, 8}}) == true); assert(func0({{2, 7, 6}, {9, 5, 1}, {4, 3, 7}}) == false); return 0; }
O0
cpp
func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0xc8,%rsp mov %rdi,-0xc8(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax mov -0xc8(%rbp),%rax mov $0x0,%esi m...
_Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EE: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 0C8h mov [rbp+var_C8], rdi mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax mov rax, [rbp+var_C8] mov esi, 0 mov rdi, rax call _ZNKSt6vectorIS_IiSaIiEESaIS1_EEixEm; std::vector<std::vec...
long long func0(long long a1) { long long v1; // rax long long v2; // rax _DWORD *v3; // rax long long v4; // rax _DWORD *v5; // rax long long v6; // rax _DWORD *v7; // rax long long v8; // rbx long long v9; // rax int v11; // [rsp+14h] [rbp-BCh] BYREF int i; // [rsp+18h] [rbp-B8h] int j; // [r...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0xc8 MOV qword ptr [RBP + -0xc8],RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX MOV RAX,qword ptr [RBP + -0xc8] MOV ESI,0x0 MOV RDI,RAX CALL 0x0010221a MOV RDI,RAX CALL 0x00102248 MOV dword ptr [RBP + -0xa8],EAX LEA RAX,[RBP + -0x70] MOV ...
/* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&) */ ulong func0(vector *param_1) { bool bVar1; int extraout_EAX; vector<int,std::allocator<int>> *pvVar2; int4 extraout_var; int *piVar3; int8 uVar4; int8 uVar5; long lVar6;...
513
func0
#include <vector> #include <set> #include <cassert>
bool func0(const std::vector<std::vector<int>>& my_matrix) { int iSize = my_matrix[0].size(); std::vector<int> sum_list; for (const auto& lines : my_matrix) { int line_sum = 0; for (int num : lines) { line_sum += num; } sum_list.push_back(line_sum); }...
int main() { assert(func0({{7, 12, 1, 14}, {2, 13, 8, 11}, {16, 3, 10, 5}, {9, 6, 15, 4}}) == true); assert(func0({{2, 7, 6}, {9, 5, 1}, {4, 3, 8}}) == true); assert(func0({{2, 7, 6}, {9, 5, 1}, {4, 3, 7}}) == false); return 0; }
O1
cpp
func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&): endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x78,%rsp mov %rdi,%rbp mov %fs:0x28,%rax mov %rax,0x68(%rsp) xor %eax,%eax mov (%rdi),%rax ...
_Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EE: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 88h mov rbp, rdi mov rax, fs:28h mov [rsp+0B8h+var_40], rax xor eax, eax mov rbx, [rdi] mov r12, [rbx+8] sub r12, [rbx] sar r12, 2 mov [rsp+0B8h+var_98...
long long func0(int **a1, long long a2, int *a3) { int *v3; // rbx long long v4; // r12 int *i; // r13 _DWORD *v6; // rax _DWORD *v7; // rsi int v8; // ecx char *v9; // rsi long long v10; // rax long long v11; // r13 long long v12; // r14 int *v13; // rax int v14; // ecx char *v15; // rsi l...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x88 MOV RBP,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x78],RAX XOR EAX,EAX MOV RBX,qword ptr [RDI] MOV R12,qword ptr [RBX + 0x8] SUB R12,qword ptr [RBX] SAR R12,0x2 MOV qword ptr [RSP + 0x20],0x0 MOV qword ptr [RSP + 0x28],0x0 MOV...
/* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&) */ ulong func0(vector *param_1) { long lVar1; int *piVar2; int *piVar3; long *plVar4; _Rb_tree_node_base *p_Var5; long lVar6; _Rb_tree_node_base *p_Var7; long *plVar8; _R...
514
func0
#include <vector> #include <set> #include <cassert>
bool func0(const std::vector<std::vector<int>>& my_matrix) { int iSize = my_matrix[0].size(); std::vector<int> sum_list; for (const auto& lines : my_matrix) { int line_sum = 0; for (int num : lines) { line_sum += num; } sum_list.push_back(line_sum); }...
int main() { assert(func0({{7, 12, 1, 14}, {2, 13, 8, 11}, {16, 3, 10, 5}, {9, 6, 15, 4}}) == true); assert(func0({{2, 7, 6}, {9, 5, 1}, {4, 3, 8}}) == true); assert(func0({{2, 7, 6}, {9, 5, 1}, {4, 3, 7}}) == false); return 0; }
O2
cpp
func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&): endbr64 push %r15 xor %r8d,%r8d mov %rdi,%r15 xor %esi,%esi push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x88,%rsp mov (%rdi),%rbx mov 0x8(%rdi),%r12 mov ...
_Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EE: endbr64 push r15 pxor xmm0, xmm0 push r14 push r13 mov r13, rdi push r12 push rbp push rbx sub rsp, 88h mov rbx, [rdi] mov r12, [rdi+8] mov rax, fs:28h mov [rsp+0B8h+var_40], rax xor eax, eax movaps [rsp+0B8h+var_98], xmm0 mov ...
long long func0(long long **a1, long long a2, long long a3) { long long *v4; // rbx long long *v5; // r12 long long v6; // rbp _DWORD *v7; // rdi _DWORD *v8; // rsi _DWORD *v9; // rax _DWORD *v10; // rcx _DWORD *v11; // rsi long long *v12; // r8 _DWORD *v13; // rdi long long v14; // rbx long lo...
func0: ENDBR64 PUSH R15 PXOR XMM0,XMM0 PUSH R14 PUSH R13 MOV R13,RDI PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x88 MOV RBX,qword ptr [RDI] MOV R12,qword ptr [RDI + 0x8] MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x78],RAX XOR EAX,EAX MOVAPS xmmword ptr [RSP + 0x20],XMM0 MOV qword ptr [RSP + 0x30],0x0 MOV RBP,qword ptr ...
/* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&) */ ulong func0(vector *param_1) { long lVar1; void *pvVar2; void *pvVar3; int *piVar4; long lVar5; long *plVar6; long *plVar7; long lVar8; _Rb_tree_node_base *p_Var9; u...
515
func0
#include <vector> #include <set> #include <cassert>
bool func0(const std::vector<std::vector<int>>& my_matrix) { int iSize = my_matrix[0].size(); std::vector<int> sum_list; for (const auto& lines : my_matrix) { int line_sum = 0; for (int num : lines) { line_sum += num; } sum_list.push_back(line_sum); }...
int main() { assert(func0({{7, 12, 1, 14}, {2, 13, 8, 11}, {16, 3, 10, 5}, {9, 6, 15, 4}}) == true); assert(func0({{2, 7, 6}, {9, 5, 1}, {4, 3, 8}}) == true); assert(func0({{2, 7, 6}, {9, 5, 1}, {4, 3, 7}}) == false); return 0; }
O3
cpp
func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&): endbr64 push %r15 pxor %xmm0,%xmm0 mov %rdi,%r15 xor %esi,%esi push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x88,%rsp mov (%rdi),%rbx mov 0x8(%rdi),%r12 xor...
_Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EE: endbr64 push r15 pxor xmm0, xmm0 push r14 mov r14, rdi push r13 push r12 push rbp push rbx sub rsp, 88h mov rbx, [rdi] mov rbp, [rdi+8] mov rax, fs:28h mov [rsp+0B8h+var_40], rax xor eax, eax movaps xmmword ptr [rsp+0B8h+var_98], ...
long long func0(unsigned int ***a1) { unsigned int **v2; // rbx unsigned int **v3; // rbp long long v4; // r12 _DWORD *v5; // rdi _DWORD *v6; // r8 unsigned int *v7; // rdx unsigned int *v8; // r9 const __m128i *v9; // rax unsigned long long v10; // rsi __m128i v11; // xmm0 __m128i v12; // xmm2 ...
func0: ENDBR64 PUSH R15 PXOR XMM0,XMM0 PUSH R14 MOV R14,RDI PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x88 MOV RBX,qword ptr [RDI] MOV RBP,qword ptr [RDI + 0x8] MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x78],RAX XOR EAX,EAX MOVAPS xmmword ptr [RSP + 0x20],XMM0 MOV qword ptr [RSP + 0x30],0x0 MOV R12,qword ptr ...
/* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&) */ ulong func0(vector *param_1) { int *piVar1; long lVar2; int iVar3; int *piVar4; int *piVar5; int *piVar6; int *piVar7; long lVar8; long *plVar9; long *plVar10; lon...
516
func0
#include <iostream> #include <vector> #include <unordered_map> #include <cassert>
std::pair<int, int> func0(const std::vector<int>& nums) { std::unordered_map<int, int> dict; for (int num : nums) { ++dict[num]; } std::pair<int, int> result; int max_count = 0; for (int num : nums) { if (dict[num] > max_count) { max_count = dict[num]; ...
int main() { // Using assertions with conditionals std::pair<int, int> result1 = func0({2,3,8,4,7,9,8,2,6,5,1,6,1,2,3,2,4,6,9,1,2}); assert(result1.first == 2 && result1.second == 5); std::pair<int, int> result2 = func0({2,3,8,4,7,9,8,7,9,15,14,10,12,13,16,16,18}); assert(result2.first == 8 &...
O0
cpp
func0(std::vector<int, std::allocator<int> > const&): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x98,%rsp mov %rdi,-0x98(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax lea -0x50(%rbp),%rax mov %rax,%rdi callq 1c1c <_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIK...
_Z5func0RKSt6vectorIiSaIiEE: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 98h mov [rbp+var_98], rdi mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax lea rax, [rbp+var_50] mov rdi, rax call _ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEC2Ev; std::unordered_...
long long func0(long long a1) { _DWORD *v1; // rax _DWORD *v2; // rax long long v3; // rbx int v5; // [rsp+18h] [rbp-88h] BYREF int v6; // [rsp+1Ch] [rbp-84h] BYREF long long v7; // [rsp+20h] [rbp-80h] BYREF _QWORD v8[2]; // [rsp+28h] [rbp-78h] BYREF long long v9; // [rsp+38h] [rbp-68h] long long v10...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x98 MOV qword ptr [RBP + -0x98],RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX LEA RAX,[RBP + -0x50] MOV RDI,RAX CALL 0x00101c28 MOV RAX,qword ptr [RBP + -0x98] MOV qword ptr [RBP + -0x70],RAX MOV RAX,qword ptr [RBP + -0x70] MOV RDI,RAX ...
/* func0(std::vector<int, std::allocator<int> > const&) */ int8 func0(vector *param_1) { int8 uVar1; bool bVar2; int4 *puVar3; int *piVar4; long in_FS_OFFSET; int local_90; int local_8c; int8 local_88; int8 local_80; vector<int,std::allocator<int>> *local_78; vector<int,std::allocator<int>> *loc...
517
func0
#include <iostream> #include <vector> #include <unordered_map> #include <cassert>
std::pair<int, int> func0(const std::vector<int>& nums) { std::unordered_map<int, int> dict; for (int num : nums) { ++dict[num]; } std::pair<int, int> result; int max_count = 0; for (int num : nums) { if (dict[num] > max_count) { max_count = dict[num]; ...
int main() { // Using assertions with conditionals std::pair<int, int> result1 = func0({2,3,8,4,7,9,8,2,6,5,1,6,1,2,3,2,4,6,9,1,2}); assert(result1.first == 2 && result1.second == 5); std::pair<int, int> result2 = func0({2,3,8,4,7,9,8,7,9,15,14,10,12,13,16,16,18}); assert(result2.first == 8 &...
O1
cpp
func0(std::vector<int, std::allocator<int> > const&): endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x58,%rsp mov %rdi,%r13 mov %fs:0x28,%rax mov %rax,0x48(%rsp) xor %eax,%eax lea 0x40(%rsp),%rax mov %rax,0x10(%rsp) movq $0x1,0x18(%rsp) movq $0x0,0x20(%rsp...
_Z5func0RKSt6vectorIiSaIiEE: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 68h mov r13, rdi mov rax, fs:28h mov [rsp+98h+var_40], rax xor eax, eax lea rax, [rsp+98h+var_48] mov [rsp+98h+var_78], rax mov [rsp+98h+var_70], 1 mov [rsp+98h+var_6...
unsigned long long func0(int **a1) { int *v1; // rbx int *v2; // rbp _DWORD *v3; // rax int *v4; // rbx int *v5; // r14 long long v6; // r15 long long v7; // r12 unsigned int v8; // ebp unsigned int v10; // [rsp+Ch] [rbp-8Ch] unsigned int v11; // [rsp+1Ch] [rbp-7Ch] BYREF _QWORD v12[4]; // [rsp+2...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x68 MOV R13,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x58],RAX XOR EAX,EAX LEA RAX,[RSP + 0x50] MOV qword ptr [RSP + 0x20],RAX MOV qword ptr [RSP + 0x28],0x1 MOV qword ptr [RSP + 0x30],0x0 MOV qword ptr [RSP + 0x38],0x0 MOV dword ...
/* func0(std::vector<int, std::allocator<int> > const&) */ ulong func0(vector *param_1) { uint uVar1; uint *puVar2; int *piVar3; uint *puVar4; uint *puVar5; uint uVar6; ulong uVar7; long in_FS_OFFSET; uint local_8c; uint local_7c; int8 *local_78; int8 local_70; int8 local_68; int8 local_60...
518
func0
#include <iostream> #include <vector> #include <unordered_map> #include <cassert>
std::pair<int, int> func0(const std::vector<int>& nums) { std::unordered_map<int, int> dict; for (int num : nums) { ++dict[num]; } std::pair<int, int> result; int max_count = 0; for (int num : nums) { if (dict[num] > max_count) { max_count = dict[num]; ...
int main() { // Using assertions with conditionals std::pair<int, int> result1 = func0({2,3,8,4,7,9,8,2,6,5,1,6,1,2,3,2,4,6,9,1,2}); assert(result1.first == 2 && result1.second == 5); std::pair<int, int> result2 = func0({2,3,8,4,7,9,8,7,9,15,14,10,12,13,16,16,18}); assert(result2.first == 8 &...
O2
cpp
func0(std::vector<int, std::allocator<int> > const&): endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x58,%rsp mov (%rdi),%rbx mov 0x8(%rdi),%r13 mov %fs:0x28,%rax mov %rax,0x48(%rsp) xor %eax,%eax lea 0x40(%rsp),%rax movl $0x3f800000,0x30(%rsp) mov %rax,0...
_Z5func0RKSt6vectorIiSaIiEE: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 68h mov rbx, [rdi] mov r14, [rdi+8] mov rax, fs:28h mov [rsp+98h+var_40], rax xor eax, eax lea rax, [rsp+98h+var_48] lea rbp, [rsp+98h+var_78] mov [rsp+98h+var_70], 1...
long long func0(int **a1) { int *v1; // rbx int *v2; // r14 _DWORD *v3; // rax int *v4; // r15 int *v5; // rbx long long v6; // r14 unsigned int v7; // r13d unsigned int v9; // [rsp+Ch] [rbp-8Ch] unsigned int v10; // [rsp+1Ch] [rbp-7Ch] BYREF _QWORD v11[4]; // [rsp+20h] [rbp-78h] BYREF int v12; /...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x68 MOV RBX,qword ptr [RDI] MOV R14,qword ptr [RDI + 0x8] MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x58],RAX XOR EAX,EAX LEA RAX,[RSP + 0x50] LEA RBP,[RSP + 0x20] MOV qword ptr [RSP + 0x28],0x1 MOV qword ptr [RSP + 0x20],RAX MOV qword...
/* func0(std::vector<int, std::allocator<int> > const&) */ int8 func0(vector *param_1) { int iVar1; int *piVar2; int *piVar3; int *piVar4; int iVar5; long in_FS_OFFSET; int local_8c; int local_7c; int8 *local_78; int8 local_70; int8 local_68; int8 local_60; int4 local_58; int8 local_50; ...
519
func0
#include <iostream> #include <vector> #include <unordered_map> #include <cassert>
std::pair<int, int> func0(const std::vector<int>& nums) { std::unordered_map<int, int> dict; for (int num : nums) { ++dict[num]; } std::pair<int, int> result; int max_count = 0; for (int num : nums) { if (dict[num] > max_count) { max_count = dict[num]; ...
int main() { // Using assertions with conditionals std::pair<int, int> result1 = func0({2,3,8,4,7,9,8,2,6,5,1,6,1,2,3,2,4,6,9,1,2}); assert(result1.first == 2 && result1.second == 5); std::pair<int, int> result2 = func0({2,3,8,4,7,9,8,7,9,15,14,10,12,13,16,16,18}); assert(result2.first == 8 &...
O3
cpp
func0(std::vector<int, std::allocator<int> > const&): endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x68,%rsp mov (%rdi),%rbx mov 0x8(%rdi),%r13 mov %fs:0x28,%rax mov %rax,0x58(%rsp) xor %eax,%eax lea 0x50(%rsp),%rax movl $0x3f800000,0x40(%rsp) mov %rax,0...
_Z5func0RKSt6vectorIiSaIiEE: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 78h mov rbp, [rdi] mov r15, [rdi+8] mov [rsp+0A8h+var_90], rdi mov rax, fs:28h mov [rsp+0A8h+var_40], rax xor eax, eax lea rax, [rsp+0A8h+var_48] mov [rsp+0A8h+var_58...
long long func0(int **a1) { int *v1; // rbp int *v2; // r15 _QWORD *v3; // rdi unsigned long long i; // r8 unsigned long long v5; // r12 int v6; // r13d unsigned long long v7; // rdx long long **v8; // r10 unsigned long long v9; // r9 long long v10; // r14 long long *v11; // rax long long v12; ...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x78 MOV RBP,qword ptr [RDI] MOV R15,qword ptr [RDI + 0x8] MOV qword ptr [RSP + 0x18],RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x68],RAX XOR EAX,EAX LEA RAX,[RSP + 0x60] MOV dword ptr [RSP + 0x50],0x3f800000 MOV qword ptr [RSP + 0x...
/* func0(std::vector<int, std::allocator<int> > const&) */ ulong func0(vector *param_1) { int *piVar1; int iVar2; int iVar3; uint uVar4; int *piVar5; long *plVar6; uint *puVar7; long *plVar8; char cVar9; int8 *puVar10; int8 *puVar11; int *piVar12; uint *puVar13; ulong uVar14; ulong extra...
520
func0
#include <iostream> #include <string> #include <assert.h>
std::string func0(std::string str1) { std::string vowels = ""; for (char ch : str1) { if (std::string("aeiouAEIOU").find(ch) != std::string::npos) { vowels += ch; } } std::string result_string = ""; for (char ch : str1) { if (std::string("aeiouAEIOU").fin...
int main() { assert(func0("Python") == "Python"); assert(func0("USA") == "ASU"); assert(func0("ab") == "ab"); return 0; }
O0
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0xb8,%rsp mov %rdi,-0xb8(%rbp) mov %rsi,-0xc0(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax lea -0x98(%rbp),%rax mov %rax,%rdi callq 23b0 <_...
_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 0B8h mov [rbp+var_B8], rdi mov [rbp+var_C0], rsi mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax lea rax, [rbp+var_98] mov [rbp+var_80], rax nop nop lea rdx, [rb...
long long func0(long long a1, long long a2) { bool v2; // bl bool v3; // bl char *v4; // rax char v6; // [rsp+1Dh] [rbp-A3h] BYREF char v7; // [rsp+1Eh] [rbp-A2h] char v8; // [rsp+1Fh] [rbp-A1h] long long v9; // [rsp+20h] [rbp-A0h] BYREF long long v10; // [rsp+28h] [rbp-98h] BYREF long long v11; // [...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0xb8 MOV qword ptr [RBP + -0xb8],RDI MOV qword ptr [RBP + -0xc0],RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX LEA RAX,[RBP + -0x98] MOV qword ptr [RBP + -0x80],RAX NOP NOP LEA RDX,[RBP + -0x98] LEA RAX,[RBP + -0x60] LEA RCX,[0x104008] M...
/* func0(std::string) */ string * func0(string *param_1,int8 param_2) { bool bVar1; char *pcVar2; long lVar3; long in_FS_OFFSET; allocator local_ab; char local_aa; char local_a9; int8 local_a8; int8 local_a0; int8 local_98; int8 local_90; int8 *local_88; allocator *local_80; int8 *local_78...
521
func0
#include <iostream> #include <string> #include <assert.h>
std::string func0(std::string str1) { std::string vowels = ""; for (char ch : str1) { if (std::string("aeiouAEIOU").find(ch) != std::string::npos) { vowels += ch; } } std::string result_string = ""; for (char ch : str1) { if (std::string("aeiouAEIOU").fin...
int main() { assert(func0("Python") == "Python"); assert(func0("USA") == "ASU"); assert(func0("ab") == "ab"); return 0; }
O1
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >): endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x98,%rsp mov %rdi,%rbx mov %rsi,%r15 mov %rsi,0x18(%rsp) mov %fs:0x28,%rax mov %rax,0x88(%rsp) xor %eax,%eax lea 0x20(%rsp...
_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 78h mov rbx, rdi mov r14, rsi mov [rsp+0A8h+var_90], rsi mov rax, fs:28h mov [rsp+0A8h+var_40], rax xor eax, eax lea rdi, [rsp+0A8h+var_8...
_QWORD * func0(_QWORD *a1, long long a2) { char *v2; // rbp long long v3; // r13 char v4; // r12 unsigned long long v5; // r13 unsigned long long v6; // r15 unsigned long long v7; // rax char *v8; // rbp long long v9; // r14 char v10; // r15 long long v11; // r12 unsigned long long v12; // r14 u...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x78 MOV RBX,RDI MOV R14,RSI MOV qword ptr [RSP + 0x18],RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x68],RAX XOR EAX,EAX LEA RDI,[RSP + 0x20] LEA RAX,[RSP + 0x30] MOV qword ptr [RSP + 0x20],RAX LEA RSI,[0x1020b6] MOV RDX,RSI LAB_0010...
/* func0(std::string) */ long * func0(long *param_1,int8 *param_2) { long *plVar1; char cVar2; int uVar3; ulong uVar4; char *pcVar5; long lVar6; ulong uVar7; ulong uVar8; char *pcVar9; long in_FS_OFFSET; ulong *local_88; ulong local_80; ulong local_78 [2]; long *local_68 [2]; long local_...
522
func0
#include <iostream> #include <string> #include <assert.h>
std::string func0(std::string str1) { std::string vowels = ""; for (char ch : str1) { if (std::string("aeiouAEIOU").find(ch) != std::string::npos) { vowels += ch; } } std::string result_string = ""; for (char ch : str1) { if (std::string("aeiouAEIOU").fin...
int main() { assert(func0("Python") == "Python"); assert(func0("USA") == "ASU"); assert(func0("ab") == "ab"); return 0; }
O2
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >): endbr64 push %r15 push %r14 push %r13 push %r12 mov %rdi,%r12 push %rbp push %rbx sub $0x88,%rsp mov (%rsi),%rbp mov %rsi,0x20(%rsp) mov %fs:0x28,%rax mov %rax,0x78(%rsp) xor %eax,%eax lea 0x40(%r...
_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push r15 lea rdx, aFunc0UsaAsu+15h; "" mov r15, rsi push r14 push r13 push r12 push rbp push rbx mov rbx, rdi sub rsp, 98h mov [rsp+0C8h+var_A8], rsi lea rdi, [rsp+0C8h+var_88] mov rsi, rdx mov rax, f...
_QWORD * func0(_QWORD *a1, long long a2) { char *v2; // rbp char v3; // r12 long long v4; // r14 unsigned long long v5; // r14 _BYTE *v6; // rax unsigned long long v7; // r15 unsigned long long v8; // rdx char *v9; // rbp char v10; // r15 unsigned long long v11; // rax _QWORD *v12; // rax char v...
func0: ENDBR64 PUSH R15 LEA RDX,[0x10205a] MOV R15,RSI PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX MOV RBX,RDI SUB RSP,0x98 MOV qword ptr [RSP + 0x20],RSI LEA RDI,[RSP + 0x40] MOV RSI,RDX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x88],RAX XOR EAX,EAX LEA RAX,[RSP + 0x50] MOV qword ptr [RSP + 0x30],RDI MOV qwor...
/* func0(std::string) */ long * func0(long *param_1,int8 *param_2) { ulong uVar1; long *plVar2; ulong uVar3; char cVar4; int uVar5; char *pcVar6; long lVar7; ulong uVar8; long *plVar9; char *pcVar10; long in_FS_OFFSET; ulong *local_88; ulong local_80; ulong local_78 [2]; long *local_68 [...
523
func0
#include <iostream> #include <string> #include <assert.h>
std::string func0(std::string str1) { std::string vowels = ""; for (char ch : str1) { if (std::string("aeiouAEIOU").find(ch) != std::string::npos) { vowels += ch; } } std::string result_string = ""; for (char ch : str1) { if (std::string("aeiouAEIOU").fin...
int main() { assert(func0("Python") == "Python"); assert(func0("USA") == "ASU"); assert(func0("ab") == "ab"); return 0; }
O3
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >): endbr64 push %r15 push %r14 push %r13 push %r12 mov %rdi,%r12 push %rbp push %rbx sub $0x88,%rsp mov (%rsi),%rbp mov %rsi,0x20(%rsp) mov %fs:0x28,%rax mov %rax,0x78(%rsp) xor %eax,%eax lea 0x40(%r...
_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push r15 push r14 push r13 push r12 push rbp mov rbp, rdi push rbx sub rsp, 88h mov r12, [rsi] mov [rsp+0B8h+var_A0], rsi lea rcx, [rsp+0B8h+var_68] lea rbx, [rsp+0B8h+var_58] mov rax, fs:28h mov [rsp...
_QWORD * func0(_QWORD *a1, char **a2) { char *v2; // r12 char *v3; // rax long long v4; // rsi long long v5; // r14 unsigned long long v6; // r14 _BYTE *v7; // rax unsigned long long v8; // r15 unsigned long long v9; // rdx char *v10; // r12 char *v11; // rax char v12; // r15 unsigned long long ...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP MOV RBP,RDI PUSH RBX SUB RSP,0x88 MOV R12,qword ptr [RSI] MOV qword ptr [RSP + 0x18],RSI LEA RCX,[RSP + 0x50] LEA RBX,[RSP + 0x60] MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x78],RAX XOR EAX,EAX LEA RAX,[RSP + 0x40] MOV byte ptr [RSP + 0x40],0x0 MOV qwo...
/* func0(std::string) */ long * func0(long *param_1,int8 *param_2) { long *plVar1; ulong uVar2; int uVar3; char cVar4; ulong uVar5; char *pcVar6; long lVar7; ulong uVar8; long *plVar9; char *pcVar10; long in_FS_OFFSET; int *local_88; ulong local_80; int local_78; int7 uStack_77; long *...
524
func0
#include <string> #include <cassert>
std::string func0(const char* tup[], int size) { std::string str; for (int i = 0; i < size; ++i) { str += tup[i]; } return str; }
int main() { const char* tuple1[] = {"e", "x", "e", "r", "c", "i", "s", "e", "s"}; const char* tuple2[] = {"p", "y", "t", "h", "o", "n"}; const char* tuple3[] = {"p", "r", "o", "g", "r", "a", "m"}; assert(func0(tuple1, 9) == "exercises"); assert(func0(tuple2, 6) == "python"); assert(...
O0
cpp
func0[abi:cxx11](char const**, int): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x38,%rsp mov %rdi,-0x28(%rbp) mov %rsi,-0x30(%rbp) mov %edx,-0x34(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax mov -0x28(%rbp),%rax mov %rax,%rdi callq 1100 <_ZNSt7__cxx1112basic_stringI...
_Z5func0B5cxx11PPKci: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 38h mov [rbp+var_28], rdi mov [rbp+var_30], rsi mov [rbp+var_34], edx mov rax, [rbp+var_28] mov rdi, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void) mov [rb...
long long func0[abi:cxx11](long long a1, long long a2, int a3) { int i; // [rsp+2Ch] [rbp-14h] std::string::basic_string(a1); for ( i = 0; i < a3; ++i ) std::string::operator+=(a1, *(_QWORD *)(8LL * i + a2)); return a1; }
func0[abi:cxx11]: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x38 MOV qword ptr [RBP + -0x28],RDI MOV qword ptr [RBP + -0x30],RSI MOV dword ptr [RBP + -0x34],EDX MOV RAX,qword ptr [RBP + -0x28] MOV RDI,RAX CALL 0x00101160 MOV dword ptr [RBP + -0x14],0x0 JMP 0x001012c0 LAB_00101296: MOV EAX,dword ptr [RBP + -0x14] CD...
/* func0[abi:cxx11](char const**, int) */ char ** func0_abi_cxx11_(char **param_1,int param_2) { int in_EDX; int4 in_register_00000034; int4 local_1c; std::string::string((string *)param_1); for (local_1c = 0; local_1c < in_EDX; local_1c = local_1c + 1) { /* try { // try from 001012b7...
525
func0
#include <string> #include <cassert>
std::string func0(const char* tup[], int size) { std::string str; for (int i = 0; i < size; ++i) { str += tup[i]; } return str; }
int main() { const char* tuple1[] = {"e", "x", "e", "r", "c", "i", "s", "e", "s"}; const char* tuple2[] = {"p", "y", "t", "h", "o", "n"}; const char* tuple3[] = {"p", "r", "o", "g", "r", "a", "m"}; assert(func0(tuple1, 9) == "exercises"); assert(func0(tuple2, 6) == "python"); assert(...
O1
cpp
func0[abi:cxx11](char const**, int): endbr64 push %r14 push %r13 push %r12 push %rbp push %rbx mov %rdi,%rbp lea 0x10(%rdi),%r14 mov %r14,(%rdi) movq $0x0,0x8(%rdi) movb $0x0,0x10(%rdi) test %edx,%edx jle 12a9 <_Z5func0B5cxx11PPKci+0xa0> mov %rsi,%rbx lea -0x1(%rdx),%eax lea 0x8(%rs...
_Z5func0B5cxx11PPKci: endbr64 push r14 push r13 push r12 push rbp push rbx mov r12, rdi lea rax, [rdi+10h] mov [rdi], rax mov qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 test edx, edx jle short loc_12B9 mov rbx, rsi movsxd rdx, edx lea r14, [rsi+rdx*8] mov r13, ...
long long func0[abi:cxx11](long long a1, const char **a2, int a3) { const char **v3; // rbx const char **v4; // r14 const char *v5; // rbp *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; if ( a3 > 0 ) { v3 = a2; v4 = &a2[a3]; do { v5 = *v3; if (...
func0[abi:cxx11]: ENDBR64 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX MOV R12,RDI LEA RAX,[RDI + 0x10] MOV qword ptr [RDI],RAX MOV qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 TEST EDX,EDX JLE 0x001012b9 MOV RBX,RSI MOVSXD RDX,EDX LEA R14,[RSI + RDX*0x8] MOV R13,0x3fffffffffffffff JMP 0x00101291 LAB_0010126...
/* func0[abi:cxx11](char const**, int) */ char ** func0_abi_cxx11_(char **param_1,int param_2) { int8 *puVar1; char *__s; int8 uVar2; size_t sVar3; int in_EDX; int8 *puVar4; int4 in_register_00000034; puVar4 = (int8 *)CONCAT44(in_register_00000034,param_2); *param_1 = (char *)(param_1 + 2); par...
526
func0
#include <string> #include <cassert>
std::string func0(const char* tup[], int size) { std::string str; for (int i = 0; i < size; ++i) { str += tup[i]; } return str; }
int main() { const char* tuple1[] = {"e", "x", "e", "r", "c", "i", "s", "e", "s"}; const char* tuple2[] = {"p", "y", "t", "h", "o", "n"}; const char* tuple3[] = {"p", "r", "o", "g", "r", "a", "m"}; assert(func0(tuple1, 9) == "exercises"); assert(func0(tuple2, 6) == "python"); assert(...
O2
cpp
func0[abi:cxx11](char const**, int): endbr64 push %r15 push %r14 lea 0x10(%rdi),%r14 push %r13 push %r12 mov %rdi,%r12 push %rbp push %rbx sub $0x8,%rsp mov %r14,(%rdi) movq $0x0,0x8(%rdi) movb $0x0,0x10(%rdi) test %edx,%edx jle 1517 <_Z5func0B5cxx11PPKci+0x77> movabs $0x3ffffffffffffff...
_Z5func0B5cxx11PPKci: endbr64 push r15 lea rax, [rdi+10h] push r14 push r13 push r12 push rbp mov rbp, rdi push rbx sub rsp, 8 mov [rdi], rax mov qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 test edx, edx jle short loc_1529 movsxd rdx, edx mov rbx, rsi xor r12...
long long func0[abi:cxx11](long long a1, const char **a2, int a3) { const char **v3; // rbx long long v4; // r12 const char **v5; // r14 const char *v6; // r15 *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; if ( a3 > 0 ) { v3 = a2; v4 = 0LL; v5 = &a2[a3]; ...
func0[abi:cxx11]: ENDBR64 PUSH R15 LEA RAX,[RDI + 0x10] PUSH R14 PUSH R13 PUSH R12 PUSH RBP MOV RBP,RDI PUSH RBX SUB RSP,0x8 MOV qword ptr [RDI],RAX MOV qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 TEST EDX,EDX JLE 0x00101529 MOVSXD RDX,EDX MOV RBX,RSI XOR R12D,R12D MOV R13,0x3fffffffffffffff LEA R14,[RSI + ...
/* func0[abi:cxx11](char const**, int) */ char ** func0_abi_cxx11_(char **param_1,int param_2) { char *pcVar1; size_t sVar2; char **ppcVar3; int in_EDX; char *pcVar4; int iVar5; int4 in_register_00000034; char *__s; char *pcVar6; pcVar4 = (char *)CONCAT44(in_register_00000034,param_2); *param...
527
func0
#include <string> #include <cassert>
std::string func0(const char* tup[], int size) { std::string str; for (int i = 0; i < size; ++i) { str += tup[i]; } return str; }
int main() { const char* tuple1[] = {"e", "x", "e", "r", "c", "i", "s", "e", "s"}; const char* tuple2[] = {"p", "y", "t", "h", "o", "n"}; const char* tuple3[] = {"p", "r", "o", "g", "r", "a", "m"}; assert(func0(tuple1, 9) == "exercises"); assert(func0(tuple2, 6) == "python"); assert(...
O3
cpp
func0[abi:cxx11](char const**, int): endbr64 push %r15 push %r14 lea 0x10(%rdi),%r14 push %r13 push %r12 mov %rdi,%r12 push %rbp push %rbx sub $0x8,%rsp mov %r14,(%rdi) movq $0x0,0x8(%rdi) movb $0x0,0x10(%rdi) test %edx,%edx jle 1557 <_Z5func0B5cxx11PPKci+0x77> movabs $0x3ffffffffffffff...
_Z5func0B5cxx11PPKci: endbr64 push r15 lea rax, [rdi+10h] push r14 push r13 push r12 push rbp mov rbp, rdi push rbx sub rsp, 8 mov [rdi], rax mov qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 test edx, edx jle short loc_1529 movsxd rdx, edx mov rbx, rsi xor r12...
long long func0[abi:cxx11](long long a1, const char **a2, int a3) { const char **v3; // rbx long long v4; // r12 const char **v5; // r14 const char *v6; // r15 *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; if ( a3 > 0 ) { v3 = a2; v4 = 0LL; v5 = &a2[a3]; ...
func0[abi:cxx11]: ENDBR64 PUSH R15 LEA RAX,[RDI + 0x10] PUSH R14 PUSH R13 PUSH R12 PUSH RBP MOV RBP,RDI PUSH RBX SUB RSP,0x8 MOV qword ptr [RDI],RAX MOV qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 TEST EDX,EDX JLE 0x00101529 MOVSXD RDX,EDX MOV RBX,RSI XOR R12D,R12D MOV R13,0x3fffffffffffffff LEA R14,[RSI + ...
/* func0[abi:cxx11](char const**, int) */ char ** func0_abi_cxx11_(char **param_1,int param_2) { char *pcVar1; size_t sVar2; char **ppcVar3; int in_EDX; char *pcVar4; int iVar5; int4 in_register_00000034; char *__s; char *pcVar6; pcVar4 = (char *)CONCAT44(in_register_00000034,param_2); *param...
528
func0
#include <vector> #include <numeric> #include <assert.h>
int func0(const std::vector<int>& nums) { std::vector<int> negatives; for (int num : nums) { if (num < 0) { negatives.push_back(num); } } return std::accumulate(negatives.begin(), negatives.end(), 0); }
int main() { assert(func0({2, 4, -6, -9, 11, -12, 14, -5, 17}) == -32); assert(func0({10, 15, -14, 13, -18, 12, -20}) == -52); assert(func0({19, -65, 57, 39, 152, -639, 121, 44, 90, -190}) == -894); return 0; }
O0
cpp
func0(std::vector<int, std::allocator<int> > const&): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x58,%rsp mov %rdi,-0x58(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax lea -0x30(%rbp),%rax mov %rax,%rdi callq 1708 <_ZNSt6vectorIiSaIiEEC1Ev> mov -0x58(%rbp),%rax mov %r...
_Z5func0RKSt6vectorIiSaIiEE: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 58h mov [rbp+var_58], rdi mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax lea rax, [rbp+var_30] mov rdi, rax call _ZNSt6vectorIiSaIiEEC2Ev; std::vector<int>::vector(void) mov rax, [rbp+var_58] mo...
long long func0(long long a1) { long long v1; // rbx long long v2; // rax int v4; // [rsp+14h] [rbp-4Ch] BYREF long long v5; // [rsp+18h] [rbp-48h] BYREF _QWORD v6[2]; // [rsp+20h] [rbp-40h] BYREF _BYTE v7[24]; // [rsp+30h] [rbp-30h] BYREF unsigned long long v8; // [rsp+48h] [rbp-18h] v8 = __readfsqwo...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x58 MOV qword ptr [RBP + -0x58],RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX LEA RAX,[RBP + -0x30] MOV RDI,RAX CALL 0x00101782 MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOV RDI,RAX ...
/* func0(std::vector<int, std::allocator<int> > const&) */ int4 func0(vector *param_1) { bool bVar1; int4 uVar2; int *piVar3; int8 uVar4; int8 uVar5; long in_FS_OFFSET; int local_54; int8 local_50; int8 local_48; vector<int,std::allocator<int>> *local_40; vector<int,std::allocator<int>> local_38...
529
func0
#include <vector> #include <numeric> #include <assert.h>
int func0(const std::vector<int>& nums) { std::vector<int> negatives; for (int num : nums) { if (num < 0) { negatives.push_back(num); } } return std::accumulate(negatives.begin(), negatives.end(), 0); }
int main() { assert(func0({2, 4, -6, -9, 11, -12, 14, -5, 17}) == -32); assert(func0({10, 15, -14, 13, -18, 12, -20}) == -52); assert(func0({19, -65, 57, 39, 152, -639, 121, 44, 90, -190}) == -894); return 0; }
O1
cpp
func0(std::vector<int, std::allocator<int> > const&): endbr64 push %r12 push %rbp push %rbx sub $0x30,%rsp mov %fs:0x28,%rax mov %rax,0x28(%rsp) xor %eax,%eax movq $0x0,0x10(%rsp) movq $0x0,0x18(%rsp) movq $0x0,0x20(%rsp) mov (%rdi),%rbx mov 0x8(%rdi),%rbp cmp %rbx,%rbp je 12a9 <_Z5...
_Z5func0RKSt6vectorIiSaIiEE: endbr64 push rbp push rbx sub rsp, 38h mov rax, fs:28h mov [rsp+48h+var_20], rax xor eax, eax mov [rsp+48h+var_38], 0 mov [rsp+48h+var_30], 0 mov [rsp+48h+var_28], 0 mov rbx, [rdi] mov rbp, [rdi+8] cmp rbx, rbp jnz short loc_12CF loc_126A: m...
long long func0(int **a1) { int *v1; // rbx int *v2; // rbp int *v3; // rax unsigned int v4; // ebx int v6; // eax int *v7; // rsi int v8; // [rsp+Ch] [rbp-3Ch] BYREF void *v9; // [rsp+10h] [rbp-38h] BYREF int *v10; // [rsp+18h] [rbp-30h] int *v11; // [rsp+20h] [rbp-28h] unsigned long long v12; /...
func0: ENDBR64 PUSH RBP PUSH RBX SUB RSP,0x38 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x28],RAX XOR EAX,EAX MOV qword ptr [RSP + 0x10],0x0 MOV qword ptr [RSP + 0x18],0x0 MOV qword ptr [RSP + 0x20],0x0 MOV RBX,qword ptr [RDI] MOV RBP,qword ptr [RDI + 0x8] CMP RBX,RBP JNZ 0x001012cf LAB_0010126a: MOV RDX,qword p...
/* func0(std::vector<int, std::allocator<int> > const&) */ int func0(vector *param_1) { int *piVar1; int *piVar2; int iVar3; long in_FS_OFFSET; int local_3c; int *local_38; int *local_30; int *local_28; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); local_38 = (int *)0x0; local_3...
530
func0
#include <vector> #include <numeric> #include <assert.h>
int func0(const std::vector<int>& nums) { std::vector<int> negatives; for (int num : nums) { if (num < 0) { negatives.push_back(num); } } return std::accumulate(negatives.begin(), negatives.end(), 0); }
int main() { assert(func0({2, 4, -6, -9, 11, -12, 14, -5, 17}) == -32); assert(func0({10, 15, -14, 13, -18, 12, -20}) == -52); assert(func0({19, -65, 57, 39, 152, -639, 121, 44, 90, -190}) == -894); return 0; }
O2
cpp
func0(std::vector<int, std::allocator<int> > const&): endbr64 push %r12 xor %esi,%esi push %rbp push %rbx sub $0x30,%rsp mov (%rdi),%rbx mov 0x8(%rdi),%r12 mov %fs:0x28,%rax mov %rax,0x28(%rsp) xor %eax,%eax lea 0xc(%rsp),%rbp movq $0x0,0x10(%rsp) movq $0x0,0x18(%rsp) movq $0x0,0x20(...
_Z5func0RKSt6vectorIiSaIiEE: endbr64 push r12 pxor xmm0, xmm0 xor edx, edx xor esi, esi push rbp push rbx sub rsp, 30h mov rbx, [rdi] mov rbp, [rdi+8] mov rax, fs:28h mov [rsp+48h+var_20], rax xor eax, eax movaps xmmword ptr [rsp+48h+var_38], xmm0 mov [rsp+48h+var_28], 0...
long long func0(int **a1) { int *v1; // rdx int *v2; // rsi int *v3; // rbx int *v4; // rbp int v5; // eax int *v6; // rax unsigned int v8; // ebx int v9; // [rsp+4h] [rbp-3Ch] BYREF void *v10[2]; // [rsp+8h] [rbp-38h] BYREF int *v11; // [rsp+18h] [rbp-28h] unsigned long long v12; // [rsp+20h] [r...
func0: ENDBR64 PUSH R12 PXOR XMM0,XMM0 XOR EDX,EDX XOR ESI,ESI PUSH RBP PUSH RBX SUB RSP,0x30 MOV RBX,qword ptr [RDI] MOV RBP,qword ptr [RDI + 0x8] MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x28],RAX XOR EAX,EAX MOVAPS xmmword ptr [RSP + 0x10],XMM0 MOV qword ptr [RSP + 0x20],0x0 CMP RBX,RBP JNZ 0x00101491 JMP 0x...
/* func0(std::vector<int, std::allocator<int> > const&) */ int func0(vector *param_1) { int *piVar1; int *piVar2; int *piVar3; int iVar4; int *piVar5; long in_FS_OFFSET; int local_3c; int *local_38; int *piStack_30; int *local_28; long local_20; piVar3 = (int *)0x0; piVar5 = (int *)0x0; ...
531
func0
#include <vector> #include <numeric> #include <assert.h>
int func0(const std::vector<int>& nums) { std::vector<int> negatives; for (int num : nums) { if (num < 0) { negatives.push_back(num); } } return std::accumulate(negatives.begin(), negatives.end(), 0); }
int main() { assert(func0({2, 4, -6, -9, 11, -12, 14, -5, 17}) == -32); assert(func0({10, 15, -14, 13, -18, 12, -20}) == -52); assert(func0({19, -65, 57, 39, 152, -639, 121, 44, 90, -190}) == -894); return 0; }
O3
cpp
func0(std::vector<int, std::allocator<int> > const&): endbr64 push %r12 pxor %xmm0,%xmm0 push %rbp push %rbx sub $0x30,%rsp mov (%rdi),%rbx mov 0x8(%rdi),%r12 mov %fs:0x28,%rax mov %rax,0x28(%rsp) xor %eax,%eax movaps %xmm0,0x10(%rsp) movq $0x0,0x20(%rsp) cmp %r12,%rbx je 15c0 <_Z5fun...
_Z5func0RKSt6vectorIiSaIiEE: endbr64 push r12 pxor xmm0, xmm0 xor r8d, r8d xor esi, esi push rbp push rbx sub rsp, 30h mov rbx, [rdi] mov rbp, [rdi+8] mov rax, fs:28h mov [rsp+48h+var_20], rax xor eax, eax movaps xmmword ptr [rsp+48h+var_38], xmm0 mov [rsp+48h+var_28], 0...
long long func0(int **a1) { int *v1; // r8 int *v2; // rsi int *v3; // rbx int *v4; // rbp int v5; // eax const __m128i *v6; // rax unsigned long long v7; // rcx __m128i v8; // xmm0 __m128i v9; // xmm2 __m128i v10; // xmm0 unsigned int v12; // ebx int v13; // [rsp+4h] [rbp-3Ch] BYREF void *v1...
func0: ENDBR64 PUSH R12 PXOR XMM0,XMM0 XOR R8D,R8D XOR ESI,ESI PUSH RBP PUSH RBX SUB RSP,0x30 MOV RBX,qword ptr [RDI] MOV RBP,qword ptr [RDI + 0x8] MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x28],RAX XOR EAX,EAX MOVAPS xmmword ptr [RSP + 0x10],XMM0 MOV qword ptr [RSP + 0x20],0x0 CMP RBX,RBP JNZ 0x00101491 JMP 0x...
/* func0(std::vector<int, std::allocator<int> > const&) */ int func0(vector *param_1) { int *piVar1; int iVar2; int *piVar3; int *piVar4; int *piVar5; ulong uVar6; ulong uVar7; int *piVar8; int *piVar9; long in_FS_OFFSET; int iVar10; int iVar11; int iVar12; int iVar13; int local_3c; in...
532
func0
#include <string> #include <assert.h>
std::string func0(int arr[], int n, int p) { int _sum = 0; for (int i = 0; i < n; ++i) { _sum += arr[i]; } if (p == 1) { if (_sum % 2 == 0) { return "ODD"; } else { return "EVEN"; } } return "EVEN"; }
int main() { int array1[3] = {5, 7, 10}; int array2[2] = {2, 3}; int array3[3] = {1, 2, 3}; assert(func0(array1, 3, 1) == "ODD"); assert(func0(array2, 2, 3) == "EVEN"); assert(func0(array3, 3, 1) == "ODD"); return 0; }
O0
cpp
func0[abi:cxx11](int*, int, int): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x48,%rsp mov %rdi,-0x38(%rbp) mov %rsi,-0x40(%rbp) mov %edx,-0x44(%rbp) mov %ecx,-0x48(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax movl $0x0,-0x20(%rbp) movl $0x0,-0x1c(%rbp) mov -0x1c(...
_Z5func0B5cxx11Piii: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 58h mov [rbp+var_48], rdi mov [rbp+var_50], rsi mov [rbp+var_54], edx mov [rbp+var_58], ecx mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax mov [rbp+var_38], 0 mov [rbp+var_34], 0 jmp short loc_...
long long func0[abi:cxx11](long long a1, long long a2, int a3, int a4) { char v5; // [rsp+27h] [rbp-39h] BYREF int v6; // [rsp+28h] [rbp-38h] int i; // [rsp+2Ch] [rbp-34h] char *v8; // [rsp+30h] [rbp-30h] char *v9; // [rsp+38h] [rbp-28h] char *v10; // [rsp+40h] [rbp-20h] unsigned long long v11; // [rsp+4...
func0[abi:cxx11]: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x58 MOV qword ptr [RBP + -0x48],RDI MOV qword ptr [RBP + -0x50],RSI MOV dword ptr [RBP + -0x54],EDX MOV dword ptr [RBP + -0x58],ECX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX MOV dword ptr [RBP + -0x38],0x0 MOV dword ptr [RBP ...
/* func0[abi:cxx11](int*, int, int) */ int * func0_abi_cxx11_(int *param_1,int param_2,int param_3) { int in_ECX; int4 in_register_00000034; long in_FS_OFFSET; allocator local_41; uint local_40; int local_3c; allocator *local_38; allocator *local_30; allocator *local_28; long local_20; local_...
533
func0
#include <string> #include <assert.h>
std::string func0(int arr[], int n, int p) { int _sum = 0; for (int i = 0; i < n; ++i) { _sum += arr[i]; } if (p == 1) { if (_sum % 2 == 0) { return "ODD"; } else { return "EVEN"; } } return "EVEN"; }
int main() { int array1[3] = {5, 7, 10}; int array2[2] = {2, 3}; int array3[3] = {1, 2, 3}; assert(func0(array1, 3, 1) == "ODD"); assert(func0(array2, 2, 3) == "EVEN"); assert(func0(array3, 3, 1) == "ODD"); return 0; }
O1
cpp
func0[abi:cxx11](int*, int, int): endbr64 push %rbx mov %rdi,%rbx test %edx,%edx jle 1275 <_Z5func0B5cxx11Piii+0x6c> mov %rsi,%rax lea -0x1(%rdx),%edx lea 0x4(%rsi,%rdx,4),%rsi mov $0x0,%edx add (%rax),%edx add $0x4,%rax cmp %rsi,%rax jne 1225 <_Z5func0B5cxx11Piii+0x1c> cmp $0x1,%ec...
_Z5func0B5cxx11Piii: endbr64 push rbx mov rbx, rdi test edx, edx jle short loc_1279 mov rax, rsi movsxd rdx, edx lea rdi, [rsi+rdx*4] mov edx, 0 loc_1224: mov esi, edx add esi, [rax] mov edx, esi add rax, 4 cmp rax, rdi jnz short loc_1224 cmp ecx, 1 jnz short l...
_QWORD * func0[abi:cxx11](_QWORD *a1, _DWORD *a2, int a3, int a4) { _DWORD *v5; // rax _DWORD *v6; // rdi int v7; // edx int v8; // esi if ( a3 > 0 ) { v5 = a2; v6 = &a2[a3]; v7 = 0; do { v8 = *v5 + v7; v7 = v8; ++v5; } while ( v5 != v6 ); if ( a4 != 1 || (...
func0[abi:cxx11]: ENDBR64 PUSH RBX MOV RBX,RDI TEST EDX,EDX JLE 0x00101279 MOV RAX,RSI MOVSXD RDX,EDX LEA RDI,[RSI + RDX*0x4] MOV EDX,0x0 LAB_00101224: MOV ESI,EDX ADD ESI,dword ptr [RAX] MOV EDX,ESI ADD RAX,0x4 CMP RAX,RDI JNZ 0x00101224 CMP ECX,0x1 JNZ 0x0010125a TEST SIL,0x1 JZ 0x0010127e LEA RAX,[RBX + 0x10] MOV qw...
/* func0[abi:cxx11](int*, int, int) */ int * func0_abi_cxx11_(int *param_1,int param_2,int param_3) { int *piVar1; int *piVar2; int in_ECX; uint uVar3; int4 in_register_00000034; piVar2 = (int *)CONCAT44(in_register_00000034,param_2); if (param_3 < 1) { if (in_ECX != 1) goto LAB_0010125a; } e...
534
func0
#include <string> #include <assert.h>
std::string func0(int arr[], int n, int p) { int _sum = 0; for (int i = 0; i < n; ++i) { _sum += arr[i]; } if (p == 1) { if (_sum % 2 == 0) { return "ODD"; } else { return "EVEN"; } } return "EVEN"; }
int main() { int array1[3] = {5, 7, 10}; int array2[2] = {2, 3}; int array3[3] = {1, 2, 3}; assert(func0(array1, 3, 1) == "ODD"); assert(func0(array2, 2, 3) == "EVEN"); assert(func0(array3, 3, 1) == "ODD"); return 0; }
O2
cpp
func0[abi:cxx11](int*, int, int): endbr64 mov %rdi,%rax lea 0x10(%rdi),%rdi test %edx,%edx jle 1390 <_Z5func0B5cxx11Piii+0x50> sub $0x1,%edx lea 0x4(%rsi,%rdx,4),%r8 xor %edx,%edx nopl 0x0(%rax) add (%rsi),%edx add $0x4,%rsi cmp %r8,%rsi jne 1360 <_Z5func0B5cxx11Piii+0x20> cmp $0x1,...
_Z5func0B5cxx11Piii: endbr64 push rbx mov rbx, rdi test edx, edx jle short loc_1480 movsxd rdx, edx xor eax, eax lea rdx, [rsi+rdx*4] nop dword ptr [rax] loc_1448: add eax, [rsi] add rsi, 4 cmp rsi, rdx jnz short loc_1448 cmp ecx, 1 jnz short loc_145C test al, 1 jz ...
_QWORD * func0[abi:cxx11](_QWORD *a1, _DWORD *a2, int a3, int a4) { int v4; // eax _DWORD *v5; // rdx if ( a3 <= 0 ) { if ( a4 != 1 ) { LABEL_6: *a1 = a1 + 2; std::string::_M_construct<char const*>(a1, "EVEN"); return a1; } } else { v4 = 0; v5 = &a2[a3]; do ...
func0[abi:cxx11]: ENDBR64 PUSH RBX MOV RBX,RDI TEST EDX,EDX JLE 0x00101480 MOVSXD RDX,EDX XOR EAX,EAX LEA RDX,[RSI + RDX*0x4] NOP dword ptr [RAX] LAB_00101448: ADD EAX,dword ptr [RSI] ADD RSI,0x4 CMP RSI,RDX JNZ 0x00101448 CMP ECX,0x1 JNZ 0x0010145c TEST AL,0x1 JZ 0x00101485 LAB_0010145c: LEA RAX,[RBX + 0x10] LEA RDX,[...
/* func0[abi:cxx11](int*, int, int) */ int * func0_abi_cxx11_(int *param_1,int param_2,int param_3) { int *piVar1; uint uVar2; int in_ECX; int4 in_register_00000034; int *piVar3; piVar3 = (int *)CONCAT44(in_register_00000034,param_2); if (param_3 < 1) { if (in_ECX == 1) goto LAB_00101485; } e...
535
func0
#include <string> #include <assert.h>
std::string func0(int arr[], int n, int p) { int _sum = 0; for (int i = 0; i < n; ++i) { _sum += arr[i]; } if (p == 1) { if (_sum % 2 == 0) { return "ODD"; } else { return "EVEN"; } } return "EVEN"; }
int main() { int array1[3] = {5, 7, 10}; int array2[2] = {2, 3}; int array3[3] = {1, 2, 3}; assert(func0(array1, 3, 1) == "ODD"); assert(func0(array2, 2, 3) == "EVEN"); assert(func0(array3, 3, 1) == "ODD"); return 0; }
O3
cpp
func0[abi:cxx11](int*, int, int): endbr64 mov %rdi,%rax lea 0x10(%rdi),%r10 test %edx,%edx jle 1410 <_Z5func0B5cxx11Piii+0xd0> lea -0x1(%rdx),%edi cmp $0x3,%edi jbe 1433 <_Z5func0B5cxx11Piii+0xf3> mov %edx,%r9d mov %rsi,%r8 pxor %xmm0,%xmm0 shr $0x2,%r9d shl $0x4,%r9 add %rsi,%r9 no...
_Z5func0B5cxx11Piii: endbr64 mov r8, rsi mov r9d, ecx mov esi, edx test edx, edx jle loc_13F8 lea eax, [rdx-1] cmp eax, 2 jbe loc_1421 shr edx, 2 mov rax, r8 pxor xmm0, xmm0 shl rdx, 4 add rdx, r8 nop dword ptr [rax+00000000h] loc_1368: movdqu xmm2, xmmword ptr [ra...
long long func0[abi:cxx11](long long a1, const __m128i *a2, int a3, int a4) { const __m128i *v6; // rax __m128i v7; // xmm0 const __m128i *v8; // rdx __m128i v9; // xmm2 signed int v10; // edx __m128i v11; // xmm0 int v12; // eax long long v13; // r10 long long result; // rax if ( a3 > 0 ) { ...
func0[abi:cxx11]: ENDBR64 MOV R8,RSI MOV R9D,ECX MOV ESI,EDX TEST EDX,EDX JLE 0x001013f8 LEA EAX,[RDX + -0x1] CMP EAX,0x2 JBE 0x00101421 SHR EDX,0x2 MOV RAX,R8 PXOR XMM0,XMM0 SHL RDX,0x4 ADD RDX,R8 NOP dword ptr [RAX] LAB_00101368: MOVDQU XMM2,xmmword ptr [RAX] ADD RAX,0x10 PADDD XMM0,XMM2 CMP RAX,RDX JNZ 0x00101368 MO...
/* func0[abi:cxx11](int*, int, int) */ int * func0_abi_cxx11_(int *param_1,int param_2,int param_3) { int iVar1; int *piVar2; int *piVar3; int *piVar4; int *piVar5; int in_ECX; uint uVar6; int4 in_register_00000034; int *piVar7; int iVar8; uint uVar9; int iVar10; int iVar11; int iVar12; ...
536
func0
#include <assert.h>
int func0(int n) { return n * (2*n - 1); }
int main() { assert(func0(10) == 190); assert(func0(5) == 45); assert(func0(7) == 91); return 0; }
O0
cpp
func0(int): endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x4(%rbp) mov -0x4(%rbp),%eax add %eax,%eax sub $0x1,%eax imul -0x4(%rbp),%eax pop %rbp retq
_Z5func0i: endbr64 push rbp mov rbp, rsp mov [rbp+var_4], edi mov eax, [rbp+var_4] add eax, eax sub eax, 1 imul eax, [rbp+var_4] pop rbp retn
long long func0(int a1) { return (unsigned int)(a1 * (2 * a1 - 1)); }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x4],EDI MOV EAX,dword ptr [RBP + -0x4] ADD EAX,EAX SUB EAX,0x1 IMUL EAX,dword ptr [RBP + -0x4] POP RBP RET
/* func0(int) */ int func0(int param_1) { return (param_1 * 2 + -1) * param_1; }
537
func0
#include <assert.h>
int func0(int n) { return n * (2*n - 1); }
int main() { assert(func0(10) == 190); assert(func0(5) == 45); assert(func0(7) == 91); return 0; }
O1
cpp
func0(int): endbr64 lea -0x1(%rdi,%rdi,1),%eax imul %edi,%eax retq
_Z5func0i: endbr64 lea eax, [rdi+rdi-1] imul eax, edi retn
long long func0(int a1) { return (unsigned int)(a1 * (2 * a1 - 1)); }
func0: ENDBR64 LEA EAX,[RDI + RDI*0x1 + -0x1] IMUL EAX,EDI RET
/* func0(int) */ int func0(int param_1) { return (param_1 * 2 + -1) * param_1; }
538
func0
#include <assert.h>
int func0(int n) { return n * (2*n - 1); }
int main() { assert(func0(10) == 190); assert(func0(5) == 45); assert(func0(7) == 91); return 0; }
O2
cpp
func0(int): endbr64 lea -0x1(%rdi,%rdi,1),%eax imul %edi,%eax retq nopl 0x0(%rax)
_Z5func0i: endbr64 lea eax, [rdi+rdi-1] imul eax, edi retn
long long func0(int a1) { return (unsigned int)(a1 * (2 * a1 - 1)); }
func0: ENDBR64 LEA EAX,[RDI + RDI*0x1 + -0x1] IMUL EAX,EDI RET
/* func0(int) */ int func0(int param_1) { return (param_1 * 2 + -1) * param_1; }
539
func0
#include <assert.h>
int func0(int n) { return n * (2*n - 1); }
int main() { assert(func0(10) == 190); assert(func0(5) == 45); assert(func0(7) == 91); return 0; }
O3
cpp
func0(int): endbr64 lea -0x1(%rdi,%rdi,1),%eax imul %edi,%eax retq nopl 0x0(%rax)
_Z5func0i: endbr64 lea eax, [rdi+rdi-1] imul eax, edi retn
long long func0(int a1) { return (unsigned int)(a1 * (2 * a1 - 1)); }
func0: ENDBR64 LEA EAX,[RDI + RDI*0x1 + -0x1] IMUL EAX,EDI RET
/* func0(int) */ int func0(int param_1) { return (param_1 * 2 + -1) * param_1; }
540
func0
#include <assert.h>
double func0(int units) { double amount; int surcharge; if (units < 50) { amount = units * 2.60; surcharge = 25; } else if (units <= 100) { amount = 130 + ((units - 50) * 3.25); surcharge = 35; } else if (units <= 200) { amount = 130 + 162.50 + ((uni...
int main() { assert(func0(75) == 246.25); assert(func0(265) == 1442.75); assert(func0(100) == 327.5); return 0; }
O0
cpp
func0(int): endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x24(%rbp) cmpl $0x31,-0x24(%rbp) jg 117c <_Z5func0i+0x33> cvtsi2sdl -0x24(%rbp),%xmm1 movsd 0xf31(%rip),%xmm0 mulsd %xmm1,%xmm0 movsd %xmm0,-0x10(%rbp) movl $0x19,-0x14(%rbp) jmpq 121b <_Z5func0i+0xd2> cmpl $0x64,-0x24(%rbp) jg 11b2 <_Z5f...
_Z5func0i: endbr64 push rbp mov rbp, rsp mov [rbp+var_24], edi cmp [rbp+var_24], 31h ; '1' jg short loc_1180 pxor xmm1, xmm1 cvtsi2sd xmm1, [rbp+var_24] movsd xmm0, cs:qword_2078 mulsd xmm0, xmm1 movsd [rbp+var_10], xmm0 mov [rbp+var_14], 19h jmp loc_122B loc_1180: cmp [rbp+var_...
double func0(int a1) { int v2; // [rsp+10h] [rbp-14h] double v3; // [rsp+14h] [rbp-10h] if ( a1 > 49 ) { if ( a1 > 100 ) { if ( a1 > 200 ) { v3 = (double)(a1 - 200) * 8.449999999999999 + 818.5; v2 = 75; } else { v3 = (double)(a1 - 100) * 5.26 + 292...
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x24],EDI CMP dword ptr [RBP + -0x24],0x31 JG 0x00101180 PXOR XMM1,XMM1 CVTSI2SD XMM1,dword ptr [RBP + -0x24] MOVSD XMM0,qword ptr [0x00102078] MULSD XMM0,XMM1 MOVSD qword ptr [RBP + -0x10],XMM0 MOV dword ptr [RBP + -0x14],0x19 JMP 0x0010122b LAB_00101180: CMP d...
/* func0(int) */ double func0(int param_1) { int4 local_1c; int8 local_18; if (param_1 < 0x32) { local_18 = DAT_00102078 * (double)param_1; local_1c = 0x19; } else if (param_1 < 0x65) { local_18 = DAT_00102088 + (double)(param_1 + -0x32) * DAT_00102080; local_1c = 0x23; } else if (par...
541
func0
#include <assert.h>
double func0(int units) { double amount; int surcharge; if (units < 50) { amount = units * 2.60; surcharge = 25; } else if (units <= 100) { amount = 130 + ((units - 50) * 3.25); surcharge = 35; } else if (units <= 200) { amount = 130 + 162.50 + ((uni...
int main() { assert(func0(75) == 246.25); assert(func0(265) == 1442.75); assert(func0(100) == 327.5); return 0; }
O1
cpp
func0(int): endbr64 cmp $0x31,%edi jg 1154 <_Z5func0i+0x2b> pxor %xmm0,%xmm0 cvtsi2sd %edi,%xmm0 mulsd 0xec6(%rip),%xmm0 mov $0x19,%eax pxor %xmm1,%xmm1 cvtsi2sd %eax,%xmm1 addsd %xmm1,%xmm0 retq cmp $0x64,%edi jg 117b <_Z5func0i+0x52> sub $0x32,%edi pxor %xmm0,%xmm0 cvtsi2sd %edi,%xmm0 muls...
_Z5func0i: endbr64 cmp edi, 31h ; '1' jg short loc_1154 pxor xmm1, xmm1 cvtsi2sd xmm1, edi mulsd xmm1, cs:qword_2008 mov eax, 19h loc_1147: pxor xmm0, xmm0 cvtsi2sd xmm0, eax addsd xmm0, xmm1 retn loc_1154: cmp edi, 64h ; 'd' jg short loc_117B sub edi, 32h ; '2' pxor xmm1, xmm1 cv...
double func0(int a1) { double v1; // xmm1_8 int v2; // eax if ( a1 > 49 ) { if ( a1 > 100 ) { if ( a1 > 200 ) { v1 = (double)(a1 - 200) * 8.449999999999999 + 818.5; v2 = 75; } else { v1 = (double)(a1 - 100) * 5.26 + 292.5; v2 = 45; } ...
func0: ENDBR64 CMP EDI,0x31 JG 0x00101154 PXOR XMM1,XMM1 CVTSI2SD XMM1,EDI MULSD XMM1,qword ptr [0x00102008] MOV EAX,0x19 LAB_00101147: PXOR XMM0,XMM0 CVTSI2SD XMM0,EAX ADDSD XMM0,XMM1 RET LAB_00101154: CMP EDI,0x64 JG 0x0010117b SUB EDI,0x32 PXOR XMM1,XMM1 CVTSI2SD XMM1,EDI MULSD XMM1,qword ptr [0x00102010] ADDSD XMM1...
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* func0(int) */ double func0(int param_1) { int iVar1; double dVar2; if (param_1 < 0x32) { dVar2 = (double)param_1 * _DAT_00102008; iVar1 = 0x19; } else if (param_1 < 0x65) { dVar2 = (double)(param_1 + -0x32...
542
func0
#include <assert.h>
double func0(int units) { double amount; int surcharge; if (units < 50) { amount = units * 2.60; surcharge = 25; } else if (units <= 100) { amount = 130 + ((units - 50) * 3.25); surcharge = 35; } else if (units <= 200) { amount = 130 + 162.50 + ((uni...
int main() { assert(func0(75) == 246.25); assert(func0(265) == 1442.75); assert(func0(100) == 327.5); return 0; }
O2
cpp
func0(int): endbr64 cmp $0x31,%edi jg 1170 <_Z5func0i+0x30> pxor %xmm0,%xmm0 movsd 0xeb3(%rip),%xmm1 cvtsi2sd %edi,%xmm0 mulsd 0xec7(%rip),%xmm0 addsd %xmm1,%xmm0 retq nopw %cs:0x0(%rax,%rax,1) cmp $0x64,%edi jg 11a0 <_Z5func0i+0x60> sub $0x32,%edi pxor %xmm0,%xmm0 movsd 0xe8c(%rip),%xmm1 cvt...
_Z5func0i: endbr64 cmp edi, 31h ; '1' jg short loc_1170 pxor xmm0, xmm0 movsd xmm1, cs:qword_2008 cvtsi2sd xmm0, edi mulsd xmm0, cs:qword_2028 addsd xmm0, xmm1 retn loc_1170: cmp edi, 64h ; 'd' jg short loc_11A0 sub edi, 32h ; '2' pxor xmm0, xmm0 movsd xmm1, cs:qword_2010 cvtsi2sd xm...
double func0(int a1) { if ( a1 <= 49 ) return (double)a1 * 2.6 + 25.0; if ( a1 <= 100 ) return (double)(a1 - 50) * 3.25 + 130.0 + 35.0; if ( a1 > 200 ) return (double)(a1 - 200) * 8.449999999999999 + 818.5 + 75.0; return (double)(a1 - 100) * 5.26 + 292.5 + 45.0; }
func0: ENDBR64 CMP EDI,0x31 JG 0x00101170 PXOR XMM0,XMM0 MOVSD XMM1,qword ptr [0x00102008] CVTSI2SD XMM0,EDI MULSD XMM0,qword ptr [0x00102028] ADDSD XMM0,XMM1 RET LAB_00101170: CMP EDI,0x64 JG 0x001011a0 SUB EDI,0x32 PXOR XMM0,XMM0 MOVSD XMM1,qword ptr [0x00102010] CVTSI2SD XMM0,EDI MULSD XMM0,qword ptr [0x00102030] AD...
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* func0(int) */ double func0(int param_1) { if (param_1 < 0x32) { return (double)param_1 * _DAT_00102028 + DAT_00102008; } if (param_1 < 0x65) { return (double)(param_1 + -0x32) * _DAT_00102030 + _DAT_00102038 + DAT_00...
543
func0
#include <assert.h>
double func0(int units) { double amount; int surcharge; if (units < 50) { amount = units * 2.60; surcharge = 25; } else if (units <= 100) { amount = 130 + ((units - 50) * 3.25); surcharge = 35; } else if (units <= 200) { amount = 130 + 162.50 + ((uni...
int main() { assert(func0(75) == 246.25); assert(func0(265) == 1442.75); assert(func0(100) == 327.5); return 0; }
O3
cpp
func0(int): endbr64 cmp $0x31,%edi jg 1170 <_Z5func0i+0x30> pxor %xmm0,%xmm0 movsd 0xeb3(%rip),%xmm1 cvtsi2sd %edi,%xmm0 mulsd 0xec7(%rip),%xmm0 addsd %xmm1,%xmm0 retq nopw %cs:0x0(%rax,%rax,1) cmp $0x64,%edi jg 11a0 <_Z5func0i+0x60> sub $0x32,%edi pxor %xmm0,%xmm0 movsd 0xe8c(%rip),%xmm1 cvt...
_Z5func0i: endbr64 cmp edi, 31h ; '1' jg short loc_1170 pxor xmm0, xmm0 movsd xmm1, cs:qword_2008 cvtsi2sd xmm0, edi mulsd xmm0, cs:qword_2028 addsd xmm0, xmm1 retn loc_1170: cmp edi, 64h ; 'd' jg short loc_11A0 sub edi, 32h ; '2' pxor xmm0, xmm0 movsd xmm1, cs:qword_2010 cvtsi2sd xm...
double func0(int a1) { if ( a1 <= 49 ) return (double)a1 * 2.6 + 25.0; if ( a1 <= 100 ) return (double)(a1 - 50) * 3.25 + 130.0 + 35.0; if ( a1 > 200 ) return (double)(a1 - 200) * 8.449999999999999 + 818.5 + 75.0; return (double)(a1 - 100) * 5.26 + 292.5 + 45.0; }
func0: ENDBR64 CMP EDI,0x31 JG 0x00101170 PXOR XMM0,XMM0 MOVSD XMM1,qword ptr [0x00102008] CVTSI2SD XMM0,EDI MULSD XMM0,qword ptr [0x00102028] ADDSD XMM0,XMM1 RET LAB_00101170: CMP EDI,0x64 JG 0x001011a0 SUB EDI,0x32 PXOR XMM0,XMM0 MOVSD XMM1,qword ptr [0x00102010] CVTSI2SD XMM0,EDI MULSD XMM0,qword ptr [0x00102030] AD...
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* func0(int) */ double func0(int param_1) { if (param_1 < 0x32) { return (double)param_1 * _DAT_00102028 + DAT_00102008; } if (param_1 < 0x65) { return (double)(param_1 + -0x32) * _DAT_00102030 + _DAT_00102038 + DAT_00...
544
func0
#include <cassert> #include <vector> #include <cmath>
double func0(const std::vector<int>& nums) { int n = nums.size(); int n1 = 0; for (int x : nums) { if (x == 0) { n1 += 1; } } return round(static_cast<double>(n1) / n * 100.0) / 100.0; }
int main() { assert(func0({0, 1, 2, -1, -5, 6, 0, -3, -2, 3, 4, 6, 8}) == 0.15); assert(func0({2, 1, 2, -1, -5, 6, 4, -3, -2, 3, 4, 6, 8}) == 0.00); assert(func0({2, 4, -6, -9, 11, -12, 14, -5, 17}) == 0.00); return 0; }
O0
cpp
func0(std::vector<int, std::allocator<int> > const&): endbr64 push %rbp mov %rsp,%rbp sub $0x40,%rsp mov %rdi,-0x38(%rbp) mov %fs:0x28,%rax mov %rax,-0x8(%rbp) xor %eax,%eax mov -0x38(%rbp),%rax mov %rax,%rdi callq 16de <_ZNKSt6vectorIiSaIiEE4sizeEv> mov %eax,-0x28(%rbp) movl $0x0,-0x2c(...
_Z5func0RKSt6vectorIiSaIiEE: endbr64 push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_38], rdi mov rax, fs:28h mov [rbp+var_8], rax xor eax, eax mov rax, [rbp+var_38] mov rdi, rax call _ZNKSt6vectorIiSaIiEE4sizeEv; std::vector<int>::size(void) mov [rbp+var_28], eax mov [rbp+...
unsigned long long func0(long long a1) { int v2; // [rsp+14h] [rbp-2Ch] int v3; // [rsp+18h] [rbp-28h] long long v4; // [rsp+20h] [rbp-20h] BYREF _QWORD v5[2]; // [rsp+28h] [rbp-18h] BYREF unsigned long long v6; // [rsp+38h] [rbp-8h] v6 = __readfsqword(0x28u); v3 = std::vector<int>::size(a1); v2 = 0; ...
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 RAX,qword ptr [RBP + -0x38] MOV RDI,RAX CALL 0x00101790 MOV dword ptr [RBP + -0x28],EAX MOV dword ptr [RBP + -0x2c],0x0 MOV RAX,qword ptr [RBP + -0x38] MOV qword pt...
/* func0(std::vector<int, std::allocator<int> > const&) */ double func0(vector *param_1) { bool bVar1; int iVar2; int *piVar3; long in_FS_OFFSET; double dVar4; int local_34; int8 local_28; int8 local_20; vector<int,std::allocator<int>> *local_18; long local_10; local_10 = *(long *)(in_FS_OFFS...
545
func0
#include <cassert> #include <vector> #include <cmath>
double func0(const std::vector<int>& nums) { int n = nums.size(); int n1 = 0; for (int x : nums) { if (x == 0) { n1 += 1; } } return round(static_cast<double>(n1) / n * 100.0) / 100.0; }
int main() { assert(func0({0, 1, 2, -1, -5, 6, 0, -3, -2, 3, 4, 6, 8}) == 0.15); assert(func0({2, 1, 2, -1, -5, 6, 4, -3, -2, 3, 4, 6, 8}) == 0.00); assert(func0({2, 4, -6, -9, 11, -12, 14, -5, 17}) == 0.00); return 0; }
O1
cpp
func0(std::vector<int, std::allocator<int> > const&): endbr64 sub $0x8,%rsp mov 0x8(%rdi),%rcx mov (%rdi),%rax mov %rcx,%rsi sub %rax,%rsi sar $0x2,%rsi cmp %rax,%rcx je 1289 <_Z5func0RKSt6vectorIiSaIiEE+0x60> mov $0x0,%edx cmpl $0x1,(%rax) adc $0x0,%edx add $0x4,%rax cmp %rax,%rc...
_Z5func0RKSt6vectorIiSaIiEE: endbr64 sub rsp, 8 mov rcx, [rdi+8] mov rax, [rdi] mov rsi, rcx sub rsi, rax sar rsi, 2 cmp rcx, rax jz short loc_1289 mov edx, 0 loc_124C: cmp dword ptr [rax], 1 adc edx, 0 add rax, 4 cmp rax, rcx jnz short loc_124C loc_125B: pxor ...
double func0(long long a1) { _DWORD *v1; // rcx _DWORD *v2; // rax int v3; // edx v1 = *(_DWORD **)(a1 + 8); v2 = *(_DWORD **)a1; if ( v1 == *(_DWORD **)a1 ) { v3 = 0; } else { v3 = 0; do v3 += *v2++ == 0; while ( v2 != v1 ); } return round((double)v3 / (double)(int)(((lo...
func0: ENDBR64 SUB RSP,0x8 MOV RCX,qword ptr [RDI + 0x8] MOV RAX,qword ptr [RDI] MOV RSI,RCX SUB RSI,RAX SAR RSI,0x2 CMP RCX,RAX JZ 0x00101289 MOV EDX,0x0 LAB_0010124c: CMP dword ptr [RAX],0x1 ADC EDX,0x0 ADD RAX,0x4 CMP RAX,RCX JNZ 0x0010124c LAB_0010125b: PXOR XMM0,XMM0 CVTSI2SD XMM0,EDX PXOR XMM1,XMM1 CVTSI2SD XMM1,...
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* func0(std::vector<int, std::allocator<int> > const&) */ double func0(vector *param_1) { int *piVar1; int *piVar2; int iVar3; long lVar4; double dVar5; piVar1 = *(int **)(param_1 + 8); piVar2 = *(int **)param_1; ...
546
func0
#include <cassert> #include <vector> #include <cmath>
double func0(const std::vector<int>& nums) { int n = nums.size(); int n1 = 0; for (int x : nums) { if (x == 0) { n1 += 1; } } return round(static_cast<double>(n1) / n * 100.0) / 100.0; }
int main() { assert(func0({0, 1, 2, -1, -5, 6, 0, -3, -2, 3, 4, 6, 8}) == 0.15); assert(func0({2, 1, 2, -1, -5, 6, 4, -3, -2, 3, 4, 6, 8}) == 0.00); assert(func0({2, 4, -6, -9, 11, -12, 14, -5, 17}) == 0.00); return 0; }
O2
cpp
func0(std::vector<int, std::allocator<int> > const&): endbr64 sub $0x8,%rsp mov 0x8(%rdi),%rcx mov (%rdi),%rax mov %rcx,%rsi sub %rax,%rsi sar $0x2,%rsi cmp %rcx,%rax je 1500 <_Z5func0RKSt6vectorIiSaIiEE+0x60> xor %edx,%edx cmpl $0x1,(%rax) adc $0x0,%edx add $0x4,%rax cmp %rax,%rc...
_Z5func0RKSt6vectorIiSaIiEE: endbr64 sub rsp, 8 mov rcx, [rdi+8] mov rax, [rdi] mov rsi, rcx sub rsi, rax sar rsi, 2 cmp rcx, rax jz short loc_1460 xor edx, edx loc_1420: cmp dword ptr [rax], 1 adc edx, 0 add rax, 4 cmp rax, rcx jnz short loc_1420 pxor xmm0, x...
double func0(long long a1) { _DWORD *v1; // rcx _DWORD *v2; // rax int v3; // edx double v4; // xmm0_8 v1 = *(_DWORD **)(a1 + 8); v2 = *(_DWORD **)a1; if ( v1 == *(_DWORD **)a1 ) { v4 = 0.0; } else { v3 = 0; do v3 += *v2++ == 0; while ( v2 != v1 ); v4 = (double)v3; } ...
func0: ENDBR64 SUB RSP,0x8 MOV RCX,qword ptr [RDI + 0x8] MOV RAX,qword ptr [RDI] MOV RSI,RCX SUB RSI,RAX SAR RSI,0x2 CMP RCX,RAX JZ 0x00101460 XOR EDX,EDX LAB_00101420: CMP dword ptr [RAX],0x1 ADC EDX,0x0 ADD RAX,0x4 CMP RAX,RCX JNZ 0x00101420 PXOR XMM0,XMM0 CVTSI2SD XMM0,EDX LAB_00101437: PXOR XMM1,XMM1 CVTSI2SD XMM1,...
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* func0(std::vector<int, std::allocator<int> > const&) */ double func0(vector *param_1) { int *piVar1; int *piVar2; int iVar3; long lVar4; double dVar5; piVar1 = *(int **)(param_1 + 8); piVar2 = *(int **)param_1; ...
547
func0
#include <cassert> #include <vector> #include <cmath>
double func0(const std::vector<int>& nums) { int n = nums.size(); int n1 = 0; for (int x : nums) { if (x == 0) { n1 += 1; } } return round(static_cast<double>(n1) / n * 100.0) / 100.0; }
int main() { assert(func0({0, 1, 2, -1, -5, 6, 0, -3, -2, 3, 4, 6, 8}) == 0.15); assert(func0({2, 1, 2, -1, -5, 6, 4, -3, -2, 3, 4, 6, 8}) == 0.00); assert(func0({2, 4, -6, -9, 11, -12, 14, -5, 17}) == 0.00); return 0; }
O3
cpp
func0(std::vector<int, std::allocator<int> > const&): endbr64 sub $0x8,%rsp mov 0x8(%rdi),%r8 mov (%rdi),%rdx mov %r8,%rsi sub %rdx,%rsi sar $0x2,%rsi cmp %r8,%rdx je 1520 <_Z5func0RKSt6vectorIiSaIiEE+0x110> lea -0x4(%r8),%rcx mov %rdx,%rax movabs $0x3ffffffffffffffc,%r9 sub %rdx,%rcx ...
_Z5func0RKSt6vectorIiSaIiEE: endbr64 sub rsp, 8 mov r8, [rdi+8] mov rdx, [rdi] mov rdi, r8 sub rdi, rdx sar rdi, 2 cmp r8, rdx jz loc_1500 lea rcx, [r8-4] mov rax, rdx sub rcx, rdx mov rsi, rcx shr rsi, 2 add rsi, 1 cmp rcx, 8 jbe loc_1506 mov rcx, rs...
double func0(const __m128i **a1) { const __m128i *v1; // r8 const __m128i *v2; // rdx long long v3; // rdi const __m128i *v4; // rax unsigned long long v5; // rsi __m128i v6; // xmm0 __m128i v7; // xmm1 __m128i v8; // xmm0 int v9; // eax double v10; // xmm0_8 v1 = a1[1]; v2 = *a1; v3 = ((cha...
func0: ENDBR64 SUB RSP,0x8 MOV R8,qword ptr [RDI + 0x8] MOV RDX,qword ptr [RDI] MOV RDI,R8 SUB RDI,RDX SAR RDI,0x2 CMP R8,RDX JZ 0x00101500 LEA RCX,[R8 + -0x4] MOV RAX,RDX SUB RCX,RDX MOV RSI,RCX SHR RSI,0x2 ADD RSI,0x1 CMP RCX,0x8 JBE 0x00101506 MOV RCX,RSI PXOR XMM0,XMM0 SHR RCX,0x2 MOVDQA XMM2,XMM0 SHL RCX,0x4 ADD R...
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* func0(std::vector<int, std::allocator<int> > const&) */ double func0(vector *param_1) { int *piVar1; int iVar2; int *piVar3; int *piVar4; int *piVar5; int *piVar6; ulong uVar7; int *piVar8; ulong uVar9; long lV...
548
func0
#include <assert.h>
bool func0(int n) { if (n % 2 == 1) { return false; } else { return true; } }
int main() { assert(func0(10) == true); assert(func0(7) == false); assert(func0(14) == true); return 0; }
O0
cpp
func0(int): endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x4(%rbp) mov -0x4(%rbp),%eax cltd shr $0x1f,%edx add %edx,%eax and $0x1,%eax sub %edx,%eax cmp $0x1,%eax jne 116e <_Z5func0i+0x25> mov $0x0,%eax jmp 1173 <_Z5func0i+0x2a> mov $0x1,%eax pop %rbp retq
_Z5func0i: endbr64 push rbp mov rbp, rsp mov [rbp+var_4], edi mov edx, [rbp+var_4] mov eax, edx sar eax, 1Fh shr eax, 1Fh add edx, eax and edx, 1 sub edx, eax mov eax, edx cmp eax, 1 jnz short loc_1174 mov eax, 0 jmp short loc_1179 loc_1174: mov eax, 1 loc_...
_BOOL8 func0(int a1) { return a1 % 2 != 1; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x4],EDI MOV EDX,dword ptr [RBP + -0x4] MOV EAX,EDX SAR EAX,0x1f SHR EAX,0x1f ADD EDX,EAX AND EDX,0x1 SUB EDX,EAX MOV EAX,EDX CMP EAX,0x1 JNZ 0x00101174 MOV EAX,0x0 JMP 0x00101179 LAB_00101174: MOV EAX,0x1 LAB_00101179: POP RBP RET
/* func0(int) */ bool func0(int param_1) { return param_1 % 2 != 1; }
549
func0
#include <assert.h>
bool func0(int n) { if (n % 2 == 1) { return false; } else { return true; } }
int main() { assert(func0(10) == true); assert(func0(7) == false); assert(func0(14) == true); return 0; }
O1
cpp
func0(int): endbr64 mov %edi,%eax shr $0x1f,%eax add %eax,%edi and $0x1,%edi sub %eax,%edi cmp $0x1,%edi setne %al retq
_Z5func0i: endbr64 mov eax, edi shr eax, 1Fh add edi, eax and edi, 1 sub edi, eax cmp edi, 1 setnz al retn
bool func0(int a1) { return a1 % 2 != 1; }
func0: ENDBR64 MOV EAX,EDI SHR EAX,0x1f ADD EDI,EAX AND EDI,0x1 SUB EDI,EAX CMP EDI,0x1 SETNZ AL RET
/* func0(int) */ bool func0(int param_1) { return param_1 % 2 != 1; }
550
func0
#include <assert.h>
bool func0(int n) { if (n % 2 == 1) { return false; } else { return true; } }
int main() { assert(func0(10) == true); assert(func0(7) == false); assert(func0(14) == true); return 0; }
O2
cpp
func0(int): endbr64 mov %edi,%eax shr $0x1f,%eax add %eax,%edi and $0x1,%edi sub %eax,%edi cmp $0x1,%edi setne %al retq nopw 0x0(%rax,%rax,1)
_Z5func0i: endbr64 mov eax, edi shr eax, 1Fh add edi, eax and edi, 1 sub edi, eax cmp edi, 1 setnz al retn
bool func0(int a1) { return a1 % 2 != 1; }
func0: ENDBR64 MOV EAX,EDI SHR EAX,0x1f ADD EDI,EAX AND EDI,0x1 SUB EDI,EAX CMP EDI,0x1 SETNZ AL RET
/* func0(int) */ bool func0(int param_1) { return param_1 % 2 != 1; }
551
func0
#include <assert.h>
bool func0(int n) { if (n % 2 == 1) { return false; } else { return true; } }
int main() { assert(func0(10) == true); assert(func0(7) == false); assert(func0(14) == true); return 0; }
O3
cpp
func0(int): endbr64 mov %edi,%eax shr $0x1f,%eax add %eax,%edi and $0x1,%edi sub %eax,%edi cmp $0x1,%edi setne %al retq nopw 0x0(%rax,%rax,1)
_Z5func0i: endbr64 mov eax, edi shr eax, 1Fh add edi, eax and edi, 1 sub edi, eax cmp edi, 1 setnz al retn
bool func0(int a1) { return a1 % 2 != 1; }
func0: ENDBR64 MOV EAX,EDI SHR EAX,0x1f ADD EDI,EAX AND EDI,0x1 SUB EDI,EAX CMP EDI,0x1 SETNZ AL RET
/* func0(int) */ bool func0(int param_1) { return param_1 % 2 != 1; }
552
func0
#include <assert.h>
double func0(double r) { double perimeter = 2 * 3.1415 * r; return perimeter; }
int main() { assert(func0(10) == 62.830000000000005); assert(func0(5) == 31.415000000000003); assert(func0(4) == 25.132); return 0; }
O0
cpp
func0(double): endbr64 push %rbp mov %rsp,%rbp movsd %xmm0,-0x18(%rbp) movsd -0x18(%rbp),%xmm1 movsd 0xf55(%rip),%xmm0 mulsd %xmm1,%xmm0 movsd %xmm0,-0x8(%rbp) movsd -0x8(%rbp),%xmm0 pop %rbp retq
_Z5func0d: endbr64 push rbp mov rbp, rsp movsd [rbp+var_18], xmm0 movsd xmm1, [rbp+var_18] movsd xmm0, cs:qword_2098 mulsd xmm0, xmm1 movsd [rbp+var_8], xmm0 movsd xmm0, [rbp+var_8] pop rbp retn
double func0(double a1) { return 6.283 * a1; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOVSD qword ptr [RBP + -0x18],XMM0 MOVSD XMM1,qword ptr [RBP + -0x18] MOVSD XMM0,qword ptr [0x00102098] MULSD XMM0,XMM1 MOVSD qword ptr [RBP + -0x8],XMM0 MOVSD XMM0,qword ptr [RBP + -0x8] POP RBP RET
/* func0(double) */ double func0(double param_1) { return DAT_00102098 * param_1; }
553
func0
#include <assert.h>
double func0(double r) { double perimeter = 2 * 3.1415 * r; return perimeter; }
int main() { assert(func0(10) == 62.830000000000005); assert(func0(5) == 31.415000000000003); assert(func0(4) == 25.132); return 0; }
O1
cpp
func0(double): endbr64 mulsd 0xed3(%rip),%xmm0 retq
_Z5func0d: endbr64 mulsd xmm0, cs:qword_2008 retn
double func0(double a1) { return a1 * 6.283; }
func0: ENDBR64 MULSD XMM0,qword ptr [0x00102008] RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* func0(double) */ double func0(double param_1) { return param_1 * _DAT_00102008; }
554
func0
#include <assert.h>
double func0(double r) { double perimeter = 2 * 3.1415 * r; return perimeter; }
int main() { assert(func0(10) == 62.830000000000005); assert(func0(5) == 31.415000000000003); assert(func0(4) == 25.132); return 0; }
O2
cpp
func0(double): endbr64 mulsd 0xebc(%rip),%xmm0 retq nopl (%rax)
_Z5func0d: endbr64 mulsd xmm0, cs:qword_2008 retn
double func0(double a1) { return a1 * 6.283; }
func0: ENDBR64 MULSD XMM0,qword ptr [0x00102008] RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* func0(double) */ double func0(double param_1) { return param_1 * _DAT_00102008; }
555
func0
#include <assert.h>
double func0(double r) { double perimeter = 2 * 3.1415 * r; return perimeter; }
int main() { assert(func0(10) == 62.830000000000005); assert(func0(5) == 31.415000000000003); assert(func0(4) == 25.132); return 0; }
O3
cpp
func0(double): endbr64 mulsd 0xebc(%rip),%xmm0 retq nopl (%rax)
_Z5func0d: endbr64 mulsd xmm0, cs:qword_2008 retn
double func0(double a1) { return a1 * 6.283; }
func0: ENDBR64 MULSD XMM0,qword ptr [0x00102008] RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* func0(double) */ double func0(double param_1) { return param_1 * _DAT_00102008; }
556
func0
#include <vector> #include <set> #include <cassert>
std::vector<int> func0(const std::vector<std::vector<int>>& test_list) { std::vector<int> res; std::set<int> temp; for (const auto& inner : test_list) { for (int ele : inner) { if (temp.find(ele) == temp.end()) { temp.insert(ele); res.push_back(ele)...
int main() { assert((func0({{3, 4, 5}, {4, 5, 7}, {1, 4}}) == std::vector<int>{3, 4, 5, 7, 1})); assert((func0({{1, 2, 3}, {4, 2, 3}, {7, 8}}) == std::vector<int>{1, 2, 3, 4, 7, 8})); assert((func0({{7, 8, 9}, {10, 11, 12}, {10, 11}}) == std::vector<int>{7, 8, 9, 10, 11, 12})); return 0; }
O0
cpp
func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0xa8,%rsp mov %rdi,-0xa8(%rbp) mov %rsi,-0xb0(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax mov -0xa8(%rbp)...
_Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EE: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 0A8h mov [rbp+var_A8], rdi mov [rbp+var_B0], rsi mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax mov rax, [rbp+var_A8] mov rdi, rax call _ZNSt6vectorIiSaIiEEC2Ev; std::vector<int>::vec...
long long func0(long long a1, long long a2) { int v3; // [rsp+14h] [rbp-9Ch] BYREF long long v4; // [rsp+18h] [rbp-98h] BYREF long long v5; // [rsp+20h] [rbp-90h] BYREF long long v6; // [rsp+28h] [rbp-88h] BYREF long long v7; // [rsp+30h] [rbp-80h] BYREF long long v8; // [rsp+38h] [rbp-78h] BYREF _QWORD ...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0xa8 MOV qword ptr [RBP + -0xa8],RDI MOV qword ptr [RBP + -0xb0],RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX MOV RAX,qword ptr [RBP + -0xa8] MOV RDI,RAX CALL 0x001022d6 LEA RAX,[RBP + -0x50] MOV RDI,RAX CALL 0x0010233e MOV RAX,qword pt...
/* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&) */ vector * func0(vector *param_1) { char cVar1; bool bVar2; int *piVar3; vector<std::vector<int,std::allocator<int>>,std::allocator<std::vector<int,std::allocator<int>>>> *in_RS...
557
func0
#include <vector> #include <set> #include <cassert>
std::vector<int> func0(const std::vector<std::vector<int>>& test_list) { std::vector<int> res; std::set<int> temp; for (const auto& inner : test_list) { for (int ele : inner) { if (temp.find(ele) == temp.end()) { temp.insert(ele); res.push_back(ele)...
int main() { assert((func0({{3, 4, 5}, {4, 5, 7}, {1, 4}}) == std::vector<int>{3, 4, 5, 7, 1})); assert((func0({{1, 2, 3}, {4, 2, 3}, {7, 8}}) == std::vector<int>{1, 2, 3, 4, 7, 8})); assert((func0({{7, 8, 9}, {10, 11, 12}, {10, 11}}) == std::vector<int>{7, 8, 9, 10, 11, 12})); return 0; }
O1
cpp
func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&): endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x58,%rsp mov %rdi,%r12 mov %fs:0x28,%rax mov %rax,0x48(%rsp) xor %eax,%eax movq $0x0,(%rdi) ...
_Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EE: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 68h mov r13, rdi mov rdx, fs:28h mov [rsp+98h+var_40], rdx xor edx, edx mov qword ptr [rdi], 0 mov qword ptr [rdi+8], 0 mov qword ptr [rdi+10h], 0 mov [rsp...
_QWORD * func0(_QWORD *a1, int ***a2) { int **v2; // r14 long long v3; // rax int *v4; // rdx int *v5; // rbp int v6; // ebx _DWORD *v7; // rsi int *v8; // r12 int **v10; // [rsp+8h] [rbp-90h] int v11; // [rsp+1Ch] [rbp-7Ch] BYREF _BYTE v12[8]; // [rsp+20h] [rbp-78h] BYREF int v13; // [rsp+28h] [r...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x68 MOV R13,RDI MOV RDX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x58],RDX XOR EDX,EDX MOV qword ptr [RDI],0x0 MOV qword ptr [RDI + 0x8],0x0 MOV qword ptr [RDI + 0x10],0x0 MOV dword ptr [RSP + 0x28],0x0 MOV qword ptr [RSP + 0x30],0x0 LEA RDX,...
/* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&) */ vector * func0(vector *param_1) { int iVar1; int8 *puVar2; int *piVar3; int *piVar4; _Rb_tree_node *p_Var5; _Rb_tree_node *p_Var6; _Rb_tree_node *p_Var7; int *piVar8; ...
558
func0
#include <vector> #include <set> #include <cassert>
std::vector<int> func0(const std::vector<std::vector<int>>& test_list) { std::vector<int> res; std::set<int> temp; for (const auto& inner : test_list) { for (int ele : inner) { if (temp.find(ele) == temp.end()) { temp.insert(ele); res.push_back(ele)...
int main() { assert((func0({{3, 4, 5}, {4, 5, 7}, {1, 4}}) == std::vector<int>{3, 4, 5, 7, 1})); assert((func0({{1, 2, 3}, {4, 2, 3}, {7, 8}}) == std::vector<int>{1, 2, 3, 4, 7, 8})); assert((func0({{7, 8, 9}, {10, 11, 12}, {10, 11}}) == std::vector<int>{7, 8, 9, 10, 11, 12})); return 0; }
O2
cpp
func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&): endbr64 push %r15 mov %rsi,%rax mov %rdi,%r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x78,%rsp mov (%rax),%rdx mov 0x8(%rax),%rax mov %fs:0x28,%rsi m...
_Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EE: endbr64 push r15 pxor xmm0, xmm0 push r14 push r13 push r12 push rbp push rbx sub rsp, 78h mov r15, [rsi] mov [rsp+0A8h+var_A0], rdi lea r13, [rsp+0A8h+var_70] mov rax, fs:28h mov [rsp+0A8h+var_40], rax xor eax, eax mov rax, [r...
long long func0(long long a1, int ***a2) { int **v2; // r15 int **v3; // rax int *v4; // rbp int *v5; // r12 int *v6; // r14 int v7; // ebx int *v8; // rax int *v9; // rsi long long v10; // rdx long long v11; // rcx int v12; // edx int *v13; // rax long long v14; // rax _DWORD *v15; // rsi ...
func0: ENDBR64 PUSH R15 PXOR XMM0,XMM0 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x78 MOV R15,qword ptr [RSI] MOV qword ptr [RSP + 0x8],RDI LEA R13,[RSP + 0x38] MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x68],RAX XOR EAX,EAX MOV RAX,qword ptr [RSI + 0x8] MOV qword ptr [RDI + 0x10],0x0 MOV dword ptr [R...
/* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&) */ vector * func0(vector *param_1) { int8 *puVar1; int *piVar2; int *piVar3; _Rb_tree_node_base *p_Var4; _Rb_tree_node_base *p_Var5; long lVar6; int iVar7; int iVar8; _Rb...
559
func0
#include <vector> #include <set> #include <cassert>
std::vector<int> func0(const std::vector<std::vector<int>>& test_list) { std::vector<int> res; std::set<int> temp; for (const auto& inner : test_list) { for (int ele : inner) { if (temp.find(ele) == temp.end()) { temp.insert(ele); res.push_back(ele)...
int main() { assert((func0({{3, 4, 5}, {4, 5, 7}, {1, 4}}) == std::vector<int>{3, 4, 5, 7, 1})); assert((func0({{1, 2, 3}, {4, 2, 3}, {7, 8}}) == std::vector<int>{1, 2, 3, 4, 7, 8})); assert((func0({{7, 8, 9}, {10, 11, 12}, {10, 11}}) == std::vector<int>{7, 8, 9, 10, 11, 12})); return 0; }
O3
cpp
func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&): endbr64 push %r15 mov %rsi,%rax pxor %xmm0,%xmm0 mov %rdi,%r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x78,%rsp mov %fs:0x28,%rsi mov %rsi,0x68(%rsp) ...
_Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EE: endbr64 push r15 pxor xmm0, xmm0 push r14 push r13 push r12 push rbp push rbx sub rsp, 78h mov r15, [rsi] mov [rsp+0A8h+var_A0], rdi lea r13, [rsp+0A8h+var_70] mov rax, fs:28h mov [rsp+0A8h+var_40], rax xor eax, eax mov rax, [r...
long long func0(long long a1, int ***a2) { int **v2; // r15 int **v3; // rax int *v4; // rbp int *v5; // r12 int *v6; // r14 int v7; // ebx int *v8; // rax int *v9; // rsi int *v10; // rcx long long v11; // rdx int v12; // edx int *v13; // rax long long v14; // rax _DWORD *v15; // rsi int...
func0: ENDBR64 PUSH R15 PXOR XMM0,XMM0 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x78 MOV R15,qword ptr [RSI] MOV qword ptr [RSP + 0x8],RDI LEA R13,[RSP + 0x38] MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x68],RAX XOR EAX,EAX MOV RAX,qword ptr [RSI + 0x8] MOV qword ptr [RDI + 0x10],0x0 MOV dword ptr [R...
/* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&) */ vector * func0(vector *param_1) { int8 *puVar1; int *piVar2; int *piVar3; _Rb_tree_node_base *p_Var4; _Rb_tree_node_base *p_Var5; _Rb_tree_node_base *p_Var6; _Rb_tree_node...
560
func0
#include <vector> #include <algorithm> #include <assert.h>
std::vector<int> func0(std::vector<int>& nums) { int arr_len = nums.size(); while (arr_len > 1) { int mi = std::distance(nums.begin(), std::max_element(nums.begin(), nums.begin() + arr_len)); std::reverse(nums.begin(), nums.begin() + mi + 1); std::reverse(nums.begin(), nums.begin() ...
int main() { std::vector<int> nums1 = {15, 79, 25, 38, 69}; assert(func0(nums1) == std::vector<int>({15, 25, 38, 69, 79})); std::vector<int> nums2 = {98, 12, 54, 36, 85}; assert(func0(nums2) == std::vector<int>({12, 36, 54, 85, 98})); std::vector<int> nums3 = {41, 42, 32, 12, 23}; asse...
O0
cpp
func0(std::vector<int, std::allocator<int> >&): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x38,%rsp mov %rdi,-0x38(%rbp) mov %rsi,-0x40(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax mov -0x40(%rbp),%rax mov %rax,%rdi callq 1a04 <_ZNKSt6vectorIiSaIiEE4sizeEv> mov %eax...
_Z5func0RSt6vectorIiSaIiEE: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 58h mov [rbp+var_58], rdi mov [rbp+var_60], rsi mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax mov rax, [rbp+var_60] mov rdi, rax call _ZNKSt6vectorIiSaIiEE4sizeEv; std::vector<int>::size(void) m...
long long func0(long long a1, long long a2) { long long v2; // rbx long long v3; // rax long long v4; // rbx long long v5; // rbx long long v6; // rbx long long v7; // rax long long v8; // rbx long long v9; // rax int i; // [rsp+18h] [rbp-48h] long long v12; // [rsp+20h] [rbp-40h] BYREF long long...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x58 MOV qword ptr [RBP + -0x58],RDI MOV qword ptr [RBP + -0x60],RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX MOV RAX,qword ptr [RBP + -0x60] MOV RDI,RAX CALL 0x00101a4c MOV dword ptr [RBP + -0x48],EAX JMP 0x001013b7 LAB_001012a1: MOV E...
/* func0(std::vector<int, std::allocator<int> >&) */ vector * func0(vector *param_1) { __normal_iterator _Var1; __normal_iterator _Var2; difference_type dVar3; int4 extraout_var; vector<int,std::allocator<int>> *in_RSI; long in_FS_OFFSET; int local_50; int8 local_48; int8 local_40; int8 local_38; ...
561
func0
#include <vector> #include <algorithm> #include <assert.h>
std::vector<int> func0(std::vector<int>& nums) { int arr_len = nums.size(); while (arr_len > 1) { int mi = std::distance(nums.begin(), std::max_element(nums.begin(), nums.begin() + arr_len)); std::reverse(nums.begin(), nums.begin() + mi + 1); std::reverse(nums.begin(), nums.begin() ...
int main() { std::vector<int> nums1 = {15, 79, 25, 38, 69}; assert(func0(nums1) == std::vector<int>({15, 25, 38, 69, 79})); std::vector<int> nums2 = {98, 12, 54, 36, 85}; assert(func0(nums2) == std::vector<int>({12, 36, 54, 85, 98})); std::vector<int> nums3 = {41, 42, 32, 12, 23}; asse...
O1
cpp
func0(std::vector<int, std::allocator<int> >&): endbr64 push %r13 push %r12 push %rbp push %rbx sub $0x8,%rsp mov %rdi,%r13 mov %rsi,%rbp mov 0x8(%rsi),%rax sub (%rsi),%rax sar $0x2,%rax cmp $0x1,%eax jle 12fd <_Z5func0RSt6vectorIiSaIiEE+0x94> movslq %eax,%r12 lea 0x0(,%r12,4),%rbx le...
_Z5func0RSt6vectorIiSaIiEE: endbr64 push r13 push r12 push rbp push rbx sub rsp, 8 mov r13, rdi mov rbp, rsi mov rax, [rsi+8] sub rax, [rsi] sar rax, 2 cmp eax, 1 jle short loc_12FB movsxd r12, eax lea rbx, ds:0[r12*4] lea eax, [rax-2] sub r12, rax shl r12, 2...
_QWORD * func0(_QWORD *a1, _QWORD *a2) { long long v3; // rax long long v4; // rbx unsigned long long v5; // r12 _DWORD *v6; // rdx _DWORD *v7; // rcx _DWORD *v8; // rax unsigned long long v9; // r12 _DWORD *v10; // rbx _DWORD *v11; // rsi signed long long v12; // rbp v3 = (long long)(a2[1] - *a2...
func0: ENDBR64 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x8 MOV R13,RDI MOV RBP,RSI MOV RAX,qword ptr [RSI + 0x8] SUB RAX,qword ptr [RSI] SAR RAX,0x2 CMP EAX,0x1 JLE 0x001012fb MOVSXD R12,EAX LEA RBX,[R12*0x4] LEA EAX,[RAX + -0x2] SUB R12,RAX SHL R12,0x2 JMP 0x001012d4 LAB_001012a4: MOV RDX,RDI LAB_001012a7: SUB RDX...
/* func0(std::vector<int, std::allocator<int> >&) */ vector * func0(vector *param_1) { int *piVar1; int4 *__src; int *piVar2; int *piVar3; int iVar4; int4 *__dest; random_access_iterator_tag rVar5; random_access_iterator_tag extraout_EDX; long lVar6; size_t __n; long *in_RSI; ulong uVar7; bo...
562
func0
#include <vector> #include <algorithm> #include <assert.h>
std::vector<int> func0(std::vector<int>& nums) { int arr_len = nums.size(); while (arr_len > 1) { int mi = std::distance(nums.begin(), std::max_element(nums.begin(), nums.begin() + arr_len)); std::reverse(nums.begin(), nums.begin() + mi + 1); std::reverse(nums.begin(), nums.begin() ...
int main() { std::vector<int> nums1 = {15, 79, 25, 38, 69}; assert(func0(nums1) == std::vector<int>({15, 25, 38, 69, 79})); std::vector<int> nums2 = {98, 12, 54, 36, 85}; assert(func0(nums2) == std::vector<int>({12, 36, 54, 85, 98})); std::vector<int> nums3 = {41, 42, 32, 12, 23}; asse...
O2
cpp
func0(std::vector<int, std::allocator<int> >&): endbr64 push %r14 push %r12 mov %rdi,%r12 push %rbp push %rbx mov %rsi,%rbx sub $0x8,%rsp mov (%rsi),%rdi mov 0x8(%rsi),%rbp sub %rdi,%rbp mov %rbp,%rsi sar $0x2,%rsi cmp $0x1,%esi jle 178c <_Z5func0RSt6vectorIiSaIiEE+0xec> movslq %es...
_Z5func0RSt6vectorIiSaIiEE: endbr64 push r12 push rbp mov rbp, rsi push rbx mov rsi, [rsi] mov rbx, rdi mov r10, [rbp+8] sub r10, rsi mov rdx, r10 sar rdx, 2 cmp edx, 1 jle loc_1779 movsxd rax, edx lea r8, [rsi+4] shl rax, 2 lea rdi, [rsi+rax-4] lea rcx, [rs...
long long func0(long long a1, int **a2) { int *v3; // rsi signed long long v5; // r10 long long v6; // rdx long long v7; // rax long long v8; // rdi int *v9; // rcx long long v10; // r9 int *v11; // rax int *v12; // rdx int *v13; // rax int *v14; // rdx int v15; // r11d int v16; // r12d int...
func0: ENDBR64 PUSH R12 PUSH RBP MOV RBP,RSI PUSH RBX MOV RSI,qword ptr [RSI] MOV RBX,RDI MOV R10,qword ptr [RBP + 0x8] SUB R10,RSI MOV RDX,R10 SAR RDX,0x2 CMP EDX,0x1 JLE 0x00101779 MOVSXD RAX,EDX LEA R8,[RSI + 0x4] SHL RAX,0x2 LEA RDI,[RSI + RAX*0x1 + -0x4] LEA RCX,[RSI + RAX*0x1] LEA EAX,[RDX + -0x2] MOV R9,RDI SHL ...
/* func0(std::vector<int, std::allocator<int> >&) */ vector * func0(vector *param_1) { int *piVar1; int *piVar2; int4 *__src; int *piVar3; int *piVar4; int4 *__dest; int *piVar5; int iVar6; int *piVar7; int *piVar8; size_t __n; int8 *in_RSI; int *piVar9; int *piVar10; ulong uVar11; ...
563
func0
#include <vector> #include <algorithm> #include <assert.h>
std::vector<int> func0(std::vector<int>& nums) { int arr_len = nums.size(); while (arr_len > 1) { int mi = std::distance(nums.begin(), std::max_element(nums.begin(), nums.begin() + arr_len)); std::reverse(nums.begin(), nums.begin() + mi + 1); std::reverse(nums.begin(), nums.begin() ...
int main() { std::vector<int> nums1 = {15, 79, 25, 38, 69}; assert(func0(nums1) == std::vector<int>({15, 25, 38, 69, 79})); std::vector<int> nums2 = {98, 12, 54, 36, 85}; assert(func0(nums2) == std::vector<int>({12, 36, 54, 85, 98})); std::vector<int> nums3 = {41, 42, 32, 12, 23}; asse...
O3
cpp
func0(std::vector<int, std::allocator<int> >&): endbr64 push %r15 push %r14 push %r13 push %r12 mov %rdi,%r12 push %rbp push %rbx sub $0x28,%rsp mov (%rsi),%rcx mov 0x8(%rsi),%rax mov %rsi,0x18(%rsp) sub %rcx,%rax mov %rax,0x10(%rsp) sar $0x2,%rax mov %rax,0x8(%rsp) cmp $0x1,%e...
_Z5func0RSt6vectorIiSaIiEE: endbr64 push r15 push r14 push r13 mov r13, rdi push r12 mov r12, rsi push rbp push rbx sub rsp, 38h mov rsi, [rsi] mov rax, [r12+8] sub rax, rsi mov rcx, rax sar rcx, 2 cmp ecx, 1 jle loc_19FF movsxd rdx, ecx sub ecx, 2 mov ...
__m128i * func0(__m128i *a1, const __m128i **a2) { __m128i *v2; // r13 const __m128i **v3; // r12 const __m128i *v4; // rsi signed long long v5; // rax long long v6; // rcx long long v7; // r9 long long v8; // rbp const __m128i *v9; // rdi const __m128i *v10; // r10 unsigned long long v11; // r11 ...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 MOV R13,RDI PUSH R12 MOV R12,RSI PUSH RBP PUSH RBX SUB RSP,0x38 MOV RSI,qword ptr [RSI] MOV RAX,qword ptr [R12 + 0x8] SUB RAX,RSI MOV RCX,RAX SAR RCX,0x2 CMP ECX,0x1 JLE 0x001019ff MOVSXD RDX,ECX SUB ECX,0x2 MOV qword ptr [RSP + 0x18],RAX LEA R15,[RSI + 0x4] LEA R9,[RDX*0x4] SU...
/* func0(std::vector<int, std::allocator<int> >&) */ vector * func0(vector *param_1) { int8 uVar1; int8 uVar2; int *piVar3; int4 *__src; int iVar4; int iVar5; int iVar6; int iVar7; int iVar8; int iVar9; ulong uVar10; int *piVar11; int *piVar12; int4 *__dest; int iVar13; long lVar14; ...
564
func0
#include <vector> #include <assert.h>
int func0(const std::vector<int>& list1, const std::vector<int>& list2, const std::vector<int>& list3) { int result = 0; for (size_t i = 0; i < list1.size(); ++i) { if (list1[i] == list2[i] && list2[i] == list3[i]) { result++; } } return result; }
int main() { assert(func0({1,2,3,4,5,6,7,8},{2,2,3,1,2,6,7,9},{2,1,3,1,2,6,7,9}) == 3); assert(func0({1,2,3,4,5,6,7,8},{2,2,3,1,2,6,7,8},{2,1,3,1,2,6,7,8}) == 4); assert(func0({1,2,3,4,2,6,7,8},{2,2,3,1,2,6,7,8},{2,1,3,1,2,6,7,8}) == 5); return 0; }
O0
cpp
func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x38,%rsp mov %rdi,-0x28(%rbp) mov %rsi,-0x30(%rbp) mov %rdx,-0x38(%rbp) movl $0x0,-0x1c(%rbp) movq $0...
_Z5func0RKSt6vectorIiSaIiEES3_S3_: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 38h mov [rbp+var_28], rdi mov [rbp+var_30], rsi mov [rbp+var_38], rdx mov [rbp+var_1C], 0 mov [rbp+var_18], 0 jmp short loc_12E8 loc_1273: mov rdx, [rbp+var_18] mov rax, [rbp+var_28] mov ...
long long func0(long long a1, long long a2, long long a3) { unsigned long long i; // rax int v4; // ebx int v5; // ebx unsigned int v9; // [rsp+24h] [rbp-1Ch] unsigned long long v10; // [rsp+28h] [rbp-18h] v9 = 0; v10 = 0LL; for ( i = std::vector<int>::size(a1); v10 < i; i = std::vector<int>::size(a1)...
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 qword ptr [RBP + -0x38],RDX MOV dword ptr [RBP + -0x1c],0x0 MOV qword ptr [RBP + -0x18],0x0 JMP 0x001012e8 LAB_00101273: MOV RDX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x28] MOV RSI,R...
/* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&) */ int func0(vector *param_1,vector *param_2,vector *param_3) { int iVar1; bool bVar2; int *piVar3; ulong uVar4; int4 local_24; int8 local_20; local...
565
func0
#include <vector> #include <assert.h>
int func0(const std::vector<int>& list1, const std::vector<int>& list2, const std::vector<int>& list3) { int result = 0; for (size_t i = 0; i < list1.size(); ++i) { if (list1[i] == list2[i] && list2[i] == list3[i]) { result++; } } return result; }
int main() { assert(func0({1,2,3,4,5,6,7,8},{2,2,3,1,2,6,7,9},{2,1,3,1,2,6,7,9}) == 3); assert(func0({1,2,3,4,5,6,7,8},{2,2,3,1,2,6,7,8},{2,1,3,1,2,6,7,8}) == 4); assert(func0({1,2,3,4,2,6,7,8},{2,2,3,1,2,6,7,8},{2,1,3,1,2,6,7,8}) == 5); return 0; }
O1
cpp
func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&): endbr64 mov %rsi,%rax mov (%rdi),%r8 mov 0x8(%rdi),%rsi sub %r8,%rsi mov %rsi,%rdi shr $0x2,%rdi je 1257 <_Z5func0RKSt6vectorIiSaIiEES3_S3_+0x4e> mov ...
_Z5func0RKSt6vectorIiSaIiEES3_S3_: endbr64 mov rax, [rdi+8] mov rdi, [rdi] mov r8, rax sub r8, rdi sar r8, 2 cmp rax, rdi jz short loc_1253 mov rsi, [rsi] mov eax, 0 mov r10d, 0 jmp short loc_123C loc_1233: add rax, 1 cmp rax, r8 jnb short loc_1259 loc_123C: mov ...
long long func0(long long *a1, long long *a2, _QWORD *a3) { long long v3; // rax long long v4; // rdi unsigned long long v5; // r8 long long v6; // rsi unsigned long long v7; // rax unsigned int v8; // r10d int v9; // ecx v3 = a1[1]; v4 = *a1; v5 = (v3 - v4) >> 2; if ( v3 == v4 ) { return ...
func0: ENDBR64 MOV RAX,qword ptr [RDI + 0x8] MOV RDI,qword ptr [RDI] MOV R8,RAX SUB R8,RDI SAR R8,0x2 CMP RAX,RDI JZ 0x00101253 MOV RSI,qword ptr [RSI] MOV EAX,0x0 MOV R10D,0x0 JMP 0x0010123c LAB_00101233: ADD RAX,0x1 CMP RAX,R8 JNC 0x00101259 LAB_0010123c: MOV ECX,dword ptr [RSI + RAX*0x4] CMP dword ptr [RDI + RAX*0x4...
/* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&) */ int func0(vector *param_1,vector *param_2,vector *param_3) { int iVar1; long lVar2; ulong uVar3; int iVar4; lVar2 = *(long *)param_1; if (*(long *)...
566
func0
#include <vector> #include <assert.h>
int func0(const std::vector<int>& list1, const std::vector<int>& list2, const std::vector<int>& list3) { int result = 0; for (size_t i = 0; i < list1.size(); ++i) { if (list1[i] == list2[i] && list2[i] == list3[i]) { result++; } } return result; }
int main() { assert(func0({1,2,3,4,5,6,7,8},{2,2,3,1,2,6,7,9},{2,1,3,1,2,6,7,9}) == 3); assert(func0({1,2,3,4,5,6,7,8},{2,2,3,1,2,6,7,8},{2,1,3,1,2,6,7,8}) == 4); assert(func0({1,2,3,4,2,6,7,8},{2,2,3,1,2,6,7,8},{2,1,3,1,2,6,7,8}) == 5); return 0; }
O2
cpp
func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&): endbr64 mov (%rdi),%r8 mov 0x8(%rdi),%rdi sub %r8,%rdi mov %rdi,%rax shr $0x2,%rax je 1890 <_Z5func0RKSt6vectorIiSaIiEES3_S3_+0x50> mov (%rsi),%rsi xo...
_Z5func0RKSt6vectorIiSaIiEES3_S3_: endbr64 mov rax, [rdi+8] mov rdi, [rdi] mov r8, rax sub r8, rdi sar r8, 2 cmp rax, rdi jz short loc_1658 mov rsi, [rsi] xor eax, eax xor r10d, r10d jmp short loc_1631 loc_1628: add rax, 1 cmp rax, r8 jnb short loc_164F loc_1631:...
long long func0(long long *a1, long long *a2, _QWORD *a3) { long long v3; // rax long long v4; // rdi unsigned long long v5; // r8 long long v6; // rsi unsigned long long v7; // rax unsigned int v8; // r10d int v9; // ecx v3 = a1[1]; v4 = *a1; v5 = (v3 - v4) >> 2; if ( v3 == v4 ) return 0LL;...
func0: ENDBR64 MOV RAX,qword ptr [RDI + 0x8] MOV RDI,qword ptr [RDI] MOV R8,RAX SUB R8,RDI SAR R8,0x2 CMP RAX,RDI JZ 0x00101658 MOV RSI,qword ptr [RSI] XOR EAX,EAX XOR R10D,R10D JMP 0x00101631 LAB_00101628: ADD RAX,0x1 CMP RAX,R8 JNC 0x0010164f LAB_00101631: MOV ECX,dword ptr [RSI + RAX*0x4] CMP dword ptr [RDI + RAX*0x...
/* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&) */ int func0(vector *param_1,vector *param_2,vector *param_3) { int iVar1; long lVar2; ulong uVar3; ulong uVar4; int iVar5; lVar2 = *(long *)param_1; ...
567
func0
#include <vector> #include <assert.h>
int func0(const std::vector<int>& list1, const std::vector<int>& list2, const std::vector<int>& list3) { int result = 0; for (size_t i = 0; i < list1.size(); ++i) { if (list1[i] == list2[i] && list2[i] == list3[i]) { result++; } } return result; }
int main() { assert(func0({1,2,3,4,5,6,7,8},{2,2,3,1,2,6,7,9},{2,1,3,1,2,6,7,9}) == 3); assert(func0({1,2,3,4,5,6,7,8},{2,2,3,1,2,6,7,8},{2,1,3,1,2,6,7,8}) == 4); assert(func0({1,2,3,4,2,6,7,8},{2,2,3,1,2,6,7,8},{2,1,3,1,2,6,7,8}) == 5); return 0; }
O3
cpp
func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&): endbr64 mov (%rdi),%r8 mov 0x8(%rdi),%rdi sub %r8,%rdi mov %rdi,%rax shr $0x2,%rax je 17b0 <_Z5func0RKSt6vectorIiSaIiEES3_S3_+0x50> mov (%rsi),%rsi xo...
_Z5func0RKSt6vectorIiSaIiEES3_S3_: endbr64 mov rax, [rdi+8] mov rdi, [rdi] mov r8, rax sub r8, rdi sar r8, 2 cmp rax, rdi jz short loc_1748 mov rsi, [rsi] xor eax, eax xor r10d, r10d jmp short loc_1721 loc_1718: add rax, 1 cmp rax, r8 jnb short loc_173F loc_1721:...
long long func0(long long *a1, long long *a2, _QWORD *a3) { long long v3; // rax long long v4; // rdi unsigned long long v5; // r8 long long v6; // rsi unsigned long long v7; // rax unsigned int v8; // r10d int v9; // ecx v3 = a1[1]; v4 = *a1; v5 = (v3 - v4) >> 2; if ( v3 == v4 ) return 0LL;...
func0: ENDBR64 MOV RAX,qword ptr [RDI + 0x8] MOV RDI,qword ptr [RDI] MOV R8,RAX SUB R8,RDI SAR R8,0x2 CMP RAX,RDI JZ 0x00101748 MOV RSI,qword ptr [RSI] XOR EAX,EAX XOR R10D,R10D JMP 0x00101721 LAB_00101718: ADD RAX,0x1 CMP RAX,R8 JNC 0x0010173f LAB_00101721: MOV ECX,dword ptr [RSI + RAX*0x4] CMP dword ptr [RDI + RAX*0x...
/* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&) */ int func0(vector *param_1,vector *param_2,vector *param_3) { int iVar1; long lVar2; ulong uVar3; ulong uVar4; int iVar5; lVar2 = *(long *)param_1; ...
568
func0
#include <iostream> #include <assert.h> #include <vector>
int func0(std::vector<std::vector<int>> Input) { return Input.size(); }
int main() { assert(func0({{1, 2, 3, 4}, {5, 6, 7, 8}}) == 2); assert(func0({{1, 2}, {3, 4}, {5, 6}}) == 3); assert(func0({{9, 8, 7, 6, 5, 4, 3, 2, 1}}) == 1); return 0; }
O0
cpp
func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >): endbr64 push %rbp mov %rsp,%rbp sub $0x10,%rsp mov %rdi,-0x8(%rbp) mov -0x8(%rbp),%rax mov %rax,%rdi callq 1ab4 <_ZNKSt6vectorIS_IiSaIiEESaIS1_EE4sizeEv> leaveq retq
_Z5func0St6vectorIS_IiSaIiEESaIS1_EE: endbr64 push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov rdi, rax call _ZNKSt6vectorIS_IiSaIiEESaIS1_EE4sizeEv; std::vector<std::vector<int>>::size(void) leave retn
long long func0(long long a1) { return std::vector<std::vector<int>>::size(a1); }
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV RDI,RAX CALL 0x00101ad0 LEAVE RET
/* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >) */ void func0(vector param_1) { int4 in_register_0000003c; std:: vector<std::vector<int,std::allocator<int>>,std::allocator<std::vector<int,std::allocator<int>>>> ::size((vector<std::v...
569
func0
#include <iostream> #include <assert.h> #include <vector>
int func0(std::vector<std::vector<int>> Input) { return Input.size(); }
int main() { assert(func0({{1, 2, 3, 4}, {5, 6, 7, 8}}) == 2); assert(func0({{1, 2}, {3, 4}, {5, 6}}) == 3); assert(func0({{9, 8, 7, 6, 5, 4, 3, 2, 1}}) == 1); return 0; }
O1
cpp
func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >): endbr64 mov 0x8(%rdi),%rax sub (%rdi),%rax sar $0x3,%rax movabs $0xaaaaaaaaaaaaaaab,%rdx imul %rdx,%rax retq
_Z5func0St6vectorIS_IiSaIiEESaIS1_EE: endbr64 mov rax, [rdi+8] sub rax, [rdi] sar rax, 3 imul eax, 0AAAAAAABh retn
long long func0(_QWORD *a1) { return -1431655765 * (unsigned int)((long long)(a1[1] - *a1) >> 3); }
func0: ENDBR64 MOV RAX,qword ptr [RDI + 0x8] SUB RAX,qword ptr [RDI] SAR RAX,0x3 IMUL EAX,EAX,-0x55555555 RET
/* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >) */ int func0(vector param_1) { int4 in_register_0000003c; return (int)(*(long *)(CONCAT44(in_register_0000003c,param_1) + 8) - *(long *)CONCAT44(in_register_0000003c,param_1...
570
func0
#include <iostream> #include <assert.h> #include <vector>
int func0(std::vector<std::vector<int>> Input) { return Input.size(); }
int main() { assert(func0({{1, 2, 3, 4}, {5, 6, 7, 8}}) == 2); assert(func0({{1, 2}, {3, 4}, {5, 6}}) == 3); assert(func0({{9, 8, 7, 6, 5, 4, 3, 2, 1}}) == 1); return 0; }
O2
cpp
func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >): endbr64 movabs $0xaaaaaaaaaaaaaaab,%rdx mov 0x8(%rdi),%rax sub (%rdi),%rax sar $0x3,%rax imul %rdx,%rax retq xchg %ax,%ax
_Z5func0St6vectorIS_IiSaIiEESaIS1_EE: endbr64 mov rax, [rdi+8] sub rax, [rdi] sar rax, 3 imul eax, 0AAAAAAABh retn
long long func0(_QWORD *a1) { return -1431655765 * (unsigned int)((long long)(a1[1] - *a1) >> 3); }
func0: ENDBR64 MOV RAX,qword ptr [RDI + 0x8] SUB RAX,qword ptr [RDI] SAR RAX,0x3 IMUL EAX,EAX,-0x55555555 RET
/* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >) */ int func0(vector param_1) { int4 in_register_0000003c; return (int)(*(long *)(CONCAT44(in_register_0000003c,param_1) + 8) - *(long *)CONCAT44(in_register_0000003c,param_1...
571
func0
#include <iostream> #include <assert.h> #include <vector>
int func0(std::vector<std::vector<int>> Input) { return Input.size(); }
int main() { assert(func0({{1, 2, 3, 4}, {5, 6, 7, 8}}) == 2); assert(func0({{1, 2}, {3, 4}, {5, 6}}) == 3); assert(func0({{9, 8, 7, 6, 5, 4, 3, 2, 1}}) == 1); return 0; }
O3
cpp
func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >): endbr64 movabs $0xaaaaaaaaaaaaaaab,%rdx mov 0x8(%rdi),%rax sub (%rdi),%rax sar $0x3,%rax imul %rdx,%rax retq xchg %ax,%ax
_Z5func0St6vectorIS_IiSaIiEESaIS1_EE: endbr64 mov rax, [rdi+8] sub rax, [rdi] sar rax, 3 imul eax, 0AAAAAAABh retn
long long func0(_QWORD *a1) { return -1431655765 * (unsigned int)((long long)(a1[1] - *a1) >> 3); }
func0: ENDBR64 MOV RAX,qword ptr [RDI + 0x8] SUB RAX,qword ptr [RDI] SAR RAX,0x3 IMUL EAX,EAX,-0x55555555 RET
/* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >) */ int func0(vector param_1) { int4 in_register_0000003c; return (int)(*(long *)(CONCAT44(in_register_0000003c,param_1) + 8) - *(long *)CONCAT44(in_register_0000003c,param_1...
572
func0
#include <iostream> #include <vector> #include <assert.h>
int func0(const std::vector<int>& arr, int n) { int sum = 0; for (int i = n - 1; i >= 0; --i) { sum += i * arr[i] - (n - 1 - i) * arr[i]; } return sum; }
int main() { assert(func0({1, 8, 9, 15, 16}, 5) == 74); assert(func0({1, 2, 3, 4}, 4) == 10); assert(func0({1, 2, 3, 4, 5, 7, 9, 11, 14}, 9) == 188); return 0; }
O0
cpp
func0(std::vector<int, std::allocator<int> > const&, int): endbr64 push %rbp mov %rsp,%rbp push %r12 push %rbx sub $0x20,%rsp mov %rdi,-0x28(%rbp) mov %esi,-0x2c(%rbp) movl $0x0,-0x18(%rbp) mov -0x2c(%rbp),%eax sub $0x1,%eax mov %eax,-0x14(%rbp) cmpl $0x0,-0x14(%rbp) js 12e6 <_Z5func0...
_Z5func0RKSt6vectorIiSaIiEEi: endbr64 push rbp mov rbp, rsp push r12 push rbx sub rsp, 20h mov [rbp+var_28], rdi mov [rbp+var_2C], esi mov [rbp+var_18], 0 mov eax, [rbp+var_2C] sub eax, 1 mov [rbp+var_14], eax jmp short loc_12C0 loc_1271: mov eax, [rbp+var_14] movsxd rd...
long long func0(long long a1, int a2) { int v2; // r12d unsigned int v4; // [rsp+18h] [rbp-18h] int i; // [rsp+1Ch] [rbp-14h] v4 = 0; for ( i = a2 - 1; i >= 0; --i ) { v2 = i * *(_DWORD *)std::vector<int>::operator[](a1, i); v4 += v2 - (a2 - 1 - i) * *(_DWORD *)std::vector<int>::operator[](a1, i);...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R12 PUSH RBX SUB RSP,0x20 MOV qword ptr [RBP + -0x28],RDI MOV dword ptr [RBP + -0x2c],ESI MOV dword ptr [RBP + -0x18],0x0 MOV EAX,dword ptr [RBP + -0x2c] SUB EAX,0x1 MOV dword ptr [RBP + -0x14],EAX JMP 0x001012c0 LAB_00101271: MOV EAX,dword ptr [RBP + -0x14] MOVSXD RDX,EAX MOV R...
/* func0(std::vector<int, std::allocator<int> > const&, int) */ int func0(vector *param_1,int param_2) { int iVar1; int *piVar2; int4 local_20; int4 local_1c; local_20 = 0; for (local_1c = param_2 + -1; -1 < local_1c; local_1c = local_1c + -1) { piVar2 = (int *)std::vector<int,std::allocator<int>>:...
573
func0
#include <iostream> #include <vector> #include <assert.h>
int func0(const std::vector<int>& arr, int n) { int sum = 0; for (int i = n - 1; i >= 0; --i) { sum += i * arr[i] - (n - 1 - i) * arr[i]; } return sum; }
int main() { assert(func0({1, 8, 9, 15, 16}, 5) == 74); assert(func0({1, 2, 3, 4}, 4) == 10); assert(func0({1, 2, 3, 4, 5, 7, 9, 11, 14}, 9) == 188); return 0; }
O1
cpp
func0(std::vector<int, std::allocator<int> > const&, int): endbr64 mov %esi,%eax sub $0x1,%eax js 127f <_Z5func0RKSt6vectorIiSaIiEEi+0x36> mov (%rdi),%rdi cltq mov $0x0,%ecx sub $0x1,%esi mov %esi,%edx sub %eax,%edx mov %eax,%r8d sub %edx,%r8d mov %r8d,%edx imul (%rdi,%rax,4),%edx ad...
_Z5func0RKSt6vectorIiSaIiEEi: endbr64 mov eax, esi sub eax, 1 js short loc_123B mov r8, [rdi] cdqe mov ecx, 0 sub esi, 1 loc_1221: mov edi, esi sub edi, eax mov edx, eax sub edx, edi imul edx, [r8+rax*4] add ecx, edx sub rax, 1 test eax, eax jns short loc_1221 ...
long long func0(_QWORD *a1, int a2) { long long v2; // rax unsigned int v3; // ecx int v4; // esi LODWORD(v2) = a2 - 1; if ( a2 - 1 < 0 ) { return 0; } else { v2 = (int)v2; v3 = 0; v4 = a2 - 1; do { v3 += *(_DWORD *)(*a1 + 4 * v2) * (v2 - (v4 - v2)); --v2; } ...
func0: ENDBR64 MOV EAX,ESI SUB EAX,0x1 JS 0x0010123b MOV R8,qword ptr [RDI] CDQE MOV ECX,0x0 SUB ESI,0x1 LAB_00101221: MOV EDI,ESI SUB EDI,EAX MOV EDX,EAX SUB EDX,EDI IMUL EDX,dword ptr [R8 + RAX*0x4] ADD ECX,EDX SUB RAX,0x1 TEST EAX,EAX JNS 0x00101221 LAB_00101238: MOV EAX,ECX RET LAB_0010123b: MOV ECX,0x0 JMP 0x00101...
/* func0(std::vector<int, std::allocator<int> > const&, int) */ int func0(vector *param_1,int param_2) { long lVar1; int iVar2; if (param_2 + -1 < 0) { iVar2 = 0; } else { lVar1 = (long)(param_2 + -1); iVar2 = 0; do { iVar2 = iVar2 + ((int)lVar1 * 2 - (param_2 + -1)) * *(int *)(*(lo...
574
func0
#include <iostream> #include <vector> #include <assert.h>
int func0(const std::vector<int>& arr, int n) { int sum = 0; for (int i = n - 1; i >= 0; --i) { sum += i * arr[i] - (n - 1 - i) * arr[i]; } return sum; }
int main() { assert(func0({1, 8, 9, 15, 16}, 5) == 74); assert(func0({1, 2, 3, 4}, 4) == 10); assert(func0({1, 2, 3, 4, 5, 7, 9, 11, 14}, 9) == 188); return 0; }
O2
cpp
func0(std::vector<int, std::allocator<int> > const&, int): endbr64 sub $0x1,%esi js 14d8 <_Z5func0RKSt6vectorIiSaIiEEi+0x38> mov (%rdi),%rcx movslq %esi,%rax xor %r8d,%r8d nopw 0x0(%rax,%rax,1) mov %esi,%edx mov %eax,%edi sub %eax,%edx sub %edx,%edi mov (%rcx,%rax,4),%edx sub $0x1,%rax ...
_Z5func0RKSt6vectorIiSaIiEEi: endbr64 sub esi, 1 js short loc_13C8 mov r8, [rdi] movsxd rax, esi xor ecx, ecx nop dword ptr [rax+00000000h] loc_13A8: mov edi, esi mov edx, eax sub edi, eax sub edx, edi imul edx, [r8+rax*4] sub rax, 1 add ecx, edx test eax, eax jns ...
long long func0(_QWORD *a1, int a2) { int v2; // esi long long v3; // rax unsigned int v4; // ecx int v5; // edx v2 = a2 - 1; if ( v2 < 0 ) return 0LL; v3 = v2; v4 = 0; do { v5 = *(_DWORD *)(*a1 + 4 * v3) * (v3 - (v2 - v3)); --v3; v4 += v5; } while ( (int)v3 >= 0 ); return v4...
func0: ENDBR64 SUB ESI,0x1 JS 0x001013c8 MOV R8,qword ptr [RDI] MOVSXD RAX,ESI XOR ECX,ECX NOP dword ptr [RAX] LAB_001013a8: MOV EDI,ESI MOV EDX,EAX SUB EDI,EAX SUB EDX,EDI IMUL EDX,dword ptr [R8 + RAX*0x4] SUB RAX,0x1 ADD ECX,EDX TEST EAX,EAX JNS 0x001013a8 MOV EAX,ECX RET LAB_001013c8: XOR ECX,ECX MOV EAX,ECX RET
/* func0(std::vector<int, std::allocator<int> > const&, int) */ int func0(vector *param_1,int param_2) { long lVar1; int iVar2; long lVar3; int iVar4; int iVar5; iVar5 = param_2 + -1; if (-1 < iVar5) { lVar3 = (long)iVar5; iVar4 = 0; do { iVar2 = (int)lVar3; lVar1 = lVar3 * 4;...
575
func0
#include <iostream> #include <vector> #include <assert.h>
int func0(const std::vector<int>& arr, int n) { int sum = 0; for (int i = n - 1; i >= 0; --i) { sum += i * arr[i] - (n - 1 - i) * arr[i]; } return sum; }
int main() { assert(func0({1, 8, 9, 15, 16}, 5) == 74); assert(func0({1, 2, 3, 4}, 4) == 10); assert(func0({1, 2, 3, 4, 5, 7, 9, 11, 14}, 9) == 188); return 0; }
O3
cpp
func0(std::vector<int, std::allocator<int> > const&, int): endbr64 mov %esi,%ecx sub $0x1,%ecx js 1760 <_Z5func0RKSt6vectorIiSaIiEEi+0x170> mov (%rdi),%rdi cmp $0x3,%ecx jbe 1769 <_Z5func0RKSt6vectorIiSaIiEEi+0x179> movslq %ecx,%rax movd %esi,%xmm5 movd %ecx,%xmm6 mov %esi,%edx lea -0xc(%rd...
_Z5func0RKSt6vectorIiSaIiEEi: endbr64 mov edx, esi sub esi, 1 js loc_16C0 mov r8, [rdi] cmp esi, 2 jbe loc_16C3 movsxd rax, edx movd xmm5, edx movd xmm6, esi mov edi, edx lea rax, [r8+rax*4-10h] shr edi, 2 pshufd xmm4, xmm5, 0 movdqa xmm5, cs:xmmword_2100 shl rdi, 4 psh...
long long func0(long long *a1, signed int a2) { signed int v3; // esi long long v4; // r8 const __m128i *v5; // rax __m128i si128; // xmm5 __m128i v7; // xmm6 __m128i v8; // xmm3 __m128i v9; // xmm4 __m128i v10; // xmm2 __m128i v11; // xmm8 __m128i v12; // xmm0 __m128i v13; // xmm9 __m128i v14;...
func0: ENDBR64 MOV EDX,ESI SUB ESI,0x1 JS 0x001016c0 MOV R8,qword ptr [RDI] CMP ESI,0x2 JBE 0x001016c3 MOVSXD RAX,EDX MOVD XMM5,EDX MOVD XMM6,ESI MOV EDI,EDX LEA RAX,[R8 + RAX*0x4 + -0x10] SHR EDI,0x2 PSHUFD XMM4,XMM5,0x0 MOVDQA XMM5,xmmword ptr [0x00102100] SHL RDI,0x4 PSHUFD XMM6,XMM6,0x0 PXOR XMM3,XMM3 MOV RCX,RAX P...
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* func0(std::vector<int, std::allocator<int> > const&, int) */ int func0(vector *param_1,int param_2) { long lVar1; long lVar2; int auVar3 [16]; uint *puVar4; uint uVar5; uint uVar6; uint *puVar7; uint uVar8; uint ...
576
func0
#include <iostream> #include <cassert>
int func0(int arr[], int n) { int minEle = arr[0]; int maxEle = arr[0]; for (int i = 1; i < n; i++) { minEle = std::min(minEle, arr[i]); maxEle = std::max(maxEle, arr[i]); } return (maxEle - minEle); }
int main() { int arr1[] = {2, 1, 5, 3}; assert(func0(arr1, 4) == 4); int arr2[] = {9, 3, 2, 5, 1}; assert(func0(arr2, 5) == 8); int arr3[] = {3, 2, 1}; assert(func0(arr3, 3) == 2); return 0; }
O0
cpp
func0(int*, int): endbr64 push %rbp mov %rsp,%rbp sub $0x30,%rsp mov %rdi,-0x28(%rbp) mov %esi,-0x2c(%rbp) mov %fs:0x28,%rax mov %rax,-0x8(%rbp) xor %eax,%eax mov -0x28(%rbp),%rax mov (%rax),%eax mov %eax,-0x14(%rbp) mov -0x28(%rbp),%rax mov (%rax),%eax mov %eax,-0x10(%rbp) movl...
_Z5func0Pii: endbr64 push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_28], rdi mov [rbp+var_2C], esi mov rax, fs:28h mov [rbp+var_8], rax xor eax, eax mov rax, [rbp+var_28] mov eax, [rax] mov [rbp+var_14], eax mov rax, [rbp+var_28] mov eax, [rax] mov [rbp+var_10], e...
long long func0(int *a1, int a2) { int v3; // [rsp+1Ch] [rbp-14h] BYREF int v4; // [rsp+20h] [rbp-10h] BYREF int i; // [rsp+24h] [rbp-Ch] unsigned long long v6; // [rsp+28h] [rbp-8h] v6 = __readfsqword(0x28u); v3 = *a1; v4 = *a1; for ( i = 1; i < a2; ++i ) { v3 = *(_DWORD *)std::min<int>(&v3, &a...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x28],RDI MOV dword ptr [RBP + -0x2c],ESI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX XOR EAX,EAX MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x14],EAX MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword pt...
/* func0(int*, int) */ int func0(int *param_1,int param_2) { int *piVar1; long in_FS_OFFSET; int local_1c; int local_18; int local_14; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_1c = *param_1; local_18 = *param_1; for (local_14 = 1; local_14 < param_2; local_14 = local_14 +...
577
func0
#include <iostream> #include <cassert>
int func0(int arr[], int n) { int minEle = arr[0]; int maxEle = arr[0]; for (int i = 1; i < n; i++) { minEle = std::min(minEle, arr[i]); maxEle = std::max(maxEle, arr[i]); } return (maxEle - minEle); }
int main() { int arr1[] = {2, 1, 5, 3}; assert(func0(arr1, 4) == 4); int arr2[] = {9, 3, 2, 5, 1}; assert(func0(arr2, 5) == 8); int arr3[] = {3, 2, 1}; assert(func0(arr3, 3) == 2); return 0; }
O1
cpp
func0(int*, int): endbr64 sub $0x18,%rsp mov %fs:0x28,%rax mov %rax,0x8(%rsp) xor %eax,%eax mov (%rdi),%eax mov %eax,(%rsp) mov %eax,0x4(%rsp) cmp $0x1,%esi jle 120b <_Z5func0Pii+0x62> lea 0x4(%rdi),%rax lea -0x2(%rsi),%edx lea 0x8(%rdi,%rdx,4),%rdi lea 0x4(%rsp),%rsi mov (%rax...
_Z5func0Pii: endbr64 sub rsp, 18h mov rax, fs:28h mov [rsp+18h+var_10], rax xor eax, eax mov eax, [rdi] mov [rsp+18h+var_18], eax mov [rsp+18h+var_14], eax cmp esi, 1 jle short loc_11CE lea rax, [rdi+4] lea edx, [rsi-2] lea r8, [rdi+rdx*4+8] mov rdi, rsp lea rsi, ...
long long func0(int *a1, int a2) { int *v2; // rax int v3; // edx int *v4; // rcx bool v5; // cc int *v6; // rdx int v8; // [rsp+0h] [rbp-18h] BYREF int v9; // [rsp+4h] [rbp-14h] BYREF unsigned long long v10; // [rsp+8h] [rbp-10h] v10 = __readfsqword(0x28u); v8 = *a1; v9 = v8; if ( a2 > 1 ) ...
func0: ENDBR64 SUB RSP,0x18 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x8],RAX XOR EAX,EAX MOV EAX,dword ptr [RDI] MOV dword ptr [RSP],EAX MOV dword ptr [RSP + 0x4],EAX CMP ESI,0x1 JLE 0x001011ce LEA RAX,[RDI + 0x4] LEA EDX,[RSI + -0x2] LEA R8,[RDI + RDX*0x4 + 0x8] MOV RDI,RSP LEA RSI,[RSP + 0x4] LAB_001011a3: M...
/* func0(int*, int) */ int func0(int *param_1,int param_2) { int *piVar1; int *piVar2; long in_FS_OFFSET; int local_18; int local_14; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_18 = *param_1; local_14 = *param_1; if (1 < param_2) { piVar1 = param_1 + 1; do { p...
578
func0
#include <iostream> #include <cassert>
int func0(int arr[], int n) { int minEle = arr[0]; int maxEle = arr[0]; for (int i = 1; i < n; i++) { minEle = std::min(minEle, arr[i]); maxEle = std::max(maxEle, arr[i]); } return (maxEle - minEle); }
int main() { int arr1[] = {2, 1, 5, 3}; assert(func0(arr1, 4) == 4); int arr2[] = {9, 3, 2, 5, 1}; assert(func0(arr2, 5) == 8); int arr3[] = {3, 2, 1}; assert(func0(arr3, 3) == 2); return 0; }
O2
cpp
func0(int*, int): endbr64 sub $0x18,%rsp mov (%rdi),%r8d mov %fs:0x28,%rax mov %rax,0x8(%rsp) xor %eax,%eax mov %r8d,0x4(%rsp) cmp $0x1,%esi jle 1390 <_Z5func0Pii+0x70> lea -0x2(%rsi),%eax lea 0x4(%rdi),%rcx lea 0x8(%rdi,%rax,4),%rsi mov %r8d,%eax nopl 0x0(%rax) mov (%rcx),%edx ...
_Z5func0Pii: endbr64 mov r8d, [rdi] cmp esi, 1 jle short loc_12B0 lea eax, [rsi-2] lea rcx, [rdi+4] lea rsi, [rdi+rax*4+8] mov eax, r8d nop dword ptr [rax+rax+00h] loc_1290: mov edx, [rcx] cmp r8d, edx cmovg r8d, edx cmp eax, edx cmovl eax, edx add rcx, 4 cmp rsi,...
long long func0(int *a1, int a2) { int v2; // r8d int *v3; // rcx int *v4; // rsi int v5; // eax v2 = *a1; if ( a2 <= 1 ) return 0LL; v3 = a1 + 1; v4 = &a1[a2 - 2 + 2]; v5 = *a1; do { if ( v2 > *v3 ) v2 = *v3; if ( v5 < *v3 ) v5 = *v3; ++v3; } while ( v4 != v3 ); ...
func0: ENDBR64 MOV R8D,dword ptr [RDI] CMP ESI,0x1 JLE 0x001012b0 LEA EAX,[RSI + -0x2] LEA RCX,[RDI + 0x4] LEA RSI,[RDI + RAX*0x4 + 0x8] MOV EAX,R8D NOP dword ptr [RAX + RAX*0x1] LAB_00101290: MOV EDX,dword ptr [RCX] CMP R8D,EDX CMOVG R8D,EDX CMP EAX,EDX CMOVL EAX,EDX ADD RCX,0x4 CMP RSI,RCX JNZ 0x00101290 SUB EAX,R8D ...
/* func0(int*, int) */ int func0(int *param_1,int param_2) { int iVar1; int iVar2; int *piVar3; int iVar4; iVar4 = *param_1; if (1 < param_2) { piVar3 = param_1 + 1; iVar2 = iVar4; do { iVar1 = *piVar3; if (iVar1 < iVar4) { iVar4 = iVar1; } if (iVar2 < iVar1)...
579
func0
#include <iostream> #include <cassert>
int func0(int arr[], int n) { int minEle = arr[0]; int maxEle = arr[0]; for (int i = 1; i < n; i++) { minEle = std::min(minEle, arr[i]); maxEle = std::max(maxEle, arr[i]); } return (maxEle - minEle); }
int main() { int arr1[] = {2, 1, 5, 3}; assert(func0(arr1, 4) == 4); int arr2[] = {9, 3, 2, 5, 1}; assert(func0(arr2, 5) == 8); int arr3[] = {3, 2, 1}; assert(func0(arr3, 3) == 2); return 0; }
O3
cpp
func0(int*, int): endbr64 sub $0x18,%rsp mov (%rdi),%r8d mov %fs:0x28,%rax mov %rax,0x8(%rsp) xor %eax,%eax mov %r8d,0x4(%rsp) cmp $0x1,%esi jle 1370 <_Z5func0Pii+0x70> lea -0x2(%rsi),%eax lea 0x4(%rdi),%rcx lea 0x8(%rdi,%rax,4),%rsi mov %r8d,%eax nopl 0x0(%rax) mov (%rcx),%edx ...
_Z5func0Pii: endbr64 mov edx, [rdi] mov rcx, rdi cmp esi, 1 jle loc_13D0 lea eax, [rsi-2] lea r8d, [rsi-1] cmp eax, 2 jbe loc_13D3 movd xmm5, edx mov edx, r8d mov rax, rdi shr edx, 2 pshufd xmm0, xmm5, 0 shl rdx, 4 movdqa xmm1, xmm0 add rdx, rdi nop loc_12B0: mov...
long long func0(int *a1, int a2) { signed int v2; // edx unsigned int v4; // r8d int *v5; // rax __m128i v6; // xmm0 __m128i v7; // xmm1 __m128i v8; // xmm3 __m128i v9; // xmm2 __m128i v10; // xmm4 __m128i v11; // xmm0 __m128i v12; // xmm2 __m128i v13; // xmm3 signed int v14; // edi __m128i v...
func0: ENDBR64 MOV EDX,dword ptr [RDI] MOV RCX,RDI CMP ESI,0x1 JLE 0x001013d0 LEA EAX,[RSI + -0x2] LEA R8D,[RSI + -0x1] CMP EAX,0x2 JBE 0x001013d3 MOVD XMM5,EDX MOV EDX,R8D MOV RAX,RDI SHR EDX,0x2 PSHUFD XMM0,XMM5,0x0 SHL RDX,0x4 MOVDQA XMM1,XMM0 ADD RDX,RDI NOP LAB_001012b0: MOVDQU XMM3,xmmword ptr [RAX + 0x4] MOVDQA ...
/* func0(int*, int) */ int func0(int *param_1,int param_2) { uint uVar1; uint uVar2; uint uVar3; uint uVar4; uint uVar5; int *piVar6; int iVar7; uint uVar8; uint uVar9; uint uVar10; uint uVar11; uint uVar12; uint uVar13; uint uVar14; uint uVar15; uVar13 = *param_1; if (param_2 < 2...
580
func0
#include <cassert> #include <string>
int func0(const std::string& str1) { if (!str1.empty()) { return static_cast<int>(str1[0]); } return -1; // Return -1 if string is empty }
int main() { assert(func0("python") == 112); assert(func0("Program") == 80); assert(func0("Language") == 76); 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 $0x10,%rsp mov %rdi,-0x8(%rbp) mov -0x8(%rbp),%rax mov %rax,%rdi callq 12b0 <_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv@plt> xor $0x1,%eax test %a...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov rdi, rax call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void) xor eax, 1 test al, al jz ...
long long func0(long long a1) { if ( (unsigned __int8)std::string::empty(a1) != 1 ) return (unsigned int)*(char *)std::string::operator[](a1, 0LL); else return 0xFFFFFFFFLL; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV RDI,RAX CALL 0x00101220 XOR EAX,0x1 TEST AL,AL JZ 0x00101385 MOV RAX,qword ptr [RBP + -0x8] MOV ESI,0x0 MOV RDI,RAX CALL 0x001011e0 MOVZX EAX,byte ptr [RAX] MOVSX EAX,AL JMP 0x0010138a LAB_00101385: MOV EA...
/* func0(std::string const&) */ int func0(string *param_1) { char cVar1; int iVar2; char *pcVar3; cVar1 = std::string::empty(); if (cVar1 == '\x01') { iVar2 = -1; } else { pcVar3 = (char *)std::string::operator[]((ulong)param_1); iVar2 = (int)*pcVar3; } return iVar2; }
581
func0
#include <cassert> #include <string>
int func0(const std::string& str1) { if (!str1.empty()) { return static_cast<int>(str1[0]); } return -1; // Return -1 if string is empty }
int main() { assert(func0("python") == 112); assert(func0("Program") == 80); assert(func0("Language") == 76); return 0; }
O1
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 cmpq $0x0,0x8(%rdi) je 11fb <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x12> mov (%rdi),%rax movsbl (%rax),%eax retq mov $0xffffffff,%eax retq
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 cmp qword ptr [rdi+8], 0 jz short loc_121B mov rax, [rdi] movsx eax, byte ptr [rax] retn loc_121B: mov eax, 0FFFFFFFFh retn
long long func0(char **a1) { if ( a1[1] ) return (unsigned int)**a1; else return 0xFFFFFFFFLL; }
func0: ENDBR64 CMP qword ptr [RDI + 0x8],0x0 JZ 0x0010121b MOV RAX,qword ptr [RDI] MOVSX EAX,byte ptr [RAX] RET LAB_0010121b: MOV EAX,0xffffffff RET
/* func0(std::string const&) */ int func0(string *param_1) { if (*(long *)(param_1 + 8) != 0) { return (int)**(char **)param_1; } return -1; }