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
582
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; }
O2
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 cmpq $0x0,0x8(%rdi) je 1368 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x18> mov (%rdi),%rax movsbl (%rax),%eax retq nopw 0x0(%rax,%rax,1) mov $0xffffffff,%eax retq xchg %ax,%ax
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 cmp qword ptr [rdi+8], 0 jz short loc_1358 mov rax, [rdi] movsx eax, byte ptr [rax] retn loc_1358: 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 0x00101358 MOV RAX,qword ptr [RDI] MOVSX EAX,byte ptr [RAX] RET LAB_00101358: 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; }
583
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; }
O3
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 cmpq $0x0,0x8(%rdi) je 1368 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x18> mov (%rdi),%rax movsbl (%rax),%eax retq nopw 0x0(%rax,%rax,1) mov $0xffffffff,%eax retq xchg %ax,%ax
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 cmp qword ptr [rdi+8], 0 jz short loc_1358 mov rax, [rdi] movsx eax, byte ptr [rax] retn loc_1358: 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 0x00101358 MOV RAX,qword ptr [RDI] MOVSX EAX,byte ptr [RAX] RET LAB_00101358: 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; }
584
func0
#include <vector> #include <cassert> using namespace std;
int func0(vector<vector<int>>& tri, int m, int n) { for (int i = m - 1; i >= 0; --i) { for (int j = 0; j <= i; ++j) { if (tri[i+1][j] > tri[i+1][j+1]) { tri[i][j] += tri[i+1][j]; } else { tri[i][j] += tri[i+1][j+1]; } } ...
int main() { vector<vector<int>> triangle1{{1, 0, 0}, {4, 8, 0}, {1, 5, 3}}; assert(func0(triangle1, 2, 2) == 14); vector<vector<int>> triangle2{{13, 0, 0}, {7, 4, 0}, {2, 4, 6}}; assert(func0(triangle2, 2, 2) == 24); vector<vector<int>> triangle3{{2, 0, 0}, {11, 18, 0}, {21, 25, 33}}; ...
O0
cpp
func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >&, int, int): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x28,%rsp mov %rdi,-0x28(%rbp) mov %esi,-0x2c(%rbp) mov %edx,-0x30(%rbp) mov -0x2c(%rbp),%eax sub $0x1,%eax mov %eax...
_Z5func0RSt6vectorIS_IiSaIiEESaIS1_EEii: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 28h mov [rbp+var_28], rdi mov [rbp+var_2C], esi mov [rbp+var_30], edx mov eax, [rbp+var_2C] sub eax, 1 mov [rbp+var_18], eax jmp loc_140F loc_12CE: mov [rbp+var_14], 0 jmp loc_13FF ...
long long func0(long long a1, int a2) { long long v2; // rax int v3; // ebx long long v4; // rax long long v5; // rax int v6; // ebx long long v7; // rax _DWORD *v8; // rax long long v9; // rax long long v10; // rax int i; // [rsp+18h] [rbp-18h] int j; // [rsp+1Ch] [rbp-14h] for ( i = a2 - 1; ...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x28 MOV qword ptr [RBP + -0x28],RDI MOV dword ptr [RBP + -0x2c],ESI MOV dword ptr [RBP + -0x30],EDX MOV EAX,dword ptr [RBP + -0x2c] SUB EAX,0x1 MOV dword ptr [RBP + -0x18],EAX JMP 0x0010140f LAB_001012ce: MOV dword ptr [RBP + -0x14],0x0 JMP 0x001013ff LAB_001012da: ...
/* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >&, int, int) */ int4 func0(vector *param_1,int param_2,int param_3) { int iVar1; int *piVar2; vector<int,std::allocator<int>> *pvVar3; int4 *puVar4; int4 local_20; int4 local_1c; f...
585
func0
#include <vector> #include <cassert> using namespace std;
int func0(vector<vector<int>>& tri, int m, int n) { for (int i = m - 1; i >= 0; --i) { for (int j = 0; j <= i; ++j) { if (tri[i+1][j] > tri[i+1][j+1]) { tri[i][j] += tri[i+1][j]; } else { tri[i][j] += tri[i+1][j+1]; } } ...
int main() { vector<vector<int>> triangle1{{1, 0, 0}, {4, 8, 0}, {1, 5, 3}}; assert(func0(triangle1, 2, 2) == 14); vector<vector<int>> triangle2{{13, 0, 0}, {7, 4, 0}, {2, 4, 6}}; assert(func0(triangle2, 2, 2) == 24); vector<vector<int>> triangle3{{2, 0, 0}, {11, 18, 0}, {21, 25, 33}}; ...
O1
cpp
func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >&, int, int): endbr64 push %rbx mov %esi,%ebx sub $0x1,%ebx js 131e <_Z5func0RSt6vectorIS_IiSaIiEESaIS1_EEii+0x75> movslq %ebx,%rax lea (%rax,%rax,2),%r10 shl $0x3,%r10 jmp 12fc <_Z5fu...
_Z5func0RSt6vectorIS_IiSaIiEESaIS1_EEii: endbr64 push rbx mov r11, rdi mov ebx, esi sub ebx, 1 js short loc_130F movsxd rax, ebx lea r8, [rax+rax*2] shl r8, 3 jmp short loc_12FC loc_12C5: add rdx, [rcx+r8] add [rdx], esi loc_12CB: cmp rax, r9 jz short loc_12F0 loc_12D0:...
long long func0(unsigned int ***a1, int a2) { int v3; // ebx long long v4; // r8 long long v5; // rcx unsigned int *v6; // rsi signed int v7; // edi long long v8; // rdx long long v9; // rax signed int v10; // esi v3 = a2 - 1; if ( a2 - 1 >= 0 ) { v4 = 3LL * v3; do { v9 = 0LL; ...
func0: ENDBR64 PUSH RBX MOV R11,RDI MOV EBX,ESI SUB EBX,0x1 JS 0x0010130f MOVSXD RAX,EBX LEA R8,[RAX + RAX*0x2] SHL R8,0x3 JMP 0x001012fc LAB_001012c5: ADD RDX,qword ptr [RCX + R8*0x1] ADD dword ptr [RDX],ESI LAB_001012cb: CMP RAX,R9 JZ 0x001012f0 LAB_001012d0: MOV RCX,qword ptr [R11] MOV RSI,qword ptr [RCX + R10*0x1] ...
/* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >&, int, int) */ int [16] func0(vector *param_1,int param_2,int param_3) { int iVar1; int iVar2; long lVar3; long lVar4; long lVar5; long lVar6; int4 in_register_00000014; int *piVa...
586
func0
#include <vector> #include <cassert> using namespace std;
int func0(vector<vector<int>>& tri, int m, int n) { for (int i = m - 1; i >= 0; --i) { for (int j = 0; j <= i; ++j) { if (tri[i+1][j] > tri[i+1][j+1]) { tri[i][j] += tri[i+1][j]; } else { tri[i][j] += tri[i+1][j+1]; } } ...
int main() { vector<vector<int>> triangle1{{1, 0, 0}, {4, 8, 0}, {1, 5, 3}}; assert(func0(triangle1, 2, 2) == 14); vector<vector<int>> triangle2{{13, 0, 0}, {7, 4, 0}, {2, 4, 6}}; assert(func0(triangle2, 2, 2) == 24); vector<vector<int>> triangle3{{2, 0, 0}, {11, 18, 0}, {21, 25, 33}}; ...
O2
cpp
func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >&, int, int): endbr64 push %rbx mov (%rdi),%rbx sub $0x1,%esi js 17c2 <_Z5func0RSt6vectorIS_IiSaIiEESaIS1_EEii+0x62> movslq %esi,%rax mov %esi,%r10d lea (%rax,%rax,2),%rax lea (%rbx,%r...
_Z5func0RSt6vectorIS_IiSaIiEESaIS1_EEii: endbr64 push r12 push rbp push rbx mov ebx, esi mov rbp, [rdi] sub ebx, 1 js short loc_18BA movsxd rsi, esi lea rax, [rsi+rsi*2] lea r11, [rbp+rax*8+0] xchg ax, ax loc_1870: lea r10d, [rbx+1] mov r8, [r11] mov r12, [r11-18h] xor ...
long long func0(unsigned int ***a1, int a2) { unsigned int **v2; // rbp int v3; // ebx unsigned int **v4; // r11 unsigned int *v5; // r8 long long v6; // r12 long long v7; // rdx _DWORD *v8; // rcx signed int v9; // edi signed int v10; // esi int v11; // eax int v12; // r9d int v13; // eax v...
func0: ENDBR64 PUSH R12 PUSH RBP PUSH RBX MOV EBX,ESI MOV RBP,qword ptr [RDI] SUB EBX,0x1 JS 0x001018ba MOVSXD RSI,ESI LEA RAX,[RSI + RSI*0x2] LEA R11,[RBP + RAX*0x8] NOP LAB_00101870: LEA R10D,[RBX + 0x1] MOV R8,qword ptr [R11] MOV R12,qword ptr [R11 + -0x18] XOR EDX,EDX MOVSXD R10,R10D SHL R10,0x2 NOP dword ptr [RAX]...
/* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >&, int, int) */ int4 func0(vector *param_1,int param_2,int param_3) { int *piVar1; int iVar2; int iVar3; int8 *puVar4; long lVar5; long lVar6; long lVar7; int iVar8; long *plVar9;...
587
func0
#include <vector> #include <cassert> using namespace std;
int func0(vector<vector<int>>& tri, int m, int n) { for (int i = m - 1; i >= 0; --i) { for (int j = 0; j <= i; ++j) { if (tri[i+1][j] > tri[i+1][j+1]) { tri[i][j] += tri[i+1][j]; } else { tri[i][j] += tri[i+1][j+1]; } } ...
int main() { vector<vector<int>> triangle1{{1, 0, 0}, {4, 8, 0}, {1, 5, 3}}; assert(func0(triangle1, 2, 2) == 14); vector<vector<int>> triangle2{{13, 0, 0}, {7, 4, 0}, {2, 4, 6}}; assert(func0(triangle2, 2, 2) == 24); vector<vector<int>> triangle3{{2, 0, 0}, {11, 18, 0}, {21, 25, 33}}; ...
O3
cpp
func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >&, int, int): endbr64 mov (%rdi),%r10 sub $0x1,%esi js 1995 <_Z5func0RSt6vectorIS_IiSaIiEESaIS1_EEii+0x195> push %r15 movslq %esi,%rax mov %esi,%r8d push %r14 lea (%rax,%rax,2),%rax pus...
_Z5func0RSt6vectorIS_IiSaIiEESaIS1_EEii: endbr64 mov r10, [rdi] mov edi, esi sub edi, 1 js loc_1A1D push r12 movsxd rax, esi mov r8d, esi push rbp lea rax, [rax+rax*2] push rbx lea r9, [r10+rax*8] nop dword ptr [rax+00h] loc_18B8: mov rcx, [r9] mov rsi, [r9-18h] test ...
long long func0(unsigned int ***a1, unsigned int a2) { unsigned int **v2; // r10 int v3; // edi unsigned int v4; // r8d unsigned int **i; // r9 unsigned int *v6; // rcx long long v7; // rsi long long v8; // rax signed int v9; // ebx signed int v10; // r11d int v11; // edx int v12; // r12d int v...
func0: ENDBR64 MOV R10,qword ptr [RDI] MOV EDI,ESI SUB EDI,0x1 JS 0x00101a1d PUSH R12 MOVSXD RAX,ESI MOV R8D,ESI PUSH RBP LEA RAX,[RAX + RAX*0x2] PUSH RBX LEA R9,[R10 + RAX*0x8] NOP dword ptr [RAX] LAB_001018b8: MOV RCX,qword ptr [R9] MOV RSI,qword ptr [R9 + -0x18] TEST EDI,EDI JZ 0x001018d3 LEA RDX,[RCX + 0x4] MOV RAX...
/* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >&, int, int) */ int [16] func0(vector *param_1,int param_2,int param_3) { int *piVar1; int *piVar2; uint *puVar3; ulong *puVar4; int *piVar5; int *piVar6; int8 uVar7; int8 uVar8; ...
588
func0
#include <iostream> #include <assert.h> int sum_digits_single(int x) { int ans = 0; while (x) { ans += x % 10; x /= 10; } return ans; } int closest(int x) { int ans = 0; while (ans * 10 + 9 <= x) { ans = ans * 10 + 9; } return ans; }
int func0(int N) { int A = closest(N); return sum_digits_single(A) + sum_digits_single(N - A); }
int main() { assert(func0(35) == 17); assert(func0(7) == 7); assert(func0(100) == 19); return 0; }
O0
cpp
func0(int): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x18,%rsp mov %edi,-0x1c(%rbp) mov -0x1c(%rbp),%eax mov %eax,%edi callq 11f3 <_Z7closesti> mov %eax,-0xc(%rbp) mov -0xc(%rbp),%eax mov %eax,%edi callq 1189 <_Z17sum_digits_singlei> mov %eax,%ebx mov -0x1c(%rbp),%eax sub -0...
_Z5func0i: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 18h mov [rbp+var_1C], edi mov eax, [rbp+var_1C] mov edi, eax; int call _Z7closesti; closest(int) mov [rbp+var_C], eax mov eax, [rbp+var_C] mov edi, eax; int call _Z17sum_digits_singlei; sum_digits_single(int) mov ...
long long func0(int a1) { int v1; // ebx int v3; // [rsp+14h] [rbp-Ch] v3 = closest(a1); v1 = sum_digits_single(v3); return v1 + (unsigned int)sum_digits_single(a1 - v3); }
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x18 MOV dword ptr [RBP + -0x1c],EDI MOV EAX,dword ptr [RBP + -0x1c] MOV EDI,EAX CALL 0x001011b3 MOV dword ptr [RBP + -0xc],EAX MOV EAX,dword ptr [RBP + -0xc] MOV EDI,EAX CALL 0x00101149 MOV EBX,EAX MOV EAX,dword ptr [RBP + -0x1c] SUB EAX,dword ptr [RBP + -0xc] MOV E...
/* func0(int) */ int func0(int param_1) { int iVar1; int iVar2; iVar1 = closest(param_1); iVar2 = sum_digits_single(iVar1); iVar1 = sum_digits_single(param_1 - iVar1); return iVar1 + iVar2; }
589
func0
#include <iostream> #include <assert.h> int sum_digits_single(int x) { int ans = 0; while (x) { ans += x % 10; x /= 10; } return ans; } int closest(int x) { int ans = 0; while (ans * 10 + 9 <= x) { ans = ans * 10 + 9; } return ans; }
int func0(int N) { int A = closest(N); return sum_digits_single(A) + sum_digits_single(N - A); }
int main() { assert(func0(35) == 17); assert(func0(7) == 7); assert(func0(100) == 19); return 0; }
O1
cpp
func0(int): endbr64 push %r12 push %rbp push %rbx mov %edi,%ebx callq 11c1 <_Z7closesti> mov %eax,%r12d mov %eax,%edi callq 1189 <_Z17sum_digits_singlei> mov %eax,%ebp sub %r12d,%ebx mov %ebx,%edi callq 1189 <_Z17sum_digits_singlei> add %ebp,%eax pop %rbx pop %rbp pop %r12 retq
_Z5func0i: endbr64 push r12 push rbp push rbx mov ebx, edi call _Z7closesti; closest(int) mov r12d, eax mov edi, eax; int call _Z17sum_digits_singlei; sum_digits_single(int) mov ebp, eax sub ebx, r12d mov edi, ebx; int call _Z17sum_digits_singlei; sum_digits_single(int) add ...
long long func0(int a1) { int v1; // r12d int v2; // ebp v1 = closest(a1); v2 = sum_digits_single(v1); return v2 + (unsigned int)sum_digits_single(a1 - v1); }
func0: ENDBR64 PUSH R12 PUSH RBP PUSH RBX MOV EBX,EDI CALL 0x00101181 MOV R12D,EAX MOV EDI,EAX CALL 0x00101149 MOV EBP,EAX SUB EBX,R12D MOV EDI,EBX CALL 0x00101149 ADD EAX,EBP POP RBX POP RBP POP R12 RET
/* func0(int) */ int func0(int param_1) { int iVar1; int iVar2; iVar1 = closest(param_1); iVar2 = sum_digits_single(iVar1); iVar1 = sum_digits_single(param_1 - iVar1); return iVar1 + iVar2; }
590
func0
#include <iostream> #include <assert.h> int sum_digits_single(int x) { int ans = 0; while (x) { ans += x % 10; x /= 10; } return ans; } int closest(int x) { int ans = 0; while (ans * 10 + 9 <= x) { ans = ans * 10 + 9; } return ans; }
int func0(int N) { int A = closest(N); return sum_digits_single(A) + sum_digits_single(N - A); }
int main() { assert(func0(35) == 17); assert(func0(7) == 7); assert(func0(100) == 19); return 0; }
O2
cpp
func0(int): endbr64 cmp $0x8,%edi jle 1328 <_Z5func0i+0x88> xor %eax,%eax nopl 0x0(%rax,%rax,1) lea 0x9(%rax),%esi lea (%rsi,%rsi,4),%eax add %eax,%eax lea 0x8(%rax),%edx cmp %edx,%edi jg 12b0 <_Z5func0i+0x10> mov %esi,%edx xor %r8d,%r8d mov $0xcccccccd,%r9d nopw 0x0(%rax,%rax,1...
_Z5func0i: endbr64 mov edx, edi cmp edi, 8 jle loc_12F0 xor eax, eax nop dword ptr [rax+00000000h] loc_1278: lea r8d, [rax+9] lea eax, [r8+r8*4] add eax, eax lea ecx, [rax+8] cmp edx, ecx jg short loc_1278 mov ecx, r8d xor edi, edi xchg ax, ax loc_1290: movsxd ra...
long long func0(int a1) { int v1; // edx int v2; // eax int v3; // r8d int v4; // ecx unsigned int v5; // edi int v6; // esi v1 = a1; if ( a1 <= 8 ) { v5 = 0; } else { v2 = 0; do { v3 = v2 + 9; v2 = 10 * (v2 + 9); } while ( a1 > v2 + 8 ); v4 = v3; v5...
func0: ENDBR64 MOV EDX,EDI CMP EDI,0x8 JLE 0x001012f0 XOR EAX,EAX NOP dword ptr [RAX] LAB_00101278: LEA R8D,[RAX + 0x9] LEA EAX,[R8 + R8*0x4] ADD EAX,EAX LEA ECX,[RAX + 0x8] CMP EDX,ECX JG 0x00101278 MOV ECX,R8D XOR EDI,EDI NOP LAB_00101290: MOVSXD RAX,ECX MOV ESI,ECX IMUL RAX,RAX,0x66666667 SAR ESI,0x1f SAR RAX,0x22 S...
/* func0(int) */ int func0(int param_1) { int iVar1; int iVar2; int iVar3; int iVar4; if (param_1 < 9) { iVar3 = 0; } else { iVar3 = 0; do { iVar4 = iVar3 + 9; iVar3 = iVar4 * 10; } while (iVar3 + 8 < param_1); iVar3 = 0; iVar2 = iVar4; do { iVar1 = iVar2...
591
func0
#include <iostream> #include <assert.h> int sum_digits_single(int x) { int ans = 0; while (x) { ans += x % 10; x /= 10; } return ans; } int closest(int x) { int ans = 0; while (ans * 10 + 9 <= x) { ans = ans * 10 + 9; } return ans; }
int func0(int N) { int A = closest(N); return sum_digits_single(A) + sum_digits_single(N - A); }
int main() { assert(func0(35) == 17); assert(func0(7) == 7); assert(func0(100) == 19); return 0; }
O3
cpp
func0(int): endbr64 cmp $0x8,%edi jle 1328 <_Z5func0i+0x88> xor %eax,%eax nopl 0x0(%rax,%rax,1) lea 0x9(%rax),%esi lea (%rsi,%rsi,4),%eax add %eax,%eax lea 0x8(%rax),%edx cmp %edx,%edi jg 12b0 <_Z5func0i+0x10> mov %esi,%edx xor %r8d,%r8d mov $0xcccccccd,%r9d nopw 0x0(%rax,%rax,1...
_Z5func0i: endbr64 mov edx, edi cmp edi, 8 jle loc_12B0 xor eax, eax nop dword ptr [rax+00000000h] loc_1238: lea r8d, [rax+9] lea eax, [r8+r8*4] add eax, eax lea ecx, [rax+8] cmp edx, ecx jg short loc_1238 mov ecx, r8d xor edi, edi xchg ax, ax loc_1250: movsxd ra...
long long func0(int a1) { int v1; // edx int v2; // eax int v3; // r8d int v4; // ecx unsigned int v5; // edi int v6; // esi v1 = a1; if ( a1 <= 8 ) { v5 = 0; } else { v2 = 0; do { v3 = v2 + 9; v2 = 10 * (v2 + 9); } while ( a1 > v2 + 8 ); v4 = v3; v5...
func0: ENDBR64 MOV EDX,EDI CMP EDI,0x8 JLE 0x001012b0 XOR EAX,EAX NOP dword ptr [RAX] LAB_00101238: LEA R8D,[RAX + 0x9] LEA EAX,[R8 + R8*0x4] ADD EAX,EAX LEA ECX,[RAX + 0x8] CMP EDX,ECX JG 0x00101238 MOV ECX,R8D XOR EDI,EDI NOP LAB_00101250: MOVSXD RAX,ECX MOV ESI,ECX IMUL RAX,RAX,0x66666667 SAR ESI,0x1f SAR RAX,0x22 S...
/* func0(int) */ int func0(int param_1) { int iVar1; int iVar2; int iVar3; int iVar4; if (param_1 < 9) { iVar3 = 0; } else { iVar3 = 0; do { iVar4 = iVar3 + 9; iVar3 = iVar4 * 10; } while (iVar3 + 8 < param_1); iVar3 = 0; iVar2 = iVar4; do { iVar1 = iVar2...
592
func0
#include <vector> #include <cassert>
int func0(std::vector<int> arr, int n) { std::vector<int> dp(n, 1); for (int i = 0; i < n; i++) { for (int j = 0; j < i; j++) { if (arr[i] == arr[j] + 1 || arr[i] == arr[j] - 1) { dp[i] = std::max(dp[i], dp[j] + 1); } } } int result = 1; ...
int main() { assert(func0({1, 2, 3, 4, 5, 3, 2}, 7) == 6); assert(func0({10, 9, 4, 5, 4, 8, 6}, 7) == 3); assert(func0({1, 2, 3, 2, 3, 7, 2, 1}, 8) == 7); return 0; }
O0
cpp
func0(std::vector<int, std::allocator<int> >, int): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x58,%rsp mov %rdi,-0x58(%rbp) mov %esi,-0x5c(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax lea -0x45(%rbp),%rax mov %rax,%rdi callq 1796 <_ZNSaIiEC1Ev> movl $0x1,-0x44(%rbp)...
_Z5func0St6vectorIiSaIiEEi: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 58h mov [rbp+var_58], rdi mov [rbp+var_5C], esi mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax lea rax, [rbp+var_4D] mov [rbp+var_38], rax nop nop mov [rbp+var_4C], 1 mov eax, [rbp+var_5C] m...
long long func0(long long a1, int a2) { int v2; // ebx int v3; // ebx long long v5; // rax int v6; // ebx int *v7; // rax unsigned int v8; // ebx char v10; // [rsp+13h] [rbp-4Dh] BYREF int v11; // [rsp+14h] [rbp-4Ch] BYREF int i; // [rsp+18h] [rbp-48h] int j; // [rsp+1Ch] [rbp-44h] int v14; // [r...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x58 MOV qword ptr [RBP + -0x58],RDI MOV dword ptr [RBP + -0x5c],ESI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX LEA RAX,[RBP + -0x4d] MOV qword ptr [RBP + -0x38],RAX NOP NOP MOV dword ptr [RBP + -0x4c],0x1 MOV EAX,dword ptr [RBP + -0x5c] ...
/* func0(std::vector<int, std::allocator<int> >, int) */ int func0(vector param_1,int param_2) { int iVar1; bool bVar2; int *piVar3; int4 in_register_0000003c; vector<int,std::allocator<int>> *this; long in_FS_OFFSET; allocator local_55; int local_54; int local_50; int local_4c; int local_48; ...
593
func0
#include <vector> #include <cassert>
int func0(std::vector<int> arr, int n) { std::vector<int> dp(n, 1); for (int i = 0; i < n; i++) { for (int j = 0; j < i; j++) { if (arr[i] == arr[j] + 1 || arr[i] == arr[j] - 1) { dp[i] = std::max(dp[i], dp[j] + 1); } } } int result = 1; ...
int main() { assert(func0({1, 2, 3, 4, 5, 3, 2}, 7) == 6); assert(func0({10, 9, 4, 5, 4, 8, 6}, 7) == 3); assert(func0({1, 2, 3, 2, 3, 7, 2, 1}, 8) == 7); return 0; }
O1
cpp
func0(std::vector<int, std::allocator<int> >, int): endbr64 push %r13 push %r12 push %rbp push %rbx sub $0x18,%rsp mov %fs:0x28,%rax mov %rax,0x8(%rsp) xor %eax,%eax movslq %esi,%rax movabs $0x1fffffffffffffff,%rdx cmp %rdx,%rax ja 1290 <_Z5func0St6vectorIiSaIiEEi+0x87> mov %rdi,%rbx mov ...
_Z5func0St6vectorIiSaIiEEi: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 28h mov rax, fs:28h mov [rsp+58h+var_40], rax xor eax, eax movsxd rax, esi mov rcx, rax shr rcx, 3Dh jnz short loc_128D mov rbp, rdi mov ebx, esi mov r12d, 1 test...
long long func0(long long *a1, int a2) { int v4; // r12d unsigned long long v5; // r15 int *v6; // rax int *v7; // r11 int *v8; // rdx int *v9; // r12 int v10; // esi long long i; // r8 int *v12; // rsi unsigned long long v13; // rax int v14; // edx long long v15; // rdi long long v16; // r10...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x28 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x18],RAX XOR EAX,EAX MOVSXD RAX,ESI MOV RCX,RAX SHR RCX,0x3d JNZ 0x0010128d MOV RBP,RDI MOV EBX,ESI MOV R12D,0x1 TEST RAX,RAX JZ 0x00101354 LEA R15,[RAX*0x4] MOV RDI,R15 CALL 0x001010e0 MO...
/* func0(std::vector<int, std::allocator<int> >, int) */ int func0(vector param_1,int param_2) { long lVar1; int iVar2; int iVar3; long lVar4; ulong uVar5; int *piVar6; int *piVar7; long lVar8; int iVar9; int *piVar10; int4 in_register_0000003c; long lVar11; long in_FS_OFFSET; bool bVar12;...
594
func0
#include <vector> #include <cassert>
int func0(std::vector<int> arr, int n) { std::vector<int> dp(n, 1); for (int i = 0; i < n; i++) { for (int j = 0; j < i; j++) { if (arr[i] == arr[j] + 1 || arr[i] == arr[j] - 1) { dp[i] = std::max(dp[i], dp[j] + 1); } } } int result = 1; ...
int main() { assert(func0({1, 2, 3, 4, 5, 3, 2}, 7) == 6); assert(func0({10, 9, 4, 5, 4, 8, 6}, 7) == 3); assert(func0({1, 2, 3, 2, 3, 7, 2, 1}, 8) == 7); return 0; }
O2
cpp
func0(std::vector<int, std::allocator<int> >, int): endbr64 movabs $0x1fffffffffffffff,%rdx push %r13 movslq %esi,%rax push %r12 push %rbp push %rbx sub $0x8,%rsp cmp %rdx,%rax ja 1578 <_Z5func0St6vectorIiSaIiEEi+0x128> mov $0x1,%r13d test %rax,%rax je 155a <_Z5func0St6vectorIiSaIiEEi+0x10a> ...
_Z5func0St6vectorIiSaIiEEi: endbr64 push r15 movsxd rax, esi push r14 mov rsi, rax push r13 push r12 push rbp push rbx sub rsp, 18h shr rsi, 3Dh jnz loc_1547 mov ebx, 1 test rax, rax jz loc_1523 lea r13, ds:0[rax*4] mov rbp, rdi mov r12, rax mov rdi, r13; u...
long long func0(long long *a1, int a2) { int v2; // ebx unsigned long long v3; // r13 int *v6; // rax int *v7; // r11 int *v8; // r8 int *v9; // rdi long long v10; // rsi int v11; // ebx long long v12; // r14 long long v13; // r10 unsigned long long v14; // rax _DWORD *v15; // r15 int v16; //...
func0: ENDBR64 PUSH R15 MOVSXD RAX,ESI PUSH R14 MOV RSI,RAX PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x18 SHR RSI,0x3d JNZ 0x00101547 MOV EBX,0x1 TEST RAX,RAX JZ 0x00101523 LEA R13,[RAX*0x4] MOV RBP,RDI MOV R12,RAX MOV RDI,R13 CALL 0x001010e0 MOV R11,RAX LEA R8,[RAX + R13*0x1] TEST R13B,0x4 JZ 0x00101468 MOV dword p...
/* func0(std::vector<int, std::allocator<int> >, int) */ void * func0(vector param_1,int param_2) { uint *puVar1; ulong uVar2; int iVar3; int iVar4; long lVar5; void *pvVar6; ulong uVar7; uint *puVar8; uint *puVar9; long lVar10; void *extraout_RAX; uint uVar11; int iVar12; long lVar13; l...
595
func0
#include <vector> #include <cassert>
int func0(std::vector<int> arr, int n) { std::vector<int> dp(n, 1); for (int i = 0; i < n; i++) { for (int j = 0; j < i; j++) { if (arr[i] == arr[j] + 1 || arr[i] == arr[j] - 1) { dp[i] = std::max(dp[i], dp[j] + 1); } } } int result = 1; ...
int main() { assert(func0({1, 2, 3, 4, 5, 3, 2}, 7) == 6); assert(func0({10, 9, 4, 5, 4, 8, 6}, 7) == 3); assert(func0({1, 2, 3, 2, 3, 7, 2, 1}, 8) == 7); return 0; }
O3
cpp
func0(std::vector<int, std::allocator<int> >, int): endbr64 movabs $0x1fffffffffffffff,%rax push %r14 movslq %esi,%r14 push %r13 push %r12 push %rbp push %rbx cmp %rax,%r14 ja 1633 <_Z5func0St6vectorIiSaIiEEi+0x223> mov $0x1,%r13d test %r14,%r14 je 160d <_Z5func0St6vectorIiSaIiEEi+0x1fd> mov ...
_Z5func0St6vectorIiSaIiEEi: endbr64 push r13 push r12 movsxd r12, esi push rbp mov rax, r12 push rbx sub rsp, 8 shr rax, 3Dh jnz loc_164E mov ebx, 1 test r12, r12 jz loc_161F mov rbp, r12 shl r12, 2 mov r13, rdi mov rdi, r12; unsigned __int64 call __Znwm; oper...
long long func0(long long *a1, signed int a2) { int v2; // ebx unsigned long long v4; // r12 __m128i *v6; // rax __m128i *v7; // r9 char *v8; // rdi unsigned long long v9; // rdx __m128i si128; // xmm0 long long v11; // rcx __m128i *v12; // rsi long long v13; // r11 int *v14; // rsi long long v...
func0: ENDBR64 PUSH R13 PUSH R12 MOVSXD R12,ESI PUSH RBP MOV RAX,R12 PUSH RBX SUB RSP,0x8 SHR RAX,0x3d JNZ 0x0010164e MOV EBX,0x1 TEST R12,R12 JZ 0x0010161f MOV RBP,R12 SHL R12,0x2 MOV R13,RDI MOV RDI,R12 CALL 0x001010e0 MOV R9,RAX LEA RDI,[RAX + R12*0x1] LEA RAX,[R12 + -0x4] MOV RDX,RAX SHR RDX,0x2 ADD RDX,0x1 CMP RAX...
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* func0(std::vector<int, std::allocator<int> >, int) */ void * func0(vector param_1,int param_2) { int iVar1; int iVar2; void *pvVar3; uint uVar4; uint *puVar5; uint *puVar6; uint *puVar7; int8 uVar8; int8 uVar9; ...
596
func0
#include <assert.h>
bool func0(int a, int b, int c) { if (a == b) { return true; } if ((b - a) * c > 0 && (b - a) % c == 0) { return true; } return false; }
int main() { assert(func0(1, 7, 3) == true); assert(func0(1, -3, 5) == false); assert(func0(3, 2, 5) == false); return 0; }
O0
cpp
func0(int, int, int): endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x4(%rbp) mov %esi,-0x8(%rbp) mov %edx,-0xc(%rbp) mov -0x4(%rbp),%eax cmp -0x8(%rbp),%eax jne 1169 <_Z5func0iii+0x20> mov $0x1,%eax jmp 1193 <_Z5func0iii+0x4a> mov -0x8(%rbp),%eax sub -0x4(%rbp),%eax imul -0xc(%rbp),%ea...
_Z5func0iii: endbr64 push rbp mov rbp, rsp mov [rbp+var_4], edi mov [rbp+var_8], esi mov [rbp+var_C], edx mov eax, [rbp+var_4] cmp eax, [rbp+var_8] jnz short loc_1169 mov eax, 1 jmp short loc_1193 loc_1169: mov eax, [rbp+var_8] sub eax, [rbp+var_4] imul eax, [rbp+var_C]...
_BOOL8 func0(int a1, int a2, int a3) { if ( a1 == a2 ) return 1LL; return a3 * (a2 - a1) > 0 && !((a2 - a1) % a3); }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x4],EDI MOV dword ptr [RBP + -0x8],ESI MOV dword ptr [RBP + -0xc],EDX MOV EAX,dword ptr [RBP + -0x4] CMP EAX,dword ptr [RBP + -0x8] JNZ 0x00101169 MOV EAX,0x1 JMP 0x00101193 LAB_00101169: MOV EAX,dword ptr [RBP + -0x8] SUB EAX,dword ptr [RBP + -0x4] IMUL EAX,dw...
/* func0(int, int, int) */ int8 func0(int param_1,int param_2,int param_3) { int8 uVar1; if (param_1 == param_2) { uVar1 = 1; } else if (((param_2 - param_1) * param_3 < 1) || ((param_2 - param_1) % param_3 != 0)) { uVar1 = 0; } else { uVar1 = 1; } return uVar1; }
597
func0
#include <assert.h>
bool func0(int a, int b, int c) { if (a == b) { return true; } if ((b - a) * c > 0 && (b - a) % c == 0) { return true; } return false; }
int main() { assert(func0(1, 7, 3) == true); assert(func0(1, -3, 5) == false); assert(func0(3, 2, 5) == false); return 0; }
O1
cpp
func0(int, int, int): endbr64 mov %esi,%eax mov %edx,%ecx mov $0x1,%edx cmp %esi,%edi je 1152 <_Z5func0iii+0x29> sub %edi,%eax mov %eax,%esi imul %ecx,%esi mov $0x0,%edx test %esi,%esi jle 1152 <_Z5func0iii+0x29> cltd idiv %ecx test %edx,%edx sete %dl mov %edx,%eax retq
_Z5func0iii: endbr64 mov eax, esi mov ecx, edx mov edx, 1 cmp edi, esi jz short loc_1152 sub eax, edi mov esi, eax imul esi, ecx mov edx, 0 test esi, esi jle short loc_1152 cdq idiv ecx test edx, edx setz dl loc_1152: mov eax, edx retn
long long func0(int a1, int a2, int a3) { unsigned int v4; // edx int v5; // eax v4 = 1; if ( a1 != a2 ) { v5 = a2 - a1; v4 = 0; if ( a3 * (a2 - a1) > 0 ) { v4 = v5 % a3; LOBYTE(v4) = v5 % a3 == 0; } } return v4; }
func0: ENDBR64 MOV EAX,ESI MOV ECX,EDX MOV EDX,0x1 CMP EDI,ESI JZ 0x00101152 SUB EAX,EDI MOV ESI,EAX IMUL ESI,ECX MOV EDX,0x0 TEST ESI,ESI JLE 0x00101152 CDQ IDIV ECX TEST EDX,EDX SETZ DL LAB_00101152: MOV EAX,EDX RET
/* func0(int, int, int) */ ulong func0(int param_1,int param_2,int param_3) { long lVar1; ulong uVar2; uVar2 = 1; if (param_1 != param_2) { uVar2 = 0; if (0 < (param_2 - param_1) * param_3) { lVar1 = (long)(param_2 - param_1) % (long)param_3; uVar2 = CONCAT71((int7)((ulong)lVar1 >> 8),(...
598
func0
#include <assert.h>
bool func0(int a, int b, int c) { if (a == b) { return true; } if ((b - a) * c > 0 && (b - a) % c == 0) { return true; } return false; }
int main() { assert(func0(1, 7, 3) == true); assert(func0(1, -3, 5) == false); assert(func0(3, 2, 5) == false); return 0; }
O2
cpp
func0(int, int, int): endbr64 mov %esi,%eax mov %edx,%ecx mov $0x1,%r8d cmp %esi,%edi je 1169 <_Z5func0iii+0x29> sub %edi,%eax xor %r8d,%r8d mov %eax,%edx imul %ecx,%edx test %edx,%edx jle 1169 <_Z5func0iii+0x29> cltd idiv %ecx test %edx,%edx sete %r8b mov %r8d,%eax retq nopl ...
_Z5func0iii: endbr64 mov ecx, edx mov eax, esi mov edx, 1 cmp edi, esi jz short loc_1166 sub eax, edi xor edx, edx mov esi, eax imul esi, ecx test esi, esi jle short loc_1166 cdq idiv ecx test edx, edx setz dl loc_1166: mov eax, edx retn
long long func0(int a1, int a2, int a3) { unsigned int v4; // edx int v5; // eax v4 = 1; if ( a1 != a2 ) { v5 = a2 - a1; v4 = 0; if ( a3 * (a2 - a1) > 0 ) { v4 = v5 % a3; LOBYTE(v4) = v5 % a3 == 0; } } return v4; }
func0: ENDBR64 MOV ECX,EDX MOV EAX,ESI MOV EDX,0x1 CMP EDI,ESI JZ 0x00101166 SUB EAX,EDI XOR EDX,EDX MOV ESI,EAX IMUL ESI,ECX TEST ESI,ESI JLE 0x00101166 CDQ IDIV ECX TEST EDX,EDX SETZ DL LAB_00101166: MOV EAX,EDX RET
/* func0(int, int, int) */ ulong func0(int param_1,int param_2,int param_3) { long lVar1; ulong uVar2; uVar2 = 1; if (param_1 != param_2) { uVar2 = 0; if (0 < (param_2 - param_1) * param_3) { lVar1 = (long)(param_2 - param_1) % (long)param_3; uVar2 = CONCAT71((int7)((ulong)lVar1 >> 8),(...
599
func0
#include <assert.h>
bool func0(int a, int b, int c) { if (a == b) { return true; } if ((b - a) * c > 0 && (b - a) % c == 0) { return true; } return false; }
int main() { assert(func0(1, 7, 3) == true); assert(func0(1, -3, 5) == false); assert(func0(3, 2, 5) == false); return 0; }
O3
cpp
func0(int, int, int): endbr64 mov %esi,%eax mov %edx,%ecx mov $0x1,%r8d cmp %esi,%edi je 1169 <_Z5func0iii+0x29> sub %edi,%eax xor %r8d,%r8d mov %eax,%edx imul %ecx,%edx test %edx,%edx jle 1169 <_Z5func0iii+0x29> cltd idiv %ecx test %edx,%edx sete %r8b mov %r8d,%eax retq nopl ...
_Z5func0iii: endbr64 mov ecx, edx mov eax, esi mov edx, 1 cmp edi, esi jz short loc_1166 sub eax, edi xor edx, edx mov esi, eax imul esi, ecx test esi, esi jle short loc_1166 cdq idiv ecx test edx, edx setz dl loc_1166: mov eax, edx retn
long long func0(int a1, int a2, int a3) { unsigned int v4; // edx int v5; // eax v4 = 1; if ( a1 != a2 ) { v5 = a2 - a1; v4 = 0; if ( a3 * (a2 - a1) > 0 ) { v4 = v5 % a3; LOBYTE(v4) = v5 % a3 == 0; } } return v4; }
func0: ENDBR64 MOV ECX,EDX MOV EAX,ESI MOV EDX,0x1 CMP EDI,ESI JZ 0x00101166 SUB EAX,EDI XOR EDX,EDX MOV ESI,EAX IMUL ESI,ECX TEST ESI,ESI JLE 0x00101166 CDQ IDIV ECX TEST EDX,EDX SETZ DL LAB_00101166: MOV EAX,EDX RET
/* func0(int, int, int) */ ulong func0(int param_1,int param_2,int param_3) { long lVar1; ulong uVar2; uVar2 = 1; if (param_1 != param_2) { uVar2 = 0; if (0 < (param_2 - param_1) * param_3) { lVar1 = (long)(param_2 - param_1) % (long)param_3; uVar2 = CONCAT71((int7)((ulong)lVar1 >> 8),(...
600
func0
#include <assert.h>
bool func0(int p, int q) { while (q != 0) { int temp = q; q = p % q; p = temp; } return p == 1; }
int main() { assert(func0(17, 13) == true); assert(func0(15, 21) == false); assert(func0(25, 45) == false); return 0; }
O0
cpp
func0(int, int): endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x14(%rbp) mov %esi,-0x18(%rbp) cmpl $0x0,-0x18(%rbp) je 1175 <_Z5func0ii+0x2c> mov -0x18(%rbp),%eax mov %eax,-0x4(%rbp) mov -0x14(%rbp),%eax cltd idivl -0x18(%rbp) mov %edx,-0x18(%rbp) mov -0x4(%rbp),%eax mov %eax,-0x14(%rbp...
_Z5func0ii: endbr64 push rbp mov rbp, rsp mov [rbp+var_14], edi mov [rbp+var_18], esi jmp short loc_116F loc_1159: mov eax, [rbp+var_18] mov [rbp+var_4], eax mov eax, [rbp+var_14] cdq idiv [rbp+var_18] mov [rbp+var_18], edx mov eax, [rbp+var_4] mov [rbp+var_14], eax loc_116...
bool func0(int a1, int a2) { int v5; // [rsp+14h] [rbp-4h] while ( a2 ) { v5 = a2; a2 = a1 % a2; a1 = v5; } return a1 == 1; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x14],EDI MOV dword ptr [RBP + -0x18],ESI JMP 0x0010116f LAB_00101159: MOV EAX,dword ptr [RBP + -0x18] MOV dword ptr [RBP + -0x4],EAX MOV EAX,dword ptr [RBP + -0x14] CDQ IDIV dword ptr [RBP + -0x18] MOV dword ptr [RBP + -0x18],EDX MOV EAX,dword ptr [RBP + -0x4] ...
/* func0(int, int) */ bool func0(int param_1,int param_2) { int iVar1; int4 local_20; int4 local_1c; local_20 = param_2; local_1c = param_1; while (local_20 != 0) { iVar1 = local_1c % local_20; local_1c = local_20; local_20 = iVar1; } return local_1c == 1; }
601
func0
#include <assert.h>
bool func0(int p, int q) { while (q != 0) { int temp = q; q = p % q; p = temp; } return p == 1; }
int main() { assert(func0(17, 13) == true); assert(func0(15, 21) == false); assert(func0(25, 45) == false); return 0; }
O1
cpp
func0(int, int): endbr64 mov %edi,%eax test %esi,%esi je 1167 <_Z5func0ii+0x1e> mov %esi,%ecx cltd idiv %esi mov %edx,%esi mov %ecx,%eax test %edx,%edx jne 1153 <_Z5func0ii+0xa> cmp $0x1,%ecx sete %al retq mov %edi,%ecx jmp 1160 <_Z5func0ii+0x17>
_Z5func0ii: endbr64 mov eax, edi test esi, esi jz short loc_1167 loc_1153: mov ecx, esi cdq idiv esi mov esi, edx mov eax, ecx test edx, edx jnz short loc_1153 loc_1160: cmp ecx, 1 setz al retn loc_1167: mov ecx, edi jmp short loc_1160
bool func0(int a1, int a2) { int v2; // eax int v3; // ecx v2 = a1; if ( a2 ) { do { v3 = a2; a2 = v2 % a2; v2 = v3; } while ( a2 ); } else { v3 = a1; } return v3 == 1; }
func0: ENDBR64 MOV EAX,EDI TEST ESI,ESI JZ 0x00101167 LAB_00101153: MOV ECX,ESI CDQ IDIV ESI MOV ESI,EDX MOV EAX,ECX TEST EDX,EDX JNZ 0x00101153 LAB_00101160: CMP ECX,0x1 SETZ AL RET LAB_00101167: MOV ECX,EDI JMP 0x00101160
/* func0(int, int) */ int8 func0(int param_1,int param_2) { ulong uVar1; uVar1 = (ulong)(uint)param_1; if (param_2 != 0) { do { param_1 = param_2; param_2 = (int)uVar1 % param_1; uVar1 = (ulong)(uint)param_1; } while (param_2 != 0); } return CONCAT71((int7)(uVar1 >> 8),param_1 =...
602
func0
#include <assert.h>
bool func0(int p, int q) { while (q != 0) { int temp = q; q = p % q; p = temp; } return p == 1; }
int main() { assert(func0(17, 13) == true); assert(func0(15, 21) == false); assert(func0(25, 45) == false); return 0; }
O2
cpp
func0(int, int): endbr64 mov %edi,%eax mov %esi,%edx test %esi,%esi je 1248 <_Z5func0ii+0x28> nopl 0x0(%rax) mov %edx,%ecx cltd idiv %ecx mov %ecx,%eax test %edx,%edx jne 1230 <_Z5func0ii+0x10> cmp $0x1,%ecx sete %al retq nopw 0x0(%rax,%rax,1) mov %edi,%ecx cmp $0x1,%ecx sete %...
_Z5func0ii: endbr64 mov eax, edi mov edx, esi test esi, esi jz short loc_1248 nop dword ptr [rax+00h] loc_1230: mov ecx, edx cdq idiv ecx mov eax, ecx test edx, edx jnz short loc_1230 cmp ecx, 1 setz al retn loc_1248: mov ecx, edi cmp ecx, 1 setz al retn
bool func0(int a1, int a2) { int v2; // eax int v3; // edx int v4; // ecx v2 = a1; v3 = a2; if ( !a2 ) return a1 == 1; do { v4 = v3; v3 = v2 % v3; v2 = v4; } while ( v3 ); return v4 == 1; }
func0: ENDBR64 MOV EAX,EDI MOV EDX,ESI TEST ESI,ESI JZ 0x00101248 NOP dword ptr [RAX] LAB_00101230: MOV ECX,EDX CDQ IDIV ECX MOV EAX,ECX TEST EDX,EDX JNZ 0x00101230 CMP ECX,0x1 SETZ AL RET LAB_00101248: MOV ECX,EDI CMP ECX,0x1 SETZ AL RET
/* func0(int, int) */ bool func0(int param_1,int param_2) { int iVar1; if (param_2 != 0) { do { iVar1 = param_2; param_2 = param_1 % iVar1; param_1 = iVar1; } while (param_2 != 0); return iVar1 == 1; } return param_1 == 1; }
603
func0
#include <assert.h>
bool func0(int p, int q) { while (q != 0) { int temp = q; q = p % q; p = temp; } return p == 1; }
int main() { assert(func0(17, 13) == true); assert(func0(15, 21) == false); assert(func0(25, 45) == false); return 0; }
O3
cpp
func0(int, int): endbr64 mov %edi,%eax mov %esi,%edx test %esi,%esi je 1248 <_Z5func0ii+0x28> nopl 0x0(%rax) mov %edx,%ecx cltd idiv %ecx mov %ecx,%eax test %edx,%edx jne 1230 <_Z5func0ii+0x10> cmp $0x1,%ecx sete %al retq nopw 0x0(%rax,%rax,1) mov %edi,%ecx cmp $0x1,%ecx sete %...
_Z5func0ii: endbr64 mov eax, edi mov edx, esi test esi, esi jz short loc_1248 nop dword ptr [rax+00h] loc_1230: mov ecx, edx cdq idiv ecx mov eax, ecx test edx, edx jnz short loc_1230 cmp ecx, 1 setz al retn loc_1248: mov ecx, edi cmp ecx, 1 setz al retn
bool func0(int a1, int a2) { int v2; // eax int v3; // edx int v4; // ecx v2 = a1; v3 = a2; if ( !a2 ) return a1 == 1; do { v4 = v3; v3 = v2 % v3; v2 = v4; } while ( v3 ); return v4 == 1; }
func0: ENDBR64 MOV EAX,EDI MOV EDX,ESI TEST ESI,ESI JZ 0x00101248 NOP dword ptr [RAX] LAB_00101230: MOV ECX,EDX CDQ IDIV ECX MOV EAX,ECX TEST EDX,EDX JNZ 0x00101230 CMP ECX,0x1 SETZ AL RET LAB_00101248: MOV ECX,EDI CMP ECX,0x1 SETZ AL RET
/* func0(int, int) */ bool func0(int param_1,int param_2) { int iVar1; if (param_2 != 0) { do { iVar1 = param_2; param_2 = param_1 % iVar1; param_1 = iVar1; } while (param_2 != 0); return iVar1 == 1; } return param_1 == 1; }
604
func0
#include <iostream> #include <vector> #include <assert.h> std::vector<int> merge(std::vector<int> a, std::vector<int> b) { std::vector<int> c; while (!a.empty() && !b.empty()) { if (a.front() < b.front()) { c.push_back(a.front()); a.erase(a.begin()); } else {...
std::vector<int> func0(std::vector<int> x) { if (x.size() == 0 || x.size() == 1) { return x; } else { int middle = x.size() / 2; std::vector<int> a = func0(std::vector<int>(x.begin(), x.begin() + middle)); std::vector<int> b = func0(std::vector<int>(x.begin() + middle, x.en...
int main() { std::vector<int> v1 = {3, 4, 2, 6, 5, 7, 1, 9}; std::vector<int> r1 = {1, 2, 3, 4, 5, 6, 7, 9}; assert(func0(v1) == r1); std::vector<int> v2 = {7, 25, 45, 78, 11, 33, 19}; std::vector<int> r2 = {7, 11, 19, 25, 33, 45, 78}; assert(func0(v2) == r2); std::vector<int> v3 ...
O0
cpp
func0(std::vector<int, std::allocator<int> >): endbr64 push %rbp mov %rsp,%rbp push %r12 push %rbx sub $0xa0,%rsp mov %rdi,-0xa8(%rbp) mov %rsi,-0xb0(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax mov -0xb0(%rbp),%rax mov %rax,%rdi callq 2526 <_ZNKSt6vectorIiSaIiEE4sizeEv> ...
_Z5func0St6vectorIiSaIiEE: endbr64 push rbp mov rbp, rsp push r12 push rbx sub rsp, 0B0h mov [rbp+var_B8], rdi mov [rbp+var_C0], rsi mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax mov rax, [rbp+var_C0] mov rdi, rax call _ZNKSt6vectorIiSaIiEE4sizeEv; std::vector<int>::...
long long func0(long long a1, long long a2) { long long v3; // rbx long long v4; // rax long long v5; // r12 long long v6; // rbx long long v7; // rax char v9; // [rsp+1Bh] [rbp-A5h] BYREF int v10; // [rsp+1Ch] [rbp-A4h] _BYTE *v11; // [rsp+20h] [rbp-A0h] char *v12; // [rsp+28h] [rbp-98h] _BYTE v13...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R12 PUSH RBX SUB RSP,0xb0 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 MOV RAX,qword ptr [RBP + -0xc0] MOV RDI,RAX CALL 0x00102568 TEST RAX,RAX JZ 0x0010157d MOV RAX,qword ptr [RBP + -0xc0...
/* func0(std::vector<int, std::allocator<int> >) */ vector<int,std::allocator<int>> * func0(vector param_1) { bool bVar1; long lVar2; ulong uVar3; int8 uVar4; int8 uVar5; vector<int,std::allocator<int>> *in_RSI; int4 in_register_0000003c; long in_FS_OFFSET; __new_allocator<int> local_ad; int local...
605
func0
#include <iostream> #include <vector> #include <assert.h> std::vector<int> merge(std::vector<int> a, std::vector<int> b) { std::vector<int> c; while (!a.empty() && !b.empty()) { if (a.front() < b.front()) { c.push_back(a.front()); a.erase(a.begin()); } else {...
std::vector<int> func0(std::vector<int> x) { if (x.size() == 0 || x.size() == 1) { return x; } else { int middle = x.size() / 2; std::vector<int> a = func0(std::vector<int>(x.begin(), x.begin() + middle)); std::vector<int> b = func0(std::vector<int>(x.begin() + middle, x.en...
int main() { std::vector<int> v1 = {3, 4, 2, 6, 5, 7, 1, 9}; std::vector<int> r1 = {1, 2, 3, 4, 5, 6, 7, 9}; assert(func0(v1) == r1); std::vector<int> v2 = {7, 25, 45, 78, 11, 33, 19}; std::vector<int> r2 = {7, 11, 19, 25, 33, 45, 78}; assert(func0(v2) == r2); std::vector<int> v3 ...
O1
cpp
func0(std::vector<int, std::allocator<int> >): endbr64 push %r14 push %r13 push %r12 push %rbp push %rbx add $0xffffffffffffff80,%rsp mov %rdi,%rbp mov %rsi,%rbx mov %fs:0x28,%rax mov %rax,0x78(%rsp) xor %eax,%eax mov 0x8(%rsi),%rdx mov (%rsi),%r12 mov %rdx,%rax sub %r12,%rax cmp...
_Z5func0St6vectorIiSaIiEE: endbr64 push r14 push r13 push r12 push rbp push rbx add rsp, 0FFFFFFFFFFFFFF80h mov r12, rdi mov rbx, rsi mov rax, fs:28h mov [rsp+0A8h+var_30], rax xor eax, eax mov rdx, [rsi+8] mov r13, [rsi] mov rax, rdx sub rax, r13 cmp rax, 4 jz...
_QWORD * func0(_QWORD *a1, long long a2) { _DWORD *v2; // rdx _DWORD *v3; // r13 long long v4; // rax signed long long v5; // rbp _DWORD *v6; // rax char *v8; // r14 long long v9; // rax _DWORD *v10; // rbp signed long long v11; // rbx _DWORD *v12; // rax char *v13; // r13 unsigned long long v14...
func0: ENDBR64 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX ADD RSP,-0x80 MOV R12,RDI MOV RBX,RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x78],RAX XOR EAX,EAX MOV RDX,qword ptr [RSI + 0x8] MOV R13,qword ptr [RSI] MOV RAX,RDX SUB RAX,R13 CMP RAX,0x4 JZ 0x001013f1 CMP R13,RDX JZ 0x001013f1 SHL RAX,0x1d SAR RAX,...
/* func0(std::vector<int, std::allocator<int> >) */ int8 * func0(vector param_1) { int4 *__src; long lVar1; ulong uVar2; int8 uVar3; size_t sVar4; int4 *puVar5; long *in_RSI; int4 in_register_0000003c; int8 *puVar6; long in_FS_OFFSET; int4 *local_a8; long local_a0; long local_98; int4 *loc...
606
func0
#include <iostream> #include <vector> #include <assert.h> std::vector<int> merge(std::vector<int> a, std::vector<int> b) { std::vector<int> c; while (!a.empty() && !b.empty()) { if (a.front() < b.front()) { c.push_back(a.front()); a.erase(a.begin()); } else {...
std::vector<int> func0(std::vector<int> x) { if (x.size() == 0 || x.size() == 1) { return x; } else { int middle = x.size() / 2; std::vector<int> a = func0(std::vector<int>(x.begin(), x.begin() + middle)); std::vector<int> b = func0(std::vector<int>(x.begin() + middle, x.en...
int main() { std::vector<int> v1 = {3, 4, 2, 6, 5, 7, 1, 9}; std::vector<int> r1 = {1, 2, 3, 4, 5, 6, 7, 9}; assert(func0(v1) == r1); std::vector<int> v2 = {7, 25, 45, 78, 11, 33, 19}; std::vector<int> r2 = {7, 11, 19, 25, 33, 45, 78}; assert(func0(v2) == r2); std::vector<int> v3 ...
O2
cpp
func0(std::vector<int, std::allocator<int> >): endbr64 push %r15 push %r14 push %r13 push %r12 mov %rdi,%r12 push %rbp push %rbx mov %rsi,%rbx sub $0x88,%rsp mov 0x8(%rsi),%rdx mov (%rsi),%rbp mov %fs:0x28,%rax mov %rax,0x78(%rsp) xor %eax,%eax mov %rdx,%rax sub %rbp,%rax cmp ...
_Z5func0St6vectorIiSaIiEE: endbr64 push r15 push r14 push r13 push r12 mov r12, rdi push rbp push rbx mov rbx, rsi sub rsp, 88h mov rdx, [rsi+8] mov r13, [rsi] mov rax, fs:28h mov [rsp+0B8h+var_40], rax xor eax, eax mov rax, rdx sub rax, r13 cmp rax, 4 jz ...
__m128i * func0(__m128i *a1, long long a2, long long a3, int a4, int a5, int a6) { char *v6; // rdx char *v7; // r13 size_t v8; // rbp _DWORD *v9; // rax int v10; // r14d int v11; // edx int v12; // ecx int v13; // r8d int v14; // r9d long long v15; // rax _DWORD *v16; // rbp signed long long v1...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 MOV R12,RDI PUSH RBP PUSH RBX MOV RBX,RSI SUB RSP,0x88 MOV RDX,qword ptr [RSI + 0x8] MOV R13,qword ptr [RSI] MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x78],RAX XOR EAX,EAX MOV RAX,RDX SUB RAX,R13 CMP RAX,0x4 JZ 0x00101f40 CMP R13,RDX JZ 0x00101f40 SHL RAX,0x1d ...
/* func0(std::vector<int, std::allocator<int> >) */ int8 * func0(vector param_1) { int8 uVar1; int8 uVar2; int8 uVar3; void *pvVar4; long lVar5; int4 *__dest; ulong uVar6; int4 *puVar7; int8 *puVar8; int in_CL; int extraout_DL; int4 *puVar9; int uVar10; int (*in_RSI) [16]; ulong uVar11; ...
607
func0
#include <iostream> #include <vector> #include <assert.h> std::vector<int> merge(std::vector<int> a, std::vector<int> b) { std::vector<int> c; while (!a.empty() && !b.empty()) { if (a.front() < b.front()) { c.push_back(a.front()); a.erase(a.begin()); } else {...
std::vector<int> func0(std::vector<int> x) { if (x.size() == 0 || x.size() == 1) { return x; } else { int middle = x.size() / 2; std::vector<int> a = func0(std::vector<int>(x.begin(), x.begin() + middle)); std::vector<int> b = func0(std::vector<int>(x.begin() + middle, x.en...
int main() { std::vector<int> v1 = {3, 4, 2, 6, 5, 7, 1, 9}; std::vector<int> r1 = {1, 2, 3, 4, 5, 6, 7, 9}; assert(func0(v1) == r1); std::vector<int> v2 = {7, 25, 45, 78, 11, 33, 19}; std::vector<int> r2 = {7, 11, 19, 25, 33, 45, 78}; assert(func0(v2) == r2); std::vector<int> v3 ...
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 mov %rsi,%rbx sub $0x88,%rsp mov 0x8(%rsi),%rdx mov (%rsi),%rbp mov %fs:0x28,%rax mov %rax,0x78(%rsp) xor %eax,%eax mov %rdx,%rax sub %rbp,%rax cmp ...
_Z5func0St6vectorIiSaIiEE: endbr64 push r15 push r14 push r13 mov r13, rdi push r12 push rbp push rbx mov rbx, rsi sub rsp, 88h mov rdx, [rsi+8] mov rbp, [rsi] mov rax, fs:28h mov [rsp+0B8h+var_40], rax xor eax, eax mov rax, rdx sub rax, rbp cmp rax, 4 jz ...
__m128i * func0(__m128i *a1, long long a2) { char *v2; // rdx char *v3; // rbp size_t v4; // r12 _DWORD *v5; // rax _DWORD *v6; // r14 long long v7; // rax _DWORD *v8; // r12 signed long long v9; // rbx _DWORD *v10; // rax char *v11; // r15 unsigned long long v12; // r12 char *v13; // rax char...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 MOV R13,RDI PUSH R12 PUSH RBP PUSH RBX MOV RBX,RSI SUB RSP,0x88 MOV RDX,qword ptr [RSI + 0x8] MOV RBP,qword ptr [RSI] MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x78],RAX XOR EAX,EAX MOV RAX,RDX SUB RAX,RBP CMP RAX,0x4 JZ 0x00101f20 CMP RBP,RDX JZ 0x00101f20 SHL RAX,0x1d ...
/* func0(std::vector<int, std::allocator<int> >) */ int8 * func0(vector param_1) { int8 uVar1; int8 uVar2; long lVar3; int4 *puVar4; int8 uVar5; vector<int,std::allocator<int>> *pvVar6; vector<int,std::allocator<int>> *in_RSI; int4 in_register_0000003c; int8 *puVar7; int4 *puVar8; ulong uVar9; ...
608
func0
#include <assert.h> #include <tuple>
std::tuple<double, double> func0(double a, double b, double c) { double x = -b / (2 * a); double y = ((4 * a * c) - (b * b)) / (4 * a); return std::make_tuple(x, y); }
int main() { assert(func0(5,3,2) == std::make_tuple(-0.3, 1.55)); assert(func0(9,8,4) == std::make_tuple(-0.4444444444444444, 2.2222222222222223)); assert(func0(2,4,6) == std::make_tuple(-1.0, 4.0)); return 0; }
O0
cpp
func0(double, double, double): endbr64 push %rbp mov %rsp,%rbp sub $0x40,%rsp mov %rdi,-0x28(%rbp) movsd %xmm0,-0x30(%rbp) movsd %xmm1,-0x38(%rbp) movsd %xmm2,-0x40(%rbp) mov %fs:0x28,%rax mov %rax,-0x8(%rbp) xor %eax,%eax movsd -0x38(%rbp),%xmm0 movq 0xf5c(%rip),%xmm1 xorpd %xmm0,%xmm1 movsd...
_Z5func0ddd: endbr64 push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_28], rdi movsd [rbp+var_30], xmm0 movsd [rbp+var_38], xmm1 movsd [rbp+var_40], xmm2 mov rax, fs:28h mov [rbp+var_8], rax xor eax, eax movsd xmm0, [rbp+var_38] movq xmm1, cs:qword_2100 xorpd xmm1, xmm0 movsd xm...
long long func0( double a1, double a2, double a3, long long a4, long long a5, long long a6, long long a7, long long a8, long long a9) { double v10; // [rsp+28h] [rbp-18h] BYREF double v11[2]; // [rsp+30h] [rbp-10h] BYREF *(_QWORD *)&v11[1] ...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x28],RDI MOVSD qword ptr [RBP + -0x30],XMM0 MOVSD qword ptr [RBP + -0x38],XMM1 MOVSD qword ptr [RBP + -0x40],XMM2 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX XOR EAX,EAX MOVSD XMM0,qword ptr [RBP + -0x38] MOVQ XMM1,qword ptr [0x00102...
/* func0(double, double, double) */ double * func0(double param_1,double param_2,double param_3) { double *in_RDI; long in_FS_OFFSET; double local_20; double local_18; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_20 = (double)(DAT_00102100 ^ (ulong)param_2) / (param_1 + param_1); ...
609
func0
#include <assert.h> #include <tuple>
std::tuple<double, double> func0(double a, double b, double c) { double x = -b / (2 * a); double y = ((4 * a * c) - (b * b)) / (4 * a); return std::make_tuple(x, y); }
int main() { assert(func0(5,3,2) == std::make_tuple(-0.3, 1.55)); assert(func0(9,8,4) == std::make_tuple(-0.4444444444444444, 2.2222222222222223)); assert(func0(2,4,6) == std::make_tuple(-1.0, 4.0)); return 0; }
O1
cpp
func0(double, double, double): endbr64 mov %rdi,%rax movapd %xmm0,%xmm3 mulsd 0xecc(%rip),%xmm3 mulsd %xmm3,%xmm2 movapd %xmm1,%xmm4 mulsd %xmm1,%xmm4 subsd %xmm4,%xmm2 divsd %xmm3,%xmm2 movsd %xmm2,(%rdi) xorpd 0xeb4(%rip),%xmm1 addsd %xmm0,%xmm0 divsd %xmm0,%xmm1 movsd %xmm1,0x8(%rdi) retq
_Z5func0ddd: endbr64 mov rax, rdi movapd xmm3, xmm0 mulsd xmm3, cs:qword_2008 mulsd xmm2, xmm3 movapd xmm4, xmm1 mulsd xmm4, xmm1 subsd xmm2, xmm4 divsd xmm2, xmm3 movsd qword ptr [rdi], xmm2 xorpd xmm1, cs:xmmword_2010 addsd xmm0, xmm0 divsd xmm1, xmm0 movsd qword ptr [rdi+8], xmm1 retn
double * func0(double a1, double a2, double a3, double *a4) { double *result; // rax result = a4; *a4 = (a3 * (a1 * 4.0) - a2 * a2) / (a1 * 4.0); a4[1] = -a2 / (a1 + a1); return result; }
func0: ENDBR64 MOV RAX,RDI MOVAPD XMM3,XMM0 MULSD XMM3,qword ptr [0x00102008] MULSD XMM2,XMM3 MOVAPD XMM4,XMM1 MULSD XMM4,XMM1 SUBSD XMM2,XMM4 DIVSD XMM2,XMM3 MOVSD qword ptr [RDI],XMM2 XORPD XMM1,xmmword ptr [0x00102010] ADDSD XMM0,XMM0 DIVSD XMM1,XMM0 MOVSD qword ptr [RDI + 0x8],XMM1 RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* func0(double, double, double) */ void func0(double param_1,double param_2,double param_3) { double *in_RDI; *in_RDI = (param_3 * param_1 * _DAT_00102008 - param_2 * param_2) / (param_1 * _DAT_00102008); in_RDI[1] = (doubl...
610
func0
#include <assert.h> #include <tuple>
std::tuple<double, double> func0(double a, double b, double c) { double x = -b / (2 * a); double y = ((4 * a * c) - (b * b)) / (4 * a); return std::make_tuple(x, y); }
int main() { assert(func0(5,3,2) == std::make_tuple(-0.3, 1.55)); assert(func0(9,8,4) == std::make_tuple(-0.4444444444444444, 2.2222222222222223)); assert(func0(2,4,6) == std::make_tuple(-1.0, 4.0)); return 0; }
O2
cpp
func0(double, double, double): endbr64 movsd 0xebc(%rip),%xmm3 movapd %xmm1,%xmm4 mov %rdi,%rax mulsd %xmm1,%xmm4 xorpd 0xeb1(%rip),%xmm1 mulsd %xmm0,%xmm3 addsd %xmm0,%xmm0 divsd %xmm0,%xmm1 mulsd %xmm3,%xmm2 subsd %xmm4,%xmm2 divsd %xmm3,%xmm2 movsd %xmm1,0x8(%rdi) movsd %xmm2,(%rdi) retq nopw %cs:0x0...
_Z5func0ddd: endbr64 unpcklpd xmm0, xmm0 mov rax, rdi mulpd xmm0, cs:xmmword_2010 movapd xmm3, xmm0 mulsd xmm3, xmm2 movapd xmm2, xmm1 mulsd xmm2, xmm1 xorpd xmm1, cs:xmmword_2020 subsd xmm3, xmm2 unpcklpd xmm3, xmm1 divpd xmm3, xmm0 movups xmmword ptr [rdi], xmm3 retn
__m128d * func0(__m128d a1, __m128d a2, double a3, __m128d *a4) { __m128d *result; // rax __m128d v5; // xmm0 __m128d v6; // xmm3 result = a4; v5 = _mm_mul_pd(_mm_unpacklo_pd(a1, a1), (__m128d)xmmword_2010); v6.m128d_f64[1] = v5.m128d_f64[1]; v6.m128d_f64[0] = v5.m128d_f64[0] * a3 - a2.m128d_f64[0] * a2....
func0: ENDBR64 UNPCKLPD XMM0,XMM0 MOV RAX,RDI MULPD XMM0,xmmword ptr [0x00102010] MOVAPD XMM3,XMM0 MULSD XMM3,XMM2 MOVAPD XMM2,XMM1 MULSD XMM2,XMM1 XORPD XMM1,xmmword ptr [0x00102020] SUBSD XMM3,XMM2 UNPCKLPD XMM3,XMM1 DIVPD XMM3,XMM0 MOVUPS xmmword ptr [RDI],XMM3 RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* func0(double, double, double) */ void func0(double param_1,double param_2,double param_3) { int (*in_RDI) [16]; int auVar1 [16]; int auVar2 [16]; auVar1._0_8_ = param_1 * _DAT_00102010 * param_3 - param_2 * param_2; a...
611
func0
#include <assert.h> #include <tuple>
std::tuple<double, double> func0(double a, double b, double c) { double x = -b / (2 * a); double y = ((4 * a * c) - (b * b)) / (4 * a); return std::make_tuple(x, y); }
int main() { assert(func0(5,3,2) == std::make_tuple(-0.3, 1.55)); assert(func0(9,8,4) == std::make_tuple(-0.4444444444444444, 2.2222222222222223)); assert(func0(2,4,6) == std::make_tuple(-1.0, 4.0)); return 0; }
O3
cpp
func0(double, double, double): endbr64 movsd 0xebc(%rip),%xmm3 movapd %xmm1,%xmm4 mov %rdi,%rax mulsd %xmm1,%xmm4 xorpd 0xeb1(%rip),%xmm1 mulsd %xmm0,%xmm3 addsd %xmm0,%xmm0 divsd %xmm0,%xmm1 mulsd %xmm3,%xmm2 subsd %xmm4,%xmm2 divsd %xmm3,%xmm2 movsd %xmm1,0x8(%rdi) movsd %xmm2,(%rdi) retq nopw %cs:0x0...
_Z5func0ddd: endbr64 unpcklpd xmm0, xmm0 mov rax, rdi mulpd xmm0, cs:xmmword_2010 movapd xmm3, xmm0 mulsd xmm3, xmm2 movapd xmm2, xmm1 mulsd xmm2, xmm1 xorpd xmm1, cs:xmmword_2020 subsd xmm3, xmm2 unpcklpd xmm3, xmm1 divpd xmm3, xmm0 movups xmmword ptr [rdi], xmm3 retn
__m128d * func0(__m128d a1, __m128d a2, double a3, __m128d *a4) { __m128d *result; // rax __m128d v5; // xmm0 __m128d v6; // xmm3 result = a4; v5 = _mm_mul_pd(_mm_unpacklo_pd(a1, a1), (__m128d)xmmword_2010); v6.m128d_f64[1] = v5.m128d_f64[1]; v6.m128d_f64[0] = v5.m128d_f64[0] * a3 - a2.m128d_f64[0] * a2....
func0: ENDBR64 UNPCKLPD XMM0,XMM0 MOV RAX,RDI MULPD XMM0,xmmword ptr [0x00102010] MOVAPD XMM3,XMM0 MULSD XMM3,XMM2 MOVAPD XMM2,XMM1 MULSD XMM2,XMM1 XORPD XMM1,xmmword ptr [0x00102020] SUBSD XMM3,XMM2 UNPCKLPD XMM3,XMM1 DIVPD XMM3,XMM0 MOVUPS xmmword ptr [RDI],XMM3 RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* func0(double, double, double) */ void func0(double param_1,double param_2,double param_3) { int (*in_RDI) [16]; int auVar1 [16]; int auVar2 [16]; auVar1._0_8_ = param_1 * _DAT_00102010 * param_3 - param_2 * param_2; a...
612
func0
#include <vector> #include <cassert>
std::vector<int> func0(const std::vector<std::vector<int>>& nums, int N) { std::vector<int> result; for (const auto& i : nums) { result.push_back(i[N]); } return result; }
int main() { assert((func0({{1, 2, 3, 2}, {4, 5, 6, 2}, {7, 1, 9, 5}}, 0) == std::vector<int>{1, 4, 7})); assert((func0({{1, 2, 3, 2}, {4, 5, 6, 2}, {7, 1, 9, 5}}, 2) == std::vector<int>{3, 6, 9})); assert((func0({{1, 2, 3, 2}, {4, 5, 6, 2}, {7, 1, 9, 5}}, 3) == std::vector<int>{2, 2, 5})); return...
O0
cpp
func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, int): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x58,%rsp mov %rdi,-0x48(%rbp) mov %rsi,-0x50(%rbp) mov %edx,-0x54(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor ...
_Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EEi: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 58h mov [rbp+var_48], rdi mov [rbp+var_50], rsi mov [rbp+var_54], edx mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax mov rax, [rbp+var_48] mov rdi, rax call _ZNSt6vectorIiSaIiEEC...
long long func0(long long a1, long long a2, int a3) { long long v3; // rax long long v6; // [rsp+28h] [rbp-38h] BYREF _QWORD v7[2]; // [rsp+30h] [rbp-30h] BYREF long long v8; // [rsp+40h] [rbp-20h] unsigned long long v9; // [rsp+48h] [rbp-18h] v9 = __readfsqword(0x28u); std::vector<int>::vector(a1); v...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x58 MOV qword ptr [RBP + -0x48],RDI MOV qword ptr [RBP + -0x50],RSI MOV dword ptr [RBP + -0x54],EDX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX MOV RAX,qword ptr [RBP + -0x48] MOV RDI,RAX CALL 0x00102154 MOV RAX,qword ptr [RBP + -0x50] MO...
/* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, int) */ vector * func0(vector *param_1,int param_2) { bool bVar1; int *piVar2; int in_EDX; int4 in_register_00000034; long in_FS_OFFSET; int8 local_40; int8 local_38; vecto...
613
func0
#include <vector> #include <cassert>
std::vector<int> func0(const std::vector<std::vector<int>>& nums, int N) { std::vector<int> result; for (const auto& i : nums) { result.push_back(i[N]); } return result; }
int main() { assert((func0({{1, 2, 3, 2}, {4, 5, 6, 2}, {7, 1, 9, 5}}, 0) == std::vector<int>{1, 4, 7})); assert((func0({{1, 2, 3, 2}, {4, 5, 6, 2}, {7, 1, 9, 5}}, 2) == std::vector<int>{3, 6, 9})); assert((func0({{1, 2, 3, 2}, {4, 5, 6, 2}, {7, 1, 9, 5}}, 3) == std::vector<int>{2, 2, 5})); return...
O1
cpp
func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, int): endbr64 push %r13 push %r12 push %rbp push %rbx sub $0x8,%rsp mov %rdi,%rbx movq $0x0,(%rdi) movq $0x0,0x8(%rdi) movq $0x0,0x10(%rdi) mov (%rsi),%rbp mov 0x8(%rsi),...
_Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EEi: endbr64 push r13 push r12 push rbp push rbx sub rsp, 8 mov rbx, rdi mov qword ptr [rdi], 0 mov qword ptr [rdi+8], 0 mov qword ptr [rdi+10h], 0 mov rbp, [rsi] mov r13, [rsi+8] cmp r13, rbp jz short loc_134E movsxd rdx, edx lea ...
_QWORD * func0(_QWORD *a1, long long a2, int a3) { _QWORD *v3; // rbp _QWORD *v4; // r13 long long v5; // r12 _DWORD *v6; // rdx _DWORD *v7; // rsi *a1 = 0LL; a1[1] = 0LL; a1[2] = 0LL; v3 = *(_QWORD **)a2; v4 = *(_QWORD **)(a2 + 8); if ( v4 != *(_QWORD **)a2 ) { v5 = 4LL * a3; do { ...
func0: ENDBR64 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x8 MOV RBX,RDI MOV qword ptr [RDI],0x0 MOV qword ptr [RDI + 0x8],0x0 MOV qword ptr [RDI + 0x10],0x0 MOV RBP,qword ptr [RSI] MOV R13,qword ptr [RSI + 0x8] CMP R13,RBP JZ 0x0010134e MOVSXD RDX,EDX LEA R12,[RDX*0x4] JMP 0x0010131b LAB_0010130a: MOV RDI,RBX LAB_00...
/* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, int) */ vector * func0(vector *param_1,int param_2) { long *plVar1; int *piVar2; int in_EDX; int *piVar3; long *plVar4; int4 in_register_00000034; *(int8 *)param_1 = 0; ...
614
func0
#include <vector> #include <cassert>
std::vector<int> func0(const std::vector<std::vector<int>>& nums, int N) { std::vector<int> result; for (const auto& i : nums) { result.push_back(i[N]); } return result; }
int main() { assert((func0({{1, 2, 3, 2}, {4, 5, 6, 2}, {7, 1, 9, 5}}, 0) == std::vector<int>{1, 4, 7})); assert((func0({{1, 2, 3, 2}, {4, 5, 6, 2}, {7, 1, 9, 5}}, 2) == std::vector<int>{3, 6, 9})); assert((func0({{1, 2, 3, 2}, {4, 5, 6, 2}, {7, 1, 9, 5}}, 3) == std::vector<int>{2, 2, 5})); return...
O2
cpp
func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, int): endbr64 push %r15 push %r14 push %r13 mov %rdi,%r13 push %r12 push %rbp push %rbx sub $0x28,%rsp mov (%rsi),%rbx mov 0x8(%rsi),%r15 movq $0x0,(%rdi) movq $0x0,0x8...
_Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EEi: endbr64 push r13 pxor xmm0, xmm0 push r12 push rbp mov rbp, rdi push rbx sub rsp, 8 mov rbx, [rsi] mov r13, [rsi+8] movups xmmword ptr [rdi], xmm0 mov qword ptr [rdi+10h], 0 cmp r13, rbx jz short loc_1A6A movsxd rdx, edx xor eax,...
long long func0(long long a1, long long a2, int a3) { _QWORD *v3; // rbx _QWORD *v4; // r13 long long v5; // rax long long v6; // rsi long long v7; // r12 long long v8; // rsi _DWORD *v9; // rdx v3 = *(_QWORD **)a2; v4 = *(_QWORD **)(a2 + 8); *(_OWORD *)a1 = 0LL; *(_QWORD *)(a1 + 16) = 0LL; if...
func0: ENDBR64 PUSH R13 PXOR XMM0,XMM0 PUSH R12 PUSH RBP MOV RBP,RDI PUSH RBX SUB RSP,0x8 MOV RBX,qword ptr [RSI] MOV R13,qword ptr [RSI + 0x8] MOVUPS xmmword ptr [RDI],XMM0 MOV qword ptr [RDI + 0x10],0x0 CMP R13,RBX JZ 0x00101a6a MOVSXD RDX,EDX XOR EAX,EAX XOR ESI,ESI LEA R12,[RDX*0x4] JMP 0x00101a4e LAB_00101a30: MOV...
/* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, int) */ vector * func0(vector *param_1,int param_2) { long *plVar1; int *piVar2; int in_EDX; int *piVar3; long *plVar4; int4 in_register_00000034; int *piVar5; plVar4 = ...
615
func0
#include <vector> #include <cassert>
std::vector<int> func0(const std::vector<std::vector<int>>& nums, int N) { std::vector<int> result; for (const auto& i : nums) { result.push_back(i[N]); } return result; }
int main() { assert((func0({{1, 2, 3, 2}, {4, 5, 6, 2}, {7, 1, 9, 5}}, 0) == std::vector<int>{1, 4, 7})); assert((func0({{1, 2, 3, 2}, {4, 5, 6, 2}, {7, 1, 9, 5}}, 2) == std::vector<int>{3, 6, 9})); assert((func0({{1, 2, 3, 2}, {4, 5, 6, 2}, {7, 1, 9, 5}}, 3) == std::vector<int>{2, 2, 5})); return...
O3
cpp
func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, int): endbr64 push %r15 pxor %xmm0,%xmm0 push %r14 push %r13 push %r12 mov %rdi,%r12 push %rbp push %rbx sub $0x28,%rsp mov (%rsi),%rbx mov 0x8(%rsi),%r14 movups %xmm0,(%...
_Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EEi: endbr64 push r15 pxor xmm0, xmm0 push r14 push r13 push r12 push rbp mov rbp, rdi push rbx sub rsp, 28h mov rbx, [rsi] mov r14, [rsi+8] movups xmmword ptr [rdi], xmm0 mov qword ptr [rdi+10h], 0 cmp r14, rbx jz loc_1B8B movsxd r...
char ** func0(char **a1, long long a2, int a3) { _QWORD *v4; // rbx _QWORD *v5; // r14 char *v6; // r8 long long v7; // rcx long long v8; // r13 _DWORD *v9; // r12 signed long long v10; // r15 unsigned long long v11; // rax unsigned long long v12; // rdx char *v13; // r9 char *v15; // rax unsign...
func0: ENDBR64 PUSH R15 PXOR XMM0,XMM0 PUSH R14 PUSH R13 PUSH R12 PUSH RBP MOV RBP,RDI PUSH RBX SUB RSP,0x28 MOV RBX,qword ptr [RSI] MOV R14,qword ptr [RSI + 0x8] MOVUPS xmmword ptr [RDI],XMM0 MOV qword ptr [RDI + 0x10],0x0 CMP R14,RBX JZ 0x00101b8b MOVSXD RDX,EDX XOR R8D,R8D XOR ECX,ECX LEA R13,[RDX*0x4] JMP 0x00101af...
/* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, int) */ vector * func0(vector *param_1,int param_2) { long *plVar1; int4 *__src; ulong uVar2; void *__dest; vector *pvVar3; int4 *puVar4; int in_EDX; long *plVar5; int iV...
616
func0
#include <iostream> #include <assert.h>
int func0(int n) { int res = 0, count = 0, temp = n; while (temp > 0) { if (count % 2 == 1) { res = res | (1 << count); } count++; temp >>= 1; } return n ^ res; }
int main() { assert(func0(10) == 0); assert(func0(20) == 30); assert(func0(30) == 20); return 0; }
O0
cpp
func0(int): endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x14(%rbp) movl $0x0,-0xc(%rbp) movl $0x0,-0x8(%rbp) mov -0x14(%rbp),%eax mov %eax,-0x4(%rbp) cmpl $0x0,-0x4(%rbp) jle 11db <_Z5func0i+0x52> mov -0x8(%rbp),%eax cltd shr $0x1f,%edx add %edx,%eax and $0x1,%eax sub %edx,%eax cmp ...
_Z5func0i: endbr64 push rbp mov rbp, rsp mov [rbp+var_14], edi mov [rbp+var_C], 0 mov [rbp+var_8], 0 mov eax, [rbp+var_14] mov [rbp+var_4], eax jmp short loc_119B loc_116A: mov edx, [rbp+var_8] mov eax, edx sar eax, 1Fh shr eax, 1Fh add edx, eax and edx, 1 sub ...
long long func0(int a1) { int v2; // [rsp+8h] [rbp-Ch] int v3; // [rsp+Ch] [rbp-8h] int i; // [rsp+10h] [rbp-4h] v2 = 0; v3 = 0; for ( i = a1; i > 0; i >>= 1 ) { if ( v3 % 2 == 1 ) v2 |= 1 << v3; ++v3; } return v2 ^ (unsigned int)a1; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x14],EDI MOV dword ptr [RBP + -0xc],0x0 MOV dword ptr [RBP + -0x8],0x0 MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x4],EAX JMP 0x0010119b LAB_0010116a: MOV EDX,dword ptr [RBP + -0x8] MOV EAX,EDX SAR EAX,0x1f SHR EAX,0x1f ADD EDX,EAX AND EDX,0x1 SUB E...
/* func0(int) */ uint func0(int param_1) { int4 local_14; int4 local_10; int4 local_c; local_14 = 0; local_10 = 0; for (local_c = param_1; 0 < local_c; local_c = local_c >> 1) { if (local_10 % 2 == 1) { local_14 = local_14 | 1 << ((byte)local_10 & 0x1f); } local_10 = local_10 + 1; }...
617
func0
#include <iostream> #include <assert.h>
int func0(int n) { int res = 0, count = 0, temp = n; while (temp > 0) { if (count % 2 == 1) { res = res | (1 << count); } count++; temp >>= 1; } return n ^ res; }
int main() { assert(func0(10) == 0); assert(func0(20) == 30); assert(func0(30) == 20); return 0; }
O1
cpp
func0(int): endbr64 mov %edi,%r10d test %edi,%edi jle 11d3 <_Z5func0i+0x4a> mov %edi,%esi mov $0x0,%ecx mov $0x0,%eax mov $0x1,%r9d add $0x1,%ecx sar %esi test %esi,%esi jle 11d8 <_Z5func0i+0x4f> mov %ecx,%r8d shr $0x1f,%r8d lea (%rcx,%r8,1),%edx and $0x1,%edx sub %r8d,%edx...
_Z5func0i: endbr64 mov eax, edi test edi, edi jle short loc_1198 mov r8d, edi mov ecx, 0 mov esi, 0 mov r11d, 1 loc_1166: mov r9d, ecx shr r9d, 1Fh lea edx, [rcx+r9] and edx, 1 sub edx, r9d mov r9d, esi mov r10d, r11d shl r10d, cl or esi, r10d cmp edx,...
long long func0(int a1) { int v1; // r8d int v2; // ecx int v3; // esi int v4; // r9d if ( a1 <= 0 ) { v3 = 0; } else { v1 = a1; v2 = 0; v3 = 0; do { v4 = v3; v3 |= 1 << v2; if ( v2 % 2 != 1 ) v3 = v4; ++v2; v1 >>= 1; } while ( v1...
func0: ENDBR64 MOV EAX,EDI TEST EDI,EDI JLE 0x00101198 MOV R8D,EDI MOV ECX,0x0 MOV ESI,0x0 MOV R11D,0x1 LAB_00101166: MOV R9D,ECX SHR R9D,0x1f LEA EDX,[RCX + R9*0x1] AND EDX,0x1 SUB EDX,R9D MOV R9D,ESI MOV R10D,R11D SHL R10D,CL OR ESI,R10D CMP EDX,0x1 CMOVNZ ESI,R9D ADD ECX,0x1 SAR R8D,0x1 TEST R8D,R8D JG 0x00101166 LA...
/* func0(int) */ uint func0(int param_1) { uint uVar1; int iVar2; uint uVar3; int iVar4; if (param_1 < 1) { uVar3 = 0; } else { iVar2 = 0; uVar3 = 0; iVar4 = param_1; do { uVar1 = uVar3 | 1 << ((byte)iVar2 & 0x1f); if (iVar2 % 2 != 1) { uVar1 = uVar3; } ...
618
func0
#include <iostream> #include <assert.h>
int func0(int n) { int res = 0, count = 0, temp = n; while (temp > 0) { if (count % 2 == 1) { res = res | (1 << count); } count++; temp >>= 1; } return n ^ res; }
int main() { assert(func0(10) == 0); assert(func0(20) == 30); assert(func0(30) == 20); return 0; }
O2
cpp
func0(int): endbr64 test %edi,%edi jle 11f8 <_Z5func0i+0x38> mov %edi,%edx xor %ecx,%ecx xor %eax,%eax mov $0x1,%r8d add $0x1,%ecx sar %edx je 11ee <_Z5func0i+0x2e> test $0x1,%cl je 11d4 <_Z5func0i+0x14> mov %r8d,%esi shl %cl,%esi add $0x1,%ecx or %esi,%eax sar %edx jne ...
_Z5func0i: endbr64 test edi, edi jle short loc_1228 mov edx, edi xor ecx, ecx xor esi, esi mov eax, 1 nop dword ptr [rax+rax+00h] loc_1208: test cl, 1 jz short loc_1216 mov r8d, eax shl r8d, cl or esi, r8d loc_1216: add ecx, 1 sar edx, 1 jnz short loc_1208 mov...
long long func0(int a1) { int v1; // edx char v2; // cl int v3; // esi if ( a1 <= 0 ) return (unsigned int)a1; v1 = a1; v2 = 0; v3 = 0; do { if ( (v2 & 1) != 0 ) v3 |= 1 << v2; ++v2; v1 >>= 1; } while ( v1 ); return v3 ^ (unsigned int)a1; }
func0: ENDBR64 TEST EDI,EDI JLE 0x00101228 MOV EDX,EDI XOR ECX,ECX XOR ESI,ESI MOV EAX,0x1 NOP dword ptr [RAX + RAX*0x1] LAB_00101208: TEST CL,0x1 JZ 0x00101216 MOV R8D,EAX SHL R8D,CL OR ESI,R8D LAB_00101216: ADD ECX,0x1 SAR EDX,0x1 JNZ 0x00101208 MOV EAX,EDI XOR EAX,ESI RET LAB_00101228: MOV EAX,EDI RET
/* func0(int) */ uint func0(int param_1) { byte bVar1; int iVar2; uint uVar3; if (0 < param_1) { bVar1 = 0; uVar3 = 0; iVar2 = param_1; do { if ((bool)(bVar1 & 1)) { uVar3 = uVar3 | 1 << (bVar1 & 0x1f); } bVar1 = bVar1 + 1; iVar2 = iVar2 >> 1; } while (iV...
619
func0
#include <iostream> #include <assert.h>
int func0(int n) { int res = 0, count = 0, temp = n; while (temp > 0) { if (count % 2 == 1) { res = res | (1 << count); } count++; temp >>= 1; } return n ^ res; }
int main() { assert(func0(10) == 0); assert(func0(20) == 30); assert(func0(30) == 20); return 0; }
O3
cpp
func0(int): endbr64 test %edi,%edi jle 1200 <_Z5func0i+0x40> mov %edi,%edx sar %edx je 1208 <_Z5func0i+0x48> mov $0x1,%ecx xor %eax,%eax mov $0x1,%r8d nopl 0x0(%rax,%rax,1) test $0x1,%cl je 11ec <_Z5func0i+0x2c> mov %r8d,%esi shl %cl,%esi or %esi,%eax add $0x1,%ecx sar %e...
_Z5func0i: endbr64 test edi, edi jle short loc_1178 mov edx, edi xor ecx, ecx xor esi, esi mov eax, 1 nop dword ptr [rax+rax+00h] loc_1158: test cl, 1 jz short loc_1166 mov r8d, eax shl r8d, cl or esi, r8d loc_1166: add ecx, 1 sar edx, 1 jnz short loc_1158 mov...
long long func0(int a1) { int v1; // edx char v2; // cl int v3; // esi if ( a1 <= 0 ) return (unsigned int)a1; v1 = a1; v2 = 0; v3 = 0; do { if ( (v2 & 1) != 0 ) v3 |= 1 << v2; ++v2; v1 >>= 1; } while ( v1 ); return v3 ^ (unsigned int)a1; }
func0: ENDBR64 TEST EDI,EDI JLE 0x00101178 MOV EDX,EDI XOR ECX,ECX XOR ESI,ESI MOV EAX,0x1 NOP dword ptr [RAX + RAX*0x1] LAB_00101158: TEST CL,0x1 JZ 0x00101166 MOV R8D,EAX SHL R8D,CL OR ESI,R8D LAB_00101166: ADD ECX,0x1 SAR EDX,0x1 JNZ 0x00101158 MOV EAX,EDI XOR EAX,ESI RET LAB_00101178: MOV EAX,EDI RET
/* func0(int) */ uint func0(int param_1) { byte bVar1; int iVar2; uint uVar3; if (0 < param_1) { bVar1 = 0; uVar3 = 0; iVar2 = param_1; do { if ((bool)(bVar1 & 1)) { uVar3 = uVar3 | 1 << (bVar1 & 0x1f); } bVar1 = bVar1 + 1; iVar2 = iVar2 >> 1; } while (iV...
620
func0
#include <tuple> #include <string> #include <cassert> #include <utility>
std::tuple<std::pair<int, int>, std::pair<int, int>> func0( const std::tuple<std::pair<std::string, std::string>, std::pair<std::string, std::string>>& tuple_str) { return std::make_tuple( std::make_pair(std::stoi(std::get<0>(tuple_str).first), std::stoi(std::get<0>(tuple_str).second)), st...
int main() { assert(func0(std::make_tuple(std::make_pair("333", "33"), std::make_pair("1416", "55"))) == std::make_tuple(std::make_pair(333, 33), std::make_pair(1416, 55))); assert(func0(std::make_tuple(std::make_pair("999", "99"), std::make_pair("1000", "500"))) == std::make_tuple(std...
O0
cpp
func0(std::tuple<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::...
_Z5func0RKSt5tupleIJSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_ES7_EE: endbr64 push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_38], rdi mov [rbp+var_40], rsi mov rax, fs:28h mov [rbp+var_8], rax xor eax, eax mov rax, [rbp+var_40] mov rdi, rax call _ZSt3getIL...
long long func0(long long a1, long long a2) { long long v2; // rax long long v3; // rax long long v4; // rax long long v5; // rax int v7; // [rsp+18h] [rbp-28h] BYREF int v8; // [rsp+1Ch] [rbp-24h] BYREF int v9; // [rsp+20h] [rbp-20h] BYREF int v10; // [rsp+24h] [rbp-1Ch] BYREF long long v11; // [rsp...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x38],RDI MOV qword ptr [RBP + -0x40],RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX XOR EAX,EAX MOV RAX,qword ptr [RBP + -0x40] MOV RDI,RAX CALL 0x00101e64 ADD RAX,0x20 MOV EDX,0xa MOV ESI,0x0 MOV RDI,RAX CALL 0x00101a36 MOV dword p...
/* func0(std::tuple<std::pair<std::string, std::string >, std::pair<std::string, std::string > > const&) */ tuple * func0(tuple *param_1) { pair pVar1; type *ptVar2; int4 extraout_var; type *ptVar3; int4 extraout_var_00; tuple *in_RSI; long in_FS_OFFSET; int local_30; int local_2c; int local_28...
621
func0
#include <tuple> #include <string> #include <cassert> #include <utility>
std::tuple<std::pair<int, int>, std::pair<int, int>> func0( const std::tuple<std::pair<std::string, std::string>, std::pair<std::string, std::string>>& tuple_str) { return std::make_tuple( std::make_pair(std::stoi(std::get<0>(tuple_str).first), std::stoi(std::get<0>(tuple_str).second)), st...
int main() { assert(func0(std::make_tuple(std::make_pair("333", "33"), std::make_pair("1416", "55"))) == std::make_tuple(std::make_pair(333, 33), std::make_pair(1416, 55))); assert(func0(std::make_tuple(std::make_pair("999", "99"), std::make_pair("1000", "500"))) == std::make_tuple(std...
O1
cpp
func0(std::tuple<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::...
_Z5func0RKSt5tupleIJSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_ES7_EE: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 18h mov rbx, rdi mov rbp, rsi mov rdx, [rsi+20h] mov r8d, 0Ah mov ecx, 0 lea r13, aStoi; "stoi" mov rsi, r13...
_DWORD * func0(_DWORD *a1, _QWORD *a2) { int v2; // r14d int v3; // r15d int v4; // eax int v6; // [rsp+Ch] [rbp-3Ch] v2 = __gnu_cxx::__stoa<long,int,char,int>(&_isoc23_strtol, "stoi", a2[4], 0LL, 10LL); v3 = __gnu_cxx::__stoa<long,int,char,int>(&_isoc23_strtol, "stoi", *a2, 0LL, 10LL); v6 = __gnu_cxx::_...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x18 MOV RBX,RDI MOV RBP,RSI MOV RDX,qword ptr [RSI + 0x20] MOV R8D,0xa MOV ECX,0x0 LEA R13,[0x102004] MOV RSI,R13 MOV R12,qword ptr [0x00103ff8] MOV RDI,R12 CALL 0x001016a7 MOV R14D,EAX MOV RDX,qword ptr [RBP] MOV R8D,0xa MOV ECX,0x0 MOV RSI,...
/* func0(std::tuple<std::pair<std::string, std::string >, std::pair<std::string, std::string > > const&) */ tuple * func0(tuple *param_1) { int *puVar1; int iVar2; int iVar3; int iVar4; int iVar5; int8 *in_RSI; puVar1 = PTR___isoc23_strtol_00103ff8; iVar2 = __stoa<long,int,char,int> ...
622
func0
#include <tuple> #include <string> #include <cassert> #include <utility>
std::tuple<std::pair<int, int>, std::pair<int, int>> func0( const std::tuple<std::pair<std::string, std::string>, std::pair<std::string, std::string>>& tuple_str) { return std::make_tuple( std::make_pair(std::stoi(std::get<0>(tuple_str).first), std::stoi(std::get<0>(tuple_str).second)), st...
int main() { assert(func0(std::make_tuple(std::make_pair("333", "33"), std::make_pair("1416", "55"))) == std::make_tuple(std::make_pair(333, 33), std::make_pair(1416, 55))); assert(func0(std::make_tuple(std::make_pair("999", "99"), std::make_pair("1000", "500"))) == std::make_tuple(std...
O2
cpp
func0(std::tuple<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::...
_Z5func0RKSt5tupleIJSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_ES7_EE: endbr64 push r15 mov r8d, 0Ah xor ecx, ecx push r14 push r13 lea r13, aStoi; "stoi" push r12 push rbp mov rbp, rsi push rbx mov rbx, rdi sub rsp, 18h mov r12, cs:__isoc23_strtol_ptr m...
__m128i * func0(__m128i *a1, _QWORD *a2) { unsigned int v2; // r14d unsigned int v3; // r15d __m128i v4; // xmm1 __m128i *result; // rax unsigned int v6; // [rsp+Ch] [rbp-3Ch] v2 = __gnu_cxx::__stoa<long,int,char,int>(&_isoc23_strtol, "stoi", a2[4], 0LL, 10LL); v6 = __gnu_cxx::__stoa<long,int,char,int>(&...
func0: ENDBR64 PUSH R15 MOV R8D,0xa XOR ECX,ECX PUSH R14 PUSH R13 LEA R13,[0x102004] PUSH R12 PUSH RBP MOV RBP,RSI PUSH RBX MOV RBX,RDI SUB RSP,0x18 MOV R12,qword ptr [0x00103ff8] MOV RDX,qword ptr [RSI + 0x20] MOV RSI,R13 MOV RDI,R12 CALL 0x00101740 MOV RDX,qword ptr [RBP] MOV RSI,R13 MOV RDI,R12 MOV R8D,0xa XOR ECX,E...
/* func0(std::tuple<std::pair<std::string, std::string >, std::pair<std::string, std::string > > const&) */ tuple * func0(tuple *param_1) { int *puVar1; int iVar2; int iVar3; int iVar4; int iVar5; int8 *in_RSI; puVar1 = PTR___isoc23_strtol_00103ff8; iVar2 = __stoa<long,int,char,int> ...
623
func0
#include <tuple> #include <string> #include <cassert> #include <utility>
std::tuple<std::pair<int, int>, std::pair<int, int>> func0( const std::tuple<std::pair<std::string, std::string>, std::pair<std::string, std::string>>& tuple_str) { return std::make_tuple( std::make_pair(std::stoi(std::get<0>(tuple_str).first), std::stoi(std::get<0>(tuple_str).second)), st...
int main() { assert(func0(std::make_tuple(std::make_pair("333", "33"), std::make_pair("1416", "55"))) == std::make_tuple(std::make_pair(333, 33), std::make_pair(1416, 55))); assert(func0(std::make_tuple(std::make_pair("999", "99"), std::make_pair("1000", "500"))) == std::make_tuple(std...
O3
cpp
func0(std::tuple<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::...
_Z5func0RKSt5tupleIJSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_ES7_EE: endbr64 push r15 push r14 push r13 mov r13, rsi push r12 push rbp mov rbp, rdi push rbx sub rsp, 38h mov r14, [rsi+20h] mov rax, fs:28h mov [rsp+68h+var_40], rax xor eax, eax lea ...
_DWORD * func0( _DWORD *a1, long long *a2, long long a3, long long a4, long long a5, long long a6, int a7, int a8, int a9, int a10, long long a11) { long long v12; // r14 int *v13; // rax int v14; // r12d int *v15; // rbx ...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 MOV R13,RSI PUSH R12 PUSH RBP MOV RBP,RDI PUSH RBX SUB RSP,0x38 MOV R14,qword ptr [RSI + 0x20] MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x28],RAX XOR EAX,EAX LEA R15,[RSP + 0x20] CALL 0x00101110 MOV EDX,0xa MOV RSI,R15 MOV RDI,R14 MOV R12D,dword ptr [RAX] MOV dword ptr ...
/* func0(std::tuple<std::pair<std::string, std::string >, std::pair<std::string, std::string > > const&) */ tuple * func0(tuple *param_1) { int iVar1; int *piVar2; long lVar3; long lVar4; long lVar5; tuple *ptVar6; int extraout_DL; int uVar7; long *in_RSI; int in_R8B; int in_R9B; int iVar9;...
624
func0
#include <cassert> #include <vector> #include <string> #include <utility> template <typename T>
std::vector<std::pair<int, T>> func0(const std::vector<T>& list1) { std::vector<std::pair<int, T>> result; if (list1.empty()) return result; T current = list1[0]; int count = 1; for (size_t i = 1; i < list1.size(); ++i) { if (list1[i] == current) { count++; } else...
int main() { // Test case 1 std::vector<double> input1 = {1, 1, 2, 3, 4, 4.3, 5, 1}; std::vector<std::pair<int, double>> expected1 = { {2, 1}, {1, 2}, {1, 3}, {1, 4}, {1, 4.3}, {1, 5}, {1, 1} }; assert(func0(input1) == expected1); // Test case 2 std::string input2 = "automa...
O0
cpp
std::vector<std::pair<int, double>, std::allocator<std::pair<int, double> > > func0<double>(std::vector<double, std::allocator<double> > const&): 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,%e...
_Z5func0IdESt6vectorISt4pairIiT_ESaIS3_EERKS0_IS2_SaIS2_EE: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 38h mov [rbp+var_38], rdi mov [rbp+var_40], rsi mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax mov rax, [rbp+var_38] mov rdi, rax call _ZNSt6vectorISt4pairIidESaIS...
long long func0<double>(long long a1, long long a2) { double v2; // xmm0_8 unsigned long long v3; // rax int v5; // [rsp+14h] [rbp-2Ch] BYREF double v6; // [rsp+18h] [rbp-28h] BYREF unsigned long long i; // [rsp+20h] [rbp-20h] unsigned long long v8; // [rsp+28h] [rbp-18h] v8 = __readfsqword(0x28u); st...
func0<double>: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x38 MOV qword ptr [RBP + -0x38],RDI MOV qword ptr [RBP + -0x40],RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX MOV RAX,qword ptr [RBP + -0x38] MOV RDI,RAX CALL 0x001030aa MOV RAX,qword ptr [RBP + -0x40] MOV RDI,RAX CALL 0x00103d8...
/* std::vector<std::pair<int, double>, std::allocator<std::pair<int, double> > > func0<double>(std::vector<double, std::allocator<double> > const&) */ vector func0<double>(vector_conflict *param_1) { char cVar1; double *pdVar2; ulong uVar3; vector<double,std::allocator<double>> *in_RSI; long in_FS_OFFSET...
625
func0
#include <cassert> #include <vector> #include <string> #include <utility> template <typename T>
std::vector<std::pair<int, T>> func0(const std::vector<T>& list1) { std::vector<std::pair<int, T>> result; if (list1.empty()) return result; T current = list1[0]; int count = 1; for (size_t i = 1; i < list1.size(); ++i) { if (list1[i] == current) { count++; } else...
int main() { // Test case 1 std::vector<double> input1 = {1, 1, 2, 3, 4, 4.3, 5, 1}; std::vector<std::pair<int, double>> expected1 = { {2, 1}, {1, 2}, {1, 3}, {1, 4}, {1, 4.3}, {1, 5}, {1, 1} }; assert(func0(input1) == expected1); // Test case 2 std::string input2 = "automa...
O1
cpp
std::vector<std::pair<int, char>, std::allocator<std::pair<int, char> > > func0<char>(std::vector<char, std::allocator<char> > const&): endbr64 push %r13 push %r12 push %rbp push %rbx sub $0x18,%rsp mov %rdi,%r12 mov %fs:0x28,%rax mov %rax,0x8(%rsp) xor %eax,%eax movq $0x0,(%rdi) movq $0x0,0x...
_Z5func0IcESt6vectorISt4pairIiT_ESaIS3_EERKS0_IS2_SaIS2_EE: endbr64 push r13 push r12 push rbp push rbx sub rsp, 18h mov r12, rdi mov rax, fs:28h mov [rsp+38h+var_30], rax xor eax, eax mov qword ptr [rdi], 0 mov qword ptr [rdi+8], 0 mov qword ptr [rdi+10h], 0 mov rdx, [rs...
_QWORD * func0<char>(_QWORD *a1, long long a2) { char *v2; // rdx unsigned long long v3; // rbx int v4; // eax char v6; // [rsp+3h] [rbp-35h] BYREF int v7; // [rsp+4h] [rbp-34h] BYREF unsigned long long v8; // [rsp+8h] [rbp-30h] v8 = __readfsqword(0x28u); *a1 = 0LL; a1[1] = 0LL; a1[2] = 0LL; v2 =...
func0<char>: ENDBR64 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x18 MOV R12,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x8],RAX XOR EAX,EAX MOV qword ptr [RDI],0x0 MOV qword ptr [RDI + 0x8],0x0 MOV qword ptr [RDI + 0x10],0x0 MOV RDX,qword ptr [RSI] CMP qword ptr [RSI + 0x8],RDX JZ 0x001021a3 MOV RBP,RSI MOV...
/* std::vector<std::pair<int, char>, std::allocator<std::pair<int, char> > > func0<char>(std::vector<char, std::allocator<char> > const&) */ vector<std::pair<int,char>,std::allocator<std::pair<int,char>>> * func0<char>(vector<std::pair<int,char>,std::allocator<std::pair<int,char>>> *param_1,long *param_2) { char...
626
func0
#include <cassert> #include <vector> #include <string> #include <utility> template <typename T>
std::vector<std::pair<int, T>> func0(const std::vector<T>& list1) { std::vector<std::pair<int, T>> result; if (list1.empty()) return result; T current = list1[0]; int count = 1; for (size_t i = 1; i < list1.size(); ++i) { if (list1[i] == current) { count++; } else...
int main() { // Test case 1 std::vector<double> input1 = {1, 1, 2, 3, 4, 4.3, 5, 1}; std::vector<std::pair<int, double>> expected1 = { {2, 1}, {1, 2}, {1, 3}, {1, 4}, {1, 4.3}, {1, 5}, {1, 1} }; assert(func0(input1) == expected1); // Test case 2 std::string input2 = "automa...
O2
cpp
std::vector<std::pair<int, char>, std::allocator<std::pair<int, char> > > func0<char>(std::vector<char, std::allocator<char> > const&): endbr64 push %r14 push %r13 push %r12 mov %rdi,%r12 push %rbp push %rbx sub $0x10,%rsp mov 0x8(%rsi),%rcx mov %fs:0x28,%rax mov %rax,0x8(%rsp) xor %eax,%eax...
_Z5func0IdESt6vectorISt4pairIiT_ESaIS3_EERKS0_IS2_SaIS2_EE: endbr64 push r13 pxor xmm0, xmm0 push r12 mov r12, rdi push rbp push rbx sub rsp, 28h mov rdx, [rsi] mov rax, fs:28h mov [rsp+48h+var_30], rax xor eax, eax mov rax, [rsi+8] mov qword ptr [rdi+10h], 0 movups xmmwo...
long long func0<double>(long long a1, double **a2) { double *v3; // rdx double *v4; // rax double v5; // xmm0_8 long long v7; // rdi long long v8; // rsi long long v9; // rbx int v10; // eax long long v11; // xmm0_8 long long v12; // rsi int v14; // [rsp+4h] [rbp-3Ch] BYREF _QWORD v15[7]; // [rsp...
func0<double>: ENDBR64 PUSH R13 PXOR XMM0,XMM0 PUSH R12 MOV R12,RDI PUSH RBP PUSH RBX SUB RSP,0x28 MOV RDX,qword ptr [RSI] MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x18],RAX XOR EAX,EAX MOV RAX,qword ptr [RSI + 0x8] MOV qword ptr [RDI + 0x10],0x0 MOVUPS xmmword ptr [RDI],XMM0 CMP RAX,RDX JZ 0x00101fc0 MOVSD XMM...
/* std::vector<std::pair<int, double>, std::allocator<std::pair<int, double> > > func0<double>(std::vector<double, std::allocator<double> > const&) */ vector<std::pair<int,double>,std::allocator<std::pair<int,double>>> * func0<double>(vector<std::pair<int,double>,std::allocator<std::pair<int,double>>> *param_1, ...
627
func0
#include <cassert> #include <vector> #include <string> #include <utility> template <typename T>
std::vector<std::pair<int, T>> func0(const std::vector<T>& list1) { std::vector<std::pair<int, T>> result; if (list1.empty()) return result; T current = list1[0]; int count = 1; for (size_t i = 1; i < list1.size(); ++i) { if (list1[i] == current) { count++; } else...
int main() { // Test case 1 std::vector<double> input1 = {1, 1, 2, 3, 4, 4.3, 5, 1}; std::vector<std::pair<int, double>> expected1 = { {2, 1}, {1, 2}, {1, 3}, {1, 4}, {1, 4.3}, {1, 5}, {1, 1} }; assert(func0(input1) == expected1); // Test case 2 std::string input2 = "automa...
O3
cpp
std::vector<std::pair<int, char>, std::allocator<std::pair<int, char> > > func0<char>(std::vector<char, std::allocator<char> > const&): endbr64 push %r13 pxor %xmm0,%xmm0 push %r12 mov %rdi,%r12 push %rbp push %rbx sub $0x18,%rsp mov 0x8(%rsi),%r8 mov %fs:0x28,%rax mov %rax,0x8(%rsp) xor %ea...
_Z5func0IdESt6vectorISt4pairIiT_ESaIS3_EERKS0_IS2_SaIS2_EE: endbr64 push r13 pxor xmm0, xmm0 push r12 push rbp mov rbp, rdi push rbx sub rsp, 28h mov rcx, [rsi] mov rax, fs:28h mov [rsp+48h+var_30], rax xor eax, eax mov qword ptr [rdi+10h], 0 movups xmmword ptr [rdi], xmm0 mo...
long long func0<double>(long long a1, double **a2) { double *v3; // rcx double *v4; // rdi double v5; // xmm0_8 int v7; // edx int *v8; // r8 int *v9; // rsi unsigned long long v10; // rbx double *v11; // rsi int v13; // [rsp+4h] [rbp-3Ch] BYREF _QWORD v14[7]; // [rsp+8h] [rbp-38h] BYREF v3 = *a...
func0<double>: ENDBR64 PUSH R13 PXOR XMM0,XMM0 PUSH R12 PUSH RBP MOV RBP,RDI PUSH RBX SUB RSP,0x28 MOV RCX,qword ptr [RSI] MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x18],RAX XOR EAX,EAX MOV qword ptr [RDI + 0x10],0x0 MOVUPS xmmword ptr [RDI],XMM0 MOV RDI,qword ptr [RSI + 0x8] CMP RDI,RCX JZ 0x00101f5c MOVSD XMM...
/* std::vector<std::pair<int, double>, std::allocator<std::pair<int, double> > > func0<double>(std::vector<double, std::allocator<double> > const&) */ vector func0<double>(vector_conflict *param_1) { double *pdVar1; ulong uVar2; int8 *in_RSI; int *piVar3; int *piVar4; double *pdVar5; int *piVar6; l...
628
func0
#include <iostream> #include <vector> #include <algorithm> #include <cassert>
int func0(const std::vector<int>& arr, int n, int k) { int max1 = *std::max_element(arr.begin(), arr.end()); int res = 0; for (int i = 0; i < n; ++i) { if ((max1 - arr[i]) % k != 0) { return -1; } else { res += (max1 - arr[i]) / k; } } return...
int main() { assert(func0({2,2,2,2}, 4, 3) == 0); assert(func0({4,2,6,8}, 4, 3) == -1); assert(func0({21,33,9,45,63}, 5, 6) == 24); return 0; }
O0
cpp
func0(std::vector<int, std::allocator<int> > const&, int, int): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x38,%rsp mov %rdi,-0x38(%rbp) mov %esi,-0x3c(%rbp) mov %edx,-0x40(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax mov -0x38(%rbp),%rax mov %rax,%rdi callq 175e <_...
_Z5func0RKSt6vectorIiSaIiEEii: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 38h mov [rbp+var_38], rdi mov [rbp+var_3C], esi mov [rbp+var_40], edx mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax mov rax, [rbp+var_38] mov rdi, rax call _ZNKSt6vectorIiSaIiEE3endEv; st...
long long func0(long long a1, int a2, int a3) { long long v3; // rbx long long v4; // rax unsigned int v7; // [rsp+14h] [rbp-2Ch] int i; // [rsp+18h] [rbp-28h] int v9; // [rsp+1Ch] [rbp-24h] _QWORD v10[3]; // [rsp+20h] [rbp-20h] BYREF v10[1] = __readfsqword(0x28u); v3 = std::vector<int>::end(a1); v4...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x38 MOV qword ptr [RBP + -0x38],RDI MOV dword ptr [RBP + -0x3c],ESI MOV dword ptr [RBP + -0x40],EDX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX MOV RAX,qword ptr [RBP + -0x38] MOV RDI,RAX CALL 0x001016fa MOV RBX,RAX MOV RAX,qword ptr [RBP...
/* func0(std::vector<int, std::allocator<int> > const&, int, int) */ int func0(vector *param_1,int param_2,int param_3) { int iVar1; __normal_iterator _Var2; __normal_iterator _Var3; int4 extraout_var; int *piVar4; long in_FS_OFFSET; int local_34; int local_30; int8 local_28; long local_20; l...
629
func0
#include <iostream> #include <vector> #include <algorithm> #include <cassert>
int func0(const std::vector<int>& arr, int n, int k) { int max1 = *std::max_element(arr.begin(), arr.end()); int res = 0; for (int i = 0; i < n; ++i) { if ((max1 - arr[i]) % k != 0) { return -1; } else { res += (max1 - arr[i]) / k; } } return...
int main() { assert(func0({2,2,2,2}, 4, 3) == 0); assert(func0({4,2,6,8}, 4, 3) == -1); assert(func0({21,33,9,45,63}, 5, 6) == 24); return 0; }
O1
cpp
func0(std::vector<int, std::allocator<int> > const&, int, int): endbr64 mov %edx,%r8d mov 0x8(%rdi),%rcx mov (%rdi),%r10 mov %rcx,%rdx cmp %rcx,%r10 je 127c <_Z5func0RKSt6vectorIiSaIiEEii+0x33> lea 0x4(%r10),%rax cmp %rax,%rcx je 12b5 <_Z5func0RKSt6vectorIiSaIiEEii+0x6c> mov %r10,%rdx mo...
_Z5func0RKSt6vectorIiSaIiEEii: endbr64 mov r8d, edx mov rdx, [rdi+8] mov r10, [rdi] cmp r10, rdx jz short loc_123C lea rax, [r10+4] cmp rdx, rax jz short loc_1274 mov rcx, rdx mov rdx, r10 loc_122B: mov edi, [rax] cmp [rdx], edi cmovl rdx, rax add rax, 4 cmp r...
long long func0(int **a1, int a2, int a3) { int *v4; // rdx int *v5; // r10 int *v6; // rax int v7; // r9d int *v8; // rdi int *v9; // r10 unsigned int v10; // esi v4 = a1[1]; v5 = *a1; if ( *a1 != v4 ) { v6 = v5 + 1; if ( v4 == v5 + 1 ) { v4 = *a1; } else { v...
func0: ENDBR64 MOV R8D,EDX MOV RDX,qword ptr [RDI + 0x8] MOV R10,qword ptr [RDI] CMP R10,RDX JZ 0x0010123c LEA RAX,[R10 + 0x4] CMP RDX,RAX JZ 0x00101274 MOV RCX,RDX MOV RDX,R10 LAB_0010122b: MOV EDI,dword ptr [RAX] CMP dword ptr [RDX],EDI CMOVL RDX,RAX ADD RAX,0x4 CMP RAX,RCX JNZ 0x0010122b LAB_0010123c: MOV R9D,dword ...
/* func0(std::vector<int, std::allocator<int> > const&, int, int) */ int [16] func0(vector *param_1,int param_2,int param_3) { int iVar1; int *piVar2; int *piVar3; int *piVar4; int iVar5; int *piVar6; uint uVar7; int *piVar8; int auVar9 [16]; piVar2 = *(int **)(param_1 + 8); piVar8 = *(int *...
630
func0
#include <iostream> #include <vector> #include <algorithm> #include <cassert>
int func0(const std::vector<int>& arr, int n, int k) { int max1 = *std::max_element(arr.begin(), arr.end()); int res = 0; for (int i = 0; i < n; ++i) { if ((max1 - arr[i]) % k != 0) { return -1; } else { res += (max1 - arr[i]) / k; } } return...
int main() { assert(func0({2,2,2,2}, 4, 3) == 0); assert(func0({4,2,6,8}, 4, 3) == -1); assert(func0({21,33,9,45,63}, 5, 6) == 24); return 0; }
O2
cpp
func0(std::vector<int, std::allocator<int> > const&, int, int): endbr64 mov (%rdi),%rcx mov 0x8(%rdi),%r10 mov %edx,%r8d mov (%rcx),%edx mov %edx,%edi cmp %rcx,%r10 je 1483 <_Z5func0RKSt6vectorIiSaIiEEii+0x33> lea 0x4(%rcx),%rax cmp %rax,%r10 je 1483 <_Z5func0RKSt6vectorIiSaIiEEii+0x33> ...
_Z5func0RKSt6vectorIiSaIiEEii: endbr64 mov r9, [rdi+8] mov rcx, [rdi] mov r8d, edx cmp rcx, r9 jz short loc_1420 lea rax, [rcx+4] mov edi, [rcx] cmp r9, rax jz short loc_13E8 mov rdx, r9 sub rdx, rax and edx, 4 jz short loc_13D0 mov eax, [rax] cmp edi, eax ...
long long func0(int **a1, int a2, int a3) { int *v3; // r9 int *v4; // rcx int *v5; // rax int v6; // edi int v7; // eax int *v8; // r9 unsigned int v9; // esi int v10; // eax v3 = a1[1]; v4 = *a1; if ( *a1 == v3 ) { v6 = *v4; } else { v5 = v4 + 1; v6 = *v4; if ( v3 != v4...
func0: ENDBR64 MOV R9,qword ptr [RDI + 0x8] MOV RCX,qword ptr [RDI] MOV R8D,EDX CMP RCX,R9 JZ 0x00101420 LEA RAX,[RCX + 0x4] MOV EDI,dword ptr [RCX] CMP R9,RAX JZ 0x001013e8 MOV RDX,R9 SUB RDX,RAX AND EDX,0x4 JZ 0x001013d0 MOV EAX,dword ptr [RAX] CMP EDI,EAX CMOVL EDI,EAX LEA RAX,[RCX + 0x8] CMP RAX,R9 JZ 0x001013e8 NO...
/* func0(std::vector<int, std::allocator<int> > const&, int, int) */ int func0(vector *param_1,int param_2,int param_3) { int iVar1; int *piVar2; int *piVar3; int *piVar4; int iVar5; int iVar6; piVar2 = *(int **)(param_1 + 8); piVar4 = *(int **)param_1; if (piVar4 == piVar2) { iVar6 = *piVar4...
631
func0
#include <iostream> #include <vector> #include <algorithm> #include <cassert>
int func0(const std::vector<int>& arr, int n, int k) { int max1 = *std::max_element(arr.begin(), arr.end()); int res = 0; for (int i = 0; i < n; ++i) { if ((max1 - arr[i]) % k != 0) { return -1; } else { res += (max1 - arr[i]) / k; } } return...
int main() { assert(func0({2,2,2,2}, 4, 3) == 0); assert(func0({4,2,6,8}, 4, 3) == -1); assert(func0({21,33,9,45,63}, 5, 6) == 24); return 0; }
O3
cpp
func0(std::vector<int, std::allocator<int> > const&, int, int): endbr64 mov 0x8(%rdi),%r10 mov (%rdi),%rcx mov %edx,%r9d mov (%rcx),%edi cmp %rcx,%r10 je 1520 <_Z5func0RKSt6vectorIiSaIiEEii+0x100> lea 0x4(%rcx),%r8 cmp %r8,%r10 je 1520 <_Z5func0RKSt6vectorIiSaIiEEii+0x100> lea -0x8(%r10)...
_Z5func0RKSt6vectorIiSaIiEEii: endbr64 mov r11, [rdi+8] mov rcx, [rdi] movsxd r9, esi mov r8d, edx cmp rcx, r11 jz loc_14C0 lea rdi, [rcx+4] mov esi, [rcx] cmp r11, rdi jz loc_148B lea rdx, [r11-8] mov rax, rcx sub rdx, rcx mov r10, rdx shr r10, 2 add r10, ...
long long func0(signed int **a1, int a2, int a3) { signed int *v3; // r11 signed int *v4; // rcx long long v5; // r9 signed int *v6; // rdi signed int v7; // esi signed int *v8; // rax unsigned long long v9; // r10 __m128i v10; // xmm2 __m128i v11; // xmm0 __m128i v12; // xmm1 __m128i v13; // xmm...
func0: ENDBR64 MOV R11,qword ptr [RDI + 0x8] MOV RCX,qword ptr [RDI] MOVSXD R9,ESI MOV R8D,EDX CMP RCX,R11 JZ 0x001014c0 LEA RDI,[RCX + 0x4] MOV ESI,dword ptr [RCX] CMP R11,RDI JZ 0x0010148b LEA RDX,[R11 + -0x8] MOV RAX,RCX SUB RDX,RCX MOV R10,RDX SHR R10,0x2 ADD R10,0x1 CMP RDX,0x8 JBE 0x00101462 MOV RDX,R10 MOVD XMM3...
/* func0(std::vector<int, std::allocator<int> > const&, int, int) */ int func0(vector *param_1,int param_2,int param_3) { uint *puVar1; uint *puVar2; uint *puVar3; uint *puVar4; uint *puVar5; uint *puVar6; uint *puVar7; ulong uVar8; uint uVar9; int iVar10; uint *puVar11; ulong uVar12; uint u...
632
func0
#include <string> #include <assert.h>
std::string func0(std::string month, int days) { std::string season; if (month == "January" || month == "February" || month == "March") { season = "winter"; } else if (month == "April" || month == "May" || month == "June") { season = "spring"; } else if (month == "July" || mo...
int main() { assert(func0("January", 4) == "winter"); assert(func0("October", 28) == "autumn"); assert(func0("June", 6) == "spring"); return 0; }
O0
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, 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 mo...
_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 28h mov [rbp+var_18], rdi mov [rbp+var_20], rsi mov [rbp+var_24], edx mov rax, [rbp+var_18] mov rdi, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; st...
long long func0(long long a1, long long a2, int a3) { bool v8; // al char v9; // al char v10; // al std::string::basic_string(a1); if ( (unsigned __int8)std::operator==<char>(a2, "January") || (unsigned __int8)std::operator==<char>(a2, "February") || (unsigned __int8)std::operator==<char>(a2, "March...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x28 MOV qword ptr [RBP + -0x18],RDI MOV qword ptr [RBP + -0x20],RSI MOV dword ptr [RBP + -0x24],EDX MOV RAX,qword ptr [RBP + -0x18] MOV RDI,RAX CALL 0x00101280 MOV RAX,qword ptr [RBP + -0x20] LEA RDX,[0x102008] MOV RSI,RDX MOV RDI,RAX LAB_001013de: CALL 0x00101c3a T...
/* func0(std::string, int) */ string * func0(string *param_1,string *param_2,int param_3) { bool bVar1; std::string::string(param_1); /* try { // try from 001013de to 00101704 has its CatchHandler @ 00101707 */ bVar1 = std::operator==(param_2,"January"); if (bVar1) { LAB_0010141b: b...
633
func0
#include <string> #include <assert.h>
std::string func0(std::string month, int days) { std::string season; if (month == "January" || month == "February" || month == "March") { season = "winter"; } else if (month == "April" || month == "May" || month == "June") { season = "spring"; } else if (month == "July" || mo...
int main() { assert(func0("January", 4) == "winter"); assert(func0("October", 28) == "autumn"); assert(func0("June", 6) == "spring"); return 0; }
O1
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int): endbr64 push %r14 push %r13 push %r12 push %rbp push %rbx mov %rdi,%rbx mov %rsi,%rbp mov %edx,%r12d lea 0x10(%rdi),%r13 mov %r13,(%rdi) movq $0x0,0x8(%rdi) movb $0x0,0x10(%rdi) lea 0xd6c(%rip),%...
_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi: endbr64 push r14 push r13 push r12 push rbp push rbx mov rbx, rdi mov rbp, rsi mov r12d, edx lea rax, [rdi+10h] mov [rdi], rax mov qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 mov rax, [rsi+8] cmp rax, 7 ...
long long func0(long long a1, long long a2, int a3) { long long v4; // rax const void *v5; // r13 const void *v6; // r13 long long v7; // r13 bool v8; // r14 bool v9; // r12 const void *v10; // rbp int v11; // eax *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; v4 ...
func0: ENDBR64 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX MOV RBX,RDI MOV RBP,RSI MOV R12D,EDX LEA RAX,[RDI + 0x10] MOV qword ptr [RDI],RAX MOV qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 MOV RAX,qword ptr [RSI + 0x8] CMP RAX,0x7 JZ 0x001012eb CMP RAX,0x8 JZ 0x00101327 CMP RAX,0x5 JZ 0x00101363 CMP RAX,0x...
/* func0(std::string, int) */ long * func0(long *param_1,int8 *param_2,int param_3) { long lVar1; void *pvVar2; int iVar3; *param_1 = (long)(param_1 + 2); param_1[1] = 0; *(int *)(param_1 + 2) = 0; lVar1 = param_2[1]; if (lVar1 == 7) { iVar3 = memcmp((void *)*param_2,"January",7); if (iVar3...
634
func0
#include <string> #include <assert.h>
std::string func0(std::string month, int days) { std::string season; if (month == "January" || month == "February" || month == "March") { season = "winter"; } else if (month == "April" || month == "May" || month == "June") { season = "spring"; } else if (month == "July" || mo...
int main() { assert(func0("January", 4) == "winter"); assert(func0("October", 28) == "autumn"); assert(func0("June", 6) == "spring"); return 0; }
O2
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int): endbr64 push %r14 push %r13 lea 0x10(%rdi),%r13 push %r12 mov %rdi,%r12 push %rbp mov %rsi,%rbp lea 0xb38(%rip),%rsi push %rbx mov %edx,%ebx mov %r13,(%rdi) movq $0x0,0x8(%rdi) movb $0x0,0x10(%rd...
_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi: endbr64 lea rax, [rdi+10h] push r12 mov r12d, edx push rbp mov rbp, rsi push rbx mov rbx, rdi mov [rdi], rax mov qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 mov rax, [rsi+8] cmp rax, 7 jz loc_15D0 cmp ...
long long func0(long long a1, _QWORD *a2, int a3) { long long v4; // rax long long v5; // rax long long v7; // rax _BOOL4 v8; // eax _BOOL4 v9; // eax *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; v4 = a2[1]; if ( v4 == 7 ) { if ( *(_DWORD *)*a2 == 1970168138 &...
func0: ENDBR64 LEA RAX,[RDI + 0x10] PUSH R12 MOV R12D,EDX PUSH RBP MOV RBP,RSI PUSH RBX MOV RBX,RDI MOV qword ptr [RDI],RAX MOV qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 MOV RAX,qword ptr [RSI + 0x8] CMP RAX,0x7 JZ 0x001015d0 CMP RAX,0x8 JNZ 0x00101520 MOV RAX,0x7972617572626546 MOV RDX,qword ptr [RSI] CM...
/* func0(std::string, int) */ long * func0(long *param_1,long *param_2,int param_3) { long lVar1; int *piVar2; bool bVar3; *param_1 = (long)(param_1 + 2); param_1[1] = 0; *(int *)(param_1 + 2) = 0; lVar1 = param_2[1]; if (lVar1 == 7) { if ((*(int *)*param_2 != 0x756e614a) || (*(int *)(*param_2 ...
635
func0
#include <string> #include <assert.h>
std::string func0(std::string month, int days) { std::string season; if (month == "January" || month == "February" || month == "March") { season = "winter"; } else if (month == "April" || month == "May" || month == "June") { season = "spring"; } else if (month == "July" || mo...
int main() { assert(func0("January", 4) == "winter"); assert(func0("October", 28) == "autumn"); assert(func0("June", 6) == "spring"); return 0; }
O3
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int): endbr64 push %r14 push %r13 lea 0x10(%rdi),%r13 push %r12 mov %rdi,%r12 push %rbp mov %rsi,%rbp lea 0xb38(%rip),%rsi push %rbx mov %edx,%ebx mov %r13,(%rdi) movq $0x0,0x8(%rdi) movb $0x0,0x10(%rd...
_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi: endbr64 lea rax, [rdi+10h] push r12 mov r12d, edx push rbp mov rbp, rsi push rbx mov rbx, rdi mov [rdi], rax mov qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 mov rax, [rsi+8] cmp rax, 7 jz loc_15D0 cmp ...
long long func0(long long a1, _QWORD *a2, int a3) { long long v4; // rax long long v5; // rax long long v7; // rax _BOOL4 v8; // eax _BOOL4 v9; // eax *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; v4 = a2[1]; if ( v4 == 7 ) { if ( *(_DWORD *)*a2 == 1970168138 &...
func0: ENDBR64 LEA RAX,[RDI + 0x10] PUSH R12 MOV R12D,EDX PUSH RBP MOV RBP,RSI PUSH RBX MOV RBX,RDI MOV qword ptr [RDI],RAX MOV qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 MOV RAX,qword ptr [RSI + 0x8] CMP RAX,0x7 JZ 0x001015d0 CMP RAX,0x8 JNZ 0x00101520 MOV RAX,0x7972617572626546 MOV RDX,qword ptr [RSI] CM...
/* func0(std::string, int) */ long * func0(long *param_1,long *param_2,int param_3) { long lVar1; int *piVar2; bool bVar3; *param_1 = (long)(param_1 + 2); param_1[1] = 0; *(int *)(param_1 + 2) = 0; lVar1 = param_2[1]; if (lVar1 == 7) { if ((*(int *)*param_2 != 0x756e614a) || (*(int *)(*param_2 ...
636
func0
#include <iostream> #include <tuple> #include <assert.h>
std::tuple<std::string, int, std::string, int> func0(int a, int b, int n) { int i = 0; while (i * a <= n) { if ((n - (i * a)) % b == 0) { return std::make_tuple("x = ", i, ", y = ", (n - (i * a)) / b); } i++; } throw std::runtime_error("No solution"); }
int main() { try { assert(func0(2, 3, 7) == std::make_tuple("x = ", 2, ", y = ", 1)); assert(func0(4, 2, 7) == std::make_tuple("x = ", 4, ", y = ", 1)); // Corrected wrong expected result assert(func0(1, 13, 17) == std::make_tuple("x = ", 4, ", y = ", 1)); } catch (std::runtime...
O0
cpp
func0[abi:cxx11](int, int, int): endbr64 push %rbp mov %rsp,%rbp push %r12 push %rbx sub $0x60,%rsp mov %rdi,-0x58(%rbp) mov %esi,-0x5c(%rbp) mov %edx,-0x60(%rbp) mov %ecx,-0x64(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax movl $0x0,-0x48(%rbp) mov -0x48(%rbp),%eax im...
_Z5func0B5cxx11iii: endbr64 push rbp mov rbp, rsp push r12 push rbx sub rsp, 60h mov [rbp+var_58], rdi mov [rbp+var_5C], esi mov [rbp+var_60], edx mov [rbp+var_64], ecx mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax mov [rbp+var_48], 0 jmp loc_24E6 loc_2460: mov ...
long long func0[abi:cxx11](long long a1, int a2, int a3, int a4) { std::runtime_error *exception; // rbx int i; // [rsp+28h] [rbp-48h] BYREF int v7; // [rsp+2Ch] [rbp-44h] BYREF _BYTE v8[40]; // [rsp+30h] [rbp-40h] BYREF unsigned long long v9; // [rsp+58h] [rbp-18h] v9 = __readfsqword(0x28u); for ( i = ...
func0[abi:cxx11]: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R12 PUSH RBX SUB RSP,0x60 MOV qword ptr [RBP + -0x58],RDI MOV dword ptr [RBP + -0x5c],ESI MOV dword ptr [RBP + -0x60],EDX MOV dword ptr [RBP + -0x64],ECX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX MOV dword ptr [RBP + -0x48],0x0 JMP 0x0010...
/* func0[abi:cxx11](int, int, int) */ tuple<std::string,int,std::string,int> * func0_abi_cxx11_(int param_1,int param_2,int param_3) { runtime_error *this; int in_ECX; int4 in_register_0000003c; long in_FS_OFFSET; int local_50; int local_4c; tuple local_48 [10]; long local_20; local_20 = *(long *...
637
func0
#include <iostream> #include <tuple> #include <assert.h>
std::tuple<std::string, int, std::string, int> func0(int a, int b, int n) { int i = 0; while (i * a <= n) { if ((n - (i * a)) % b == 0) { return std::make_tuple("x = ", i, ", y = ", (n - (i * a)) / b); } i++; } throw std::runtime_error("No solution"); }
int main() { try { assert(func0(2, 3, 7) == std::make_tuple("x = ", 2, ", y = ", 1)); assert(func0(4, 2, 7) == std::make_tuple("x = ", 4, ", y = ", 1)); // Corrected wrong expected result assert(func0(1, 13, 17) == std::make_tuple("x = ", 4, ", y = ", 1)); } catch (std::runtime...
O1
cpp
func0[abi:cxx11](int, int, int): endbr64 push %r12 push %rbp push %rbx test %ecx,%ecx js 13de <_Z5func0B5cxx11iii+0xb5> mov %rdi,%rbp mov %edx,%r10d mov %ecx,%eax cltd idiv %r10d mov %edx,%ebx test %edx,%edx je 13bd <_Z5func0B5cxx11iii+0x94> mov %esi,%r11d mov %ecx,%r9d sub %esi...
_Z5func0B5cxx11iii: endbr64 push r12 push rbp push rbx test ecx, ecx js loc_13B9 mov rbp, rdi mov r10d, esi mov r9d, edx mov eax, ecx cdq idiv r9d mov ebx, edx test edx, edx jz short loc_139E mov r8d, ecx sub r8d, esi mov edi, esi mov ebx, 0 loc_133B: add ...
long long func0[abi:cxx11](long long a1, int a2, int a3, int a4) { int v6; // ebx int v7; // r8d int v8; // edi int v9; // esi std::runtime_error *exception; // rbx if ( a4 < 0 ) goto LABEL_8; v6 = a4 % a3; if ( a4 % a3 ) { v7 = a4 - a2; v8 = a2; v6 = 0; while ( 1 ) { +...
func0[abi:cxx11]: ENDBR64 PUSH R12 PUSH RBP PUSH RBX TEST ECX,ECX JS 0x001013b9 MOV RBP,RDI MOV R10D,ESI MOV R9D,EDX MOV EAX,ECX CDQ IDIV R9D MOV EBX,EDX TEST EDX,EDX JZ 0x0010139e MOV R8D,ECX SUB R8D,ESI MOV EDI,ESI MOV EBX,0x0 LAB_0010133b: ADD EBX,0x1 CMP ECX,EDI JL 0x001013b9 MOV ESI,R8D ADD EDI,R10D SUB R8D,R10D M...
/* func0[abi:cxx11](int, int, int) */ int * func0_abi_cxx11_(int param_1,int param_2,int param_3) { int iVar1; runtime_error *this; int in_ECX; int iVar2; int iVar3; int iVar4; int4 in_register_0000003c; int *piVar5; piVar5 = (int *)CONCAT44(in_register_0000003c,param_1); if (-1 < in_ECX) { ...
638
func0
#include <iostream> #include <tuple> #include <assert.h>
std::tuple<std::string, int, std::string, int> func0(int a, int b, int n) { int i = 0; while (i * a <= n) { if ((n - (i * a)) % b == 0) { return std::make_tuple("x = ", i, ", y = ", (n - (i * a)) / b); } i++; } throw std::runtime_error("No solution"); }
int main() { try { assert(func0(2, 3, 7) == std::make_tuple("x = ", 2, ", y = ", 1)); assert(func0(4, 2, 7) == std::make_tuple("x = ", 4, ", y = ", 1)); // Corrected wrong expected result assert(func0(1, 13, 17) == std::make_tuple("x = ", 4, ", y = ", 1)); } catch (std::runtime...
O2
cpp
func0[abi:cxx11](int, int, int): endbr64 push %r12 push %rbp push %rbx test %ecx,%ecx js 1260 <_Z5func0B5cxx11iii.cold> mov %ecx,%eax mov %edx,%r11d mov %rdi,%r12 cltd idiv %r11d mov %edx,%ebx test %edx,%edx je 16f0 <_Z5func0B5cxx11iii+0xc0> mov %ecx,%r10d mov %esi,%r9d xor %ebx...
_Z5func0B5cxx11iii: endbr64 push r12 push rbp push rbx test ecx, ecx js _Z5func0B5cxx11iii_cold; func0(int,int,int) [clone] mov eax, ecx mov r9d, edx mov rbx, rdi cdq idiv r9d mov ebp, edx test edx, edx jz short loc_17E0 mov r8d, ecx mov r10d, esi mov edi, esi xor...
long long func0[abi:cxx11](long long a1, int a2, int a3, int a4) { int v5; // ebp int v7; // edi int v8; // r8d int v9; // esi if ( a4 < 0 ) goto LABEL_8; v5 = a4 % a3; if ( a4 % a3 ) { v7 = a2; v5 = 0; v8 = a4 - a2; while ( 1 ) { ++v5; if ( a4 < v7 ) break;...
func0[abi:cxx11]: ENDBR64 PUSH R12 PUSH RBP PUSH RBX TEST ECX,ECX JS 0x00101220 MOV EAX,ECX MOV R9D,EDX MOV RBX,RDI CDQ IDIV R9D MOV EBP,EDX TEST EDX,EDX JZ 0x001017e0 MOV R8D,ECX MOV R10D,ESI MOV EDI,ESI XOR EBP,EBP SUB R8D,ESI NOP LAB_00101770: ADD EBP,0x1 CMP ECX,EDI JL 0x00101220 MOV ESI,R8D ADD EDI,R10D SUB R8D,R1...
/* func0[abi:cxx11](int, int, int) */ int * func0_abi_cxx11_(int param_1,int param_2,int param_3) { int iVar1; runtime_error *this; int in_ECX; int iVar2; int iVar3; int iVar4; int4 in_register_0000003c; int *piVar5; piVar5 = (int *)CONCAT44(in_register_0000003c,param_1); if (-1 < in_ECX) { ...
639
func0
#include <iostream> #include <tuple> #include <assert.h>
std::tuple<std::string, int, std::string, int> func0(int a, int b, int n) { int i = 0; while (i * a <= n) { if ((n - (i * a)) % b == 0) { return std::make_tuple("x = ", i, ", y = ", (n - (i * a)) / b); } i++; } throw std::runtime_error("No solution"); }
int main() { try { assert(func0(2, 3, 7) == std::make_tuple("x = ", 2, ", y = ", 1)); assert(func0(4, 2, 7) == std::make_tuple("x = ", 4, ", y = ", 1)); // Corrected wrong expected result assert(func0(1, 13, 17) == std::make_tuple("x = ", 4, ", y = ", 1)); } catch (std::runtime...
O3
cpp
func0[abi:cxx11](int, int, int): endbr64 push %r12 push %rbp push %rbx test %ecx,%ecx js 1260 <_Z5func0B5cxx11iii.cold> mov %ecx,%eax mov %edx,%r11d mov %rdi,%r12 cltd idiv %r11d mov %edx,%ebx test %edx,%edx je 16f0 <_Z5func0B5cxx11iii+0xc0> mov %ecx,%r10d mov %esi,%r9d xor %ebx...
_Z5func0B5cxx11iii: endbr64 push rbp push rbx sub rsp, 8 test ecx, ecx js _Z5func0B5cxx11iii_cold; func0(int,int,int) [clone] mov eax, ecx mov r9d, edx mov rbx, rdi cdq idiv r9d mov r11d, edx test edx, edx jz loc_1738 mov r8d, ecx mov r10d, esi mov edi, esi xor ...
long long func0[abi:cxx11](long long a1, int a2, int a3, int a4) { int v5; // r11d int v7; // edi int v8; // r8d int v9; // esi if ( a4 < 0 ) goto LABEL_8; v5 = a4 % a3; if ( a4 % a3 ) { v7 = a2; v5 = 0; v8 = a4 - a2; while ( 1 ) { ++v5; if ( a4 < v7 ) break...
func0[abi:cxx11]: ENDBR64 PUSH RBP PUSH RBX SUB RSP,0x8 TEST ECX,ECX JS 0x00101220 MOV EAX,ECX MOV R9D,EDX MOV RBX,RDI CDQ IDIV R9D MOV R11D,EDX TEST EDX,EDX JZ 0x00101738 MOV R8D,ECX MOV R10D,ESI MOV EDI,ESI XOR R11D,R11D SUB R8D,ESI NOP word ptr [RAX + RAX*0x1] LAB_001016c0: ADD R11D,0x1 CMP ECX,EDI JL 0x00101220 MOV...
/* func0[abi:cxx11](int, int, int) */ int [16] func0_abi_cxx11_(int param_1,int param_2,int param_3) { int iVar1; runtime_error *this; int in_ECX; int iVar2; int iVar3; int4 in_register_0000003c; int *piVar4; int iVar5; int auVar6 [16]; piVar4 = (int *)CONCAT44(in_register_0000003c,param_1); ...
640
func0
#include <vector> #include <assert.h>
std::vector<int> func0(std::vector<int> list1, std::vector<int> list2) { std::vector<int> result; for (int x : list1) { bool found = false; for (int y : list2) { if (x == y) { found = true; break; } } if (!found) {...
int main() { assert((func0({1,2,3,4,5,6,7,8,9,10}, {2,4,6,8}) == std::vector<int>{1, 3, 5, 7, 9, 10})); assert((func0({1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, {1, 3, 5, 7}) == std::vector<int>{2, 4, 6, 8, 9, 10})); assert((func0({1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, {5,7}) == std::vector<int>{1, 2, 3, 4, 6, 8, 9, 10}...
O0
cpp
func0(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x78,%rsp mov %rdi,-0x68(%rbp) mov %rsi,-0x70(%rbp) mov %rdx,-0x78(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax mov -0x68(%rbp),%rax mov %...
_Z5func0St6vectorIiSaIiEES1_: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 78h mov [rbp+var_68], rdi mov [rbp+var_70], rsi mov [rbp+var_78], rdx mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax mov rax, [rbp+var_68] mov rdi, rax call _ZNSt6vectorIiSaIiEEC2Ev; std::v...
long long func0(long long a1, long long a2, long long a3) { char v5; // [rsp+2Fh] [rbp-51h] int v6; // [rsp+30h] [rbp-50h] BYREF int v7; // [rsp+34h] [rbp-4Ch] long long v8; // [rsp+38h] [rbp-48h] BYREF long long v9; // [rsp+40h] [rbp-40h] BYREF long long v10; // [rsp+48h] [rbp-38h] BYREF _QWORD v11[2]; ...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x78 MOV qword ptr [RBP + -0x68],RDI MOV qword ptr [RBP + -0x70],RSI MOV qword ptr [RBP + -0x78],RDX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX MOV RAX,qword ptr [RBP + -0x68] MOV RDI,RAX CALL 0x00101dea MOV RAX,qword ptr [RBP + -0x70] MO...
/* func0(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >) */ vector<int,std::allocator<int>> * func0(vector param_1,vector param_2) { bool bVar1; bool bVar2; int *piVar3; vector<int,std::allocator<int>> *in_RDX; int4 in_register_00000034; int4 in_register_0000003c; vector<...
641
func0
#include <vector> #include <assert.h>
std::vector<int> func0(std::vector<int> list1, std::vector<int> list2) { std::vector<int> result; for (int x : list1) { bool found = false; for (int y : list2) { if (x == y) { found = true; break; } } if (!found) {...
int main() { assert((func0({1,2,3,4,5,6,7,8,9,10}, {2,4,6,8}) == std::vector<int>{1, 3, 5, 7, 9, 10})); assert((func0({1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, {1, 3, 5, 7}) == std::vector<int>{2, 4, 6, 8, 9, 10})); assert((func0({1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, {5,7}) == std::vector<int>{1, 2, 3, 4, 6, 8, 9, 10}...
O1
cpp
func0(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >): endbr64 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x10,%rsp mov %rdi,%r12 mov %fs:0x28,%rax mov %rax,0x8(%rsp) xor %eax,%eax movq $0x0,(%rdi) movq $0x0,0x8(%rdi) movq $0x0,0x10(%rdi) mov ...
_Z5func0St6vectorIiSaIiEES1_: endbr64 push r13 push r12 push rbp push rbx sub rsp, 18h mov r12, rdi mov rbp, rdx mov rax, fs:28h mov [rsp+38h+var_30], rax xor eax, eax mov qword ptr [rdi], 0 mov qword ptr [rdi+8], 0 mov qword ptr [rdi+10h], 0 mov rbx, [rsi] mov r1...
_QWORD * func0(_QWORD *a1, int **a2, long long a3) { int *v4; // rbx int *v5; // r13 int v7; // edx _DWORD *v8; // rax _DWORD *v9; // rcx _DWORD *v10; // rsi int v11; // [rsp+4h] [rbp-34h] BYREF unsigned long long v12; // [rsp+8h] [rbp-30h] v12 = __readfsqword(0x28u); *a1 = 0LL; a1[1] = 0LL; a1...
func0: ENDBR64 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x18 MOV R12,RDI MOV RBP,RDX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x8],RAX XOR EAX,EAX MOV qword ptr [RDI],0x0 MOV qword ptr [RDI + 0x8],0x0 MOV qword ptr [RDI + 0x10],0x0 MOV RBX,qword ptr [RSI] MOV R13,qword ptr [RSI + 0x8] CMP R13,RBX JNZ 0x00101...
/* func0(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >) */ vector<int,std::allocator<int>> * func0(vector param_1,vector param_2) { int *piVar1; int *piVar2; int8 *in_RDX; int *piVar3; int4 in_register_00000034; int4 in_register_0000003c; vector<int,std::allocator<int>> ...
642
func0
#include <vector> #include <assert.h>
std::vector<int> func0(std::vector<int> list1, std::vector<int> list2) { std::vector<int> result; for (int x : list1) { bool found = false; for (int y : list2) { if (x == y) { found = true; break; } } if (!found) {...
int main() { assert((func0({1,2,3,4,5,6,7,8,9,10}, {2,4,6,8}) == std::vector<int>{1, 3, 5, 7, 9, 10})); assert((func0({1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, {1, 3, 5, 7}) == std::vector<int>{2, 4, 6, 8, 9, 10})); assert((func0({1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, {5,7}) == std::vector<int>{1, 2, 3, 4, 6, 8, 9, 10}...
O2
cpp
func0(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >): endbr64 push %r14 push %r13 push %r12 mov %rdi,%r12 push %rbp push %rbx sub $0x10,%rsp mov %fs:0x28,%rax mov %rax,0x8(%rsp) xor %eax,%eax movq $0x0,(%rdi) movq $0x0,0x8(%rdi) movq $0x0,0x10(%rdi) mov ...
_Z5func0St6vectorIiSaIiEES1_: endbr64 push r13 pxor xmm0, xmm0 push r12 mov r12, rdi push rbp push rbx sub rsp, 18h mov rax, fs:28h mov [rsp+38h+var_30], rax xor eax, eax mov qword ptr [rdi+10h], 0 movups xmmword ptr [rdi], xmm0 mov rbx, [rsi] mov r13, [rsi+8] cmp r13...
long long func0(long long a1, int **a2, long long a3) { int *v3; // rbx int *v4; // r13 int v6; // edx _DWORD *v7; // rax _DWORD *v8; // rcx _DWORD *v10; // rsi int v11; // [rsp+0h] [rbp-34h] BYREF unsigned long long v12; // [rsp+4h] [rbp-30h] v12 = __readfsqword(0x28u); *(_QWORD *)(a1 + 16) = 0LL...
func0: MOV RDI,R12 CALL 0x00101840 MOV RAX,qword ptr [RSP + 0x8] SUB RAX,qword ptr FS:[0x28] JNZ 0x00101180 MOV RDI,RBX LAB_0010117b: CALL 0x00101150 LAB_00101180: CALL 0x00101130
/* func0(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >) [clone .cold] */ void func0(vector param_1,vector param_2,int param_3,int param_4,int param_5, int param_6,long param_7) { vector<int,std::allocator<int>> *unaff_R12; long in_FS_OFFSET; std::vector<int,std::...
643
func0
#include <vector> #include <assert.h>
std::vector<int> func0(std::vector<int> list1, std::vector<int> list2) { std::vector<int> result; for (int x : list1) { bool found = false; for (int y : list2) { if (x == y) { found = true; break; } } if (!found) {...
int main() { assert((func0({1,2,3,4,5,6,7,8,9,10}, {2,4,6,8}) == std::vector<int>{1, 3, 5, 7, 9, 10})); assert((func0({1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, {1, 3, 5, 7}) == std::vector<int>{2, 4, 6, 8, 9, 10})); assert((func0({1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, {5,7}) == std::vector<int>{1, 2, 3, 4, 6, 8, 9, 10}...
O3
cpp
func0(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >): endbr64 push %r14 pxor %xmm0,%xmm0 push %r13 push %r12 mov %rdi,%r12 push %rbp push %rbx sub $0x10,%rsp mov %fs:0x28,%rax mov %rax,0x8(%rsp) xor %eax,%eax movq $0x0,0x10(%rdi) movups %xmm0,(%rdi) mov (...
_Z5func0St6vectorIiSaIiEES1_: endbr64 push r13 pxor xmm0, xmm0 push r12 mov r12, rdi push rbp push rbx sub rsp, 18h mov rax, fs:28h mov [rsp+38h+var_30], rax xor eax, eax mov qword ptr [rdi+10h], 0 movups xmmword ptr [rdi], xmm0 mov rbx, [rsi] mov r13, [rsi+8] cmp r13...
long long func0(long long a1, int **a2, long long a3) { int *v3; // rbx int *v4; // r13 int v6; // edx _DWORD *v7; // rax _DWORD *v8; // rcx _DWORD *v10; // rsi int v11; // [rsp+0h] [rbp-34h] BYREF unsigned long long v12; // [rsp+4h] [rbp-30h] v12 = __readfsqword(0x28u); *(_QWORD *)(a1 + 16) = 0LL...
func0: MOV RDI,R12 CALL 0x00101840 MOV RAX,qword ptr [RSP + 0x8] SUB RAX,qword ptr FS:[0x28] JNZ 0x00101180 MOV RDI,RBX LAB_0010117b: CALL 0x00101150 LAB_00101180: CALL 0x00101130
/* func0(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >) [clone .cold] */ void func0(vector param_1,vector param_2,int param_3,int param_4,int param_5, int param_6,long param_7) { vector<int,std::allocator<int>> *unaff_R12; long in_FS_OFFSET; std::vector<int,std::...
644
func0
#include <assert.h>
int func0(int n) { if (n < 1) { return 0; } else { return n + func0(n - 2); } }
int main() { assert(func0(6) == 12); assert(func0(10) == 30); assert(func0(9) == 25); return 0; }
O0
cpp
func0(int): endbr64 push %rbp mov %rsp,%rbp sub $0x10,%rsp mov %edi,-0x4(%rbp) cmpl $0x0,-0x4(%rbp) jg 1165 <_Z5func0i+0x1c> mov $0x0,%eax jmp 1177 <_Z5func0i+0x2e> mov -0x4(%rbp),%eax sub $0x2,%eax mov %eax,%edi callq 1149 <_Z5func0i> mov -0x4(%rbp),%edx add %edx,%eax leaveq retq...
_Z5func0i: endbr64 push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_4], edi cmp [rbp+var_4], 0 jg short loc_1165 mov eax, 0 jmp short locret_1177 loc_1165: mov eax, [rbp+var_4] sub eax, 2 mov edi, eax; int call _Z5func0i; func0(int) mov edx, [rbp+var_4] add eax, edx...
long long func0(int a1) { if ( a1 > 0 ) return a1 + (unsigned int)func0(a1 - 2); else return 0LL; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV dword ptr [RBP + -0x4],EDI CMP dword ptr [RBP + -0x4],0x0 JG 0x00101165 MOV EAX,0x0 JMP 0x00101177 LAB_00101165: MOV EAX,dword ptr [RBP + -0x4] SUB EAX,0x2 MOV EDI,EAX CALL 0x00101149 MOV EDX,dword ptr [RBP + -0x4] ADD EAX,EDX LAB_00101177: LEAVE RET
/* func0(int) */ int func0(int param_1) { int iVar1; if (param_1 < 1) { iVar1 = 0; } else { iVar1 = func0(param_1 + -2); iVar1 = iVar1 + param_1; } return iVar1; }
645
func0
#include <assert.h>
int func0(int n) { if (n < 1) { return 0; } else { return n + func0(n - 2); } }
int main() { assert(func0(6) == 12); assert(func0(10) == 30); assert(func0(9) == 25); return 0; }
O1
cpp
func0(int): endbr64 mov $0x0,%eax test %edi,%edi jle 1165 <_Z5func0i+0x1c> push %rbx mov %edi,%ebx lea -0x2(%rdi),%edi callq 1149 <_Z5func0i> add %ebx,%eax pop %rbx retq retq
_Z5func0i: endbr64 mov eax, 0 test edi, edi jle short locret_1165 push rbx mov ebx, edi lea edi, [rdi-2]; int call _Z5func0i; func0(int) add eax, ebx pop rbx retn locret_1165: retn
long long func0(int a1) { long long result; // rax result = 0LL; if ( a1 > 0 ) return a1 + (unsigned int)func0(a1 - 2); return result; }
func0: ENDBR64 MOV EAX,0x0 TEST EDI,EDI JLE 0x00101165 PUSH RBX MOV EBX,EDI LEA EDI,[RDI + -0x2] CALL 0x00101149 ADD EAX,EBX POP RBX RET LAB_00101165: RET
/* func0(int) */ int func0(int param_1) { int iVar1; if (0 < param_1) { iVar1 = func0(param_1 + -2); return iVar1 + param_1; } return 0; }
646
func0
#include <assert.h>
int func0(int n) { if (n < 1) { return 0; } else { return n + func0(n - 2); } }
int main() { assert(func0(6) == 12); assert(func0(10) == 30); assert(func0(9) == 25); return 0; }
O2
cpp
func0(int): endbr64 xor %r8d,%r8d test %edi,%edi jle 116e <_Z5func0i+0x2e> lea -0x2(%rdi),%eax lea -0x1(%rdi),%edx xor %r8d,%r8d and $0xfffffffe,%edx mov %eax,%ecx sub %edx,%ecx jmp 1163 <_Z5func0i+0x23> nopl (%rax) sub $0x2,%eax mov %edi,%edx mov %eax,%edi add %edx,%r8d cmp ...
_Z5func0i: endbr64 xor edx, edx test edi, edi jle short loc_116D lea eax, [rdi-2] lea edx, [rdi-1] and edx, 0FFFFFFFEh mov esi, eax sub esi, edx xor edx, edx jmp short loc_1163 loc_1160: sub eax, 2 loc_1163: mov ecx, edi mov edi, eax add edx, ecx cmp eax, esi j...
long long func0(int a1) { unsigned int v1; // edx int v2; // eax unsigned int v3; // esi int v4; // ecx v1 = 0; if ( a1 > 0 ) { v2 = a1 - 2; v3 = a1 - 2 - ((a1 - 1) & 0xFFFFFFFE); v1 = 0; while ( 1 ) { v4 = a1; a1 = v2; v1 += v4; if ( v2 == v3 ) break;...
func0: ENDBR64 XOR EDX,EDX TEST EDI,EDI JLE 0x0010116d LEA EAX,[RDI + -0x2] LEA EDX,[RDI + -0x1] AND EDX,0xfffffffe MOV ESI,EAX SUB ESI,EDX XOR EDX,EDX JMP 0x00101163 LAB_00101160: SUB EAX,0x2 LAB_00101163: MOV ECX,EDI MOV EDI,EAX ADD EDX,ECX CMP EAX,ESI JNZ 0x00101160 LAB_0010116d: MOV EAX,EDX RET
/* func0(int) */ int func0(int param_1) { int iVar1; int iVar2; int iVar3; int iVar4; iVar3 = 0; if (0 < param_1) { iVar3 = 0; iVar1 = param_1 + -2; iVar4 = param_1; while (iVar2 = iVar1, iVar3 = iVar3 + iVar4, iVar2 != (param_1 + -2) - (param_1 - 1U & 0xfffffffe)) { iVa...
647
func0
#include <assert.h>
int func0(int n) { if (n < 1) { return 0; } else { return n + func0(n - 2); } }
int main() { assert(func0(6) == 12); assert(func0(10) == 30); assert(func0(9) == 25); return 0; }
O3
cpp
func0(int): endbr64 test %edi,%edi jle 11e8 <_Z5func0i+0xa8> lea -0x1(%rdi),%eax mov %eax,%ecx shr %ecx add $0x1,%ecx cmp $0x23,%eax jbe 11eb <_Z5func0i+0xab> movd %edi,%xmm4 mov %ecx,%edx movdqa 0xeb3(%rip),%xmm3 xor %eax,%eax pshufd $0x0,%xmm4,%xmm1 paddd 0xe94(%rip),%xmm1 shr $0x2,...
_Z5func0i: endbr64 mov edx, edi test edi, edi jle loc_1220 lea eax, [rdi-1] mov ecx, eax shr ecx, 1 add ecx, 1 cmp eax, 13h jbe loc_1223 movd xmm4, edi mov esi, ecx movdqa xmm3, cs:xmmword_2020 xor eax, eax pshufd xmm1, xmm4, 0 paddd xmm1, cs:xmmword_2010 shr esi, 2...
long long func0(signed int a1) { signed int v1; // edx unsigned int v2; // ecx __m128i si128; // xmm3 int v4; // eax __m128i v5; // xmm1 __m128i v6; // xmm0 __m128i v7; // xmm2 __m128i v8; // xmm0 long long result; // rax int v10; // edx v1 = a1; if ( a1 <= 0 ) return 0LL; v2 = ((unsigne...
func0: ENDBR64 MOV EDX,EDI TEST EDI,EDI JLE 0x00101220 LEA EAX,[RDI + -0x1] MOV ECX,EAX SHR ECX,0x1 ADD ECX,0x1 CMP EAX,0x13 JBE 0x00101223 MOVD XMM4,EDI MOV ESI,ECX MOVDQA XMM3,xmmword ptr [0x00102020] XOR EAX,EAX PSHUFD XMM1,XMM4,0x0 PADDD XMM1,xmmword ptr [0x00102010] SHR ESI,0x2 PXOR XMM0,XMM0 NOP dword ptr [RAX] L...
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* func0(int) */ int func0(int param_1) { uint uVar1; int iVar2; uint uVar3; int iVar4; int iVar5; int iVar6; int iVar7; int iVar8; int iVar9; int iVar10; if (param_1 < 1) { return 0; } uVar3 = (param...
648
func0
#include <cmath> #include <cassert>
double func0(int s, double l) { double area = s * (l * l) / (4 * tan(M_PI / s)); return area; }
int main() { assert(func0(4, 20) == 400.00000000000006); assert(func0(10, 15) == 1731.1969896610804); assert(func0(9, 7) == 302.90938549487214); return 0; }
O0
cpp
func0(int, double): endbr64 push %rbp mov %rsp,%rbp sub $0x30,%rsp mov %edi,-0x14(%rbp) movsd %xmm0,-0x20(%rbp) cvtsi2sdl -0x14(%rbp),%xmm1 movsd -0x20(%rbp),%xmm0 mulsd %xmm0,%xmm0 mulsd %xmm0,%xmm1 movsd %xmm1,-0x28(%rbp) cvtsi2sdl -0x14(%rbp),%xmm1 movsd 0xf37(%rip),%xmm0 divsd %xmm1,%xmm0 callq 1...
_Z5func0id: endbr64 push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_14], edi movsd [rbp+var_20], xmm0 pxor xmm1, xmm1 cvtsi2sd xmm1, [rbp+var_14] movsd xmm0, [rbp+var_20] mulsd xmm0, xmm0 mulsd xmm1, xmm0 movsd [rbp+var_28], xmm1 pxor xmm1, xmm1 cvtsi2sd xmm1, [rbp+var_14] movsd xmm0, c...
double func0(int a1, double a2) { return (double)a1 * (a2 * a2) / (4.0 * tan(3.141592653589793 / (double)a1)); }
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV dword ptr [RBP + -0x14],EDI MOVSD qword ptr [RBP + -0x20],XMM0 PXOR XMM1,XMM1 CVTSI2SD XMM1,dword ptr [RBP + -0x14] MOVSD XMM0,qword ptr [RBP + -0x20] MULSD XMM0,XMM0 MULSD XMM1,XMM0 MOVSD qword ptr [RBP + -0x28],XMM1 PXOR XMM1,XMM1 CVTSI2SD XMM1,dword ptr [RBP + -0x...
/* func0(int, double) */ double func0(int param_1,double param_2) { double dVar1; dVar1 = tan(DAT_001020b8 / (double)param_1); return ((double)param_1 * param_2 * param_2) / (DAT_001020c0 * dVar1); }
649
func0
#include <cmath> #include <cassert>
double func0(int s, double l) { double area = s * (l * l) / (4 * tan(M_PI / s)); return area; }
int main() { assert(func0(4, 20) == 400.00000000000006); assert(func0(10, 15) == 1731.1969896610804); assert(func0(9, 7) == 302.90938549487214); return 0; }
O1
cpp
func0(int, double): endbr64 sub $0x18,%rsp movsd %xmm0,0x8(%rsp) pxor %xmm2,%xmm2 cvtsi2sd %edi,%xmm2 movsd 0xea1(%rip),%xmm0 movsd %xmm2,(%rsp) divsd %xmm2,%xmm0 callq 1050 <tan@plt> movapd %xmm0,%xmm1 movsd 0x8(%rsp),%xmm0 mulsd %xmm0,%xmm0 mulsd (%rsp),%xmm0 mulsd 0xe80(%rip),%xmm1 divsd %xmm1,%xmm0 a...
_Z5func0id: endbr64 sub rsp, 18h movsd [rsp+18h+var_10], xmm0 pxor xmm2, xmm2 cvtsi2sd xmm2, edi movsd xmm0, cs:qword_2008 movsd [rsp+18h+var_18], xmm2 divsd xmm0, xmm2; x call _tan movapd xmm1, xmm0 movsd xmm0, [rsp+18h+var_10] mulsd xmm0, xmm0 mulsd xmm0, [rsp+18h+var_18] mulsd xmm1, cs:qwo...
double func0(int a1, double a2) { return a2 * a2 * (double)a1 / (tan(3.141592653589793 / (double)a1) * 4.0); }
func0: ENDBR64 SUB RSP,0x18 MOVSD qword ptr [RSP + 0x8],XMM0 PXOR XMM2,XMM2 CVTSI2SD XMM2,EDI MOVSD XMM0,qword ptr [0x00102008] MOVSD qword ptr [RSP],XMM2 DIVSD XMM0,XMM2 CALL 0x00101050 MOVAPD XMM1,XMM0 MOVSD XMM0,qword ptr [RSP + 0x8] MULSD XMM0,XMM0 MULSD XMM0,qword ptr [RSP] MULSD XMM1,qword ptr [0x00102010] DIVSD ...
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* func0(int, double) */ double func0(int param_1,double param_2) { double dVar1; dVar1 = tan(DAT_00102008 / (double)param_1); return (param_2 * param_2 * (double)param_1) / (dVar1 * _DAT_00102010); }
650
func0
#include <cmath> #include <cassert>
double func0(int s, double l) { double area = s * (l * l) / (4 * tan(M_PI / s)); return area; }
int main() { assert(func0(4, 20) == 400.00000000000006); assert(func0(10, 15) == 1731.1969896610804); assert(func0(9, 7) == 302.90938549487214); return 0; }
O2
cpp
func0(int, double): endbr64 pxor %xmm2,%xmm2 sub $0x18,%rsp cvtsi2sd %edi,%xmm2 movsd %xmm0,0x8(%rsp) movsd 0xe8a(%rip),%xmm0 divsd %xmm2,%xmm0 movsd %xmm2,(%rsp) callq 1050 <tan@plt> movsd 0x8(%rsp),%xmm1 movsd (%rsp),%xmm2 mulsd 0xe71(%rip),%xmm0 add $0x18,%rsp mulsd %xmm1,%xmm1 mulsd %xmm2,%xmm1 di...
_Z5func0id: endbr64 pxor xmm2, xmm2 sub rsp, 18h cvtsi2sd xmm2, edi movsd [rsp+18h+var_10], xmm0 movsd xmm0, cs:qword_2008 divsd xmm0, xmm2; x movsd [rsp+18h+var_18], xmm2 call _tan movsd xmm1, [rsp+18h+var_10] movsd xmm2, [rsp+18h+var_18] mulsd xmm0, cs:qword_2010 add rsp, 18h mulsd xmm1,...
__int128 __usercall func0@<xmm0>(int a1@<edi>, double a2@<xmm0>) { __int128 v2; // xmm1 v2 = *(unsigned long long *)&a2; *(double *)&v2 = *(double *)&v2 * *(double *)&v2 * (double)a1 / (tan(3.141592653589793 / (double)a1) * 4.0); return v2; }
func0: ENDBR64 PXOR XMM2,XMM2 SUB RSP,0x18 CVTSI2SD XMM2,EDI MOVSD qword ptr [RSP + 0x8],XMM0 MOVSD XMM0,qword ptr [0x00102008] DIVSD XMM0,XMM2 MOVSD qword ptr [RSP],XMM2 CALL 0x00101050 MOVSD XMM1,qword ptr [RSP + 0x8] MOVSD XMM2,qword ptr [RSP] MULSD XMM0,qword ptr [0x00102010] ADD RSP,0x18 MULSD XMM1,XMM1 MULSD XMM1...
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* func0(int, double) */ double func0(int param_1,double param_2) { double dVar1; dVar1 = tan(DAT_00102008 / (double)param_1); return (param_2 * param_2 * (double)param_1) / (dVar1 * _DAT_00102010); }
651
func0
#include <cmath> #include <cassert>
double func0(int s, double l) { double area = s * (l * l) / (4 * tan(M_PI / s)); return area; }
int main() { assert(func0(4, 20) == 400.00000000000006); assert(func0(10, 15) == 1731.1969896610804); assert(func0(9, 7) == 302.90938549487214); return 0; }
O3
cpp
func0(int, double): endbr64 pxor %xmm2,%xmm2 sub $0x18,%rsp cvtsi2sd %edi,%xmm2 movsd %xmm0,0x8(%rsp) movsd 0xe8a(%rip),%xmm0 divsd %xmm2,%xmm0 movsd %xmm2,(%rsp) callq 1050 <tan@plt> movsd 0x8(%rsp),%xmm1 movsd (%rsp),%xmm2 mulsd 0xe71(%rip),%xmm0 add $0x18,%rsp mulsd %xmm1,%xmm1 mulsd %xmm2,%xmm1 di...
_Z5func0id: endbr64 pxor xmm2, xmm2 sub rsp, 18h cvtsi2sd xmm2, edi movsd [rsp+18h+var_10], xmm0 movsd xmm0, cs:qword_2008 divsd xmm0, xmm2; x movsd [rsp+18h+var_18], xmm2 call _tan movsd xmm1, [rsp+18h+var_10] movsd xmm2, [rsp+18h+var_18] mulsd xmm0, cs:qword_2010 add rsp, 18h mulsd xmm1,...
__int128 __usercall func0@<xmm0>(int a1@<edi>, double a2@<xmm0>) { __int128 v2; // xmm1 v2 = *(unsigned long long *)&a2; *(double *)&v2 = *(double *)&v2 * *(double *)&v2 * (double)a1 / (tan(3.141592653589793 / (double)a1) * 4.0); return v2; }
func0: ENDBR64 PXOR XMM2,XMM2 SUB RSP,0x18 CVTSI2SD XMM2,EDI MOVSD qword ptr [RSP + 0x8],XMM0 MOVSD XMM0,qword ptr [0x00102008] DIVSD XMM0,XMM2 MOVSD qword ptr [RSP],XMM2 CALL 0x00101050 MOVSD XMM1,qword ptr [RSP + 0x8] MOVSD XMM2,qword ptr [RSP] MULSD XMM0,qword ptr [0x00102010] ADD RSP,0x18 MULSD XMM1,XMM1 MULSD XMM1...
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* func0(int, double) */ double func0(int param_1,double param_2) { double dVar1; dVar1 = tan(DAT_00102008 / (double)param_1); return (param_2 * param_2 * (double)param_1) / (dVar1 * _DAT_00102010); }
652
func0
#include <iostream> #include <cassert>
bool func0(long num1, long num2) { long sum1 = 1; long i1 = 2; while (i1 * i1 <= num1) { if (num1 % i1 == 0) { sum1 += i1 + (num1 / i1); } i1++; } long sum2 = 1; long i2 = 2; while (i2 * i2 <= num2) { if (num2 % i2 == 0) { ...
int main() { assert(func0(36, 57) == false); assert(func0(2, 4) == false); assert(func0(23, 47) == true); return 0; }
O0
cpp
func0(long, long): endbr64 push %rbp mov %rsp,%rbp mov %rdi,-0x28(%rbp) mov %rsi,-0x30(%rbp) movq $0x1,-0x20(%rbp) movq $0x2,-0x18(%rbp) mov -0x18(%rbp),%rax imul %rax,%rax cmp %rax,-0x28(%rbp) jl 11e8 <_Z5func0ll+0x5f> mov -0x28(%rbp),%rax cqto idivq -0x18(%rbp) mov %rdx,%rax test %...
_Z5func0ll: endbr64 push rbp mov rbp, rsp mov [rbp+var_28], rdi mov [rbp+var_30], rsi mov [rbp+var_20], 1 mov [rbp+var_18], 2 jmp short loc_119A loc_116B: mov rax, [rbp+var_28] cqo idiv [rbp+var_18] mov rax, rdx test rax, rax jnz short loc_1195 mov rax, [rbp+var_28] cqo ...
bool func0(long long a1, long long a2) { long long v3; // [rsp+10h] [rbp-20h] long long i; // [rsp+18h] [rbp-18h] long long v5; // [rsp+20h] [rbp-10h] long long j; // [rsp+28h] [rbp-8h] v3 = 1LL; for ( i = 2LL; a1 >= i * i; ++i ) { if ( !(a1 % i) ) v3 += a1 / i + i; } v5 = 1LL; for ( j =...
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x28],RDI MOV qword ptr [RBP + -0x30],RSI MOV qword ptr [RBP + -0x20],0x1 MOV qword ptr [RBP + -0x18],0x2 JMP 0x0010119a LAB_0010116b: MOV RAX,qword ptr [RBP + -0x28] CQO IDIV qword ptr [RBP + -0x18] MOV RAX,RDX TEST RAX,RAX JNZ 0x00101195 MOV RAX,qword ptr [RBP...
/* func0(long, long) */ int8 func0(long param_1,long param_2) { int8 local_28; int8 local_20; int8 local_18; int8 local_10; local_28 = 1; for (local_20 = 2; local_20 * local_20 <= param_1; local_20 = local_20 + 1) { if (param_1 % local_20 == 0) { local_28 = local_28 + local_20 + param_1 / loc...
653
func0
#include <iostream> #include <cassert>
bool func0(long num1, long num2) { long sum1 = 1; long i1 = 2; while (i1 * i1 <= num1) { if (num1 % i1 == 0) { sum1 += i1 + (num1 / i1); } i1++; } long sum2 = 1; long i2 = 2; while (i2 * i2 <= num2) { if (num2 % i2 == 0) { ...
int main() { assert(func0(36, 57) == false); assert(func0(2, 4) == false); assert(func0(23, 47) == true); return 0; }
O1
cpp
func0(long, long): endbr64 mov $0x2,%ecx mov $0x1,%r8d cmp $0x3,%rdi jg 11c0 <_Z5func0ll+0x37> cmp $0x3,%rsi jle 120a <_Z5func0ll+0x81> mov $0x2,%ecx mov $0x1,%edi jmp 11ed <_Z5func0ll+0x64> add $0x1,%rcx mov %rcx,%rax imul %rcx,%rax cmp %rdi,%rax jg 119e <_Z5func0ll+0x15> mov...
_Z5func0ll: endbr64 cmp rdi, 3 jle short loc_118D mov ecx, 2 mov r8d, 1 jmp short loc_1170 loc_1160: add rcx, 1 mov rax, rcx imul rax, rcx cmp rax, rdi jg short loc_1193 loc_1170: mov rax, rdi cqo idiv rcx test rdx, rdx jnz short loc_1160 mov rax, rdi cqo idiv ...
bool func0(long long a1, long long a2) { long long v2; // rcx long long v3; // r8 long long v4; // rcx long long v5; // rdi if ( a1 <= 3 ) { v3 = 1LL; } else { v2 = 2LL; v3 = 1LL; do { if ( !(a1 % v2) ) v3 += v2 + a1 / v2; ++v2; } while ( v2 * v2 <= a1...
func0: ENDBR64 CMP RDI,0x3 JLE 0x0010118d MOV ECX,0x2 MOV R8D,0x1 JMP 0x00101170 LAB_00101160: ADD RCX,0x1 MOV RAX,RCX IMUL RAX,RCX CMP RAX,RDI JG 0x00101193 LAB_00101170: MOV RAX,RDI CQO IDIV RCX TEST RDX,RDX JNZ 0x00101160 MOV RAX,RDI CQO IDIV RCX ADD RAX,RCX ADD R8,RAX JMP 0x00101160 LAB_0010118d: MOV R8D,0x1 LAB_00...
/* func0(long, long) */ bool func0(long param_1,long param_2) { long lVar1; long lVar2; long lVar3; if (param_1 < 4) { lVar3 = 1; } else { lVar1 = 2; lVar3 = 1; do { if (param_1 % lVar1 == 0) { lVar3 = lVar3 + param_1 / lVar1 + lVar1; } lVar1 = lVar1 + 1; }...
654
func0
#include <iostream> #include <cassert>
bool func0(long num1, long num2) { long sum1 = 1; long i1 = 2; while (i1 * i1 <= num1) { if (num1 % i1 == 0) { sum1 += i1 + (num1 / i1); } i1++; } long sum2 = 1; long i2 = 2; while (i2 * i2 <= num2) { if (num2 % i2 == 0) { ...
int main() { assert(func0(36, 57) == false); assert(func0(2, 4) == false); assert(func0(23, 47) == true); return 0; }
O2
cpp
func0(long, long): endbr64 mov $0x2,%ecx mov $0x1,%r8d cmp $0x3,%rdi jle 12bd <_Z5func0ll+0x3d> nopl (%rax) mov %rdi,%rax cqto idiv %rcx add %rcx,%rax add %r8,%rax test %rdx,%rdx cmove %rax,%r8 add $0x1,%rcx mov %rcx,%rax imul %rcx,%rax cmp %rdi,%rax jle 1298 <_Z5func0ll+0x18> ...
_Z5func0ll: endbr64 cmp rdi, 3 jle short loc_1280 mov ecx, 2 mov r8d, 1 nop dword ptr [rax] loc_1218: mov rax, rdi cqo idiv rcx add rax, rcx add rax, r8 test rdx, rdx cmovz r8, rax add rcx, 1 mov rax, rcx imul rax, rcx cmp rax, rdi jle short loc_1218 cmp rs...
bool func0(long long a1, long long a2) { long long v2; // rcx long long v3; // r8 long long v4; // rcx long long v5; // rdi if ( a1 > 3 ) { v2 = 2LL; v3 = 1LL; do { if ( !(a1 % v2) ) v3 += v2 + a1 / v2; ++v2; } while ( v2 * v2 <= a1 ); if ( a2 > 3 ) go...
func0: ENDBR64 CMP RDI,0x3 JLE 0x00101280 MOV ECX,0x2 MOV R8D,0x1 NOP dword ptr [RAX] LAB_00101218: MOV RAX,RDI CQO IDIV RCX ADD RAX,RCX ADD RAX,R8 TEST RDX,RDX CMOVZ R8,RAX ADD RCX,0x1 MOV RAX,RCX IMUL RAX,RCX CMP RAX,RDI JLE 0x00101218 CMP RSI,0x3 JLE 0x0010128c LAB_00101243: MOV ECX,0x2 MOV EDI,0x1 NOP dword ptr [RA...
/* func0(long, long) */ bool func0(long param_1,long param_2) { long lVar1; long lVar2; long lVar3; if (param_1 < 4) { lVar3 = 1; } else { lVar1 = 2; lVar3 = 1; do { if (param_1 % lVar1 == 0) { lVar3 = param_1 / lVar1 + lVar1 + lVar3; } lVar1 = lVar1 + 1; }...
655
func0
#include <iostream> #include <cassert>
bool func0(long num1, long num2) { long sum1 = 1; long i1 = 2; while (i1 * i1 <= num1) { if (num1 % i1 == 0) { sum1 += i1 + (num1 / i1); } i1++; } long sum2 = 1; long i2 = 2; while (i2 * i2 <= num2) { if (num2 % i2 == 0) { ...
int main() { assert(func0(36, 57) == false); assert(func0(2, 4) == false); assert(func0(23, 47) == true); return 0; }
O3
cpp
func0(long, long): endbr64 mov $0x2,%ecx mov $0x1,%r8d cmp $0x3,%rdi jle 12bd <_Z5func0ll+0x3d> nopl (%rax) mov %rdi,%rax cqto idiv %rcx add %rcx,%rax add %r8,%rax test %rdx,%rdx cmove %rax,%r8 add $0x1,%rcx mov %rcx,%rax imul %rcx,%rax cmp %rdi,%rax jle 1298 <_Z5func0ll+0x18> ...
_Z5func0ll: endbr64 cmp rdi, 3 jle short loc_1280 mov ecx, 2 mov r8d, 1 nop dword ptr [rax] loc_1218: mov rax, rdi cqo idiv rcx add rax, rcx add rax, r8 test rdx, rdx cmovz r8, rax add rcx, 1 mov rax, rcx imul rax, rcx cmp rax, rdi jle short loc_1218 cmp rs...
bool func0(long long a1, long long a2) { long long v2; // rcx long long v3; // r8 long long v4; // rcx long long v5; // rdi if ( a1 > 3 ) { v2 = 2LL; v3 = 1LL; do { if ( !(a1 % v2) ) v3 += v2 + a1 / v2; ++v2; } while ( v2 * v2 <= a1 ); if ( a2 > 3 ) go...
func0: ENDBR64 CMP RDI,0x3 JLE 0x00101280 MOV ECX,0x2 MOV R8D,0x1 NOP dword ptr [RAX] LAB_00101218: MOV RAX,RDI CQO IDIV RCX ADD RAX,RCX ADD RAX,R8 TEST RDX,RDX CMOVZ R8,RAX ADD RCX,0x1 MOV RAX,RCX IMUL RAX,RCX CMP RAX,RDI JLE 0x00101218 CMP RSI,0x3 JLE 0x0010128c LAB_00101243: MOV ECX,0x2 MOV EDI,0x1 NOP dword ptr [RA...
/* func0(long, long) */ bool func0(long param_1,long param_2) { long lVar1; long lVar2; long lVar3; if (param_1 < 4) { lVar3 = 1; } else { lVar1 = 2; lVar3 = 1; do { if (param_1 % lVar1 == 0) { lVar3 = param_1 / lVar1 + lVar1 + lVar3; } lVar1 = lVar1 + 1; }...
656
func0
#include <assert.h> #include <string>
int func0(std::string str1) { int count_chars = 0; for (int i = 0; i < str1.length(); i++) { if ((i == (str1[i] - 'A')) || (i == (str1[i] - 'a'))) { count_chars++; } } return count_chars; }
int main() { assert(func0("xbcefg") == 2); assert(func0("ABcED") == 3); assert(func0("AbgdeF") == 5); 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 $0x28,%rsp mov %rdi,-0x28(%rbp) movl $0x0,-0x18(%rbp) movl $0x0,-0x14(%rbp) mov -0x14(%rbp),%eax movslq %eax,%rbx mov -0x28(%rbp),%rax mov %rax,%rdi callq 1290...
_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 28h mov [rbp+var_28], rdi mov [rbp+var_18], 0 mov [rbp+var_14], 0 jmp short loc_13C8 loc_136A: mov eax, [rbp+var_14] movsxd rdx, eax mov rax, [rbp+var_28] mov rsi, rdx...
long long func0(long long a1) { unsigned int v3; // [rsp+18h] [rbp-18h] int i; // [rsp+1Ch] [rbp-14h] v3 = 0; for ( i = 0; i < (unsigned long long)std::string::length(a1); ++i ) { if ( i == *(char *)std::string::operator[](a1, i) - 65 || i == *(char *)std::string::operator[](a1, i) - 97 ) ++v3; ...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x28 MOV qword ptr [RBP + -0x28],RDI MOV dword ptr [RBP + -0x18],0x0 MOV dword ptr [RBP + -0x14],0x0 JMP 0x001013c8 LAB_0010136a: MOV EAX,dword ptr [RBP + -0x14] MOVSXD RDX,EAX MOV RAX,qword ptr [RBP + -0x28] MOV RSI,RDX MOV RDI,RAX CALL 0x00101250 MOVZX EAX,byte ptr...
/* func0(std::string) */ int func0(ulong param_1) { bool bVar1; char *pcVar2; ulong uVar3; int4 local_20; int4 local_1c; local_20 = 0; local_1c = 0; do { uVar3 = std::string::length(); if (uVar3 <= (ulong)(long)local_1c) { return local_20; } pcVar2 = (char *)std::string::opera...
657
func0
#include <assert.h> #include <string>
int func0(std::string str1) { int count_chars = 0; for (int i = 0; i < str1.length(); i++) { if ((i == (str1[i] - 'A')) || (i == (str1[i] - 'a'))) { count_chars++; } } return count_chars; }
int main() { assert(func0("xbcefg") == 2); assert(func0("ABcED") == 3); assert(func0("AbgdeF") == 5); return 0; }
O1
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >): endbr64 mov 0x8(%rdi),%r8 test %r8,%r8 je 1225 <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x3c> mov (%rdi),%rdi mov $0x0,%eax mov $0x0,%esi jmp 1211 <_Z5func0NSt7__cxx1112basic_stringIcSt11cha...
_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 mov r8, [rdi+8] test r8, r8 jz short loc_1245 mov rdi, [rdi] mov eax, 0 mov esi, 0 jmp short loc_1231 loc_1225: add esi, 1 loc_1228: add rax, 1 cmp r8, rax jz short loc_124A loc_1231: movsx edx, byte ptr...
long long func0(long long *a1) { long long v1; // r8 long long v2; // rdi long long v3; // rax unsigned int v4; // esi int v5; // edx v1 = a1[1]; if ( v1 ) { v2 = *a1; v3 = 0LL; v4 = 0; do { v5 = *(char *)(v2 + v3); if ( v5 - 65 == (_DWORD)v3 || v5 - 97 == (_DWORD)v3 ) ...
func0: ENDBR64 MOV R8,qword ptr [RDI + 0x8] TEST R8,R8 JZ 0x00101245 MOV RDI,qword ptr [RDI] MOV EAX,0x0 MOV ESI,0x0 JMP 0x00101231 LAB_00101225: ADD ESI,0x1 LAB_00101228: ADD RAX,0x1 CMP R8,RAX JZ 0x0010124a LAB_00101231: MOVSX EDX,byte ptr [RDI + RAX*0x1] LEA ECX,[RDX + -0x41] CMP ECX,EAX JZ 0x00101225 SUB EDX,0x61 C...
/* func0(std::string) */ int func0(long *param_1) { long lVar1; int iVar2; if (param_1[1] == 0) { iVar2 = 0; } else { lVar1 = 0; iVar2 = 0; do { if ((*(char *)(*param_1 + lVar1) + -0x41 == (int)lVar1) || (*(char *)(*param_1 + lVar1) + -0x61 == (int)lVar1)) { iVar2 =...
658
func0
#include <assert.h> #include <string>
int func0(std::string str1) { int count_chars = 0; for (int i = 0; i < str1.length(); i++) { if ((i == (str1[i] - 'A')) || (i == (str1[i] - 'a'))) { count_chars++; } } return count_chars; }
int main() { assert(func0("xbcefg") == 2); assert(func0("ABcED") == 3); assert(func0("AbgdeF") == 5); return 0; }
O2
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >): endbr64 mov 0x8(%rdi),%rsi test %rsi,%rsi je 1450 <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x50> mov (%rdi),%rdi xor %eax,%eax xor %r8d,%r8d jmp 1430 <_Z5func0NSt7__cxx1112basic_stringIcSt11...
_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 mov r8, [rdi+8] test r8, r8 jz short loc_1380 mov rdi, [rdi] xor eax, eax xor esi, esi jmp short loc_1360 loc_1350: sub edx, 61h ; 'a' cmp eax, edx jz short loc_136B add rax, 1 cmp r8, rax jz shor...
long long func0(long long *a1) { long long v1; // r8 long long v2; // rdi long long v3; // rax unsigned int v4; // esi int v5; // edx v1 = a1[1]; if ( !v1 ) return 0LL; v2 = *a1; v3 = 0LL; v4 = 0; do { while ( 1 ) { v5 = *(char *)(v2 + v3); if ( (_DWORD)v3 == v5 - 65 ||...
func0: ENDBR64 MOV R8,qword ptr [RDI + 0x8] TEST R8,R8 JZ 0x00101380 MOV RDI,qword ptr [RDI] XOR EAX,EAX XOR ESI,ESI JMP 0x00101360 LAB_00101350: SUB EDX,0x61 CMP EAX,EDX JZ 0x0010136b ADD RAX,0x1 CMP R8,RAX JZ 0x00101377 LAB_00101360: MOVSX EDX,byte ptr [RDI + RAX*0x1] LEA ECX,[RDX + -0x41] CMP EAX,ECX JNZ 0x00101350 ...
/* func0(std::string) */ int func0(long *param_1) { long lVar1; long lVar2; int iVar3; lVar1 = param_1[1]; if (lVar1 == 0) { return 0; } lVar2 = 0; iVar3 = 0; do { while( true ) { if (((int)lVar2 == *(char *)(*param_1 + lVar2) + -0x41) || ((int)lVar2 == *(char *)(*param_1 +...
659
func0
#include <assert.h> #include <string>
int func0(std::string str1) { int count_chars = 0; for (int i = 0; i < str1.length(); i++) { if ((i == (str1[i] - 'A')) || (i == (str1[i] - 'a'))) { count_chars++; } } return count_chars; }
int main() { assert(func0("xbcefg") == 2); assert(func0("ABcED") == 3); assert(func0("AbgdeF") == 5); return 0; }
O3
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >): endbr64 mov 0x8(%rdi),%r9 test %r9,%r9 je 1c58 <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x228> lea -0x1(%r9),%rax mov (%rdi),%rdi cmp $0xe,%rax jbe 1c5f <_Z5func0NSt7__cxx1112basic_stringIcS...
_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 mov rsi, [rdi+8] test rsi, rsi jz loc_2710 lea rax, [rsi-1] mov rdi, [rdi] cmp rax, 0Eh jbe loc_2713 mov rcx, rsi pxor xmm2, xmm2 pxor xmm15, xmm15 mov rax, rdi and rcx, 0FFFFFFFFFFFFFFF0h movdqa xmm5, x...
long long func0(const __m128i **a1) { unsigned long long v1; // rsi const __m128i *v2; // rdi const __m128i *v3; // rax unsigned long long v4; // rcx __m128i si128; // xmm11 __m128i v6; // xmm10 __m128i v7; // xmm9 __m128i v8; // xmm4 __m128i v9; // xmm8 __m128i v10; // xmm0 __m128i v11; // xmm7 ...
func0: ENDBR64 MOV RSI,qword ptr [RDI + 0x8] TEST RSI,RSI JZ 0x00102710 LEA RAX,[RSI + -0x1] MOV RDI,qword ptr [RDI] CMP RAX,0xe JBE 0x00102713 MOV RCX,RSI PXOR XMM2,XMM2 PXOR XMM15,XMM15 MOV RAX,RDI AND RCX,-0x10 MOVDQA XMM5,XMM2 MOVDQA XMM11,xmmword ptr [0x001030c0] MOVDQA XMM10,xmmword ptr [0x00103110] MOVDQA XMM9,x...
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* func0(std::string) */ int func0(int8 *param_1) { ulong uVar1; ulong uVar2; int (*pauVar3) [16]; int auVar4 [14]; int auVar5 [12]; unkbyte10 Var6; int auVar7 [12]; int auVar8 [16]; int auVar9 [16]; int auVar10 [...
660
func0
#include <vector> #include <assert.h>
int func0(const std::vector<int>& A, int N) { int evenPair = 0; for (int i = 0; i < N; ++i) { for (int j = i + 1; j < N; ++j) { if ((A[i] ^ A[j]) % 2 == 0) { evenPair++; } } } return evenPair; }
int main() { assert(func0({5,4,7,2,1}, 5) == 4); assert(func0({7,2,8,1,0,5,11}, 7) == 9); assert(func0({1,2,3}, 3) == 1); return 0; }
O0
cpp
func0(std::vector<int, std::allocator<int> > const&, int): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x28,%rsp mov %rdi,-0x28(%rbp) mov %esi,-0x2c(%rbp) movl $0x0,-0x1c(%rbp) movl $0x0,-0x18(%rbp) mov -0x18(%rbp),%eax cmp -0x2c(%rbp),%eax jge 12b0 <_Z5func0RKSt6vectorIiSaIiEEi+0x87> mo...
_Z5func0RKSt6vectorIiSaIiEEi: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 28h mov [rbp+var_28], rdi mov [rbp+var_2C], esi mov [rbp+var_1C], 0 mov [rbp+var_18], 0 jmp short loc_12C8 loc_126D: mov eax, [rbp+var_18] add eax, 1 mov [rbp+var_14], eax jmp short loc_12BC l...
long long func0(long long a1, int a2) { int v2; // ebx unsigned int v4; // [rsp+14h] [rbp-1Ch] int i; // [rsp+18h] [rbp-18h] int j; // [rsp+1Ch] [rbp-14h] v4 = 0; for ( i = 0; i < a2; ++i ) { for ( j = i + 1; j < a2; ++j ) { v2 = *(_DWORD *)std::vector<int>::operator[](a1, i); if ( (...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x28 MOV qword ptr [RBP + -0x28],RDI MOV dword ptr [RBP + -0x2c],ESI MOV dword ptr [RBP + -0x1c],0x0 MOV dword ptr [RBP + -0x18],0x0 JMP 0x001012c8 LAB_0010126d: MOV EAX,dword ptr [RBP + -0x18] ADD EAX,0x1 MOV dword ptr [RBP + -0x14],EAX JMP 0x001012bc LAB_00101278: ...
/* func0(std::vector<int, std::allocator<int> > const&, int) */ int func0(vector *param_1,int param_2) { uint uVar1; uint *puVar2; int4 local_24; int4 local_20; int4 local_1c; local_24 = 0; for (local_20 = 0; local_1c = local_20, local_20 < param_2; local_20 = local_20 + 1) { while (local_1c = lo...
661
func0
#include <vector> #include <assert.h>
int func0(const std::vector<int>& A, int N) { int evenPair = 0; for (int i = 0; i < N; ++i) { for (int j = i + 1; j < N; ++j) { if ((A[i] ^ A[j]) % 2 == 0) { evenPair++; } } } return evenPair; }
int main() { assert(func0({5,4,7,2,1}, 5) == 4); assert(func0({7,2,8,1,0,5,11}, 7) == 9); assert(func0({1,2,3}, 3) == 1); return 0; }
O1
cpp
func0(std::vector<int, std::allocator<int> > const&, int): endbr64 test %esi,%esi jle 1252 <_Z5func0RKSt6vectorIiSaIiEEi+0x49> lea -0x1(%rsi),%r11d add $0x1,%r11 mov $0x1,%r10d mov $0x0,%ecx cmp %r11,%r10 je 1257 <_Z5func0RKSt6vectorIiSaIiEEi+0x4e> mov (%rdi),%r8 mov -0x4(%r8,%r10,4),%r9d ...
_Z5func0RKSt6vectorIiSaIiEEi: endbr64 test esi, esi jle short loc_1267 push rbp push rbx mov ebx, esi movsxd rbp, esi mov r11d, 0 mov r10d, 1 mov ecx, 0 jmp short loc_122E loc_122B: mov r10, rax loc_122E: cmp r10, rbx jz short loc_1262 mov r8, [rdi] mov r9d, [r8+r1...
long long func0(_QWORD *a1, int a2) { long long v2; // r11 long long v3; // r10 unsigned int v4; // ecx long long v5; // rax if ( a2 <= 0 ) return 0LL; v2 = 0LL; v3 = 1LL; v4 = 0; while ( v3 != a2 ) { v5 = v3; do v4 += ((*(_DWORD *)(*a1 + 4 * v5++) ^ *(_DWORD *)(*a1 + v2)) & 1) =...
func0: ENDBR64 TEST ESI,ESI JLE 0x00101267 PUSH RBP PUSH RBX MOV EBX,ESI MOVSXD RBP,ESI MOV R11D,0x0 MOV R10D,0x1 MOV ECX,0x0 JMP 0x0010122e LAB_0010122b: MOV R10,RAX LAB_0010122e: CMP R10,RBX JZ 0x00101262 MOV R8,qword ptr [RDI] MOV R9D,dword ptr [R8 + R11*0x1] MOV RAX,R10 LAB_0010123d: MOV EDX,R9D XOR EDX,dword ptr [...
/* func0(std::vector<int, std::allocator<int> > const&, int) */ int func0(vector *param_1,int param_2) { ulong uVar1; int iVar2; ulong uVar3; long lVar4; bool bVar5; if (param_2 < 1) { return 0; } lVar4 = 0; iVar2 = 0; uVar3 = 1; do { if (uVar3 == (uint)param_2) { return iVar2; ...
662
func0
#include <vector> #include <assert.h>
int func0(const std::vector<int>& A, int N) { int evenPair = 0; for (int i = 0; i < N; ++i) { for (int j = i + 1; j < N; ++j) { if ((A[i] ^ A[j]) % 2 == 0) { evenPair++; } } } return evenPair; }
int main() { assert(func0({5,4,7,2,1}, 5) == 4); assert(func0({7,2,8,1,0,5,11}, 7) == 9); assert(func0({1,2,3}, 3) == 1); return 0; }
O2
cpp
func0(std::vector<int, std::allocator<int> > const&, int): endbr64 test %esi,%esi jle 14d5 <_Z5func0RKSt6vectorIiSaIiEEi+0x55> lea -0x1(%rsi),%r11d mov $0x1,%r10d xor %r8d,%r8d add $0x1,%r11 cmp %r11,%r10 je 14d1 <_Z5func0RKSt6vectorIiSaIiEEi+0x51> xchg %ax,%ax mov (%rdi),%rcx mov %r10,%...
_Z5func0RKSt6vectorIiSaIiEEi: endbr64 test esi, esi jle short loc_13F7 cmp esi, 1 jz short loc_13F7 mov rdi, [rdi] mov r11d, esi mov r9d, 1 xor r10d, r10d xor ecx, ecx xchg ax, ax loc_13C0: mov r8d, [rdi+r10] mov rax, r9 nop word ptr [rax+rax+00000000h] loc_13D0: mov ...
long long func0(long long *a1, int a2) { long long v2; // rdi long long v3; // r9 long long v4; // r10 unsigned int v5; // ecx long long v6; // rax if ( a2 < 2 ) return 0LL; v2 = *a1; v3 = 1LL; v4 = 0LL; v5 = 0; do { v6 = v3; do v5 += (((unsigned __int8)*(_DWORD *)(v2 + v4) ^...
func0: ENDBR64 TEST ESI,ESI JLE 0x001013f7 CMP ESI,0x1 JZ 0x001013f7 MOV RDI,qword ptr [RDI] MOV R11D,ESI MOV R9D,0x1 XOR R10D,R10D XOR ECX,ECX NOP LAB_001013c0: MOV R8D,dword ptr [RDI + R10*0x1] MOV RAX,R9 NOP word ptr [RAX + RAX*0x1] LAB_001013d0: MOV EDX,dword ptr [RDI + RAX*0x4] XOR EDX,R8D AND EDX,0x1 CMP EDX,0x1 ...
/* func0(std::vector<int, std::allocator<int> > const&, int) */ int func0(vector *param_1,int param_2) { ulong uVar1; int iVar2; ulong uVar3; long lVar4; if ((0 < param_2) && (param_2 != 1)) { uVar3 = 1; lVar4 = 0; iVar2 = 0; do { uVar1 = uVar3; do { iVar2 = iVar2 + (u...
663
func0
#include <vector> #include <assert.h>
int func0(const std::vector<int>& A, int N) { int evenPair = 0; for (int i = 0; i < N; ++i) { for (int j = i + 1; j < N; ++j) { if ((A[i] ^ A[j]) % 2 == 0) { evenPair++; } } } return evenPair; }
int main() { assert(func0({5,4,7,2,1}, 5) == 4); assert(func0({7,2,8,1,0,5,11}, 7) == 9); assert(func0({1,2,3}, 3) == 1); return 0; }
O3
cpp
func0(std::vector<int, std::allocator<int> > const&, int): endbr64 test %esi,%esi jle 15b2 <_Z5func0RKSt6vectorIiSaIiEEi+0x152> cmp $0x1,%esi je 15b2 <_Z5func0RKSt6vectorIiSaIiEEi+0x152> push %r14 movdqa 0xc61(%rip),%xmm4 xor %r9d,%r9d xor %r8d,%r8d push %rbp mov $0x1,%ecx mov $0x1,%r11d pxo...
_Z5func0RKSt6vectorIiSaIiEEi: endbr64 test esi, esi jle loc_16C2 mov r8d, esi cmp esi, 1 jz loc_16C2 push r14 xor r9d, r9d mov ecx, 1 pxor xmm3, xmm3 movdqa xmm4, cs:xmmword_20D0 push rbp lea ebp, [rsi-1] push rbx mov ebx, 1 mov r11, [rdi] xor edi, edi nop dw...
long long func0(long long *a1, int a2) { long long v3; // r9 int v4; // ecx __m128i si128; // xmm4 int v6; // ebp long long v7; // r11 unsigned int v8; // edi unsigned int v9; // esi unsigned int v10; // r10d __m128i v11; // xmm1 const __m128i *v12; // rax __m128i v13; // xmm2 __m128i v14; // x...
func0: ENDBR64 TEST ESI,ESI JLE 0x001016c2 MOV R8D,ESI CMP ESI,0x1 JZ 0x001016c2 PUSH R14 XOR R9D,R9D MOV ECX,0x1 PXOR XMM3,XMM3 MOVDQA XMM4,xmmword ptr [0x001020d0] PUSH RBP LEA EBP,[RSI + -0x1] PUSH RBX MOV EBX,0x1 MOV R11,qword ptr [RDI] XOR EDI,EDI NOP dword ptr [RAX] LAB_001015c0: MOV R10D,R8D MOV EAX,EBP MOV ESI,...
/* 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; uint uVar2; long lVar3; uint uVar4; uint uVar5; uint *puVar6; uint *puVar7; uint *puVar8; uint *pu...
664
func0
#include <assert.h>
int func0(int n) { int count = 0; if (n && !(n & (n - 1))) { return n; } while(n != 0) { n >>= 1; count += 1; } return 1 << count; }
int main() { assert(func0(0) == 1); assert(func0(5) == 8); assert(func0(17) == 32); return 0; }
O0
cpp
func0(int): endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x14(%rbp) movl $0x0,-0x4(%rbp) cmpl $0x0,-0x14(%rbp) je 1173 <_Z5func0i+0x2a> mov -0x14(%rbp),%eax sub $0x1,%eax and -0x14(%rbp),%eax test %eax,%eax jne 1173 <_Z5func0i+0x2a> mov -0x14(%rbp),%eax jmp 1190 <_Z5func0i+0x47> cmpl ...
_Z5func0i: endbr64 push rbp mov rbp, rsp mov [rbp+var_14], edi mov [rbp+var_4], 0 cmp [rbp+var_14], 0 jz short loc_117A mov eax, [rbp+var_14] sub eax, 1 and eax, [rbp+var_14] test eax, eax jnz short loc_117A mov eax, [rbp+var_14] jmp short loc_118E loc_1173: sar [r...
long long func0(unsigned int a1) { int v2; // [rsp+0h] [rbp-14h] char v3; // [rsp+10h] [rbp-4h] v2 = a1; v3 = 0; if ( a1 && (a1 & (a1 - 1)) == 0 ) return a1; while ( v2 ) { v2 >>= 1; ++v3; } return (unsigned int)(1 << v3); }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x14],EDI MOV dword ptr [RBP + -0x4],0x0 CMP dword ptr [RBP + -0x14],0x0 JZ 0x0010117a MOV EAX,dword ptr [RBP + -0x14] SUB EAX,0x1 AND EAX,dword ptr [RBP + -0x14] TEST EAX,EAX JNZ 0x0010117a MOV EAX,dword ptr [RBP + -0x14] JMP 0x0010118e LAB_00101173: SAR dword ...
/* func0(int) */ int func0(int param_1) { byte bVar1; int4 local_1c; bVar1 = 0; local_1c = param_1; if ((param_1 == 0) || ((param_1 - 1U & param_1) != 0)) { for (; local_1c != 0; local_1c = local_1c >> 1) { bVar1 = bVar1 + 1; } param_1 = 1 << (bVar1 & 0x1f); } return param_1; }
665
func0
#include <assert.h>
int func0(int n) { int count = 0; if (n && !(n & (n - 1))) { return n; } while(n != 0) { n >>= 1; count += 1; } return 1 << count; }
int main() { assert(func0(0) == 1); assert(func0(5) == 8); assert(func0(17) == 32); return 0; }
O1
cpp
func0(int): endbr64 test %edi,%edi je 1166 <_Z5func0i+0x1d> lea -0x1(%rdi),%edx mov %edi,%eax test %edi,%edx je 116f <_Z5func0i+0x26> mov $0x0,%edi add $0x1,%edi sar %eax jne 115f <_Z5func0i+0x16> mov $0x1,%eax mov %edi,%ecx shl %cl,%eax retq
_Z5func0i: endbr64 test edi, edi jz short loc_1166 lea edx, [rdi-1] mov eax, edi test edx, edi jz short locret_116F mov edi, 0 loc_115F: add edi, 1 sar eax, 1 jnz short loc_115F loc_1166: mov eax, 1 mov ecx, edi shl eax, cl locret_116F: retn
long long func0(unsigned int a1) { long long result; // rax if ( a1 ) { result = a1; if ( (a1 & (a1 - 1)) == 0 ) return result; LOBYTE(a1) = 0; do { LOBYTE(a1) = a1 + 1; LODWORD(result) = (int)result >> 1; } while ( (_DWORD)result ); } return (unsigned int)(1 <<...
func0: ENDBR64 TEST EDI,EDI JZ 0x00101166 LEA EDX,[RDI + -0x1] MOV EAX,EDI TEST EDX,EDI JZ 0x0010116f MOV EDI,0x0 LAB_0010115f: ADD EDI,0x1 SAR EAX,0x1 JNZ 0x0010115f LAB_00101166: MOV EAX,0x1 MOV ECX,EDI SHL EAX,CL LAB_0010116f: RET
/* func0(int) */ int func0(int param_1) { int iVar1; iVar1 = param_1; if (param_1 != 0) { if ((param_1 - 1U & param_1) == 0) { return param_1; } iVar1 = 0; do { iVar1 = iVar1 + 1; param_1 = param_1 >> 1; } while (param_1 != 0); } return 1 << ((byte)iVar1 & 0x1f); }
666
func0
#include <assert.h>
int func0(int n) { int count = 0; if (n && !(n & (n - 1))) { return n; } while(n != 0) { n >>= 1; count += 1; } return 1 << count; }
int main() { assert(func0(0) == 1); assert(func0(5) == 8); assert(func0(17) == 32); return 0; }
O2
cpp
func0(int): endbr64 mov $0x1,%eax test %edi,%edi je 116e <_Z5func0i+0x2e> lea -0x1(%rdi),%edx mov %edi,%eax test %edi,%edx je 116e <_Z5func0i+0x2e> xor %ecx,%ecx nopl 0x0(%rax,%rax,1) add $0x1,%ecx sar %edi jne 1160 <_Z5func0i+0x20> mov $0x1,%eax shl %cl,%eax retq
_Z5func0i: endbr64 mov eax, 1 test edi, edi jz short locret_116E lea edx, [rdi-1] mov eax, edi test edx, edi jz short locret_116E xor ecx, ecx nop dword ptr [rax+rax+00000000h] loc_1160: add ecx, 1 sar edi, 1 jnz short loc_1160 mov eax, 1 shl eax, cl locret_116E: ...
long long func0(int a1) { long long result; // rax char v2; // cl result = 1LL; if ( a1 ) { result = (unsigned int)a1; if ( (a1 & (a1 - 1)) != 0 ) { v2 = 0; do { ++v2; a1 >>= 1; } while ( a1 ); return (unsigned int)(1 << v2); } } return...
func0: ENDBR64 MOV EAX,0x1 TEST EDI,EDI JZ 0x0010116e LEA EDX,[RDI + -0x1] MOV EAX,EDI TEST EDX,EDI JZ 0x0010116e XOR ECX,ECX NOP dword ptr [RAX + RAX*0x1] LAB_00101160: ADD ECX,0x1 SAR EDI,0x1 JNZ 0x00101160 MOV EAX,0x1 SHL EAX,CL LAB_0010116e: RET
/* func0(int) */ int func0(int param_1) { int iVar1; byte bVar2; iVar1 = 1; if ((param_1 != 0) && (iVar1 = param_1, (param_1 - 1U & param_1) != 0)) { bVar2 = 0; do { bVar2 = bVar2 + 1; param_1 = param_1 >> 1; } while (param_1 != 0); iVar1 = 1 << (bVar2 & 0x1f); } return iVar...
667
func0
#include <assert.h>
int func0(int n) { int count = 0; if (n && !(n & (n - 1))) { return n; } while(n != 0) { n >>= 1; count += 1; } return 1 << count; }
int main() { assert(func0(0) == 1); assert(func0(5) == 8); assert(func0(17) == 32); return 0; }
O3
cpp
func0(int): endbr64 mov $0x1,%eax test %edi,%edi je 116e <_Z5func0i+0x2e> lea -0x1(%rdi),%edx mov %edi,%eax test %edi,%edx je 116e <_Z5func0i+0x2e> xor %ecx,%ecx nopl 0x0(%rax,%rax,1) add $0x1,%ecx sar %edi jne 1160 <_Z5func0i+0x20> mov $0x1,%eax shl %cl,%eax retq
_Z5func0i: endbr64 mov eax, 1 test edi, edi jz short locret_116E lea edx, [rdi-1] mov eax, edi test edx, edi jz short locret_116E xor ecx, ecx nop dword ptr [rax+rax+00000000h] loc_1160: add ecx, 1 sar edi, 1 jnz short loc_1160 mov eax, 1 shl eax, cl locret_116E: ...
long long func0(int a1) { long long result; // rax char v2; // cl result = 1LL; if ( a1 ) { result = (unsigned int)a1; if ( (a1 & (a1 - 1)) != 0 ) { v2 = 0; do { ++v2; a1 >>= 1; } while ( a1 ); return (unsigned int)(1 << v2); } } return...
func0: ENDBR64 MOV EAX,0x1 TEST EDI,EDI JZ 0x0010116e LEA EDX,[RDI + -0x1] MOV EAX,EDI TEST EDX,EDI JZ 0x0010116e XOR ECX,ECX NOP dword ptr [RAX + RAX*0x1] LAB_00101160: ADD ECX,0x1 SAR EDI,0x1 JNZ 0x00101160 MOV EAX,0x1 SHL EAX,CL LAB_0010116e: RET
/* func0(int) */ int func0(int param_1) { int iVar1; byte bVar2; iVar1 = 1; if ((param_1 != 0) && (iVar1 = param_1, (param_1 - 1U & param_1) != 0)) { bVar2 = 0; do { bVar2 = bVar2 + 1; param_1 = param_1 >> 1; } while (param_1 != 0); iVar1 = 1 << (bVar2 & 0x1f); } return iVar...
668
func0
#include <iostream> #include <cassert> #include <vector>
int func0(std::vector<int> a, int x) { int count = 0; for (int i : a) { if (i == x) count += 1; } return count; }
int main() { assert(func0({1,2,3}, 4) == 0); assert(func0({1,2,2,3,3,3,4}, 3) == 3); assert(func0({0,1,2,3,1,2}, 1) == 2); return 0; }
O0
cpp
func0(std::vector<int, std::allocator<int> >, int): endbr64 push %rbp mov %rsp,%rbp sub $0x40,%rsp mov %rdi,-0x38(%rbp) mov %esi,-0x3c(%rbp) mov %fs:0x28,%rax mov %rax,-0x8(%rbp) xor %eax,%eax movl $0x0,-0x28(%rbp) mov -0x38(%rbp),%rax mov %rax,-0x10(%rbp) mov -0x10(%rbp),%rax mov %...
_Z5func0St6vectorIiSaIiEEi: endbr64 push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_38], rdi mov [rbp+var_3C], esi mov rax, fs:28h mov [rbp+var_8], rax xor eax, eax mov [rbp+var_28], 0 mov rax, [rbp+var_38] mov [rbp+var_10], rax mov rax, [rbp+var_10] mov rdi, rax call ...
long long func0(long long a1, int a2) { unsigned int v3; // [rsp+18h] [rbp-28h] long long v4; // [rsp+20h] [rbp-20h] BYREF _QWORD v5[3]; // [rsp+28h] [rbp-18h] BYREF v5[2] = __readfsqword(0x28u); v3 = 0; v5[1] = a1; v4 = std::vector<int>::begin(a1); v5[0] = std::vector<int>::end(a1); while ( (unsign...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x38],RDI MOV dword ptr [RBP + -0x3c],ESI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX XOR EAX,EAX MOV dword ptr [RBP + -0x28],0x0 MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,...
/* func0(std::vector<int, std::allocator<int> >, int) */ int func0(vector param_1,int param_2) { bool bVar1; int *piVar2; int4 in_register_0000003c; long in_FS_OFFSET; int local_30; int8 local_28; int8 local_20; vector<int,std::allocator<int>> *local_18; long local_10; local_18 = (vector<int,st...
669
func0
#include <iostream> #include <cassert> #include <vector>
int func0(std::vector<int> a, int x) { int count = 0; for (int i : a) { if (i == x) count += 1; } return count; }
int main() { assert(func0({1,2,3}, 4) == 0); assert(func0({1,2,2,3,3,3,4}, 3) == 3); assert(func0({0,1,2,3,1,2}, 1) == 2); return 0; }
O1
cpp
func0(std::vector<int, std::allocator<int> >, int): endbr64 mov (%rdi),%rax mov 0x8(%rdi),%rdi cmp %rdi,%rax je 1274 <_Z5func0St6vectorIiSaIiEEi+0x2b> mov $0x0,%edx cmp %esi,(%rax) sete %cl movzbl %cl,%ecx add %ecx,%edx add $0x4,%rax cmp %rax,%rdi jne 125e <_Z5func0St6vectorIiSaIiEEi+0x...
_Z5func0St6vectorIiSaIiEEi: endbr64 mov rax, [rdi] mov rdi, [rdi+8] cmp rdi, rax jz short loc_1234 mov edx, 0 loc_121E: cmp [rax], esi setz cl movzx ecx, cl add edx, ecx add rax, 4 cmp rax, rdi jnz short loc_121E loc_1231: mov eax, edx retn loc_1234: mov edx, 0 jmp ...
long long func0(long long a1, int a2) { _DWORD *v2; // rax _DWORD *v3; // rdi unsigned int v4; // edx v2 = *(_DWORD **)a1; v3 = *(_DWORD **)(a1 + 8); if ( v3 == v2 ) { return 0; } else { v4 = 0; do v4 += *v2++ == a2; while ( v2 != v3 ); } return v4; }
func0: ENDBR64 MOV RAX,qword ptr [RDI] MOV RDI,qword ptr [RDI + 0x8] CMP RDI,RAX JZ 0x00101234 MOV EDX,0x0 LAB_0010121e: CMP dword ptr [RAX],ESI SETZ CL MOVZX ECX,CL ADD EDX,ECX ADD RAX,0x4 CMP RAX,RDI JNZ 0x0010121e LAB_00101231: MOV EAX,EDX RET LAB_00101234: MOV EDX,0x0 JMP 0x00101231
/* func0(std::vector<int, std::allocator<int> >, int) */ int func0(vector param_1,int param_2) { int *piVar1; int *piVar2; int iVar3; int4 in_register_0000003c; piVar2 = *(int **)CONCAT44(in_register_0000003c,param_1); piVar1 = (int *)((int8 *)CONCAT44(in_register_0000003c,param_1))[1]; if (piVar1 ==...
670
func0
#include <iostream> #include <cassert> #include <vector>
int func0(std::vector<int> a, int x) { int count = 0; for (int i : a) { if (i == x) count += 1; } return count; }
int main() { assert(func0({1,2,3}, 4) == 0); assert(func0({1,2,2,3,3,3,4}, 3) == 3); assert(func0({0,1,2,3,1,2}, 1) == 2); return 0; }
O2
cpp
func0(std::vector<int, std::allocator<int> >, int): endbr64 mov (%rdi),%rax mov 0x8(%rdi),%rcx xor %r8d,%r8d cmp %rcx,%rax je 14cb <_Z5func0St6vectorIiSaIiEEi+0x2b> nopl 0x0(%rax,%rax,1) xor %edx,%edx cmp %esi,(%rax) sete %dl add $0x4,%rax add %edx,%r8d cmp %rax,%rcx jne 14b8 <_Z5f...
_Z5func0St6vectorIiSaIiEEi: endbr64 mov rax, [rdi] mov rdi, [rdi+8] xor edx, edx cmp rdi, rax jz short loc_141A nop word ptr [rax+rax+00h] loc_1408: xor ecx, ecx cmp esi, [rax] setz cl add rax, 4 add edx, ecx cmp rdi, rax jnz short loc_1408 loc_141A: mov eax, edx ...
long long func0(long long a1, int a2) { _DWORD *v2; // rax _DWORD *v3; // rdi unsigned int i; // edx int v5; // ecx v2 = *(_DWORD **)a1; v3 = *(_DWORD **)(a1 + 8); for ( i = 0; v3 != v2; i += v5 ) v5 = a2 == *v2++; return i; }
func0: ENDBR64 MOV RAX,qword ptr [RDI] MOV RDI,qword ptr [RDI + 0x8] XOR EDX,EDX CMP RDI,RAX JZ 0x0010141a NOP word ptr [RAX + RAX*0x1] LAB_00101408: XOR ECX,ECX CMP ESI,dword ptr [RAX] SETZ CL ADD RAX,0x4 ADD EDX,ECX CMP RDI,RAX JNZ 0x00101408 LAB_0010141a: MOV EAX,EDX RET
/* func0(std::vector<int, std::allocator<int> >, int) */ int func0(vector param_1,int param_2) { int *piVar1; int iVar2; int4 in_register_0000003c; iVar2 = 0; for (piVar1 = *(int **)CONCAT44(in_register_0000003c,param_1); (int *)((int8 *)CONCAT44(in_register_0000003c,param_1))[1] != piVar1; p...
671
func0
#include <iostream> #include <cassert> #include <vector>
int func0(std::vector<int> a, int x) { int count = 0; for (int i : a) { if (i == x) count += 1; } return count; }
int main() { assert(func0({1,2,3}, 4) == 0); assert(func0({1,2,2,3,3,3,4}, 3) == 3); assert(func0({0,1,2,3,1,2}, 1) == 2); return 0; }
O3
cpp
func0(std::vector<int, std::allocator<int> >, int): endbr64 mov (%rdi),%rdx mov 0x8(%rdi),%rdi cmp %rdi,%rdx je 1810 <_Z5func0St6vectorIiSaIiEEi+0xe0> lea -0x4(%rdi),%rcx mov %rdx,%rax movabs $0x3ffffffffffffffc,%r9 sub %rdx,%rcx shr $0x2,%rcx lea 0x1(%rcx),%r8 test %r9,%rcx je 1819 <_...
_Z5func0St6vectorIiSaIiEEi: endbr64 mov rdx, [rdi] mov r8, [rdi+8] cmp r8, rdx jz loc_1718 lea rcx, [r8-4] mov rax, rdx sub rcx, rdx mov rdi, rcx shr rdi, 2 add rdi, 1 cmp rcx, 8 jbe loc_171B mov rcx, rdi movd xmm3, esi pxor xmm0, xmm0 shr rcx, 2 pshufd xm...
long long func0(long long a1, unsigned int a2) { const __m128i *v2; // rdx unsigned long long *v3; // r8 const __m128i *v4; // rax unsigned long long v5; // rdi __m128i v6; // xmm0 __m128i v7; // xmm2 __m128i v8; // xmm1 __m128i v9; // xmm0 long long result; // rax v2 = *(const __m128i **)a1; v3...
func0: ENDBR64 MOV RDX,qword ptr [RDI] MOV R8,qword ptr [RDI + 0x8] CMP R8,RDX JZ 0x00101718 LEA RCX,[R8 + -0x4] MOV RAX,RDX SUB RCX,RDX MOV RDI,RCX SHR RDI,0x2 ADD RDI,0x1 CMP RCX,0x8 JBE 0x0010171b MOV RCX,RDI MOVD XMM3,ESI PXOR XMM0,XMM0 SHR RCX,0x2 PSHUFD XMM2,XMM3,0x0 SHL RCX,0x4 ADD RCX,RDX NOP LAB_00101690: MOVD...
/* func0(std::vector<int, std::allocator<int> >, int) */ int func0(vector param_1,int param_2) { int *piVar1; int iVar2; int *piVar3; int *piVar4; int *piVar5; int *piVar6; ulong uVar7; int *piVar8; int4 in_register_0000003c; ulong uVar9; int iVar10; int iVar11; int iVar12; int iVar13; ...
672
func0
#include <assert.h>
int func0(int n) { if (n <= 2) { return n; } int a = 1; int b = 2; for (int i = 3; i <= n; ++i) { int c = 2 * b + a; a = b; b = c; } return b; }
int main() { assert(func0(4) == 12); assert(func0(7) == 169); assert(func0(8) == 408); return 0; }
O0
cpp
func0(int): endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x14(%rbp) cmpl $0x2,-0x14(%rbp) jg 115f <_Z5func0i+0x16> mov -0x14(%rbp),%eax jmp 119f <_Z5func0i+0x56> movl $0x1,-0x10(%rbp) movl $0x2,-0xc(%rbp) movl $0x3,-0x8(%rbp) mov -0x8(%rbp),%eax cmp -0x14(%rbp),%eax jg 119c <_Z5func0i+0...
_Z5func0i: endbr64 push rbp mov rbp, rsp mov [rbp+var_14], edi cmp [rbp+var_14], 2 jg short loc_115F mov eax, [rbp+var_14] jmp short loc_119F loc_115F: mov [rbp+var_10], 1 mov [rbp+var_C], 2 mov [rbp+var_8], 3 jmp short loc_1194 loc_1176: mov eax, [rbp+var_C] lea edx,...
long long func0(int a1) { int v2; // [rsp+4h] [rbp-10h] unsigned int v3; // [rsp+8h] [rbp-Ch] int i; // [rsp+Ch] [rbp-8h] unsigned int v5; // [rsp+10h] [rbp-4h] if ( a1 <= 2 ) return (unsigned int)a1; v2 = 1; v3 = 2; for ( i = 3; i <= a1; ++i ) { v5 = 2 * v3 + v2; v2 = v3; v3 = v5; ...
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x14],EDI CMP dword ptr [RBP + -0x14],0x2 JG 0x0010115f MOV EAX,dword ptr [RBP + -0x14] JMP 0x0010119f LAB_0010115f: MOV dword ptr [RBP + -0x10],0x1 MOV dword ptr [RBP + -0xc],0x2 MOV dword ptr [RBP + -0x8],0x3 JMP 0x00101194 LAB_00101176: MOV EAX,dword ptr [RBP...
/* func0(int) */ int func0(int param_1) { int iVar1; int4 local_18; int4 local_14; int4 local_10; local_14 = param_1; if (2 < param_1) { local_18 = 1; local_14 = 2; for (local_10 = 3; local_10 <= param_1; local_10 = local_10 + 1) { iVar1 = local_18 + local_14 * 2; local_18 = loc...
673
func0
#include <assert.h>
int func0(int n) { if (n <= 2) { return n; } int a = 1; int b = 2; for (int i = 3; i <= n; ++i) { int c = 2 * b + a; a = b; b = c; } return b; }
int main() { assert(func0(4) == 12); assert(func0(7) == 169); assert(func0(8) == 408); return 0; }
O1
cpp
func0(int): endbr64 mov %edi,%eax cmp $0x2,%edi jle 1174 <_Z5func0i+0x2b> add $0x1,%edi mov $0x3,%edx mov $0x2,%eax mov $0x1,%ecx mov %eax,%esi lea (%rcx,%rax,2),%eax add $0x1,%edx mov %esi,%ecx cmp %edi,%edx jne 1166 <_Z5func0i+0x1d> retq
_Z5func0i: endbr64 mov eax, edi cmp edi, 2 jle short locret_1174 add edi, 1 mov edx, 3 mov eax, 2 mov ecx, 1 loc_1166: mov esi, eax lea eax, [rcx+rax*2] add edx, 1 mov ecx, esi cmp edx, edi jnz short loc_1166 locret_1174: retn
long long func0(int a1) { long long result; // rax int v2; // edi int v3; // edx int v4; // ecx int v5; // esi result = (unsigned int)a1; if ( a1 > 2 ) { v2 = a1 + 1; v3 = 3; LODWORD(result) = 2; v4 = 1; do { v5 = result; result = (unsigned int)(v4 + 2 * result); ...
func0: ENDBR64 MOV EAX,EDI CMP EDI,0x2 JLE 0x00101174 ADD EDI,0x1 MOV EDX,0x3 MOV EAX,0x2 MOV ECX,0x1 LAB_00101166: MOV ESI,EAX LEA EAX,[RCX + RAX*0x2] ADD EDX,0x1 MOV ECX,ESI CMP EDX,EDI JNZ 0x00101166 LAB_00101174: RET
/* func0(int) */ int func0(int param_1) { int iVar1; int iVar2; int iVar3; int iVar4; if (2 < param_1) { iVar4 = param_1 + 1; iVar3 = 3; iVar2 = 1; iVar1 = 2; do { param_1 = iVar2 + iVar1 * 2; iVar3 = iVar3 + 1; iVar2 = iVar1; iVar1 = param_1; } while (iVar...
674
func0
#include <assert.h>
int func0(int n) { if (n <= 2) { return n; } int a = 1; int b = 2; for (int i = 3; i <= n; ++i) { int c = 2 * b + a; a = b; b = c; } return b; }
int main() { assert(func0(4) == 12); assert(func0(7) == 169); assert(func0(8) == 408); return 0; }
O2
cpp
func0(int): endbr64 mov %edi,%r8d cmp $0x2,%edi jle 11d0 <_Z5func0i+0x30> add $0x1,%edi mov $0x1,%ecx mov $0x2,%edx mov $0x3,%eax jmp 11c3 <_Z5func0i+0x23> mov %r8d,%edx add $0x1,%eax lea (%rcx,%rdx,2),%r8d mov %edx,%ecx cmp %eax,%edi jne 11c0 <_Z5func0i+0x20> mov %r8d,%eax ...
_Z5func0i: endbr64 mov ecx, edi cmp edi, 2 jle short loc_122E add edi, 1 mov eax, 3 mov esi, 1 mov edx, 2 jmp short loc_1222 loc_1220: mov edx, ecx loc_1222: add eax, 1 lea ecx, [rsi+rdx*2] mov esi, edx cmp edi, eax jnz short loc_1220 loc_122E: mov eax, ecx re...
long long func0(int a1) { unsigned int v1; // ecx int v2; // edi int v3; // eax int v4; // esi int i; // edx v1 = a1; if ( a1 > 2 ) { v2 = a1 + 1; v3 = 3; v4 = 1; for ( i = 2; ; i = v1 ) { ++v3; v1 = v4 + 2 * i; v4 = i; if ( v2 == v3 ) break; } ...
func0: ENDBR64 MOV ECX,EDI CMP EDI,0x2 JLE 0x0010122e ADD EDI,0x1 MOV EAX,0x3 MOV ESI,0x1 MOV EDX,0x2 JMP 0x00101222 LAB_00101220: MOV EDX,ECX LAB_00101222: ADD EAX,0x1 LEA ECX,[RSI + RDX*0x2] MOV ESI,EDX CMP EDI,EAX JNZ 0x00101220 LAB_0010122e: MOV EAX,ECX RET
/* func0(int) */ int func0(int param_1) { int iVar1; int iVar2; int iVar3; int iVar4; if (2 < param_1) { iVar4 = param_1 + 1; iVar1 = 3; iVar3 = 1; iVar2 = 2; do { iVar1 = iVar1 + 1; param_1 = iVar3 + iVar2 * 2; iVar3 = iVar2; iVar2 = param_1; } while (iVar...
675
func0
#include <assert.h>
int func0(int n) { if (n <= 2) { return n; } int a = 1; int b = 2; for (int i = 3; i <= n; ++i) { int c = 2 * b + a; a = b; b = c; } return b; }
int main() { assert(func0(4) == 12); assert(func0(7) == 169); assert(func0(8) == 408); return 0; }
O3
cpp
func0(int): endbr64 mov %edi,%r8d cmp $0x2,%edi jle 1170 <_Z5func0i+0x30> add $0x1,%edi mov $0x1,%ecx mov $0x2,%edx mov $0x3,%eax jmp 1163 <_Z5func0i+0x23> mov %r8d,%edx add $0x1,%eax lea (%rcx,%rdx,2),%r8d mov %edx,%ecx cmp %edi,%eax jne 1160 <_Z5func0i+0x20> mov %r8d,%eax ...
_Z5func0i: endbr64 mov ecx, edi cmp edi, 2 jle short loc_116E add edi, 1 mov eax, 3 mov esi, 1 mov edx, 2 jmp short loc_1162 loc_1160: mov edx, ecx loc_1162: add eax, 1 lea ecx, [rsi+rdx*2] mov esi, edx cmp edi, eax jnz short loc_1160 loc_116E: mov eax, ecx re...
long long func0(int a1) { unsigned int v1; // ecx int v2; // edi int v3; // eax int v4; // esi int i; // edx v1 = a1; if ( a1 > 2 ) { v2 = a1 + 1; v3 = 3; v4 = 1; for ( i = 2; ; i = v1 ) { ++v3; v1 = v4 + 2 * i; v4 = i; if ( v2 == v3 ) break; } ...
func0: ENDBR64 MOV ECX,EDI CMP EDI,0x2 JLE 0x0010116e ADD EDI,0x1 MOV EAX,0x3 MOV ESI,0x1 MOV EDX,0x2 JMP 0x00101162 LAB_00101160: MOV EDX,ECX LAB_00101162: ADD EAX,0x1 LEA ECX,[RSI + RDX*0x2] MOV ESI,EDX CMP EDI,EAX JNZ 0x00101160 LAB_0010116e: MOV EAX,ECX RET
/* func0(int) */ int func0(int param_1) { int iVar1; int iVar2; int iVar3; int iVar4; if (2 < param_1) { iVar4 = param_1 + 1; iVar1 = 3; iVar3 = 1; iVar2 = 2; do { iVar1 = iVar1 + 1; param_1 = iVar3 + iVar2 * 2; iVar3 = iVar2; iVar2 = param_1; } while (iVar...
676
func0
#include <vector> #include <cassert>
int func0(const std::vector<int>& list1, int m, int n) { int sum_range = 0; for (int i = m; i <= n; ++i) { sum_range += list1[i]; } return sum_range; }
int main() { std::vector<int> list1 = {2,1,5,6,8,3,4,9,10,11,8,12}; assert(func0(list1, 8, 10) == 29); assert(func0(list1, 5, 7) == 16); assert(func0(list1, 7, 10) == 38); return 0; }
O0
cpp
func0(std::vector<int, std::allocator<int> > const&, int, int): endbr64 push %rbp mov %rsp,%rbp sub $0x20,%rsp mov %rdi,-0x18(%rbp) mov %esi,-0x1c(%rbp) mov %edx,-0x20(%rbp) movl $0x0,-0x8(%rbp) mov -0x1c(%rbp),%eax mov %eax,-0x4(%rbp) mov -0x4(%rbp),%eax cmp -0x20(%rbp),%eax jg 1274 ...
_Z5func0RKSt6vectorIiSaIiEEii: endbr64 push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_18], rdi mov [rbp+var_1C], esi mov [rbp+var_20], edx mov [rbp+var_8], 0 mov eax, [rbp+var_1C] mov [rbp+var_4], eax jmp short loc_128C loc_126E: mov eax, [rbp+var_4] movsxd rdx, eax mov ...
long long func0(long long a1, int a2, int a3) { unsigned int v5; // [rsp+18h] [rbp-8h] v5 = 0; while ( a2 <= a3 ) v5 += *(_DWORD *)std::vector<int>::operator[](a1, a2++); return v5; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x18],RDI MOV dword ptr [RBP + -0x1c],ESI MOV dword ptr [RBP + -0x20],EDX MOV dword ptr [RBP + -0x8],0x0 MOV EAX,dword ptr [RBP + -0x1c] MOV dword ptr [RBP + -0x4],EAX JMP 0x0010128c LAB_0010126e: MOV EAX,dword ptr [RBP + -0x4] MOVSXD RDX,EAX MOV RA...
/* func0(std::vector<int, std::allocator<int> > const&, int, int) */ int func0(vector *param_1,int param_2,int param_3) { int *piVar1; int4 local_10; int4 local_c; local_10 = 0; for (local_c = param_2; local_c <= param_3; local_c = local_c + 1) { piVar1 = (int *)std::vector<int,std::allocator<int>>::...
677
func0
#include <vector> #include <cassert>
int func0(const std::vector<int>& list1, int m, int n) { int sum_range = 0; for (int i = m; i <= n; ++i) { sum_range += list1[i]; } return sum_range; }
int main() { std::vector<int> list1 = {2,1,5,6,8,3,4,9,10,11,8,12}; assert(func0(list1, 8, 10) == 29); assert(func0(list1, 5, 7) == 16); assert(func0(list1, 7, 10) == 38); return 0; }
O1
cpp
func0(std::vector<int, std::allocator<int> > const&, int, int): endbr64 cmp %edx,%esi jg 11d8 <_Z5func0RKSt6vectorIiSaIiEEii+0x2f> mov (%rdi),%rcx movslq %esi,%rdi lea (%rcx,%rdi,4),%rax sub %esi,%edx add %rdi,%rdx lea 0x4(%rcx,%rdx,4),%rcx mov $0x0,%edx add (%rax),%edx add $0x4,%rax cmp ...
_Z5func0RKSt6vectorIiSaIiEEii: endbr64 cmp esi, edx jg short loc_11D8 mov rcx, [rdi] movsxd rdi, esi lea rax, [rcx+rdi*4] sub edx, esi add rdx, rdi lea rcx, [rcx+rdx*4+4] mov edx, 0 loc_11CA: add edx, [rax] add rax, 4 cmp rax, rcx jnz short loc_11CA loc_11D5: mov ea...
long long func0(_QWORD *a1, int a2, int a3) { _DWORD *v3; // rax unsigned long long v4; // rcx unsigned int v5; // edx if ( a2 > a3 ) { return 0; } else { v3 = (_DWORD *)(*a1 + 4LL * a2); v4 = *a1 + 4 * (a2 + (unsigned long long)(unsigned int)(a3 - a2)) + 4; v5 = 0; do v5 += ...
func0: ENDBR64 CMP ESI,EDX JG 0x001011d8 MOV RCX,qword ptr [RDI] MOVSXD RDI,ESI LEA RAX,[RCX + RDI*0x4] SUB EDX,ESI ADD RDX,RDI LEA RCX,[RCX + RDX*0x4 + 0x4] MOV EDX,0x0 LAB_001011ca: ADD EDX,dword ptr [RAX] ADD RAX,0x4 CMP RAX,RCX JNZ 0x001011ca LAB_001011d5: MOV EAX,EDX RET LAB_001011d8: MOV EDX,0x0 JMP 0x001011d5
/* func0(std::vector<int, std::allocator<int> > const&, int, int) */ int func0(vector *param_1,int param_2,int param_3) { int *piVar1; int iVar2; if (param_3 < param_2) { iVar2 = 0; } else { piVar1 = (int *)(*(long *)param_1 + (long)param_2 * 4); iVar2 = 0; do { iVar2 = iVar2 + *piV...
678
func0
#include <vector> #include <cassert>
int func0(const std::vector<int>& list1, int m, int n) { int sum_range = 0; for (int i = m; i <= n; ++i) { sum_range += list1[i]; } return sum_range; }
int main() { std::vector<int> list1 = {2,1,5,6,8,3,4,9,10,11,8,12}; assert(func0(list1, 8, 10) == 29); assert(func0(list1, 5, 7) == 16); assert(func0(list1, 7, 10) == 38); return 0; }
O2
cpp
func0(std::vector<int, std::allocator<int> > const&, int, int): endbr64 cmp %edx,%esi jg 1330 <_Z5func0RKSt6vectorIiSaIiEEii+0x30> mov (%rdi),%rcx sub %esi,%edx movslq %esi,%rdi xor %r8d,%r8d add %rdi,%rdx lea (%rcx,%rdi,4),%rax lea 0x4(%rcx,%rdx,4),%rdx add (%rax),%r8d add $0x4,%rax cmp ...
_Z5func0RKSt6vectorIiSaIiEEii: endbr64 cmp esi, edx jg short loc_1250 mov rcx, [rdi] sub edx, esi movsxd rdi, esi add rdx, rdi lea rax, [rcx+rdi*4] lea rcx, [rcx+rdx*4+4] xor edx, edx xchg ax, ax loc_1240: add edx, [rax] add rax, 4 cmp rax, rcx jnz short loc_1240 mov...
long long func0(_QWORD *a1, int a2, int a3) { _DWORD *v3; // rax unsigned long long v4; // rcx unsigned int v5; // edx if ( a2 > a3 ) return 0LL; v3 = (_DWORD *)(*a1 + 4LL * a2); v4 = *a1 + 4 * (a2 + (unsigned long long)(unsigned int)(a3 - a2)) + 4; v5 = 0; do v5 += *v3++; while ( v3 != (_DW...
func0: ENDBR64 CMP ESI,EDX JG 0x00101250 MOV RCX,qword ptr [RDI] SUB EDX,ESI MOVSXD RDI,ESI ADD RDX,RDI LEA RAX,[RCX + RDI*0x4] LEA RCX,[RCX + RDX*0x4 + 0x4] XOR EDX,EDX NOP LAB_00101240: ADD EDX,dword ptr [RAX] ADD RAX,0x4 CMP RAX,RCX JNZ 0x00101240 MOV EAX,EDX RET LAB_00101250: XOR EDX,EDX MOV EAX,EDX RET
/* func0(std::vector<int, std::allocator<int> > const&, int, int) */ int func0(vector *param_1,int param_2,int param_3) { int *piVar1; int iVar2; if (param_2 <= param_3) { piVar1 = (int *)(*(long *)param_1 + (long)param_2 * 4); iVar2 = 0; do { iVar2 = iVar2 + *piVar1; piVar1 = piVar1 ...
679
func0
#include <vector> #include <cassert>
int func0(const std::vector<int>& list1, int m, int n) { int sum_range = 0; for (int i = m; i <= n; ++i) { sum_range += list1[i]; } return sum_range; }
int main() { std::vector<int> list1 = {2,1,5,6,8,3,4,9,10,11,8,12}; assert(func0(list1, 8, 10) == 29); assert(func0(list1, 5, 7) == 16); assert(func0(list1, 7, 10) == 38); return 0; }
O3
cpp
func0(std::vector<int, std::allocator<int> > const&, int, int): endbr64 cmp %edx,%esi jg 1390 <_Z5func0RKSt6vectorIiSaIiEEii+0xb0> mov %edx,%eax mov (%rdi),%r8 lea 0x1(%rdx),%edi sub %esi,%eax sub %esi,%edi cmp $0x3,%eax jbe 1399 <_Z5func0RKSt6vectorIiSaIiEEii+0xb9> mov %edi,%ecx movslq %...
_Z5func0RKSt6vectorIiSaIiEEii: endbr64 mov ecx, esi mov esi, edx cmp ecx, edx jg loc_12C0 mov eax, edx mov r8, [rdi] sub eax, ecx lea edi, [rax+1] cmp eax, 2 jbe loc_12C3 mov edx, edi movsxd rax, ecx pxor xmm0, xmm0 shr edx, 2 lea rax, [r8+rax*4] shl rdx, 4 a...
long long func0(long long *a1, int a2, int a3) { long long v5; // r8 unsigned int v6; // edi __m128i v7; // xmm0 const __m128i *v8; // rax const __m128i *v9; // rdx __m128i v10; // xmm2 __m128i v11; // xmm0 long long result; // rax long long v13; // rdi if ( a2 > a3 ) return 0LL; v5 = *a1; ...
func0: ENDBR64 MOV ECX,ESI MOV ESI,EDX CMP ECX,EDX JG 0x001012c0 MOV EAX,EDX MOV R8,qword ptr [RDI] SUB EAX,ECX LEA EDI,[RAX + 0x1] CMP EAX,0x2 JBE 0x001012c3 MOV EDX,EDI MOVSXD RAX,ECX PXOR XMM0,XMM0 SHR EDX,0x2 LEA RAX,[R8 + RAX*0x4] SHL RDX,0x4 ADD RDX,RAX NOP word ptr [RAX + RAX*0x1] LAB_00101260: MOVDQU XMM2,xmmwo...
/* func0(std::vector<int, std::allocator<int> > const&, int, int) */ int func0(vector *param_1,int param_2,int param_3) { uint uVar1; long lVar2; long lVar3; int iVar4; int *piVar5; int *piVar6; int *piVar7; int *piVar8; int *piVar9; int iVar10; int iVar11; int iVar12; int iVar13; if (p...
680
func0
#include <cassert>
double func0(double a) { double perimeter = 5 * a; return perimeter; }
int main() { assert(func0(5) == 25); assert(func0(10) == 50); assert(func0(15) == 75); return 0; }
O0
cpp
func0(double): endbr64 push %rbp mov %rsp,%rbp movsd %xmm0,-0x18(%rbp) movsd -0x18(%rbp),%xmm1 movsd 0xf2d(%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:dbl_2068 mulsd xmm0, xmm1 movsd [rbp+var_8], xmm0 movsd xmm0, [rbp+var_8] pop rbp retn
double func0(double a1) { return 5.0 * a1; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOVSD qword ptr [RBP + -0x18],XMM0 MOVSD XMM1,qword ptr [RBP + -0x18] MOVSD XMM0,qword ptr [0x00102068] 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_00102068 * param_1; }
681
func0
#include <cassert>
double func0(double a) { double perimeter = 5 * a; return perimeter; }
int main() { assert(func0(5) == 25); assert(func0(10) == 50); assert(func0(15) == 75); return 0; }
O1
cpp
func0(double): endbr64 mulsd 0xed3(%rip),%xmm0 retq
_Z5func0d: endbr64 mulsd xmm0, cs:qword_2008 retn
double func0(double a1) { return a1 * 5.0; }
func0: ENDBR64 MULSD XMM0,qword ptr [0x00102008] RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* func0(double) */ double func0(double param_1) { return param_1 * _DAT_00102008; }