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
182
func0
#include <vector> #include <unordered_set> #include <assert.h>
bool func0(const std::vector<int>& data) { std::unordered_set<int> unique_elements(data.begin(), data.end()); return data.size() == unique_elements.size(); }
int main() { assert(func0({1, 5, 7, 9}) == true); assert(func0({2, 4, 5, 5, 7, 9}) == false); assert(func0({1, 2, 3}) == true); return 0; }
O2
cpp
func0(std::vector<int, std::allocator<int> > const&): endbr64 push %r12 xor %ecx,%ecx push %rbp push %rbx mov %rdi,%rbx sub $0x50,%rsp mov 0x8(%rdi),%rdx mov (%rdi),%rsi mov %fs:0x28,%rax mov %rax,0x48(%rsp) xor %eax,%eax lea 0xc(%rsp),%rax lea 0x10(%rsp),%rbp push %rax mov %rbp...
_Z5func0RKSt6vectorIiSaIiEE: endbr64 push rbp xor ecx, ecx push rbx mov rbx, rdi sub rsp, 58h mov rdx, [rdi+8] mov rsi, [rdi] mov rax, fs:28h mov [rsp+68h+var_20], rax xor eax, eax lea rbp, [rsp+68h+var_58] sub rsp, 8 lea rax, [rsp+70h+var_59] mov rdi, rbp push r...
long long func0(_QWORD *a1) { _QWORD *v1; // rbx long long v2; // rdx long long v3; // rsi char v5; // [rsp+Dh] [rbp-5Bh] BYREF char v6; // [rsp+Eh] [rbp-5Ah] BYREF char v7; // [rsp+Fh] [rbp-59h] BYREF _BYTE v8[24]; // [rsp+10h] [rbp-58h] BYREF long long v9; // [rsp+28h] [rbp-40h] unsigned long long ...
func0: ENDBR64 PUSH RBP XOR ECX,ECX PUSH RBX MOV RBX,RDI SUB RSP,0x58 MOV RDX,qword ptr [RDI + 0x8] MOV RSI,qword ptr [RDI] MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x48],RAX XOR EAX,EAX LEA RBP,[RSP + 0x10] SUB RSP,0x8 LEA RAX,[RSP + 0x17] MOV RDI,RBP PUSH RAX LEA R9,[RSP + 0x1e] LEA R8,[RSP + 0x1d] CALL 0x001...
/* func0(std::vector<int, std::allocator<int> > const&) */ ulong func0(vector *param_1) { long lVar1; long lVar2; long in_FS_OFFSET; equal_to local_5b; allocator local_5a; int local_59; _Hashtable<int,int,std::allocator<int>,std::__detail::_Identity,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_...
183
func0
#include <vector> #include <unordered_set> #include <assert.h>
bool func0(const std::vector<int>& data) { std::unordered_set<int> unique_elements(data.begin(), data.end()); return data.size() == unique_elements.size(); }
int main() { assert(func0({1, 5, 7, 9}) == true); assert(func0({2, 4, 5, 5, 7, 9}) == false); assert(func0({1, 2, 3}) == true); return 0; }
O3
cpp
func0(std::vector<int, std::allocator<int> > const&): endbr64 push %r12 xor %ecx,%ecx push %rbx mov %rdi,%rbx sub $0x58,%rsp mov 0x8(%rdi),%rdx mov (%rdi),%rsi mov %fs:0x28,%rax mov %rax,0x48(%rsp) xor %eax,%eax lea 0xc(%rsp),%rax lea 0x10(%rsp),%rdi push %rax lea 0x15(%rsp),%rax ...
_Z5func0RKSt6vectorIiSaIiEE: endbr64 push rbp xor ecx, ecx push rbx mov rbx, rdi sub rsp, 58h mov rdx, [rdi+8] mov rsi, [rdi] mov rax, fs:28h mov [rsp+68h+var_20], rax xor eax, eax lea rdi, [rsp+68h+s] sub rsp, 8 lea rax, [rsp+70h+var_59] push rax lea r9, [rsp+78...
long long func0(long long *a1) { unsigned int v1; // ebp long long v2; // rdx long long v3; // rsi _QWORD *v4; // rbx void *v5; // rdi char v7; // [rsp+Dh] [rbp-5Bh] BYREF char v8; // [rsp+Eh] [rbp-5Ah] BYREF char v9; // [rsp+Fh] [rbp-59h] BYREF void *s; // [rsp+10h] [rbp-58h] BYREF long long v11; ...
func0: ENDBR64 PUSH RBP XOR ECX,ECX PUSH RBX MOV RBX,RDI SUB RSP,0x58 MOV RDX,qword ptr [RDI + 0x8] MOV RSI,qword ptr [RDI] MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x48],RAX XOR EAX,EAX LEA RDI,[RSP + 0x10] SUB RSP,0x8 LEA RAX,[RSP + 0x17] PUSH RAX LEA R9,[RSP + 0x1e] LEA R8,[RSP + 0x1d] CALL 0x00101770 POP RD...
/* func0(std::vector<int, std::allocator<int> > const&) */ ulong func0(vector *param_1) { int8 *puVar1; int8 unaff_RBP; long in_FS_OFFSET; bool bVar2; equal_to local_5b; allocator local_5a; int local_59; int *local_58; long local_50; int8 *local_48; long local_40; int local_28 [8]; long loca...
184
func0
#include <cassert>
int func0(int A, int B) { int variable = 1; if (A == B) { return 1; } else if ((B - A) >= 5) { return 0; } else { for (int i = A + 1; i <= B; i++) { variable = (variable * (i % 10)) % 10; } return variable % 10; } }
int main() { assert(func0(2, 4) == 2); assert(func0(6, 8) == 6); assert(func0(1, 2) == 2); assert(func0(3, 7) == 0); assert(func0(20, 23) == 6); assert(func0(1021, 1024) == 4); return 0; }
O0
cpp
func0(int, int): endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x14(%rbp) mov %esi,-0x18(%rbp) movl $0x1,-0x8(%rbp) mov -0x14(%rbp),%eax cmp -0x18(%rbp),%eax jne 1170 <_Z5func0ii+0x27> mov $0x1,%edx jmpq 1226 <_Z5func0ii+0xdd> mov -0x18(%rbp),%eax sub -0x14(%rbp),%eax cmp $0x4,%eax jle ...
_Z5func0ii: endbr64 push rbp mov rbp, rsp mov [rbp+var_14], edi mov [rbp+var_18], esi mov [rbp+var_8], 1 mov eax, [rbp+var_14] cmp eax, [rbp+var_18] jnz short loc_1170 mov edx, 1 jmp loc_1220 loc_1170: mov eax, [rbp+var_18] sub eax, [rbp+var_14] cmp eax, 4 jle shor...
long long func0(int a1, int a2) { int v4; // [rsp+10h] [rbp-8h] int i; // [rsp+14h] [rbp-4h] v4 = 1; if ( a1 == a2 ) { return 1; } else if ( a2 - a1 <= 4 ) { for ( i = a1 + 1; i <= a2; ++i ) v4 = v4 * (i % 10) % 10; return (unsigned int)(v4 % 10); } else { return 0; } }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x14],EDI MOV dword ptr [RBP + -0x18],ESI MOV dword ptr [RBP + -0x8],0x1 MOV EAX,dword ptr [RBP + -0x14] CMP EAX,dword ptr [RBP + -0x18] JNZ 0x00101170 MOV EDX,0x1 JMP 0x00101220 LAB_00101170: MOV EAX,dword ptr [RBP + -0x18] SUB EAX,dword ptr [RBP + -0x14] CMP E...
/* func0(int, int) */ int func0(int param_1,int param_2) { int4 local_10; int4 local_c; local_10 = 1; if (param_1 == param_2) { local_10 = 1; } else if (param_2 - param_1 < 5) { for (local_c = param_1 + 1; local_c <= param_2; local_c = local_c + 1) { local_10 = ((local_c % 10) * local_10)...
185
func0
#include <cassert>
int func0(int A, int B) { int variable = 1; if (A == B) { return 1; } else if ((B - A) >= 5) { return 0; } else { for (int i = A + 1; i <= B; i++) { variable = (variable * (i % 10)) % 10; } return variable % 10; } }
int main() { assert(func0(2, 4) == 2); assert(func0(6, 8) == 6); assert(func0(1, 2) == 2); assert(func0(3, 7) == 0); assert(func0(20, 23) == 6); assert(func0(1021, 1024) == 4); return 0; }
O1
cpp
func0(int, int): endbr64 mov $0x1,%eax cmp %esi,%edi je 11dd <_Z5func0ii+0x94> mov %esi,%edx sub %edi,%edx mov $0x0,%eax cmp $0x4,%edx jg 11dd <_Z5func0ii+0x94> add $0x1,%edi cmp %edi,%esi jl 11de <_Z5func0ii+0x95> add $0x1,%esi mov $0x1,%edx movslq %edi,%rax imul $0x66666667...
_Z5func0ii: endbr64 mov eax, 1 cmp edi, esi jz locret_11DB mov edx, esi sub edx, edi mov eax, 0 cmp edx, 4 jg short locret_11DB lea ecx, [rdi+1] cmp esi, ecx jl short loc_11DC lea edi, [rsi+1] mov edx, 1 loc_1177: movsxd rax, ecx imul rax, 66666667h sar rax...
long long func0(int a1, int a2) { long long result; // rax int v3; // ecx int v4; // edx result = 1LL; if ( a1 != a2 ) { result = 0LL; if ( a2 - a1 <= 4 ) { v3 = a1 + 1; if ( a2 < a1 + 1 ) { v4 = 1; } else { v4 = 1; do { ...
func0: ENDBR64 MOV EAX,0x1 CMP EDI,ESI JZ 0x001011db MOV EDX,ESI SUB EDX,EDI MOV EAX,0x0 CMP EDX,0x4 JG 0x001011db LEA ECX,[RDI + 0x1] CMP ESI,ECX JL 0x001011dc LEA EDI,[RSI + 0x1] MOV EDX,0x1 LAB_00101177: MOVSXD RAX,ECX IMUL RAX,RAX,0x66666667 SAR RAX,0x22 MOV ESI,ECX SAR ESI,0x1f SUB EAX,ESI LEA ESI,[RAX + RAX*0x4] ...
/* func0(int, int) */ int func0(int param_1,int param_2) { int iVar1; int iVar2; iVar1 = 1; if ((param_1 != param_2) && (iVar1 = 0, param_2 - param_1 < 5)) { iVar2 = param_1 + 1; if (param_2 < iVar2) { iVar1 = 1; } else { iVar1 = 1; do { iVar1 = ((iVar2 % 10) * iVa...
186
func0
#include <cassert>
int func0(int A, int B) { int variable = 1; if (A == B) { return 1; } else if ((B - A) >= 5) { return 0; } else { for (int i = A + 1; i <= B; i++) { variable = (variable * (i % 10)) % 10; } return variable % 10; } }
int main() { assert(func0(2, 4) == 2); assert(func0(6, 8) == 6); assert(func0(1, 2) == 2); assert(func0(3, 7) == 0); assert(func0(20, 23) == 6); assert(func0(1021, 1024) == 4); return 0; }
O2
cpp
func0(int, int) [clone .part.0]: add $0x1,%edi cmp %esi,%edi jg 1300 <_Z5func0ii.part.0+0x60> add $0x1,%esi mov $0x1,%eax movslq %edi,%rdx mov %edi,%ecx imul $0x66666667,%rdx,%rdx sar $0x1f,%ecx sar $0x22,%rdx sub %ecx,%edx mov %edi,%ecx add $0x1,%edi lea (%rdx,%rdx,4),%edx add ...
_Z5func0ii_part_0: lea ecx, [rdi+1] cmp ecx, esi jg short loc_1300 lea edi, [rsi+1] mov eax, 1 nop loc_12B0: movsxd rdx, ecx mov esi, ecx imul rdx, 66666667h sar esi, 1Fh sar rdx, 22h sub edx, esi lea esi, [rdx+rdx*4] mov edx, ecx add ecx, 1 add esi, esi sub ...
long long func0(int a1, int a2) { int v2; // ecx int v3; // edi long long result; // rax int v5; // esi int v6; // edx v2 = a1 + 1; if ( a1 + 1 > a2 ) return 1LL; v3 = a2 + 1; LODWORD(result) = 1; do { v5 = 5 * (v2 / 10); v6 = v2++; result = (unsigned int)((int)result * (v6 - 2 *...
func0: LEA ECX,[RDI + 0x1] CMP ECX,ESI JG 0x00101300 LEA EDI,[RSI + 0x1] MOV EAX,0x1 NOP LAB_001012b0: MOVSXD RDX,ECX MOV ESI,ECX IMUL RDX,RDX,0x66666667 SAR ESI,0x1f SAR RDX,0x22 SUB EDX,ESI LEA ESI,[RDX + RDX*0x4] MOV EDX,ECX ADD ECX,0x1 ADD ESI,ESI SUB EDX,ESI IMUL EDX,EAX MOVSXD RAX,EDX MOV ESI,EDX IMUL RAX,RAX,0x6...
/* func0(int, int) [clone .part.0] */ int func0(int param_1,int param_2) { int iVar1; int iVar2; int iVar3; if (param_1 + 1 <= param_2) { iVar1 = 1; iVar2 = param_1 + 1; do { iVar3 = iVar2 + 1; iVar1 = ((iVar2 % 10) * iVar1) % 10; iVar2 = iVar3; } while (iVar3 != param_2 +...
187
func0
#include <cassert>
int func0(int A, int B) { int variable = 1; if (A == B) { return 1; } else if ((B - A) >= 5) { return 0; } else { for (int i = A + 1; i <= B; i++) { variable = (variable * (i % 10)) % 10; } return variable % 10; } }
int main() { assert(func0(2, 4) == 2); assert(func0(6, 8) == 6); assert(func0(1, 2) == 2); assert(func0(3, 7) == 0); assert(func0(20, 23) == 6); assert(func0(1021, 1024) == 4); return 0; }
O3
cpp
func0(int, int) [clone .part.0]: add $0x1,%edi cmp %esi,%edi jg 1300 <_Z5func0ii.part.0+0x60> add $0x1,%esi mov $0x1,%eax movslq %edi,%rdx mov %edi,%ecx imul $0x66666667,%rdx,%rdx sar $0x1f,%ecx sar $0x22,%rdx sub %ecx,%edx mov %edi,%ecx add $0x1,%edi lea (%rdx,%rdx,4),%edx add ...
_Z5func0ii_part_0: lea ecx, [rdi+1] cmp ecx, esi jg short loc_1300 lea edi, [rsi+1] mov eax, 1 nop loc_12B0: movsxd rdx, ecx mov esi, ecx imul rdx, 66666667h sar esi, 1Fh sar rdx, 22h sub edx, esi lea esi, [rdx+rdx*4] mov edx, ecx add ecx, 1 add esi, esi sub ...
long long func0(int a1, int a2) { int v2; // ecx int v3; // edi long long result; // rax int v5; // esi int v6; // edx v2 = a1 + 1; if ( a1 + 1 > a2 ) return 1LL; v3 = a2 + 1; LODWORD(result) = 1; do { v5 = 5 * (v2 / 10); v6 = v2++; result = (unsigned int)((int)result * (v6 - 2 *...
func0: LEA ECX,[RDI + 0x1] CMP ECX,ESI JG 0x00101300 LEA EDI,[RSI + 0x1] MOV EAX,0x1 NOP LAB_001012b0: MOVSXD RDX,ECX MOV ESI,ECX IMUL RDX,RDX,0x66666667 SAR ESI,0x1f SAR RDX,0x22 SUB EDX,ESI LEA ESI,[RDX + RDX*0x4] MOV EDX,ECX ADD ECX,0x1 ADD ESI,ESI SUB EDX,ESI IMUL EDX,EAX MOVSXD RAX,EDX MOV ESI,EDX IMUL RAX,RAX,0x6...
/* func0(int, int) [clone .part.0] */ int func0(int param_1,int param_2) { int iVar1; int iVar2; int iVar3; if (param_1 + 1 <= param_2) { iVar1 = 1; iVar2 = param_1 + 1; do { iVar3 = iVar2 + 1; iVar1 = ((iVar2 % 10) * iVar1) % 10; iVar2 = iVar3; } while (iVar3 != param_2 +...
188
func0
#include <iostream> #include <assert.h>
int func0(int n) { int count = 0, res = 0, temp = n; while (temp > 0) { if (count % 2 == 0) { res |= (1 << count); } count += 1; temp >>= 1; } return (n | res); }
int main() { assert(func0(10) == 15); assert(func0(20) == 21); assert(func0(30) == 31); 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 11d2 <_Z5func0i+0x49> mov -0xc(%rbp),%eax and $0x1,%eax test %eax,%eax jne 11c9 <_Z5func0i+0x40> mov -0xc(%rbp...
_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_118C loc_116A: mov eax, [rbp+var_C] and eax, 1 test eax, eax jnz short loc_1185 mov eax, [rbp+var_C] mov edx...
long long func0(int a1) { char v2; // [rsp+8h] [rbp-Ch] int v3; // [rsp+Ch] [rbp-8h] int i; // [rsp+10h] [rbp-4h] v2 = 0; v3 = 0; for ( i = a1; i > 0; i >>= 1 ) { if ( (v2 & 1) == 0 ) v3 |= 1 << v2; ++v2; } return v3 | (unsigned int)a1; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x14],EDI MOV dword ptr [RBP + -0xc],0x0 MOV dword ptr [RBP + -0x8],0x0 MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x4],EAX JMP 0x0010118c LAB_0010116a: MOV EAX,dword ptr [RBP + -0xc] AND EAX,0x1 TEST EAX,EAX JNZ 0x00101185 MOV EAX,dword ptr [RBP + -0...
/* func0(int) */ uint func0(int param_1) { byte bVar1; int4 local_10; int4 local_c; bVar1 = 0; local_10 = 0; for (local_c = param_1; 0 < local_c; local_c = local_c >> 1) { if (!(bool)(bVar1 & 1)) { local_10 = local_10 | 1 << (bVar1 & 0x1f); } bVar1 = bVar1 + 1; } return param_1 | ...
189
func0
#include <iostream> #include <assert.h>
int func0(int n) { int count = 0, res = 0, temp = n; while (temp > 0) { if (count % 2 == 0) { res |= (1 << count); } count += 1; temp >>= 1; } return (n | res); }
int main() { assert(func0(10) == 15); assert(func0(20) == 21); assert(func0(30) == 31); return 0; }
O1
cpp
func0(int): endbr64 test %edi,%edi jle 11bc <_Z5func0i+0x33> mov %edi,%edx mov $0x0,%eax mov $0x0,%ecx mov $0x1,%r8d jmp 11ae <_Z5func0i+0x25> add $0x1,%ecx sar %edx test %edx,%edx jle 11c1 <_Z5func0i+0x38> test $0x1,%cl jne 11a5 <_Z5func0i+0x1c> mov %r8d,%esi shl %cl,%esi or ...
_Z5func0i: endbr64 mov eax, edi test edi, edi jle short loc_117F mov edx, edi mov esi, 0 mov ecx, 0 mov edi, 1 jmp short loc_116F loc_1166: add ecx, 1 sar edx, 1 test edx, edx jle short loc_1184 loc_116F: test cl, 1 jnz short loc_1166 mov r8d, edi shl r8d, cl...
long long func0(int a1) { int v1; // edx int v2; // esi char v3; // cl if ( a1 <= 0 ) { v2 = 0; } else { v1 = a1; v2 = 0; v3 = 0; do { if ( (v3 & 1) == 0 ) v2 |= 1 << v3; ++v3; v1 >>= 1; } while ( v1 > 0 ); } return v2 | (unsigned int)a1; }
func0: ENDBR64 MOV EAX,EDI TEST EDI,EDI JLE 0x0010117f MOV EDX,EDI MOV ESI,0x0 MOV ECX,0x0 MOV EDI,0x1 JMP 0x0010116f LAB_00101166: ADD ECX,0x1 SAR EDX,0x1 TEST EDX,EDX JLE 0x00101184 LAB_0010116f: TEST CL,0x1 JNZ 0x00101166 MOV R8D,EDI SHL R8D,CL OR ESI,R8D JMP 0x00101166 LAB_0010117f: MOV ESI,0x0 LAB_00101184: OR EAX...
/* func0(int) */ uint func0(int param_1) { bool bVar1; int iVar2; uint uVar3; if (param_1 < 1) { uVar3 = 0; } else { uVar3 = 0; bVar1 = false; iVar2 = param_1; do { if (!bVar1) { uVar3 = uVar3 | 1 << bVar1; } bVar1 = (bool)(bVar1 ^ 1); iVar2 = iVar2 >...
190
func0
#include <iostream> #include <assert.h>
int func0(int n) { int count = 0, res = 0, temp = n; while (temp > 0) { if (count % 2 == 0) { res |= (1 << count); } count += 1; temp >>= 1; } return (n | res); }
int main() { assert(func0(10) == 15); assert(func0(20) == 21); assert(func0(30) == 31); return 0; }
O2
cpp
func0(int): endbr64 test %edi,%edi jle 11f0 <_Z5func0i+0x30> mov %edi,%edx xor %eax,%eax xor %ecx,%ecx mov $0x1,%r8d nopl 0x0(%rax) test $0x1,%cl jne 11e4 <_Z5func0i+0x24> mov %r8d,%esi shl %cl,%esi or %esi,%eax add $0x1,%ecx sar %edx jne 11d8 <_Z5func0i+0x18> or %edi,%eax...
_Z5func0i: endbr64 test edi, edi jle short loc_1228 mov edx, edi xor esi, esi xor ecx, ecx mov eax, 1 nop dword ptr [rax+rax+00h] loc_1208: test cl, 1 jnz short loc_1216 mov r8d, eax shl r8d, cl or esi, r8d loc_1216: add ecx, 1 sar edx, 1 jnz short loc_1208 mov...
long long func0(int a1) { int v1; // edx int v2; // esi char v3; // cl if ( a1 <= 0 ) return (unsigned int)a1; v1 = a1; v2 = 0; v3 = 0; do { if ( (v3 & 1) == 0 ) v2 |= 1 << v3; ++v3; v1 >>= 1; } while ( v1 ); return v2 | (unsigned int)a1; }
func0: ENDBR64 TEST EDI,EDI JLE 0x00101228 MOV EDX,EDI XOR ESI,ESI XOR ECX,ECX MOV EAX,0x1 NOP dword ptr [RAX + RAX*0x1] LAB_00101208: TEST CL,0x1 JNZ 0x00101216 MOV R8D,EAX SHL R8D,CL OR ESI,R8D LAB_00101216: ADD ECX,0x1 SAR EDX,0x1 JNZ 0x00101208 MOV EAX,EDI OR EAX,ESI RET LAB_00101228: MOV EAX,EDI RET
/* func0(int) */ uint func0(int param_1) { byte bVar1; int iVar2; uint uVar3; if (0 < param_1) { uVar3 = 0; bVar1 = 0; iVar2 = param_1; do { if (!(bool)(bVar1 & 1)) { uVar3 = uVar3 | 1 << (bVar1 & 0x1f); } bVar1 = bVar1 + 1; iVar2 = iVar2 >> 1; } while (i...
191
func0
#include <iostream> #include <assert.h>
int func0(int n) { int count = 0, res = 0, temp = n; while (temp > 0) { if (count % 2 == 0) { res |= (1 << count); } count += 1; temp >>= 1; } return (n | res); }
int main() { assert(func0(10) == 15); assert(func0(20) == 21); assert(func0(30) == 31); return 0; }
O3
cpp
func0(int): endbr64 test %edi,%edi jle 11f0 <_Z5func0i+0x30> mov %edi,%edx xor %eax,%eax xor %ecx,%ecx mov $0x1,%r8d nopl 0x0(%rax) test $0x1,%cl jne 11e4 <_Z5func0i+0x24> mov %r8d,%esi shl %cl,%esi or %esi,%eax add $0x1,%ecx sar %edx jne 11d8 <_Z5func0i+0x18> or %edi,%eax...
_Z5func0i: endbr64 test edi, edi jle short loc_1178 mov edx, edi xor esi, esi xor ecx, ecx mov eax, 1 nop dword ptr [rax+rax+00h] loc_1158: test cl, 1 jnz short loc_1166 mov r8d, eax shl r8d, cl or esi, r8d loc_1166: add ecx, 1 sar edx, 1 jnz short loc_1158 mov...
long long func0(int a1) { int v1; // edx int v2; // esi char v3; // cl if ( a1 <= 0 ) return (unsigned int)a1; v1 = a1; v2 = 0; v3 = 0; do { if ( (v3 & 1) == 0 ) v2 |= 1 << v3; ++v3; v1 >>= 1; } while ( v1 ); return v2 | (unsigned int)a1; }
func0: ENDBR64 TEST EDI,EDI JLE 0x00101178 MOV EDX,EDI XOR ESI,ESI XOR ECX,ECX MOV EAX,0x1 NOP dword ptr [RAX + RAX*0x1] LAB_00101158: TEST CL,0x1 JNZ 0x00101166 MOV R8D,EAX SHL R8D,CL OR ESI,R8D LAB_00101166: ADD ECX,0x1 SAR EDX,0x1 JNZ 0x00101158 MOV EAX,EDI OR EAX,ESI RET LAB_00101178: MOV EAX,EDI RET
/* func0(int) */ uint func0(int param_1) { byte bVar1; int iVar2; uint uVar3; if (0 < param_1) { uVar3 = 0; bVar1 = 0; iVar2 = param_1; do { if (!(bool)(bVar1 & 1)) { uVar3 = uVar3 | 1 << (bVar1 & 0x1f); } bVar1 = bVar1 + 1; iVar2 = iVar2 >> 1; } while (i...
192
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.at(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}}, 1) == std::vector<int>{2, 5, 1})); return 0...
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 0x00102174 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...
193
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.at(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}}, 1) == std::vector<int>{2, 5, 1})); return 0...
O1
cpp
func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, int): endbr64 push %r14 push %r13 push %r12 push %rbp push %rbx mov %rdi,%rbp movq $0x0,(%rdi) movq $0x0,0x8(%rdi) movq $0x0,0x10(%rdi) mov (%rsi),%rbx mov 0x8(%rsi),%r13 ...
_Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EEi: endbr64 push r14 push r13 push r12 push rbp push rbx mov rbp, rdi mov qword ptr [rdi], 0 mov qword ptr [rdi+8], 0 mov qword ptr [rdi+10h], 0 mov rbx, [rsi] mov r13, [rsi+8] cmp r13, rbx jz short loc_1390 movsxd r12, edx lea r1...
_QWORD * func0(_QWORD *a1, long long a2, int a3) { _QWORD *v3; // rbx _QWORD *v4; // r13 unsigned long long v5; // r12 long long v6; // r14 unsigned long long v7; // rdx _DWORD *v8; // rdx _DWORD *v9; // rsi *a1 = 0LL; a1[1] = 0LL; a1[2] = 0LL; v3 = *(_QWORD **)a2; v4 = *(_QWORD **)(a2 + 8); ...
func0: ENDBR64 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX MOV RBP,RDI 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 JZ 0x00101390 MOVSXD R12,EDX LEA R14,[R12*0x4] JMP 0x00101364 LAB_00101328: MOV RSI,R12 LEA RDI,[...
/* 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) { int *piVar1; long *plVar2; int *piVar3; int8 uVar4; int in_EDX; long *plVar5; int4 in_register_00000034; ulong uVar6; ...
194
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.at(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}}, 1) == std::vector<int>{2, 5, 1})); return 0...
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 movslq %edx,%r14 push %r13 lea 0x0(,%r14,4),%rax mov %rdi,%r13 push %r12 push %rbp push %rbx sub $0x28,%rsp mov 0x8(%rsi),%r15 mov (%rs...
_Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EEi: endbr64 push r14 pxor xmm0, xmm0 push r13 push r12 push rbp mov rbp, rdi push rbx mov rbx, [rsi] mov r13, [rsi+8] mov qword ptr [rdi+10h], 0 movups xmmword ptr [rdi], xmm0 cmp r13, rbx jz short loc_1A98 movsxd r12, edx lea r14, ds...
long long func0(long long a1, long long a2, int a3) { _QWORD *v3; // rbx _QWORD *v4; // r13 unsigned long long v5; // r12 long long v6; // r14 long long v7; // rsi unsigned long long v8; // rdx long long v9; // rsi _DWORD *v10; // rdx v3 = *(_QWORD **)a2; v4 = *(_QWORD **)(a2 + 8); *(_QWORD *)(a...
func0: ENDBR64 PUSH R14 PXOR XMM0,XMM0 PUSH R13 PUSH R12 PUSH RBP MOV RBP,RDI PUSH RBX MOV RBX,qword ptr [RSI] MOV R13,qword ptr [RSI + 0x8] MOV qword ptr [RDI + 0x10],0x0 MOVUPS xmmword ptr [RDI],XMM0 CMP R13,RBX JZ 0x00101a98 MOVSXD R12,EDX LEA R14,[R12*0x4] JMP 0x00101a66 LAB_00101a50: MOV EAX,dword ptr [RDX] ADD RS...
/* 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) { int *piVar1; long *plVar2; int *piVar3; vector *pvVar4; int in_EDX; long *plVar5; int4 in_register_00000034; char *pcV...
195
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.at(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}}, 1) == std::vector<int>{2, 5, 1})); return 0...
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 movslq %edx,%r14 push %r13 lea 0x0(,%r14,4),%rax mov %rdi,%r13 push %r12 push %rbp push %rbx sub $0x28,%rsp mov 0x8(%rs...
_Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EEi: endbr64 push r15 pxor xmm0, xmm0 push r14 push r13 push r12 mov r12, rdi push rbp push rbx sub rsp, 28h mov r14, [rsi+8] mov rbx, [rsi] movups xmmword ptr [rdi], xmm0 mov qword ptr [rdi+10h], 0 cmp r14, rbx jz loc_1BC8 movsxd r...
long long func0(long long a1, long long a2, int a3) { _QWORD *v4; // r14 _QWORD *v5; // rbx unsigned long long v6; // r13 long long v7; // r15 long long v8; // rax unsigned long long v9; // rdx long long v10; // rax _DWORD *v11; // rbp unsigned long long v12; // rdx unsigned long long v13; // rax ...
func0: ENDBR64 PUSH R15 PXOR XMM0,XMM0 PUSH R14 PUSH R13 PUSH R12 MOV R12,RDI PUSH RBP PUSH RBX SUB RSP,0x28 MOV R14,qword ptr [RSI + 0x8] MOV RBX,qword ptr [RSI] MOVUPS xmmword ptr [RDI],XMM0 MOV qword ptr [RDI + 0x10],0x0 CMP R14,RBX JZ 0x00101bc8 MOVSXD R13,EDX LEA R15,[R13*0x4] JMP 0x00101b14 LAB_00101af8: MOV EDX,...
/* 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 lVar1; int8 *puVar2; int4 *puVar3; void *__dest; vector *pvVar4; int in_EDX; ulong uVar5; int8 *puVar6; int4 *p...
196
func0
#include <iostream> #include <vector> #include <algorithm> #include <cassert>
std::pair<int, std::vector<int>> func0(const std::vector<std::vector<int>>& input_list) { auto min_el = *min_element(input_list.begin(), input_list.end(), [](const std::vector<int>& a, const std::vector<int>& b) { return a.size() < b.size(); }); return {min_el.size(), min_el}; }
int main() { assert(func0({{0}, {1, 3}, {5, 7}, {9, 11}, {13, 15, 17}}) == std::make_pair(1, std::vector<int>{0})); assert(func0({{1,2,3,4,5},{1,2,3,4},{1,2,3},{1,2},{1}}) == std::make_pair(1, std::vector<int>{1})); assert(func0({{3,4,5},{6,7,8,9},{10,11,12},{1,2}}) == std::make_pair(2, std::vector<int>{...
O0
cpp
func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&)::{lambda(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&)#1}::operator()(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator...
_ZZ5func0RKSt6vectorIS_IiSaIiEESaIS1_EEENKUlRKS1_S7_E_clES7_S7_: push rbp mov rbp, rsp push rbx sub rsp, 28h mov [rbp+var_18], rdi mov [rbp+var_20], rsi mov [rbp+var_28], rdx mov rax, [rbp+var_20] mov rdi, rax call _ZNKSt6vectorIiSaIiEE4sizeEv; std::vector<int>::size(void) mov r...
bool func0(std::vector<std::vector<int>> const&)::{lambda(std::vector<int> const&,std::vector<int> const&)#1}::operator()( long long a1, long long a2, long long a3) { unsigned long long v3; // rbx v3 = std::vector<int>::size(a2); return v3 < std::vector<int>::size(a3); }
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x48 MOV qword ptr [RBP + -0x48],RDI MOV qword ptr [RBP + -0x50],RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX MOV RAX,qword ptr [RBP + -0x50] MOV RDI,RAX CALL 0x001025c2 MOV RBX,RAX MOV RAX,qword ptr [RBP + -0x50] MOV RDI,RAX CALL 0x001...
/* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&) */ vector * func0(vector *param_1) { __normal_iterator _Var1; __normal_iterator _Var2; int4 extraout_var; vector *pvVar3; _lambda_std__vector<int,std::allocator<int>_>_const__std...
197
func0
#include <iostream> #include <vector> #include <algorithm> #include <cassert>
std::pair<int, std::vector<int>> func0(const std::vector<std::vector<int>>& input_list) { auto min_el = *min_element(input_list.begin(), input_list.end(), [](const std::vector<int>& a, const std::vector<int>& b) { return a.size() < b.size(); }); return {min_el.size(), min_el}; }
int main() { assert(func0({{0}, {1, 3}, {5, 7}, {9, 11}, {13, 15, 17}}) == std::make_pair(1, std::vector<int>{0})); assert(func0({{1,2,3,4,5},{1,2,3,4},{1,2,3},{1,2},{1}}) == std::make_pair(1, std::vector<int>{1})); assert(func0({{3,4,5},{6,7,8,9},{10,11,12},{1,2}}) == std::make_pair(2, std::vector<int>{...
O1
cpp
func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&): endbr64 push %r13 push %r12 push %rbp push %rbx sub $0x8,%rsp mov %rdi,%rbp mov 0x8(%rsi),%rdi mov (%rsi),%rbx cmp %rdi,%rbx je 13e2 <_Z5func0RKSt6vectorIS_IiSaIiEESaIS...
_Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EE: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 28h mov rbp, rdi mov rax, fs:28h mov [rsp+58h+var_40], rax xor eax, eax mov rdi, [rsi+8] mov rbx, [rsi] cmp rbx, rdi jz loc_13CA lea rax, [rbx+18h] cm...
long long func0(long long a1, long long a2) { _QWORD *v3; // rdi _QWORD *v4; // rbx _QWORD *i; // rax unsigned long long v6; // r13 _DWORD *v7; // r12 _DWORD *v8; // rsi signed long long v9; // rbx unsigned long long v10; // r14 _DWORD *v11; // rax char *v12; // r15 struct _Unwind_Exception *v13;...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x28 MOV RBP,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x18],RAX XOR EAX,EAX MOV RDI,qword ptr [RSI + 0x8] MOV RBX,qword ptr [RSI] CMP RBX,RDI JZ 0x001013ca LEA RAX,[RBX + 0x18] CMP RDI,RAX JZ 0x00101325 LAB_00101307: MOV RDX,qword ...
/* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&) */ vector * func0(vector *param_1) { long *plVar1; long *plVar2; long *plVar3; long *plVar4; int4 uVar5; int4 *__dest; int4 *puVar6; int8 uVar7; long *plVar8; ulong __n...
198
func0
#include <iostream> #include <vector> #include <algorithm> #include <cassert>
std::pair<int, std::vector<int>> func0(const std::vector<std::vector<int>>& input_list) { auto min_el = *min_element(input_list.begin(), input_list.end(), [](const std::vector<int>& a, const std::vector<int>& b) { return a.size() < b.size(); }); return {min_el.size(), min_el}; }
int main() { assert(func0({{0}, {1, 3}, {5, 7}, {9, 11}, {13, 15, 17}}) == std::make_pair(1, std::vector<int>{0})); assert(func0({{1,2,3,4,5},{1,2,3,4},{1,2,3},{1,2},{1}}) == std::make_pair(1, std::vector<int>{1})); assert(func0({{3,4,5},{6,7,8,9},{10,11,12},{1,2}}) == std::make_pair(2, std::vector<int>{...
O2
cpp
func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&): endbr64 push %r14 push %r13 push %r12 mov %rdi,%r12 push %rbp push %rbx mov (%rsi),%r13 mov 0x8(%rsi),%r11 mov 0x8(%r13),%r10 mov 0x0(%r13),%r9 mov %r10,%rdi sub %r...
_Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EE: endbr64 push r15 push r14 push r13 push r12 mov r12, rdi push rbp push rbx sub rsp, 28h mov r13, [rsi] mov r9, [rsi+8] mov rax, fs:28h mov [rsp+58h+var_40], rax xor eax, eax mov r8, [r13+8] mov rdi, [r13+0] mov rbx, r8 sub...
long long func0(long long a1, long long **a2) { _DWORD *v2; // r14 long long *v4; // r13 long long *v5; // r9 long long v6; // r8 long long v7; // rdi signed long long v8; // rbx unsigned long long v9; // rbp long long *i; // rax _DWORD *v11; // rax bool v12; // zf unsigned long long v13; // r13 ...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 MOV R12,RDI PUSH RBP PUSH RBX SUB RSP,0x28 MOV R13,qword ptr [RSI] MOV R9,qword ptr [RSI + 0x8] MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x18],RAX XOR EAX,EAX MOV R8,qword ptr [R13 + 0x8] MOV RDI,qword ptr [R13] MOV RBX,R8 SUB RBX,RDI MOV RBP,RBX CMP R13,R9 JZ ...
/* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&) */ vector * func0(vector *param_1) { long lVar1; int4 uVar2; long lVar3; long lVar4; long *plVar5; int4 *__dest; int8 *puVar6; int8 *puVar7; int8 *in_RSI; long *plVar8;...
199
func0
#include <iostream> #include <vector> #include <algorithm> #include <cassert>
std::pair<int, std::vector<int>> func0(const std::vector<std::vector<int>>& input_list) { auto min_el = *min_element(input_list.begin(), input_list.end(), [](const std::vector<int>& a, const std::vector<int>& b) { return a.size() < b.size(); }); return {min_el.size(), min_el}; }
int main() { assert(func0({{0}, {1, 3}, {5, 7}, {9, 11}, {13, 15, 17}}) == std::make_pair(1, std::vector<int>{0})); assert(func0({{1,2,3,4,5},{1,2,3,4},{1,2,3},{1,2},{1}}) == std::make_pair(1, std::vector<int>{1})); assert(func0({{3,4,5},{6,7,8,9},{10,11,12},{1,2}}) == std::make_pair(2, std::vector<int>{...
O3
cpp
func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&): endbr64 push %r15 push %r14 push %r13 mov %rdi,%r13 push %r12 push %rbp push %rbx sub $0x8,%rsp mov (%rsi),%r15 mov 0x8(%rsi),%r10 mov 0x8(%r15),%r9 mov (%r15),%r8 m...
_Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EE: endbr64 push r15 push r14 push r13 push r12 push rbp mov rbp, rdi push rbx sub rsp, 28h mov r9, [rsi+8] mov r13, [rsi] mov rax, fs:28h mov [rsp+58h+var_40], rax xor eax, eax cmp r13, r9 jz loc_1EC0 mov r8, [r13+8] mov ...
long long func0(long long a1, _QWORD *a2) { _DWORD *v2; // r14 _QWORD *v4; // r9 _QWORD *v5; // r13 long long v6; // r8 _QWORD *v7; // rdi _QWORD *v8; // rax signed long long v9; // rbx unsigned long long i; // r12 _DWORD *v11; // rax bool v12; // zf unsigned long long v13; // r13 _DWORD *v14; ...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP MOV RBP,RDI PUSH RBX SUB RSP,0x28 MOV R9,qword ptr [RSI + 0x8] MOV R13,qword ptr [RSI] MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x18],RAX XOR EAX,EAX CMP R13,R9 JZ 0x00101ec0 MOV R8,qword ptr [R13 + 0x8] MOV RDI,qword ptr [R13] LEA RAX,[R13 + 0x18] MOV...
/* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&) */ vector * func0(vector *param_1) { long *plVar1; long lVar2; int4 uVar3; long lVar4; long lVar5; long *plVar6; long *plVar7; int4 *__dest; int8 *puVar8; int8 *puVar9;...
200
func0
#include <iostream> #include <assert.h>
bool func0(int x, int y, int z) { return x == y && y == z; }
int main() { assert(func0(6, 8, 12) == false); assert(func0(6, 6, 12) == false); assert(func0(6, 6, 6) == true); 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 11b1 <_Z5func0iii+0x28> mov -0x8(%rbp),%eax cmp -0xc(%rbp),%eax jne 11b1 <_Z5func0iii+0x28> mov $0x1,%eax jmp 11b6 <_Z5func0...
_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_1171 mov eax, [rbp+var_8] cmp eax, [rbp+var_C] jnz short loc_1171 mov eax, 1 jmp short loc_1176 loc_1171: m...
_BOOL8 func0(int a1, int a2, int a3) { return a1 == a2 && a2 == 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 0x00101171 MOV EAX,dword ptr [RBP + -0x8] CMP EAX,dword ptr [RBP + -0xc] JNZ 0x00101171 MOV EAX,0x1 JMP 0x00101176 LAB_001011...
/* func0(int, int, int) */ int8 func0(int param_1,int param_2,int param_3) { int8 uVar1; if ((param_1 == param_2) && (param_2 == param_3)) { uVar1 = 1; } else { uVar1 = 0; } return uVar1; }
201
func0
#include <iostream> #include <assert.h>
bool func0(int x, int y, int z) { return x == y && y == z; }
int main() { assert(func0(6, 8, 12) == false); assert(func0(6, 6, 12) == false); assert(func0(6, 6, 6) == true); return 0; }
O1
cpp
func0(int, int, int): endbr64 cmp %esi,%edi sete %al cmp %edx,%esi sete %dl and %edx,%eax retq
_Z5func0iii: endbr64 cmp edi, esi setz al cmp esi, edx setz dl and eax, edx retn
long long func0(int a1, int a2, int a3) { unsigned int v3; // eax LOBYTE(v3) = a1 == a2; LOBYTE(a3) = a2 == a3; return a3 & v3; }
func0: ENDBR64 CMP EDI,ESI SETZ AL CMP ESI,EDX SETZ DL AND EAX,EDX RET
/* func0(int, int, int) */ uint func0(int param_1,int param_2,int param_3) { int8 in_RAX; return (uint)CONCAT71((int7)((ulong)in_RAX >> 8),param_1 == param_2) & CONCAT31((int3)((uint)param_3 >> 8),param_2 == param_3); }
202
func0
#include <iostream> #include <assert.h>
bool func0(int x, int y, int z) { return x == y && y == z; }
int main() { assert(func0(6, 8, 12) == false); assert(func0(6, 6, 12) == false); assert(func0(6, 6, 6) == true); return 0; }
O2
cpp
func0(int, int, int): endbr64 cmp %esi,%edi sete %al cmp %edx,%esi sete %dl and %edx,%eax retq nopw %cs:0x0(%rax,%rax,1) nopl 0x0(%rax,%rax,1)
_Z5func0iii: endbr64 cmp edi, esi setz al cmp esi, edx setz dl and eax, edx retn
long long func0(int a1, int a2, int a3) { unsigned int v3; // eax LOBYTE(v3) = a1 == a2; LOBYTE(a3) = a2 == a3; return a3 & v3; }
func0: ENDBR64 CMP EDI,ESI SETZ AL CMP ESI,EDX SETZ DL AND EAX,EDX RET
/* func0(int, int, int) */ uint func0(int param_1,int param_2,int param_3) { int8 in_RAX; return (uint)CONCAT71((int7)((ulong)in_RAX >> 8),param_1 == param_2) & CONCAT31((int3)((uint)param_3 >> 8),param_2 == param_3); }
203
func0
#include <iostream> #include <assert.h>
bool func0(int x, int y, int z) { return x == y && y == z; }
int main() { assert(func0(6, 8, 12) == false); assert(func0(6, 6, 12) == false); assert(func0(6, 6, 6) == true); return 0; }
O3
cpp
func0(int, int, int): endbr64 cmp %esi,%edi sete %al cmp %edx,%esi sete %dl and %edx,%eax retq nopw %cs:0x0(%rax,%rax,1) nopl 0x0(%rax,%rax,1)
_Z5func0iii: endbr64 cmp edi, esi setz al cmp esi, edx setz dl and eax, edx retn
long long func0(int a1, int a2, int a3) { unsigned int v3; // eax LOBYTE(v3) = a1 == a2; LOBYTE(a3) = a2 == a3; return a3 & v3; }
func0: ENDBR64 CMP EDI,ESI SETZ AL CMP ESI,EDX SETZ DL AND EAX,EDX RET
/* func0(int, int, int) */ uint func0(int param_1,int param_2,int param_3) { int8 in_RAX; return (uint)CONCAT71((int7)((ulong)in_RAX >> 8),param_1 == param_2) & CONCAT31((int3)((uint)param_3 >> 8),param_2 == param_3); }
204
func0
#include <assert.h>
int func0(int b, int h) { int area = b * h; return area; }
int main() { assert(func0(10, 20) == 200); assert(func0(15, 20) == 300); assert(func0(8, 9) == 72); return 0; }
O0
cpp
func0(int, int): endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x14(%rbp) mov %esi,-0x18(%rbp) mov -0x14(%rbp),%eax imul -0x18(%rbp),%eax mov %eax,-0x4(%rbp) mov -0x4(%rbp),%eax pop %rbp retq
_Z5func0ii: endbr64 push rbp mov rbp, rsp mov [rbp+var_14], edi mov [rbp+var_18], esi mov eax, [rbp+var_14] imul eax, [rbp+var_18] mov [rbp+var_4], eax mov eax, [rbp+var_4] pop rbp retn
long long func0(int a1, int a2) { return (unsigned int)(a2 * a1); }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x14],EDI MOV dword ptr [RBP + -0x18],ESI MOV EAX,dword ptr [RBP + -0x14] IMUL EAX,dword ptr [RBP + -0x18] MOV dword ptr [RBP + -0x4],EAX MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
/* func0(int, int) */ int func0(int param_1,int param_2) { return param_1 * param_2; }
205
func0
#include <assert.h>
int func0(int b, int h) { int area = b * h; return area; }
int main() { assert(func0(10, 20) == 200); assert(func0(15, 20) == 300); assert(func0(8, 9) == 72); return 0; }
O1
cpp
func0(int, int): endbr64 mov %edi,%eax imul %esi,%eax retq
_Z5func0ii: endbr64 mov eax, edi imul eax, esi retn
long long func0(int a1, int a2) { return (unsigned int)(a2 * a1); }
func0: ENDBR64 MOV EAX,EDI IMUL EAX,ESI RET
/* func0(int, int) */ int func0(int param_1,int param_2) { return param_1 * param_2; }
206
func0
#include <assert.h>
int func0(int b, int h) { int area = b * h; return area; }
int main() { assert(func0(10, 20) == 200); assert(func0(15, 20) == 300); assert(func0(8, 9) == 72); return 0; }
O2
cpp
func0(int, int): endbr64 mov %edi,%eax imul %esi,%eax retq nopw 0x0(%rax,%rax,1)
_Z5func0ii: endbr64 mov eax, edi imul eax, esi retn
long long func0(int a1, int a2) { return (unsigned int)(a2 * a1); }
func0: ENDBR64 MOV EAX,EDI IMUL EAX,ESI RET
/* func0(int, int) */ int func0(int param_1,int param_2) { return param_1 * param_2; }
207
func0
#include <assert.h>
int func0(int b, int h) { int area = b * h; return area; }
int main() { assert(func0(10, 20) == 200); assert(func0(15, 20) == 300); assert(func0(8, 9) == 72); return 0; }
O3
cpp
func0(int, int): endbr64 mov %edi,%eax imul %esi,%eax retq nopw 0x0(%rax,%rax,1)
_Z5func0ii: endbr64 mov eax, edi imul eax, esi retn
long long func0(int a1, int a2) { return (unsigned int)(a2 * a1); }
func0: ENDBR64 MOV EAX,EDI IMUL EAX,ESI RET
/* func0(int, int) */ int func0(int param_1,int param_2) { return param_1 * param_2; }
208
func0
#include <iostream> #include <string> #include <assert.h>
std::string func0(std::string str){ if (str[0] == str[str.length()-1]){ return "Equal"; } else { return "Not Equal"; } }
int main() { assert(func0("abcda") == "Equal"); assert(func0("ab") == "Not Equal"); assert(func0("mad") == "Not Equal"); 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) mov %rsi,-0x30(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax mov -0x30(%rbp),%rax mov $0x0,%esi mov %rax,%r...
_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: 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_40] mov esi, 0 mov rdi, rax call __ZNSt7__cx...
long long func0(long long a1, long long a2) { char v2; // bl long long v3; // rax char v5; // [rsp+17h] [rbp-29h] BYREF char *v6; // [rsp+18h] [rbp-28h] char *v7; // [rsp+20h] [rbp-20h] unsigned long long v8; // [rsp+28h] [rbp-18h] v8 = __readfsqword(0x28u); v2 = *(_BYTE *)std::string::operator[](a2, ...
func0: 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 + -0x40] MOV ESI,0x0 MOV RDI,RAX LAB_001013d9: CALL 0x001012b0 MOVZX EBX,byte ptr [RAX] MOV RAX,qword p...
/* func0(std::string) */ string * func0(string *param_1,ulong param_2) { char cVar1; char *pcVar2; long in_FS_OFFSET; allocator local_31; allocator *local_30; allocator *local_28; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); pcVar2 = (char *)std::string::operator[](param_2); cVar1 ...
209
func0
#include <iostream> #include <string> #include <assert.h>
std::string func0(std::string str){ if (str[0] == str[str.length()-1]){ return "Equal"; } else { return "Not Equal"; } }
int main() { assert(func0("abcda") == "Equal"); assert(func0("ab") == "Not Equal"); assert(func0("mad") == "Not Equal"); return 0; }
O1
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >): endbr64 push %rbx mov %rdi,%rbx mov (%rsi),%rax mov 0x8(%rsi),%rdx movzbl -0x1(%rax,%rdx,1),%ecx cmp %cl,(%rax) je 129d <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x34> lea 0x10(%rdi),%rax mov...
_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push rbx mov rbx, rdi mov rax, [rsi] mov rdx, [rsi+8] movzx ecx, byte ptr [rax+rdx-1] cmp [rax], cl jz short loc_127D lea rax, [rdi+10h] mov [rdi], rax lea rdx, aNotEqual+9; "" lea rsi, [rdx-9] call _ZNSt7...
_QWORD * func0(_QWORD *a1, long long a2) { if ( **(_BYTE **)a2 == *(_BYTE *)(*(_QWORD *)a2 + *(_QWORD *)(a2 + 8) - 1LL) ) { *a1 = a1 + 2; std::string::_M_construct<char const*>(a1, "Equal"); } else { *a1 = a1 + 2; std::string::_M_construct<char const*>(a1, "Not Equal"); } return a1; }
func0: ENDBR64 PUSH RBX MOV RBX,RDI MOV RAX,qword ptr [RSI] MOV RDX,qword ptr [RSI + 0x8] MOVZX ECX,byte ptr [RAX + RDX*0x1 + -0x1] CMP byte ptr [RAX],CL JZ 0x0010127d LEA RAX,[RDI + 0x10] MOV qword ptr [RDI],RAX LEA RDX,[0x102069] LEA RSI,[RDX + -0x9] CALL 0x001014f4 LAB_00101278: MOV RAX,RBX POP RBX RET LAB_0010127d:...
/* func0(std::string) */ long * func0(long *param_1,int8 *param_2) { if (*(char *)*param_2 == ((char *)*param_2)[param_2[1] + -1]) { *param_1 = (long)(param_1 + 2); std::string::_M_construct<char_const*>((char *)param_1,"Equal",0x102069); } else { *param_1 = (long)(param_1 + 2); std::string::_M_...
210
func0
#include <iostream> #include <string> #include <assert.h>
std::string func0(std::string str){ if (str[0] == str[str.length()-1]){ return "Equal"; } else { return "Not Equal"; } }
int main() { assert(func0("abcda") == "Equal"); assert(func0("ab") == "Not Equal"); assert(func0("mad") == "Not Equal"); return 0; }
O2
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >): endbr64 mov (%rsi),%rcx mov 0x8(%rsi),%rsi mov %rdi,%rax lea 0x10(%rdi),%rdx movzbl -0x1(%rcx,%rsi,1),%edi cmp %dil,(%rcx) mov %rdx,(%rax) je 14a0 <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0...
_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push rbx mov rax, [rsi] mov rbx, rdi mov rdx, [rsi+8] movzx ecx, byte ptr [rax+rdx-1] cmp [rax], cl lea rax, [rdi+10h] mov [rdi], rax jz short loc_1508 lea rdx, aNotEqual+9; "" lea rsi, [rdx-9] call _ZNSt7...
_QWORD * func0(_QWORD *a1, long long a2) { bool v2; // zf v2 = **(_BYTE **)a2 == *(_BYTE *)(*(_QWORD *)a2 + *(_QWORD *)(a2 + 8) - 1LL); *a1 = a1 + 2; if ( v2 ) std::string::_M_construct<char const*>(a1, "Equal"); else std::string::_M_construct<char const*>(a1, "Not Equal"); return a1; }
func0: ENDBR64 PUSH RBX MOV RAX,qword ptr [RSI] MOV RBX,RDI MOV RDX,qword ptr [RSI + 0x8] MOVZX ECX,byte ptr [RAX + RDX*0x1 + -0x1] CMP byte ptr [RAX],CL LEA RAX,[RDI + 0x10] MOV qword ptr [RDI],RAX JZ 0x00101508 LEA RDX,[0x10200d] LEA RSI,[RDX + -0x9] CALL 0x00101420 MOV RAX,RBX POP RBX RET LAB_00101508: LEA RDX,[0x10...
/* func0(std::string) */ long * func0(long *param_1,int8 *param_2) { char cVar1; char cVar2; cVar2 = ((char *)*param_2)[param_2[1] + -1]; cVar1 = *(char *)*param_2; *param_1 = (long)(param_1 + 2); if (cVar1 != cVar2) { std::string::_M_construct<char_const*>((char *)param_1,"Not Equal",0x10200d); ...
211
func0
#include <iostream> #include <string> #include <assert.h>
std::string func0(std::string str){ if (str[0] == str[str.length()-1]){ return "Equal"; } else { return "Not Equal"; } }
int main() { assert(func0("abcda") == "Equal"); assert(func0("ab") == "Not Equal"); assert(func0("mad") == "Not Equal"); return 0; }
O3
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >): endbr64 mov (%rsi),%rcx mov 0x8(%rsi),%rsi mov %rdi,%rax lea 0x10(%rdi),%rdx movzbl -0x1(%rcx,%rsi,1),%edi cmp %dil,(%rcx) mov %rdx,(%rax) je 14a0 <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0...
_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 mov rdx, [rsi] mov rcx, [rsi+8] mov rax, rdi movzx ecx, byte ptr [rdx+rcx-1] cmp [rdx], cl lea rdx, [rdi+10h] mov [rdi], rdx jz short loc_13F0 mov rdi, 6175714520746F4Eh mov byte ptr [rax+18h], 6Ch ; 'l' mov ...
long long func0(long long a1, long long a2) { long long result; // rax bool v3; // zf result = a1; v3 = **(_BYTE **)a2 == *(_BYTE *)(*(_QWORD *)a2 + *(_QWORD *)(a2 + 8) - 1LL); *(_QWORD *)a1 = a1 + 16; if ( v3 ) { *(_DWORD *)(a1 + 16) = 1635086661; *(_BYTE *)(a1 + 20) = 108; *(_QWORD *)(a1 +...
func0: ENDBR64 MOV RDX,qword ptr [RSI] MOV RCX,qword ptr [RSI + 0x8] MOV RAX,RDI MOVZX ECX,byte ptr [RDX + RCX*0x1 + -0x1] CMP byte ptr [RDX],CL LEA RDX,[RDI + 0x10] MOV qword ptr [RDI],RDX JZ 0x001013f0 MOV RDI,0x6175714520746f4e MOV byte ptr [RAX + 0x18],0x6c MOV qword ptr [RAX + 0x10],RDI MOV qword ptr [RAX + 0x8],0...
/* func0(std::string) */ void func0(long *param_1,int8 *param_2) { char cVar1; char cVar2; cVar2 = ((char *)*param_2)[param_2[1] + -1]; cVar1 = *(char *)*param_2; *param_1 = (long)(param_1 + 2); if (cVar1 != cVar2) { *(int *)(param_1 + 3) = 0x6c; param_1[2] = 0x6175714520746f4e; param_1[1] ...
212
func0
#include <vector> #include <assert.h>
std::vector<int> func0(std::vector<int> my_list) { int max_value = 0; for (int i = 0; i < my_list.size(); i++) { if (my_list[i] > max_value) { max_value = my_list[i]; } } std::vector<int> buckets(max_value + 1, 0); for (int i : my_list) { buckets[i]++; ...
int main() { assert(func0({1,23,4,5,6,7,8}) == std::vector<int>({1, 4, 5, 6, 7, 8, 23})); assert(func0({12, 9, 28, 33, 69, 45}) == std::vector<int>({9, 12, 28, 33, 45, 69})); assert(func0({8, 4, 14, 3, 2, 1}) == std::vector<int>({1, 2, 3, 4, 8, 14})); return 0; }
O0
cpp
func0(std::vector<int, std::allocator<int> >): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x68,%rsp mov %rdi,-0x68(%rbp) mov %rsi,-0x70(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax movl $0x0,-0x60(%rbp) movl $0x0,-0x5c(%rbp) mov -0x5c(%rbp),%eax movslq %eax,%rbx mov ...
_Z5func0St6vectorIiSaIiEE: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 78h mov [rbp+var_78], rdi mov [rbp+var_80], rsi mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax mov [rbp+var_68], 0 mov [rbp+var_64], 0 jmp short loc_12DC loc_129D: mov eax, [rbp+var_64] movsx...
long long func0(long long a1, long long a2) { _DWORD *v2; // rax int v4; // [rsp+18h] [rbp-68h] int i; // [rsp+1Ch] [rbp-64h] int v6; // [rsp+20h] [rbp-60h] int j; // [rsp+24h] [rbp-5Ch] int k; // [rsp+28h] [rbp-58h] int v9; // [rsp+2Ch] [rbp-54h] long long v10; // [rsp+30h] [rbp-50h] BYREF long long...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x78 MOV qword ptr [RBP + -0x78],RDI MOV qword ptr [RBP + -0x80],RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX MOV dword ptr [RBP + -0x68],0x0 MOV dword ptr [RBP + -0x64],0x0 JMP 0x001012dc LAB_0010129d: MOV EAX,dword ptr [RBP + -0x64] M...
/* func0(std::vector<int, std::allocator<int> >) */ vector<int,std::allocator<int>> * func0(vector param_1) { bool bVar1; ulong uVar2; int *piVar3; vector<int,std::allocator<int>> *in_RSI; int4 in_register_0000003c; long in_FS_OFFSET; int local_70; int local_6c; int local_68; int local_64; int l...
213
func0
#include <vector> #include <assert.h>
std::vector<int> func0(std::vector<int> my_list) { int max_value = 0; for (int i = 0; i < my_list.size(); i++) { if (my_list[i] > max_value) { max_value = my_list[i]; } } std::vector<int> buckets(max_value + 1, 0); for (int i : my_list) { buckets[i]++; ...
int main() { assert(func0({1,23,4,5,6,7,8}) == std::vector<int>({1, 4, 5, 6, 7, 8, 23})); assert(func0({12, 9, 28, 33, 69, 45}) == std::vector<int>({9, 12, 28, 33, 45, 69})); assert(func0({8, 4, 14, 3, 2, 1}) == std::vector<int>({1, 2, 3, 4, 8, 14})); return 0; }
O1
cpp
func0(std::vector<int, std::allocator<int> >): endbr64 push %r13 push %r12 push %rbp push %rbx sub $0x8,%rsp mov %rdi,%rbp mov %rsi,%rbx mov (%rsi),%rcx mov 0x8(%rsi),%rdx sub %rcx,%rdx mov %rdx,%rax shr $0x2,%rax je 1434 <_Z5func0St6vectorIiSaIiEE+0x20b> mov %rcx,%rax add %rdx...
_Z5func0St6vectorIiSaIiEE: endbr64 push r13 push r12 push rbp push rbx sub rsp, 8 mov r12, rdi mov rbx, rsi mov rdx, [rsi+8] mov rax, [rsi] mov rsi, rdx sub rsi, rax sar rsi, 2 cmp rdx, rax jz loc_136B mov edx, 0 mov r13d, 0 loc_1262: mov ecx, [rax+rdx*4]...
int ** func0(int **a1, int **a2) { int *v3; // rdx int *v4; // rax unsigned long long v5; // rsi unsigned long long v6; // rdx int v7; // r13d unsigned long long v8; // rbp int *v9; // rcx int *v10; // r8 int v11; // ecx int v12; // eax long long v13; // rdx int v14; // r10d int v15; // esi ...
func0: ENDBR64 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x8 MOV R12,RDI MOV RBX,RSI MOV RDX,qword ptr [RSI + 0x8] MOV RAX,qword ptr [RSI] MOV RSI,RDX SUB RSI,RAX SAR RSI,0x2 CMP RDX,RAX JZ 0x0010136b MOV EDX,0x0 MOV R13D,0x0 LAB_00101262: MOV ECX,dword ptr [RAX + RDX*0x4] CMP R13D,ECX CMOVL R13D,ECX ADD RDX,0x1 CMP ...
/* func0(std::vector<int, std::allocator<int> >) */ long * func0(vector param_1) { int auVar1 [16]; int iVar2; uint uVar3; int *piVar4; int *piVar5; ulong uVar6; long lVar7; ulong uVar8; int iVar9; long *in_RSI; ulong uVar10; int4 in_register_0000003c; long *plVar11; char *pcVar12; int *...
214
func0
#include <vector> #include <assert.h>
std::vector<int> func0(std::vector<int> my_list) { int max_value = 0; for (int i = 0; i < my_list.size(); i++) { if (my_list[i] > max_value) { max_value = my_list[i]; } } std::vector<int> buckets(max_value + 1, 0); for (int i : my_list) { buckets[i]++; ...
int main() { assert(func0({1,23,4,5,6,7,8}) == std::vector<int>({1, 4, 5, 6, 7, 8, 23})); assert(func0({12, 9, 28, 33, 69, 45}) == std::vector<int>({9, 12, 28, 33, 45, 69})); assert(func0({8, 4, 14, 3, 2, 1}) == std::vector<int>({1, 2, 3, 4, 8, 14})); return 0; }
O2
cpp
func0(std::vector<int, std::allocator<int> >): endbr64 push %r14 push %r13 push %r12 mov %rdi,%r12 push %rbp mov %rsi,%rbp push %rbx mov (%rsi),%rax mov 0x8(%rsi),%rcx sub %rax,%rcx mov %rcx,%rbx shr $0x2,%rbx je 177e <_Z5func0St6vectorIiSaIiEE+0x11e> add %rax,%rcx xor %ebx,%ebx...
_Z5func0St6vectorIiSaIiEE: endbr64 push r13 push r12 mov r12, rdi push rbp mov rbp, rsi push rbx sub rsp, 8 movdqu xmm0, xmmword ptr [rsi] movhlps xmm1, xmm0 movq r9, xmm0 movq rsi, xmm1 mov rdi, rsi sub rdi, r9 sar rdi, 2 cmp rsi, r9 jz loc_1777 mov rdx, r9 xor ...
__m128 * func0(__m128 *a1, const __m128i *a2, double a3, __m128 a4, __m128 a5) { __m128 v7; // xmm0 int *v8; // r9 unsigned long long v9; // rsi int *v10; // rdx unsigned long long v11; // rax int v12; // ebx unsigned long long v13; // r13 int *v14; // r8 int *v15; // rax long long v16; // rdx int...
func0: ENDBR64 PUSH R13 PUSH R12 MOV R12,RDI PUSH RBP MOV RBP,RSI PUSH RBX SUB RSP,0x8 MOVDQU XMM0,xmmword ptr [RSI] MOVHLPS XMM1,XMM0 MOVQ R9,XMM0 MOVQ RSI,XMM1 MOV RDI,RSI SUB RDI,R9 SAR RDI,0x2 CMP RSI,R9 JZ 0x00101777 MOV RDX,R9 XOR EAX,EAX XOR EBX,EBX NOP LAB_00101660: MOV ECX,dword ptr [RDX] CMP EBX,ECX CMOVL EBX...
/* func0(std::vector<int, std::allocator<int> >) */ int8 * func0(int8 *param_1,int (*param_2) [16]) { int8 uVar1; int8 *puVar2; int iVar3; int iVar4; ulong uVar5; int *piVar6; void *__s; int *piVar7; int8 *extraout_RAX; int iVar8; int *piVar9; int *piVar10; int iVar11; char *pcVar12; int...
215
func0
#include <vector> #include <assert.h>
std::vector<int> func0(std::vector<int> my_list) { int max_value = 0; for (int i = 0; i < my_list.size(); i++) { if (my_list[i] > max_value) { max_value = my_list[i]; } } std::vector<int> buckets(max_value + 1, 0); for (int i : my_list) { buckets[i]++; ...
int main() { assert(func0({1,23,4,5,6,7,8}) == std::vector<int>({1, 4, 5, 6, 7, 8, 23})); assert(func0({12, 9, 28, 33, 69, 45}) == std::vector<int>({9, 12, 28, 33, 45, 69})); assert(func0({8, 4, 14, 3, 2, 1}) == std::vector<int>({1, 2, 3, 4, 8, 14})); return 0; }
O3
cpp
func0(std::vector<int, std::allocator<int> >): endbr64 push %r13 push %r12 mov %rdi,%r12 push %rbp push %rbx mov %rsi,%rbx sub $0x8,%rsp mov (%rsi),%rsi mov 0x8(%rbx),%rdx sub %rsi,%rdx sar $0x2,%rdx je 1833 <_Z5func0St6vectorIiSaIiEE+0x233> lea -0x1(%rdx),%rax cmp $0x2,%rax jbe ...
_Z5func0St6vectorIiSaIiEE: endbr64 push r13 push r12 mov r12, rdi push rbp mov rbp, rsi push rbx sub rsp, 8 movdqu xmm3, xmmword ptr [rsi] movhlps xmm4, xmm3 movq r10, xmm3 movq rcx, xmm4 mov rax, rcx sub rax, r10 mov rdi, rax sar rdi, 2 cmp rcx, r10 jz loc_1837 t...
__m128 * func0(__m128 *a1, const __m128i *a2, double a3, double a4, double a5, double a6, __m128 a7) { __m128 v9; // xmm3 unsigned long long v10; // xmm4_8 int *v11; // r10 unsigned long long v12; // rcx unsigned long long v13; // rax unsigned long long v14; // rdi unsigned long long v15; // rsi __m128i...
func0: ENDBR64 PUSH R13 PUSH R12 MOV R12,RDI PUSH RBP MOV RBP,RSI PUSH RBX SUB RSP,0x8 MOVDQU XMM3,xmmword ptr [RSI] MOVHLPS XMM4,XMM3 MOVQ R10,XMM3 MOVQ RCX,XMM4 MOV RAX,RCX SUB RAX,R10 MOV RDI,RAX SAR RDI,0x2 CMP RCX,R10 JZ 0x00101837 TEST RAX,RAX MOV ESI,0x1 CMOVNZ RSI,RDI CMP RAX,0xc JBE 0x00101841 MOV RDX,RSI PXOR...
/* func0(std::vector<int, std::allocator<int> >) */ int8 * func0(int8 *param_1,int (*param_2) [16]) { int8 uVar1; int8 *puVar2; uint *puVar3; uint *puVar4; uint *puVar5; int iVar6; int iVar7; ulong uVar8; uint *puVar9; uint *puVar10; void *__s; int *piVar11; int8 *extraout_RAX; uint uVar12...
216
func0
#include <cmath> #include <cassert>
double func0(int a, int n, int r) { double tn = a * std::pow(r, n - 1); return tn; }
int main() { assert(func0(1, 5, 2) == 16); assert(func0(1, 5, 4) == 256); assert(func0(2, 6, 3) == 486); return 0; }
O0
cpp
func0(int, int, int): endbr64 push %rbp mov %rsp,%rbp sub $0x30,%rsp mov %edi,-0x14(%rbp) mov %esi,-0x18(%rbp) mov %edx,-0x1c(%rbp) cvtsi2sdl -0x14(%rbp),%xmm1 movsd %xmm1,-0x28(%rbp) mov -0x18(%rbp),%eax lea -0x1(%rax),%edx mov -0x1c(%rbp),%eax mov %edx,%esi mov %eax,%edi callq 128f <...
_Z5func0iii: endbr64 push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_14], edi mov [rbp+var_18], esi mov [rbp+var_1C], edx pxor xmm1, xmm1 cvtsi2sd xmm1, [rbp+var_14] movsd [rbp+var_28], xmm1 mov eax, [rbp+var_18] lea edx, [rax-1] mov eax, [rbp+var_1C] mov esi, edx mov edi...
double func0(int a1, int a2, unsigned int a3) { return std::pow<int,int>(a3, (unsigned int)(a2 - 1)) * (double)a1; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV dword ptr [RBP + -0x14],EDI MOV dword ptr [RBP + -0x18],ESI MOV dword ptr [RBP + -0x1c],EDX PXOR XMM1,XMM1 CVTSI2SD XMM1,dword ptr [RBP + -0x14] MOVSD qword ptr [RBP + -0x28],XMM1 MOV EAX,dword ptr [RBP + -0x18] LEA EDX,[RAX + -0x1] MOV EAX,dword ptr [RBP + -0x1c] MO...
/* func0(int, int, int) */ double func0(int param_1,int param_2,int param_3) { double extraout_XMM0_Qa; std::pow<int,int>(param_3,param_2 + -1); return extraout_XMM0_Qa * (double)param_1; }
217
func0
#include <cmath> #include <cassert>
double func0(int a, int n, int r) { double tn = a * std::pow(r, n - 1); return tn; }
int main() { assert(func0(1, 5, 2) == 16); assert(func0(1, 5, 4) == 256); assert(func0(2, 6, 3) == 486); return 0; }
O1
cpp
func0(int, int, int): endbr64 push %rbx mov %edi,%ebx sub $0x1,%esi pxor %xmm0,%xmm0 cvtsi2sd %edx,%xmm0 pxor %xmm1,%xmm1 cvtsi2sd %esi,%xmm1 callq 1050 <pow@plt> movapd %xmm0,%xmm1 pxor %xmm0,%xmm0 cvtsi2sd %ebx,%xmm0 mulsd %xmm1,%xmm0 pop %rbx retq
_Z5func0iii: endbr64 push rbx mov ebx, edi sub esi, 1 pxor xmm0, xmm0 cvtsi2sd xmm0, edx; x pxor xmm1, xmm1 cvtsi2sd xmm1, esi; y call _pow movapd xmm1, xmm0 pxor xmm0, xmm0 cvtsi2sd xmm0, ebx mulsd xmm0, xmm1 pop rbx retn
double func0(int a1, int a2, int a3) { return (double)a1 * pow((double)a3, (double)(a2 - 1)); }
func0: ENDBR64 PUSH RBX MOV EBX,EDI SUB ESI,0x1 PXOR XMM0,XMM0 CVTSI2SD XMM0,EDX PXOR XMM1,XMM1 CVTSI2SD XMM1,ESI CALL 0x00101050 MOVAPD XMM1,XMM0 PXOR XMM0,XMM0 CVTSI2SD XMM0,EBX MULSD XMM0,XMM1 POP RBX RET
/* func0(int, int, int) */ double func0(int param_1,int param_2,int param_3) { double dVar1; dVar1 = pow((double)param_3,(double)(param_2 + -1)); return (double)param_1 * dVar1; }
218
func0
#include <cmath> #include <cassert>
double func0(int a, int n, int r) { double tn = a * std::pow(r, n - 1); return tn; }
int main() { assert(func0(1, 5, 2) == 16); assert(func0(1, 5, 4) == 256); assert(func0(2, 6, 3) == 486); return 0; }
O2
cpp
func0(int, int, int): endbr64 sub $0x1,%esi pxor %xmm0,%xmm0 pxor %xmm1,%xmm1 push %rbx cvtsi2sd %esi,%xmm1 mov %edi,%ebx cvtsi2sd %edx,%xmm0 callq 1050 <pow@plt> movapd %xmm0,%xmm1 pxor %xmm0,%xmm0 cvtsi2sd %ebx,%xmm0 pop %rbx mulsd %xmm1,%xmm0 retq nopw %cs:0x0(%rax,%rax,1) nopl 0x0(%rax,%rax,1...
_Z5func0iii: endbr64 sub esi, 1 pxor xmm0, xmm0 pxor xmm1, xmm1 push rbx cvtsi2sd xmm1, esi; y mov ebx, edi cvtsi2sd xmm0, edx; x call _pow movapd xmm1, xmm0 pxor xmm0, xmm0 cvtsi2sd xmm0, ebx pop rbx mulsd xmm0, xmm1 retn
double func0(int a1, int a2, int a3) { return (double)a1 * pow((double)a3, (double)(a2 - 1)); }
func0: ENDBR64 SUB ESI,0x1 PXOR XMM0,XMM0 PXOR XMM1,XMM1 PUSH RBX CVTSI2SD XMM1,ESI MOV EBX,EDI CVTSI2SD XMM0,EDX CALL 0x00101050 MOVAPD XMM1,XMM0 PXOR XMM0,XMM0 CVTSI2SD XMM0,EBX POP RBX MULSD XMM0,XMM1 RET
/* func0(int, int, int) */ double func0(int param_1,int param_2,int param_3) { double dVar1; dVar1 = pow((double)param_3,(double)(param_2 + -1)); return (double)param_1 * dVar1; }
219
func0
#include <cmath> #include <cassert>
double func0(int a, int n, int r) { double tn = a * std::pow(r, n - 1); return tn; }
int main() { assert(func0(1, 5, 2) == 16); assert(func0(1, 5, 4) == 256); assert(func0(2, 6, 3) == 486); return 0; }
O3
cpp
func0(int, int, int): endbr64 sub $0x1,%esi pxor %xmm0,%xmm0 pxor %xmm1,%xmm1 push %rbx cvtsi2sd %esi,%xmm1 mov %edi,%ebx cvtsi2sd %edx,%xmm0 callq 1050 <pow@plt> movapd %xmm0,%xmm1 pxor %xmm0,%xmm0 cvtsi2sd %ebx,%xmm0 pop %rbx mulsd %xmm1,%xmm0 retq nopw %cs:0x0(%rax,%rax,1) nopl 0x0(%rax,%rax,1...
_Z5func0iii: endbr64 sub esi, 1 pxor xmm0, xmm0 pxor xmm1, xmm1 push rbx cvtsi2sd xmm1, esi; y mov ebx, edi cvtsi2sd xmm0, edx; x call _pow movapd xmm1, xmm0 pxor xmm0, xmm0 cvtsi2sd xmm0, ebx pop rbx mulsd xmm0, xmm1 retn
double func0(int a1, int a2, int a3) { return (double)a1 * pow((double)a3, (double)(a2 - 1)); }
func0: ENDBR64 SUB ESI,0x1 PXOR XMM0,XMM0 PXOR XMM1,XMM1 PUSH RBX CVTSI2SD XMM1,ESI MOV EBX,EDI CVTSI2SD XMM0,EDX CALL 0x00101050 MOVAPD XMM1,XMM0 PXOR XMM0,XMM0 CVTSI2SD XMM0,EBX POP RBX MULSD XMM0,XMM1 RET
/* func0(int, int, int) */ double func0(int param_1,int param_2,int param_3) { double dVar1; dVar1 = pow((double)param_3,(double)(param_2 + -1)); return (double)param_1 * dVar1; }
220
func0
#include <assert.h> int rev(int num) { int rev_num = 0; while (num > 0) { rev_num = rev_num * 10 + num % 10; num = num / 10; } return rev_num; }
bool func0(int n) { return (2 * rev(n) == n + 1); }
int main() { assert(func0(70) == false); assert(func0(23) == false); assert(func0(73) == true); return 0; }
O0
cpp
func0(int): endbr64 push %rbp mov %rsp,%rbp sub $0x8,%rsp mov %edi,-0x4(%rbp) mov -0x4(%rbp),%eax mov %eax,%edi callq 1149 <_Z3revi> lea (%rax,%rax,1),%edx mov -0x4(%rbp),%eax add $0x1,%eax cmp %eax,%edx sete %al leaveq retq
_Z5func0i: endbr64 push rbp mov rbp, rsp sub rsp, 8 mov [rbp+var_4], edi mov eax, [rbp+var_4] mov edi, eax; int call _Z3revi; rev(int) lea edx, [rax+rax] mov eax, [rbp+var_4] add eax, 1 cmp edx, eax setz al leave retn
bool func0(int a1) { return 2 * (unsigned int)rev(a1) == a1 + 1; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x8 MOV dword ptr [RBP + -0x4],EDI MOV EAX,dword ptr [RBP + -0x4] MOV EDI,EAX CALL 0x00101149 LEA EDX,[RAX + RAX*0x1] MOV EAX,dword ptr [RBP + -0x4] ADD EAX,0x1 CMP EDX,EAX SETZ AL LEAVE RET
/* func0(int) */ int4 func0(int param_1) { int iVar1; iVar1 = rev(param_1); return CONCAT31((int3)((uint)(param_1 + 1) >> 8),iVar1 * 2 == param_1 + 1); }
221
func0
#include <assert.h> int rev(int num) { int rev_num = 0; while (num > 0) { rev_num = rev_num * 10 + num % 10; num = num / 10; } return rev_num; }
bool func0(int n) { return (2 * rev(n) == n + 1); }
int main() { assert(func0(70) == false); assert(func0(23) == false); assert(func0(73) == true); return 0; }
O1
cpp
func0(int): endbr64 push %rbx mov %edi,%ebx callq 1149 <_Z3revi> add %eax,%eax add $0x1,%ebx cmp %ebx,%eax sete %al pop %rbx retq
_Z5func0i: endbr64 push rbx mov ebx, edi call _Z3revi; rev(int) add eax, eax add ebx, 1 cmp eax, ebx setz al pop rbx retn
bool func0(int a1) { return 2 * (unsigned int)rev(a1) == a1 + 1; }
func0: ENDBR64 PUSH RBX MOV EBX,EDI CALL 0x00101149 ADD EAX,EAX ADD EBX,0x1 CMP EAX,EBX SETZ AL POP RBX RET
/* func0(int) */ int4 func0(int param_1) { int iVar1; iVar1 = rev(param_1); return CONCAT31((int3)((uint)(iVar1 * 2) >> 8),iVar1 * 2 == param_1 + 1); }
222
func0
#include <assert.h> int rev(int num) { int rev_num = 0; while (num > 0) { rev_num = rev_num * 10 + num % 10; num = num / 10; } return rev_num; }
bool func0(int n) { return (2 * rev(n) == n + 1); }
int main() { assert(func0(70) == false); assert(func0(23) == false); assert(func0(73) == true); return 0; }
O2
cpp
func0(int): endbr64 test %edi,%edi jle 11d0 <_Z5func0i+0x50> mov %edi,%edx xor %ecx,%ecx mov $0xcccccccd,%r8d nopw 0x0(%rax,%rax,1) mov %edx,%eax lea (%rcx,%rcx,4),%esi mov %edx,%r9d imul %r8,%rax shr $0x23,%rax lea (%rax,%rax,4),%ecx add %ecx,%ecx sub %ecx,%r9d lea (%r9,%rsi,2...
_Z5func0i: endbr64 test edi, edi jle short loc_11D0 mov edx, edi xor ecx, ecx mov r9d, 0CCCCCCCDh nop word ptr [rax+rax+00h] loc_1198: mov eax, edx lea r8d, [rcx+rcx*4] mov esi, edx imul rax, r9 shr rax, 23h lea ecx, [rax+rax*4] add ecx, ecx sub esi, ecx lea ecx...
bool func0(int a1) { unsigned int v1; // edx unsigned int v2; // ecx int v3; // esi if ( a1 <= 0 ) return a1 == -1; v1 = a1; v2 = 0; do { v2 = v1 % 0xA + 10 * v2; v3 = v1; v1 /= 0xAu; } while ( v3 > 9 ); return a1 + 1 == 2 * v2; }
func0: ENDBR64 TEST EDI,EDI JLE 0x001011d0 MOV EDX,EDI XOR ECX,ECX MOV R9D,0xcccccccd NOP word ptr [RAX + RAX*0x1] LAB_00101198: MOV EAX,EDX LEA R8D,[RCX + RCX*0x4] MOV ESI,EDX IMUL RAX,R9 SHR RAX,0x23 LEA ECX,[RAX + RAX*0x4] ADD ECX,ECX SUB ESI,ECX LEA ECX,[RSI + R8*0x2] MOV ESI,EDX MOV EDX,EAX CMP ESI,0x9 JG 0x001011...
/* func0(int) */ bool func0(int param_1) { bool bVar1; int iVar2; uint uVar3; if (0 < param_1) { iVar2 = 0; uVar3 = param_1; do { iVar2 = uVar3 % 10 + iVar2 * 10; bVar1 = 9 < (int)uVar3; uVar3 = uVar3 / 10; } while (bVar1); return param_1 + 1 == iVar2 * 2; } return...
223
func0
#include <assert.h> int rev(int num) { int rev_num = 0; while (num > 0) { rev_num = rev_num * 10 + num % 10; num = num / 10; } return rev_num; }
bool func0(int n) { return (2 * rev(n) == n + 1); }
int main() { assert(func0(70) == false); assert(func0(23) == false); assert(func0(73) == true); return 0; }
O3
cpp
func0(int): endbr64 test %edi,%edi jle 11d0 <_Z5func0i+0x50> mov %edi,%edx xor %ecx,%ecx mov $0xcccccccd,%r8d nopw 0x0(%rax,%rax,1) mov %edx,%eax lea (%rcx,%rcx,4),%esi mov %edx,%r9d imul %r8,%rax shr $0x23,%rax lea (%rax,%rax,4),%ecx add %ecx,%ecx sub %ecx,%r9d lea (%r9,%rsi,2...
_Z5func0i: endbr64 test edi, edi jle short loc_11D0 mov edx, edi xor ecx, ecx mov r9d, 0CCCCCCCDh nop word ptr [rax+rax+00h] loc_1198: mov eax, edx lea r8d, [rcx+rcx*4] mov esi, edx imul rax, r9 shr rax, 23h lea ecx, [rax+rax*4] add ecx, ecx sub esi, ecx lea ecx...
bool func0(int a1) { unsigned int v1; // edx unsigned int v2; // ecx int v3; // esi if ( a1 <= 0 ) return a1 == -1; v1 = a1; v2 = 0; do { v2 = v1 % 0xA + 10 * v2; v3 = v1; v1 /= 0xAu; } while ( v3 > 9 ); return a1 + 1 == 2 * v2; }
func0: ENDBR64 TEST EDI,EDI JLE 0x001011d0 MOV EDX,EDI XOR ECX,ECX MOV R9D,0xcccccccd NOP word ptr [RAX + RAX*0x1] LAB_00101198: MOV EAX,EDX LEA R8D,[RCX + RCX*0x4] MOV ESI,EDX IMUL RAX,R9 SHR RAX,0x23 LEA ECX,[RAX + RAX*0x4] ADD ECX,ECX SUB ESI,ECX LEA ECX,[RSI + R8*0x2] MOV ESI,EDX MOV EDX,EAX CMP ESI,0x9 JG 0x001011...
/* func0(int) */ bool func0(int param_1) { bool bVar1; int iVar2; uint uVar3; if (0 < param_1) { iVar2 = 0; uVar3 = param_1; do { iVar2 = uVar3 % 10 + iVar2 * 10; bVar1 = 9 < (int)uVar3; uVar3 = uVar3 / 10; } while (bVar1); return param_1 + 1 == iVar2 * 2; } return...
224
func0
#include <iostream> #include <vector> #include <algorithm> #include <assert.h>
int func0(std::vector<int>& arr, int n) { std::sort(arr.begin(), arr.end(), std::greater<int>()); int num = arr[0]; for (int i = 1; i < n; i++) { num = num * 10 + arr[i]; } return num; }
int main() { std::vector<int> arr1 = {1, 2, 3}; std::vector<int> arr2 = {4, 5, 6, 1}; std::vector<int> arr3 = {1, 2, 3, 9}; assert(func0(arr1, 3) == 321); assert(func0(arr2, 4) == 6541); assert(func0(arr3, 4) == 9321); return 0; }
O0
cpp
func0(std::vector<int, std::allocator<int> >&, int): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x28,%rsp mov %rdi,-0x28(%rbp) mov %esi,-0x2c(%rbp) mov -0x28(%rbp),%rax mov %rax,%rdi callq 170c <_ZNSt6vectorIiSaIiEE3endEv> mov %rax,%rbx mov -0x28(%rbp),%rax mov %rax,%rdi callq 16c0 ...
_Z5func0RSt6vectorIiSaIiEEi: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 28h mov [rbp+var_28], rdi mov [rbp+var_2C], esi mov rax, [rbp+var_28] mov rdi, rax call _ZNSt6vectorIiSaIiEE3endEv; std::vector<int>::end(void) mov rbx, rax mov rax, [rbp+var_28] mov rdi, rax call ...
long long func0(long long a1, int a2) { long long v2; // rbx long long v3; // rax unsigned int v5; // [rsp+18h] [rbp-18h] int i; // [rsp+1Ch] [rbp-14h] v2 = std::vector<int>::end(a1); v3 = std::vector<int>::begin(a1); std::sort<__gnu_cxx::__normal_iterator<int *,std::vector<int>>,std::greater<int>>(v3, ...
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 RAX,qword ptr [RBP + -0x28] MOV RDI,RAX CALL 0x0010165c MOV RBX,RAX MOV RAX,qword ptr [RBP + -0x28] MOV RDI,RAX CALL 0x00101610 MOV RSI,RBX MOV RDI,RAX CALL 0x001016ac MOV RAX,qword ptr [RBP + -...
/* func0(std::vector<int, std::allocator<int> >&, int) */ int func0(vector *param_1,int param_2) { __normal_iterator _Var1; __normal_iterator _Var2; int *piVar3; greater extraout_EDX; int4 local_20; int4 local_1c; _Var1 = std::vector<int,std::allocator<int>>::end((vector<int,std::allocator<int>> *)pa...
225
func0
#include <iostream> #include <vector> #include <algorithm> #include <assert.h>
int func0(std::vector<int>& arr, int n) { std::sort(arr.begin(), arr.end(), std::greater<int>()); int num = arr[0]; for (int i = 1; i < n; i++) { num = num * 10 + arr[i]; } return num; }
int main() { std::vector<int> arr1 = {1, 2, 3}; std::vector<int> arr2 = {4, 5, 6, 1}; std::vector<int> arr3 = {1, 2, 3, 9}; assert(func0(arr1, 3) == 321); assert(func0(arr2, 4) == 6541); assert(func0(arr3, 4) == 9321); return 0; }
O1
cpp
func0(std::vector<int, std::allocator<int> >&, int): endbr64 push %r14 push %r13 push %r12 push %rbp push %rbx mov %rdi,%r12 mov %esi,%ebp mov 0x8(%rdi),%r13 mov (%rdi),%r14 cmp %r13,%r14 je 130b <_Z5func0RSt6vectorIiSaIiEEi+0xa2> mov %r13,%rbx sub %r14,%rbx mov %rbx,%rax sar $0...
_Z5func0RSt6vectorIiSaIiEEi: endbr64 push r14 push r13 push r12 push rbp push rbx mov r13, rdi mov r12d, esi mov rbp, [rdi+8] mov r14, [rdi] cmp r14, rbp jz loc_12D2 mov rbx, rbp sub rbx, r14 mov rdx, rbx sar rdx, 2 mov eax, 40h ; '@' jz short loc_1266 bs...
long long func0(unsigned int **a1, int a2) { unsigned int *v3; // rbp unsigned int *v4; // r14 int v5; // eax unsigned long long v6; // rax unsigned int *v7; // rbx signed int v8; // ecx unsigned int *v9; // rax int v10; // edx unsigned int *v11; // rsi unsigned int *v12; // rcx unsigned int v13;...
func0: ENDBR64 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX MOV R13,RDI MOV R12D,ESI MOV RBP,qword ptr [RDI + 0x8] MOV R14,qword ptr [RDI] CMP R14,RBP JZ 0x001012d2 MOV RBX,RBP SUB RBX,R14 MOV RDX,RBX SAR RDX,0x2 MOV EAX,0x40 JZ 0x00101266 BSR RAX,RDX XOR EAX,0x3f LAB_00101266: MOV EDX,0x3f SUB EDX,EAX MOVSXD RDX,EDX A...
/* func0(std::vector<int, std::allocator<int> >&, int) */ int func0(vector *param_1,int param_2) { int iVar1; long lVar2; int *piVar3; int *piVar4; int *piVar5; uint uVar6; int *piVar7; _Iter_comp_iter in_ECX; _Iter_comp_iter extraout_EDX; int iVar8; ulong uVar9; int *piVar10; __normal_itera...
226
func0
#include <iostream> #include <vector> #include <algorithm> #include <assert.h>
int func0(std::vector<int>& arr, int n) { std::sort(arr.begin(), arr.end(), std::greater<int>()); int num = arr[0]; for (int i = 1; i < n; i++) { num = num * 10 + arr[i]; } return num; }
int main() { std::vector<int> arr1 = {1, 2, 3}; std::vector<int> arr2 = {4, 5, 6, 1}; std::vector<int> arr3 = {1, 2, 3, 9}; assert(func0(arr1, 3) == 321); assert(func0(arr2, 4) == 6541); assert(func0(arr3, 4) == 9321); return 0; }
O2
cpp
func0(std::vector<int, std::allocator<int> >&, int): endbr64 push %r14 push %r13 mov %esi,%r13d push %r12 push %rbp push %rbx mov 0x8(%rdi),%rbp mov (%rdi),%r14 cmp %rbp,%r14 je 157f <_Z5func0RSt6vectorIiSaIiEEi+0xcf> mov %rbp,%rbx mov $0x3f,%edx mov %rdi,%r12 mov %rbp,%rsi sub ...
_Z5func0RSt6vectorIiSaIiEEi: endbr64 push r14 push r13 push r12 push rbp push rbx mov r12, [rdi+8] mov ebx, esi mov r14, [rdi] cmp r14, r12 jz loc_1550 mov rbp, r12 mov r13, rdi mov rdx, 0FFFFFFFFFFFFFFFEh sub rbp, r14 mov rax, rbp sar rax, 2 jz short loc...
long long func0(char **a1, int a2) { char *v2; // r12 char *v4; // r14 long long v6; // rdx unsigned long long v7; // rax char *v8; // rdi int v9; // ecx int v10; // edx char *v11; // rsi char *v12; // rax unsigned int v13; // edx char *v14; // rax int v15; // ecx int v16; // edx v2 = a1[1...
func0: ENDBR64 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX MOV R12,qword ptr [RDI + 0x8] MOV EBX,ESI MOV R14,qword ptr [RDI] CMP R14,R12 JZ 0x00101550 MOV RBP,R12 MOV R13,RDI MOV RDX,-0x2 SUB RBP,R14 MOV RAX,RBP SAR RAX,0x2 JZ 0x001014f1 BSR RAX,RAX CDQE LEA RDX,[RAX + RAX*0x1] LAB_001014f1: MOV RSI,R12 MOV RDI,R14 CA...
/* func0(std::vector<int, std::allocator<int> >&, int) */ int func0(vector *param_1,int param_2) { int iVar1; int *piVar2; ulong uVar3; int *piVar4; _Iter_comp_iter in_ECX; _Iter_comp_iter extraout_EDX; int iVar5; long lVar6; __normal_iterator _Var7; int *piVar8; piVar8 = *(int **)(param_1 + ...
227
func0
#include <iostream> #include <vector> #include <algorithm> #include <assert.h>
int func0(std::vector<int>& arr, int n) { std::sort(arr.begin(), arr.end(), std::greater<int>()); int num = arr[0]; for (int i = 1; i < n; i++) { num = num * 10 + arr[i]; } return num; }
int main() { std::vector<int> arr1 = {1, 2, 3}; std::vector<int> arr2 = {4, 5, 6, 1}; std::vector<int> arr3 = {1, 2, 3, 9}; assert(func0(arr1, 3) == 321); assert(func0(arr2, 4) == 6541); assert(func0(arr3, 4) == 9321); return 0; }
O3
cpp
func0(std::vector<int, std::allocator<int> >&, int): endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp mov %esi,%ebp push %rbx sub $0x18,%rsp mov 0x8(%rdi),%r13 mov (%rdi),%r15 cmp %r13,%r15 je 15b0 <_Z5func0RSt6vectorIiSaIiEEi+0x120> mov %r13,%r14 mov $0x3f,%edx mov %rdi...
_Z5func0RSt6vectorIiSaIiEEi: endbr64 push r15 push r14 push r13 push r12 push rbp mov ebp, esi push rbx sub rsp, 18h mov r15, [rdi+8] mov r12, [rdi] cmp r12, r15 jz loc_17DC mov r14, r15 mov r13, rdi lea rbx, [r12+4] sub r14, r12 mov rax, r14 sar rax, 2...
long long func0(char **a1, int a2) { char *v3; // r15 char *j; // r12 char *v5; // rbx unsigned long long v6; // rdx char *v7; // r14 int v8; // ecx char *v9; // rsi int v10; // edx char *i; // rax int v12; // ecx int v13; // edx char *v14; // rax char *v15; // rsi unsigned int v16; // edx ...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP MOV EBP,ESI PUSH RBX SUB RSP,0x18 MOV R15,qword ptr [RDI + 0x8] MOV R12,qword ptr [RDI] CMP R12,R15 JZ 0x001017dc MOV R14,R15 MOV R13,RDI LEA RBX,[R12 + 0x4] SUB R14,R12 MOV RAX,R14 SAR RAX,0x2 JZ 0x0010181a BSR RDX,RAX MOV RSI,R15 MOV RDI,R12 MOVSXD RDX,EDX A...
/* func0(std::vector<int, std::allocator<int> >&, int) */ int func0(vector *param_1,int param_2,int param_3,int param_4,int param_5, int param_6,int param_7,int param_8,int param_9,int param_10, int4 param_11) { long lVar1; ulong uVar2; int *piVar3; int *piVar4; _Iter_comp_iter _Var5; in...
228
func0
#include <iostream> #include <assert.h>
bool func0(int x, int y) { return ((x ^ y) < 0); }
int main() { assert(func0(1, -2) == true); assert(func0(3, 2) == false); assert(func0(-10, -10) == false); return 0; }
O0
cpp
func0(int, int): endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x4(%rbp) mov %esi,-0x8(%rbp) mov -0x4(%rbp),%eax xor -0x8(%rbp),%eax shr $0x1f,%eax pop %rbp retq
_Z5func0ii: endbr64 push rbp mov rbp, rsp mov [rbp+var_4], edi mov [rbp+var_8], esi mov eax, [rbp+var_4] xor eax, [rbp+var_8] shr eax, 1Fh pop rbp retn
long long func0(unsigned int a1, int a2) { return (a2 ^ a1) >> 31; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x4],EDI MOV dword ptr [RBP + -0x8],ESI MOV EAX,dword ptr [RBP + -0x4] XOR EAX,dword ptr [RBP + -0x8] SHR EAX,0x1f POP RBP RET
/* func0(int, int) */ uint func0(int param_1,int param_2) { return (uint)(param_1 ^ param_2) >> 0x1f; }
229
func0
#include <iostream> #include <assert.h>
bool func0(int x, int y) { return ((x ^ y) < 0); }
int main() { assert(func0(1, -2) == true); assert(func0(3, 2) == false); assert(func0(-10, -10) == false); return 0; }
O1
cpp
func0(int, int): endbr64 xor %esi,%edi mov %edi,%eax shr $0x1f,%eax retq
_Z5func0ii: endbr64 xor edi, esi shr edi, 1Fh mov eax, edi retn
long long func0(unsigned int a1, int a2) { return (a2 ^ a1) >> 31; }
func0: ENDBR64 XOR EDI,ESI SHR EDI,0x1f MOV EAX,EDI RET
/* func0(int, int) */ uint func0(int param_1,int param_2) { return (uint)(param_1 ^ param_2) >> 0x1f; }
230
func0
#include <iostream> #include <assert.h>
bool func0(int x, int y) { return ((x ^ y) < 0); }
int main() { assert(func0(1, -2) == true); assert(func0(3, 2) == false); assert(func0(-10, -10) == false); return 0; }
O2
cpp
func0(int, int): endbr64 xor %esi,%edi mov %edi,%eax shr $0x1f,%eax retq nopl 0x0(%rax)
_Z5func0ii: endbr64 xor edi, esi shr edi, 1Fh mov eax, edi retn
long long func0(unsigned int a1, int a2) { return (a2 ^ a1) >> 31; }
func0: ENDBR64 XOR EDI,ESI SHR EDI,0x1f MOV EAX,EDI RET
/* func0(int, int) */ uint func0(int param_1,int param_2) { return (uint)(param_1 ^ param_2) >> 0x1f; }
231
func0
#include <iostream> #include <assert.h>
bool func0(int x, int y) { return ((x ^ y) < 0); }
int main() { assert(func0(1, -2) == true); assert(func0(3, 2) == false); assert(func0(-10, -10) == false); return 0; }
O3
cpp
func0(int, int): endbr64 xor %esi,%edi mov %edi,%eax shr $0x1f,%eax retq nopl 0x0(%rax)
_Z5func0ii: endbr64 xor edi, esi shr edi, 1Fh mov eax, edi retn
long long func0(unsigned int a1, int a2) { return (a2 ^ a1) >> 31; }
func0: ENDBR64 XOR EDI,ESI SHR EDI,0x1f MOV EAX,EDI RET
/* func0(int, int) */ uint func0(int param_1,int param_2) { return (uint)(param_1 ^ param_2) >> 0x1f; }
232
func0
#include <assert.h>
int func0(int n) { return 3 * n * n - 2 * n; }
int main() { assert(func0(5) == 65); assert(func0(10) == 280); assert(func0(15) == 645); return 0; }
O0
cpp
func0(int): endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x4(%rbp) mov -0x4(%rbp),%eax imul %eax,%eax mov %eax,%edx mov %edx,%eax add %eax,%eax add %eax,%edx mov -0x4(%rbp),%eax add %eax,%eax sub %eax,%edx mov %edx,%eax pop %rbp retq
_Z5func0i: endbr64 push rbp mov rbp, rsp mov [rbp+var_4], edi mov eax, [rbp+var_4] imul eax, eax mov edx, eax mov eax, edx add eax, eax add edx, eax mov eax, [rbp+var_4] add eax, eax sub edx, eax mov eax, edx pop rbp retn
long long func0(int a1) { return (unsigned int)(3 * a1 * a1 - 2 * a1); }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x4],EDI MOV EAX,dword ptr [RBP + -0x4] IMUL EAX,EAX MOV EDX,EAX MOV EAX,EDX ADD EAX,EAX ADD EDX,EAX MOV EAX,dword ptr [RBP + -0x4] ADD EAX,EAX SUB EDX,EAX MOV EAX,EDX POP RBP RET
/* func0(int) */ int func0(int param_1) { return param_1 * param_1 * 3 + param_1 * -2; }
233
func0
#include <assert.h>
int func0(int n) { return 3 * n * n - 2 * n; }
int main() { assert(func0(5) == 65); assert(func0(10) == 280); assert(func0(15) == 645); return 0; }
O1
cpp
func0(int): endbr64 mov %edi,%eax imul %edi,%eax lea (%rax,%rax,2),%eax add %edi,%edi sub %edi,%eax retq
_Z5func0i: endbr64 mov eax, edi imul eax, edi lea eax, [rax+rax*2] add edi, edi sub eax, edi retn
long long func0(int a1) { return (unsigned int)(3 * a1 * a1 - 2 * a1); }
func0: ENDBR64 MOV EAX,EDI IMUL EAX,EDI LEA EAX,[RAX + RAX*0x2] ADD EDI,EDI SUB EAX,EDI RET
/* func0(int) */ int func0(int param_1) { return param_1 * param_1 * 3 + param_1 * -2; }
234
func0
#include <assert.h>
int func0(int n) { return 3 * n * n - 2 * n; }
int main() { assert(func0(5) == 65); assert(func0(10) == 280); assert(func0(15) == 645); return 0; }
O2
cpp
func0(int): endbr64 mov %edi,%eax imul %edi,%eax add %edi,%edi lea (%rax,%rax,2),%eax sub %edi,%eax retq nopw %cs:0x0(%rax,%rax,1) nopl 0x0(%rax,%rax,1)
_Z5func0i: endbr64 mov eax, edi imul eax, edi add edi, edi lea eax, [rax+rax*2] sub eax, edi retn
long long func0(int a1) { return (unsigned int)(3 * a1 * a1 - 2 * a1); }
func0: ENDBR64 MOV EAX,EDI IMUL EAX,EDI ADD EDI,EDI LEA EAX,[RAX + RAX*0x2] SUB EAX,EDI RET
/* func0(int) */ int func0(int param_1) { return param_1 * param_1 * 3 + param_1 * -2; }
235
func0
#include <assert.h>
int func0(int n) { return 3 * n * n - 2 * n; }
int main() { assert(func0(5) == 65); assert(func0(10) == 280); assert(func0(15) == 645); return 0; }
O3
cpp
func0(int): endbr64 mov %edi,%eax imul %edi,%eax add %edi,%edi lea (%rax,%rax,2),%eax sub %edi,%eax retq nopw %cs:0x0(%rax,%rax,1) nopl 0x0(%rax,%rax,1)
_Z5func0i: endbr64 mov eax, edi imul eax, edi add edi, edi lea eax, [rax+rax*2] sub eax, edi retn
long long func0(int a1) { return (unsigned int)(3 * a1 * a1 - 2 * a1); }
func0: ENDBR64 MOV EAX,EDI IMUL EAX,EDI ADD EDI,EDI LEA EAX,[RAX + RAX*0x2] SUB EAX,EDI RET
/* func0(int) */ int func0(int param_1) { return param_1 * param_1 * 3 + param_1 * -2; }
236
func0
#include <iostream> #include <vector> #include <cmath> #include <assert.h>
int func0(std::vector<int> arr, int n) { std::vector<int> mls(n, 1); int max = 0; for (int i = 0; i < n; ++i) { for (int j = 0; j < i; ++j) { if (std::abs(arr[i] - arr[j]) <= 1 && mls[i] < mls[j] + 1) { mls[i] = mls[j] + 1; } } } for ...
int main() { assert(func0({2, 5, 6, 3, 7, 6, 5, 8}, 8) == 5); assert(func0({-2, -1, 5, -1, 4, 0, 3}, 7) == 4); assert(func0({9, 11, 13, 15, 18}, 5) == 1); 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 1806 <_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; // eax int v4; // ebx int v6; // ebx _DWORD *v7; // rax unsigned int v8; // ebx char v10; // [rsp+13h] [rbp-4Dh] BYREF int v11; // [rsp+14h] [rbp-4Ch] BYREF int v12; // [rsp+18h] [rbp-48h] int i; // [rsp+1Ch] [rbp-44h] int j; // [rsp+...
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) { bool bVar1; int iVar2; int *piVar3; int4 in_register_0000003c; long in_FS_OFFSET; allocator local_55; int local_54; int local_50; int local_4c; int local_48; int local_44; allocator *local_40; ve...
237
func0
#include <iostream> #include <vector> #include <cmath> #include <assert.h>
int func0(std::vector<int> arr, int n) { std::vector<int> mls(n, 1); int max = 0; for (int i = 0; i < n; ++i) { for (int j = 0; j < i; ++j) { if (std::abs(arr[i] - arr[j]) <= 1 && mls[i] < mls[j] + 1) { mls[i] = mls[j] + 1; } } } for ...
int main() { assert(func0({2, 5, 6, 3, 7, 6, 5, 8}, 8) == 5); assert(func0({-2, -1, 5, -1, 4, 0, 3}, 7) == 4); assert(func0({9, 11, 13, 15, 18}, 5) == 1); return 0; }
O1
cpp
func0(std::vector<int, std::allocator<int> >, int): endbr64 push %r12 push %rbp push %rbx movslq %esi,%rax movabs $0x1fffffffffffffff,%rdx cmp %rdx,%rax ja 12b1 <_Z5func0St6vectorIiSaIiEEi+0x68> mov %rdi,%rbp mov %esi,%ebx mov $0x0,%r12d test %rax,%rax je 1339 <_Z5func0St6vectorIiSaIiEEi+0xf...
_Z5func0St6vectorIiSaIiEEi: endbr64 push r13 push r12 push rbp push rbx sub rsp, 8 movsxd r12, esi mov rax, r12 shr rax, 3Dh jnz short loc_126C mov rbp, rdi mov ebx, esi mov r13d, 0 test r12, r12 jz loc_12F5 shl r12, 2 mov rdi, r12; unsigned __int64 call __Znw...
long long func0(long long *a1, int a2) { unsigned int v4; // r13d unsigned long long v5; // r12 unsigned int *v6; // rax unsigned int *v7; // r9 unsigned int *v8; // rdx int v9; // r11d long long i; // rsi unsigned long long j; // rdx int v12; // eax int v13; // eax long long v14; // r10 long l...
func0: ENDBR64 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x8 MOVSXD R12,ESI MOV RAX,R12 SHR RAX,0x3d JNZ 0x0010126c MOV RBP,RDI MOV EBX,ESI MOV R13D,0x0 TEST R12,R12 JZ 0x001012f5 SHL R12,0x2 MOV RDI,R12 CALL 0x001010e0 MOV R9,RAX LEA RDX,[RAX + R12*0x1] LAB_0010124a: MOV dword ptr [RAX],0x1 ADD RAX,0x4 CMP RDX,RAX J...
/* func0(std::vector<int, std::allocator<int> >, int) */ int func0(vector param_1,int param_2) { int iVar1; int *piVar2; long extraout_RDX; long lVar3; long lVar4; uint unaff_EBX; long *unaff_RBP; long *plVar5; int4 in_register_00000034; long lVar6; int4 in_register_0000003c; char *pcVar7; i...
238
func0
#include <iostream> #include <vector> #include <cmath> #include <assert.h>
int func0(std::vector<int> arr, int n) { std::vector<int> mls(n, 1); int max = 0; for (int i = 0; i < n; ++i) { for (int j = 0; j < i; ++j) { if (std::abs(arr[i] - arr[j]) <= 1 && mls[i] < mls[j] + 1) { mls[i] = mls[j] + 1; } } } for ...
int main() { assert(func0({2, 5, 6, 3, 7, 6, 5, 8}, 8) == 5); assert(func0({-2, -1, 5, -1, 4, 0, 3}, 7) == 4); assert(func0({9, 11, 13, 15, 18}, 5) == 1); return 0; }
O2
cpp
func0(std::vector<int, std::allocator<int> >, int): endbr64 movabs $0x1fffffffffffffff,%rdx movslq %esi,%rax push %r12 push %rbp push %rbx cmp %rdx,%rax ja 15bf <_Z5func0St6vectorIiSaIiEEi+0x10f> xor %r12d,%r12d test %rax,%rax je 15aa <_Z5func0St6vectorIiSaIiEEi+0xfa> lea 0x0(,%rax,4),%r12 mov ...
_Z5func0St6vectorIiSaIiEEi: endbr64 push r14 push r13 push r12 movsxd r12, esi mov rax, r12 push rbp shr rax, 3Dh push rbx jnz loc_1528 xor r14d, r14d test r12, r12 jz loc_1507 mov rbp, r12 shl r12, 2 mov rbx, rdi mov rdi, r12; unsigned __int64 call __Znwm; ope...
long long func0(long long *a1, int a2) { int v2; // r14d unsigned long long v4; // r12 int *v6; // rax int *v7; // r8 int *v8; // r13 int v9; // r11d long long v10; // r10 long long v11; // rdi long long v12; // rsi unsigned long long v13; // rdx _DWORD *v14; // r9 int v15; // eax int v16; //...
func0: ENDBR64 PUSH R14 PUSH R13 PUSH R12 MOVSXD R12,ESI MOV RAX,R12 PUSH RBP SHR RAX,0x3d PUSH RBX JNZ 0x00101528 XOR R14D,R14D TEST R12,R12 JZ 0x00101507 MOV RBP,R12 SHL R12,0x2 MOV RBX,RDI MOV RDI,R12 CALL 0x001010e0 MOV R8,RAX LEA R13,[RAX + R12*0x1] TEST R12B,0x4 JZ 0x00101450 MOV dword ptr [RAX],0x1 LEA RAX,[RAX ...
/* func0(std::vector<int, std::allocator<int> >, int) */ void * func0(vector param_1,int param_2) { uint *puVar1; long lVar2; void *pvVar3; int iVar4; uint *puVar5; uint *puVar6; void *extraout_RAX; long lVar7; int4 in_register_0000003c; char *pcVar8; long lVar9; long lVar10; int iVar11; u...
239
func0
#include <iostream> #include <vector> #include <cmath> #include <assert.h>
int func0(std::vector<int> arr, int n) { std::vector<int> mls(n, 1); int max = 0; for (int i = 0; i < n; ++i) { for (int j = 0; j < i; ++j) { if (std::abs(arr[i] - arr[j]) <= 1 && mls[i] < mls[j] + 1) { mls[i] = mls[j] + 1; } } } for ...
int main() { assert(func0({2, 5, 6, 3, 7, 6, 5, 8}, 8) == 5); assert(func0({-2, -1, 5, -1, 4, 0, 3}, 7) == 4); assert(func0({9, 11, 13, 15, 18}, 5) == 1); return 0; }
O3
cpp
func0(std::vector<int, std::allocator<int> >, int): endbr64 movabs $0x1fffffffffffffff,%rax push %r13 movslq %esi,%r13 push %r12 push %rbp push %rbx sub $0x8,%rsp cmp %rax,%r13 ja 1687 <_Z5func0St6vectorIiSaIiEEi+0x217> xor %r12d,%r12d test %r13,%r13 je 1665 <_Z5func0St6vectorIiSaIiEEi+0x1f5>...
_Z5func0St6vectorIiSaIiEEi: endbr64 push r13 push r12 movsxd r12, esi push rbp mov rax, r12 push rbx sub rsp, 8 shr rax, 3Dh jnz loc_160E xor ebx, ebx test r12, r12 jz loc_15E9 mov rbp, r12 shl r12, 2 mov r13, rdi mov rdi, r12; unsigned __int64 call __Znwm; op...
long long func0(long long *a1, signed int a2) { int v2; // ebx unsigned long long v4; // r12 __m128i *v6; // rax __m128i *v7; // rdi char *v8; // r8 unsigned long long v9; // rdx __m128i si128; // xmm0 long long v11; // rcx __m128i *v12; // rsi long long v13; // r9 long long v14; // rdx _DWORD ...
func0: ENDBR64 PUSH R13 PUSH R12 MOVSXD R12,ESI PUSH RBP MOV RAX,R12 PUSH RBX SUB RSP,0x8 SHR RAX,0x3d JNZ 0x0010160e XOR EBX,EBX TEST R12,R12 JZ 0x001015e9 MOV RBP,R12 SHL R12,0x2 MOV R13,RDI MOV RDI,R12 CALL 0x001010e0 MOV RDI,RAX LEA R8,[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) { void *pvVar1; uint uVar2; uint *puVar3; uint *puVar4; uint *puVar5; int8 uVar6; int8 uVar7; int iVar8; uint uVar9; ...
240
func0
#include <iostream> #include <unordered_map> #include <cassert>
int func0(const std::string& s, int n) { int count = 0, sum = 0; std::unordered_map<int, int> mp; mp[0] = 1; for (int i = 0; i < n; ++i) { sum += s[i] - '0'; count += mp[sum - (i + 1)]; mp[sum - (i + 1)] += 1; } return count; }
int main() { assert(func0("112112", 6) == 6); assert(func0("111", 3) == 6); assert(func0("1101112", 7) == 12); std::cout << "All test cases passed." << std::endl; return 0; }
O0
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x68,%rsp mov %rdi,-0x68(%rbp) mov %esi,-0x6c(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax movl $0x0,-0x5c(%rbp) movl $0x0,-0x58(%...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 68h mov [rbp+var_68], rdi mov [rbp+var_6C], esi mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax mov [rbp+var_5C], 0 mov [rbp+var_58], 0 lea rax, [rbp+var_50] ...
long long func0(long long a1, int a2) { char *v2; // rax _DWORD *v3; // rax _DWORD *v4; // rax unsigned int v5; // ebx int v7; // [rsp+10h] [rbp-60h] BYREF unsigned int v8; // [rsp+14h] [rbp-5Ch] int v9; // [rsp+18h] [rbp-58h] int i; // [rsp+1Ch] [rbp-54h] _BYTE v11[56]; // [rsp+20h] [rbp-50h] BYREF ...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x68 MOV qword ptr [RBP + -0x68],RDI MOV dword ptr [RBP + -0x6c],ESI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX MOV dword ptr [RBP + -0x5c],0x0 MOV dword ptr [RBP + -0x58],0x0 LEA RAX,[RBP + -0x50] MOV RDI,RAX CALL 0x00102ae6 MOV dword pt...
/* func0(std::string const&, int) */ int func0(string *param_1,int param_2) { int iVar1; int4 *puVar2; char *pcVar3; int *piVar4; long in_FS_OFFSET; int local_68; int local_64; int local_60; int local_5c; unordered_map<int,int,std::hash<int>,std::equal_to<int>,std::allocator<std::pair<int_const,in...
241
func0
#include <iostream> #include <unordered_map> #include <cassert>
int func0(const std::string& s, int n) { int count = 0, sum = 0; std::unordered_map<int, int> mp; mp[0] = 1; for (int i = 0; i < n; ++i) { sum += s[i] - '0'; count += mp[sum - (i + 1)]; mp[sum - (i + 1)] += 1; } return count; }
int main() { assert(func0("112112", 6) == 6); assert(func0("111", 3) == 6); assert(func0("1101112", 7) == 12); std::cout << "All test cases passed." << std::endl; return 0; }
O1
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int): endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x68,%rsp mov %rdi,%r15 mov %esi,%ebx mov %fs:0x28,%rax mov %rax,0x58(%rsp) xor %eax,%eax lea 0x20(%rsp),%rdi lea ...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 68h mov r15, rdi mov ebx, esi mov rax, fs:28h mov [rsp+98h+var_40], rax xor eax, eax lea rdi, [rsp+98h+var_78] lea rax, [rsp+98h+var_4...
long long func0(_QWORD *a1, int a2) { long long v2; // rbx int v3; // ebp unsigned int v4; // r13d _DWORD *v5; // rax _DWORD *v6; // rax int v8; // [rsp+1Ch] [rbp-7Ch] BYREF _QWORD v9[4]; // [rsp+20h] [rbp-78h] BYREF int v10; // [rsp+40h] [rbp-58h] long long v11; // [rsp+48h] [rbp-50h] _QWORD v12[9...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x68 MOV R15,RDI MOV EBX,ESI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x58],RAX XOR EAX,EAX LEA RDI,[RSP + 0x20] LEA RAX,[RSP + 0x50] MOV qword ptr [RSP + 0x20],RAX MOV qword ptr [RSP + 0x28],0x1 MOV qword ptr [RSP + 0x30],0x0 MOV qwor...
/* func0(std::string const&, int) */ int func0(string *param_1,int param_2) { int4 *puVar1; int *piVar2; long lVar3; int iVar4; int iVar5; int iVar6; long in_FS_OFFSET; int local_7c; int8 *local_78; int8 local_70; int8 local_68; int8 local_60; int4 local_58; int8 local_50; int8 local_48;...
242
func0
#include <iostream> #include <unordered_map> #include <cassert>
int func0(const std::string& s, int n) { int count = 0, sum = 0; std::unordered_map<int, int> mp; mp[0] = 1; for (int i = 0; i < n; ++i) { sum += s[i] - '0'; count += mp[sum - (i + 1)]; mp[sum - (i + 1)] += 1; } return count; }
int main() { assert(func0("112112", 6) == 6); assert(func0("111", 3) == 6); assert(func0("1101112", 7) == 12); std::cout << "All test cases passed." << std::endl; return 0; }
O2
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int): endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx mov %esi,%ebx sub $0x68,%rsp mov %rdi,(%rsp) lea 0x20(%rsp),%r13 lea 0x1c(%rsp),%r14 mov %r14,%rsi mov %r13,%rdi mov ...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi: endbr64 push r15 mov r15, rdi push r14 push r13 push r12 push rbp push rbx mov ebx, esi sub rsp, 68h mov rax, fs:28h mov [rsp+98h+var_40], rax xor eax, eax lea rax, [rsp+98h+var_48] lea r13, [rsp+98h+var_7...
long long func0(_QWORD *a1, int a2) { int v2; // ebp long long v3; // rbx unsigned int v4; // r14d _DWORD *v5; // rax int v7; // [rsp+1Ch] [rbp-7Ch] BYREF _QWORD v8[4]; // [rsp+20h] [rbp-78h] BYREF int v9; // [rsp+40h] [rbp-58h] long long v10; // [rsp+48h] [rbp-50h] _QWORD v11[9]; // [rsp+50h] [rbp-4...
func0: ENDBR64 PUSH R15 MOV R15,RDI PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX MOV EBX,ESI SUB RSP,0x68 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x58],RAX XOR EAX,EAX LEA RAX,[RSP + 0x50] LEA R13,[RSP + 0x20] MOV qword ptr [RSP + 0x28],0x1 MOV qword ptr [RSP + 0x20],RAX LEA RAX,[RSP + 0x1c] MOV RDI,R13 MOV RS...
/* func0(std::string const&, int) */ int func0(string *param_1,int param_2) { int4 *puVar1; int *piVar2; long lVar3; int iVar4; int iVar5; int iVar6; long in_FS_OFFSET; int local_7c; int8 *local_78; int8 local_70; int8 local_68; int8 local_60; int4 local_58; int8 local_50; int8 local_48;...
243
func0
#include <iostream> #include <unordered_map> #include <cassert>
int func0(const std::string& s, int n) { int count = 0, sum = 0; std::unordered_map<int, int> mp; mp[0] = 1; for (int i = 0; i < n; ++i) { sum += s[i] - '0'; count += mp[sum - (i + 1)]; mp[sum - (i + 1)] += 1; } return count; }
int main() { assert(func0("112112", 6) == 6); assert(func0("111", 3) == 6); assert(func0("1101112", 7) == 12); std::cout << "All test cases passed." << std::endl; return 0; }
O3
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int): endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx mov %esi,%ebx sub $0x78,%rsp mov %rdi,0x8(%rsp) lea 0x30(%rsp),%r14 lea 0x2c(%rsp),%r13 mov %r13,%rsi mov %r14,%rdi mov...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi: endbr64 push r15 mov r15, rdi push r14 push r13 push r12 push rbp push rbx mov ebx, esi sub rsp, 98h mov rax, fs:28h mov [rsp+0C8h+var_40], rax xor eax, eax lea rax, [rsp+0C8h+var_48] lea rdi, [rsp+0C8h+s]...
long long func0(_QWORD *a1, int a2) { long long v2; // r12 int v3; // r13d unsigned int v4; // r14d int v5; // ebp unsigned long long v6; // r9 long long **v7; // r8 long long *v8; // rax int v9; // ecx _DWORD *v10; // rbx _QWORD *v11; // rbx void *v12; // rdi long long v14; // rax _QWORD *v1...
func0: ENDBR64 PUSH R15 MOV R15,RDI PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX MOV EBX,ESI SUB RSP,0x98 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x88],RAX XOR EAX,EAX LEA RAX,[RSP + 0x80] LEA RDI,[RSP + 0x50] MOV qword ptr [RSP + 0x58],0x1 MOV qword ptr [RSP + 0x38],RAX MOV qword ptr [RSP + 0x50],RAX LEA RAX,...
/* func0(std::string const&, int) */ int func0(string *param_1,int param_2) { int iVar1; int8 *puVar2; int8 *puVar3; char cVar4; int4 *puVar5; int *piVar6; int8 *puVar7; long *plVar8; ulong uVar9; ulong extraout_RDX; int iVar10; long lVar11; int iVar12; int iVar13; long in_FS_OFFSET; u...
244
func0
#include <vector> #include <algorithm> // for std::min_element #include <cassert>
int func0(const std::vector<int>& xs) { return *std::min_element(xs.begin(), xs.end()); }
int main() { assert(func0({10, 20, 1, 45, 99}) == 1); assert(func0({1, 2, 3}) == 1); assert(func0({45, 46, 50, 60}) == 45); return 0; }
O0
cpp
func0(std::vector<int, std::allocator<int> > const&): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x28,%rsp mov %rdi,-0x28(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax mov -0x28(%rbp),%rax mov %rax,%rdi callq 1612 <_ZNKSt6vectorIiSaIiEE3endEv> mov %rax,%rbx mov -0x28(...
_Z5func0RKSt6vectorIiSaIiEE: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 28h mov [rbp+var_28], rdi mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax mov rax, [rbp+var_28] mov rdi, rax call _ZNKSt6vectorIiSaIiEE3endEv; std::vector<int>::end(void) mov rbx, rax mov rax...
long long func0(long long a1) { long long v1; // rbx long long v2; // rax _QWORD v4[3]; // [rsp+10h] [rbp-20h] BYREF v4[1] = __readfsqword(0x28u); v1 = std::vector<int>::end(a1); v2 = std::vector<int>::begin(a1); v4[0] = std::min_element<__gnu_cxx::__normal_iterator<int const*,std::vector<int>>>(v2, v1)...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x28 MOV qword ptr [RBP + -0x28],RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX MOV RAX,qword ptr [RBP + -0x28] MOV RDI,RAX CALL 0x00101654 MOV RBX,RAX MOV RAX,qword ptr [RBP + -0x28] MOV RDI,RAX CALL 0x00101608 MOV RSI,RBX MOV RDI,RAX CA...
/* func0(std::vector<int, std::allocator<int> > const&) */ int4 func0(vector *param_1) { __normal_iterator _Var1; __normal_iterator _Var2; int4 extraout_var; int4 *puVar3; long in_FS_OFFSET; int8 local_28; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); _Var1 = std::vector<int,std::allo...
245
func0
#include <vector> #include <algorithm> // for std::min_element #include <cassert>
int func0(const std::vector<int>& xs) { return *std::min_element(xs.begin(), xs.end()); }
int main() { assert(func0({10, 20, 1, 45, 99}) == 1); assert(func0({1, 2, 3}) == 1); assert(func0({45, 46, 50, 60}) == 45); return 0; }
O1
cpp
func0(std::vector<int, std::allocator<int> > const&): endbr64 mov 0x8(%rdi),%rcx mov (%rdi),%rdx cmp %rcx,%rdx je 1236 <_Z5func0RKSt6vectorIiSaIiEE+0x2d> lea 0x4(%rdx),%rax cmp %rax,%rcx je 1233 <_Z5func0RKSt6vectorIiSaIiEE+0x2a> mov (%rdx),%esi cmp %esi,(%rax) cmovl %rax,%rdx add $0x4,...
_Z5func0RKSt6vectorIiSaIiEE: endbr64 mov rcx, [rdi+8] mov rdx, [rdi] cmp rdx, rcx jz short loc_1236 lea rax, [rdx+4] cmp rcx, rax jz short loc_1233 loc_1222: mov esi, [rdx] cmp [rax], esi cmovl rdx, rax add rax, 4 cmp rax, rcx jnz short loc_1222 loc_1233: mov eax,...
long long func0(unsigned int **a1) { unsigned int *v1; // rcx unsigned int *v2; // rdx unsigned int *i; // rax v1 = a1[1]; v2 = *a1; if ( *a1 == v1 ) { v2 = a1[1]; } else { for ( i = v2 + 1; i != v1; ++i ) { if ( (int)*i < (int)*v2 ) v2 = i; } } return *v2; }
func0: ENDBR64 MOV RCX,qword ptr [RDI + 0x8] MOV RDX,qword ptr [RDI] CMP RDX,RCX JZ 0x00101236 LEA RAX,[RDX + 0x4] CMP RCX,RAX JZ 0x00101233 LAB_00101222: MOV ESI,dword ptr [RDX] CMP dword ptr [RAX],ESI CMOVL RDX,RAX ADD RAX,0x4 CMP RAX,RCX JNZ 0x00101222 LAB_00101233: MOV EAX,dword ptr [RDX] RET LAB_00101236: MOV RDX,...
/* func0(std::vector<int, std::allocator<int> > const&) */ int func0(vector *param_1) { int *piVar1; int *piVar2; int *piVar3; int *piVar4; piVar1 = *(int **)(param_1 + 8); piVar2 = *(int **)param_1; piVar4 = piVar1; piVar3 = piVar2; if (piVar2 != piVar1) { while (piVar2 = piVar2 + 1, piVar4 ...
246
func0
#include <vector> #include <algorithm> // for std::min_element #include <cassert>
int func0(const std::vector<int>& xs) { return *std::min_element(xs.begin(), xs.end()); }
int main() { assert(func0({10, 20, 1, 45, 99}) == 1); assert(func0({1, 2, 3}) == 1); assert(func0({45, 46, 50, 60}) == 45); return 0; }
O2
cpp
func0(std::vector<int, std::allocator<int> > const&): endbr64 mov (%rdi),%rax mov 0x8(%rdi),%rcx mov (%rax),%r8d cmp %rax,%rcx jne 1481 <_Z5func0RKSt6vectorIiSaIiEE+0x21> jmp 148a <_Z5func0RKSt6vectorIiSaIiEE+0x2a> nopl (%rax) mov (%rax),%edx cmp %edx,%r8d cmovg %edx,%r8d add $0x4,%rax cmp...
_Z5func0RKSt6vectorIiSaIiEE: endbr64 mov rsi, [rdi+8] mov rcx, [rdi] cmp rcx, rsi jz short loc_13D0 lea rdx, [rcx+4] mov eax, [rcx] cmp rsi, rdx jz short locret_13D2 mov rdi, rsi sub rdi, rdx and edi, 4 jz short loc_13B0 mov edx, [rdx] cmp eax, edx cmovg eax,...
long long func0(unsigned int **a1) { unsigned int *v1; // rsi unsigned int *v2; // rcx int *v3; // rdx long long result; // rax int v5; // edx int v6; // ecx v1 = a1[1]; v2 = *a1; if ( *a1 == v1 ) return *v2; v3 = (int *)(v2 + 1); result = *v2; if ( v1 != v2 + 1 ) { if ( (((_BYTE)v1 ...
func0: ENDBR64 MOV RSI,qword ptr [RDI + 0x8] MOV RCX,qword ptr [RDI] CMP RCX,RSI JZ 0x001013d0 LEA RDX,[RCX + 0x4] MOV EAX,dword ptr [RCX] CMP RSI,RDX JZ 0x001013d2 MOV RDI,RSI SUB RDI,RDX AND EDI,0x4 JZ 0x001013b0 MOV EDX,dword ptr [RDX] CMP EAX,EDX CMOVG EAX,EDX LEA RDX,[RCX + 0x8] CMP RSI,RDX JZ 0x001013d3 NOP word ...
/* func0(std::vector<int, std::allocator<int> > const&) */ int func0(vector *param_1) { int *piVar1; int *piVar2; int iVar3; int *piVar4; piVar1 = *(int **)(param_1 + 8); piVar2 = *(int **)param_1; if (piVar2 == piVar1) { iVar3 = *piVar2; } else { piVar4 = piVar2 + 1; iVar3 = *piVar2;...
247
func0
#include <vector> #include <algorithm> // for std::min_element #include <cassert>
int func0(const std::vector<int>& xs) { return *std::min_element(xs.begin(), xs.end()); }
int main() { assert(func0({10, 20, 1, 45, 99}) == 1); assert(func0({1, 2, 3}) == 1); assert(func0({45, 46, 50, 60}) == 45); return 0; }
O3
cpp
func0(std::vector<int, std::allocator<int> > const&): endbr64 mov (%rdi),%rdx mov 0x8(%rdi),%rsi mov (%rdx),%eax cmp %rdx,%rsi je 1540 <_Z5func0RKSt6vectorIiSaIiEE+0x100> lea 0x4(%rdx),%rcx cmp %rcx,%rsi je 1540 <_Z5func0RKSt6vectorIiSaIiEE+0x100> lea -0x8(%rsi),%r8 sub %rdx,%r8 mov %...
_Z5func0RKSt6vectorIiSaIiEE: endbr64 mov rsi, [rdi+8] mov rdx, [rdi] cmp rdx, rsi jz loc_1510 lea rcx, [rdx+4] mov eax, [rdx] cmp rsi, rcx jz locret_1512 lea r8, [rsi-8] sub r8, rdx mov rdi, r8 shr rdi, 2 add rdi, 1 cmp r8, 8 jbe loc_14E1 movd xmm4, eax m...
long long func0(unsigned int **a1) { unsigned int *v1; // rsi unsigned int *v2; // rdx int *v3; // rcx long long result; // rax unsigned long long v5; // rdi __m128i v6; // xmm0 unsigned int *v7; // rax __m128i v8; // xmm1 __m128i v9; // xmm3 __m128i v10; // xmm1 __m128i v11; // xmm2 __m128i v1...
func0: ENDBR64 MOV RSI,qword ptr [RDI + 0x8] MOV RDX,qword ptr [RDI] CMP RDX,RSI JZ 0x00101510 LEA RCX,[RDX + 0x4] MOV EAX,dword ptr [RDX] CMP RSI,RCX JZ 0x00101512 LEA R8,[RSI + -0x8] SUB R8,RDX MOV RDI,R8 SHR RDI,0x2 ADD RDI,0x1 CMP R8,0x8 JBE 0x001014e1 MOVD XMM4,EAX MOV RAX,RDI SHR RAX,0x2 PSHUFD XMM0,XMM4,0x0 SHL ...
/* func0(std::vector<int, std::allocator<int> > const&) */ uint func0(vector *param_1) { uint *puVar1; uint *puVar2; uint *puVar3; uint *puVar4; uint *puVar5; uint *puVar6; uint *puVar7; uint *puVar8; uint *puVar9; uint uVar10; uint *puVar11; uint *puVar12; uint *puVar13; ulong uVar14; u...
248
func0
#include <iostream> #include <vector> #include <cmath> #include <algorithm> #include <assert.h>
int func0(const std::vector<std::pair<int, int>>& test_list) { std::vector<int> temp; for (const auto& p : test_list) { temp.push_back(abs(p.second - p.first)); } int res = *max_element(temp.begin(), temp.end()); return res; }
int main() { assert(func0({ {3, 5}, {1, 7}, {10, 3}, {1, 2} }) == 7); assert(func0({ {4, 6}, {2, 17}, {9, 13}, {11, 12} }) == 15); assert(func0({ {12, 35}, {21, 27}, {13, 23}, {41, 22} }) == 23); return 0; }
O0
cpp
func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x68,%rsp mov %rdi,-0x68(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax lea -0x30(%rbp),%rax mov %rax,%rdi callq 1858 <_ZNSt6vectorIiSaIiEEC1Ev> ...
_Z5func0RKSt6vectorISt4pairIiiESaIS1_EE: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 68h mov [rbp+var_68], rdi mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax lea rax, [rbp+var_30] mov rdi, rax call _ZNSt6vectorIiSaIiEEC2Ev; std::vector<int>::vector(void) mov rax, [rb...
long long func0(long long a1) { int v1; // eax long long v2; // rbx long long v3; // rax int v5; // [rsp+18h] [rbp-58h] BYREF int v6; // [rsp+1Ch] [rbp-54h] long long v7; // [rsp+20h] [rbp-50h] BYREF _QWORD v8[2]; // [rsp+28h] [rbp-48h] BYREF _DWORD *v9; // [rsp+38h] [rbp-38h] _BYTE v10[24]; // [rsp+...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x68 MOV qword ptr [RBP + -0x68],RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX LEA RAX,[RBP + -0x30] MOV RDI,RAX CALL 0x001017c4 MOV RAX,qword ptr [RBP + -0x68] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x40] MOV RDI,RAX ...
/* func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&) */ int4 func0(vector *param_1) { int4 uVar1; bool bVar2; int8 uVar3; int8 uVar4; int4 *puVar5; long in_FS_OFFSET; int local_60; int4 local_5c; int8 local_58; int8 local_50; vector<std::pair<int,int>,std::all...
249
func0
#include <iostream> #include <vector> #include <cmath> #include <algorithm> #include <assert.h>
int func0(const std::vector<std::pair<int, int>>& test_list) { std::vector<int> temp; for (const auto& p : test_list) { temp.push_back(abs(p.second - p.first)); } int res = *max_element(temp.begin(), temp.end()); return res; }
int main() { assert(func0({ {3, 5}, {1, 7}, {10, 3}, {1, 2} }) == 7); assert(func0({ {4, 6}, {2, 17}, {9, 13}, {11, 12} }) == 15); assert(func0({ {12, 35}, {21, 27}, {13, 23}, {41, 22} }) == 23); return 0; }
O1
cpp
func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&): endbr64 push %r12 push %rbp push %rbx sub $0x30,%rsp mov %fs:0x28,%rax mov %rax,0x28(%rsp) xor %eax,%eax movq $0x0,0x10(%rsp) movq $0x0,0x18(%rsp) movq $0x0,0x20(%rsp) mov (%rdi),%rbx mov 0x8(%rdi),%rbp ...
_Z5func0RKSt6vectorISt4pairIiiESaIS1_EE: endbr64 push r12 push rbp push rbx sub rsp, 30h mov rax, fs:28h mov [rsp+48h+var_20], rax xor eax, eax mov [rsp+48h+var_38], 0 mov [rsp+48h+var_30], 0 mov [rsp+48h+var_28], 0 mov rbx, [rdi] mov rbp, [rdi+8] cmp rbx, rbp jz lo...
long long func0(long long a1) { _DWORD *v1; // rbx _DWORD *v2; // rbp int v3; // eax int *v4; // rsi int *v5; // rdx void *v6; // rdi int *v7; // rax unsigned int v8; // ebx int v10; // [rsp+Ch] [rbp-3Ch] BYREF void *v11; // [rsp+10h] [rbp-38h] BYREF int *v12; // [rsp+18h] [rbp-30h] int *v13; /...
func0: ENDBR64 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x30 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x28],RAX XOR EAX,EAX MOV qword ptr [RSP + 0x10],0x0 MOV qword ptr [RSP + 0x18],0x0 MOV qword ptr [RSP + 0x20],0x0 MOV RBX,qword ptr [RDI] MOV RBP,qword ptr [RDI + 0x8] CMP RBX,RBP JZ 0x00101359 LEA R12,[RSP + 0xc] J...
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&) */ int func0(vector *param_1) { int *piVar1; int *piVar2; int iVar3; int *piVar4; int *piVar5; long in_FS_OFFSET; int local_3c; ...
250
func0
#include <iostream> #include <vector> #include <cmath> #include <algorithm> #include <assert.h>
int func0(const std::vector<std::pair<int, int>>& test_list) { std::vector<int> temp; for (const auto& p : test_list) { temp.push_back(abs(p.second - p.first)); } int res = *max_element(temp.begin(), temp.end()); return res; }
int main() { assert(func0({ {3, 5}, {1, 7}, {10, 3}, {1, 2} }) == 7); assert(func0({ {4, 6}, {2, 17}, {9, 13}, {11, 12} }) == 15); assert(func0({ {12, 35}, {21, 27}, {13, 23}, {41, 22} }) == 23); return 0; }
O2
cpp
func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&): endbr64 push %r12 push %rbp push %rbx sub $0x30,%rsp mov (%rdi),%rbx mov 0x8(%rdi),%rbp mov %fs:0x28,%rax mov %rax,0x28(%rsp) xor %eax,%eax movq $0x0,0x10(%rsp) movq $0x0,0x18(%rsp) movq $0x0,0x20(%rsp) ...
_Z5func0RKSt6vectorISt4pairIiiESaIS1_EE: endbr64 push r12 pxor xmm0, xmm0 push rbp push rbx sub rsp, 30h mov rbx, [rdi] mov rbp, [rdi+8] mov rax, fs:28h mov [rsp+48h+var_20], rax xor eax, eax movaps xmmword ptr [rsp+48h+var_38], xmm0 mov [rsp+48h+var_28], 0 cmp rbx, rbp jz ...
long long func0(long long a1) { _DWORD *v1; // rbx _DWORD *v2; // rbp int *v3; // rcx int *v4; // rsi int v5; // eax int *v6; // rax int v7; // ebx int v8; // eax int v10; // [rsp+4h] [rbp-3Ch] BYREF void *v11[2]; // [rsp+8h] [rbp-38h] BYREF int *v12; // [rsp+18h] [rbp-28h] unsigned long long v...
func0: MOV RDI,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x20] SUB RSI,RDI TEST RDI,RDI JZ 0x00101157 CALL 0x00101100 LAB_00101157: MOV RAX,qword ptr [RSP + 0x28] SUB RAX,qword ptr FS:[0x28] JNZ 0x0010116f MOV RDI,RBX LAB_0010116a: CALL 0x00101130 LAB_0010116f: CALL 0x00101110
/* func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&) [clone .cold] */ void func0(vector *param_1,int param_2,int param_3,int param_4,int param_5, int param_6,int param_7,void *param_8,int param_9,long param_10, long param_11) { long in_FS_OFFSET; if (p...
251
func0
#include <iostream> #include <vector> #include <cmath> #include <algorithm> #include <assert.h>
int func0(const std::vector<std::pair<int, int>>& test_list) { std::vector<int> temp; for (const auto& p : test_list) { temp.push_back(abs(p.second - p.first)); } int res = *max_element(temp.begin(), temp.end()); return res; }
int main() { assert(func0({ {3, 5}, {1, 7}, {10, 3}, {1, 2} }) == 7); assert(func0({ {4, 6}, {2, 17}, {9, 13}, {11, 12} }) == 15); assert(func0({ {12, 35}, {21, 27}, {13, 23}, {41, 22} }) == 23); return 0; }
O3
cpp
func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&): endbr64 push %r12 pxor %xmm0,%xmm0 push %rbp push %rbx sub $0x30,%rsp mov (%rdi),%rbx mov 0x8(%rdi),%rbp mov %fs:0x28,%rax mov %rax,0x28(%rsp) xor %eax,%eax movaps %xmm0,0x10(%rsp) movq $0x0,0x20(%rsp) cmp...
_Z5func0RKSt6vectorISt4pairIiiESaIS1_EE: endbr64 push r12 pxor xmm0, xmm0 push rbp push rbx sub rsp, 30h mov rbx, [rdi] mov rbp, [rdi+8] mov rax, fs:28h mov [rsp+48h+var_20], rax xor eax, eax movaps xmmword ptr [rsp+48h+var_38], xmm0 mov [rsp+48h+var_28], 0 cmp rbx, rbp jz ...
long long func0(long long a1) { _DWORD *v1; // rbx _DWORD *v2; // rbp int *v3; // rsi int *v4; // rdi int v5; // eax signed int *v6; // r9 signed int v7; // ebx char *v8; // rax unsigned long long v9; // rcx __m128i v10; // xmm2 __m128i v11; // xmm0 __m128i v12; // xmm1 __m128i v13; // xmm1 ...
func0: MOV RDI,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x20] SUB RSI,RDI TEST RDI,RDI JZ 0x00101157 CALL 0x00101100 LAB_00101157: MOV RAX,qword ptr [RSP + 0x28] SUB RAX,qword ptr FS:[0x28] JNZ 0x0010116f MOV RDI,RBX LAB_0010116a: CALL 0x00101130 LAB_0010116f: CALL 0x00101110
/* func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&) [clone .cold] */ void func0(vector *param_1,int param_2,int param_3,int param_4,int param_5, int param_6,int param_7,void *param_8,int param_9,long param_10, long param_11) { long in_FS_OFFSET; if (p...
252
func0
#include <iostream> #include <vector> #include <string> #include <algorithm> #include <cassert> using namespace std;
vector<pair<string, int>> func0(vector<pair<string, int>> subjectmarks) { sort(subjectmarks.begin(), subjectmarks.end(), [](const pair<string, int>& a, const pair<string, int>& b) { return a.second < b.second; }); return subjectmarks; }
int main() { // Test case 1 vector<pair<string, int>> test1 = {{"English", 88}, {"Science", 90}, {"Maths", 97}, {"Social sciences", 82}}; vector<pair<string, int>> expected1 = {{"Social sciences", 82}, {"English", 88}, {"Science", 90}, {"Maths", 97}}; assert(func0(test1) == expected1); // Tes...
O0
cpp
func0(std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int> > >)::{lambda(std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocato...
_ZZ5func0St6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiESaIS7_EEENKUlRKS7_SB_E_clESB_SB_: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_10] mov edx, [rax+20h] mov rax, [rbp+var_18] mov eax, [rax+20h] c...
bool func0(std::vector<std::pair<std::string,int>>)::{lambda(std::pair<std::string,int> const&,std::pair<std::string,int> const&)#1}::operator()( long long a1, long long a2, long long a3) { return *(_DWORD *)(a2 + 32) < *(_DWORD *)(a3 + 32); }
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x18 MOV qword ptr [RBP + -0x18],RDI MOV qword ptr [RBP + -0x20],RSI MOV RAX,qword ptr [RBP + -0x20] MOV RDI,RAX CALL 0x00104bf0 MOV RBX,RAX MOV RAX,qword ptr [RBP + -0x20] MOV RDI,RAX CALL 0x00104ba4 MOV RSI,RBX MOV RDI,RAX CALL 0x00103389 MOV RDX,qword ptr [RBP + -...
/* func0(std::vector<std::pair<std::string, int>, std::allocator<std::pair<std::string, int> > >) */ vector<std::pair<std::string,int>,std::allocator<std::pair<std::string,int>>> * func0(vector param_1) { __normal_iterator _Var1; __normal_iterator _Var2; _lambda_std__pair<std::string,int>_const__std__pair<std::...
253
func0
#include <iostream> #include <vector> #include <string> #include <algorithm> #include <cassert> using namespace std;
vector<pair<string, int>> func0(vector<pair<string, int>> subjectmarks) { sort(subjectmarks.begin(), subjectmarks.end(), [](const pair<string, int>& a, const pair<string, int>& b) { return a.second < b.second; }); return subjectmarks; }
int main() { // Test case 1 vector<pair<string, int>> test1 = {{"English", 88}, {"Science", 90}, {"Maths", 97}, {"Social sciences", 82}}; vector<pair<string, int>> expected1 = {{"Social sciences", 82}, {"English", 88}, {"Science", 90}, {"Maths", 97}}; assert(func0(test1) == expected1); // Tes...
O1
cpp
void std::__adjust_heap<__gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int>*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int>, std::allocator<std::pair<std::__cxx11::basic_string<char, st...
_ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIPSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiESt6vectorIS9_SaIS9_EEEElS9_NS0_5__ops15_Iter_comp_iterIZ5func0SD_EUlRKS9_SI_E_EEEvT_T0_SM_T1_T2_: push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 38h mov r9, rsi mov...
unsigned long long std::__adjust_heap<__gnu_cxx::__normal_iterator<std::pair<std::string,int> *,std::vector<std::pair<std::string,int>>>,long,std::pair<std::string,int>,__gnu_cxx::__ops::_Iter_comp_iter<func0(std::vector<std::pair<std::string,int>>)::{lambda(std::pair<std::string,int> const&,std::pair<std::string,int>...
__adjust_heap<__normal_iterator<std::pair<std::string,int>*,std::vector<std::pair<std::string,int>,std::allocator<std::pair<std::string,int>>>>,long,std::pair<std::string,int>,__ops::_Iter_comp_iter<func0(std::vector<std::pair<std::string,int>,std::allocator<std::pair<std::string,int>>>)::{lambda(std::pair<std::string,...
/* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* void std::__adjust_heap<__normal_iterator<std::pair<std::string, int>*, std::vector<std::pair<std::string, int>, std::allocator<std::pair<std::string, int> > > >, long, std::pair<std::string, int>, __ops::_Iter_comp_iter<func0(std::ve...
254
func0
#include <iostream> #include <vector> #include <string> #include <algorithm> #include <cassert> using namespace std;
vector<pair<string, int>> func0(vector<pair<string, int>> subjectmarks) { sort(subjectmarks.begin(), subjectmarks.end(), [](const pair<string, int>& a, const pair<string, int>& b) { return a.second < b.second; }); return subjectmarks; }
int main() { // Test case 1 vector<pair<string, int>> test1 = {{"English", 88}, {"Science", 90}, {"Maths", 97}, {"Social sciences", 82}}; vector<pair<string, int>> expected1 = {{"Social sciences", 82}, {"English", 88}, {"Science", 90}, {"Maths", 97}}; assert(func0(test1) == expected1); // Tes...
O2
cpp
void std::__unguarded_linear_insert<__gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int>*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int>, std::allocator<std::pair<std::__cxx11::basic_str...
_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIPSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiESt6vectorIS9_SaIS9_EEEENS0_5__ops14_Val_comp_iterIZ5func0SD_EUlRKS9_SI_E_EEEvT_T0__isra_0: push r12 push rbp mov rbp, rdi push rbx mov rbx, rdi add rdi, 10h sub rsp, 30h...
unsigned long long std::__unguarded_linear_insert<__gnu_cxx::__normal_iterator<std::pair<std::string,int> *,std::vector<std::pair<std::string,int>>>,__gnu_cxx::__ops::_Val_comp_iter<func0(std::vector<std::pair<std::string,int>>)::{lambda(std::pair<std::string,int> const&,std::pair<std::string,int> const&)#1}>>( ...
__unguarded_linear_insert<__normal_iterator<std::pair<std::string,int>*,std::vector<std::pair<std::string,int>,std::allocator<std::pair<std::string,int>>>>,__ops::_Val_comp_iter<func0(std::vector<std::pair<std::string,int>,std::allocator<std::pair<std::string,int>>>)::{lambda(std::pair<std::string,int>const&,std::pair<...
/* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* void std::__unguarded_linear_insert<__normal_iterator<std::pair<std::string, int>*, std::vector<std::pair<std::string, int>, std::allocator<std::pair<std::string, int> > > >, __ops::_Val_comp_iter<func0(std::vector<std::pair<std::stri...
255
func0
#include <iostream> #include <vector> #include <string> #include <algorithm> #include <cassert> using namespace std;
vector<pair<string, int>> func0(vector<pair<string, int>> subjectmarks) { sort(subjectmarks.begin(), subjectmarks.end(), [](const pair<string, int>& a, const pair<string, int>& b) { return a.second < b.second; }); return subjectmarks; }
int main() { // Test case 1 vector<pair<string, int>> test1 = {{"English", 88}, {"Science", 90}, {"Maths", 97}, {"Social sciences", 82}}; vector<pair<string, int>> expected1 = {{"Social sciences", 82}, {"English", 88}, {"Science", 90}, {"Maths", 97}}; assert(func0(test1) == expected1); // Tes...
O3
cpp
void std::__unguarded_linear_insert<__gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int>*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int>, std::allocator<std::pair<std::__cxx11::basic_str...
_ZSt16__insertion_sortIN9__gnu_cxx17__normal_iteratorIPSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiESt6vectorIS9_SaIS9_EEEENS0_5__ops15_Iter_comp_iterIZ5func0SD_EUlRKS9_SI_E_EEEvT_SL_T0__isra_0: push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 48h mov rax, fs:28h...
unsigned long long std::__insertion_sort<__gnu_cxx::__normal_iterator<std::pair<std::string,int> *,std::vector<std::pair<std::string,int>>>,__gnu_cxx::__ops::_Iter_comp_iter<func0(std::vector<std::pair<std::string,int>>)::{lambda(std::pair<std::string,int> const&,std::pair<std::string,int> const&)#1}>>( long l...
__insertion_sort<__normal_iterator<std::pair<std::string,int>*,std::vector<std::pair<std::string,int>,std::allocator<std::pair<std::string,int>>>>,__ops::_Iter_comp_iter<func0(std::vector<std::pair<std::string,int>,std::allocator<std::pair<std::string,int>>>)::{lambda(std::pair<std::string,int>const&,std::pair<std::str...
/* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* void std::__insertion_sort<__normal_iterator<std::pair<std::string, int>*, std::vector<std::pair<std::string, int>, std::allocator<std::pair<std::string, int> > > >, __ops::_Iter_comp_iter<func0(std::vector<std::pair<std::string, int>...
256
func0
#include <vector> #include <cassert> #include <any>
int func0(std::vector<std::any> data_list) { int total = 0; for (auto& element : data_list) { if (element.type() == typeid(std::vector<std::any>)) { total += func0(std::any_cast<std::vector<std::any>>(element)); } else { total += std::any_cast<int>(element); ...
int main() { assert(func0({1, 2, std::vector<std::any>{3, 4}, std::vector<std::any>{5, 6}}) == 21); assert(func0({7, 10, std::vector<std::any>{15, 14}, std::vector<std::any>{19, 41}}) == 106); assert(func0({10, 20, std::vector<std::any>{30, 40}, std::vector<std::any>{50, 60}}) == 210); return 0; } ...
O0
cpp
func0(std::vector<std::any, std::allocator<std::any> >): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x68,%rsp mov %rdi,-0x68(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax movl $0x0,-0x54(%rbp) mov -0x68(%rbp),%rax mov %rax,-0x40(%rbp) mov -0x40(%rbp),%rax mov %rax,%r...
_Z5func0St6vectorISt3anySaIS0_EE: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 68h mov [rbp+var_68], rdi mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax mov [rbp+var_54], 0 mov rax, [rbp+var_68] mov [rbp+var_40], rax mov rax, [rbp+var_40] mov rdi, rax call _ZNS...
long long func0(long long a1) { long long v1; // rax unsigned int v3; // [rsp+1Ch] [rbp-54h] long long v4; // [rsp+20h] [rbp-50h] BYREF _QWORD v5[2]; // [rsp+28h] [rbp-48h] BYREF std::any *v6; // [rsp+38h] [rbp-38h] _BYTE v7[24]; // [rsp+40h] [rbp-30h] BYREF unsigned long long v8; // [rsp+58h] [rbp-18h] ...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x68 MOV qword ptr [RBP + -0x68],RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX MOV dword ptr [RBP + -0x54],0x0 MOV RAX,qword ptr [RBP + -0x68] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x40] MOV RDI,RAX CALL 0x001027ba MO...
/* func0(std::vector<std::any, std::allocator<std::any> >) */ int func0(vector param_1) { char cVar1; bool bVar2; int iVar3; type_info *this; int4 in_register_0000003c; long in_FS_OFFSET; int local_5c; int8 local_58; int8 local_50; vector<std::any,std::allocator<std::any>> *local_48; any *local_...
257
func0
#include <vector> #include <cassert> #include <any>
int func0(std::vector<std::any> data_list) { int total = 0; for (auto& element : data_list) { if (element.type() == typeid(std::vector<std::any>)) { total += func0(std::any_cast<std::vector<std::any>>(element)); } else { total += std::any_cast<int>(element); ...
int main() { assert(func0({1, 2, std::vector<std::any>{3, 4}, std::vector<std::any>{5, 6}}) == 21); assert(func0({7, 10, std::vector<std::any>{15, 14}, std::vector<std::any>{19, 41}}) == 106); assert(func0({10, 20, std::vector<std::any>{30, 40}, std::vector<std::any>{50, 60}}) == 210); return 0; } ...
O1
cpp
func0(std::vector<std::any, std::allocator<std::any> >): endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x48,%rsp mov %fs:0x28,%rax mov %rax,0x38(%rsp) xor %eax,%eax mov (%rdi),%r12 mov 0x8(%rdi),%rax mov %rax,0x8(%rsp) cmp %rax,%r12 je 1535 <_Z5func0St6...
_Z5func0St6vectorISt3anySaIS0_EE: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 38h mov rax, fs:28h mov [rsp+68h+var_40], rax xor eax, eax mov rbp, [rdi] mov rax, [rdi+8] mov [rsp+68h+var_60], rax cmp rax, rbp jz loc_1571 mov r14d, 0 le...
long long func0(long long *a1) { long long v1; // rbp unsigned int v2; // r14d void ( **v3)(long long, _QWORD, _QWORD); // r13 void ( **v4)(long long, _QWORD, _QWORD); // r12 void ( **i)(long long, _QWORD, _QWORD); // rbx void ( *v6)(long long, long long, _QWORD *); // rax void *v7; // rdx int *v8; // ...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x38 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x28],RAX XOR EAX,EAX MOV RBP,qword ptr [RDI] MOV RAX,qword ptr [RDI + 0x8] MOV qword ptr [RSP + 0x8],RAX CMP RAX,RBP JZ 0x00101571 MOV R14D,0x0 LEA R15,[0x1031e0] JMP 0x0010146c LAB_001013...
/* func0(std::vector<std::any, std::allocator<std::any> >) */ int func0(vector param_1) { any *paVar1; char *pcVar2; any *paVar3; int iVar4; code *pcVar5; any *paVar6; any *paVar7; int4 in_register_0000003c; any *unaff_R12; any *unaff_R13; int iVar8; long in_FS_OFFSET; ulong local_68; any ...
258
func0
#include <vector> #include <cassert> #include <any>
int func0(std::vector<std::any> data_list) { int total = 0; for (auto& element : data_list) { if (element.type() == typeid(std::vector<std::any>)) { total += func0(std::any_cast<std::vector<std::any>>(element)); } else { total += std::any_cast<int>(element); ...
int main() { assert(func0({1, 2, std::vector<std::any>{3, 4}, std::vector<std::any>{5, 6}}) == 21); assert(func0({7, 10, std::vector<std::any>{15, 14}, std::vector<std::any>{19, 41}}) == 106); assert(func0({10, 20, std::vector<std::any>{30, 40}, std::vector<std::any>{50, 60}}) == 210); return 0; } ...
O2
cpp
func0(std::vector<std::any, std::allocator<std::any> >): endbr64 push %r15 push %r14 xor %r14d,%r14d push %r13 push %r12 push %rbp push %rbx sub $0x58,%rsp mov (%rdi),%rbp mov %fs:0x28,%rax mov %rax,0x48(%rsp) xor %eax,%eax mov 0x8(%rdi),%rax mov %rax,0x10(%rsp) cmp %rax,%rbp je ...
_Z5func0St6vectorISt3anySaIS0_EE: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 58h mov r12, [rdi] mov rax, fs:28h mov [rsp+88h+var_40], rax xor eax, eax mov rax, [rdi+8] mov [rsp+88h+var_74], 0 mov [rsp+88h+var_70], rax cmp rax, r12 jz ...
long long func0(long long *a1) { long long v1; // r12 long long ( *v2)(); // rbx void *v3; // rax const char *v4; // rdi void *v5; // rax const char *v6; // rdi long long v7; // rbp void ( **v8)(long long, _QWORD, _QWORD **); // r13 void ( **v9)(long long, _QWORD, _QWORD **); // rbx signed long lon...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x58 MOV R12,qword ptr [RDI] MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x48],RAX XOR EAX,EAX MOV RAX,qword ptr [RDI + 0x8] MOV dword ptr [RSP + 0x14],0x0 MOV qword ptr [RSP + 0x18],RAX CMP RAX,R12 JZ 0x00101f70 LEA R15,[RSP + 0x28] LAB_...
/* func0(std::vector<std::any, std::allocator<std::any> >) */ int func0(vector param_1) { char *pcVar1; int8 *puVar2; char *pcVar3; int iVar4; char *pcVar5; code *pcVar6; char *pcVar7; char *pcVar8; char *pcVar9; char *in_RSI; char *pcVar10; int4 in_register_0000003c; char *pcVar11; long i...
259
func0
#include <vector> #include <cassert> #include <any>
int func0(std::vector<std::any> data_list) { int total = 0; for (auto& element : data_list) { if (element.type() == typeid(std::vector<std::any>)) { total += func0(std::any_cast<std::vector<std::any>>(element)); } else { total += std::any_cast<int>(element); ...
int main() { assert(func0({1, 2, std::vector<std::any>{3, 4}, std::vector<std::any>{5, 6}}) == 21); assert(func0({7, 10, std::vector<std::any>{15, 14}, std::vector<std::any>{19, 41}}) == 106); assert(func0({10, 20, std::vector<std::any>{30, 40}, std::vector<std::any>{50, 60}}) == 210); return 0; } ...
O3
cpp
func0(std::vector<std::any, std::allocator<std::any> >): endbr64 push %r15 push %r14 push %r13 xor %r13d,%r13d push %r12 push %rbp push %rbx sub $0x58,%rsp mov (%rdi),%rbp mov %fs:0x28,%rax mov %rax,0x48(%rsp) xor %eax,%eax mov 0x8(%rdi),%rax mov %rax,0x8(%rsp) cmp %rax,%rbp je ...
_Z5func0St6vectorISt3anySaIS0_EE: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 58h mov r12, [rdi] mov rax, fs:28h mov [rsp+88h+var_40], rax xor eax, eax mov rax, [rdi+8] mov [rsp+88h+var_74], 0 mov [rsp+88h+var_70], rax cmp rax, r12 jz ...
long long func0(long long *a1) { long long v1; // r12 long long ( *v2)(); // rbx void *v3; // rax const char *v4; // rdi void *v5; // rax const char *v6; // rdi long long v7; // rbp void ( **v8)(long long, _QWORD, _QWORD **); // r13 void ( **v9)(long long, _QWORD, _QWORD **); // rbx signed long lon...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x58 MOV R12,qword ptr [RDI] MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x48],RAX XOR EAX,EAX MOV RAX,qword ptr [RDI + 0x8] MOV dword ptr [RSP + 0x14],0x0 MOV qword ptr [RSP + 0x18],RAX CMP RAX,R12 JZ 0x00102070 LEA RAX,[RSP + 0x28] LEA ...
/* func0(std::vector<std::any, std::allocator<std::any> >) */ int func0(vector param_1) { int8 *puVar1; char *pcVar2; long *plVar3; int8 *puVar4; int iVar5; int8 *puVar6; int8 *puVar7; ulong uVar8; code *pcVar9; int8 *puVar10; int8 *puVar11; int4 in_register_0000003c; int8 *puVar12; long i...
260
func0
#include <iostream> #include <vector> #include <assert.h>
int func0(const std::vector<int>& list) { int pos_count = 0; for (int num : list) { if (num >= 0) { pos_count += 1; } } return pos_count; }
int main() { assert(func0({1, -2, 3, -4}) == 2); assert(func0({3, 4, 5, -1}) == 3); assert(func0({1, 2, 3, 4}) == 4); std::cout << "All test cases passed!" << std::endl; return 0; }
O0
cpp
func0(std::vector<int, std::allocator<int> > const&): endbr64 push %rbp mov %rsp,%rbp sub $0x40,%rsp mov %rdi,-0x38(%rbp) mov %fs:0x28,%rax mov %rax,-0x8(%rbp) xor %eax,%eax movl $0x0,-0x28(%rbp) mov -0x38(%rbp),%rax mov %rax,-0x10(%rbp) mov -0x10(%rbp),%rax mov %rax,%rdi callq 167e <...
_Z5func0RKSt6vectorIiSaIiEE: endbr64 push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_38], rdi mov rax, fs:28h mov [rbp+var_8], rax xor eax, eax mov [rbp+var_28], 0 mov rax, [rbp+var_38] mov [rbp+var_10], rax mov rax, [rbp+var_10] mov rdi, rax call _ZNKSt6vectorIiSaIiEE5...
long long func0(long long a1) { unsigned int v2; // [rsp+18h] [rbp-28h] long long v3; // [rsp+20h] [rbp-20h] BYREF _QWORD v4[3]; // [rsp+28h] [rbp-18h] BYREF v4[2] = __readfsqword(0x28u); v2 = 0; v4[1] = a1; v3 = std::vector<int>::begin(a1); v4[0] = std::vector<int>::end(a1); while ( (unsigned __int...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x38],RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX XOR EAX,EAX MOV dword ptr [RBP + -0x28],0x0 MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,RAX CALL 0x0010165e MOV qword pt...
/* func0(std::vector<int, std::allocator<int> > const&) */ int func0(vector *param_1) { bool bVar1; int *piVar2; long in_FS_OFFSET; int local_30; int8 local_28; int8 local_20; vector<int,std::allocator<int>> *local_18; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_30 = 0; lo...
261
func0
#include <iostream> #include <vector> #include <assert.h>
int func0(const std::vector<int>& list) { int pos_count = 0; for (int num : list) { if (num >= 0) { pos_count += 1; } } return pos_count; }
int main() { assert(func0({1, -2, 3, -4}) == 2); assert(func0({3, 4, 5, -1}) == 3); assert(func0({1, 2, 3, 4}) == 4); std::cout << "All test cases passed!" << std::endl; return 0; }
O1
cpp
func0(std::vector<int, std::allocator<int> > const&): endbr64 mov (%rdi),%rax mov 0x8(%rdi),%rcx cmp %rcx,%rax je 12b3 <_Z5func0RKSt6vectorIiSaIiEE+0x2a> mov $0x0,%edx cmpl $0x80000000,(%rax) adc $0x0,%edx add $0x4,%rax cmp %rax,%rcx jne 129e <_Z5func0RKSt6vectorIiSaIiEE+0x15> mov %edx,...
_Z5func0RKSt6vectorIiSaIiEE: endbr64 mov rax, [rdi] mov rcx, [rdi+8] cmp rcx, rax jz short loc_1273 mov edx, 0 loc_125E: cmp dword ptr [rax], 80000000h adc edx, 0 add rax, 4 cmp rax, rcx jnz short loc_125E loc_1270: mov eax, edx retn loc_1273: mov edx, 0 jmp short lo...
long long func0(long long a1) { _DWORD *v1; // rax _DWORD *v2; // rcx unsigned int v3; // edx v1 = *(_DWORD **)a1; v2 = *(_DWORD **)(a1 + 8); if ( v2 == *(_DWORD **)a1 ) { return 0; } else { v3 = 0; do v3 += *v1++ < 0x80000000; while ( v1 != v2 ); } return v3; }
func0: ENDBR64 MOV RAX,qword ptr [RDI] MOV RCX,qword ptr [RDI + 0x8] CMP RCX,RAX JZ 0x00101273 MOV EDX,0x0 LAB_0010125e: CMP dword ptr [RAX],0x80000000 ADC EDX,0x0 ADD RAX,0x4 CMP RAX,RCX JNZ 0x0010125e LAB_00101270: MOV EAX,EDX RET LAB_00101273: MOV EDX,0x0 JMP 0x00101270
/* func0(std::vector<int, std::allocator<int> > const&) */ int func0(vector *param_1) { uint *puVar1; int iVar2; puVar1 = *(uint **)param_1; if (*(uint **)(param_1 + 8) == puVar1) { iVar2 = 0; } else { iVar2 = 0; do { iVar2 = iVar2 + (uint)(*puVar1 < 0x80000000); puVar1 = puVar1...
262
func0
#include <iostream> #include <vector> #include <assert.h>
int func0(const std::vector<int>& list) { int pos_count = 0; for (int num : list) { if (num >= 0) { pos_count += 1; } } return pos_count; }
int main() { assert(func0({1, -2, 3, -4}) == 2); assert(func0({3, 4, 5, -1}) == 3); assert(func0({1, 2, 3, 4}) == 4); std::cout << "All test cases passed!" << std::endl; return 0; }
O2
cpp
func0(std::vector<int, std::allocator<int> > const&): endbr64 mov (%rdi),%rax mov 0x8(%rdi),%rdx xor %r8d,%r8d cmp %rdx,%rax je 152b <_Z5func0RKSt6vectorIiSaIiEE+0x2b> nopl 0x0(%rax,%rax,1) cmpl $0x80000000,(%rax) adc $0x0,%r8d add $0x4,%rax cmp %rax,%rdx jne 1518 <_Z5func0RKSt6vectorIiS...
_Z5func0RKSt6vectorIiSaIiEE: endbr64 mov rax, [rdi] mov rcx, [rdi+8] xor edx, edx cmp rcx, rax jz short loc_152A nop word ptr [rax+rax+00h] loc_1518: cmp dword ptr [rax], 80000000h adc edx, 0 add rax, 4 cmp rcx, rax jnz short loc_1518 loc_152A: mov eax, edx retn
long long func0(long long a1) { _DWORD *v1; // rax _DWORD *v2; // rcx unsigned int v3; // edx v1 = *(_DWORD **)a1; v2 = *(_DWORD **)(a1 + 8); v3 = 0; if ( v2 != *(_DWORD **)a1 ) { do v3 += *v1++ < 0x80000000; while ( v2 != v1 ); } return v3; }
func0: ENDBR64 MOV RAX,qword ptr [RDI] MOV RCX,qword ptr [RDI + 0x8] XOR EDX,EDX CMP RCX,RAX JZ 0x0010152a NOP word ptr [RAX + RAX*0x1] LAB_00101518: CMP dword ptr [RAX],0x80000000 ADC EDX,0x0 ADD RAX,0x4 CMP RCX,RAX JNZ 0x00101518 LAB_0010152a: MOV EAX,EDX RET
/* func0(std::vector<int, std::allocator<int> > const&) */ int func0(vector *param_1) { uint *puVar1; int iVar2; iVar2 = 0; for (puVar1 = *(uint **)param_1; *(uint **)(param_1 + 8) != puVar1; puVar1 = puVar1 + 1) { iVar2 = iVar2 + (uint)(*puVar1 < 0x80000000); } return iVar2; }
263
func0
#include <iostream> #include <vector> #include <assert.h>
int func0(const std::vector<int>& list) { int pos_count = 0; for (int num : list) { if (num >= 0) { pos_count += 1; } } return pos_count; }
int main() { assert(func0({1, -2, 3, -4}) == 2); assert(func0({3, 4, 5, -1}) == 3); assert(func0({1, 2, 3, 4}) == 4); std::cout << "All test cases passed!" << std::endl; return 0; }
O3
cpp
func0(std::vector<int, std::allocator<int> > const&): endbr64 mov (%rdi),%rdx mov 0x8(%rdi),%rsi cmp %rsi,%rdx je 17f0 <_Z5func0RKSt6vectorIiSaIiEE+0xf0> lea -0x4(%rsi),%rcx mov %rdx,%rax movabs $0x3ffffffffffffffc,%r8 sub %rdx,%rcx shr $0x2,%rcx lea 0x1(%rcx),%rdi test %r8,%rcx je 17f...
_Z5func0RKSt6vectorIiSaIiEE: endbr64 mov rdx, [rdi] mov rdi, [rdi+8] cmp rdi, rdx jz loc_17E8 lea rcx, [rdi-4] mov rax, rdx sub rcx, rdx mov rsi, rcx shr rsi, 2 add rsi, 1 cmp rcx, 8 jbe loc_17F1 mov rcx, rsi pxor xmm0, xmm0 pcmpeqd xmm2, xmm2 shr rcx, 2 shl ...
long long func0(const __m128i **a1) { const __m128i *v1; // rdx const __m128i *v2; // rdi const __m128i *v3; // rax unsigned long long v4; // rsi __m128i v5; // xmm0 __m128i v6; // xmm1 __m128i v7; // xmm0 long long result; // rax v1 = *a1; v2 = a1[1]; if ( v2 == v1 ) return 0LL; v3 = v1; ...
func0: ENDBR64 MOV RDX,qword ptr [RDI] MOV RDI,qword ptr [RDI + 0x8] CMP RDI,RDX JZ 0x001017e8 LEA RCX,[RDI + -0x4] MOV RAX,RDX SUB RCX,RDX MOV RSI,RCX SHR RSI,0x2 ADD RSI,0x1 CMP RCX,0x8 JBE 0x001017f1 MOV RCX,RSI PXOR XMM0,XMM0 PCMPEQD XMM2,XMM2 SHR RCX,0x2 SHL RCX,0x4 ADD RCX,RDX NOP dword ptr [RAX] LAB_00101770: MO...
/* func0(std::vector<int, std::allocator<int> > const&) */ int func0(vector *param_1) { uint *puVar1; uint uVar2; uint *puVar3; uint *puVar4; uint *puVar5; uint *puVar6; ulong uVar7; uint *puVar8; ulong uVar9; int iVar10; int iVar11; int iVar12; int iVar13; puVar8 = *(uint **)param_1; ...
264
func0
#include <cassert> #include <vector> #include <string> #include <algorithm> using namespace std; string add(const string& num1, const string& num2) { string result = ""; int carry = 0; int i = num1.size() - 1, j = num2.size() - 1; while(i >= 0 || j >= 0 || carry) { int digit1 = (...
string func0(int n) { vector<vector<string>> bell(n+1, vector<string>(n+1, "0")); bell[0][0] = "1"; for(int i = 1; i <= n; i++) { bell[i][0] = bell[i-1][i-1]; for(int j = 1; j <= i; j++) { bell[i][j] = add(bell[i-1][j-1], bell[i][j-1]); } } return bell[n]...
int main() { assert(func0(2) == "2"); assert(func0(10) == "115975"); assert(func0(56) == "6775685320645824322581483068371419745979053216268760300"); }
O0
cpp
func0[abi:cxx11](int): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x98,%rsp mov %rdi,-0x98(%rbp) mov %esi,-0x9c(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax lea -0x89(%rbp),%rax mov %rax,%rdi callq 2f78 <_ZNSaISt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcE...
_Z5func0B5cxx11i: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 0B8h mov [rbp+var_B8], rdi mov [rbp+var_BC], esi mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax lea rax, [rbp+var_A1] mov [rbp+var_88], rax nop nop lea rax, [rbp+var_A2] mov [rbp+var_90], rax nop nop ...
long long func0[abi:cxx11](long long a1, int a2) { long long v2; // rax long long v3; // rax long long v4; // rax long long v5; // rbx long long v6; // rax long long v7; // rax long long v8; // rax long long v9; // rbx long long v10; // rax long long v11; // rax long long v12; // rax long long ...
func0[abi:cxx11]: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0xb8 MOV qword ptr [RBP + -0xb8],RDI MOV dword ptr [RBP + -0xbc],ESI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX LEA RAX,[RBP + -0xa1] MOV qword ptr [RBP + -0x88],RAX NOP NOP LEA RAX,[RBP + -0xa2] MOV qword ptr [RBP + -0x90],RAX...
/* func0[abi:cxx11](int) */ string * func0_abi_cxx11_(int param_1) { vector<std::string,std::allocator<std::string>> *pvVar1; string *psVar2; string *this; int in_ESI; int4 in_register_0000003c; long in_FS_OFFSET; allocator local_ab; allocator local_aa; allocator local_a9; int local_a8; int loca...
265
func0
#include <cassert> #include <vector> #include <string> #include <algorithm> using namespace std; string add(const string& num1, const string& num2) { string result = ""; int carry = 0; int i = num1.size() - 1, j = num2.size() - 1; while(i >= 0 || j >= 0 || carry) { int digit1 = (...
string func0(int n) { vector<vector<string>> bell(n+1, vector<string>(n+1, "0")); bell[0][0] = "1"; for(int i = 1; i <= n; i++) { bell[i][0] = bell[i-1][i-1]; for(int j = 1; j <= i; j++) { bell[i][j] = add(bell[i-1][j-1], bell[i][j-1]); } } return bell[n]...
int main() { assert(func0(2) == "2"); assert(func0(10) == "115975"); assert(func0(56) == "6775685320645824322581483068371419745979053216268760300"); }
O1
cpp
func0[abi:cxx11](int): endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x88,%rsp mov %rdi,0x20(%rsp) mov %esi,%ebx mov %esi,0x2c(%rsp) mov %fs:0x28,%rax mov %rax,0x78(%rsp) xor %eax,%eax lea 0x50(%rsp),%rdi lea 0x60(%rsp),%rax mov %rax,0x50(%rsp) lea ...
_Z5func0B5cxx11i: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 0A8h mov [rsp+0D8h+var_C0], rdi mov r13d, esi mov rax, fs:28h mov [rsp+0D8h+var_40], rax xor eax, eax lea rdi, [rsp+0D8h+var_68] lea rax, [rsp+0D8h+var_58] mov [rsp+0D8h+var_68]...
_QWORD * func0[abi:cxx11](_QWORD *a1, int a2) { unsigned long long v2; // rbp unsigned long long v3; // r14 void **v4; // r12 long long v5; // r15 void **v6; // rbx void **i; // rbp _QWORD *v8; // r15 int v9; // r13d long long v10; // rbx int j; // r12d long long v12; // rax _BYTE *v13; // rdx ...
func0[abi:cxx11]: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0xa8 MOV qword ptr [RSP + 0x18],RDI MOV R13D,ESI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x98],RAX XOR EAX,EAX LEA RDI,[RSP + 0x70] LEA RAX,[RSP + 0x80] MOV qword ptr [RSP + 0x70],RAX LEA RDX,[0x103005] LEA RSI,[RDX + -0x1]...
/* func0[abi:cxx11](int) */ long * func0_abi_cxx11_(int param_1) { string *psVar1; long lVar2; int8 *puVar3; char *pcVar4; void *pvVar5; long *plVar6; int8 uVar7; string *psVar8; vector *pvVar9; uint uVar10; long lVar11; long lVar12; int8 *puVar13; long *plVar14; ulong uVar15; long *pl...
266
func0
#include <cassert> #include <vector> #include <string> #include <algorithm> using namespace std; string add(const string& num1, const string& num2) { string result = ""; int carry = 0; int i = num1.size() - 1, j = num2.size() - 1; while(i >= 0 || j >= 0 || carry) { int digit1 = (...
string func0(int n) { vector<vector<string>> bell(n+1, vector<string>(n+1, "0")); bell[0][0] = "1"; for(int i = 1; i <= n; i++) { bell[i][0] = bell[i-1][i-1]; for(int j = 1; j <= i; j++) { bell[i][j] = add(bell[i-1][j-1], bell[i][j-1]); } } return bell[n]...
int main() { assert(func0(2) == "2"); assert(func0(10) == "115975"); assert(func0(56) == "6775685320645824322581483068371419745979053216268760300"); }
O2
cpp
func0[abi:cxx11](int): endbr64 push %r15 lea 0x886(%rip),%rdx push %r14 push %r13 push %r12 push %rbp push %rbx mov %esi,%ebx sub $0x98,%rsp mov %rdi,0x30(%rsp) lea 0x60(%rsp),%r15 lea 0x70(%rsp),%r12 mov %esi,0x3c(%rsp) mov %r15,%rdi lea -0x1(%rdx),%rsi mov %fs:0x28,%rax mov ...
_Z5func0B5cxx11i: endbr64 push r15 lea rdx, unk_3005 push r14 push r13 push r12 push rbp push rbx mov ebx, esi lea ebp, [rbx+1] movsxd rbp, ebp sub rsp, 0C8h mov [rsp+0F8h+var_C8], rdi lea r15, [rsp+0F8h+var_68] lea r13, [rsp+0F8h+src] mov [rsp+0F8h+var_DC], esi mov ...
long long * func0[abi:cxx11](long long *a1, int a2) { unsigned long long v2; // rbp unsigned long long v3; // r14 char *v4; // r12 char *v5; // rbx char *i; // rbp _QWORD *v7; // rbp int v8; // r14d long long v9; // rbx int v10; // r12d void *v11; // rsi size_t v12; // rdx void **v13; // rcx _...
func0[abi:cxx11]: ENDBR64 PUSH R15 LEA RDX,[0x103005] PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX MOV EBX,ESI LEA EBP,[RBX + 0x1] MOVSXD RBP,EBP SUB RSP,0xc8 MOV qword ptr [RSP + 0x30],RDI LEA R15,[RSP + 0x90] LEA R13,[RSP + 0xa0] MOV dword ptr [RSP + 0x1c],ESI MOV RDI,R15 LEA RSI,[RDX + -0x1] MOV RAX,qword ptr FS:[0x...
/* func0[abi:cxx11](int) */ ulong * func0_abi_cxx11_(int param_1) { long lVar1; int8 *puVar2; int *__src; string *psVar3; string *psVar4; ulong uVar5; vector *pvVar6; ulong *__dest; int8 uVar7; long lVar8; int8 *puVar9; ulong uVar10; string *psVar11; vector *pvVar12; int in_ESI; int4 i...
267
func0
#include <cassert> #include <vector> #include <string> #include <algorithm> using namespace std; string add(const string& num1, const string& num2) { string result = ""; int carry = 0; int i = num1.size() - 1, j = num2.size() - 1; while(i >= 0 || j >= 0 || carry) { int digit1 = (...
string func0(int n) { vector<vector<string>> bell(n+1, vector<string>(n+1, "0")); bell[0][0] = "1"; for(int i = 1; i <= n; i++) { bell[i][0] = bell[i-1][i-1]; for(int j = 1; j <= i; j++) { bell[i][j] = add(bell[i-1][j-1], bell[i][j-1]); } } return bell[n]...
int main() { assert(func0(2) == "2"); assert(func0(10) == "115975"); assert(func0(56) == "6775685320645824322581483068371419745979053216268760300"); }
O3
cpp
func0[abi:cxx11](int): endbr64 push %r15 mov $0x30,%edx push %r14 push %r13 push %r12 push %rbp push %rbx sub $0xa8,%rsp mov %rdi,0x30(%rsp) lea 0x80(%rsp),%r15 mov %esi,0x3c(%rsp) mov %fs:0x28,%rax mov %rax,0x98(%rsp) xor %eax,%eax lea 0x1(%rsi),%eax mov %dx,0x80(%rsp) mov ...
_Z5func0B5cxx11i: endbr64 push r15 mov edx, 30h ; '0' push r14 lea r14d, [rsi+1] push r13 movsxd r14, r14d push r12 push rbp push rbx sub rsp, 0C8h mov [rsp+0F8h+var_C0], rdi lea r15, [rsp+0F8h+var_58] mov [rsp+0F8h+var_DC], esi mov rax, fs:28h mov [rsp+0F8h+var_40], r...
long long * func0[abi:cxx11](long long *a1, int a2) { unsigned long long v2; // r14 char *v3; // rbx long long v4; // r12 size_t v5; // rbp _BYTE *v6; // rdi char *v7; // r13 long long v8; // rax char *v9; // rbp void *v10; // rdi long long v11; // rax _QWORD *v12; // rbp int v13; // r13d long...
func0[abi:cxx11]: ENDBR64 PUSH R15 MOV EDX,0x30 PUSH R14 LEA R14D,[RSI + 0x1] PUSH R13 MOVSXD R14,R14D PUSH R12 PUSH RBP PUSH RBX SUB RSP,0xc8 MOV qword ptr [RSP + 0x38],RDI LEA R15,[RSP + 0xa0] MOV dword ptr [RSP + 0x1c],ESI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0xb8],RAX XOR EAX,EAX MOV RAX,R14 MOV qword p...
/* func0[abi:cxx11](int) */ ulong * func0_abi_cxx11_(int param_1) { long *plVar1; long lVar2; int8 *puVar3; int8 *puVar4; ulong __n; ulong *puVar5; ulong *puVar6; vector *pvVar7; ulong *puVar8; ulong *puVar9; int in_CL; string *psVar10; int extraout_DL; long lVar11; int8 *puVar12; vect...
268
func0
#include <vector> #include <assert.h>
bool func0(const std::vector<int>& A) { bool increasing = true; bool decreasing = true; for (int i = 0; i < A.size() - 1; ++i) { if (A[i] > A[i + 1]) { increasing = false; } if (A[i] < A[i + 1]) { decreasing = false; } } return i...
int main() { assert(func0({6, 5, 4, 4}) == true); assert(func0({1, 2, 2, 3}) == true); assert(func0({1, 3, 2}) == false); return 0; }
O0
cpp
func0(std::vector<int, std::allocator<int> > const&): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x28,%rsp mov %rdi,-0x28(%rbp) movb $0x1,-0x16(%rbp) movb $0x1,-0x15(%rbp) movl $0x0,-0x14(%rbp) mov -0x14(%rbp),%eax movslq %eax,%rbx mov -0x28(%rbp),%rax mov %rax,%rdi callq 15b2 <_ZNKSt6v...
_Z5func0RKSt6vectorIiSaIiEE: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 28h mov [rbp+var_28], rdi mov [rbp+var_16], 1 mov [rbp+var_15], 1 mov [rbp+var_14], 0 jmp loc_12EE loc_126E: mov eax, [rbp+var_14] movsxd rdx, eax mov rax, [rbp+var_28] mov rsi, rdx mov rdi, r...
_BOOL8 func0(long long a1) { int v1; // ebx int v2; // ebx char v4; // [rsp+1Ah] [rbp-16h] char v5; // [rsp+1Bh] [rbp-15h] int i; // [rsp+1Ch] [rbp-14h] v4 = 1; v5 = 1; for ( i = 0; i < (unsigned long long)(std::vector<int>::size(a1) - 1); ++i ) { v1 = *(_DWORD *)std::vector<int>::operator[](a1,...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x28 MOV qword ptr [RBP + -0x28],RDI MOV byte ptr [RBP + -0x16],0x1 MOV byte ptr [RBP + -0x15],0x1 MOV dword ptr [RBP + -0x14],0x0 JMP 0x001012ee LAB_0010126e: MOV EAX,dword ptr [RBP + -0x14] MOVSXD RDX,EAX MOV RAX,qword ptr [RBP + -0x28] MOV RSI,RDX MOV RDI,RAX CALL...
/* func0(std::vector<int, std::allocator<int> > const&) */ int8 func0(vector *param_1) { int iVar1; bool bVar2; bool bVar3; int *piVar4; long lVar5; int8 uVar6; int4 local_1c; bVar2 = true; bVar3 = true; local_1c = 0; while( true ) { lVar5 = std::vector<int,std::allocator<int>>::size((vec...
269
func0
#include <vector> #include <assert.h>
bool func0(const std::vector<int>& A) { bool increasing = true; bool decreasing = true; for (int i = 0; i < A.size() - 1; ++i) { if (A[i] > A[i + 1]) { increasing = false; } if (A[i] < A[i + 1]) { decreasing = false; } } return i...
int main() { assert(func0({6, 5, 4, 4}) == true); assert(func0({1, 2, 2, 3}) == true); assert(func0({1, 3, 2}) == false); return 0; }
O1
cpp
func0(std::vector<int, std::allocator<int> > const&): endbr64 mov (%rdi),%rcx mov 0x8(%rdi),%rax sub %rcx,%rax mov %rax,%rdx sar $0x2,%rdx cmp $0x1,%rdx je 1258 <_Z5func0RKSt6vectorIiSaIiEE+0x4f> mov %rcx,%rdx lea -0x4(%rcx,%rax,1),%r8 mov $0x1,%eax mov $0x1,%r9d mov $0x0,%edi jmp ...
_Z5func0RKSt6vectorIiSaIiEE: endbr64 mov r8, [rdi] mov rax, [rdi+8] sub rax, r8 mov rdi, rax sar rdi, 2 sub rdi, 1 cmp rax, 4 jz short loc_125E mov r9d, 1 mov eax, 1 mov edx, 0 mov r10d, 0 jmp short loc_1248 loc_1240: mov eax, r10d loc_1243: cmp rdx, rdi jnb ...
long long func0(long long *a1) { long long v1; // r8 long long v2; // rax unsigned long long v3; // rdi int v4; // r9d int v5; // eax unsigned long long v6; // rdx int v7; // esi int v8; // ecx v1 = *a1; v2 = a1[1] - *a1; v3 = (v2 >> 2) - 1; if ( v2 == 4 ) { v4 = 1; v5 = 1; } els...
func0: ENDBR64 MOV R8,qword ptr [RDI] MOV RAX,qword ptr [RDI + 0x8] SUB RAX,R8 MOV RDI,RAX SAR RDI,0x2 SUB RDI,0x1 CMP RAX,0x4 JZ 0x0010125e MOV R9D,0x1 MOV EAX,0x1 MOV EDX,0x0 MOV R10D,0x0 JMP 0x00101248 LAB_00101240: MOV EAX,R10D LAB_00101243: CMP RDX,RDI JNC 0x00101269 LAB_00101248: MOV ESI,dword ptr [R8 + RDX*0x4] ...
/* func0(std::vector<int, std::allocator<int> > const&) */ uint func0(vector *param_1) { int iVar1; int iVar2; long lVar3; uint uVar4; ulong uVar5; uint uVar6; lVar3 = *(long *)param_1; if (*(long *)(param_1 + 8) - lVar3 == 4) { uVar6 = 1; uVar4 = 1; } else { uVar6 = 1; uVar4 = ...
270
func0
#include <vector> #include <assert.h>
bool func0(const std::vector<int>& A) { bool increasing = true; bool decreasing = true; for (int i = 0; i < A.size() - 1; ++i) { if (A[i] > A[i + 1]) { increasing = false; } if (A[i] < A[i + 1]) { decreasing = false; } } return i...
int main() { assert(func0({6, 5, 4, 4}) == true); assert(func0({1, 2, 2, 3}) == true); assert(func0({1, 3, 2}) == false); return 0; }
O2
cpp
func0(std::vector<int, std::allocator<int> > const&): endbr64 mov (%rdi),%rax mov 0x8(%rdi),%rdi sub %rax,%rdi mov %rdi,%rdx sar $0x2,%rdx cmp $0x1,%rdx je 1400 <_Z5func0RKSt6vectorIiSaIiEE+0x60> mov (%rax),%ecx lea 0x4(%rax),%rdx add %rax,%rdi mov $0x1,%r8d mov $0x1,%eax xor %r9...
_Z5func0RKSt6vectorIiSaIiEE: endbr64 mov r8, [rdi] mov rax, [rdi+8] sub rax, r8 mov rdi, rax sar rdi, 2 sub rdi, 1 cmp rax, 4 jz short loc_13D0 mov ecx, [r8] mov r9d, 1 mov eax, 1 xor edx, edx xor r10d, r10d jmp short loc_13B1 loc_13A8: cmovl r9d, r10d cmp ...
long long func0(int **a1) { int *v1; // r8 long long v2; // rax unsigned long long v3; // rdi int v4; // ecx int v5; // r9d int v6; // eax unsigned long long v7; // rdx int v8; // esi v1 = *a1; v2 = (char *)a1[1] - (char *)*a1; v3 = (v2 >> 2) - 1; if ( v2 == 4 ) return 1LL; v4 = *v1; v...
func0: ENDBR64 MOV R8,qword ptr [RDI] MOV RAX,qword ptr [RDI + 0x8] SUB RAX,R8 MOV RDI,RAX SAR RDI,0x2 SUB RDI,0x1 CMP RAX,0x4 JZ 0x001013d0 MOV ECX,dword ptr [R8] MOV R9D,0x1 MOV EAX,0x1 XOR EDX,EDX XOR R10D,R10D JMP 0x001013b1 LAB_001013a8: CMOVL R9D,R10D CMP RDX,RDI JNC 0x001013c6 LAB_001013b1: ADD RDX,0x1 MOV ESI,E...
/* func0(std::vector<int, std::allocator<int> > const&) */ uint func0(vector *param_1) { int iVar1; int *piVar2; uint uVar3; int iVar4; ulong uVar5; ulong uVar6; uint uVar7; piVar2 = *(int **)param_1; uVar6 = (*(long *)(param_1 + 8) - (long)piVar2 >> 2) - 1; if (*(long *)(param_1 + 8) - (long)p...
271
func0
#include <vector> #include <assert.h>
bool func0(const std::vector<int>& A) { bool increasing = true; bool decreasing = true; for (int i = 0; i < A.size() - 1; ++i) { if (A[i] > A[i + 1]) { increasing = false; } if (A[i] < A[i + 1]) { decreasing = false; } } return i...
int main() { assert(func0({6, 5, 4, 4}) == true); assert(func0({1, 2, 2, 3}) == true); assert(func0({1, 3, 2}) == false); return 0; }
O3
cpp
func0(std::vector<int, std::allocator<int> > const&): endbr64 mov (%rdi),%rax mov 0x8(%rdi),%rdi sub %rax,%rdi mov %rdi,%rdx sar $0x2,%rdx cmp $0x1,%rdx je 13e0 <_Z5func0RKSt6vectorIiSaIiEE+0x60> mov (%rax),%ecx lea 0x4(%rax),%rdx add %rax,%rdi mov $0x1,%r8d mov $0x1,%eax xor %r9...
_Z5func0RKSt6vectorIiSaIiEE: endbr64 mov r8, [rdi] mov rax, [rdi+8] sub rax, r8 mov rdi, rax sar rdi, 2 sub rdi, 1 cmp rax, 4 jz short loc_13D0 mov ecx, [r8] mov r9d, 1 mov eax, 1 xor edx, edx xor r10d, r10d jmp short loc_13B1 loc_13A8: cmovl r9d, r10d cmp ...
long long func0(int **a1) { int *v1; // r8 long long v2; // rax unsigned long long v3; // rdi int v4; // ecx int v5; // r9d int v6; // eax unsigned long long v7; // rdx int v8; // esi v1 = *a1; v2 = (char *)a1[1] - (char *)*a1; v3 = (v2 >> 2) - 1; if ( v2 == 4 ) return 1LL; v4 = *v1; v...
func0: ENDBR64 MOV R8,qword ptr [RDI] MOV RAX,qword ptr [RDI + 0x8] SUB RAX,R8 MOV RDI,RAX SAR RDI,0x2 SUB RDI,0x1 CMP RAX,0x4 JZ 0x001013d0 MOV ECX,dword ptr [R8] MOV R9D,0x1 MOV EAX,0x1 XOR EDX,EDX XOR R10D,R10D JMP 0x001013b1 LAB_001013a8: CMOVL R9D,R10D CMP RDX,RDI JNC 0x001013c6 LAB_001013b1: ADD RDX,0x1 MOV ESI,E...
/* func0(std::vector<int, std::allocator<int> > const&) */ uint func0(vector *param_1) { int iVar1; int *piVar2; uint uVar3; int iVar4; ulong uVar5; ulong uVar6; uint uVar7; piVar2 = *(int **)param_1; uVar6 = (*(long *)(param_1 + 8) - (long)piVar2 >> 2) - 1; if (*(long *)(param_1 + 8) - (long)p...
272
func0
#include <vector> #include <assert.h>
bool func0(const std::vector<int>& l, const std::vector<int>& s) { bool sub_set = false; if (s.empty()) { sub_set = true; } else if (s == l) { sub_set = true; } else if (s.size() > l.size()) { sub_set = false; } else { for (size_t i = 0; i <= l.size() - s.siz...
int main() { assert(func0({2,4,3,5,7}, {3,7}) == false); assert(func0({2,4,3,5,7}, {4,3}) == true); assert(func0({2,4,3,5,7}, {1,6}) == false); return 0; }
O0
cpp
func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x38,%rsp mov %rdi,-0x38(%rbp) mov %rsi,-0x40(%rbp) movb $0x0,-0x21(%rbp) mov -0x40(%rbp),%rax mov %rax,%rdi callq 1918 <_ZNKSt6vectorIiSaIiEE5empt...
_Z5func0RKSt6vectorIiSaIiEES3_: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 38h mov [rbp+var_38], rdi mov [rbp+var_40], rsi mov [rbp+var_21], 0 mov rax, [rbp+var_40] mov rdi, rax call _ZNKSt6vectorIiSaIiEE5emptyEv; std::vector<int>::empty(void) test al, al jz short loc_1...
long long func0(long long a1, long long a2) { unsigned long long v2; // rbx int v3; // ebx int v4; // ebx long long v6; // rbx unsigned __int8 v8; // [rsp+1Fh] [rbp-21h] unsigned long long i; // [rsp+20h] [rbp-20h] unsigned long long j; // [rsp+28h] [rbp-18h] v8 = 0; if ( (unsigned __int8)std::vecto...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x38 MOV qword ptr [RBP + -0x38],RDI MOV qword ptr [RBP + -0x40],RSI MOV byte ptr [RBP + -0x21],0x0 MOV RAX,qword ptr [RBP + -0x40] MOV RDI,RAX CALL 0x00101980 TEST AL,AL JZ 0x0010129b MOV byte ptr [RBP + -0x21],0x1 JMP 0x001013e3 LAB_0010129b: MOV RDX,qword ptr [RBP...
/* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&) */ int func0(vector *param_1,vector *param_2) { int iVar1; char cVar2; bool bVar3; ulong uVar4; ulong uVar5; int *piVar6; long lVar7; long lVar8; int local_29; ulong local_28; ulong local_20...
273
func0
#include <vector> #include <assert.h>
bool func0(const std::vector<int>& l, const std::vector<int>& s) { bool sub_set = false; if (s.empty()) { sub_set = true; } else if (s == l) { sub_set = true; } else if (s.size() > l.size()) { sub_set = false; } else { for (size_t i = 0; i <= l.size() - s.siz...
int main() { assert(func0({2,4,3,5,7}, {3,7}) == false); assert(func0({2,4,3,5,7}, {4,3}) == true); assert(func0({2,4,3,5,7}, {1,6}) == false); return 0; }
O1
cpp
func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&): endbr64 push %r13 push %r12 push %rbp push %rbx sub $0x8,%rsp mov 0x8(%rsi),%rdx mov (%rsi),%rbp mov $0x1,%eax cmp %rdx,%rbp je 129d <_Z5func0RKSt6vectorIiSaIiEES3_+0x74> sub %rbp,%rdx mov ...
_Z5func0RKSt6vectorIiSaIiEES3_: endbr64 push r13 push r12 push rbp push rbx sub rsp, 8 mov r12, [rsi+8] mov rbp, [rsi] mov eax, 1 cmp rbp, r12 jz loc_12E3 sub r12, rbp mov rbx, [rdi] mov r13, [rdi+8] sub r13, rbx cmp r12, r13 jz short loc_1287 loc_125E: mov ...
long long func0(long long a1, long long a2) { long long v2; // r12 _DWORD *v3; // rbp long long result; // rax signed long long v5; // r12 _DWORD *v6; // rbx long long v7; // r13 unsigned long long v8; // r8 _DWORD *v9; // rdx unsigned long long v10; // rcx unsigned long long v11; // rax v2 = *(...
func0: ENDBR64 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x8 MOV R12,qword ptr [RSI + 0x8] MOV RBP,qword ptr [RSI] MOV EAX,0x1 CMP RBP,R12 JZ 0x001012e3 SUB R12,RBP MOV RBX,qword ptr [RDI] MOV R13,qword ptr [RDI + 0x8] SUB R13,RBX CMP R12,R13 JZ 0x00101287 LAB_0010125e: MOV EAX,0x0 CMP R13,R12 JC 0x001012e3 MOV R8,R1...
/* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&) */ int8 func0(vector *param_1,vector *param_2) { int *__s1; int iVar1; int8 uVar2; ulong uVar3; ulong uVar4; int *__s2; ulong uVar5; ulong __n; ulong uVar6; __s1 = *(int **)param_2; uVar2...
274
func0
#include <vector> #include <assert.h>
bool func0(const std::vector<int>& l, const std::vector<int>& s) { bool sub_set = false; if (s.empty()) { sub_set = true; } else if (s == l) { sub_set = true; } else if (s.size() > l.size()) { sub_set = false; } else { for (size_t i = 0; i <= l.size() - s.siz...
int main() { assert(func0({2,4,3,5,7}, {3,7}) == false); assert(func0({2,4,3,5,7}, {4,3}) == true); assert(func0({2,4,3,5,7}, {1,6}) == false); return 0; }
O2
cpp
func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&): endbr64 push %r13 mov $0x1,%r13d push %r12 push %rbp push %rbx sub $0x18,%rsp mov 0x8(%rsi),%rcx mov (%rsi),%r12 cmp %rcx,%r12 je 1586 <_Z5func0RKSt6vectorIiSaIiEES3_+0xa6> mov (%rdi),%rbx ...
_Z5func0RKSt6vectorIiSaIiEES3_: endbr64 push r14 mov r14d, 1 push r13 push r12 push rbp push rbx mov r13, [rsi+8] mov rbp, [rsi] cmp rbp, r13 jz short loc_152D mov rbx, [rdi] mov r12, [rdi+8] sub r13, rbp sub r12, rbx cmp r13, r12 jz loc_1540 loc_14C4: xor ...
long long func0(long long a1, long long a2) { unsigned int v2; // r14d long long v3; // r13 _DWORD *v4; // rbp _DWORD *v5; // rbx signed long long v6; // r13 long long v7; // r12 _DWORD *v8; // rdx unsigned long long v9; // rdi unsigned long long v10; // rcx unsigned long long v11; // rax v2 = 1...
func0: ENDBR64 PUSH R14 MOV R14D,0x1 PUSH R13 PUSH R12 PUSH RBP PUSH RBX MOV R13,qword ptr [RSI + 0x8] MOV RBP,qword ptr [RSI] CMP RBP,R13 JZ 0x0010152d MOV RBX,qword ptr [RDI] MOV R12,qword ptr [RDI + 0x8] SUB R13,RBP SUB R12,RBX CMP R13,R12 JZ 0x00101540 LAB_001014c4: XOR R14D,R14D CMP R12,R13 JC 0x0010152d MOV RDI,R...
/* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&) */ int8 func0(vector *param_1,vector *param_2) { int *__s1; int iVar1; ulong uVar2; ulong uVar3; int *__s2; ulong uVar4; ulong uVar5; ulong __n; int8 uVar6; uVar6 = 1; __s1 = *(int **)par...
275
func0
#include <vector> #include <assert.h>
bool func0(const std::vector<int>& l, const std::vector<int>& s) { bool sub_set = false; if (s.empty()) { sub_set = true; } else if (s == l) { sub_set = true; } else if (s.size() > l.size()) { sub_set = false; } else { for (size_t i = 0; i <= l.size() - s.siz...
int main() { assert(func0({2,4,3,5,7}, {3,7}) == false); assert(func0({2,4,3,5,7}, {4,3}) == true); assert(func0({2,4,3,5,7}, {1,6}) == false); return 0; }
O3
cpp
func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&): endbr64 push %r13 mov $0x1,%r13d push %r12 push %rbp push %rbx sub $0x18,%rsp mov 0x8(%rsi),%rcx mov (%rsi),%r12 cmp %rcx,%r12 je 1556 <_Z5func0RKSt6vectorIiSaIiEES3_+0xa6> mov (%rdi),%rbx ...
_Z5func0RKSt6vectorIiSaIiEES3_: endbr64 push r14 mov r14d, 1 push r13 push r12 push rbp push rbx mov r13, [rsi+8] mov rbp, [rsi] cmp rbp, r13 jz short loc_152D mov rbx, [rdi] mov r12, [rdi+8] sub r13, rbp sub r12, rbx cmp r13, r12 jz loc_1540 loc_14C4: xor ...
long long func0(long long a1, long long a2) { unsigned int v2; // r14d long long v3; // r13 _DWORD *v4; // rbp _DWORD *v5; // rbx signed long long v6; // r13 long long v7; // r12 _DWORD *v8; // rdx unsigned long long v9; // rdi unsigned long long v10; // rcx unsigned long long v11; // rax v2 = 1...
func0: ENDBR64 PUSH R14 MOV R14D,0x1 PUSH R13 PUSH R12 PUSH RBP PUSH RBX MOV R13,qword ptr [RSI + 0x8] MOV RBP,qword ptr [RSI] CMP RBP,R13 JZ 0x0010152d MOV RBX,qword ptr [RDI] MOV R12,qword ptr [RDI + 0x8] SUB R13,RBP SUB R12,RBX CMP R13,R12 JZ 0x00101540 LAB_001014c4: XOR R14D,R14D CMP R12,R13 JC 0x0010152d MOV RDI,R...
/* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&) */ int8 func0(vector *param_1,vector *param_2) { int *__s1; int iVar1; ulong uVar2; ulong uVar3; int *__s2; ulong uVar4; ulong uVar5; ulong __n; int8 uVar6; uVar6 = 1; __s1 = *(int **)par...
276
func0
#include <iostream> #include <vector> #include <string> #include <cassert> // Function to return the corresponding message based on the flag
std::string func0(const std::vector<std::vector<int>>& Input, int k){ int flag = 1; for(const auto& tuple : Input){ if(tuple.size() != k){ flag = 0; break; } } if(flag == 1){ return "All tuples have same length"; } else{ return ...
int main(){ assert(func0({{11, 22, 33}, {44, 55, 66}}, 3) == "All tuples have same length"); assert(func0({{1, 2, 3}, {4, 5, 6, 7}}, 3) == "All tuples do not have same length"); assert(func0({{1, 2}, {3, 4}}, 2) == "All tuples have same length"); return 0; }
O0
cpp
func0[abi:cxx11](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(%...
_Z5func0B5cxx11RKSt6vectorIS_IiSaIiEESaIS1_EEi: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 68h mov [rbp+var_58], rdi mov [rbp+var_60], rsi mov [rbp+var_64], edx mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax mov [rbp+var_4C], 1 mov rax, [rbp+var_60] mov [rbp+va...
long long func0[abi:cxx11](long long a1, long long a2, int a3) { int v5; // [rsp+24h] [rbp-4Ch] long long v6; // [rsp+28h] [rbp-48h] BYREF _QWORD v7[2]; // [rsp+30h] [rbp-40h] BYREF long long v8; // [rsp+40h] [rbp-30h] _QWORD *v9; // [rsp+48h] [rbp-28h] _QWORD *v10; // [rsp+50h] [rbp-20h] unsigned long l...
func0[abi:cxx11]: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x68 MOV qword ptr [RBP + -0x58],RDI MOV qword ptr [RBP + -0x60],RSI MOV dword ptr [RBP + -0x64],EDX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX MOV dword ptr [RBP + -0x4c],0x1 MOV RAX,qword ptr [RBP + -0x60] MOV qword ptr [RBP ...
/* func0[abi:cxx11](std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, int) */ vector * func0_abi_cxx11_(vector *param_1,int param_2) { bool bVar1; bool bVar2; long lVar3; int in_EDX; int4 in_register_00000034; long in_FS_OFFSET; int8...
277
func0
#include <iostream> #include <vector> #include <string> #include <cassert> // Function to return the corresponding message based on the flag
std::string func0(const std::vector<std::vector<int>>& Input, int k){ int flag = 1; for(const auto& tuple : Input){ if(tuple.size() != k){ flag = 0; break; } } if(flag == 1){ return "All tuples have same length"; } else{ return ...
int main(){ assert(func0({{11, 22, 33}, {44, 55, 66}}, 3) == "All tuples have same length"); assert(func0({{1, 2, 3}, {4, 5, 6, 7}}, 3) == "All tuples do not have same length"); assert(func0({{1, 2}, {3, 4}}, 2) == "All tuples have same length"); return 0; }
O1
cpp
func0[abi:cxx11](std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, int): endbr64 push %rbx mov %rdi,%rbx mov (%rsi),%rcx mov 0x8(%rsi),%rsi cmp %rcx,%rsi je 1379 <_Z5func0B5cxx11RKSt6vectorIS_IiSaIiEESaIS1_EEi+0x30> movslq %edx,%rdx m...
_Z5func0B5cxx11RKSt6vectorIS_IiSaIiEESaIS1_EEi: endbr64 push rbx mov rbx, rdi mov rcx, [rsi] mov rsi, [rsi+8] cmp rsi, rcx jz short loc_1359 movsxd rdx, edx loc_1340: mov rax, [rcx+8] sub rax, [rcx] sar rax, 2 cmp rdx, rax jnz short loc_1375 add rcx, 18h cmp rsi, rcx...
_QWORD * func0[abi:cxx11](_QWORD *a1, long long a2, int a3) { _QWORD *v3; // rcx _QWORD *v4; // rsi v3 = *(_QWORD **)a2; v4 = *(_QWORD **)(a2 + 8); if ( v4 == v3 ) { LABEL_4: *a1 = a1 + 2; std::string::_M_construct<char const*>(a1, "All tuples have same length"); } else { while ( a3 == (l...
func0[abi:cxx11]: ENDBR64 PUSH RBX MOV RBX,RDI MOV RCX,qword ptr [RSI] MOV RSI,qword ptr [RSI + 0x8] CMP RSI,RCX JZ 0x00101359 MOVSXD RDX,EDX LAB_00101340: MOV RAX,qword ptr [RCX + 0x8] SUB RAX,qword ptr [RCX] SAR RAX,0x2 CMP RDX,RAX JNZ 0x00101375 ADD RCX,0x18 CMP RSI,RCX JNZ 0x00101340 LAB_00101359: LEA RAX,[RBX + 0x...
/* func0[abi:cxx11](std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, int) */ vector * func0_abi_cxx11_(vector *param_1,int param_2) { long *plVar1; long *plVar2; int in_EDX; int4 in_register_00000034; plVar2 = *(long **)CONCAT44(in_r...
278
func0
#include <iostream> #include <vector> #include <string> #include <cassert> // Function to return the corresponding message based on the flag
std::string func0(const std::vector<std::vector<int>>& Input, int k){ int flag = 1; for(const auto& tuple : Input){ if(tuple.size() != k){ flag = 0; break; } } if(flag == 1){ return "All tuples have same length"; } else{ return ...
int main(){ assert(func0({{11, 22, 33}, {44, 55, 66}}, 3) == "All tuples have same length"); assert(func0({{1, 2, 3}, {4, 5, 6, 7}}, 3) == "All tuples do not have same length"); assert(func0({{1, 2}, {3, 4}}, 2) == "All tuples have same length"); return 0; }
O2
cpp
func0[abi:cxx11](std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, int): endbr64 push %r12 mov (%rsi),%rcx mov %rdi,%r12 mov 0x8(%rsi),%r8 cmp %r8,%rcx je 1800 <_Z5func0B5cxx11RKSt6vectorIS_IiSaIiEESaIS1_EEi+0x60> movslq %edx,%rsi jmp...
_Z5func0B5cxx11RKSt6vectorIS_IiSaIiEESaIS1_EEi: endbr64 push rbx mov rcx, [rsi] mov rbx, rdi mov rsi, [rsi+8] cmp rsi, rcx jz short loc_1950 movsxd rdx, edx jmp short loc_1919 loc_1910: add rcx, 18h cmp rsi, rcx jz short loc_1950 loc_1919: mov rax, [rcx+8] sub rax, [rcx...
_QWORD * func0[abi:cxx11](_QWORD *a1, long long a2, int a3) { _QWORD *v3; // rcx _QWORD *v4; // rsi v3 = *(_QWORD **)a2; v4 = *(_QWORD **)(a2 + 8); if ( v4 == v3 ) { LABEL_6: *a1 = a1 + 2; std::string::_M_construct<char const*>(a1, "All tuples have same length"); return a1; } else { w...
func0[abi:cxx11]: ENDBR64 PUSH RBX MOV RCX,qword ptr [RSI] MOV RBX,RDI MOV RSI,qword ptr [RSI + 0x8] CMP RSI,RCX JZ 0x00101950 MOVSXD RDX,EDX JMP 0x00101919 LAB_00101910: ADD RCX,0x18 CMP RSI,RCX JZ 0x00101950 LAB_00101919: MOV RAX,qword ptr [RCX + 0x8] SUB RAX,qword ptr [RCX] SAR RAX,0x2 CMP RDX,RAX JZ 0x00101910 LEA ...
/* func0[abi:cxx11](std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, int) */ vector * func0_abi_cxx11_(vector *param_1,int param_2) { long *plVar1; long *plVar2; int in_EDX; int4 in_register_00000034; plVar2 = *(long **)CONCAT44(in_r...
279
func0
#include <iostream> #include <vector> #include <string> #include <cassert> // Function to return the corresponding message based on the flag
std::string func0(const std::vector<std::vector<int>>& Input, int k){ int flag = 1; for(const auto& tuple : Input){ if(tuple.size() != k){ flag = 0; break; } } if(flag == 1){ return "All tuples have same length"; } else{ return ...
int main(){ assert(func0({{11, 22, 33}, {44, 55, 66}}, 3) == "All tuples have same length"); assert(func0({{1, 2, 3}, {4, 5, 6, 7}}, 3) == "All tuples do not have same length"); assert(func0({{1, 2}, {3, 4}}, 2) == "All tuples have same length"); return 0; }
O3
cpp
func0[abi:cxx11](std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, int): endbr64 push %r12 mov %rdi,%r12 sub $0x10,%rsp mov (%rsi),%rcx mov 0x8(%rsi),%rsi mov %fs:0x28,%rax mov %rax,0x8(%rsp) xor %eax,%eax cmp %rsi,%rcx je ...
_Z5func0B5cxx11RKSt6vectorIS_IiSaIiEESaIS1_EEi: endbr64 push rbx mov rbx, rdi sub rsp, 10h mov rcx, [rsi] mov rsi, [rsi+8] mov rax, fs:28h mov [rsp+18h+var_10], rax xor eax, eax cmp rsi, rcx jz loc_1900 movsxd rdx, edx jmp short loc_1881 loc_1878: add rcx, 18h cmp rs...
long long * func0[abi:cxx11](long long *a1, long long a2, int a3) { _QWORD *v3; // rcx _QWORD *v4; // rsi long long v5; // rax long long v6; // rdx __m128i v7; // xmm0 __m128i v8; // xmm0 long long v9; // rax long long v10; // rdx long long v12; // rax long long v13; // rdx __m128i si128; // xmm0 ...
func0[abi:cxx11]: ENDBR64 PUSH RBX MOV RBX,RDI SUB RSP,0x10 MOV RCX,qword ptr [RSI] MOV RSI,qword ptr [RSI + 0x8] MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x8],RAX XOR EAX,EAX CMP RSI,RCX JZ 0x00101900 MOVSXD RDX,EDX JMP 0x00101881 LAB_00101878: ADD RCX,0x18 CMP RSI,RCX JZ 0x00101900 LAB_00101881: MOV RAX,qword...
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* func0[abi:cxx11](std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, int) */ vector * func0_abi_cxx11_(vector *param_1,int param_2) { long *plVar1; int8 uVar...
280
func0
#include <vector> #include <cassert>
std::vector<int> func0(std::vector<int>& nums) { float shrink_fact = 1.3; int gaps = nums.size(); bool swapped = true; int i = 0; while (gaps > 1 || swapped) { gaps = int(gaps / shrink_fact); swapped = false; i = 0; while (gaps + i < nums.size()) { ...
int main() { std::vector<int> sorted; std::vector<int> vec1 = std::vector<int>{5, 15, 37, 25, 79}; std::vector<int> vec2 = std::vector<int>{41, 32, 15, 19, 22}; std::vector<int> vec3 = std::vector<int>{99, 15, 13, 47}; sorted = func0(vec1); assert((sorted == std::vector<int>{5, 15, 25, 37,...
O0
cpp
func0(std::vector<int, std::allocator<int> >&): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x28,%rsp mov %rdi,-0x28(%rbp) mov %rsi,-0x30(%rbp) movss 0x1ec6(%rip),%xmm0 movss %xmm0,-0x14(%rbp) mov -0x30(%rbp),%rax mov %rax,%rdi callq 1a12 <_ZNKSt6vectorIiSaIiEE4sizeEv> mov %eax,-0x1c(%rbp...
_Z5func0RSt6vectorIiSaIiEE: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 28h mov [rbp+var_28], rdi mov [rbp+var_30], rsi movss xmm0, cs:dword_310C movss [rbp+var_14], xmm0 mov rax, [rbp+var_30] mov rdi, rax call _ZNKSt6vectorIiSaIiEE4sizeEv; std::vector<int>::size(void) mov [...
long long func0(long long a1, long long a2) { int v2; // ebx long long v3; // rbx long long v4; // rax char v6; // [rsp+13h] [rbp-1Dh] int v7; // [rsp+14h] [rbp-1Ch] int i; // [rsp+18h] [rbp-18h] v7 = std::vector<int>::size(a2); v6 = 1; while ( v7 > 1 || v6 ) { v7 = (int)(float)((float)v7 / 1....
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x28 MOV qword ptr [RBP + -0x28],RDI MOV qword ptr [RBP + -0x30],RSI MOVSS XMM0,dword ptr [0x0010310c] MOVSS dword ptr [RBP + -0x14],XMM0 MOV RAX,qword ptr [RBP + -0x30] MOV RDI,RAX CALL 0x00101a74 MOV dword ptr [RBP + -0x1c],EAX MOV byte ptr [RBP + -0x1d],0x1 MOV dw...
/* func0(std::vector<int, std::allocator<int> >&) */ vector * func0(vector *param_1) { int iVar1; bool bVar2; float fVar3; int *piVar4; int *piVar5; ulong uVar6; vector<int,std::allocator<int>> *in_RSI; int4 local_24; int4 local_20; fVar3 = DAT_0010310c; local_24 = std::vector<int,std::alloca...
281
func0
#include <vector> #include <cassert>
std::vector<int> func0(std::vector<int>& nums) { float shrink_fact = 1.3; int gaps = nums.size(); bool swapped = true; int i = 0; while (gaps > 1 || swapped) { gaps = int(gaps / shrink_fact); swapped = false; i = 0; while (gaps + i < nums.size()) { ...
int main() { std::vector<int> sorted; std::vector<int> vec1 = std::vector<int>{5, 15, 37, 25, 79}; std::vector<int> vec2 = std::vector<int>{41, 32, 15, 19, 22}; std::vector<int> vec3 = std::vector<int>{99, 15, 13, 47}; sorted = func0(vec1); assert((sorted == std::vector<int>{5, 15, 25, 37,...
O1
cpp
func0(std::vector<int, std::allocator<int> >&): endbr64 push %r13 push %r12 push %rbp push %rbx sub $0x8,%rsp mov %rdi,%rbp mov %rsi,%rbx mov 0x8(%rsi),%r9 sub (%rsi),%r9 sar $0x2,%r9 movss 0xe98(%rip),%xmm1 mov $0x0,%r12d mov $0x1,%r11d jmp 12a9 <_Z5func0RSt6vectorIiSaIiEE+0x40> cmp...
_Z5func0RSt6vectorIiSaIiEE: endbr64 push r13 push r12 push rbp push rbx sub rsp, 8 mov rbp, rdi mov rbx, rsi mov r9, [rsi+8] sub r9, [rsi] sar r9, 2 movss xmm1, cs:dword_2004 mov r11d, 0 mov r10d, 1 jmp short loc_12E5 loc_129E: add rdx, 1 mov rcx, [rbx] add ...
_QWORD * func0(_QWORD *a1, _QWORD *a2) { long long v4; // r9 unsigned long long v5; // rdx _DWORD *v6; // rcx long long v7; // rsi int v8; // edi _DWORD *v9; // rax char v10; // r12 unsigned long long v11; // r13 _DWORD *v12; // r12 _DWORD *v13; // rsi signed long long v14; // rbx v4 = (long lo...
func0: ENDBR64 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x8 MOV RBP,RDI MOV RBX,RSI MOV R9,qword ptr [RSI + 0x8] SUB R9,qword ptr [RSI] SAR R9,0x2 MOVSS XMM1,dword ptr [0x00102004] MOV R11D,0x0 MOV R10D,0x1 JMP 0x001012e5 LAB_0010129e: ADD RDX,0x1 MOV RCX,qword ptr [RBX] ADD RSI,0x4 MOV RAX,qword ptr [RBX + 0x8] SUB...
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* func0(std::vector<int, std::allocator<int> >&) */ vector * func0(vector *param_1) { int *piVar1; int iVar2; int iVar3; int4 *__src; bool bVar4; float fVar5; int4 *__dest; long lVar6; ulong uVar7; size_t __n; ...