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
1,782
func0
#include <vector> #include <cassert>
int func0(const std::vector<char>& tup, const std::vector<char>& lst) { int count = 0; for (char item : tup) { for (char val : lst) { if (item == val) { count++; break; } } } return count; }
int main() { assert(func0({'a', 'a', 'c', 'b', 'd'}, {'a', 'b'}) == 3); assert(func0({1, 2, 3, 1, 4, 6, 7, 1, 4}, {1, 4, 7}) == 6); assert(func0({1, 2, 3, 4, 5, 6}, {1, 2}) == 2); return 0; }
O2
cpp
func0(std::vector<char, std::allocator<char> > const&, std::vector<char, std::allocator<char> > const&): endbr64 mov %rsi,%rax mov 0x8(%rdi),%r8 mov (%rdi),%rsi cmp %r8,%rsi je 158e <_Z5func0RKSt6vectorIcSaIcEES3_+0x4e> mov (%rax),%rdi mov 0x8(%rax),%rcx xor %r9d,%r9d nopl (%rax) movzbl (%rsi...
_Z5func0RKSt6vectorIcSaIcEES3_: endbr64 mov rax, rsi mov r8, [rdi+8] mov rsi, [rdi] cmp r8, rsi jz short loc_14AE mov rdi, [rax] mov rcx, [rax+8] xor r9d, r9d nop dword ptr [rax] loc_1480: movzx edx, byte ptr [rsi] cmp rdi, rcx jz short loc_14A1 mov rax, rdi jmp s...
long long func0(long long a1, _QWORD *a2) { _BYTE *v3; // r8 _BYTE *v4; // rsi _BYTE *v5; // rdi _BYTE *v6; // rcx unsigned int v7; // r9d _BYTE *v8; // rax v3 = *(_BYTE **)(a1 + 8); v4 = *(_BYTE **)a1; if ( v3 == *(_BYTE **)a1 ) return 0LL; v5 = (_BYTE *)*a2; v6 = (_BYTE *)a2[1]; v7 = 0; ...
func0: ENDBR64 MOV RAX,RSI MOV R8,qword ptr [RDI + 0x8] MOV RSI,qword ptr [RDI] CMP R8,RSI JZ 0x001014ae MOV RDI,qword ptr [RAX] MOV RCX,qword ptr [RAX + 0x8] XOR R9D,R9D NOP dword ptr [RAX] LAB_00101480: MOVZX EDX,byte ptr [RSI] CMP RDI,RCX JZ 0x001014a1 MOV RAX,RDI JMP 0x00101499 LAB_00101490: ADD RAX,0x1 CMP RCX,RAX...
/* func0(std::vector<char, std::allocator<char> > const&, std::vector<char, std::allocator<char> > const&) */ int func0(vector *param_1,vector *param_2) { char *pcVar1; char *pcVar2; int iVar3; pcVar2 = *(char **)param_1; if (*(char **)(param_1 + 8) == pcVar2) { return 0; } iVar3 = 0; do { ...
1,783
func0
#include <vector> #include <cassert>
int func0(const std::vector<char>& tup, const std::vector<char>& lst) { int count = 0; for (char item : tup) { for (char val : lst) { if (item == val) { count++; break; } } } return count; }
int main() { assert(func0({'a', 'a', 'c', 'b', 'd'}, {'a', 'b'}) == 3); assert(func0({1, 2, 3, 1, 4, 6, 7, 1, 4}, {1, 4, 7}) == 6); assert(func0({1, 2, 3, 4, 5, 6}, {1, 2}) == 2); return 0; }
O3
cpp
func0(std::vector<char, std::allocator<char> > const&, std::vector<char, std::allocator<char> > const&): endbr64 mov %rsi,%rax mov 0x8(%rdi),%r8 mov (%rdi),%rsi cmp %r8,%rsi je 158e <_Z5func0RKSt6vectorIcSaIcEES3_+0x4e> mov (%rax),%rdi mov 0x8(%rax),%rcx xor %r9d,%r9d nopl (%rax) movzbl (%rsi...
_Z5func0RKSt6vectorIcSaIcEES3_: endbr64 mov rax, rsi mov r8, [rdi+8] mov rsi, [rdi] cmp r8, rsi jz short loc_157E mov rdi, [rax] mov rcx, [rax+8] xor r9d, r9d nop dword ptr [rax] loc_1550: movzx edx, byte ptr [rsi] cmp rdi, rcx jz short loc_1571 mov rax, rdi jmp s...
long long func0(long long a1, _QWORD *a2) { _BYTE *v3; // r8 _BYTE *v4; // rsi _BYTE *v5; // rdi _BYTE *v6; // rcx unsigned int v7; // r9d _BYTE *v8; // rax v3 = *(_BYTE **)(a1 + 8); v4 = *(_BYTE **)a1; if ( v3 == *(_BYTE **)a1 ) return 0LL; v5 = (_BYTE *)*a2; v6 = (_BYTE *)a2[1]; v7 = 0; ...
func0: ENDBR64 MOV RAX,RSI MOV R8,qword ptr [RDI + 0x8] MOV RSI,qword ptr [RDI] CMP R8,RSI JZ 0x0010157e MOV RDI,qword ptr [RAX] MOV RCX,qword ptr [RAX + 0x8] XOR R9D,R9D NOP dword ptr [RAX] LAB_00101550: MOVZX EDX,byte ptr [RSI] CMP RDI,RCX JZ 0x00101571 MOV RAX,RDI JMP 0x00101569 LAB_00101560: ADD RAX,0x1 CMP RCX,RAX...
/* func0(std::vector<char, std::allocator<char> > const&, std::vector<char, std::allocator<char> > const&) */ int func0(vector *param_1,vector *param_2) { char *pcVar1; char *pcVar2; int iVar3; pcVar2 = *(char **)param_1; if (*(char **)(param_1 + 8) == pcVar2) { return 0; } iVar3 = 0; do { ...
1,784
func0
#include <vector> #include <assert.h>
std::vector<int> func0(std::vector<int> nums) { std::vector<int> cube_nums; for (int num : nums) { cube_nums.push_back(num * num * num); } return cube_nums; }
int main() { assert((func0({1, 2, 3, 4, 5, 6, 7, 8, 9, 10}) == std::vector<int>{1, 8, 27, 64, 125, 216, 343, 512, 729, 1000})); assert((func0({10, 20, 30}) == std::vector<int>{1000, 8000, 27000})); assert((func0({12, 15}) == std::vector<int>{1728, 3375})); return 0; }
O0
cpp
func0(std::vector<int, std::allocator<int> >): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x48,%rsp mov %rdi,-0x48(%rbp) mov %rsi,-0x50(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax mov -0x48(%rbp),%rax mov %rax,%rdi callq 1a12 <_ZNSt6vectorIiSaIiEEC1Ev> mov -0x50(%rb...
_Z5func0St6vectorIiSaIiEE: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 48h mov [rbp+var_48], rdi mov [rbp+var_50], rsi mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax mov rax, [rbp+var_48] mov rdi, rax call _ZNSt6vectorIiSaIiEEC2Ev; std::vector<int>::vector(void) mov ...
long long func0(long long a1, long long a2) { int v3; // [rsp+18h] [rbp-38h] BYREF int v4; // [rsp+1Ch] [rbp-34h] long long v5; // [rsp+20h] [rbp-30h] BYREF _QWORD v6[4]; // [rsp+28h] [rbp-28h] BYREF v6[2] = __readfsqword(0x28u); std::vector<int>::vector(a1); v6[1] = a2; v5 = std::vector<int>::begin(a...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x48 MOV qword ptr [RBP + -0x48],RDI MOV qword ptr [RBP + -0x50],RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX MOV RAX,qword ptr [RBP + -0x48] MOV RDI,RAX CALL 0x00101a96 MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x20],RAX MO...
/* func0(std::vector<int, std::allocator<int> >) */ vector<int,std::allocator<int>> * func0(vector param_1) { bool bVar1; int *piVar2; vector<int,std::allocator<int>> *in_RSI; int4 in_register_0000003c; vector<int,std::allocator<int>> *this; long in_FS_OFFSET; int local_40; int local_3c; int8 local_...
1,785
func0
#include <vector> #include <assert.h>
std::vector<int> func0(std::vector<int> nums) { std::vector<int> cube_nums; for (int num : nums) { cube_nums.push_back(num * num * num); } return cube_nums; }
int main() { assert((func0({1, 2, 3, 4, 5, 6, 7, 8, 9, 10}) == std::vector<int>{1, 8, 27, 64, 125, 216, 343, 512, 729, 1000})); assert((func0({10, 20, 30}) == std::vector<int>{1000, 8000, 27000})); assert((func0({12, 15}) == std::vector<int>{1728, 3375})); return 0; }
O1
cpp
func0(std::vector<int, std::allocator<int> >): endbr64 push %r13 push %r12 push %rbp push %rbx sub $0x18,%rsp mov %rdi,%rbx mov %fs:0x28,%rax mov %rax,0x8(%rsp) xor %eax,%eax movq $0x0,(%rdi) movq $0x0,0x8(%rdi) movq $0x0,0x10(%rdi) mov (%rsi),%rbp mov 0x8(%rsi),%r12 cmp %r12,%rbp ...
_Z5func0St6vectorIiSaIiEE: endbr64 push r13 push r12 push rbp push rbx sub rsp, 18h mov rbx, rdi mov rax, fs:28h mov [rsp+38h+var_30], rax xor eax, eax mov qword ptr [rdi], 0 mov qword ptr [rdi+8], 0 mov qword ptr [rdi+10h], 0 mov rbp, [rsi] mov r12, [rsi+8] cmp r...
_QWORD * func0(_QWORD *a1, long long a2) { _DWORD *v2; // rbp _DWORD *v3; // r12 int v4; // eax int *v5; // rsi int v7; // [rsp+4h] [rbp-34h] BYREF unsigned long long v8; // [rsp+8h] [rbp-30h] v8 = __readfsqword(0x28u); *a1 = 0LL; a1[1] = 0LL; a1[2] = 0LL; v2 = *(_DWORD **)a2; v3 = *(_DWORD **)...
func0: ENDBR64 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x18 MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x8],RAX XOR EAX,EAX MOV qword ptr [RDI],0x0 MOV qword ptr [RDI + 0x8],0x0 MOV qword ptr [RDI + 0x10],0x0 MOV RBP,qword ptr [RSI] MOV R12,qword ptr [RSI + 0x8] CMP R12,RBP JZ 0x001012f6 LEA R13,[...
/* func0(std::vector<int, std::allocator<int> >) */ vector<int,std::allocator<int>> * func0(vector param_1) { int *piVar1; int *piVar2; int *piVar3; int8 *in_RSI; int4 in_register_0000003c; vector<int,std::allocator<int>> *this; long in_FS_OFFSET; int local_34; long local_30; this = (vector<int...
1,786
func0
#include <vector> #include <assert.h>
std::vector<int> func0(std::vector<int> nums) { std::vector<int> cube_nums; for (int num : nums) { cube_nums.push_back(num * num * num); } return cube_nums; }
int main() { assert((func0({1, 2, 3, 4, 5, 6, 7, 8, 9, 10}) == std::vector<int>{1, 8, 27, 64, 125, 216, 343, 512, 729, 1000})); assert((func0({10, 20, 30}) == std::vector<int>{1000, 8000, 27000})); assert((func0({12, 15}) == std::vector<int>{1728, 3375})); return 0; }
O2
cpp
func0(std::vector<int, std::allocator<int> >): endbr64 push %r13 push %r12 mov %rdi,%r12 push %rbp push %rbx sub $0x18,%rsp mov %fs:0x28,%rax mov %rax,0x8(%rsp) xor %eax,%eax movq $0x0,(%rdi) movq $0x0,0x8(%rdi) movq $0x0,0x10(%rdi) mov (%rsi),%rbx mov 0x8(%rsi),%rbp cmp %rbp,%rbx ...
_Z5func0St6vectorIiSaIiEE: endbr64 push r13 pxor xmm0, xmm0 push r12 push rbp mov rbp, rdi push rbx sub rsp, 18h mov rax, fs:28h mov [rsp+38h+var_30], rax xor eax, eax mov qword ptr [rdi+10h], 0 movups xmmword ptr [rdi], xmm0 mov rbx, [rsi] mov r12, [rsi+8] cmp r12, r...
long long func0(long long a1, long long a2) { _DWORD *v2; // rbx _DWORD *v3; // r12 int *v4; // rcx int *v5; // rsi int v6; // eax int v8; // [rsp+0h] [rbp-34h] BYREF unsigned long long v9; // [rsp+4h] [rbp-30h] v9 = __readfsqword(0x28u); *(_QWORD *)(a1 + 16) = 0LL; *(_OWORD *)a1 = 0LL; v2 = *(_...
func0: ENDBR64 PUSH R13 PXOR XMM0,XMM0 PUSH R12 PUSH RBP MOV RBP,RDI PUSH RBX SUB RSP,0x18 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x8],RAX XOR EAX,EAX MOV qword ptr [RDI + 0x10],0x0 MOVUPS xmmword ptr [RDI],XMM0 MOV RBX,qword ptr [RSI] MOV R12,qword ptr [RSI + 0x8] CMP R12,RBX JZ 0x001016b8 XOR ECX,ECX XOR ES...
/* func0(std::vector<int, std::allocator<int> >) */ vector<int,std::allocator<int>> * func0(vector param_1) { int *piVar1; int *piVar2; int *piVar3; int8 *in_RSI; int *piVar4; int4 in_register_0000003c; vector<int,std::allocator<int>> *this; long in_FS_OFFSET; int local_34; long local_30; thi...
1,787
func0
#include <vector> #include <assert.h>
std::vector<int> func0(std::vector<int> nums) { std::vector<int> cube_nums; for (int num : nums) { cube_nums.push_back(num * num * num); } return cube_nums; }
int main() { assert((func0({1, 2, 3, 4, 5, 6, 7, 8, 9, 10}) == std::vector<int>{1, 8, 27, 64, 125, 216, 343, 512, 729, 1000})); assert((func0({10, 20, 30}) == std::vector<int>{1000, 8000, 27000})); assert((func0({12, 15}) == std::vector<int>{1728, 3375})); return 0; }
O3
cpp
func0(std::vector<int, std::allocator<int> >): endbr64 push %r13 pxor %xmm0,%xmm0 push %r12 mov %rdi,%r12 push %rbp push %rbx sub $0x18,%rsp mov %fs:0x28,%rax mov %rax,0x8(%rsp) xor %eax,%eax movq $0x0,0x10(%rdi) movups %xmm0,(%rdi) mov (%rsi),%rbx mov 0x8(%rsi),%rbp cmp %rbp,%rbx je...
_Z5func0St6vectorIiSaIiEE: endbr64 push r15 pxor xmm0, xmm0 push r14 push r13 push r12 mov r12, rdi push rbp push rbx sub rsp, 28h mov qword ptr [rdi+10h], 0 movups xmmword ptr [rdi], xmm0 mov r13, [rsi+8] mov rbx, [rsi] cmp r13, rbx jz loc_16F2 xor r8d, r8d xor ...
long long func0(long long a1, long long a2) { _DWORD *v3; // r13 _DWORD *v4; // rbx char *v5; // r8 char *v6; // rcx int v7; // ebp char *v8; // r15 signed long long v9; // r14 unsigned long long v10; // rax unsigned long long v11; // rdx char *v12; // r9 char *v14; // rax unsigned long long v1...
func0: ENDBR64 PUSH R15 PXOR XMM0,XMM0 PUSH R14 PUSH R13 PUSH R12 MOV R12,RDI PUSH RBP PUSH RBX SUB RSP,0x28 MOV qword ptr [RDI + 0x10],0x0 MOVUPS xmmword ptr [RDI],XMM0 MOV R13,qword ptr [RSI + 0x8] MOV RBX,qword ptr [RSI] CMP R13,RBX JZ 0x001016f2 XOR R8D,R8D XOR ECX,ECX JMP 0x00101668 LAB_00101650: MOV dword ptr [RC...
/* func0(std::vector<int, std::allocator<int> >) */ int (*) [16] func0(vector param_1) { int *piVar1; int *__src; ulong uVar2; void *__dest; int (*pauVar3) [16]; int *piVar4; int *piVar5; int iVar6; int8 *in_RSI; vector vVar7; int4 in_register_0000003c; int *piVar8; size_t __n; ulong local...
1,788
func0
#include <assert.h>
int func0(int n) { int a = 3; int b = 0; int c = 2; if (n == 0) { return 3; } if (n == 1) { return 3; } if (n == 2) { return 5; } int sum = 5; while (n > 2) { int d = a + b; sum = sum + d; a = b; b = c;...
int main() { assert(func0(9) == 49); assert(func0(10) == 66); assert(func0(11) == 88); return 0; }
O0
cpp
func0(int): endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x24(%rbp) movl $0x3,-0x14(%rbp) movl $0x0,-0x10(%rbp) movl $0x2,-0xc(%rbp) cmpl $0x0,-0x24(%rbp) jne 1176 <_Z5func0i+0x2d> mov $0x3,%eax jmp 11c9 <_Z5func0i+0x80> cmpl $0x1,-0x24(%rbp) jne 1183 <_Z5func0i+0x3a> mov $0x3,%eax jmp ...
_Z5func0i: endbr64 push rbp mov rbp, rsp mov [rbp+var_24], edi mov [rbp+var_14], 3 mov [rbp+var_10], 0 mov [rbp+var_C], 2 cmp [rbp+var_24], 0 jnz short loc_1176 mov eax, 3 jmp short loc_11C9 loc_1176: cmp [rbp+var_24], 1 jnz short loc_1183 mov eax, 3 jmp short loc_...
long long func0(int a1) { int v2; // [rsp+0h] [rbp-24h] int v3; // [rsp+10h] [rbp-14h] int v4; // [rsp+14h] [rbp-10h] int v5; // [rsp+18h] [rbp-Ch] unsigned int v6; // [rsp+1Ch] [rbp-8h] int v7; // [rsp+20h] [rbp-4h] v2 = a1; v3 = 3; v4 = 0; v5 = 2; switch ( a1 ) { case 0: return 3LL...
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x24],EDI MOV dword ptr [RBP + -0x14],0x3 MOV dword ptr [RBP + -0x10],0x0 MOV dword ptr [RBP + -0xc],0x2 CMP dword ptr [RBP + -0x24],0x0 JNZ 0x00101176 MOV EAX,0x3 JMP 0x001011c9 LAB_00101176: CMP dword ptr [RBP + -0x24],0x1 JNZ 0x00101183 MOV EAX,0x3 JMP 0x0010...
/* func0(int) */ int func0(int param_1) { int iVar1; int4 local_2c; int4 local_1c; int4 local_18; int4 local_14; int4 local_10; local_1c = 3; local_18 = 0; local_14 = 2; if (param_1 == 0) { local_10 = 3; } else if (param_1 == 1) { local_10 = 3; } else if (param_1 == 2) { loc...
1,789
func0
#include <assert.h>
int func0(int n) { int a = 3; int b = 0; int c = 2; if (n == 0) { return 3; } if (n == 1) { return 3; } if (n == 2) { return 5; } int sum = 5; while (n > 2) { int d = a + b; sum = sum + d; a = b; b = c;...
int main() { assert(func0(9) == 49); assert(func0(10) == 66); assert(func0(11) == 88); return 0; }
O1
cpp
func0(int): endbr64 mov $0x3,%ecx cmp $0x1,%edi jbe 1188 <_Z5func0i+0x3f> cmp $0x2,%edi jle 118b <_Z5func0i+0x42> mov $0x5,%ecx mov $0x2,%r8d mov $0x0,%eax mov $0x3,%esi jmp 1176 <_Z5func0i+0x2d> mov %edx,%r8d lea (%rsi,%rax,1),%edx add %edx,%ecx sub $0x1,%edi mov %eax,%esi ...
_Z5func0i: endbr64 mov ecx, 3 cmp edi, 1 jbe short loc_1188 cmp edi, 2 jle short loc_118B mov ecx, 5 mov r8d, 2 mov eax, 0 mov esi, 3 jmp short loc_1176 loc_1173: mov r8d, edx loc_1176: lea edx, [rsi+rax] add ecx, edx sub edi, 1 mov esi, eax mov eax, r8d c...
long long func0(int a1) { unsigned int v1; // ecx int v2; // r8d int v3; // eax int v4; // esi int v5; // edx v1 = 3; if ( (unsigned int)a1 > 1 ) { if ( a1 <= 2 ) { return 5; } else { v1 = 5; v2 = 2; v3 = 0; v4 = 3; while ( 1 ) { v5...
func0: ENDBR64 MOV ECX,0x3 CMP EDI,0x1 JBE 0x00101188 CMP EDI,0x2 JLE 0x0010118b MOV ECX,0x5 MOV R8D,0x2 MOV EAX,0x0 MOV ESI,0x3 JMP 0x00101176 LAB_00101173: MOV R8D,EDX LAB_00101176: LEA EDX,[RSI + RAX*0x1] ADD ECX,EDX SUB EDI,0x1 MOV ESI,EAX MOV EAX,R8D CMP EDI,0x2 JNZ 0x00101173 LAB_00101188: MOV EAX,ECX RET LAB_001...
/* func0(int) */ int func0(int param_1) { int iVar1; int iVar2; int iVar3; int iVar4; int iVar5; iVar3 = 3; if (1 < (uint)param_1) { if (param_1 < 3) { iVar3 = 5; } else { iVar3 = 5; iVar1 = 2; iVar4 = 3; iVar2 = 0; do { iVar5 = iVar1; i...
1,790
func0
#include <assert.h>
int func0(int n) { int a = 3; int b = 0; int c = 2; if (n == 0) { return 3; } if (n == 1) { return 3; } if (n == 2) { return 5; } int sum = 5; while (n > 2) { int d = a + b; sum = sum + d; a = b; b = c;...
int main() { assert(func0(9) == 49); assert(func0(10) == 66); assert(func0(11) == 88); return 0; }
O2
cpp
func0(int): endbr64 mov $0x3,%r8d cmp $0x1,%edi jbe 1294 <_Z5func0i+0x44> cmp $0x2,%edi jle 12a0 <_Z5func0i+0x50> mov $0x2,%esi mov $0x5,%r8d xor %eax,%eax mov $0x3,%ecx jmp 1282 <_Z5func0i+0x32> nopl 0x0(%rax,%rax,1) mov %edx,%esi lea (%rcx,%rax,1),%edx sub $0x1,%edi mov %ea...
_Z5func0i: endbr64 mov ecx, 3 cmp edi, 1 jbe short loc_128D cmp edi, 2 jle short loc_1290 mov edx, 2 mov ecx, 5 xor eax, eax mov esi, 3 nop dword ptr [rax+00h] loc_1278: mov r8d, edx sub edi, 1 lea edx, [rax+rsi] mov esi, eax add ecx, edx mov eax, r8d cmp ...
long long func0(int a1) { unsigned int v1; // ecx int v2; // edx int v3; // eax int v4; // esi int v5; // r8d v1 = 3; if ( (unsigned int)a1 > 1 ) { if ( a1 <= 2 ) { return 5; } else { v2 = 2; v1 = 5; v3 = 0; v4 = 3; do { v5 = v2; ...
func0: ENDBR64 MOV ECX,0x3 CMP EDI,0x1 JBE 0x0010128d CMP EDI,0x2 JLE 0x00101290 MOV EDX,0x2 MOV ECX,0x5 XOR EAX,EAX MOV ESI,0x3 NOP dword ptr [RAX] LAB_00101278: MOV R8D,EDX SUB EDI,0x1 LEA EDX,[RAX + RSI*0x1] MOV ESI,EAX ADD ECX,EDX MOV EAX,R8D CMP EDI,0x2 JNZ 0x00101278 LAB_0010128d: MOV EAX,ECX RET LAB_00101290: MO...
/* func0(int) */ int func0(int param_1) { int iVar1; int iVar2; int iVar3; int iVar4; int iVar5; iVar2 = 3; if (1 < (uint)param_1) { if (param_1 < 3) { iVar2 = 5; } else { iVar2 = 5; iVar4 = 2; iVar3 = 0; iVar5 = 3; do { iVar1 = iVar3; i...
1,791
func0
#include <assert.h>
int func0(int n) { int a = 3; int b = 0; int c = 2; if (n == 0) { return 3; } if (n == 1) { return 3; } if (n == 2) { return 5; } int sum = 5; while (n > 2) { int d = a + b; sum = sum + d; a = b; b = c;...
int main() { assert(func0(9) == 49); assert(func0(10) == 66); assert(func0(11) == 88); return 0; }
O3
cpp
func0(int): endbr64 mov $0x3,%r8d cmp $0x1,%edi jbe 1184 <_Z5func0i+0x44> cmp $0x2,%edi jle 1190 <_Z5func0i+0x50> mov $0x2,%esi mov $0x5,%r8d xor %eax,%eax mov $0x3,%ecx jmp 1172 <_Z5func0i+0x32> nopl 0x0(%rax,%rax,1) mov %edx,%esi lea (%rcx,%rax,1),%edx sub $0x1,%edi mov %ea...
_Z5func0i: endbr64 mov ecx, 3 cmp edi, 1 jbe short loc_117D cmp edi, 2 jle short loc_1180 mov edx, 2 mov ecx, 5 xor eax, eax mov esi, 3 nop dword ptr [rax+00h] loc_1168: mov r8d, edx sub edi, 1 lea edx, [rax+rsi] mov esi, eax add ecx, edx mov eax, r8d cmp ...
long long func0(int a1) { unsigned int v1; // ecx int v2; // edx int v3; // eax int v4; // esi int v5; // r8d v1 = 3; if ( (unsigned int)a1 > 1 ) { if ( a1 <= 2 ) { return 5; } else { v2 = 2; v1 = 5; v3 = 0; v4 = 3; do { v5 = v2; ...
func0: ENDBR64 MOV ECX,0x3 CMP EDI,0x1 JBE 0x0010117d CMP EDI,0x2 JLE 0x00101180 MOV EDX,0x2 MOV ECX,0x5 XOR EAX,EAX MOV ESI,0x3 NOP dword ptr [RAX] LAB_00101168: MOV R8D,EDX SUB EDI,0x1 LEA EDX,[RAX + RSI*0x1] MOV ESI,EAX ADD ECX,EDX MOV EAX,R8D CMP EDI,0x2 JNZ 0x00101168 LAB_0010117d: MOV EAX,ECX RET LAB_00101180: MO...
/* func0(int) */ int func0(int param_1) { int iVar1; int iVar2; int iVar3; int iVar4; int iVar5; iVar2 = 3; if (1 < (uint)param_1) { if (param_1 < 3) { iVar2 = 5; } else { iVar2 = 5; iVar4 = 2; iVar3 = 0; iVar5 = 3; do { iVar1 = iVar3; i...
1,792
func0
#include <string> #include <assert.h>
std::string func0(int x1, int y1, int x2, int y2, int x3, int y3) { int a = (x1*(y2-y3) + x2*(y3-y1) + x3*(y1-y2)); if (a == 0) { return "No"; } else { return "Yes"; } }
int main() { assert(func0(1, 5, 2, 5, 4, 6) == "Yes"); assert(func0(1, 1, 1, 4, 1, 5) == "No"); assert(func0(1, 1, 1, 1, 1, 1) == "No"); return 0; }
O0
cpp
func0[abi:cxx11](int, int, int, int, int, int): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x38,%rsp mov %rdi,-0x28(%rbp) mov %esi,-0x2c(%rbp) mov %edx,-0x30(%rbp) mov %ecx,-0x34(%rbp) mov %r8d,-0x38(%rbp) mov %r9d,-0x3c(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax...
_Z5func0B5cxx11iiiiii: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 48h mov [rbp+var_38], rdi mov [rbp+var_3C], esi mov [rbp+var_40], edx mov [rbp+var_44], ecx mov [rbp+var_48], r8d mov [rbp+var_4C], r9d mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax mov eax,...
long long func0[abi:cxx11](long long a1, int a2, int a3, int a4, int a5, int a6, int a7) { char v8; // [rsp+23h] [rbp-2Dh] BYREF char *v10; // [rsp+28h] [rbp-28h] char *v11; // [rsp+30h] [rbp-20h] unsigned long long v12; // [rsp+38h] [rbp-18h] v12 = __readfsqword(0x28u); if ( a4 * (a7 - a3) + a2 * (a5 - a...
func0[abi:cxx11]: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x48 MOV qword ptr [RBP + -0x38],RDI MOV dword ptr [RBP + -0x3c],ESI MOV dword ptr [RBP + -0x40],EDX MOV dword ptr [RBP + -0x44],ECX MOV dword ptr [RBP + -0x48],R8D MOV dword ptr [RBP + -0x4c],R9D MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX...
/* func0[abi:cxx11](int, int, int, int, int, int) */ string * func0_abi_cxx11_(int param_1,int param_2,int param_3,int param_4,int param_5,int param_6, int param_7) { int4 in_register_0000003c; string *this; long in_FS_OFFSET; allocator local_35; int local_34; allocator *local_30;...
1,793
func0
#include <string> #include <assert.h>
std::string func0(int x1, int y1, int x2, int y2, int x3, int y3) { int a = (x1*(y2-y3) + x2*(y3-y1) + x3*(y1-y2)); if (a == 0) { return "No"; } else { return "Yes"; } }
int main() { assert(func0(1, 5, 2, 5, 4, 6) == "Yes"); assert(func0(1, 1, 1, 4, 1, 5) == "No"); assert(func0(1, 1, 1, 1, 1, 1) == "No"); return 0; }
O1
cpp
func0[abi:cxx11](int, int, int, int, int, int): endbr64 push %rbx mov %rdi,%rbx mov %esi,%edi mov %ecx,%eax mov 0x10(%rsp),%ecx mov %r8d,%esi sub %ecx,%esi imul %edi,%esi sub %edx,%ecx imul %eax,%ecx add %esi,%ecx sub %r8d,%edx imul %r9d,%edx add %edx,%ecx jne 1252 <_Z5func0B5cx...
_Z5func0B5cxx11iiiiii: endbr64 push rbx mov rbx, rdi mov edi, esi mov eax, edx mov esi, ecx mov ecx, [rsp+8+arg_0] mov edx, r8d sub edx, ecx imul edx, edi sub ecx, eax imul ecx, esi add edx, ecx sub eax, r8d imul eax, r9d add edx, eax jnz short loc_1254 lea ...
_QWORD * func0[abi:cxx11](_QWORD *a1, int a2, int a3, int a4, int a5, int a6, int a7) { *a1 = a1 + 2; if ( a6 * (a3 - a5) + a4 * (a7 - a3) + a2 * (a5 - a7) ) std::string::_M_construct<char const*>(a1, (char *)&unk_200A - 3); else std::string::_M_construct<char const*>(a1, (char *)&unk_2006 - 2); return ...
func0[abi:cxx11]: ENDBR64 PUSH RBX MOV RBX,RDI MOV EDI,ESI MOV EAX,EDX MOV ESI,ECX MOV ECX,dword ptr [RSP + 0x10] MOV EDX,R8D SUB EDX,ECX IMUL EDX,EDI SUB ECX,EAX IMUL ECX,ESI ADD EDX,ECX SUB EAX,R8D IMUL EAX,R9D ADD EDX,EAX JNZ 0x00101254 LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RDX,[0x102006] LEA RSI,[RDX + -...
/* func0[abi:cxx11](int, int, int, int, int, int) */ long * func0_abi_cxx11_(int param_1,int param_2,int param_3,int param_4,int param_5,int param_6, int param_7) { int4 in_register_0000003c; long *plVar1; plVar1 = (long *)CONCAT44(in_register_0000003c,param_1); if ((param_5 - param_...
1,794
func0
#include <string> #include <assert.h>
std::string func0(int x1, int y1, int x2, int y2, int x3, int y3) { int a = (x1*(y2-y3) + x2*(y3-y1) + x3*(y1-y2)); if (a == 0) { return "No"; } else { return "Yes"; } }
int main() { assert(func0(1, 5, 2, 5, 4, 6) == "Yes"); assert(func0(1, 1, 1, 4, 1, 5) == "No"); assert(func0(1, 1, 1, 1, 1, 1) == "No"); return 0; }
O2
cpp
func0[abi:cxx11](int, int, int, int, int, int): endbr64 mov %ecx,%r10d mov 0x8(%rsp),%ecx mov %esi,%r11d mov %r8d,%esi mov %rdi,%rax lea 0x10(%rdi),%rdi sub %ecx,%esi sub %edx,%ecx sub %r8d,%edx mov %rdi,(%rax) imul %r11d,%esi imul %r10d,%ecx imul %r9d,%edx add %esi,%ecx add %e...
_Z5func0B5cxx11iiiiii: endbr64 push rbx mov rbx, rdi mov edi, esi mov esi, ecx mov ecx, [rsp+8+arg_0] mov eax, edx mov edx, r8d sub edx, ecx sub ecx, eax sub eax, r8d imul edx, edi imul ecx, esi imul eax, r9d add edx, ecx add edx, eax lea rax, [rbx+10h] mov ...
_QWORD * func0[abi:cxx11](_QWORD *a1, int a2, int a3, int a4, int a5, int a6, int a7) { *a1 = a1 + 2; if ( a6 * (a3 - a5) + a4 * (a7 - a3) + a2 * (a5 - a7) ) std::string::_M_construct<char const*>(a1, (char *)&unk_200A - 3); else std::string::_M_construct<char const*>(a1, (char *)&unk_2006 - 2); return ...
func0[abi:cxx11]: ENDBR64 PUSH RBX MOV RBX,RDI MOV EDI,ESI MOV ESI,ECX MOV ECX,dword ptr [RSP + 0x10] MOV EAX,EDX MOV EDX,R8D SUB EDX,ECX SUB ECX,EAX SUB EAX,R8D IMUL EDX,EDI IMUL ECX,ESI IMUL EAX,R9D ADD EDX,ECX ADD EDX,EAX LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX JNZ 0x00101460 LEA RDX,[0x102006] MOV RDI,RBX LEA ...
/* func0[abi:cxx11](int, int, int, int, int, int) */ long * func0_abi_cxx11_(int param_1,int param_2,int param_3,int param_4,int param_5,int param_6, int param_7) { int4 in_register_0000003c; long *plVar1; plVar1 = (long *)CONCAT44(in_register_0000003c,param_1); *plVar1 = (long)(plVa...
1,795
func0
#include <string> #include <assert.h>
std::string func0(int x1, int y1, int x2, int y2, int x3, int y3) { int a = (x1*(y2-y3) + x2*(y3-y1) + x3*(y1-y2)); if (a == 0) { return "No"; } else { return "Yes"; } }
int main() { assert(func0(1, 5, 2, 5, 4, 6) == "Yes"); assert(func0(1, 1, 1, 4, 1, 5) == "No"); assert(func0(1, 1, 1, 1, 1, 1) == "No"); return 0; }
O3
cpp
func0[abi:cxx11](int, int, int, int, int, int): endbr64 mov %ecx,%r10d mov 0x8(%rsp),%ecx mov %esi,%r11d mov %r8d,%esi mov %rdi,%rax lea 0x10(%rdi),%rdi sub %ecx,%esi sub %edx,%ecx sub %r8d,%edx mov %rdi,(%rax) imul %r11d,%esi imul %r10d,%ecx imul %r9d,%edx add %esi,%ecx add %e...
_Z5func0B5cxx11iiiiii: endbr64 mov r10d, esi mov esi, [rsp+arg_0] mov rax, rdi mov edi, ecx mov ecx, r8d sub ecx, esi sub esi, edx sub edx, r8d imul ecx, r10d imul esi, edi imul edx, r9d add ecx, esi add ecx, edx lea rdx, [rax+10h] mov [rax], rdx jnz short lo...
long long func0[abi:cxx11](long long a1, int a2, int a3, int a4, int a5, int a6, int a7) { long long result; // rax result = a1; *(_QWORD *)a1 = a1 + 16; if ( a6 * (a3 - a5) + a4 * (a7 - a3) + a2 * (a5 - a7) ) { *(_BYTE *)(a1 + 18) = 115; *(_WORD *)(a1 + 16) = 25945; *(_QWORD *)(a1 + 8) = 3LL; ...
func0[abi:cxx11]: ENDBR64 MOV R10D,ESI MOV ESI,dword ptr [RSP + 0x8] MOV RAX,RDI MOV EDI,ECX MOV ECX,R8D SUB ECX,ESI SUB ESI,EDX SUB EDX,R8D IMUL ECX,R10D IMUL ESI,EDI IMUL EDX,R9D ADD ECX,ESI ADD ECX,EDX LEA RDX,[RAX + 0x10] MOV qword ptr [RAX],RDX JNZ 0x00101360 MOV ECX,0x6f4e MOV qword ptr [RAX + 0x8],0x2 MOV word p...
/* func0[abi:cxx11](int, int, int, int, int, int) */ void func0_abi_cxx11_(int param_1,int param_2,int param_3,int param_4,int param_5,int param_6, int param_7) { int4 in_register_0000003c; long *plVar1; plVar1 = (long *)CONCAT44(in_register_0000003c,param_1); *plVar1 = (long)(plVar1 +...
1,796
func0
#include <iostream> #include <vector> #include <string> #include <cassert>
std::vector<std::string> func0(const std::vector<std::string>& str, int l) { std::vector<std::string> result; for (const auto& e : str) { if (e.length() == l) { result.push_back(e); } } return result; }
int main() { assert((func0({"Python", "list", "exercises", "practice", "solution"}, 8) == std::vector<std::string>{"practice", "solution"})); assert((func0({"Python", "list", "exercises", "practice", "solution"}, 6) == std::vector<std::string>{"Python"})); assert((func0({"Python", "list", "exercises", "p...
O0
cpp
func0(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, int): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x58,%rsp mov %rdi,-0x48(%rbp) mov %rsi,-0x50...
_Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_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 ...
long long func0(long long a1, long long a2, int a3) { long long v5; // [rsp+28h] [rbp-38h] BYREF _QWORD v6[2]; // [rsp+30h] [rbp-30h] BYREF long long v7; // [rsp+40h] [rbp-20h] unsigned long long v8; // [rsp+48h] [rbp-18h] v8 = __readfsqword(0x28u); std::vector<std::string>::vector(a1); v6[1] = a2; v5...
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 0x001030b6 MOV RAX,qword ptr [RBP + -0x50] MO...
/* func0(std::vector<std::string, std::allocator<std::string > > const&, int) */ vector * func0(vector *param_1,int param_2) { bool bVar1; long lVar2; int in_EDX; int4 in_register_00000034; long in_FS_OFFSET; int8 local_40; int8 local_38; vector<std::string,std::allocator<std::string>> *local_30; st...
1,797
func0
#include <iostream> #include <vector> #include <string> #include <cassert>
std::vector<std::string> func0(const std::vector<std::string>& str, int l) { std::vector<std::string> result; for (const auto& e : str) { if (e.length() == l) { result.push_back(e); } } return result; }
int main() { assert((func0({"Python", "list", "exercises", "practice", "solution"}, 8) == std::vector<std::string>{"practice", "solution"})); assert((func0({"Python", "list", "exercises", "practice", "solution"}, 6) == std::vector<std::string>{"Python"})); assert((func0({"Python", "list", "exercises", "p...
O1
cpp
func0(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, int): endbr64 push %r13 push %r12 push %rbp push %rbx sub $0x8,%rsp mov %rdi,%rbp movq $0x0,(%rdi)...
_Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEi: endbr64 push r13 push r12 push rbp push rbx sub rsp, 8 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 ...
_QWORD * func0(_QWORD *a1, _QWORD *a2, int a3) { _QWORD *v4; // rbx _QWORD *v5; // r13 long long v6; // r12 _QWORD *v7; // rdi *a1 = 0LL; a1[1] = 0LL; a1[2] = 0LL; v4 = (_QWORD *)*a2; v5 = (_QWORD *)a2[1]; if ( v5 != (_QWORD *)*a2 ) { v6 = a3; do { if ( v6 == v4[1] ) { ...
func0: ENDBR64 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x8 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 0x001013a2 MOVSXD R12,EDX JMP 0x00101350 LAB_00101342: ADD qword ptr [RBP + 0x8],0x20 LAB_0...
/* func0(std::vector<std::string, std::allocator<std::string > > const&, int) */ vector * func0(vector *param_1,int param_2) { string *psVar1; long *plVar2; int in_EDX; string *psVar3; int4 in_register_00000034; *(int8 *)param_1 = 0; *(int8 *)(param_1 + 8) = 0; *(int8 *)(param_1 + 0x10) = 0; psVa...
1,798
func0
#include <iostream> #include <vector> #include <string> #include <cassert>
std::vector<std::string> func0(const std::vector<std::string>& str, int l) { std::vector<std::string> result; for (const auto& e : str) { if (e.length() == l) { result.push_back(e); } } return result; }
int main() { assert((func0({"Python", "list", "exercises", "practice", "solution"}, 8) == std::vector<std::string>{"practice", "solution"})); assert((func0({"Python", "list", "exercises", "practice", "solution"}, 6) == std::vector<std::string>{"Python"})); assert((func0({"Python", "list", "exercises", "p...
O2
cpp
func0(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, int): endbr64 push %r13 push %r12 mov %rdi,%r12 push %rbp push %rbx sub $0x8,%rsp movq $0x0,(%rdi)...
_Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEi: endbr64 push r13 pxor xmm0, xmm0 push r12 mov r12, rdi push rbp push rbx sub rsp, 8 mov qword ptr [rdi+10h], 0 movups xmmword ptr [rdi], xmm0 mov r13, [rsi+8] mov rbx, [rsi] cmp r13, rbx jz sh...
long long func0(long long a1, _QWORD *a2, int a3) { _QWORD *v4; // r13 _QWORD *v5; // rbx long long v6; // rbp _QWORD *v7; // rdi *(_QWORD *)(a1 + 16) = 0LL; *(_OWORD *)a1 = 0LL; v4 = (_QWORD *)a2[1]; v5 = (_QWORD *)*a2; if ( v4 != (_QWORD *)*a2 ) { v6 = a3; do { while ( v6 != v5...
func0: ENDBR64 PUSH R13 PXOR XMM0,XMM0 PUSH R12 MOV R12,RDI PUSH RBP PUSH RBX SUB RSP,0x8 MOV qword ptr [RDI + 0x10],0x0 MOVUPS xmmword ptr [RDI],XMM0 MOV R13,qword ptr [RSI + 0x8] MOV RBX,qword ptr [RSI] CMP R13,RBX JZ 0x001019b5 MOVSXD RBP,EDX JMP 0x00101981 LAB_00101978: ADD RBX,0x20 CMP R13,RBX JZ 0x001019b5 LAB_00...
/* func0(std::vector<std::string, std::allocator<std::string > > const&, int) */ vector * func0(vector *param_1,int param_2) { string *psVar1; long *plVar2; int in_EDX; string *psVar3; int4 in_register_00000034; *(int8 *)(param_1 + 0x10) = 0; *(int (*) [16])param_1 = (int [16])0x0; psVar1 = (strin...
1,799
func0
#include <iostream> #include <vector> #include <string> #include <cassert>
std::vector<std::string> func0(const std::vector<std::string>& str, int l) { std::vector<std::string> result; for (const auto& e : str) { if (e.length() == l) { result.push_back(e); } } return result; }
int main() { assert((func0({"Python", "list", "exercises", "practice", "solution"}, 8) == std::vector<std::string>{"practice", "solution"})); assert((func0({"Python", "list", "exercises", "practice", "solution"}, 6) == std::vector<std::string>{"Python"})); assert((func0({"Python", "list", "exercises", "p...
O3
cpp
func0(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, int): endbr64 push %r15 pxor %xmm0,%xmm0 push %r14 push %r13 mov %rdi,%r13 push %r12 push %rbp push...
_Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEi: endbr64 push r15 pxor xmm0, xmm0 push r14 push r13 mov r13, rdi push r12 push rbp push rbx sub rsp, 28h mov rax, fs:28h mov [rsp+58h+var_40], rax xor eax, eax mov qword ptr [rdi+10h], 0 movups...
long long func0(long long a1, long long *a2, int a3) { long long v4; // r14 long long v5; // rbx unsigned long long v6; // r12 size_t v7; // rbp long long *v8; // r15 void *v9; // rdi char *v10; // rax char v11; // al long long v13; // rax long long v14; // rbp long long v15; // rdi char *src; ...
func0: ENDBR64 PUSH R15 PXOR XMM0,XMM0 PUSH R14 PUSH R13 MOV R13,RDI PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x28 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x18],RAX XOR EAX,EAX MOV qword ptr [RDI + 0x10],0x0 MOVUPS xmmword ptr [RDI],XMM0 MOV R14,qword ptr [RSI + 0x8] MOV RBX,qword ptr [RSI] CMP R14,RBX JZ 0x001019f8...
/* func0(std::vector<std::string, std::allocator<std::string > > const&, int) */ vector * func0(vector *param_1,int param_2) { int uVar1; string *psVar2; size_t __n; ulong *puVar3; int *__src; ulong *__dest; int in_EDX; string *psVar4; int4 in_register_00000034; ulong uVar5; long in_FS_OFFSET; ...
1,800
func0
#include <iostream> #include <regex> #include <assert.h>
std::string func0(const std::string& text1) { std::regex whitespace("\\s+"); return std::regex_replace(text1, whitespace, ""); }
int main() { assert(func0(" Google Flutter ") == "GoogleFlutter"); assert(func0(" Google Dart ") == "GoogleDart"); assert(func0(" iOS Swift ") == "iOSSwift"); return 0; }
O0
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x48,%rsp mov %rdi,-0x48(%rbp) mov %rsi,-0x50(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax lea -0x40(%rbp),%rax mov $0x10,%edx lea ...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 48h mov [rbp+var_48], rdi mov [rbp+var_50], rsi mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax lea rax, [rbp+var_40] mov edx, 10h lea rcx, aS; "\\s+" mov ...
long long func0(long long a1, long long a2) { _BYTE v3[40]; // [rsp+10h] [rbp-40h] BYREF unsigned long long v4; // [rsp+38h] [rbp-18h] v4 = __readfsqword(0x28u); std::basic_regex<char,std::regex_traits<char>>::basic_regex(v3, "\\s+", 16LL); std::regex_replace<std::regex_traits<char>,char,std::char_traits<ch...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x48 MOV qword ptr [RBP + -0x48],RDI MOV qword ptr [RBP + -0x50],RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX LEA RAX,[RBP + -0x40] MOV EDX,0x10 LEA RCX,[0x134051] MOV RSI,RCX MOV RDI,RAX LAB_00104b63: CALL 0x00106152 MOV RAX,qword ptr ...
/* func0(std::string const&) */ string * func0(string *param_1) { int8 in_RSI; long in_FS_OFFSET; regex local_48 [40]; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); std::regex::basic_regex(local_48,"\\s+",0x10); /* try { // try from 00104b84 to 00104b88 has its CatchHand...
1,801
func0
#include <iostream> #include <regex> #include <assert.h>
std::string func0(const std::string& text1) { std::regex whitespace("\\s+"); return std::regex_replace(text1, whitespace, ""); }
int main() { assert(func0(" Google Flutter ") == "GoogleFlutter"); assert(func0(" Google Dart ") == "GoogleDart"); assert(func0(" iOS Swift ") == "iOSSwift"); return 0; }
O1
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 push %r13 push %r12 push %rbp push %rbx sub $0x48,%rsp mov %rdi,%rbx mov %rsi,%rbp mov %fs:0x28,%rax mov %rax,0x38(%rsp) xor %eax,%eax lea 0x8(%rsp),%r13 mov %r13,%rdi callq 4730 <_ZNS...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push rbp mov rbp, rsp push r14 push r12 push rbx sub rsp, 38h mov rbx, rdi mov r14, rsi mov rax, fs:28h mov [rbp+var_28], rax xor eax, eax lea r12, [rbp+var_50] lea rdi, [rbp+var_48]; this call __Z...
long long func0(long long a1, long long *a2) { long long v4; // rsi _DWORD *v5; // rdi volatile signed __int32 *v6; // rcx long long v7; // rdx signed __int32 v8; // eax _BYTE v10[8]; // [rsp+0h] [rbp-50h] BYREF _BYTE v11[8]; // [rsp+8h] [rbp-48h] BYREF long long v12; // [rsp+10h] [rbp-40h] long long...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x38 MOV RBX,RDI MOV R14,RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x28],RAX XOR EAX,EAX LEA R12,[RBP + -0x50] LEA RDI,[RBP + -0x48] CALL 0x00104710 MOV qword ptr [RBP + -0x40],0x0 MOV qword ptr [RBP + -0x38],0x0 MOV ECX,0x10 LEA RDX,[0x...
/* func0(std::string const&) */ string * func0(string *param_1) { _Sp_counted_base<(_Lock_policy)2> *p_Var1; _Sp_counted_base<(_Lock_policy)2> *p_Var2; int iVar3; int8 *in_RSI; long in_FS_OFFSET; regex local_58 [8]; int local_50 [8]; int8 local_48; _Sp_counted_base<(_Lock_policy)2> *local_40; long...
1,802
func0
#include <iostream> #include <regex> #include <assert.h>
std::string func0(const std::string& text1) { std::regex whitespace("\\s+"); return std::regex_replace(text1, whitespace, ""); }
int main() { assert(func0(" Google Flutter ") == "GoogleFlutter"); assert(func0(" Google Dart ") == "GoogleDart"); assert(func0(" iOS Swift ") == "iOSSwift"); return 0; }
O2
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 push %r14 push %r13 push %r12 mov %rdi,%r12 push %rbp push %rbx mov %rsi,%rbx sub $0x40,%rsp mov %fs:0x28,%rax mov %rax,0x38(%rsp) xor %eax,%eax lea 0x8(%rsp),%rbp lea 0x18(%rsp),%r13...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push rbp mov rbp, rsp push r14 mov r14, rsi push r13 lea r13, [rbp+var_50] push r12 lea r12, [rbp+var_48] push rbx mov rbx, rdi mov rdi, r12; this sub rsp, 30h mov rax, fs:28h mov [rbp+var_28], rax...
long long func0(long long a1, long long *a2) { long long v3; // rsi long long v4; // rdi long long v5; // rdx volatile signed __int32 *v6; // rcx signed __int32 v7; // eax long long v9; // rax _BYTE v10[8]; // [rsp+0h] [rbp-50h] BYREF _BYTE v11[8]; // [rsp+8h] [rbp-48h] BYREF __int128 v12; // [rsp+10...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R14 MOV R14,RSI PUSH R13 LEA R13,[RBP + -0x50] PUSH R12 LEA R12,[RBP + -0x48] PUSH RBX MOV RBX,RDI MOV RDI,R12 SUB RSP,0x30 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x28],RAX XOR EAX,EAX CALL 0x001046f0 LEA RDX,[0x11a66a] PXOR XMM0,XMM0 MOV RDI,R13 MOV ECX,0x10 LEA RSI,...
/* func0(std::string const&) */ string * func0(string *param_1) { _Sp_counted_base<(_Lock_policy)2> *p_Var1; int8 uVar2; int iVar3; int8 *in_RSI; long in_FS_OFFSET; regex local_58 [8]; int local_50 [8]; int local_48 [24]; long local_30; local_30 = *(long *)(in_FS_OFFSET + 0x28); std::locale::...
1,803
func0
#include <iostream> #include <regex> #include <assert.h>
std::string func0(const std::string& text1) { std::regex whitespace("\\s+"); return std::regex_replace(text1, whitespace, ""); }
int main() { assert(func0(" Google Flutter ") == "GoogleFlutter"); assert(func0(" Google Dart ") == "GoogleDart"); assert(func0(" iOS Swift ") == "iOSSwift"); return 0; }
O3
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 push %r14 push %r13 push %r12 mov %rdi,%r12 push %rbp push %rbx mov %rsi,%rbx sub $0x40,%rsp mov %fs:0x28,%rax mov %rax,0x38(%rsp) xor %eax,%eax lea 0x8(%rsp),%rbp lea 0x18(%rsp),%r13...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push rbp mov rbp, rsp push r15 push r14 lea r14, [rbp+var_E0] push r13 push r12 mov r12, rsi push rbx mov rbx, rdi sub rsp, 108h mov rax, fs:28h mov [rbp+var_38], rax xor eax, eax lea rax, [rbp+...
_QWORD * func0(_QWORD *a1, char **a2) { char *v3; // rax long long v4; // r13 char *v5; // r15 char *v6; // r12 char v7; // al long long v8; // rdx long long v9; // rcx long long v10; // r8 long long v11; // r9 unsigned long long v12; // rsi long long v13; // rdi volatile signed __int32 *v14; //...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 LEA R14,[RBP + -0xe0] PUSH R13 PUSH R12 MOV R12,RSI PUSH RBX MOV RBX,RDI SUB RSP,0x108 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x38],RAX XOR EAX,EAX LEA RAX,[RBP + -0xd8] MOV qword ptr [RBP + -0x130],R14 MOV RDI,RAX MOV qword ptr [RBP + -0x128],RAX CALL 0x...
/* func0(std::string const&) */ string * func0(string *param_1) { _Sp_counted_base<(_Lock_policy)2> *p_Var1; string sVar2; string *psVar3; long lVar4; int8 uVar5; bool bVar6; char cVar7; int iVar8; int8 *puVar9; string *psVar10; long lVar11; long *plVar12; ulong uVar13; ulong uVar14; lon...
1,804
func0
#include <assert.h>
int func0(int actual_cost, int sale_amount) { if (sale_amount > actual_cost) { int amount = sale_amount - actual_cost; return amount; } else { return 0; // Return 0 instead of None (nullptr can't be compared with int) } }
int main() { assert(func0(1500, 1200) == 0); assert(func0(100, 200) == 100); assert(func0(2000, 5000) == 3000); return 0; }
O0
cpp
func0(int, int): endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x14(%rbp) mov %esi,-0x18(%rbp) mov -0x18(%rbp),%eax cmp -0x14(%rbp),%eax jle 116d <_Z5func0ii+0x24> mov -0x18(%rbp),%eax sub -0x14(%rbp),%eax mov %eax,-0x4(%rbp) mov -0x4(%rbp),%eax jmp 1172 <_Z5func0ii+0x29> mov $0x0,%eax...
_Z5func0ii: endbr64 push rbp mov rbp, rsp mov [rbp+var_14], edi mov [rbp+var_18], esi mov eax, [rbp+var_18] cmp eax, [rbp+var_14] jle short loc_116D mov eax, [rbp+var_18] sub eax, [rbp+var_14] mov [rbp+var_4], eax mov eax, [rbp+var_4] jmp short loc_1172 loc_116D: mov e...
long long func0(int a1, int a2) { if ( a2 <= a1 ) return 0LL; else 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 + -0x18] CMP EAX,dword ptr [RBP + -0x14] JLE 0x0010116d MOV EAX,dword ptr [RBP + -0x18] SUB EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x4],EAX MOV EAX,dword ptr [RBP + -0x4] JMP 0x00101172 ...
/* func0(int, int) */ int func0(int param_1,int param_2) { int iVar1; if (param_1 < param_2) { iVar1 = param_2 - param_1; } else { iVar1 = 0; } return iVar1; }
1,805
func0
#include <assert.h>
int func0(int actual_cost, int sale_amount) { if (sale_amount > actual_cost) { int amount = sale_amount - actual_cost; return amount; } else { return 0; // Return 0 instead of None (nullptr can't be compared with int) } }
int main() { assert(func0(1500, 1200) == 0); assert(func0(100, 200) == 100); assert(func0(2000, 5000) == 3000); return 0; }
O1
cpp
func0(int, int): endbr64 mov %esi,%eax sub %edi,%eax cmp %edi,%esi mov $0x0,%edx cmovle %edx,%eax retq
_Z5func0ii: endbr64 mov eax, esi sub eax, edi cmp esi, edi mov edx, 0 cmovle eax, edx retn
long long func0(int a1, int a2) { long long result; // rax result = (unsigned int)(a2 - a1); if ( a2 <= a1 ) return 0LL; return result; }
func0: ENDBR64 MOV EAX,ESI SUB EAX,EDI CMP ESI,EDI MOV EDX,0x0 CMOVLE EAX,EDX RET
/* func0(int, int) */ int func0(int param_1,int param_2) { int iVar1; iVar1 = param_2 - param_1; if (param_2 <= param_1) { iVar1 = 0; } return iVar1; }
1,806
func0
#include <assert.h>
int func0(int actual_cost, int sale_amount) { if (sale_amount > actual_cost) { int amount = sale_amount - actual_cost; return amount; } else { return 0; // Return 0 instead of None (nullptr can't be compared with int) } }
int main() { assert(func0(1500, 1200) == 0); assert(func0(100, 200) == 100); assert(func0(2000, 5000) == 3000); return 0; }
O2
cpp
func0(int, int): endbr64 mov %esi,%eax mov $0x0,%edx sub %edi,%eax cmp %edi,%esi cmovle %edx,%eax retq nopw %cs:0x0(%rax,%rax,1) nopl (%rax)
_Z5func0ii: endbr64 mov eax, esi xor edx, edx sub eax, edi cmp esi, edi cmovle eax, edx retn
long long func0(int a1, int a2) { long long result; // rax result = (unsigned int)(a2 - a1); if ( a2 <= a1 ) return 0LL; return result; }
func0: ENDBR64 MOV EAX,ESI XOR EDX,EDX SUB EAX,EDI CMP ESI,EDI CMOVLE EAX,EDX RET
/* func0(int, int) */ int func0(int param_1,int param_2) { int iVar1; iVar1 = param_2 - param_1; if (param_2 <= param_1) { iVar1 = 0; } return iVar1; }
1,807
func0
#include <assert.h>
int func0(int actual_cost, int sale_amount) { if (sale_amount > actual_cost) { int amount = sale_amount - actual_cost; return amount; } else { return 0; // Return 0 instead of None (nullptr can't be compared with int) } }
int main() { assert(func0(1500, 1200) == 0); assert(func0(100, 200) == 100); assert(func0(2000, 5000) == 3000); return 0; }
O3
cpp
func0(int, int): endbr64 mov %esi,%eax mov $0x0,%edx sub %edi,%eax cmp %edi,%esi cmovle %edx,%eax retq nopw %cs:0x0(%rax,%rax,1) nopl (%rax)
_Z5func0ii: endbr64 mov eax, esi xor edx, edx sub eax, edi cmp esi, edi cmovle eax, edx retn
long long func0(int a1, int a2) { long long result; // rax result = (unsigned int)(a2 - a1); if ( a2 <= a1 ) return 0LL; return result; }
func0: ENDBR64 MOV EAX,ESI XOR EDX,EDX SUB EAX,EDI CMP ESI,EDI CMOVLE EAX,EDX RET
/* func0(int, int) */ int func0(int param_1,int param_2) { int iVar1; iVar1 = param_2 - param_1; if (param_2 <= param_1) { iVar1 = 0; } return iVar1; }
1,808
func0
#include <iostream> #include <cmath> #include <cassert>
int func0(int n) { if (n % 2 != 0) { return 0; } int res = 1; for (int i = 2; i <= (int)(sqrt(n)) + 1; i++) { int count = 0; int curr_sum = 1; int curr_term = 1; while (n % i == 0) { count++; n = n / i; if (i == 2 &&...
int main() { assert(func0(18) == 26); assert(func0(30) == 48); assert(func0(6) == 8); return 0; }
O0
cpp
func0(int): endbr64 push %rbp mov %rsp,%rbp sub $0x30,%rsp mov %edi,-0x24(%rbp) mov -0x24(%rbp),%eax and $0x1,%eax test %eax,%eax je 11cc <_Z5func0i+0x23> mov $0x0,%eax jmpq 1272 <_Z5func0i+0xc9> movl $0x1,-0x14(%rbp) movl $0x2,-0x10(%rbp) cvtsi2sdl -0x24(%rbp),%xmm0 callq 1090 <sqrt@pl...
_Z5func0i: endbr64 push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_24], edi mov eax, [rbp+var_24] and eax, 1 test eax, eax jz short loc_118C mov eax, 0 jmp locret_1244 loc_118C: mov [rbp+var_14], 1 mov [rbp+var_10], 2 jmp short loc_11FF loc_119C: mov [rbp+var_C], 0...
long long func0(int a1) { int v2; // [rsp+Ch] [rbp-24h] unsigned int v3; // [rsp+1Ch] [rbp-14h] int i; // [rsp+20h] [rbp-10h] int v5; // [rsp+24h] [rbp-Ch] int v6; // [rsp+28h] [rbp-8h] int v7; // [rsp+2Ch] [rbp-4h] v2 = a1; if ( (a1 & 1) != 0 ) return 0LL; v3 = 1; for ( i = 2; i <= (int)sqrt(...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV dword ptr [RBP + -0x24],EDI MOV EAX,dword ptr [RBP + -0x24] AND EAX,0x1 TEST EAX,EAX JZ 0x0010118c MOV EAX,0x0 JMP 0x00101244 LAB_0010118c: MOV dword ptr [RBP + -0x14],0x1 MOV dword ptr [RBP + -0x10],0x2 JMP 0x001011ff LAB_0010119c: MOV dword ptr [RBP + -0xc],0x0 MOV...
/* func0(int) */ int func0(int param_1) { double dVar1; int local_2c; int local_1c; int local_18; int local_14; int local_10; int local_c; if ((param_1 & 1U) == 0) { local_1c = 1; local_2c = param_1; for (local_18 = 2; dVar1 = sqrt((double)local_2c), local_18 <= (int)dVar1 + 1; ...
1,809
func0
#include <iostream> #include <cmath> #include <cassert>
int func0(int n) { if (n % 2 != 0) { return 0; } int res = 1; for (int i = 2; i <= (int)(sqrt(n)) + 1; i++) { int count = 0; int curr_sum = 1; int curr_term = 1; while (n % i == 0) { count++; n = n / i; if (i == 2 &&...
int main() { assert(func0(18) == 26); assert(func0(30) == 48); assert(func0(6) == 8); return 0; }
O1
cpp
func0(int): endbr64 push %r12 push %rbp push %rbx sub $0x10,%rsp mov $0x0,%r12d test $0x1,%dil jne 1260 <_Z5func0i+0xb7> mov %edi,%ebp mov $0x2,%ebx mov $0x1,%r12d jmp 120d <_Z5func0i+0x64> callq 1090 <sqrt@plt> jmp 122d <_Z5func0i+0x84> imul %ebx,%edi add %edi,%ecx mov %ebp,%ea...
_Z5func0i: endbr64 push r13 push r12 push rbp push rbx sub rsp, 8 mov r12d, 0 test dil, 1 jnz loc_1218 mov ebp, edi mov ebx, 2 mov r12d, 1 mov r13d, 0 jmp short loc_11C9 loc_119C: imul esi, ebx add ecx, esi mov eax, ebp cdq idiv ebx test edx, edx jnz s...
long long func0(int a1) { unsigned int v1; // r12d int v2; // ebp int v3; // ebx int v4; // esi int i; // ecx int v6; // edi double v7; // xmm0_8 double v8; // xmm0_8 int v9; // r8d v1 = 0; if ( (a1 & 1) == 0 ) { v2 = a1; v3 = 2; v1 = 1; while ( 1 ) { v7 = (double)v2;...
func0: ENDBR64 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x8 MOV R12D,0x0 TEST DIL,0x1 JNZ 0x00101218 MOV EBP,EDI MOV EBX,0x2 MOV R12D,0x1 MOV R13D,0x0 JMP 0x001011c9 LAB_0010119c: IMUL ESI,EBX ADD ECX,ESI MOV EAX,EBP CDQ IDIV EBX TEST EDX,EDX JNZ 0x001011c2 LAB_001011aa: ADD EDI,0x1 MOV EAX,EBP CDQ IDIV EBX MOV EBP,...
/* func0(int) */ int func0(int param_1) { ulong uVar1; int iVar2; int iVar3; int iVar4; int iVar5; ulong uVar6; int iVar7; int iVar8; double dVar9; iVar8 = 0; if ((param_1 & 1U) == 0) { uVar6 = (ulong)(uint)param_1; iVar5 = 2; iVar8 = 1; while( true ) { iVar4 = (int)uVar...
1,810
func0
#include <iostream> #include <cmath> #include <cassert>
int func0(int n) { if (n % 2 != 0) { return 0; } int res = 1; for (int i = 2; i <= (int)(sqrt(n)) + 1; i++) { int count = 0; int curr_sum = 1; int curr_term = 1; while (n % i == 0) { count++; n = n / i; if (i == 2 &&...
int main() { assert(func0(18) == 26); assert(func0(30) == 48); assert(func0(6) == 8); return 0; }
O2
cpp
func0(int) [clone .part.0]: pxor %xmm1,%xmm1 push %r12 pxor %xmm3,%xmm3 mov $0x1,%r12d push %rbp cvtsi2sd %edi,%xmm1 xor %ebp,%ebp push %rbx mov $0x2,%ebx sub $0x20,%rsp nopl 0x0(%rax) ucomisd %xmm1,%xmm3 movapd %xmm1,%xmm2 sqrtsd %xmm2,%xmm2 ja 1350 <_Z5func0i.part.0+0xc0> cvttsd2si %xmm2,%...
_Z5func0i_part_0: pxor xmm1, xmm1 push r13 pxor xmm2, xmm2 mov r13d, 1 push r12 cvtsi2sd xmm1, edi xor r12d, r12d push rbp mov ebp, edi push rbx mov ebx, 2 sub rsp, 18h nop word ptr [rax+rax+00000000h] loc_1240: ucomisd xmm2, xmm1 movapd xmm0, xmm1; x ja loc_12DA sqrtsd ...
long long func0(int a1) { unsigned int v1; // r13d double v2; // xmm1_8 int v3; // ebp int i; // ebx double v5; // xmm0_8 int v6; // esi int v7; // edi int v8; // r8d int v9; // ecx v1 = 1; v2 = (double)a1; v3 = a1; for ( i = 2; ; ++i ) { v5 = v2 < 0.0 ? sqrt(v2) : sqrt(v2); if ( i...
func0: PXOR XMM1,XMM1 PUSH R13 PXOR XMM2,XMM2 MOV R13D,0x1 PUSH R12 CVTSI2SD XMM1,EDI XOR R12D,R12D PUSH RBP MOV EBP,EDI PUSH RBX MOV EBX,0x2 SUB RSP,0x18 NOP word ptr CS:[RAX + RAX*0x1] LAB_00101240: UCOMISD XMM2,XMM1 MOVAPD XMM0,XMM1 JA 0x001012da SQRTSD XMM0,XMM0 LAB_00101252: CVTTSD2SI EAX,XMM0 ADD EAX,0x1 CMP EBX,...
/* func0(int) [clone .part.0] */ int func0(int param_1) { long lVar1; int iVar2; int iVar3; int iVar4; int iVar5; int iVar6; double dVar7; double __x; iVar6 = 1; __x = (double)param_1; iVar2 = 2; while( true ) { if (__x < 0.0) { dVar7 = sqrt(__x); } else { dVar7 = SQ...
1,811
func0
#include <iostream> #include <cmath> #include <cassert>
int func0(int n) { if (n % 2 != 0) { return 0; } int res = 1; for (int i = 2; i <= (int)(sqrt(n)) + 1; i++) { int count = 0; int curr_sum = 1; int curr_term = 1; while (n % i == 0) { count++; n = n / i; if (i == 2 &&...
int main() { assert(func0(18) == 26); assert(func0(30) == 48); assert(func0(6) == 8); return 0; }
O3
cpp
func0(int) [clone .part.0]: pxor %xmm1,%xmm1 push %r12 pxor %xmm3,%xmm3 mov $0x1,%r12d push %rbx cvtsi2sd %edi,%xmm1 mov $0x2,%ebx sub $0x28,%rsp xchg %ax,%ax ucomisd %xmm1,%xmm3 movapd %xmm1,%xmm2 sqrtsd %xmm2,%xmm2 ja 1357 <_Z5func0i.part.0+0xc7> cvttsd2si %xmm2,%eax add $0x1,%eax cmp %eb...
_Z5func0i_part_0: pxor xmm1, xmm1 push r12 pxor xmm2, xmm2 mov r12d, 1 push rbp cvtsi2sd xmm1, edi mov ebp, edi push rbx mov ebx, 2 sub rsp, 10h nop dword ptr [rax+00000000h] loc_1238: ucomisd xmm2, xmm1 movapd xmm0, xmm1; x ja loc_12E0 sqrtsd xmm0, xmm0 loc_124A: cvttsd2si eax...
long long func0(int a1) { unsigned int v1; // r12d double v2; // xmm1_8 int v3; // ebp int i; // ebx double v5; // xmm0_8 int v6; // ecx int v7; // r8d int v8; // edi int v9; // eax int v10; // esi v1 = 1; v2 = (double)a1; v3 = a1; for ( i = 2; ; ++i ) { v5 = v2 < 0.0 ? sqrt(v2) : sq...
func0: PXOR XMM1,XMM1 PUSH R12 PXOR XMM2,XMM2 MOV R12D,0x1 PUSH RBP CVTSI2SD XMM1,EDI MOV EBP,EDI PUSH RBX MOV EBX,0x2 SUB RSP,0x10 NOP dword ptr [RAX] LAB_00101238: UCOMISD XMM2,XMM1 MOVAPD XMM0,XMM1 JA 0x001012e0 SQRTSD XMM0,XMM0 LAB_0010124a: CVTTSD2SI EAX,XMM0 ADD EAX,0x1 CMP EBX,EAX JG 0x001012c8 MOV EAX,EBP CDQ I...
/* func0(int) [clone .part.0] */ int func0(int param_1) { ulong uVar1; uint uVar2; int iVar4; int iVar5; int iVar6; int iVar7; double dVar8; double __x; ulong uVar3; iVar7 = 1; __x = (double)param_1; iVar4 = 2; do { if (__x < 0.0) { dVar8 = sqrt(__x); } else { dVar...
1,812
func0
#include <iostream> #include <string> #include <regex> #include <assert.h>
std::string func0(const std::string &text) { std::regex pattern(R"(\w*z.\w*)"); if (std::regex_search(text, pattern)) { return "Found a match!"; } else { return "Not matched!"; } }
int main() { assert(func0("pythonz.") == "Found a match!"); assert(func0("xyz.") == "Found a match!"); assert(func0(" lang .") == "Not matched!"); return 0; }
O0
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x58,%rsp mov %rdi,-0x58(%rbp) mov %rsi,-0x60(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax lea -0x40(%rbp),%rax mov $0x10,%edx lea ...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 68h mov [rbp+var_68], rdi mov [rbp+var_70], rsi mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax lea rax, [rbp+var_40] mov edx, 10h lea rcx, aWZW; "\\w*z.\\w*" ...
long long func0(long long a1, long long a2) { char v3; // [rsp+1Fh] [rbp-51h] BYREF char *v4; // [rsp+20h] [rbp-50h] char *v5; // [rsp+28h] [rbp-48h] _BYTE v6[40]; // [rsp+30h] [rbp-40h] BYREF unsigned long long v7; // [rsp+58h] [rbp-18h] v7 = __readfsqword(0x28u); std::basic_regex<char,std::regex_trait...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x68 MOV qword ptr [RBP + -0x68],RDI MOV qword ptr [RBP + -0x70],RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX LEA RAX,[RBP + -0x40] MOV EDX,0x10 LEA RCX,[0x132051] MOV RSI,RCX MOV RDI,RAX LAB_00104b43: CALL 0x001061ba LEA RCX,[RBP + -0x...
/* func0(std::string const&) */ string * func0(string *param_1) { bool bVar1; string *in_RSI; long in_FS_OFFSET; allocator local_59; allocator *local_58; allocator *local_50; regex local_48 [40]; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); std::regex::basic_regex(local_48,"\\w*z.\...
1,813
func0
#include <iostream> #include <string> #include <regex> #include <assert.h>
std::string func0(const std::string &text) { std::regex pattern(R"(\w*z.\w*)"); if (std::regex_search(text, pattern)) { return "Found a match!"; } else { return "Not matched!"; } }
int main() { assert(func0("pythonz.") == "Found a match!"); assert(func0("xyz.") == "Found a match!"); assert(func0(" lang .") == "Not matched!"); return 0; }
O1
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 push %r13 push %r12 push %rbp push %rbx sub $0x58,%rsp mov %rdi,%rbx mov %rsi,%rbp mov %fs:0x28,%rax mov %rax,0x48(%rsp) xor %eax,%eax lea 0x20(%rsp),%r13 mov %r13,%rdi callq 4730 <_ZN...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push rbp mov rbp, rsp push r14 push r12 push rbx sub rsp, 58h mov rbx, rdi mov r14, rsi mov rax, fs:28h mov [rbp+var_28], rax xor eax, eax lea r12, [rbp+var_70] lea rdi, [rbp+var_68]; this call __Z...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x58 MOV RBX,RDI MOV R14,RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x28],RAX XOR EAX,EAX LEA R12,[RBP + -0x70] LEA RDI,[RBP + -0x68] CALL 0x001046f0 MOV qword ptr [RBP + -0x60],0x0 MOV qword ptr [RBP + -0x58],0x0 MOV ECX,0x10 LEA RDX,[0x...
/* func0(std::string const&) */ string * func0(string *param_1) { _Sp_counted_base<(_Lock_policy)2> *p_Var1; _Sp_counted_base<(_Lock_policy)2> *p_Var2; bool bVar3; int iVar4; int8 *in_RSI; long in_FS_OFFSET; regex local_78 [8]; int local_70 [8]; int8 local_68; _Sp_counted_base<(_Lock_policy)2> *lo...
1,814
func0
#include <iostream> #include <string> #include <regex> #include <assert.h>
std::string func0(const std::string &text) { std::regex pattern(R"(\w*z.\w*)"); if (std::regex_search(text, pattern)) { return "Found a match!"; } else { return "Not matched!"; } }
int main() { assert(func0("pythonz.") == "Found a match!"); assert(func0("xyz.") == "Found a match!"); assert(func0(" lang .") == "Not matched!"); return 0; }
O2
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 push %r14 push %r13 push %r12 mov %rdi,%r12 push %rbp push %rbx mov %rsi,%rbx sub $0x50,%rsp mov %fs:0x28,%rax mov %rax,0x48(%rsp) xor %eax,%eax lea 0x20(%rsp),%r13 lea 0x8(%rsp),%rbp...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push rbp mov rbp, rsp push r14 mov r14, rsi push r13 lea r13, [rbp+var_70] push r12 lea r12, [rbp+var_68] push rbx mov rbx, rdi mov rdi, r12; this sub rsp, 50h mov rax, fs:28h mov [rbp+var_28], rax...
long long func0(long long a1, long long *a2) { long long v3; // rdi long long v4; // rsi long long v5; // rsi char v6; // r13 long long v7; // rdi long long v8; // rdx volatile signed __int32 *v9; // rcx signed __int32 v10; // eax long long v12; // rax _BYTE v13[8]; // [rsp+0h] [rbp-70h] BYREF _B...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R14 MOV R14,RSI PUSH R13 LEA R13,[RBP + -0x70] PUSH R12 LEA R12,[RBP + -0x68] PUSH RBX MOV RBX,RDI MOV RDI,R12 SUB RSP,0x50 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x28],RAX XOR EAX,EAX CALL 0x001036d0 LEA RDX,[0x118657] PXOR XMM0,XMM0 MOV RDI,R13 MOV ECX,0x10 LEA RSI,...
/* func0(std::string const&) */ string * func0(string *param_1) { _Sp_counted_base<(_Lock_policy)2> *p_Var1; int8 uVar2; bool bVar3; int iVar4; int8 *in_RSI; long in_FS_OFFSET; regex local_78 [8]; int local_70 [8]; int local_68 [16]; int local_58 [16]; int local_48 [16]; long local_30; lo...
1,815
func0
#include <iostream> #include <string> #include <regex> #include <assert.h>
std::string func0(const std::string &text) { std::regex pattern(R"(\w*z.\w*)"); if (std::regex_search(text, pattern)) { return "Found a match!"; } else { return "Not matched!"; } }
int main() { assert(func0("pythonz.") == "Found a match!"); assert(func0("xyz.") == "Found a match!"); assert(func0(" lang .") == "Not matched!"); return 0; }
O3
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 push %r14 push %r13 push %r12 mov %rdi,%r12 push %rbp push %rbx mov %rsi,%rbx sub $0x50,%rsp mov %fs:0x28,%rax mov %rax,0x48(%rsp) xor %eax,%eax lea 0x20(%rsp),%r13 lea 0x8(%rsp),%rbp...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push r15 mov r15, rsi push r14 push r13 push r12 push rbp push rbx mov rbx, rdi sub rsp, 2B8h mov rax, fs:28h mov [rsp+2E8h+var_40], rax xor eax, eax lea r14, [rsp+2E8h+var_2A0] mov rdi, r14; this c...
long long func0(long long a1, unsigned long long *a2) { __m128i v3; // xmm0 long long v4; // rdi void *v5; // rdi void **v6; // rbp unsigned long long v7; // r12 void *v8; // rdi unsigned long long v9; // r13 unsigned long long v10; // rbp long long v11; // rax long long v12; // rcx unsigned long...
func0: ENDBR64 PUSH R15 MOV R15,RSI PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX MOV RBX,RDI SUB RSP,0x2b8 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x2a8],RAX XOR EAX,EAX LEA R14,[RSP + 0x48] MOV RDI,R14 CALL 0x00104730 LEA RDX,[0x11a69c] PXOR XMM0,XMM0 LEA RDI,[RSP + 0x110] MOV R8D,0x10 MOV RCX,R14 LEA RSI,[RD...
/* func0(std::string const&) */ string * func0(string *param_1) { ulong uVar1; int8 uVar2; ulong uVar3; int auVar4 [16]; bool bVar5; char cVar6; long lVar7; int8 *puVar8; int8 *puVar9; ulong uVar10; ulong *puVar11; long lVar12; ulong uVar13; ulong *in_RSI; uint *puVar14; _Match_mode _V...
1,816
func0
#include <assert.h>
bool func0(int monthnum2) { if (monthnum2 == 1 || monthnum2 == 3 || monthnum2 == 5 || monthnum2 == 7 || monthnum2 == 8 || monthnum2 == 10 || monthnum2 == 12) { return true; } else { return false; } }
int main() { assert(func0(5) == true); assert(func0(2) == false); assert(func0(6) == false); return 0; }
O0
cpp
func0(int): endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x4(%rbp) cmpl $0x1,-0x4(%rbp) je 117e <_Z5func0i+0x35> cmpl $0x3,-0x4(%rbp) je 117e <_Z5func0i+0x35> cmpl $0x5,-0x4(%rbp) je 117e <_Z5func0i+0x35> cmpl $0x7,-0x4(%rbp) je 117e <_Z5func0i+0x35> cmpl $0x8,-0x4(%rbp) je 117e <_Z5f...
_Z5func0i: endbr64 push rbp mov rbp, rsp mov [rbp+var_4], edi cmp [rbp+var_4], 1 jz short loc_117E cmp [rbp+var_4], 3 jz short loc_117E cmp [rbp+var_4], 5 jz short loc_117E cmp [rbp+var_4], 7 jz short loc_117E cmp [rbp+var_4], 8 jz short loc_117E cmp [rbp+var_...
_BOOL8 func0(int a1) { return a1 == 1 || a1 == 3 || a1 == 5 || a1 == 7 || a1 == 8 || a1 == 10 || a1 == 12; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x4],EDI CMP dword ptr [RBP + -0x4],0x1 JZ 0x0010117e CMP dword ptr [RBP + -0x4],0x3 JZ 0x0010117e CMP dword ptr [RBP + -0x4],0x5 JZ 0x0010117e CMP dword ptr [RBP + -0x4],0x7 JZ 0x0010117e CMP dword ptr [RBP + -0x4],0x8 JZ 0x0010117e CMP dword ptr [RBP + -0x4],0...
/* func0(int) */ int8 func0(int param_1) { int8 uVar1; if ((((param_1 == 1) || (param_1 == 3)) || (param_1 == 5)) || (((param_1 == 7 || (param_1 == 8)) || ((param_1 == 10 || (param_1 == 0xc)))))) { uVar1 = 1; } else { uVar1 = 0; } return uVar1; }
1,817
func0
#include <assert.h>
bool func0(int monthnum2) { if (monthnum2 == 1 || monthnum2 == 3 || monthnum2 == 5 || monthnum2 == 7 || monthnum2 == 8 || monthnum2 == 10 || monthnum2 == 12) { return true; } else { return false; } }
int main() { assert(func0(5) == true); assert(func0(2) == false); assert(func0(6) == false); return 0; }
O1
cpp
func0(int): endbr64 mov %edi,%edx and $0xfffffffd,%edx mov $0x1,%eax cmp $0x1,%edx je 114f <_Z5func0i+0x26> cmp $0x5,%edx je 114f <_Z5func0i+0x26> cmp $0xc,%edi sete %al cmp $0x8,%edx sete %dl or %edx,%eax retq
_Z5func0i: endbr64 mov eax, 0 cmp edi, 0Ch ja short locret_1143 mov eax, 15AAh bt rax, rdi setb al locret_1143: retn
unsigned __int8 func0(unsigned long long a1) { unsigned __int8 result; // al long long v2; // rax result = 0; if ( (unsigned int)a1 <= 0xC ) { v2 = 5546LL; return _bittest64(&v2, a1); } return result; }
func0: ENDBR64 MOV EAX,0x0 CMP EDI,0xc JA 0x00101143 MOV EAX,0x15aa BT RAX,RDI SETC AL LAB_00101143: RET
/* func0(int) */ int8 func0(int param_1) { int8 uVar1; uVar1 = 0; if ((uint)param_1 < 0xd) { uVar1 = CONCAT71(0x15,(0x15aaUL >> ((ulong)(uint)param_1 & 0x3f) & 1) != 0); } return uVar1; }
1,818
func0
#include <assert.h>
bool func0(int monthnum2) { if (monthnum2 == 1 || monthnum2 == 3 || monthnum2 == 5 || monthnum2 == 7 || monthnum2 == 8 || monthnum2 == 10 || monthnum2 == 12) { return true; } else { return false; } }
int main() { assert(func0(5) == true); assert(func0(2) == false); assert(func0(6) == false); return 0; }
O2
cpp
func0(int): endbr64 mov %edi,%edx mov %edi,%ecx mov $0x1,%eax and $0xfffffff9,%edx and $0xfffffffd,%ecx cmp $0x1,%edx je 1166 <_Z5func0i+0x26> cmp $0x8,%ecx sete %al cmp $0xc,%edi sete %dl or %edx,%eax retq nopw 0x0(%rax,%rax,1)
_Z5func0i: endbr64 xor eax, eax cmp edi, 0Ch ja short locret_1157 mov eax, 15AAh bt rax, rdi setb al locret_1157: retn
unsigned __int8 func0(unsigned long long a1) { unsigned __int8 result; // al long long v2; // rax result = 0; if ( (unsigned int)a1 <= 0xC ) { v2 = 5546LL; return _bittest64(&v2, a1); } return result; }
func0: ENDBR64 XOR EAX,EAX CMP EDI,0xc JA 0x00101157 MOV EAX,0x15aa BT RAX,RDI SETC AL LAB_00101157: RET
/* func0(int) */ int8 func0(int param_1) { int8 uVar1; uVar1 = 0; if ((uint)param_1 < 0xd) { uVar1 = CONCAT71(0x15,(0x15aaUL >> ((ulong)(uint)param_1 & 0x3f) & 1) != 0); } return uVar1; }
1,819
func0
#include <assert.h>
bool func0(int monthnum2) { if (monthnum2 == 1 || monthnum2 == 3 || monthnum2 == 5 || monthnum2 == 7 || monthnum2 == 8 || monthnum2 == 10 || monthnum2 == 12) { return true; } else { return false; } }
int main() { assert(func0(5) == true); assert(func0(2) == false); assert(func0(6) == false); return 0; }
O3
cpp
func0(int): endbr64 mov %edi,%edx mov %edi,%ecx mov $0x1,%eax and $0xfffffff9,%edx and $0xfffffffd,%ecx cmp $0x1,%edx je 1166 <_Z5func0i+0x26> cmp $0x8,%ecx sete %al cmp $0xc,%edi sete %dl or %edx,%eax retq nopw 0x0(%rax,%rax,1)
_Z5func0i: endbr64 xor eax, eax cmp edi, 0Ch ja short locret_1157 mov eax, 15AAh bt rax, rdi setb al locret_1157: retn
unsigned __int8 func0(unsigned long long a1) { unsigned __int8 result; // al long long v2; // rax result = 0; if ( (unsigned int)a1 <= 0xC ) { v2 = 5546LL; return _bittest64(&v2, a1); } return result; }
func0: ENDBR64 XOR EAX,EAX CMP EDI,0xc JA 0x00101157 MOV EAX,0x15aa BT RAX,RDI SETC AL LAB_00101157: RET
/* func0(int) */ int8 func0(int param_1) { int8 uVar1; uVar1 = 0; if ((uint)param_1 < 0xd) { uVar1 = CONCAT71(0x15,(0x15aaUL >> ((ulong)(uint)param_1 & 0x3f) & 1) != 0); } return uVar1; }
1,820
func0
#include <vector> #include <string> #include <cassert> #include <algorithm>
std::vector<std::string> func0(const std::vector<std::string>& stringlist) { std::vector<std::string> result; for (const auto& s : stringlist) { std::string reversed = s; std::reverse(reversed.begin(), reversed.end()); result.push_back(reversed); } return result; }
int main() { { std::vector<std::string> input = {"Red", "Green", "Blue", "White", "Black"}; std::vector<std::string> expected = {"deR", "neerG", "eulB", "etihW", "kcalB"}; assert(func0(input) == expected); } { std::vector<std::string> input = {"john", "amal", "joel", "...
O0
cpp
func0(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x68,%rsp mov %rdi,-0x68(%rbp) mov %rsi,-0x70(%rbp...
_Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 68h mov [rbp+var_68], rdi mov [rbp+var_70], rsi mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax mov rax, [rbp+var_68] mov rdi, rax call _ZNSt6...
long long func0(long long a1, long long a2) { long long v2; // rbx long long v3; // rax long long v5; // [rsp+10h] [rbp-60h] BYREF _QWORD v6[2]; // [rsp+18h] [rbp-58h] BYREF long long v7; // [rsp+28h] [rbp-48h] _BYTE v8[40]; // [rsp+30h] [rbp-40h] BYREF unsigned long long v9; // [rsp+58h] [rbp-18h] v9...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x68 MOV qword ptr [RBP + -0x68],RDI MOV qword ptr [RBP + -0x70],RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX MOV RAX,qword ptr [RBP + -0x68] MOV RDI,RAX CALL 0x00102dda MOV RAX,qword ptr [RBP + -0x70] MOV qword ptr [RBP + -0x50],RAX MO...
/* func0(std::vector<std::string, std::allocator<std::string > > const&) */ vector * func0(vector *param_1) { bool bVar1; int8 uVar2; int8 uVar3; vector<std::string,std::allocator<std::string>> *in_RSI; long in_FS_OFFSET; int8 local_68; int8 local_60; vector<std::string,std::allocator<std::string>> *l...
1,821
func0
#include <vector> #include <string> #include <cassert> #include <algorithm>
std::vector<std::string> func0(const std::vector<std::string>& stringlist) { std::vector<std::string> result; for (const auto& s : stringlist) { std::string reversed = s; std::reverse(reversed.begin(), reversed.end()); result.push_back(reversed); } return result; }
int main() { { std::vector<std::string> input = {"Red", "Green", "Blue", "White", "Black"}; std::vector<std::string> expected = {"deR", "neerG", "eulB", "etihW", "kcalB"}; assert(func0(input) == expected); } { std::vector<std::string> input = {"john", "amal", "joel", "...
O1
cpp
func0(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&): endbr64 push %r13 push %r12 push %rbp push %rbx sub $0x38,%rsp mov %rdi,%rbp mov %fs:0x28,%rax m...
_Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE: endbr64 push r13 push r12 push rbp push rbx sub rsp, 38h mov rbp, rdi mov rax, fs:28h mov [rsp+58h+var_30], rax xor eax, eax mov qword ptr [rdi], 0 mov qword ptr [rdi+8], 0 mov qword ptr [rdi+10...
_QWORD * func0(_QWORD *a1, _QWORD *a2) { _QWORD *v3; // rbx _QWORD *v4; // r13 char *v5; // rdx char *v6; // rax char v7; // cl _QWORD *v8; // rdi void *v10; // [rsp+0h] [rbp-58h] BYREF long long v11; // [rsp+8h] [rbp-50h] _QWORD v12[9]; // [rsp+10h] [rbp-48h] BYREF v12[3] = __readfsqword(0x28u); ...
func0: ENDBR64 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x38 MOV RBP,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x28],RAX XOR EAX,EAX MOV qword ptr [RDI],0x0 MOV qword ptr [RDI + 0x8],0x0 MOV qword ptr [RDI + 0x10],0x0 MOV RBX,qword ptr [RSI] MOV R13,qword ptr [RSI + 0x8] CMP R13,RBX JZ 0x00101441 MOV R12,...
/* func0(std::vector<std::string, std::allocator<std::string > > const&) */ vector * func0(vector *param_1) { int uVar1; int8 *puVar2; long *plVar3; long *plVar4; int8 *puVar5; int8 *in_RSI; long in_FS_OFFSET; long *local_58; long local_50; long local_48 [3]; long local_30; local_30 = *(lon...
1,822
func0
#include <vector> #include <string> #include <cassert> #include <algorithm>
std::vector<std::string> func0(const std::vector<std::string>& stringlist) { std::vector<std::string> result; for (const auto& s : stringlist) { std::string reversed = s; std::reverse(reversed.begin(), reversed.end()); result.push_back(reversed); } return result; }
int main() { { std::vector<std::string> input = {"Red", "Green", "Blue", "White", "Black"}; std::vector<std::string> expected = {"deR", "neerG", "eulB", "etihW", "kcalB"}; assert(func0(input) == expected); } { std::vector<std::string> input = {"john", "amal", "joel", "...
O2
cpp
func0(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&): endbr64 push %r14 push %r13 push %r12 mov %rdi,%r12 push %rbp push %rbx sub $0x30,%rsp mov %fs...
_Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE: endbr64 push r14 pxor xmm0, xmm0 push r13 push r12 push rbp mov rbp, rdi push rbx sub rsp, 30h mov rax, fs:28h mov [rsp+58h+var_30], rax xor eax, eax mov qword ptr [rdi+10h], 0 movups xmmword ptr...
long long func0(long long a1, _QWORD *a2) { _QWORD *v3; // rbx _QWORD *v4; // r14 char *v5; // rdx char *v6; // rax char v7; // cl char v8; // si _QWORD *v9; // rdi long long v10; // rdx void *v12; // [rsp+0h] [rbp-58h] BYREF long long v13; // [rsp+8h] [rbp-50h] _QWORD v14[9]; // [rsp+10h] [rbp-4...
func0: ENDBR64 PUSH R14 PXOR XMM0,XMM0 PUSH R13 PUSH R12 PUSH RBP MOV RBP,RDI PUSH RBX SUB RSP,0x30 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x28],RAX XOR EAX,EAX MOV qword ptr [RDI + 0x10],0x0 MOVUPS xmmword ptr [RDI],XMM0 MOV RBX,qword ptr [RSI] MOV R14,qword ptr [RSI + 0x8] CMP R14,RBX JZ 0x001019b5 MOV R13,...
/* func0(std::vector<std::string, std::allocator<std::string > > const&) */ vector * func0(vector *param_1) { int uVar1; int8 *puVar2; long *plVar3; long *plVar4; long *plVar5; long *plVar6; int8 *puVar7; long *in_RSI; long in_FS_OFFSET; long *local_58; long local_50; long local_48 [3]; long...
1,823
func0
#include <vector> #include <string> #include <cassert> #include <algorithm>
std::vector<std::string> func0(const std::vector<std::string>& stringlist) { std::vector<std::string> result; for (const auto& s : stringlist) { std::string reversed = s; std::reverse(reversed.begin(), reversed.end()); result.push_back(reversed); } return result; }
int main() { { std::vector<std::string> input = {"Red", "Green", "Blue", "White", "Black"}; std::vector<std::string> expected = {"deR", "neerG", "eulB", "etihW", "kcalB"}; assert(func0(input) == expected); } { std::vector<std::string> input = {"john", "amal", "joel", "...
O3
cpp
func0(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&): endbr64 push %r15 pxor %xmm0,%xmm0 push %r14 push %r13 mov %rdi,%r13 push %r12 push %rbp push %r...
_Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE: endbr64 push r15 pxor xmm0, xmm0 push r14 push r13 mov r13, rdi push r12 push rbp push rbx sub rsp, 68h mov rax, fs:28h mov [rsp+98h+var_40], rax xor eax, eax mov qword ptr [rdi+10h], 0 lea ...
long long func0(long long a1, long long *a2) { long long v3; // rbp size_t v4; // rbx _BYTE *v5; // r12 _QWORD *v6; // rax char *v7; // rdx char *v8; // rax char v9; // cl char v10; // si long long *v11; // rbx size_t v12; // r12 void *v13; // rdi void *v14; // r15 _QWORD *v15; // rdi _QWOR...
func0: ENDBR64 PUSH R15 PXOR XMM0,XMM0 PUSH R14 PUSH R13 MOV R13,RDI PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x68 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x58],RAX XOR EAX,EAX MOV qword ptr [RDI + 0x10],0x0 LEA R14,[RSP + 0x40] MOVUPS xmmword ptr [RDI],XMM0 LEA RDI,[RSP + 0x30] MOV RAX,qword ptr [RSI + 0x8] MOV RBP...
/* func0(std::vector<std::string, std::allocator<std::string > > const&) */ vector * func0(vector *param_1) { int uVar1; int8 *puVar2; ulong uVar3; int *__src; ulong *__src_00; ulong *puVar4; ulong *puVar5; ulong *puVar6; ulong *puVar7; int8 *puVar8; int8 *in_RSI; long in_FS_OFFSET; ulong lo...
1,824
func0
#include <iostream> #include <vector> #include <assert.h> template<typename T>
std::vector<T> func0(const std::vector<std::vector<T>>& lst) { std::vector<T> minList = lst[0]; for (const auto& subList : lst) { if (subList.size() < minList.size()) { minList = subList; } } return minList; }
int main() { assert((func0(std::vector<std::vector<int>>{{1}, {1, 2}, {1, 2, 3}}) == std::vector<int>{1})); assert((func0(std::vector<std::vector<int>>{{1, 1}, {1, 1, 1}, {1, 2, 7, 8}}) == std::vector<int>{1, 1})); assert((func0(std::vector<std::vector<char>>{{'x'}, {'x', 'y'}, {'x', 'y', 'z'}}) == std::...
O0
cpp
std::vector<int, std::allocator<int> > func0<int>(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x48,%rsp mov %rdi,-0x48(%rbp) mov %rsi,-0x50(%rbp) mov %fs:0x28,%rax mov %rax,-0x...
_Z5func0IiESt6vectorIT_SaIS1_EERKS0_IS3_SaIS3_EE: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 48h mov [rbp+var_48], rdi mov [rbp+var_50], rsi mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax mov rax, [rbp+var_50] mov esi, 0 mov rdi, rax call _ZNKSt6vectorIS_IiSaIiE...
long long func0<int>(long long a1, long long a2) { long long v2; // rax unsigned long long v3; // rbx long long v5; // [rsp+18h] [rbp-38h] BYREF _QWORD v6[2]; // [rsp+20h] [rbp-30h] BYREF long long v7; // [rsp+30h] [rbp-20h] unsigned long long v8; // [rsp+38h] [rbp-18h] v8 = __readfsqword(0x28u); v2 =...
func0<int>: 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 ESI,0x0 MOV RDI,RAX CALL 0x00102b90 MOV RDX,RAX MOV RAX,qword ptr [RBP + -0x48] MOV R...
/* std::vector<int, std::allocator<int> > func0<int>(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&) */ vector func0<int>(vector_conflict *param_1) { bool bVar1; vector_conflict *pvVar2; ulong uVar3; ulong uVar4; vector<std::vector<int...
1,825
func0
#include <iostream> #include <vector> #include <assert.h> template<typename T>
std::vector<T> func0(const std::vector<std::vector<T>>& lst) { std::vector<T> minList = lst[0]; for (const auto& subList : lst) { if (subList.size() < minList.size()) { minList = subList; } } return minList; }
int main() { assert((func0(std::vector<std::vector<int>>{{1}, {1, 2}, {1, 2, 3}}) == std::vector<int>{1})); assert((func0(std::vector<std::vector<int>>{{1, 1}, {1, 1, 1}, {1, 2, 7, 8}}) == std::vector<int>{1, 1})); assert((func0(std::vector<std::vector<char>>{{'x'}, {'x', 'y'}, {'x', 'y', 'z'}}) == std::...
O1
cpp
std::vector<int, std::allocator<int> > func0<int>(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&): endbr64 push %r14 push %r13 push %r12 push %rbp push %rbx mov %rdi,%rbp mov %rsi,%r13 mov (%rsi),%r14 mov 0x8(%r14),%r12 sub (...
_Z5func0IiESt6vectorIT_SaIS1_EERKS0_IS3_SaIS3_EE: endbr64 push r14 push r13 push r12 push rbp push rbx mov rbp, rdi mov r13, rsi mov r14, [rsi] mov r12, [r14+8] sub r12, [r14] mov qword ptr [rdi], 0 mov qword ptr [rdi+8], 0 mov qword ptr [rdi+10h], 0 jz short loc_1F04...
_QWORD * func0<int>(_QWORD *a1, _QWORD *a2) { long long v3; // r14 unsigned long long v4; // r12 _DWORD *v5; // rbx _DWORD *v6; // rsi long long v7; // r12 _QWORD *v8; // rbx _QWORD *v9; // r12 v3 = *a2; v4 = *(_QWORD *)(*a2 + 8LL) - *(_QWORD *)*a2; *a1 = 0LL; a1[1] = 0LL; a1[2] = 0LL; if ( v...
func0<int>: ENDBR64 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX MOV RBP,RDI MOV R13,RSI MOV R14,qword ptr [RSI] MOV R12,qword ptr [R14 + 0x8] SUB R12,qword ptr [R14] MOV qword ptr [RDI],0x0 MOV qword ptr [RDI + 0x8],0x0 MOV qword ptr [RDI + 0x10],0x0 JZ 0x00101f04 MOV RAX,0x7ffffffffffffffc CMP RAX,R12 JC 0x00101eff M...
/* std::vector<int, std::allocator<int> > func0<int>(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&) */ vector<int,std::allocator<int>> * func0<int>(vector<int,std::allocator<int>> *param_1,int8 *param_2) { long *plVar1; int4 *__src; vecto...
1,826
func0
#include <iostream> #include <vector> #include <assert.h> template<typename T>
std::vector<T> func0(const std::vector<std::vector<T>>& lst) { std::vector<T> minList = lst[0]; for (const auto& subList : lst) { if (subList.size() < minList.size()) { minList = subList; } } return minList; }
int main() { assert((func0(std::vector<std::vector<int>>{{1}, {1, 2}, {1, 2, 3}}) == std::vector<int>{1})); assert((func0(std::vector<std::vector<int>>{{1, 1}, {1, 1, 1}, {1, 2, 7, 8}}) == std::vector<int>{1, 1})); assert((func0(std::vector<std::vector<char>>{{'x'}, {'x', 'y'}, {'x', 'y', 'z'}}) == std::...
O2
cpp
std::vector<char, std::allocator<char> > func0<char>(std::vector<std::vector<char, std::allocator<char> >, std::allocator<std::vector<char, std::allocator<char> > > > const&): endbr64 push %r15 push %r14 push %r13 mov %rsi,%r13 push %r12 mov %rdi,%r12 push %rbp push %rbx sub $0x8,%rsp mov (%rsi)...
_Z5func0IiESt6vectorIT_SaIS1_EERKS0_IS3_SaIS3_EE: endbr64 push r15 pxor xmm0, xmm0 push r14 push r13 push r12 mov r12, rdi push rbp mov rbp, rsi push rbx sub rsp, 8 mov r13, [rsi] mov rbx, [r13+8] sub rbx, [r13+0] mov qword ptr [rdi+10h], 0 movups xmmword ptr [rdi], xmm...
__m128i * func0<int>(__m128i *a1, unsigned long long *a2) { unsigned long long v2; // r14 _DWORD *v3; // r15 __m128i *v4; // r12 unsigned long long *v5; // rbp __int32 **v6; // r13 unsigned long long v7; // rbx __int32 *v8; // rsi long long v9; // rax long long v10; // rbx char *v11; // rax char *...
func0<int>: ENDBR64 PUSH R15 PXOR XMM0,XMM0 PUSH R14 PUSH R13 PUSH R12 MOV R12,RDI PUSH RBP MOV RBP,RSI PUSH RBX SUB RSP,0x8 MOV R13,qword ptr [RSI] MOV RBX,qword ptr [R13 + 0x8] SUB RBX,qword ptr [R13] MOV qword ptr [RDI + 0x10],0x0 MOVUPS xmmword ptr [RDI],XMM0 JZ 0x00101ed0 MOV RAX,0x7ffffffffffffffc CMP RAX,RBX JC ...
/* std::vector<int, std::allocator<int> > func0<int>(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&) */ vector<int,std::allocator<int>> * func0<int>(vector<int,std::allocator<int>> *param_1,vector<int,std::allocator<int>> *param_2) { int4 *__s...
1,827
func0
#include <iostream> #include <vector> #include <assert.h> template<typename T>
std::vector<T> func0(const std::vector<std::vector<T>>& lst) { std::vector<T> minList = lst[0]; for (const auto& subList : lst) { if (subList.size() < minList.size()) { minList = subList; } } return minList; }
int main() { assert((func0(std::vector<std::vector<int>>{{1}, {1, 2}, {1, 2, 3}}) == std::vector<int>{1})); assert((func0(std::vector<std::vector<int>>{{1, 1}, {1, 1, 1}, {1, 2, 7, 8}}) == std::vector<int>{1, 1})); assert((func0(std::vector<std::vector<char>>{{'x'}, {'x', 'y'}, {'x', 'y', 'z'}}) == std::...
O3
cpp
std::vector<int, std::allocator<int> > func0<int>(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&): endbr64 push %r15 pxor %xmm0,%xmm0 push %r14 push %r13 mov %rsi,%r13 push %r12 mov %rdi,%r12 push %rbp push %rbx sub $0x18,%rsp ...
_Z5func0IiESt6vectorIT_SaIS1_EERKS0_IS3_SaIS3_EE: endbr64 push r15 pxor xmm0, xmm0 push r14 push r13 push r12 mov r12, rdi push rbp mov rbp, rsi push rbx sub rsp, 8 mov r14, [rsi] mov rbx, [r14+8] sub rbx, [r14] mov qword ptr [rdi+10h], 0 movups xmmword ptr [rdi], xmm0 ...
long long func0<int>(long long a1, unsigned long long *a2) { _DWORD *v2; // r13 unsigned long long v3; // r15 unsigned long long *v4; // rbp _QWORD *v5; // r14 unsigned long long v6; // rbx _DWORD *v7; // rsi long long v8; // rax long long v9; // rbx char *v10; // rax bool v11; // zf _DWORD *v13;...
func0<int>: ENDBR64 PUSH R15 PXOR XMM0,XMM0 PUSH R14 PUSH R13 PUSH R12 MOV R12,RDI PUSH RBP MOV RBP,RSI PUSH RBX SUB RSP,0x8 MOV R14,qword ptr [RSI] MOV RBX,qword ptr [R14 + 0x8] SUB RBX,qword ptr [R14] MOV qword ptr [RDI + 0x10],0x0 MOVUPS xmmword ptr [RDI],XMM0 JZ 0x00102038 MOV RAX,0x7ffffffffffffffc CMP RAX,RBX JC ...
/* std::vector<int, std::allocator<int> > func0<int>(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&) */ vector<int,std::allocator<int>> * func0<int>(vector<int,std::allocator<int>> *param_1,int8 *param_2) { int4 *__src; void *pvVar1; size_...
1,828
func0
#include <assert.h>
int func0(int l, int b) { int area = l * b; return area; }
int main() { assert(func0(10, 20) == 200); assert(func0(10, 5) == 50); assert(func0(4, 2) == 8); 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; }
1,829
func0
#include <assert.h>
int func0(int l, int b) { int area = l * b; return area; }
int main() { assert(func0(10, 20) == 200); assert(func0(10, 5) == 50); assert(func0(4, 2) == 8); 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; }
1,830
func0
#include <assert.h>
int func0(int l, int b) { int area = l * b; return area; }
int main() { assert(func0(10, 20) == 200); assert(func0(10, 5) == 50); assert(func0(4, 2) == 8); 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; }
1,831
func0
#include <assert.h>
int func0(int l, int b) { int area = l * b; return area; }
int main() { assert(func0(10, 20) == 200); assert(func0(10, 5) == 50); assert(func0(4, 2) == 8); 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; }
1,832
func0
#include <iostream> #include <string> #include <regex> #include <assert.h>
std::string func0(const std::string& str1) { std::regex uppercase_regex("[A-Z]"); std::string result = std::regex_replace(str1, uppercase_regex, ""); return result; }
int main() { assert(func0("cAstyoUrFavoRitETVshoWs") == "cstyoravoitshos"); assert(func0("wAtchTheinTernEtrAdIo") == "wtchheinerntrdo"); assert(func0("VoicESeaRchAndreComMendaTionS") == "oiceachndreomendaion"); return 0; }
O0
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x48,%rsp mov %rdi,-0x48(%rbp) mov %rsi,-0x50(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax lea -0x40(%rbp),%rax mov $0x10,%edx lea ...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 48h mov [rbp+var_48], rdi mov [rbp+var_50], rsi mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax lea rax, [rbp+var_40] mov edx, 10h lea rcx, aAZ; "[A-Z]" mov ...
long long func0(long long a1, long long a2) { _BYTE v3[40]; // [rsp+10h] [rbp-40h] BYREF unsigned long long v4; // [rsp+38h] [rbp-18h] v4 = __readfsqword(0x28u); std::basic_regex<char,std::regex_traits<char>>::basic_regex(v3, "[A-Z]", 16LL); std::regex_replace<std::regex_traits<char>,char,std::char_traits<c...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x48 MOV qword ptr [RBP + -0x48],RDI MOV qword ptr [RBP + -0x50],RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX LEA RAX,[RBP + -0x40] MOV EDX,0x10 LEA RCX,[0x134051] MOV RSI,RCX MOV RDI,RAX LAB_00104b63: CALL 0x00106152 MOV RAX,qword ptr ...
/* func0(std::string const&) */ string * func0(string *param_1) { int8 in_RSI; long in_FS_OFFSET; regex local_48 [40]; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); std::regex::basic_regex(local_48,"[A-Z]",0x10); /* try { // try from 00104b84 to 00104b88 has its CatchHan...
1,833
func0
#include <iostream> #include <string> #include <regex> #include <assert.h>
std::string func0(const std::string& str1) { std::regex uppercase_regex("[A-Z]"); std::string result = std::regex_replace(str1, uppercase_regex, ""); return result; }
int main() { assert(func0("cAstyoUrFavoRitETVshoWs") == "cstyoravoitshos"); assert(func0("wAtchTheinTernEtrAdIo") == "wtchheinerntrdo"); assert(func0("VoicESeaRchAndreComMendaTionS") == "oiceachndreomendaion"); return 0; }
O1
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 push %r13 push %r12 push %rbp push %rbx sub $0x48,%rsp mov %rdi,%rbx mov %rsi,%rbp mov %fs:0x28,%rax mov %rax,0x38(%rsp) xor %eax,%eax lea 0x8(%rsp),%r13 mov %r13,%rdi callq 4730 <_ZNS...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push rbp mov rbp, rsp push r14 push r12 push rbx sub rsp, 38h mov rbx, rdi mov r14, rsi mov rax, fs:28h mov [rbp+var_28], rax xor eax, eax lea r12, [rbp+var_50] lea rdi, [rbp+var_48]; this call __Z...
long long func0(long long a1, long long *a2) { long long v4; // rsi _DWORD *v5; // rdi volatile signed __int32 *v6; // rcx long long v7; // rdx signed __int32 v8; // eax _BYTE v10[8]; // [rsp+0h] [rbp-50h] BYREF _BYTE v11[8]; // [rsp+8h] [rbp-48h] BYREF long long v12; // [rsp+10h] [rbp-40h] long long...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x38 MOV RBX,RDI MOV R14,RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x28],RAX XOR EAX,EAX LEA R12,[RBP + -0x50] LEA RDI,[RBP + -0x48] CALL 0x00104710 MOV qword ptr [RBP + -0x40],0x0 MOV qword ptr [RBP + -0x38],0x0 MOV ECX,0x10 LEA RDX,[0x...
/* func0(std::string const&) */ string * func0(string *param_1) { _Sp_counted_base<(_Lock_policy)2> *p_Var1; _Sp_counted_base<(_Lock_policy)2> *p_Var2; int iVar3; int8 *in_RSI; long in_FS_OFFSET; regex local_58 [8]; int local_50 [8]; int8 local_48; _Sp_counted_base<(_Lock_policy)2> *local_40; long...
1,834
func0
#include <iostream> #include <string> #include <regex> #include <assert.h>
std::string func0(const std::string& str1) { std::regex uppercase_regex("[A-Z]"); std::string result = std::regex_replace(str1, uppercase_regex, ""); return result; }
int main() { assert(func0("cAstyoUrFavoRitETVshoWs") == "cstyoravoitshos"); assert(func0("wAtchTheinTernEtrAdIo") == "wtchheinerntrdo"); assert(func0("VoicESeaRchAndreComMendaTionS") == "oiceachndreomendaion"); return 0; }
O2
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 push %r14 push %r13 push %r12 mov %rdi,%r12 push %rbp push %rbx mov %rsi,%rbx sub $0x40,%rsp mov %fs:0x28,%rax mov %rax,0x38(%rsp) xor %eax,%eax lea 0x8(%rsp),%rbp lea 0x18(%rsp),%r13...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push rbp mov rbp, rsp push r14 mov r14, rsi push r13 lea r13, [rbp+var_50] push r12 lea r12, [rbp+var_48] push rbx mov rbx, rdi mov rdi, r12; this sub rsp, 30h mov rax, fs:28h mov [rbp+var_28], rax...
long long func0(long long a1, long long *a2) { long long v3; // rsi long long v4; // rdi long long v5; // rdx volatile signed __int32 *v6; // rcx signed __int32 v7; // eax long long v9; // rax _BYTE v10[8]; // [rsp+0h] [rbp-50h] BYREF _BYTE v11[8]; // [rsp+8h] [rbp-48h] BYREF __int128 v12; // [rsp+10...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R14 MOV R14,RSI PUSH R13 LEA R13,[RBP + -0x50] PUSH R12 LEA R12,[RBP + -0x48] PUSH RBX MOV RBX,RDI MOV RDI,R12 SUB RSP,0x30 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x28],RAX XOR EAX,EAX CALL 0x001046f0 LEA RDX,[0x11a690] PXOR XMM0,XMM0 MOV RDI,R13 MOV ECX,0x10 LEA RSI,...
/* func0(std::string const&) */ string * func0(string *param_1) { _Sp_counted_base<(_Lock_policy)2> *p_Var1; int8 uVar2; int iVar3; int8 *in_RSI; long in_FS_OFFSET; regex local_58 [8]; int local_50 [8]; int local_48 [24]; long local_30; local_30 = *(long *)(in_FS_OFFSET + 0x28); std::locale::...
1,835
func0
#include <iostream> #include <string> #include <regex> #include <assert.h>
std::string func0(const std::string& str1) { std::regex uppercase_regex("[A-Z]"); std::string result = std::regex_replace(str1, uppercase_regex, ""); return result; }
int main() { assert(func0("cAstyoUrFavoRitETVshoWs") == "cstyoravoitshos"); assert(func0("wAtchTheinTernEtrAdIo") == "wtchheinerntrdo"); assert(func0("VoicESeaRchAndreComMendaTionS") == "oiceachndreomendaion"); return 0; }
O3
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 push %r14 push %r13 push %r12 mov %rdi,%r12 push %rbp push %rbx mov %rsi,%rbx sub $0x40,%rsp mov %fs:0x28,%rax mov %rax,0x38(%rsp) xor %eax,%eax lea 0x8(%rsp),%rbp lea 0x18(%rsp),%r13...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push rbp mov rbp, rsp push r15 push r14 lea r14, [rbp+var_E0] push r13 push r12 mov r12, rsi push rbx mov rbx, rdi sub rsp, 108h mov rax, fs:28h mov [rbp+var_38], rax xor eax, eax lea rax, [rbp+...
_QWORD * func0(_QWORD *a1, char **a2) { char *v3; // rax long long v4; // r13 char *v5; // r15 char *v6; // r12 char v7; // al long long v8; // rdx long long v9; // rcx long long v10; // r8 long long v11; // r9 unsigned long long v12; // rsi long long v13; // rdi volatile signed __int32 *v14; //...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 LEA R14,[RBP + -0xe0] PUSH R13 PUSH R12 MOV R12,RSI PUSH RBX MOV RBX,RDI SUB RSP,0x108 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x38],RAX XOR EAX,EAX LEA RAX,[RBP + -0xd8] MOV qword ptr [RBP + -0x130],R14 MOV RDI,RAX MOV qword ptr [RBP + -0x128],RAX CALL 0x...
/* func0(std::string const&) */ string * func0(string *param_1) { _Sp_counted_base<(_Lock_policy)2> *p_Var1; string sVar2; string *psVar3; long lVar4; int8 uVar5; bool bVar6; char cVar7; int iVar8; int8 *puVar9; string *psVar10; long lVar11; long *plVar12; ulong uVar13; ulong uVar14; lon...
1,836
func0
#include <vector> #include <cassert>
std::vector<int> func0(const std::vector<std::vector<int>>& lst) { std::vector<int> result; for (const auto& item : lst) { result.push_back(item[0]); } return result; }
int main() { assert((func0({{1, 2}, {3, 4, 5}, {6, 7, 8, 9}}) == std::vector<int>{1, 3, 6})); assert((func0({{1, 2, 3}, {4, 5}}) == std::vector<int>{1, 4})); assert((func0({{9, 8, 1}, {1, 2}}) == std::vector<int>{9, 1})); return 0; }
O0
cpp
func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x48,%rsp mov %rdi,-0x48(%rbp) mov %rsi,-0x50(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax mov -0x48(%rbp)...
_Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EE: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 48h mov [rbp+var_48], rdi mov [rbp+var_50], rsi mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax mov rax, [rbp+var_48] mov rdi, rax call _ZNSt6vectorIiSaIiEEC2Ev; std::vector<int>::vect...
long long func0(long long a1, long long a2) { long long v2; // rax long long v4; // [rsp+18h] [rbp-38h] BYREF _QWORD v5[2]; // [rsp+20h] [rbp-30h] BYREF long long v6; // [rsp+30h] [rbp-20h] unsigned long long v7; // [rsp+38h] [rbp-18h] v7 = __readfsqword(0x28u); std::vector<int>::vector(a1); v5[1] = a...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x48 MOV qword ptr [RBP + -0x48],RDI MOV qword ptr [RBP + -0x50],RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX MOV RAX,qword ptr [RBP + -0x48] MOV RDI,RAX CALL 0x00101fe8 MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x28],RAX MO...
/* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&) */ vector * func0(vector *param_1) { bool bVar1; int *piVar2; vector<std::vector<int,std::allocator<int>>,std::allocator<std::vector<int,std::allocator<int>>>> *in_RSI; long in_F...
1,837
func0
#include <vector> #include <cassert>
std::vector<int> func0(const std::vector<std::vector<int>>& lst) { std::vector<int> result; for (const auto& item : lst) { result.push_back(item[0]); } return result; }
int main() { assert((func0({{1, 2}, {3, 4, 5}, {6, 7, 8, 9}}) == std::vector<int>{1, 3, 6})); assert((func0({{1, 2, 3}, {4, 5}}) == std::vector<int>{1, 4})); assert((func0({{9, 8, 1}, {1, 2}}) == std::vector<int>{9, 1})); return 0; }
O1
cpp
func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&): endbr64 push %r12 push %rbp push %rbx mov %rdi,%rbx movq $0x0,(%rdi) movq $0x0,0x8(%rdi) movq $0x0,0x10(%rdi) mov (%rsi),%rbp mov 0x8(%rsi),%r12 cmp %r12,%rbp jne 1310 ...
_Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EE: endbr64 push r12 push rbp push rbx mov rbx, rdi mov qword ptr [rdi], 0 mov qword ptr [rdi+8], 0 mov qword ptr [rdi+10h], 0 mov rbp, [rsi] mov r12, [rsi+8] cmp r12, rbp jnz short loc_1310 loc_12F7: mov rax, rbx pop rbx pop rbp p...
_QWORD * func0(_QWORD *a1, long long a2) { _DWORD **v2; // rbp _DWORD **v3; // r12 _DWORD *v5; // rdx _DWORD *v6; // rsi *a1 = 0LL; a1[1] = 0LL; a1[2] = 0LL; v2 = *(_DWORD ***)a2; v3 = *(_DWORD ***)(a2 + 8); if ( v3 != *(_DWORD ***)a2 ) { do { v5 = *v2; v6 = (_DWORD *)a1[1]; ...
func0: ENDBR64 PUSH R12 PUSH RBP PUSH RBX MOV RBX,RDI MOV qword ptr [RDI],0x0 MOV qword ptr [RDI + 0x8],0x0 MOV qword ptr [RDI + 0x10],0x0 MOV RBP,qword ptr [RSI] MOV R12,qword ptr [RSI + 0x8] CMP R12,RBP JNZ 0x00101310 LAB_001012f7: MOV RAX,RBX POP RBX POP RBP POP R12 RET LAB_001012ff: MOV RDI,RBX LAB_00101302: CALL 0...
/* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&) */ vector * func0(vector *param_1) { int8 *puVar1; int *piVar2; int8 *puVar3; int8 *in_RSI; *(int8 *)param_1 = 0; *(int8 *)(param_1 + 8) = 0; *(int8 *)(param_1 + 0x10) = 0...
1,838
func0
#include <vector> #include <cassert>
std::vector<int> func0(const std::vector<std::vector<int>>& lst) { std::vector<int> result; for (const auto& item : lst) { result.push_back(item[0]); } return result; }
int main() { assert((func0({{1, 2}, {3, 4, 5}, {6, 7, 8, 9}}) == std::vector<int>{1, 3, 6})); assert((func0({{1, 2, 3}, {4, 5}}) == std::vector<int>{1, 4})); assert((func0({{9, 8, 1}, {1, 2}}) == std::vector<int>{9, 1})); return 0; }
O2
cpp
func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&): endbr64 push %r15 push %r14 push %r13 mov %rdi,%r13 push %r12 push %rbp push %rbx sub $0x18,%rsp mov (%rsi),%rbx mov 0x8(%rsi),%r14 movq $0x0,(%rdi) movq $0x0,0x8(%rdi...
_Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EE: endbr64 push r12 pxor xmm0, xmm0 push rbp mov rbp, rdi push rbx mov rbx, [rsi] mov r12, [rsi+8] mov qword ptr [rdi+10h], 0 movups xmmword ptr [rdi], xmm0 cmp r12, rbx jz short loc_19C7 xor eax, eax xor esi, esi jmp short loc_19AE ...
long long func0(long long a1, long long a2) { _DWORD **v2; // rbx _DWORD **v3; // r12 long long v4; // rax long long v5; // rsi long long v6; // rsi _DWORD *v7; // rdx v2 = *(_DWORD ***)a2; v3 = *(_DWORD ***)(a2 + 8); *(_QWORD *)(a1 + 16) = 0LL; *(_OWORD *)a1 = 0LL; if ( v3 != v2 ) { v4 = ...
func0: ENDBR64 PUSH R12 PXOR XMM0,XMM0 PUSH RBP MOV RBP,RDI PUSH RBX MOV RBX,qword ptr [RSI] MOV R12,qword ptr [RSI + 0x8] MOV qword ptr [RDI + 0x10],0x0 MOVUPS xmmword ptr [RDI],XMM0 CMP R12,RBX JZ 0x001019c7 XOR EAX,EAX XOR ESI,ESI JMP 0x001019ae LAB_00101990: MOV EAX,dword ptr [RDX] ADD RSI,0x4 ADD RBX,0x18 MOV dwor...
/* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&) */ vector * func0(vector *param_1) { int8 *puVar1; int *piVar2; int8 *puVar3; long *in_RSI; int *piVar4; puVar3 = (int8 *)*in_RSI; puVar1 = (int8 *)in_RSI[1]; *(int8 *)(...
1,839
func0
#include <vector> #include <cassert>
std::vector<int> func0(const std::vector<std::vector<int>>& lst) { std::vector<int> result; for (const auto& item : lst) { result.push_back(item[0]); } return result; }
int main() { assert((func0({{1, 2}, {3, 4, 5}, {6, 7, 8, 9}}) == std::vector<int>{1, 3, 6})); assert((func0({{1, 2, 3}, {4, 5}}) == std::vector<int>{1, 4})); assert((func0({{9, 8, 1}, {1, 2}}) == std::vector<int>{9, 1})); return 0; }
O3
cpp
func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&): endbr64 push %r15 pxor %xmm0,%xmm0 push %r14 push %r13 push %r12 mov %rdi,%r12 push %rbp push %rbx sub $0x28,%rsp mov 0x8(%rsi),%r13 mov (%rsi),%rbx movups %xmm0,(%rdi) ...
_Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EE: endbr64 push r15 pxor xmm0, xmm0 push r14 push r13 push r12 push rbp mov rbp, rdi push rbx sub rsp, 28h mov r13, [rsi+8] mov rbx, [rsi] movups xmmword ptr [rdi], xmm0 mov qword ptr [rdi+10h], 0 cmp r13, rbx jz loc_1AD1 xor r8...
char ** func0(char **a1, long long a2) { _DWORD **v3; // r13 _DWORD **v4; // rbx char *v5; // r8 long long v6; // rcx _DWORD *v7; // r12 char *v8; // r15 signed long long v9; // r14 unsigned long long v10; // rax unsigned long long v11; // rdx char *v12; // r9 char *v14; // rax unsigned long lon...
func0: ENDBR64 PUSH R15 PXOR XMM0,XMM0 PUSH R14 PUSH R13 PUSH R12 PUSH RBP MOV RBP,RDI PUSH RBX SUB RSP,0x28 MOV R13,qword ptr [RSI + 0x8] MOV RBX,qword ptr [RSI] MOVUPS xmmword ptr [RDI],XMM0 MOV qword ptr [RDI + 0x10],0x0 CMP R13,RBX JZ 0x00101ad1 XOR R8D,R8D XOR ECX,ECX JMP 0x00101a4c LAB_00101a30: MOV EAX,dword ptr...
/* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&) */ vector * func0(vector *param_1) { int8 *puVar1; int4 *puVar2; int4 *__src; ulong uVar3; void *__dest; vector *pvVar4; int4 *puVar5; int8 *puVar6; int8 *in_RSI; char ...
1,840
func0
#include <string> #include <assert.h>
int func0(std::string str) { int upper_ctr = 0; for (int i = 0; i < str.length(); i++) { if (str[i] >= 'A' && str[i] <= 'Z') upper_ctr += 1; return upper_ctr; } }
int main() { assert(func0("PYthon") == 1); assert(func0("BigData") == 1); assert(func0("program") == 0); return 0; }
O0
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x28,%rsp mov %rdi,-0x28(%rbp) movl $0x0,-0x18(%rbp) movl $0x0,-0x14(%rbp) mov -0x14(%rbp),%eax movslq %eax,%rbx mov -0x28(%rbp),%rax mov %rax,%rdi callq 1290...
_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 28h mov [rbp+var_28], rdi mov [rbp+var_18], 0 mov [rbp+var_14], 0 nop mov eax, [rbp+var_14] movsxd rbx, eax mov rax, [rbp+var_28] mov rdi, rax call __ZNKSt7__cxx1112bas...
long long func0(long long a1) { unsigned int v3; // [rsp+18h] [rbp-18h] v3 = 0; if ( !std::string::length(a1) ) BUG(); if ( *(char *)std::string::operator[](a1, 0LL) > 64 && *(char *)std::string::operator[](a1, 0LL) <= 90 ) return 1; return v3; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x28 MOV qword ptr [RBP + -0x28],RDI MOV dword ptr [RBP + -0x18],0x0 MOV dword ptr [RBP + -0x14],0x0 NOP MOV EAX,dword ptr [RBP + -0x14] MOVSXD RBX,EAX MOV RAX,qword ptr [RBP + -0x28] MOV RDI,RAX CALL 0x00101210 CMP RBX,RAX SETC AL TEST AL,AL JZ 0x001013d6 MOV EAX,dw...
/* func0(std::string) */ int func0(ulong param_1) { code *pcVar1; int uVar2; long lVar3; char *pcVar4; lVar3 = std::string::length(); if (lVar3 == 0) { /* WARNING: Does not return */ pcVar1 = (code *)invalidInstructionException(); (*pcVar1)(); } pcVar4 = (char *)std::str...
1,841
func0
#include <string> #include <assert.h>
int func0(std::string str) { int upper_ctr = 0; for (int i = 0; i < str.length(); i++) { if (str[i] >= 'A' && str[i] <= 'Z') upper_ctr += 1; return upper_ctr; } }
int main() { assert(func0("PYthon") == 1); assert(func0("BigData") == 1); assert(func0("program") == 0); return 0; }
O1
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >): endbr64 mov (%rdi),%rax movzbl (%rax),%eax sub $0x41,%eax cmp $0x19,%al setbe %al movzbl %al,%eax retq
_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 mov rax, [rdi] movzx eax, byte ptr [rax] sub eax, 41h ; 'A' cmp al, 19h setbe al movzx eax, al retn
_BOOL8 func0(_BYTE **a1) { return (unsigned __int8)(**a1 - 65) <= 0x19u; }
func0: ENDBR64 MOV RAX,qword ptr [RDI] MOVZX EAX,byte ptr [RAX] SUB EAX,0x41 CMP AL,0x19 SETBE AL MOVZX EAX,AL RET
/* func0(std::string) */ bool func0(int8 *param_1) { return (byte)(*(char *)*param_1 + 0xbfU) < 0x1a; }
1,842
func0
#include <string> #include <assert.h>
int func0(std::string str) { int upper_ctr = 0; for (int i = 0; i < str.length(); i++) { if (str[i] >= 'A' && str[i] <= 'Z') upper_ctr += 1; return upper_ctr; } }
int main() { assert(func0("PYthon") == 1); assert(func0("BigData") == 1); assert(func0("program") == 0); return 0; }
O2
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >): endbr64 mov (%rdi),%rax movzbl (%rax),%eax sub $0x41,%eax cmp $0x19,%al setbe %al movzbl %al,%eax retq nopw %cs:0x0(%rax,%rax,1)
_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 mov rax, [rdi] movzx eax, byte ptr [rax] sub eax, 41h ; 'A' cmp al, 19h setbe al movzx eax, al retn
_BOOL8 func0(_BYTE **a1) { return (unsigned __int8)(**a1 - 65) <= 0x19u; }
func0: ENDBR64 MOV RAX,qword ptr [RDI] MOVZX EAX,byte ptr [RAX] SUB EAX,0x41 CMP AL,0x19 SETBE AL MOVZX EAX,AL RET
/* func0(std::string) */ bool func0(int8 *param_1) { return (byte)(*(char *)*param_1 + 0xbfU) < 0x1a; }
1,843
func0
#include <string> #include <assert.h>
int func0(std::string str) { int upper_ctr = 0; for (int i = 0; i < str.length(); i++) { if (str[i] >= 'A' && str[i] <= 'Z') upper_ctr += 1; return upper_ctr; } }
int main() { assert(func0("PYthon") == 1); assert(func0("BigData") == 1); assert(func0("program") == 0); return 0; }
O3
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >): endbr64 mov (%rdi),%rax movzbl (%rax),%eax sub $0x41,%eax cmp $0x19,%al setbe %al movzbl %al,%eax retq nopw %cs:0x0(%rax,%rax,1)
_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 mov rax, [rdi] movzx eax, byte ptr [rax] sub eax, 41h ; 'A' cmp al, 19h setbe al movzx eax, al retn
_BOOL8 func0(_BYTE **a1) { return (unsigned __int8)(**a1 - 65) <= 0x19u; }
func0: ENDBR64 MOV RAX,qword ptr [RDI] MOVZX EAX,byte ptr [RAX] SUB EAX,0x41 CMP AL,0x19 SETBE AL MOVZX EAX,AL RET
/* func0(std::string) */ bool func0(int8 *param_1) { return (byte)(*(char *)*param_1 + 0xbfU) < 0x1a; }
1,844
func0
#include <cassert> #include <string> #include <vector> using namespace std;
vector<vector<string>> func0(const vector<string>& list1) { if (list1.empty()) { return {{}}; } vector<vector<string>> result; // Create a vector from list1[1:] (i.e. elements from index 1 to end) vector<string> sublist(list1.begin() + 1, list1.end()); vector<vector<string>> rest ...
int main(){ { vector<string> input = {"orange", "red", "green", "blue"}; vector<vector<string>> expected = { {}, {"orange"}, {"red"}, {"red", "orange"}, {"green"}, {"green", "orange"}, {"green", "red"}, ...
O0
cpp
func0(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&): endbr64 push %rbp mov %rsp,%rbp push %r13 push %r12 push %rbx sub $0xd8,%rsp mov %rdi,-0xe8(%rbp...
_Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE: endbr64 push rbp mov rbp, rsp push r14 push r13 push r12 push rbx sub rsp, 0E0h mov [rbp+var_F8], rdi mov [rbp+var_100], rsi mov rax, fs:28h mov [rbp+var_28], rax xor eax, eax mov rax, [rbp+v...
long long func0(long long a1, long long a2) { unsigned long long *i; // rbx long long v3; // rbx long long v4; // rax long long v5; // rax long long v7; // [rsp+10h] [rbp-F0h] BYREF _QWORD v8[2]; // [rsp+18h] [rbp-E8h] BYREF long long v9; // [rsp+28h] [rbp-D8h] _QWORD *v10; // [rsp+30h] [rbp-D0h] _BY...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xe0 MOV qword ptr [RBP + -0xf8],RDI MOV qword ptr [RBP + -0x100],RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x28],RAX XOR EAX,EAX MOV RAX,qword ptr [RBP + -0x100] MOV RDI,RAX CALL 0x00105448 TEST AL,AL JZ 0x00102583 LEA RBX,[RBP...
/* func0(std::vector<std::string, std::allocator<std::string > > const&) */ vector * func0(vector *param_1) { char cVar1; bool bVar2; __normal_iterator _Var3; __normal_iterator _Var4; string *psVar5; vector<std::string,std::allocator<std::string>> *this; vector<std::string,std::allocator<std::string>> *...
1,845
func0
#include <cassert> #include <string> #include <vector> using namespace std;
vector<vector<string>> func0(const vector<string>& list1) { if (list1.empty()) { return {{}}; } vector<vector<string>> result; // Create a vector from list1[1:] (i.e. elements from index 1 to end) vector<string> sublist(list1.begin() + 1, list1.end()); vector<vector<string>> rest ...
int main(){ { vector<string> input = {"orange", "red", "green", "blue"}; vector<vector<string>> expected = { {}, {"orange"}, {"red"}, {"red", "orange"}, {"green"}, {"green", "orange"}, {"green", "red"}, ...
O1
cpp
func0(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&): endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0xc8,%rsp mov %rdi,0x1...
_Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 0D8h mov [rsp+108h+var_E8], rdi mov rax, fs:28h mov [rsp+108h+var_40], rax xor eax, eax mov rbx, [rsi+8] mov rax, [rsi] c...
_QWORD * func0(_QWORD *a1, _QWORD *a2) { long long v2; // rbx _QWORD *v3; // rax _QWORD *v4; // rbp long long v5; // rax void **v6; // rbp void **v7; // rbx int v8; // edx int v9; // ecx int v10; // r8d int v11; // r9d _QWORD *v12; // rbp void ***v13; // r13 void ***v14; // r12 char *v15; //...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0xd8 MOV qword ptr [RSP + 0x20],RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0xc8],RAX XOR EAX,EAX MOV RBX,qword ptr [RSI + 0x8] MOV RAX,qword ptr [RSI] CMP RBX,RAX JZ 0x001013d8 MOV R13,RSI MOV qword ptr [RSP + 0x30],0x0 MOV qword ptr...
/* func0(std::vector<std::string, std::allocator<std::string > > const&) */ vector * func0(vector *param_1) { long lVar1; long lVar2; void *pvVar3; vector *pvVar4; vector *pvVar5; string *psVar6; string *psVar7; ulong uVar8; string *psVar9; string *psVar10; int8 uVar11; string *psVar12; int8...
1,846
func0
#include <cassert> #include <string> #include <vector> using namespace std;
vector<vector<string>> func0(const vector<string>& list1) { if (list1.empty()) { return {{}}; } vector<vector<string>> result; // Create a vector from list1[1:] (i.e. elements from index 1 to end) vector<string> sublist(list1.begin() + 1, list1.end()); vector<vector<string>> rest ...
int main(){ { vector<string> input = {"orange", "red", "green", "blue"}; vector<vector<string>> expected = { {}, {"orange"}, {"red"}, {"red", "orange"}, {"green"}, {"green", "orange"}, {"green", "red"}, ...
O2
cpp
func0(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&): endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0xd8,%rsp mov 0x8(%rsi...
_Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE: endbr64 push r15 pxor xmm0, xmm0 push r14 push r13 push r12 push rbp push rbx sub rsp, 0F8h mov rbx, [rsi+8] mov [rsp+128h+var_100], rdi mov [rsp+128h+var_118], rsi mov rax, fs:28h mov [rsp+128...
_QWORD * func0(_QWORD *a1, _QWORD *a2) { long long v2; // rbx _QWORD *v3; // rax _QWORD *v4; // rbp int v5; // edx int v6; // ecx int v7; // r8d int v8; // r9d long long *v9; // rbp long long v10; // r15 long long v11; // rbx signed long long v12; // r12 unsigned long long v13; // rdx __m128i ...
func0: ENDBR64 PUSH R15 PXOR XMM0,XMM0 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0xf8 MOV RBX,qword ptr [RSI + 0x8] MOV qword ptr [RSP + 0x28],RDI MOV qword ptr [RSP + 0x10],RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0xe8],RAX XOR EAX,EAX MOV RAX,qword ptr [RSI] CMP RBX,RAX JZ 0x00103fa8 LEA RBP,[R...
/* func0(std::vector<std::string, std::allocator<std::string > > const&) */ vector * func0(vector *param_1) { int8 uVar1; int auVar2 [16]; ulong uVar3; string *psVar4; string *psVar5; string *psVar6; int (*pauVar7) [16]; int8 *puVar8; int8 *puVar9; vector *pvVar10; long *in_RSI; long lVar11; ...
1,847
func0
#include <cassert> #include <string> #include <vector> using namespace std;
vector<vector<string>> func0(const vector<string>& list1) { if (list1.empty()) { return {{}}; } vector<vector<string>> result; // Create a vector from list1[1:] (i.e. elements from index 1 to end) vector<string> sublist(list1.begin() + 1, list1.end()); vector<vector<string>> rest ...
int main(){ { vector<string> input = {"orange", "red", "green", "blue"}; vector<vector<string>> expected = { {}, {"orange"}, {"red"}, {"red", "orange"}, {"green"}, {"green", "orange"}, {"green", "red"}, ...
O3
cpp
func0(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&): endbr64 push %r15 pxor %xmm0,%xmm0 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x108,...
_Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE: endbr64 push r15 pxor xmm0, xmm0 push r14 push r13 push r12 push rbp push rbx sub rsp, 118h mov rbx, [rsi+8] mov [rsp+148h+var_110], rdi mov [rsp+148h+var_128], rsi mov rax, fs:28h mov [rsp+148...
long long func0(long long a1, long long *a2) { long long v2; // rbx long long v3; // rax _BYTE *v4; // rbp int v5; // edx int v6; // ecx int v7; // r8d int v8; // r9d _QWORD *v9; // r12 long long v10; // r15 long long v11; // rbx unsigned long long v12; // rdx long long v13; // rsi long long ...
func0: ENDBR64 PUSH R15 PXOR XMM0,XMM0 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x118 MOV RBX,qword ptr [RSI + 0x8] MOV qword ptr [RSP + 0x38],RDI MOV qword ptr [RSP + 0x20],RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x108],RAX XOR EAX,EAX MOV RAX,qword ptr [RSI] CMP RBX,RAX JZ 0x001040e8 LEA RBP,...
/* WARNING: Type propagation algorithm not settling */ /* func0(std::vector<std::string, std::allocator<std::string > > const&) */ vector * func0(vector *param_1) { long *plVar1; vector *pvVar2; int8 *puVar3; int8 *puVar4; int8 uVar5; int auVar6 [16]; ulong uVar7; string *psVar8; string *psVar9; s...
1,848
func0
#include <iostream> #include <vector> #include <assert.h>
int func0(const std::vector<int>& arr) { int n = arr.size(); int max_ending_here = 1; int min_ending_here = 1; int max_so_far = 0; int flag = 0; for (int i = 0; i < n; i++) { if (arr[i] > 0) { max_ending_here = max_ending_here * arr[i]; min_ending_here ...
int main() { assert(func0({1, -2, -3, 0, 7, -8, -2}) == 112); assert(func0({6, -3, -10, 0, 2}) == 180); assert(func0({-2, -40, 0, -2, -3}) == 80); 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 mov -0x38(%rbp),%rax mov %rax,%rdi callq 17dc <_ZNKSt6vectorIiSaIiEE4sizeEv> mov %eax,-0x10(%rbp) movl $0x1,-0x24(...
_Z5func0RKSt6vectorIiSaIiEE: endbr64 push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_38], rdi mov rax, fs:28h mov [rbp+var_8], rax xor eax, eax mov rax, [rbp+var_38] mov rdi, rax call _ZNKSt6vectorIiSaIiEE4sizeEv; std::vector<int>::size(void) mov [rbp+var_10], eax mov [rbp+...
long long func0(long long a1) { _DWORD *v1; // rax _DWORD *v2; // rax _DWORD *v3; // rax _DWORD *v4; // rax int v6; // [rsp+14h] [rbp-2Ch] BYREF int v7; // [rsp+18h] [rbp-28h] BYREF int v8; // [rsp+1Ch] [rbp-24h] int v9; // [rsp+20h] [rbp-20h] int v10; // [rsp+24h] [rbp-1Ch] int v11; // [rsp+28h] [...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x38],RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX XOR EAX,EAX MOV RAX,qword ptr [RBP + -0x38] MOV RDI,RAX CALL 0x0010179e MOV dword ptr [RBP + -0x10],EAX MOV dword ptr [RBP + -0x24],0x1 MOV dword ptr [RBP + -0x20],0x1 MOV dword pt...
/* func0(std::vector<int, std::allocator<int> > const&) */ int func0(vector *param_1) { int iVar1; int *piVar2; long in_FS_OFFSET; int local_34 [8]; int local_14; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_34[7] = std::vector<int,std::allocator<int>>::size ...
1,849
func0
#include <iostream> #include <vector> #include <assert.h>
int func0(const std::vector<int>& arr) { int n = arr.size(); int max_ending_here = 1; int min_ending_here = 1; int max_so_far = 0; int flag = 0; for (int i = 0; i < n; i++) { if (arr[i] > 0) { max_ending_here = max_ending_here * arr[i]; min_ending_here ...
int main() { assert(func0({1, -2, -3, 0, 7, -8, -2}) == 112); assert(func0({6, -3, -10, 0, 2}) == 180); assert(func0({-2, -40, 0, -2, -3}) == 80); std::cout << "All test cases passed." << std::endl; return 0; }
O1
cpp
func0(std::vector<int, std::allocator<int> > const&): endbr64 mov (%rdi),%rcx mov 0x8(%rdi),%rdx sub %rcx,%rdx sar $0x2,%rdx test %edx,%edx jle 1318 <_Z5func0RKSt6vectorIiSaIiEE+0x8f> mov %rcx,%rax lea -0x1(%rdx),%edx lea 0x4(%rcx,%rdx,4),%r10 mov $0x0,%r9d mov $0x0,%esi mov $0x1,%edi...
_Z5func0RKSt6vectorIiSaIiEE: endbr64 mov rcx, [rdi] mov rax, [rdi+8] sub rax, rcx sar rax, 2 test eax, eax jle loc_12E3 mov rdx, rcx lea eax, [rax-1] lea r9, [rcx+rax*4+4] mov r8d, 0 mov esi, 0 mov edi, 1 mov eax, 1 mov r10d, 1 jmp short loc_12AC loc_128B: imul...
long long func0(int **a1) { long long v1; // rax int *v2; // rdx long long v3; // r9 int v4; // r8d int v5; // esi int v6; // edi int v7; // eax int v8; // ecx int v9; // r11d v1 = a1[1] - *a1; if ( (int)v1 <= 0 ) { return 0; } else { v2 = *a1; v3 = (long long)&(*a1)[(unsigne...
func0: ENDBR64 MOV RCX,qword ptr [RDI] MOV RAX,qword ptr [RDI + 0x8] SUB RAX,RCX SAR RAX,0x2 TEST EAX,EAX JLE 0x001012e3 MOV RDX,RCX LEA EAX,[RAX + -0x1] LEA R9,[RCX + RAX*0x4 + 0x4] MOV R8D,0x0 MOV ESI,0x0 MOV EDI,0x1 MOV EAX,0x1 MOV R10D,0x1 JMP 0x001012ac LAB_0010128b: IMUL EAX,ECX IMUL EDI,ECX TEST EDI,EDI MOV ECX,...
/* func0(std::vector<int, std::allocator<int> > const&) */ int func0(vector *param_1) { int *piVar1; int iVar2; bool bVar3; int iVar4; int iVar5; int *piVar6; int iVar7; int iVar8; piVar6 = *(int **)param_1; iVar4 = (int)(*(long *)(param_1 + 8) - (long)piVar6 >> 2); if (iVar4 < 1) { iVar4...
1,850
func0
#include <iostream> #include <vector> #include <assert.h>
int func0(const std::vector<int>& arr) { int n = arr.size(); int max_ending_here = 1; int min_ending_here = 1; int max_so_far = 0; int flag = 0; for (int i = 0; i < n; i++) { if (arr[i] > 0) { max_ending_here = max_ending_here * arr[i]; min_ending_here ...
int main() { assert(func0({1, -2, -3, 0, 7, -8, -2}) == 112); assert(func0({6, -3, -10, 0, 2}) == 180); assert(func0({-2, -40, 0, -2, -3}) == 80); 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 sub %rax,%rdx sar $0x2,%rdx test %edx,%edx jle 1550 <_Z5func0RKSt6vectorIiSaIiEE+0xa0> sub $0x1,%edx xor %r8d,%r8d mov $0x1,%ecx mov $0x1,%r10d lea 0x4(%rax,%rdx,4),%rdi mov $0x1,%edx jmp ...
_Z5func0RKSt6vectorIiSaIiEE: endbr64 mov rax, [rdi] mov rdx, [rdi+8] sub rdx, rax sar rdx, 2 test edx, edx jle loc_1570 sub edx, 1 xor r9d, r9d xor edi, edi mov ecx, 1 lea r8, [rax+rdx*4+4] mov edx, 1 jmp short loc_151C loc_14F8: imul ecx, esi mov r9d, 1 imul ...
long long func0(int **a1) { int *v1; // rax long long v2; // rdx int v3; // r9d int v4; // edi int v5; // ecx long long v6; // r8 int v7; // edx int v8; // esi int v9; // r10d int v10; // ecx v1 = *a1; v2 = a1[1] - *a1; if ( (int)v2 <= 0 ) return 0LL; v3 = 0; v4 = 0; v5 = 1; v6 =...
func0: ENDBR64 MOV RAX,qword ptr [RDI] MOV RDX,qword ptr [RDI + 0x8] SUB RDX,RAX SAR RDX,0x2 TEST EDX,EDX JLE 0x00101570 SUB EDX,0x1 XOR R9D,R9D XOR EDI,EDI MOV ECX,0x1 LEA R8,[RAX + RDX*0x4 + 0x4] MOV EDX,0x1 JMP 0x0010151c LAB_001014f8: IMUL ECX,ESI MOV R9D,0x1 IMUL EDX,ESI MOV ESI,0x1 TEST ECX,ECX CMOVG ECX,ESI LAB_...
/* func0(std::vector<int, std::allocator<int> > const&) */ int func0(vector *param_1) { int *piVar1; int iVar2; bool bVar3; int *piVar4; int iVar5; int iVar6; int iVar7; int iVar8; piVar4 = *(int **)param_1; iVar7 = (int)(*(long *)(param_1 + 8) - (long)piVar4 >> 2); if (iVar7 < 1) { retur...
1,851
func0
#include <iostream> #include <vector> #include <assert.h>
int func0(const std::vector<int>& arr) { int n = arr.size(); int max_ending_here = 1; int min_ending_here = 1; int max_so_far = 0; int flag = 0; for (int i = 0; i < n; i++) { if (arr[i] > 0) { max_ending_here = max_ending_here * arr[i]; min_ending_here ...
int main() { assert(func0({1, -2, -3, 0, 7, -8, -2}) == 112); assert(func0({6, -3, -10, 0, 2}) == 180); assert(func0({-2, -40, 0, -2, -3}) == 80); std::cout << "All test cases passed." << std::endl; return 0; }
O3
cpp
func0(std::vector<int, std::allocator<int> > const&): endbr64 mov (%rdi),%rax mov 0x8(%rdi),%rdx sub %rax,%rdx sar $0x2,%rdx test %edx,%edx jle 1530 <_Z5func0RKSt6vectorIiSaIiEE+0xa0> sub $0x1,%edx xor %r8d,%r8d mov $0x1,%ecx mov $0x1,%r10d lea 0x4(%rax,%rdx,4),%rdi mov $0x1,%edx jmp ...
_Z5func0RKSt6vectorIiSaIiEE: endbr64 mov rax, [rdi] mov rdx, [rdi+8] sub rdx, rax sar rdx, 2 test edx, edx jle loc_1560 sub edx, 1 xor r9d, r9d xor edi, edi mov ecx, 1 lea r8, [rax+rdx*4+4] mov edx, 1 jmp short loc_150C loc_14E8: imul ecx, esi mov r9d, 1 imul ...
long long func0(int **a1) { int *v1; // rax long long v2; // rdx int v3; // r9d int v4; // edi int v5; // ecx long long v6; // r8 int v7; // edx int v8; // esi int v9; // r10d int v10; // ecx v1 = *a1; v2 = a1[1] - *a1; if ( (int)v2 <= 0 ) return 0LL; v3 = 0; v4 = 0; v5 = 1; v6 =...
func0: ENDBR64 MOV RAX,qword ptr [RDI] MOV RDX,qword ptr [RDI + 0x8] SUB RDX,RAX SAR RDX,0x2 TEST EDX,EDX JLE 0x00101560 SUB EDX,0x1 XOR R9D,R9D XOR EDI,EDI MOV ECX,0x1 LEA R8,[RAX + RDX*0x4 + 0x4] MOV EDX,0x1 JMP 0x0010150c LAB_001014e8: IMUL ECX,ESI MOV R9D,0x1 IMUL EDX,ESI MOV ESI,0x1 TEST ECX,ECX CMOVG ECX,ESI LAB_...
/* func0(std::vector<int, std::allocator<int> > const&) */ int func0(vector *param_1) { int *piVar1; int iVar2; bool bVar3; int *piVar4; int iVar5; int iVar6; int iVar7; int iVar8; piVar4 = *(int **)param_1; iVar7 = (int)(*(long *)(param_1 + 8) - (long)piVar4 >> 2); if (iVar7 < 1) { retur...
1,852
func0
#include <iostream> #include <unordered_map> #include <assert.h>
bool func0(std::unordered_map<std::string, int> dict, int n) { for (const auto& pair : dict) { if (pair.second != n) { return false; } } return true; }
int main() { std::unordered_map<std::string, int> dict1{{"Cierra Vega", 12}, {"Alden Cantrell", 12}, {"Kierra Gentry", 12}, {"Pierre Cox", 12}}; assert(func0(dict1, 10) == false); assert(func0(dict1, 12) == true); assert(func0(dict1, 5) == false); return 0; }
O0
cpp
func0(std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std:...
_Z5func0St13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_iEEEi: endbr64 push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_38], rdi mov [rbp+var_3C], esi mov rax, fs:28h mov [rbp+var_8], rax xor eax, eax mov rax, [rbp+var_3...
long long func0(long long a1, int a2) { long long v3; // [rsp+18h] [rbp-28h] BYREF _QWORD v4[2]; // [rsp+20h] [rbp-20h] BYREF long long v5; // [rsp+30h] [rbp-10h] unsigned long long v6; // [rsp+38h] [rbp-8h] v6 = __readfsqword(0x28u); v4[1] = a1; v3 = std::unordered_map<std::string,int>::begin(a1); v4...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x38],RDI MOV dword ptr [RBP + -0x3c],ESI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX XOR EAX,EAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RDI,RAX CALL 0x00102ffc MOV qword pt...
/* func0(std::unordered_map<std::string, int, std::hash<std::string >, std::equal_to<std::string >, std::allocator<std::pair<std::string const, int> > >, int) */ int8 func0(unordered_map param_1,int param_2) { char cVar1; int8 uVar2; int4 in_register_0000003c; long in_FS_OFFSET; int8 local_30; int8 loc...
1,853
func0
#include <iostream> #include <unordered_map> #include <assert.h>
bool func0(std::unordered_map<std::string, int> dict, int n) { for (const auto& pair : dict) { if (pair.second != n) { return false; } } return true; }
int main() { std::unordered_map<std::string, int> dict1{{"Cierra Vega", 12}, {"Alden Cantrell", 12}, {"Kierra Gentry", 12}, {"Pierre Cox", 12}}; assert(func0(dict1, 10) == false); assert(func0(dict1, 12) == true); assert(func0(dict1, 5) == false); return 0; }
O1
cpp
func0(std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std:...
_Z5func0St13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_iEEEi: endbr64 mov rax, [rdi+10h] test rax, rax jz short loc_13C9 loc_13B6: cmp [rax+28h], esi jnz short loc_13CF mov rax, [rax] test rax, rax jnz short loc_13B6 mov ...
long long func0(long long a1, int a2) { long long *v2; // rax v2 = *(long long **)(a1 + 16); if ( !v2 ) return 1LL; while ( *((_DWORD *)v2 + 10) == a2 ) { v2 = (long long *)*v2; if ( !v2 ) return 1LL; } return 0LL; }
func0: ENDBR64 MOV RAX,qword ptr [RDI + 0x10] TEST RAX,RAX JZ 0x001013c9 LAB_001013b6: CMP dword ptr [RAX + 0x28],ESI JNZ 0x001013cf MOV RAX,qword ptr [RAX] TEST RAX,RAX JNZ 0x001013b6 MOV EAX,0x1 RET LAB_001013c9: MOV EAX,0x1 RET LAB_001013cf: MOV EAX,0x0 RET
/* func0(std::unordered_map<std::string, int, std::hash<std::string >, std::equal_to<std::string >, std::allocator<std::pair<std::string const, int> > >, int) */ int8 func0(unordered_map param_1,int param_2) { long *plVar1; int4 in_register_0000003c; plVar1 = *(long **)(CONCAT44(in_register_0000003c,param...
1,854
func0
#include <iostream> #include <unordered_map> #include <assert.h>
bool func0(std::unordered_map<std::string, int> dict, int n) { for (const auto& pair : dict) { if (pair.second != n) { return false; } } return true; }
int main() { std::unordered_map<std::string, int> dict1{{"Cierra Vega", 12}, {"Alden Cantrell", 12}, {"Kierra Gentry", 12}, {"Pierre Cox", 12}}; assert(func0(dict1, 10) == false); assert(func0(dict1, 12) == true); assert(func0(dict1, 5) == false); return 0; }
O2
cpp
func0(std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std:...
_Z5func0St13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_iEEEi: endbr64 mov rax, [rdi+10h] test rax, rax jnz short loc_16B8 jmp short loc_16C0 loc_16B0: mov rax, [rax] test rax, rax jz short loc_16C0 loc_16B8: cmp [rax+28h],...
long long func0(long long a1, int a2) { long long *v2; // rax v2 = *(long long **)(a1 + 16); if ( !v2 ) return 1LL; while ( *((_DWORD *)v2 + 10) == a2 ) { v2 = (long long *)*v2; if ( !v2 ) return 1LL; } return 0LL; }
func0: ENDBR64 MOV RAX,qword ptr [RDI + 0x10] TEST RAX,RAX JNZ 0x001016b8 JMP 0x001016c0 LAB_001016b0: MOV RAX,qword ptr [RAX] TEST RAX,RAX JZ 0x001016c0 LAB_001016b8: CMP dword ptr [RAX + 0x28],ESI JZ 0x001016b0 XOR EAX,EAX RET LAB_001016c0: MOV EAX,0x1 RET
/* func0(std::unordered_map<std::string, int, std::hash<std::string >, std::equal_to<std::string >, std::allocator<std::pair<std::string const, int> > >, int) */ int8 func0(unordered_map param_1,int param_2) { int8 *puVar1; int4 in_register_0000003c; puVar1 = *(int8 **)(CONCAT44(in_register_0000003c,param...
1,855
func0
#include <iostream> #include <unordered_map> #include <assert.h>
bool func0(std::unordered_map<std::string, int> dict, int n) { for (const auto& pair : dict) { if (pair.second != n) { return false; } } return true; }
int main() { std::unordered_map<std::string, int> dict1{{"Cierra Vega", 12}, {"Alden Cantrell", 12}, {"Kierra Gentry", 12}, {"Pierre Cox", 12}}; assert(func0(dict1, 10) == false); assert(func0(dict1, 12) == true); assert(func0(dict1, 5) == false); return 0; }
O3
cpp
func0(std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std:...
_Z5func0St13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_iEEEi: endbr64 mov rax, [rdi+10h] test rax, rax jnz short loc_18D8 jmp short loc_18E0 loc_18D0: mov rax, [rax] test rax, rax jz short loc_18E0 loc_18D8: cmp [rax+28h],...
long long func0(long long a1, int a2) { long long *v2; // rax v2 = *(long long **)(a1 + 16); if ( !v2 ) return 1LL; while ( *((_DWORD *)v2 + 10) == a2 ) { v2 = (long long *)*v2; if ( !v2 ) return 1LL; } return 0LL; }
func0: ENDBR64 MOV RAX,qword ptr [RDI + 0x10] TEST RAX,RAX JNZ 0x001018d8 JMP 0x001018e0 LAB_001018d0: MOV RAX,qword ptr [RAX] TEST RAX,RAX JZ 0x001018e0 LAB_001018d8: CMP dword ptr [RAX + 0x28],ESI JZ 0x001018d0 XOR EAX,EAX RET LAB_001018e0: MOV EAX,0x1 RET
/* func0(std::unordered_map<std::string, int, std::hash<std::string >, std::equal_to<std::string >, std::allocator<std::pair<std::string const, int> > >, int) */ int8 func0(unordered_map param_1,int param_2) { int8 *puVar1; int4 in_register_0000003c; puVar1 = *(int8 **)(CONCAT44(in_register_0000003c,param...
1,856
func0
#include <iostream> #include <map> #include <string> #include <assert.h>
std::map<std::string, std::string> func0(std::map<std::string, std::string> dict1) { std::map<std::string, std::string> new_dict; for (auto const& pair : dict1) { if (pair.second != "") { new_dict.insert(pair); } } return new_dict; }
int main() { std::map<std::string, std::string> test1 = {{"c1", "Red"}, {"c2", "Green"}, {"c3", ""}}; std::map<std::string, std::string> result1 = {{"c1", "Red"}, {"c2", "Green"}}; assert(func0(test1) == result1); std::map<std::string, std::string> test2 = {{"c1", "Red"}, {"c2", ""}, {"c3", ""}}; ...
O0
cpp
func0(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_strin...
_Z5func0St3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEE: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 48h mov [rbp+var_48], rdi mov [rbp+var_50], rsi mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax mov rax, [rbp+var_48] mov ...
long long func0(long long a1, long long a2) { long long v3; // [rsp+18h] [rbp-38h] BYREF _QWORD v4[2]; // [rsp+20h] [rbp-30h] BYREF long long v5; // [rsp+30h] [rbp-20h] unsigned long long v6; // [rsp+38h] [rbp-18h] v6 = __readfsqword(0x28u); std::map<std::string,std::string>::map(a1); v4[1] = a2; v3 =...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x48 MOV qword ptr [RBP + -0x48],RDI MOV qword ptr [RBP + -0x50],RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX MOV RAX,qword ptr [RBP + -0x48] MOV RDI,RAX CALL 0x001034d0 MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x28],RAX MO...
/* func0(std::map<std::string, std::string, std::less<std::string >, std::allocator<std::pair<std::string const, std::string > > >) */ map<std::string,std::string,std::less<std::string>,std::allocator<std::pair<std::string_const,std::string>>> * func0(map param_1) { bool bVar1; char cVar2; map<std::string,st...
1,857
func0
#include <iostream> #include <map> #include <string> #include <assert.h>
std::map<std::string, std::string> func0(std::map<std::string, std::string> dict1) { std::map<std::string, std::string> new_dict; for (auto const& pair : dict1) { if (pair.second != "") { new_dict.insert(pair); } } return new_dict; }
int main() { std::map<std::string, std::string> test1 = {{"c1", "Red"}, {"c2", "Green"}, {"c3", ""}}; std::map<std::string, std::string> result1 = {{"c1", "Red"}, {"c2", "Green"}}; assert(func0(test1) == result1); std::map<std::string, std::string> test2 = {{"c1", "Red"}, {"c2", ""}, {"c3", ""}}; ...
O1
cpp
func0(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_strin...
_Z5func0St3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEE: endbr64 push r14 push r13 push r12 push rbp push rbx sub rsp, 10h mov rbp, rdi mov rax, fs:28h mov [rsp+38h+var_30], rax xor eax, eax mov dword ptr [rdi+8], 0 mov qword ptr...
long long func0(long long a1, long long a2) { long long i; // rbx long long insert_unique_pos; // rax long long v4; // rdx _QWORD v6[7]; // [rsp+0h] [rbp-38h] BYREF v6[1] = __readfsqword(0x28u); *(_DWORD *)(a1 + 8) = 0; *(_QWORD *)(a1 + 16) = 0LL; *(_QWORD *)(a1 + 24) = a1 + 8; *(_QWORD *)(a1 + 32) ...
func0: ENDBR64 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x10 MOV RBP,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x8],RAX XOR EAX,EAX MOV dword ptr [RDI + 0x8],0x0 MOV qword ptr [RDI + 0x10],0x0 LEA RAX,[RDI + 0x8] MOV qword ptr [RDI + 0x18],RAX MOV qword ptr [RDI + 0x20],RAX MOV qword ptr [RDI + 0...
/* func0(std::map<std::string, std::string, std::less<std::string >, std::allocator<std::pair<std::string const, std::string > > >) */ _Rb_tree<std::string,std::pair<std::string_const,std::string>,std::_Select1st<std::pair<std::string_const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string_c...
1,858
func0
#include <iostream> #include <map> #include <string> #include <assert.h>
std::map<std::string, std::string> func0(std::map<std::string, std::string> dict1) { std::map<std::string, std::string> new_dict; for (auto const& pair : dict1) { if (pair.second != "") { new_dict.insert(pair); } } return new_dict; }
int main() { std::map<std::string, std::string> test1 = {{"c1", "Red"}, {"c2", "Green"}, {"c3", ""}}; std::map<std::string, std::string> result1 = {{"c1", "Red"}, {"c2", "Green"}}; assert(func0(test1) == result1); std::map<std::string, std::string> test2 = {{"c1", "Red"}, {"c2", ""}, {"c3", ""}}; ...
O2
cpp
func0(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_strin...
_Z5func0St3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEE: endbr64 push r13 lea rax, [rdi+8] push r12 lea r12, [rsi+8] push rbp mov rbp, rdi push rbx sub rsp, 8 mov [rdi+18h], rax mov rbx, [rsi+18h] mov dword ptr [rdi+8], 0 mov qw...
long long func0(long long a1, long long a2) { long long v2; // rbx long long insert_unique_pos; // rax long long v4; // rdx *(_QWORD *)(a1 + 24) = a1 + 8; v2 = *(_QWORD *)(a2 + 24); *(_DWORD *)(a1 + 8) = 0; *(_QWORD *)(a1 + 16) = 0LL; *(_QWORD *)(a1 + 32) = a1 + 8; for ( *(_QWORD *)(a1 + 40) = 0LL; ...
func0: ENDBR64 PUSH R13 LEA RAX,[RDI + 0x8] PUSH R12 LEA R12,[RSI + 0x8] PUSH RBP MOV RBP,RDI PUSH RBX SUB RSP,0x8 MOV qword ptr [RDI + 0x18],RAX MOV RBX,qword ptr [RSI + 0x18] MOV dword ptr [RDI + 0x8],0x0 MOV qword ptr [RDI + 0x10],0x0 MOV qword ptr [RDI + 0x20],RAX MOV qword ptr [RDI + 0x28],0x0 CMP R12,RBX JZ 0x001...
/* func0(std::map<std::string, std::string, std::less<std::string >, std::allocator<std::pair<std::string const, std::string > > >) */ _Rb_tree<std::string,std::pair<std::string_const,std::string>,std::_Select1st<std::pair<std::string_const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string_c...
1,859
func0
#include <iostream> #include <map> #include <string> #include <assert.h>
std::map<std::string, std::string> func0(std::map<std::string, std::string> dict1) { std::map<std::string, std::string> new_dict; for (auto const& pair : dict1) { if (pair.second != "") { new_dict.insert(pair); } } return new_dict; }
int main() { std::map<std::string, std::string> test1 = {{"c1", "Red"}, {"c2", "Green"}, {"c3", ""}}; std::map<std::string, std::string> result1 = {{"c1", "Red"}, {"c2", "Green"}}; assert(func0(test1) == result1); std::map<std::string, std::string> test2 = {{"c1", "Red"}, {"c2", ""}, {"c3", ""}}; ...
O3
cpp
func0(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_strin...
_Z5func0St3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEE: endbr64 push r15 push r14 lea r14, [rsi+8] push r13 mov r13, rdi push r12 push rbp push rbx sub rsp, 38h mov rax, fs:28h mov [rsp+68h+var_40], rax xor eax, eax lea rax, ...
long long func0(long long a1, long long a2) { long long v3; // rbx long long insert_unique_pos; // rax long long v5; // rdx long long v6; // rbp _QWORD *v7; // r12 size_t v8; // r15 void *v9; // rdi _BYTE *v10; // rax void *v11; // rdi size_t v12; // r15 _BYTE *v13; // rcx long long v15; // rax...
func0: ENDBR64 PUSH R15 PUSH R14 LEA R14,[RSI + 0x8] PUSH R13 MOV R13,RDI PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x38 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x28],RAX XOR EAX,EAX LEA RAX,[RDI + 0x8] MOV dword ptr [RDI + 0x8],0x0 MOV qword ptr [RDI + 0x18],RAX MOV RBX,qword ptr [RSI + 0x18] MOV qword ptr [RDI + 0x...
/* func0(std::map<std::string, std::string, std::less<std::string >, std::allocator<std::pair<std::string const, std::string > > >) */ _Rb_tree<std::string,std::pair<std::string_const,std::string>,std::_Select1st<std::pair<std::string_const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string_c...
1,860
func0
#include <iostream> #include <assert.h>
int func0(int arr[], int low, int high, int n) { int mid = low + (high - low) / 2; if ((mid == 0 or arr[mid - 1] <= arr[mid]) && (mid == n - 1 or arr[mid + 1] <= arr[mid])) { return mid; } else if (mid > 0 and arr[mid - 1] > arr[mid]) { return func0(arr, low, mid - 1, n); ...
int main() { int arr1[6] = {1, 3, 20, 4, 1, 0}; int arr2[5] = {2, 3, 4, 5, 6}; int arr3[6] = {8, 9, 11, 12, 14, 15}; assert(func0(arr1,0,6-1, 6) == 2); assert(func0(arr2,0,5-1, 5) == 4); assert(func0(arr3,0,6-1, 6) == 5); return 0; }
O0
cpp
func0(int*, int, int, int): endbr64 push %rbp mov %rsp,%rbp sub $0x30,%rsp mov %rdi,-0x18(%rbp) mov %esi,-0x1c(%rbp) mov %edx,-0x20(%rbp) mov %ecx,-0x24(%rbp) mov -0x20(%rbp),%eax sub -0x1c(%rbp),%eax mov %eax,%edx shr $0x1f,%edx add %edx,%eax sar %eax mov %eax,%edx mov -0x1c...
_Z5func0Piiii: endbr64 push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_18], rdi mov [rbp+var_1C], esi mov [rbp+var_20], edx mov [rbp+var_24], ecx mov eax, [rbp+var_20] sub eax, [rbp+var_1C] mov edx, eax shr edx, 1Fh add eax, edx sar eax, 1 mov edx, eax mov eax,...
long long func0(int *a1, int a2, int a3, int a4) { int v5; // [rsp+2Ch] [rbp-4h] v5 = (a3 - a2) / 2 + a2; if ( (!v5 || a1[v5 - 1] <= a1[v5]) && (v5 == a4 - 1 || a1[v5 + 1] <= a1[v5]) ) return (unsigned int)v5; if ( v5 <= 0 || a1[v5 - 1] <= a1[v5] ) return func0(a1, v5 + 1, a3, a4); return func0(a1, ...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x18],RDI MOV dword ptr [RBP + -0x1c],ESI MOV dword ptr [RBP + -0x20],EDX MOV dword ptr [RBP + -0x24],ECX MOV EAX,dword ptr [RBP + -0x20] SUB EAX,dword ptr [RBP + -0x1c] MOV EDX,EAX SHR EDX,0x1f ADD EAX,EDX SAR EAX,0x1 MOV EDX,EAX MOV EAX,dword ptr ...
/* func0(int*, int, int, int) */ ulong func0(int *param_1,int param_2,int param_3,int param_4) { uint uVar1; ulong uVar2; uVar1 = param_2 + (param_3 - param_2) / 2; if (((uVar1 == 0) || (param_1[(long)(int)uVar1 + -1] <= param_1[(int)uVar1])) && ((uVar1 == param_4 - 1U || (param_1[(long)(int)uVar1 + 1...
1,861
func0
#include <iostream> #include <assert.h>
int func0(int arr[], int low, int high, int n) { int mid = low + (high - low) / 2; if ((mid == 0 or arr[mid - 1] <= arr[mid]) && (mid == n - 1 or arr[mid + 1] <= arr[mid])) { return mid; } else if (mid > 0 and arr[mid - 1] > arr[mid]) { return func0(arr, low, mid - 1, n); ...
int main() { int arr1[6] = {1, 3, 20, 4, 1, 0}; int arr2[5] = {2, 3, 4, 5, 6}; int arr3[6] = {8, 9, 11, 12, 14, 15}; assert(func0(arr1,0,6-1, 6) == 2); assert(func0(arr2,0,5-1, 5) == 4); assert(func0(arr3,0,6-1, 6) == 5); return 0; }
O1
cpp
func0(int*, int, int, int): endbr64 sub $0x8,%rsp mov %edx,%r8d sub %esi,%r8d mov %r8d,%eax shr $0x1f,%eax add %r8d,%eax sar %eax add %esi,%eax je 11d4 <_Z5func0Piiii+0x2b> movslq %eax,%r8 mov (%rdi,%r8,4),%r10d cmp %r10d,-0x4(%rdi,%r8,4) jg 1203 <_Z5func0Piiii+0x5a> lea -0x1(%r...
_Z5func0Piiii: endbr64 sub rsp, 8 mov r8d, edx sub r8d, esi mov eax, r8d shr eax, 1Fh add eax, r8d sar eax, 1 add eax, esi jz short loc_1194 movsxd r8, eax mov r10d, [rdi+r8*4] cmp [rdi+r8*4-4], r10d jg short loc_11C3 loc_1194: lea r8d, [rcx-1] cmp r8d, eax jz ...
long long func0(int *a1, int a2, int a3, int a4) { long long result; // rax int v5; // r9d result = (unsigned int)(a2 + (a3 - a2) / 2); if ( (_DWORD)result && a1[(int)result - 1] > a1[(int)result] ) { if ( (int)result <= 0 ) return func0(a1, (int)result + 1, a3, a4); return func0(a1, a2, (int)...
func0: ENDBR64 SUB RSP,0x8 MOV R8D,EDX SUB R8D,ESI MOV EAX,R8D SHR EAX,0x1f ADD EAX,R8D SAR EAX,0x1 ADD EAX,ESI JZ 0x00101194 MOVSXD R8,EAX MOV R10D,dword ptr [RDI + R8*0x4] CMP dword ptr [RDI + R8*0x4 + -0x4],R10D JG 0x001011c3 LAB_00101194: LEA R8D,[RCX + -0x1] CMP R8D,EAX JZ 0x001011be MOVSXD R8,EAX MOV R9D,dword pt...
/* func0(int*, int, int, int) */ void func0(int *param_1,int param_2,int param_3,int param_4) { int iVar1; iVar1 = (param_3 - param_2) / 2 + param_2; if ((iVar1 == 0) || (param_1[(long)iVar1 + -1] <= param_1[iVar1])) { if (param_4 + -1 == iVar1) { return; } if (param_1[(long)iVar1 + 1] <= p...
1,862
func0
#include <iostream> #include <assert.h>
int func0(int arr[], int low, int high, int n) { int mid = low + (high - low) / 2; if ((mid == 0 or arr[mid - 1] <= arr[mid]) && (mid == n - 1 or arr[mid + 1] <= arr[mid])) { return mid; } else if (mid > 0 and arr[mid - 1] > arr[mid]) { return func0(arr, low, mid - 1, n); ...
int main() { int arr1[6] = {1, 3, 20, 4, 1, 0}; int arr2[5] = {2, 3, 4, 5, 6}; int arr3[6] = {8, 9, 11, 12, 14, 15}; assert(func0(arr1,0,6-1, 6) == 2); assert(func0(arr2,0,5-1, 5) == 4); assert(func0(arr3,0,6-1, 6) == 5); return 0; }
O2
cpp
func0(int*, int, int, int): endbr64 lea -0x1(%rcx),%r11d nopl 0x0(%rax,%rax,1) mov %edx,%r8d sub %esi,%r8d mov %r8d,%eax shr $0x1f,%eax add %r8d,%eax sar %eax add %esi,%eax je 1390 <_Z5func0Piiii+0x40> movslq %eax,%r8 mov (%rdi,%r8,4),%ecx cmp %ecx,-0x4(%rdi,%r8,4) jle 1390 <_Z5fu...
_Z5func0Piiii: endbr64 mov r9d, edx lea r10d, [rcx-1] nop dword ptr [rax+rax+00h] loc_12B0: mov edx, r9d sub edx, esi mov eax, edx shr eax, 1Fh add eax, edx sar eax, 1 add eax, esi jz short loc_12E0 movsxd rdx, eax mov ecx, [rdi+rdx*4] cmp [rdi+rdx*4-4], ecx jle ...
long long func0(int *a1, int a2, int a3, int a4) { int v5; // r10d long long result; // rax long long v7; // rcx int v8; // r8d v5 = a4 - 1; while ( 1 ) { while ( 1 ) { result = (unsigned int)(a2 + (a3 - a2) / 2); if ( !(_DWORD)result || a1[(int)result - 1] <= a1[(int)result] ) ...
func0: ENDBR64 MOV R9D,EDX LEA R10D,[RCX + -0x1] NOP dword ptr [RAX + RAX*0x1] LAB_001012b0: MOV EDX,R9D SUB EDX,ESI MOV EAX,EDX SHR EAX,0x1f ADD EAX,EDX SAR EAX,0x1 ADD EAX,ESI JZ 0x001012e0 MOVSXD RDX,EAX MOV ECX,dword ptr [RDI + RDX*0x4] CMP dword ptr [RDI + RDX*0x4 + -0x4],ECX JLE 0x001012e0 TEST EAX,EAX JLE 0x0010...
/* func0(int*, int, int, int) */ void func0(int *param_1,int param_2,int param_3,int param_4) { int iVar1; do { while ((iVar1 = (param_3 - param_2) / 2 + param_2, iVar1 != 0 && (param_1[iVar1] < param_1[(long)iVar1 + -1]))) { if (iVar1 < 1) goto LAB_0010130a; LAB_001012d2: param_3 = ...
1,863
func0
#include <iostream> #include <assert.h>
int func0(int arr[], int low, int high, int n) { int mid = low + (high - low) / 2; if ((mid == 0 or arr[mid - 1] <= arr[mid]) && (mid == n - 1 or arr[mid + 1] <= arr[mid])) { return mid; } else if (mid > 0 and arr[mid - 1] > arr[mid]) { return func0(arr, low, mid - 1, n); ...
int main() { int arr1[6] = {1, 3, 20, 4, 1, 0}; int arr2[5] = {2, 3, 4, 5, 6}; int arr3[6] = {8, 9, 11, 12, 14, 15}; assert(func0(arr1,0,6-1, 6) == 2); assert(func0(arr2,0,5-1, 5) == 4); assert(func0(arr3,0,6-1, 6) == 5); return 0; }
O3
cpp
func0(int*, int, int, int): endbr64 lea -0x1(%rcx),%r11d nopl 0x0(%rax,%rax,1) mov %edx,%r8d sub %esi,%r8d mov %r8d,%eax shr $0x1f,%eax add %r8d,%eax sar %eax add %esi,%eax je 1360 <_Z5func0Piiii+0x40> movslq %eax,%r8 mov (%rdi,%r8,4),%ecx cmp %ecx,-0x4(%rdi,%r8,4) jle 1360 <_Z5fu...
_Z5func0Piiii: endbr64 mov r9d, edx lea r10d, [rcx-1] nop dword ptr [rax+rax+00h] loc_12B0: mov edx, r9d sub edx, esi mov eax, edx shr eax, 1Fh add eax, edx sar eax, 1 add eax, esi jz short loc_12E0 movsxd rdx, eax mov ecx, [rdi+rdx*4] cmp [rdi+rdx*4-4], ecx jle ...
long long func0(int *a1, int a2, int a3, int a4) { int v5; // r10d long long result; // rax long long v7; // rcx int v8; // r8d v5 = a4 - 1; while ( 1 ) { while ( 1 ) { result = (unsigned int)(a2 + (a3 - a2) / 2); if ( !(_DWORD)result || a1[(int)result - 1] <= a1[(int)result] ) ...
func0: ENDBR64 MOV R9D,EDX LEA R10D,[RCX + -0x1] NOP dword ptr [RAX + RAX*0x1] LAB_001012b0: MOV EDX,R9D SUB EDX,ESI MOV EAX,EDX SHR EAX,0x1f ADD EAX,EDX SAR EAX,0x1 ADD EAX,ESI JZ 0x001012e0 MOVSXD RDX,EAX MOV ECX,dword ptr [RDI + RDX*0x4] CMP dword ptr [RDI + RDX*0x4 + -0x4],ECX JLE 0x001012e0 TEST EAX,EAX JLE 0x0010...
/* func0(int*, int, int, int) */ void func0(int *param_1,int param_2,int param_3,int param_4) { int iVar1; do { while ((iVar1 = (param_3 - param_2) / 2 + param_2, iVar1 != 0 && (param_1[iVar1] < param_1[(long)iVar1 + -1]))) { if (iVar1 < 1) goto LAB_0010130a; LAB_001012d2: param_3 = ...
1,864
func0
#include <iostream> #include <assert.h>
int func0(int deciNum) { int octalNum = 0; int countval = 1; int remainder; while (deciNum != 0) { remainder = deciNum % 8; octalNum += remainder * countval; countval *= 10; deciNum /= 8; } return octalNum; }
int main() { assert(func0(10) == 12); assert(func0(2) == 2); assert(func0(33) == 41); return 0; }
O0
cpp
func0(int): endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x14(%rbp) movl $0x0,-0xc(%rbp) movl $0x1,-0x8(%rbp) cmpl $0x0,-0x14(%rbp) je 11e5 <_Z5func0i+0x5c> mov -0x14(%rbp),%eax cltd shr $0x1d,%edx add %edx,%eax and $0x7,%eax sub %edx,%eax mov %eax,-0x4(%rbp) mov -0x4(%rbp),%eax imul...
_Z5func0i: endbr64 push rbp mov rbp, rsp mov [rbp+var_14], edi mov [rbp+var_C], 0 mov [rbp+var_8], 1 jmp short loc_11A3 loc_1164: mov edx, [rbp+var_14] mov eax, edx sar eax, 1Fh shr eax, 1Dh add edx, eax and edx, 7 sub edx, eax mov [rbp+var_4], edx mov eax, [rb...
long long func0(int a1) { unsigned int v3; // [rsp+8h] [rbp-Ch] int v4; // [rsp+Ch] [rbp-8h] v3 = 0; v4 = 1; while ( a1 ) { v3 += v4 * (a1 % 8); v4 *= 10; a1 /= 8; } return v3; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x14],EDI MOV dword ptr [RBP + -0xc],0x0 MOV dword ptr [RBP + -0x8],0x1 JMP 0x001011a3 LAB_00101164: MOV EDX,dword ptr [RBP + -0x14] MOV EAX,EDX SAR EAX,0x1f SHR EAX,0x1d ADD EDX,EAX AND EDX,0x7 SUB EDX,EAX MOV dword ptr [RBP + -0x4],EDX MOV EAX,dword ptr [RBP +...
/* func0(int) */ int func0(int param_1) { int4 local_1c; int4 local_14; int4 local_10; local_14 = 0; local_10 = 1; for (local_1c = param_1; local_1c != 0; local_1c = local_1c >> 3) { local_14 = local_14 + (local_1c % 8) * local_10; local_10 = local_10 * 10; if (local_1c < 0) { local_1...
1,865
func0
#include <iostream> #include <assert.h>
int func0(int deciNum) { int octalNum = 0; int countval = 1; int remainder; while (deciNum != 0) { remainder = deciNum % 8; octalNum += remainder * countval; countval *= 10; deciNum /= 8; } return octalNum; }
int main() { assert(func0(10) == 12); assert(func0(2) == 2); assert(func0(33) == 41); return 0; }
O1
cpp
func0(int): endbr64 mov %edi,%edx test %edi,%edi je 11cc <_Z5func0i+0x43> mov $0x1,%ecx mov $0x0,%r8d mov %edx,%esi sar $0x1f,%esi shr $0x1d,%esi lea (%rdx,%rsi,1),%eax and $0x7,%eax sub %esi,%eax imul %ecx,%eax add %eax,%r8d lea (%rcx,%rcx,4),%ecx add %ecx,%ecx lea 0x7(%r...
_Z5func0i: endbr64 test edi, edi jz short loc_1187 mov edx, 1 mov esi, 0 loc_115B: mov ecx, edi sar ecx, 1Fh shr ecx, 1Dh lea eax, [rdi+rcx] and eax, 7 sub eax, ecx imul eax, edx add esi, eax lea edx, [rdx+rdx*4] add edx, edx lea eax, [rdi+7] test edi, edi c...
long long func0(int a1) { int v1; // eax int v2; // edx unsigned int v3; // esi if ( a1 ) { v2 = 1; v3 = 0; do { v3 += v2 * (a1 % 8); v2 *= 10; a1 /= 8; } while ( v1 >> 3 ); } else { return 0; } return v3; }
func0: ENDBR64 TEST EDI,EDI JZ 0x00101187 MOV EDX,0x1 MOV ESI,0x0 LAB_0010115b: MOV ECX,EDI SAR ECX,0x1f SHR ECX,0x1d LEA EAX,[RDI + RCX*0x1] AND EAX,0x7 SUB EAX,ECX IMUL EAX,EDX ADD ESI,EAX LEA EDX,[RDX + RDX*0x4] ADD EDX,EDX LEA EAX,[RDI + 0x7] TEST EDI,EDI CMOVNS EAX,EDI SAR EAX,0x3 MOV EDI,EAX JNZ 0x0010115b LAB_00...
/* func0(int) */ int func0(int param_1) { int iVar1; int iVar2; int iVar3; if (param_1 == 0) { iVar3 = 0; } else { iVar2 = 1; iVar3 = 0; do { iVar3 = iVar3 + (param_1 % 8) * iVar2; iVar2 = iVar2 * 10; iVar1 = param_1 + 7; if (-1 < param_1) { iVar1 = param...
1,866
func0
#include <iostream> #include <assert.h>
int func0(int deciNum) { int octalNum = 0; int countval = 1; int remainder; while (deciNum != 0) { remainder = deciNum % 8; octalNum += remainder * countval; countval *= 10; deciNum /= 8; } return octalNum; }
int main() { assert(func0(10) == 12); assert(func0(2) == 2); assert(func0(33) == 41); return 0; }
O2
cpp
func0(int): endbr64 test %edi,%edi je 1200 <_Z5func0i+0x40> mov $0x1,%edx xor %r8d,%r8d mov %edi,%ecx sar $0x1f,%ecx shr $0x1d,%ecx lea (%rdi,%rcx,1),%eax and $0x7,%eax sub %ecx,%eax imul %edx,%eax lea (%rdx,%rdx,4),%edx add %edx,%edx add %eax,%r8d test %edi,%edi lea 0x7(%r...
_Z5func0i: endbr64 test edi, edi jz short loc_1180 mov edx, 1 xor esi, esi nop loc_1150: mov ecx, edi sar ecx, 1Fh shr ecx, 1Dh lea eax, [rdi+rcx] and eax, 7 sub eax, ecx imul eax, edx lea edx, [rdx+rdx*4] add edx, edx add esi, eax test edi, edi lea eax, [rd...
long long func0(int a1) { int v1; // edx unsigned int v2; // esi int v3; // eax if ( !a1 ) return 0LL; v1 = 1; v2 = 0; do { v3 = v1 * (a1 % 8); v1 *= 10; v2 += v3; a1 /= 8; } while ( a1 ); return v2; }
func0: ENDBR64 TEST EDI,EDI JZ 0x00101180 MOV EDX,0x1 XOR ESI,ESI NOP LAB_00101150: MOV ECX,EDI SAR ECX,0x1f SHR ECX,0x1d LEA EAX,[RDI + RCX*0x1] AND EAX,0x7 SUB EAX,ECX IMUL EAX,EDX LEA EDX,[RDX + RDX*0x4] ADD EDX,EDX ADD ESI,EAX TEST EDI,EDI LEA EAX,[RDI + 0x7] CMOVS EDI,EAX SAR EDI,0x3 JNZ 0x00101150 MOV EAX,ESI RET...
/* func0(int) */ int func0(int param_1) { int iVar1; int iVar2; int iVar3; if (param_1 != 0) { iVar2 = 1; iVar3 = 0; do { iVar1 = (param_1 % 8) * iVar2; iVar2 = iVar2 * 10; iVar3 = iVar3 + iVar1; if (param_1 < 0) { param_1 = param_1 + 7; } param_1 = p...
1,867
func0
#include <iostream> #include <assert.h>
int func0(int deciNum) { int octalNum = 0; int countval = 1; int remainder; while (deciNum != 0) { remainder = deciNum % 8; octalNum += remainder * countval; countval *= 10; deciNum /= 8; } return octalNum; }
int main() { assert(func0(10) == 12); assert(func0(2) == 2); assert(func0(33) == 41); return 0; }
O3
cpp
func0(int): endbr64 test %edi,%edi je 1200 <_Z5func0i+0x40> mov $0x1,%edx xor %r8d,%r8d mov %edi,%ecx sar $0x1f,%ecx shr $0x1d,%ecx lea (%rdi,%rcx,1),%eax and $0x7,%eax sub %ecx,%eax imul %edx,%eax lea (%rdx,%rdx,4),%edx add %edx,%edx add %eax,%r8d test %edi,%edi lea 0x7(%r...
_Z5func0i: endbr64 test edi, edi jz short loc_1180 mov edx, 1 xor esi, esi nop loc_1150: mov ecx, edi sar ecx, 1Fh shr ecx, 1Dh lea eax, [rdi+rcx] and eax, 7 sub eax, ecx imul eax, edx lea edx, [rdx+rdx*4] add edx, edx add esi, eax test edi, edi lea eax, [rd...
long long func0(int a1) { int v1; // edx unsigned int v2; // esi int v3; // eax if ( !a1 ) return 0LL; v1 = 1; v2 = 0; do { v3 = v1 * (a1 % 8); v1 *= 10; v2 += v3; a1 /= 8; } while ( a1 ); return v2; }
func0: ENDBR64 TEST EDI,EDI JZ 0x00101180 MOV EDX,0x1 XOR ESI,ESI NOP LAB_00101150: MOV ECX,EDI SAR ECX,0x1f SHR ECX,0x1d LEA EAX,[RDI + RCX*0x1] AND EAX,0x7 SUB EAX,ECX IMUL EAX,EDX LEA EDX,[RDX + RDX*0x4] ADD EDX,EDX ADD ESI,EAX TEST EDI,EDI LEA EAX,[RDI + 0x7] CMOVS EDI,EAX SAR EDI,0x3 JNZ 0x00101150 MOV EAX,ESI RET...
/* func0(int) */ int func0(int param_1) { int iVar1; int iVar2; int iVar3; if (param_1 != 0) { iVar2 = 1; iVar3 = 0; do { iVar1 = (param_1 % 8) * iVar2; iVar2 = iVar2 * 10; iVar3 = iVar3 + iVar1; if (param_1 < 0) { param_1 = param_1 + 7; } param_1 = p...
1,868
func0
#include <iostream> #include <vector> #include <algorithm> #include <assert.h> using namespace std;
int func0(const vector<int>& arr, int n) { vector<int> mpis(n, 0); for (int i = 0; i < n; ++i) { mpis[i] = arr[i]; } for (int i = 1; i < n; ++i) { for (int j = 0; j < i; ++j) { if (arr[i] > arr[j] && mpis[i] < mpis[j] * arr[i]) { mpis[i] = mpis[j] * ...
int main() { assert(func0({3, 100, 4, 5, 150, 6}, 6) == 45000); assert(func0({4, 42, 55, 68, 80}, 5) == 50265600); assert(func0({10, 22, 9, 33, 21, 50, 41, 60}, 8) == 21780000); cout << "All tests passed." << endl; return 0; }
O0
cpp
func0(std::vector<int, std::allocator<int> > const&, int): endbr64 push %rbp mov %rsp,%rbp push %r12 push %rbx sub $0x50,%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 1912 <_ZNSaIiEC1Ev> movl...
_Z5func0RKSt6vectorIiSaIiEEi: endbr64 push rbp mov rbp, rsp push r12 push rbx sub rsp, 50h 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 dword ptr [rbp+var_40], 0 mov...
long long func0(long long a1, int a2) { int v2; // ebx int v3; // ebx int v4; // r12d int v5; // ebx int v7; // ebx int v8; // ebx long long v9; // rbx long long v10; // rax char v12; // [rsp+13h] [rbp-4Dh] BYREF int i; // [rsp+14h] [rbp-4Ch] int j; // [rsp+18h] [rbp-48h] int k; // [rsp+1Ch] [r...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R12 PUSH RBX SUB RSP,0x50 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 + -0x40],0x0 MOV EAX,dword ptr [RBP ...
/* func0(std::vector<int, std::allocator<int> > const&, int) */ int4 func0(vector *param_1,int param_2) { int iVar1; int iVar2; int4 uVar3; bool bVar4; __normal_iterator _Var5; __normal_iterator _Var6; int *piVar7; int4 extraout_var; int4 *puVar8; long in_FS_OFFSET; allocator local_55; int loc...
1,869
func0
#include <iostream> #include <vector> #include <algorithm> #include <assert.h> using namespace std;
int func0(const vector<int>& arr, int n) { vector<int> mpis(n, 0); for (int i = 0; i < n; ++i) { mpis[i] = arr[i]; } for (int i = 1; i < n; ++i) { for (int j = 0; j < i; ++j) { if (arr[i] > arr[j] && mpis[i] < mpis[j] * arr[i]) { mpis[i] = mpis[j] * ...
int main() { assert(func0({3, 100, 4, 5, 150, 6}, 6) == 45000); assert(func0({4, 42, 55, 68, 80}, 5) == 50265600); assert(func0({10, 22, 9, 33, 21, 50, 41, 60}, 8) == 21780000); cout << "All tests passed." << endl; return 0; }
O1
cpp
func0(std::vector<int, std::allocator<int> > const&, int): endbr64 push %r12 push %rbp push %rbx movslq %esi,%rax movabs $0x1fffffffffffffff,%rdx cmp %rdx,%rax ja 130c <_Z5func0RKSt6vectorIiSaIiEEi+0x83> mov %rdi,%rbx mov %esi,%ebp test %rax,%rax je 1352 <_Z5func0RKSt6vectorIiSaIiEEi+0xc9> lea ...
_Z5func0RKSt6vectorIiSaIiEEi: endbr64 push r12 push rbp push rbx movsxd rbx, esi mov rax, rbx shr rax, 3Dh jnz short loc_12B7 mov r12, rdi mov ebp, esi test rbx, rbx jz loc_1307 shl rbx, 2 mov rdi, rbx; unsigned __int64 call __Znwm; operator new(ulong) mov rdi, rax; ...
long long func0(long long *a1, int a2) { unsigned long long v2; // rbx unsigned int *v5; // rax unsigned int *v6; // rdi unsigned int *v7; // r10 long long v8; // rsi unsigned long long v9; // rax long long v10; // rcx int v11; // r9d unsigned long long v12; // rax int v13; // edx _DWORD *v14; //...
func0: ENDBR64 PUSH R12 PUSH RBP PUSH RBX MOVSXD RBX,ESI MOV RAX,RBX SHR RAX,0x3d JNZ 0x001012b7 MOV R12,RDI MOV EBP,ESI TEST RBX,RBX JZ 0x00101307 SHL RBX,0x2 MOV RDI,RBX CALL 0x00101120 MOV RDI,RAX LEA R10,[RAX + RBX*0x1] LAB_0010127e: MOV dword ptr [RAX],0x0 ADD RAX,0x4 CMP R10,RAX JNZ 0x0010127e MOV RSI,qword ptr [...
/* func0(std::vector<int, std::allocator<int> > const&, int) */ int func0(vector *param_1,int param_2) { char *pcVar1; long lVar2; long in_RCX; int iVar3; int *piVar4; ulong uVar5; ulong uVar6; uint unaff_EBP; int4 in_register_00000034; long lVar7; int *piVar8; int *in_R8; uint uVar9; ulon...
1,870
func0
#include <iostream> #include <vector> #include <algorithm> #include <assert.h> using namespace std;
int func0(const vector<int>& arr, int n) { vector<int> mpis(n, 0); for (int i = 0; i < n; ++i) { mpis[i] = arr[i]; } for (int i = 1; i < n; ++i) { for (int j = 0; j < i; ++j) { if (arr[i] > arr[j] && mpis[i] < mpis[j] * arr[i]) { mpis[i] = mpis[j] * ...
int main() { assert(func0({3, 100, 4, 5, 150, 6}, 6) == 45000); assert(func0({4, 42, 55, 68, 80}, 5) == 50265600); assert(func0({10, 22, 9, 33, 21, 50, 41, 60}, 8) == 21780000); cout << "All tests passed." << endl; return 0; }
O2
cpp
func0(std::vector<int, std::allocator<int> > const&, int): endbr64 movabs $0x1fffffffffffffff,%rdx movslq %esi,%rax push %r12 push %rbp push %rbx cmp %rdx,%rax ja 1636 <_Z5func0RKSt6vectorIiSaIiEEi+0x116> test %rax,%rax je 161f <_Z5func0RKSt6vectorIiSaIiEEi+0xff> lea 0x0(,%rax,4),%rbx mov %rdi,...
_Z5func0RKSt6vectorIiSaIiEEi: endbr64 push r13 push r12 movsxd r12, esi push rbp mov rax, r12 push rbx sub rsp, 8 shr rax, 3Dh jnz loc_1660 test r12, r12 jz loc_164D mov rbx, r12 shl r12, 2 mov r13, rdi mov rdi, r12; unsigned __int64 call __Znwm; operator new(ulon...
long long func0(long long *a1, int a2) { unsigned long long v2; // r12 char *v4; // rax int *v5; // rbp int *v6; // rax long long v7; // r8 int *v8; // rdi long long v9; // rax _DWORD *v10; // rsi long long v11; // rcx unsigned long long v12; // rax int v13; // edx int *v14; // rax int v15; /...
func0: ENDBR64 PUSH R13 PUSH R12 MOVSXD R12,ESI PUSH RBP MOV RAX,R12 PUSH RBX SUB RSP,0x8 SHR RAX,0x3d JNZ 0x00101660 TEST R12,R12 JZ 0x0010164d MOV RBX,R12 SHL R12,0x2 MOV R13,RDI MOV RDI,R12 CALL 0x00101180 MOV RDX,R12 XOR ESI,ESI MOV RDI,RAX LEA RBP,[RAX + R12*0x1] CALL 0x00101130 MOV R8,qword ptr [R13] MOV RDI,RAX ...
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* func0(std::vector<int, std::allocator<int> > const&, int) */ ulong func0(vector *param_1,int param_2) { uint *puVar1; int *piVar2; void *__s; uint *puVar3; long lVar4; long lVar5; uint *puVar6; int iVar7; uint uV...
1,871
func0
#include <iostream> #include <vector> #include <algorithm> #include <assert.h> using namespace std;
int func0(const vector<int>& arr, int n) { vector<int> mpis(n, 0); for (int i = 0; i < n; ++i) { mpis[i] = arr[i]; } for (int i = 1; i < n; ++i) { for (int j = 0; j < i; ++j) { if (arr[i] > arr[j] && mpis[i] < mpis[j] * arr[i]) { mpis[i] = mpis[j] * ...
int main() { assert(func0({3, 100, 4, 5, 150, 6}, 6) == 45000); assert(func0({4, 42, 55, 68, 80}, 5) == 50265600); assert(func0({10, 22, 9, 33, 21, 50, 41, 60}, 8) == 21780000); cout << "All tests passed." << endl; return 0; }
O3
cpp
func0(std::vector<int, std::allocator<int> > const&, int): endbr64 movabs $0x1fffffffffffffff,%rdx movslq %esi,%rax push %r12 push %rbp push %rbx cmp %rdx,%rax ja 176e <_Z5func0RKSt6vectorIiSaIiEEi+0x26e> test %rax,%rax je 1729 <_Z5func0RKSt6vectorIiSaIiEEi+0x229> lea 0x0(,%rax,4),%rbx mov %rdi...
_Z5func0RKSt6vectorIiSaIiEEi: endbr64 push r13 push r12 push rbp movsxd rbp, esi push rbx mov rax, rbp sub rsp, 8 shr rax, 3Dh jnz loc_17A5 test rbp, rbp jz loc_1712 mov r12, rbp shl rbp, 2 mov r13, rdi mov rdi, rbp; unsigned __int64 call __Znwm; operator new(ulon...
long long func0(long long *a1, int a2) { unsigned long long v2; // rbp char *v4; // rax signed int *v5; // rbx signed int *v6; // rax long long v7; // r8 signed int *v8; // rdi signed int *v9; // rdx _DWORD *v10; // rsi long long v11; // rax long long v12; // rcx unsigned long long v13; // rax ...
func0: ENDBR64 PUSH R13 PUSH R12 PUSH RBP MOVSXD RBP,ESI PUSH RBX MOV RAX,RBP SUB RSP,0x8 SHR RAX,0x3d JNZ 0x001017a5 TEST RBP,RBP JZ 0x00101712 MOV R12,RBP SHL RBP,0x2 MOV R13,RDI MOV RDI,RBP CALL 0x00101170 MOV RDX,RBP XOR ESI,ESI MOV RDI,RAX LEA RBX,[RAX + RBP*0x1] CALL 0x00101130 MOV R8,qword ptr [R13] MOV RDI,RAX ...
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* func0(std::vector<int, std::allocator<int> > const&, int) */ void * func0(vector *param_1,int param_2) { uint *puVar1; uint *puVar2; int *piVar3; uint *puVar4; uint *puVar5; uint *puVar6; int8 uVar7; void *pvVar8; ...
1,872
func0
#include <vector> #include <algorithm> #include <assert.h>
int func0(const std::vector<int>& price, int k) { int n = price.size(); std::vector<std::vector<int>> final_profit(k + 1, std::vector<int>(n, 0)); for (int i = 1; i <= k; i++) { for (int j = 1; j < n; j++) { int max_so_far = 0; for (int x = 0; x < j; x++) { ...
int main() { assert(func0({1, 5, 2, 3, 7, 6, 4, 5}, 3) == 10); assert(func0({2, 4, 7, 5, 4, 3, 5}, 2) == 7); assert(func0({10, 6, 8, 4, 2}, 2) == 2); return 0; }
O0
cpp
func0(std::vector<int, std::allocator<int> > const&, int): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x78,%rsp mov %rdi,-0x78(%rbp) mov %esi,-0x7c(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax mov -0x78(%rbp),%rax mov %rax,%rdi callq 18b6 <_ZNKSt6vectorIiSaIiEE4sizeEv> ...
_Z5func0RKSt6vectorIiSaIiEEi: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 88h mov [rbp+var_88], rdi mov [rbp+var_8C], esi mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax mov rax, [rbp+var_88] mov rdi, rax call _ZNKSt6vectorIiSaIiEE4sizeEv; std::vector<int>::size(void)...
long long func0(long long a1, int a2) { int v2; // ebx int v3; // ebx long long v4; // rax long long v5; // rax long long v6; // rax int v7; // ebx long long v8; // rax long long v9; // rax unsigned int v10; // ebx char v12; // [rsp+1Ah] [rbp-76h] BYREF char v13; // [rsp+1Bh] [rbp-75h] BYREF in...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x88 MOV qword ptr [RBP + -0x88],RDI MOV dword ptr [RBP + -0x8c],ESI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX MOV RAX,qword ptr [RBP + -0x88] MOV RDI,RAX CALL 0x00101922 MOV dword ptr [RBP + -0x64],EAX LEA RAX,[RBP + -0x75] MOV qword pt...
/* func0(std::vector<int, std::allocator<int> > const&, int) */ int4 func0(vector *param_1,int param_2) { int iVar1; int iVar2; int4 uVar3; int *piVar4; vector<int,std::allocator<int>> *pvVar5; int4 *puVar6; long in_FS_OFFSET; allocator local_7e; allocator local_7d; int local_7c; int local_78; ...
1,873
func0
#include <vector> #include <algorithm> #include <assert.h>
int func0(const std::vector<int>& price, int k) { int n = price.size(); std::vector<std::vector<int>> final_profit(k + 1, std::vector<int>(n, 0)); for (int i = 1; i <= k; i++) { for (int j = 1; j < n; j++) { int max_so_far = 0; for (int x = 0; x < j; x++) { ...
int main() { assert(func0({1, 5, 2, 3, 7, 6, 4, 5}, 3) == 10); assert(func0({2, 4, 7, 5, 4, 3, 5}, 2) == 7); assert(func0({10, 6, 8, 4, 2}, 2) == 2); return 0; }
O1
cpp
func0(std::vector<int, std::allocator<int> > const&, int): endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x48,%rsp mov %esi,0x20(%rsp) mov %fs:0x28,%rax mov %rax,0x38(%rsp) xor %eax,%eax mov 0x8(%rdi),%rax sub (%rdi),%rax sar $0x2,%rax mov %rax,0x18(%rsp...
_Z5func0RKSt6vectorIiSaIiEEi: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 48h mov [rsp+78h+var_64], esi mov rax, fs:28h mov [rsp+78h+var_40], rax xor eax, eax mov rax, [rdi+8] sub rax, [rdi] sar rax, 2 mov [rsp+78h+var_60], rax mov ebx...
long long func0(_QWORD *a1, int a2) { unsigned long long v2; // r15 _DWORD *v4; // rax void *v5; // r13 _DWORD *v6; // rdx unsigned long long v7; // r12 _QWORD *v8; // r14 long long v9; // r12 _QWORD *v10; // r11 unsigned int v11; // ebp void **v12; // rbx long long v14; // rcx int *v15; // rdx...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x48 MOV dword ptr [RSP + 0x14],ESI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x38],RAX XOR EAX,EAX MOV RAX,qword ptr [RDI + 0x8] SUB RAX,qword ptr [RDI] SAR RAX,0x2 MOV qword ptr [RSP + 0x18],RAX MOV EBX,EAX MOVSXD R15,EAX MOV RAX,R15 ...
/* func0(std::vector<int, std::allocator<int> > const&, int) */ int4 func0(vector *param_1,int param_2) { int4 uVar1; void *pvVar2; int iVar3; int4 *puVar4; vector *pvVar5; int8 uVar6; vector *pvVar7; int iVar8; long lVar9; int4 **ppuVar10; int iVar11; long lVar12; vector *pvVar13; int iVa...
1,874
func0
#include <vector> #include <algorithm> #include <assert.h>
int func0(const std::vector<int>& price, int k) { int n = price.size(); std::vector<std::vector<int>> final_profit(k + 1, std::vector<int>(n, 0)); for (int i = 1; i <= k; i++) { for (int j = 1; j < n; j++) { int max_so_far = 0; for (int x = 0; x < j; x++) { ...
int main() { assert(func0({1, 5, 2, 3, 7, 6, 4, 5}, 3) == 10); assert(func0({2, 4, 7, 5, 4, 3, 5}, 2) == 7); assert(func0({10, 6, 8, 4, 2}, 2) == 2); return 0; }
O2
cpp
func0(std::vector<int, std::allocator<int> > const&, int): endbr64 movabs $0x1fffffffffffffff,%rdx push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x38,%rsp mov 0x8(%rdi),%rax sub (%rdi),%rax sar $0x2,%rax mov %rdi,0x28(%rsp) mov %rax,0x18(%rsp) mov %eax,0x24(%rsp) cltq...
_Z5func0RKSt6vectorIiSaIiEEi: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 48h mov [rsp+78h+var_6C], esi mov rax, fs:28h mov [rsp+78h+var_40], rax mov rax, [rdi+8] sub rax, [rdi] sar rax, 2 movsxd r13, eax mov [rsp+78h+var_68], rax mov [rs...
long long func0(long long *a1, int a2) { unsigned long long v2; // r13 void *v3; // r12 unsigned long long v4; // rbx unsigned long long v5; // r14 long long *v6; // rbp long long v7; // rbx long long *v8; // r10 long long *v9; // r11 long long v10; // rdi long long v11; // r12 long long v12; // ...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x48 MOV dword ptr [RSP + 0xc],ESI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x38],RAX MOV RAX,qword ptr [RDI + 0x8] SUB RAX,qword ptr [RDI] SAR RAX,0x2 MOVSXD R13,EAX MOV qword ptr [RSP + 0x10],RAX MOV dword ptr [RSP + 0x8],EAX MOV RAX...
/* func0(std::vector<int, std::allocator<int> > const&, int) */ int4 func0(vector *param_1,int param_2) { int4 uVar1; long lVar2; long lVar3; long lVar4; int iVar5; void *__s; vector *pvVar6; vector *pvVar7; long lVar8; long lVar9; int iVar10; int iVar11; ulong uVar12; void *pvVar13; lon...
1,875
func0
#include <vector> #include <algorithm> #include <assert.h>
int func0(const std::vector<int>& price, int k) { int n = price.size(); std::vector<std::vector<int>> final_profit(k + 1, std::vector<int>(n, 0)); for (int i = 1; i <= k; i++) { for (int j = 1; j < n; j++) { int max_so_far = 0; for (int x = 0; x < j; x++) { ...
int main() { assert(func0({1, 5, 2, 3, 7, 6, 4, 5}, 3) == 10); assert(func0({2, 4, 7, 5, 4, 3, 5}, 2) == 7); assert(func0({10, 6, 8, 4, 2}, 2) == 2); return 0; }
O3
cpp
func0(std::vector<int, std::allocator<int> > const&, int): endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x38,%rsp mov %rdi,0x18(%rsp) mov %esi,0xc(%rsp) mov %fs:0x28,%rax mov %rax,0x28(%rsp) xor %eax,%eax mov 0x8(%rdi),%rax sub (%rdi),%rax sar $0x2,%rax...
_Z5func0RKSt6vectorIiSaIiEEi: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 48h mov rax, fs:28h mov [rsp+78h+var_40], rax mov rax, [rdi+8] sub rax, [rdi] sar rax, 2 movsxd r12, eax mov [rsp+78h+var_68], rax mov rax, r12 shr rax, 3Dh jnz ...
long long func0(long long *a1, int a2) { unsigned long long v2; // r12 void *v3; // rbp unsigned long long v4; // r13 long long *v5; // r15 long long v6; // r13 long long v7; // rcx long long *v8; // rax long long *v9; // r10 long long v10; // r8 long long v11; // rbx long long v12; // rsi unsi...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x48 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x38],RAX MOV RAX,qword ptr [RDI + 0x8] SUB RAX,qword ptr [RDI] SAR RAX,0x2 MOVSXD R12,EAX MOV qword ptr [RSP + 0x10],RAX MOV RAX,R12 SHR RAX,0x3d JNZ 0x00101831 PXOR XMM0,XMM0 MOV R14,RDI ...
/* func0(std::vector<int, std::allocator<int> > const&, int) */ int4 func0(vector *param_1,int param_2) { int *piVar1; int *piVar2; ulong uVar3; int iVar4; int4 uVar5; long lVar6; long lVar7; long lVar8; int iVar9; void *__s; vector *pvVar10; vector *pvVar11; vector *pvVar12; uint uVar13; ...
1,876
func0
#include <vector> #include <tuple> #include <cassert>
std::tuple<int, int, int, int> func0(const std::vector<int>& test_vec) { int a = test_vec[0] + test_vec[1]; int b = test_vec[1] + test_vec[2]; int c = test_vec[2] + test_vec[3]; int d = test_vec[3] + test_vec[4]; return std::make_tuple(a, b, c, d); }
int main() { assert(func0({1, 5, 7, 8, 10}) == std::make_tuple(6, 12, 15, 18)); assert(func0({2, 6, 8, 9, 11}) == std::make_tuple(8, 14, 17, 20)); assert(func0({3, 7, 9, 10, 12}) == std::make_tuple(10, 16, 19, 22)); return 0; }
O0
cpp
func0(std::vector<int, std::allocator<int> > const&): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x38,%rsp mov %rdi,-0x38(%rbp) mov %rsi,-0x40(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax mov -0x40(%rbp),%rax mov $0x0,%esi mov %rax,%rdi callq 17c4 <_ZNKSt6vectorIiSaI...
_Z5func0RKSt6vectorIiSaIiEE: 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 _ZNKSt6vectorIiSaIiEEixEm; std::vector<int>:...
long long func0(long long a1, long long a2) { int v2; // ebx int v3; // ebx int v4; // ebx int v5; // ebx int v7; // [rsp+18h] [rbp-28h] BYREF int v8; // [rsp+1Ch] [rbp-24h] BYREF int v9; // [rsp+20h] [rbp-20h] BYREF int v10; // [rsp+24h] [rbp-1Ch] BYREF unsigned long long v11; // [rsp+28h] [rbp-18h]...
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 CALL 0x00101830 MOV EBX,dword ptr [RAX] MOV RAX,qword ptr [RBP + -0x40...
/* func0(std::vector<int, std::allocator<int> > const&) */ vector * func0(vector *param_1) { int iVar1; int *piVar2; vector<int,std::allocator<int>> *in_RSI; long in_FS_OFFSET; int local_30; int local_2c; int local_28; int local_24; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); pi...
1,877
func0
#include <vector> #include <tuple> #include <cassert>
std::tuple<int, int, int, int> func0(const std::vector<int>& test_vec) { int a = test_vec[0] + test_vec[1]; int b = test_vec[1] + test_vec[2]; int c = test_vec[2] + test_vec[3]; int d = test_vec[3] + test_vec[4]; return std::make_tuple(a, b, c, d); }
int main() { assert(func0({1, 5, 7, 8, 10}) == std::make_tuple(6, 12, 15, 18)); assert(func0({2, 6, 8, 9, 11}) == std::make_tuple(8, 14, 17, 20)); assert(func0({3, 7, 9, 10, 12}) == std::make_tuple(10, 16, 19, 22)); return 0; }
O1
cpp
func0(std::vector<int, std::allocator<int> > const&): endbr64 mov %rdi,%rax mov (%rsi),%rdx mov 0x4(%rdx),%ecx mov %ecx,%r8d add (%rdx),%r8d mov 0x8(%rdx),%edi mov 0xc(%rdx),%esi mov %esi,%r9d add 0x10(%rdx),%r9d mov %r9d,(%rax) add %edi,%esi mov %esi,0x4(%rax) add %edi,%ecx mov ...
_Z5func0RKSt6vectorIiSaIiEE: endbr64 mov rax, rdi mov rdx, [rsi] mov ecx, [rdx+4] mov r8d, ecx add r8d, [rdx] mov edi, [rdx+8] mov esi, [rdx+0Ch] mov r9d, esi add r9d, [rdx+10h] mov [rax], r9d add esi, edi mov [rax+4], esi add ecx, edi mov [rax+8], ecx mov [ra...
_DWORD * func0(_DWORD *a1, long long *a2) { _DWORD *result; // rax long long v3; // rdx int v4; // ecx int v5; // r8d int v6; // edi int v7; // esi result = a1; v3 = *a2; v4 = *(_DWORD *)(*a2 + 4); v5 = *(_DWORD *)*a2 + v4; v6 = *(_DWORD *)(*a2 + 8); v7 = *(_DWORD *)(*a2 + 12); *result = *(_D...
func0: ENDBR64 MOV RAX,RDI MOV RDX,qword ptr [RSI] MOV ECX,dword ptr [RDX + 0x4] MOV R8D,ECX ADD R8D,dword ptr [RDX] MOV EDI,dword ptr [RDX + 0x8] MOV ESI,dword ptr [RDX + 0xc] MOV R9D,ESI ADD R9D,dword ptr [RDX + 0x10] MOV dword ptr [RAX],R9D ADD ESI,EDI MOV dword ptr [RAX + 0x4],ESI ADD ECX,EDI MOV dword ptr [RAX + 0...
/* func0(std::vector<int, std::allocator<int> > const&) */ void func0(vector *param_1) { int iVar1; int iVar2; int iVar3; int iVar4; int *piVar5; int8 *in_RSI; piVar5 = (int *)*in_RSI; iVar1 = piVar5[1]; iVar2 = *piVar5; iVar3 = piVar5[2]; iVar4 = piVar5[3]; *(int *)param_1 = iVar4 + piVar5...
1,878
func0
#include <vector> #include <tuple> #include <cassert>
std::tuple<int, int, int, int> func0(const std::vector<int>& test_vec) { int a = test_vec[0] + test_vec[1]; int b = test_vec[1] + test_vec[2]; int c = test_vec[2] + test_vec[3]; int d = test_vec[3] + test_vec[4]; return std::make_tuple(a, b, c, d); }
int main() { assert(func0({1, 5, 7, 8, 10}) == std::make_tuple(6, 12, 15, 18)); assert(func0({2, 6, 8, 9, 11}) == std::make_tuple(8, 14, 17, 20)); assert(func0({3, 7, 9, 10, 12}) == std::make_tuple(10, 16, 19, 22)); return 0; }
O2
cpp
func0(std::vector<int, std::allocator<int> > const&): endbr64 mov (%rsi),%rdx mov %rdi,%rax mov 0x4(%rdx),%ecx mov 0x8(%rdx),%edi mov 0xc(%rdx),%esi mov (%rdx),%r8d mov 0x10(%rdx),%r9d add %ecx,%r8d add %edi,%ecx add %esi,%r9d add %edi,%esi mov %ecx,0x8(%rax) mov %r9d,(%rax) mov ...
_Z5func0RKSt6vectorIiSaIiEE: endbr64 mov rdx, [rsi] mov rax, rdi movd xmm2, dword ptr [rdx+8] movd xmm3, dword ptr [rdx+4] movd xmm0, dword ptr [rdx+10h] movd xmm4, dword ptr [rdx+0Ch] movdqu xmm1, xmmword ptr [rdx] punpckldq xmm2, xmm3 punpckldq xmm0, xmm4 punpcklqdq xmm0, xmm2 pshufd xmm1, xmm1,...
__m128i * func0(__m128i *a1, long long a2) { __m128i *result; // rax result = a1; *a1 = _mm_add_epi32( _mm_unpacklo_epi64( _mm_unpacklo_epi32( _mm_cvtsi32_si128(*(_DWORD *)(*(_QWORD *)a2 + 16LL)), _mm_cvtsi32_si128(*(_DWORD *)(*(_QWORD *)a2 + 12LL))), ...
func0: ENDBR64 MOV RDX,qword ptr [RSI] MOV RAX,RDI MOVD XMM2,dword ptr [RDX + 0x8] MOVD XMM3,dword ptr [RDX + 0x4] MOVD XMM0,dword ptr [RDX + 0x10] MOVD XMM4,dword ptr [RDX + 0xc] MOVDQU XMM1,xmmword ptr [RDX] PUNPCKLDQ XMM2,XMM3 PUNPCKLDQ XMM0,XMM4 PUNPCKLQDQ XMM0,XMM2 PSHUFD XMM1,XMM1,0x1b PADDD XMM0,XMM1 MOVUPS xmmw...
/* func0(std::vector<int, std::allocator<int> > const&) */ vector * func0(vector *param_1) { int iVar1; int iVar2; int iVar3; int *piVar4; int iVar5; int iVar6; int iVar7; long *in_RSI; piVar4 = (int *)*in_RSI; iVar1 = piVar4[2]; iVar2 = piVar4[1]; iVar3 = piVar4[3]; iVar5 = *piVar4; iV...
1,879
func0
#include <vector> #include <tuple> #include <cassert>
std::tuple<int, int, int, int> func0(const std::vector<int>& test_vec) { int a = test_vec[0] + test_vec[1]; int b = test_vec[1] + test_vec[2]; int c = test_vec[2] + test_vec[3]; int d = test_vec[3] + test_vec[4]; return std::make_tuple(a, b, c, d); }
int main() { assert(func0({1, 5, 7, 8, 10}) == std::make_tuple(6, 12, 15, 18)); assert(func0({2, 6, 8, 9, 11}) == std::make_tuple(8, 14, 17, 20)); assert(func0({3, 7, 9, 10, 12}) == std::make_tuple(10, 16, 19, 22)); return 0; }
O3
cpp
func0(std::vector<int, std::allocator<int> > const&): endbr64 mov (%rsi),%rdx mov %rdi,%rax mov 0x4(%rdx),%ecx mov 0x8(%rdx),%edi mov 0xc(%rdx),%esi mov (%rdx),%r8d mov 0x10(%rdx),%r9d add %ecx,%r8d add %edi,%ecx add %esi,%r9d add %edi,%esi mov %ecx,0x8(%rax) mov %r9d,(%rax) mov ...
_Z5func0RKSt6vectorIiSaIiEE: endbr64 mov rdx, [rsi] mov rax, rdi movd xmm2, dword ptr [rdx+8] movd xmm3, dword ptr [rdx+4] movd xmm0, dword ptr [rdx+10h] movd xmm4, dword ptr [rdx+0Ch] movdqu xmm1, xmmword ptr [rdx] punpckldq xmm2, xmm3 punpckldq xmm0, xmm4 punpcklqdq xmm0, xmm2 pshufd xmm1, xmm1,...
__m128i * func0(__m128i *a1, long long a2) { __m128i *result; // rax result = a1; *a1 = _mm_add_epi32( _mm_unpacklo_epi64( _mm_unpacklo_epi32( _mm_cvtsi32_si128(*(_DWORD *)(*(_QWORD *)a2 + 16LL)), _mm_cvtsi32_si128(*(_DWORD *)(*(_QWORD *)a2 + 12LL))), ...
func0: ENDBR64 MOV RDX,qword ptr [RSI] MOV RAX,RDI MOVD XMM2,dword ptr [RDX + 0x8] MOVD XMM3,dword ptr [RDX + 0x4] MOVD XMM0,dword ptr [RDX + 0x10] MOVD XMM4,dword ptr [RDX + 0xc] MOVDQU XMM1,xmmword ptr [RDX] PUNPCKLDQ XMM2,XMM3 PUNPCKLDQ XMM0,XMM4 PUNPCKLQDQ XMM0,XMM2 PSHUFD XMM1,XMM1,0x1b PADDD XMM0,XMM1 MOVUPS xmmw...
/* func0(std::vector<int, std::allocator<int> > const&) */ vector * func0(vector *param_1) { int iVar1; int iVar2; int iVar3; int *piVar4; int iVar5; int iVar6; int iVar7; long *in_RSI; piVar4 = (int *)*in_RSI; iVar1 = piVar4[2]; iVar2 = piVar4[1]; iVar3 = piVar4[3]; iVar5 = *piVar4; iV...
1,880
func0
#include <iostream> #include <assert.h>
int func0(int arr[], int lens, int n) { int mul = 1; for (int i = 0; i < lens; i++) { mul = (mul * (arr[i] % n)) % n; } return mul % n; }
int main() { int arr1[] = {100, 10, 5, 25, 35, 14}; assert(func0(arr1, 6, 11) == 9); int arr2[] = {1, 1, 1}; assert(func0(arr2, 3, 1) == 0); int arr3[] = {1, 2, 1}; assert(func0(arr3, 3, 2) == 0); return 0; }
O0
cpp
func0(int*, int, int): endbr64 push %rbp mov %rsp,%rbp mov %rdi,-0x18(%rbp) mov %esi,-0x1c(%rbp) mov %edx,-0x20(%rbp) movl $0x1,-0x8(%rbp) movl $0x0,-0x4(%rbp) mov -0x4(%rbp),%eax cmp -0x1c(%rbp),%eax jge 11fe <_Z5func0Piii+0x55> mov -0x4(%rbp),%eax cltq lea 0x0(,%rax,4),%rdx mov -0x...
_Z5func0Piii: endbr64 push rbp mov rbp, rsp mov [rbp+var_18], rdi mov [rbp+var_1C], esi mov [rbp+var_20], edx mov [rbp+var_8], 1 mov [rbp+var_4], 0 jmp short loc_11B6 loc_118B: mov eax, [rbp+var_4] cdqe lea rdx, ds:0[rax*4] mov rax, [rbp+var_18] add rax, rdx mov eax, [...
long long func0(int *a1, int a2, int a3) { int v4; // [rsp+18h] [rbp-8h] int i; // [rsp+1Ch] [rbp-4h] v4 = 1; for ( i = 0; i < a2; ++i ) v4 = v4 * (a1[i] % a3) % a3; return (unsigned int)(v4 % a3); }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x18],RDI MOV dword ptr [RBP + -0x1c],ESI MOV dword ptr [RBP + -0x20],EDX MOV dword ptr [RBP + -0x8],0x1 MOV dword ptr [RBP + -0x4],0x0 JMP 0x001011b6 LAB_0010118b: MOV EAX,dword ptr [RBP + -0x4] CDQE LEA RDX,[RAX*0x4] MOV RAX,qword ptr [RBP + -0x18] ADD RAX,RDX...
/* func0(int*, int, int) */ ulong func0(int *param_1,int param_2,int param_3) { int local_10; int local_c; local_10 = 1; for (local_c = 0; local_c < param_2; local_c = local_c + 1) { local_10 = ((param_1[local_c] % param_3) * local_10) % param_3; } return (long)local_10 % (long)param_3 & 0xffffffff...
1,881
func0
#include <iostream> #include <assert.h>
int func0(int arr[], int lens, int n) { int mul = 1; for (int i = 0; i < lens; i++) { mul = (mul * (arr[i] % n)) % n; } return mul % n; }
int main() { int arr1[] = {100, 10, 5, 25, 35, 14}; assert(func0(arr1, 6, 11) == 9); int arr2[] = {1, 1, 1}; assert(func0(arr2, 3, 1) == 0); int arr3[] = {1, 2, 1}; assert(func0(arr3, 3, 2) == 0); return 0; }
O1
cpp
func0(int*, int, int): endbr64 mov %edx,%r8d test %esi,%esi jle 11e8 <_Z5func0Piii+0x3f> mov %rdi,%r9 lea -0x1(%rsi),%eax lea 0x4(%rdi,%rax,4),%rsi mov $0x1,%ecx mov (%r9),%eax cltd idiv %r8d mov %edx,%eax imul %ecx,%eax cltd idiv %r8d mov %edx,%ecx add $0x4,%r9 cmp %rsi,%r9 jne...
_Z5func0Piii: endbr64 mov ecx, edx test esi, esi jle short loc_11A3 mov r8, rdi movsxd rsi, esi lea rdi, [rdi+rsi*4] mov esi, 1 loc_1182: mov eax, [r8] cdq idiv ecx mov eax, edx imul eax, esi cdq idiv ecx mov esi, edx add r8, 4 cmp r8, rdi jnz short loc_1182 loc_...
long long func0(int *a1, int a2, int a3) { int *v3; // r8 int *v4; // rdi int v5; // esi if ( a2 <= 0 ) { v5 = 1; } else { v3 = a1; v4 = &a1[a2]; v5 = 1; do v5 = v5 * (*v3++ % a3) % a3; while ( v3 != v4 ); } return (unsigned int)(v5 % a3); }
func0: ENDBR64 MOV ECX,EDX TEST ESI,ESI JLE 0x001011a3 MOV R8,RDI MOVSXD RSI,ESI LEA RDI,[RDI + RSI*0x4] MOV ESI,0x1 LAB_00101182: MOV EAX,dword ptr [R8] CDQ IDIV ECX MOV EAX,EDX IMUL EAX,ESI CDQ IDIV ECX MOV ESI,EDX ADD R8,0x4 CMP R8,RDI JNZ 0x00101182 LAB_0010119b: MOV EAX,ESI CDQ IDIV ECX MOV EAX,EDX RET LAB_001011a...
/* func0(int*, int, int) */ ulong func0(int *param_1,int param_2,int param_3) { int *piVar1; int iVar2; if (param_2 < 1) { iVar2 = 1; } else { piVar1 = param_1 + param_2; iVar2 = 1; do { iVar2 = ((*param_1 % param_3) * iVar2) % param_3; param_1 = param_1 + 1; } while (para...