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
4,882
func0
#include <stdio.h> #include <string.h> #include <assert.h>
int func0(char str[]) { int n = strlen(str); int L[n][n]; for (int i = 0; i < n; i++) { L[i][i] = 1; } for (int cl = 2; cl <= n; cl++) { for (int i = 0; i < n - cl + 1; i++) { int j = i + cl - 1; if (str[i] == str[j] && cl == 2) { L[i][j] = 2; } else if (str[i] == str[j]) { L...
int main() { assert(func0("TENS FOR TENS") == 5); assert(func0("CARDIO FOR CARDS") == 7); assert(func0("PART OF THE JOURNEY IS PART") == 9); return 0; }
O2
c
func0: endbr64 push %rbp mov %rsp,%rbp push %r15 push %r14 mov %rdi,%r14 push %r13 push %r12 push %rbx sub $0x28,%rsp mov %fs:0x28,%rax mov %rax,-0x38(%rbp) xor %eax,%eax mov %rsp,%rbx callq 1070 <strlen@plt> movslq %eax,%rdx mov %rax,-0x50(%rbp) mov %eax,%ecx mov %rdx,%rax im...
func0: endbr64 push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx mov rbx, rdi sub rsp, 18h mov rax, fs:28h mov [rbp+var_38], rax xor eax, eax call _strlen mov rsi, rsp mov r12, rax mov ecx, eax cdqe lea r9, ds:0[rax*4] imul rax, rax lea ...
long long func0(_BYTE *a1) { int v2; // r12d long long v3; // rdx _DWORD *v4; // rsi __int16 v5; // dx signed long long v6; // rdx void *v7; // rsp unsigned long long v8; // r9 int v9; // eax long long v10; // rdx int v11; // r12d long long v12; // r10 int v13; // r11d _BYTE *v14; // rsi in...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV RBX,RDI SUB RSP,0x18 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x38],RAX XOR EAX,EAX CALL 0x00101070 MOV RSI,RSP MOV R12,RAX MOV ECX,EAX CDQE LEA R9,[RAX*0x4] IMUL RAX,RAX LEA RAX,[0xf + RAX*0x4] MOV RDX,RAX AND RAX,-0x1000 SUB...
int4 func0(char *param_1) { long lVar1; int1 *puVar2; int iVar3; size_t sVar4; ulong uVar5; long lVar6; int iVar7; int iVar8; ulong uVar9; long lVar10; long lVar11; int1 *puVar12; char *pcVar14; int iVar15; int iVar16; long in_FS_OFFSET; int1 auStack_48 [8]; long local_40; int1 *p...
4,883
func0
#include <stdio.h> #include <string.h> #include <assert.h>
int func0(char str[]) { int n = strlen(str); int L[n][n]; for (int i = 0; i < n; i++) { L[i][i] = 1; } for (int cl = 2; cl <= n; cl++) { for (int i = 0; i < n - cl + 1; i++) { int j = i + cl - 1; if (str[i] == str[j] && cl == 2) { L[i][j] = 2; } else if (str[i] == str[j]) { L...
int main() { assert(func0("TENS FOR TENS") == 5); assert(func0("CARDIO FOR CARDS") == 7); assert(func0("PART OF THE JOURNEY IS PART") == 9); return 0; }
O3
c
func0: endbr64 push %rbp mov %rsp,%rbp push %r15 push %r14 push %r13 push %r12 push %rbx mov %rdi,%rbx sub $0x38,%rsp mov %fs:0x28,%rax mov %rax,-0x38(%rbp) xor %eax,%eax callq 1070 <strlen@plt> mov %rsp,%rdi movslq %eax,%rdx mov %rax,-0x50(%rbp) mov %eax,%ecx mov %rdx,%rax im...
func0: endbr64 push rbp mov rbp, rsp push r15 push r14 push r13 push r12 mov r12, rdi push rbx sub rsp, 38h mov rax, fs:28h mov [rbp+var_38], rax xor eax, eax call _strlen mov rdi, rsp mov rdx, rax mov esi, eax cdqe lea r10, ds:0[rax*4] imul rax, rax lea ...
long long func0(const char *a1) { int v2; // edx long long v3; // rcx long long *v4; // rdi __int16 v5; // cx signed long long v6; // rcx void *v7; // rsp unsigned long long v8; // r10 int v9; // eax unsigned long long v10; // r9 long long v11; // rcx int v12; // ebx const char *v13; // r14 i...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 MOV R12,RDI PUSH RBX SUB RSP,0x38 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x38],RAX XOR EAX,EAX CALL 0x00101070 MOV RDI,RSP MOV RDX,RAX MOV ESI,EAX CDQE LEA R10,[RAX*0x4] IMUL RAX,RAX LEA RAX,[0xf + RAX*0x4] MOV RCX,RAX AND RAX,-0x1000 SU...
int4 func0(char *param_1) { long lVar1; long lVar2; int iVar3; int *puVar4; int iVar5; size_t sVar6; ulong uVar7; long lVar8; char *pcVar9; int iVar10; ulong uVar11; int iVar12; int *puVar13; int iVar15; long lVar16; long lVar17; long in_FS_OFFSET; int auStack_68 [8]; ulong local_...
4,884
func0
#include <assert.h>
double func0(int n) { if (n < 2) { return 1; } else { return 1.0 / n + func0(n - 1); } }
int main() { assert(func0(7) - 2.5928571428571425 < 0.000001); assert(func0(4) - 2.083333333333333 < 0.000001); assert(func0(19) - 3.547739657143682 < 0.000001); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x10,%rsp mov %edi,-0x4(%rbp) cmpl $0x1,-0x4(%rbp) jg 1168 <func0+0x1f> movsd 0xf6a(%rip),%xmm0 jmp 1190 <func0+0x47> cvtsi2sdl -0x4(%rbp),%xmm1 movsd 0xf5b(%rip),%xmm0 divsd %xmm1,%xmm0 movsd %xmm0,-0x10(%rbp) mov -0x4(%rbp),%eax sub $0x1,%eax m...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_4], edi cmp [rbp+var_4], 1 jg short loc_1168 movsd xmm0, cs:qword_20B0 jmp short locret_1194 loc_1168: pxor xmm1, xmm1 cvtsi2sd xmm1, [rbp+var_4] movsd xmm0, cs:qword_20B0 divsd xmm0, xmm1 movsd [rbp+var_10], xmm0 mov ...
double func0(int a1) { if ( a1 > 1 ) return func0((unsigned int)(a1 - 1)) + 1.0 / (double)a1; else return 1.0; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV dword ptr [RBP + -0x4],EDI CMP dword ptr [RBP + -0x4],0x1 JG 0x00101168 MOVSD XMM0,qword ptr [0x001020b0] JMP 0x00101194 LAB_00101168: PXOR XMM1,XMM1 CVTSI2SD XMM1,dword ptr [RBP + -0x4] MOVSD XMM0,qword ptr [0x001020b0] DIVSD XMM0,XMM1 MOVSD qword ptr [RBP + -0x10],...
double func0(int param_1) { double dVar1; double dVar2; dVar1 = DAT_001020b0; if (1 < param_1) { dVar1 = DAT_001020b0 / (double)param_1; dVar2 = (double)func0(param_1 + -1); dVar1 = dVar2 + dVar1; } return dVar1; }
4,885
func0
#include <assert.h>
double func0(int n) { if (n < 2) { return 1; } else { return 1.0 / n + func0(n - 1); } }
int main() { assert(func0(7) - 2.5928571428571425 < 0.000001); assert(func0(4) - 2.083333333333333 < 0.000001); assert(func0(19) - 3.547739657143682 < 0.000001); return 0; }
O1
c
func0: endbr64 movsd 0xf7b(%rip),%xmm0 cmp $0x1,%edi jg 115b <func0+0x12> retq push %rbx mov %edi,%ebx lea -0x1(%rdi),%edi callq 1149 <func0> movapd %xmm0,%xmm2 pxor %xmm1,%xmm1 cvtsi2sd %ebx,%xmm1 movsd 0xf56(%rip),%xmm0 divsd %xmm1,%xmm0 addsd %xmm2,%xmm0 pop %rbx retq
func0: endbr64 movsd xmm0, cs:qword_20B0 cmp edi, 1 jg short loc_115B retn loc_115B: push rbx mov ebx, edi lea edi, [rdi-1] call func0 movapd xmm1, xmm0 pxor xmm2, xmm2 cvtsi2sd xmm2, ebx movsd xmm0, cs:qword_20B0 divsd xmm0, xmm2 addsd xmm0, xmm1 pop rbx retn
double func0(int a1) { double result; // xmm0_8 result = 1.0; if ( a1 > 1 ) return 1.0 / (double)a1 + func0((unsigned int)(a1 - 1), 1.0); return result; }
func0: ENDBR64 MOVSD XMM0,qword ptr [0x001020b0] CMP EDI,0x1 JG 0x0010115b RET LAB_0010115b: PUSH RBX MOV EBX,EDI LEA EDI,[RDI + -0x1] CALL 0x00101149 MOVAPD XMM1,XMM0 PXOR XMM2,XMM2 CVTSI2SD XMM2,EBX MOVSD XMM0,qword ptr [0x001020b0] DIVSD XMM0,XMM2 ADDSD XMM0,XMM1 POP RBX RET
double func0(int param_1) { double dVar1; if (param_1 < 2) { return DAT_001020b0; } dVar1 = (double)func0(DAT_001020b0,param_1 + -1); return DAT_001020b0 / (double)param_1 + dVar1; }
4,886
func0
#include <assert.h>
double func0(int n) { if (n < 2) { return 1; } else { return 1.0 / n + func0(n - 1); } }
int main() { assert(func0(7) - 2.5928571428571425 < 0.000001); assert(func0(4) - 2.083333333333333 < 0.000001); assert(func0(19) - 3.547739657143682 < 0.000001); return 0; }
O2
c
func0: endbr64 cmp $0x1,%edi jg 1258 <func0+0x18> movsd 0xe7f(%rip),%xmm0 retq nopw 0x0(%rax,%rax,1) jmp 1260 <func0.part.0> nopw 0x0(%rax,%rax,1)
func0: endbr64 movsd xmm0, cs:qword_20B0 cmp edi, 1 jg short loc_1248 retn loc_1248: pxor xmm1, xmm1 movapd xmm3, xmm0 lea eax, [rdi-1] cvtsi2sd xmm1, edi divsd xmm3, xmm1 cmp edi, 2 jnz short loc_1270 addsd xmm3, xmm0 movapd xmm0, xmm3 retn loc_1270: pxor xmm1, xmm1 push rbx movap...
__int128 __usercall func0@<xmm0>(int a1@<edi>) { __int128 result; // xmm0 int v2; // eax __int128 v3; // xmm3 double v4; // xmm2_8 double v5; // xmm1_8 result = 0x3FF0000000000000uLL; if ( a1 > 1 ) { *((_QWORD *)&v3 + 1) = 0LL; v2 = a1 - 1; *(double *)&v3 = 1.0 / (double)a1; if ( a1 == ...
func0: ENDBR64 MOVSD XMM0,qword ptr [0x001020b0] CMP EDI,0x1 JG 0x00101248 RET LAB_00101248: PXOR XMM1,XMM1 MOVAPD XMM3,XMM0 LEA EAX,[RDI + -0x1] CVTSI2SD XMM1,EDI DIVSD XMM3,XMM1 CMP EDI,0x2 JNZ 0x00101270 ADDSD XMM3,XMM0 MOVAPD XMM0,XMM3 RET LAB_00101270: PXOR XMM1,XMM1 PUSH RBX MOVAPD XMM2,XMM0 LEA EBX,[RDI + -0x2] ...
double func0(int param_1) { double dVar1; double dVar2; double dVar3; double dVar4; dVar1 = DAT_001020b0; if (param_1 < 2) { return DAT_001020b0; } dVar4 = DAT_001020b0 / (double)param_1; if (param_1 == 2) { return dVar4 + DAT_001020b0; } dVar3 = DAT_001020b0 / (double)(param_1 + -1); ...
4,887
func0
#include <assert.h>
double func0(int n) { if (n < 2) { return 1; } else { return 1.0 / n + func0(n - 1); } }
int main() { assert(func0(7) - 2.5928571428571425 < 0.000001); assert(func0(4) - 2.083333333333333 < 0.000001); assert(func0(19) - 3.547739657143682 < 0.000001); return 0; }
O3
c
func0: endbr64 movsd 0xe94(%rip),%xmm1 cmp $0x1,%edi jg 1250 <func0+0x20> movapd %xmm1,%xmm0 retq nopw %cs:0x0(%rax,%rax,1) push %rbx mov %edi,%ebx lea -0x1(%rdi),%edi sub $0x10,%rsp movsd %xmm1,0x8(%rsp) callq 1230 <func0> movsd 0x8(%rsp),%xmm1 add $0x10,%rsp movapd %xmm0,%xmm2 pxor %xmm0,...
func0: endbr64 movsd xmm0, cs:qword_20B0 cmp edi, 1 jg short loc_1248 retn loc_1248: pxor xmm1, xmm1 movapd xmm2, xmm0 lea eax, [rdi-1] cvtsi2sd xmm1, edi divsd xmm2, xmm1 movapd xmm1, xmm0 cmp edi, 2 jnz short loc_1270 addsd xmm2, xmm1 movapd xmm0, xmm2 retn loc_1270: pxor xmm3, xmm...
__int128 __usercall func0@<xmm0>(int a1@<edi>) { __int128 result; // xmm0 __int128 v2; // xmm2 int v3; // eax double v4; // xmm1_8 result = 0x3FF0000000000000uLL; if ( a1 > 1 ) { *((_QWORD *)&v2 + 1) = 0LL; *(double *)&v2 = 1.0 / (double)a1; if ( a1 == 2 ) { *(double *)&v2 = *(doubl...
func0: ENDBR64 MOVSD XMM0,qword ptr [0x001020b0] CMP EDI,0x1 JG 0x00101248 RET LAB_00101248: PXOR XMM1,XMM1 MOVAPD XMM2,XMM0 LEA EAX,[RDI + -0x1] CVTSI2SD XMM1,EDI DIVSD XMM2,XMM1 MOVAPD XMM1,XMM0 CMP EDI,0x2 JNZ 0x00101270 ADDSD XMM2,XMM1 MOVAPD XMM0,XMM2 RET LAB_00101270: PXOR XMM3,XMM3 CVTSI2SD XMM3,EAX LEA EAX,[RDI...
double func0(int param_1) { double dVar1; double dVar2; double dVar3; double dVar4; if (param_1 < 2) { return DAT_001020b0; } dVar4 = DAT_001020b0 / (double)param_1; if (param_1 == 2) { return dVar4 + DAT_001020b0; } dVar3 = DAT_001020b0 / (double)(param_1 + -1); if (param_1 == 3) { ...
4,888
func0
#include <stdio.h> #include <assert.h>
int *func0(int array_nums1[], int len1, int array_nums2[], int len2, int *result_len) { static int result[1000]; // Static to avoid the result variable from becoming local only to this function int k = 0; for (int i = 0; i < len2; i++) { for (int j = 0; j < len1; j++) { if (array_n...
int main() { int result_len; int *result; int array1[] = {1, 2, 3, 5, 7, 8, 9, 10}; int array2[] = {1, 2, 4, 8, 9}; int expected1[] = {1, 2, 8, 9}; result = func0(array1, 8, array2, 5, &result_len); assert(result_len == 4); for (int i = 0; i < result_len; i++) { as...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %rdi,-0x18(%rbp) mov %esi,-0x1c(%rbp) mov %rdx,-0x28(%rbp) mov %ecx,-0x20(%rbp) mov %r8,-0x30(%rbp) movl $0x0,-0xc(%rbp) movl $0x0,-0x8(%rbp) jmp 1232 <func0+0xa9> movl $0x0,-0x4(%rbp) jmp 1226 <func0+0x9d> mov -0x8(%rbp),%eax cltq lea 0x0...
func0: endbr64 push rbp mov rbp, rsp mov [rbp+var_18], rdi mov [rbp+var_1C], esi mov [rbp+var_28], rdx mov [rbp+var_20], ecx mov [rbp+var_30], r8 mov [rbp+var_C], 0 mov [rbp+var_8], 0 jmp short loc_1232 loc_11B3: mov [rbp+var_4], 0 jmp short loc_1226 loc_11BC: mov eax,...
_DWORD * func0(long long a1, int a2, long long a3, int a4, _DWORD *a5) { int v5; // eax int v7; // [rsp+24h] [rbp-Ch] int i; // [rsp+28h] [rbp-8h] int j; // [rsp+2Ch] [rbp-4h] v7 = 0; for ( i = 0; i < a4; ++i ) { for ( j = 0; j < a2; ++j ) { if ( *(_DWORD *)(4LL * i + a3) == *(_DWORD *)(4LL...
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x18],RDI MOV dword ptr [RBP + -0x1c],ESI MOV qword ptr [RBP + -0x28],RDX MOV dword ptr [RBP + -0x20],ECX MOV qword ptr [RBP + -0x30],R8 MOV dword ptr [RBP + -0xc],0x0 MOV dword ptr [RBP + -0x8],0x0 JMP 0x00101232 LAB_001011b3: MOV dword ptr [RBP + -0x4],0x0 JMP...
int1 * func0(long param_1,int param_2,long param_3,int param_4,int *param_5) { int local_14; int local_10; int local_c; local_14 = 0; local_10 = 0; do { if (param_4 <= local_10) { *param_5 = local_14; return result_1; } for (local_c = 0; local_c < param_2; local_c = local_c + 1) ...
4,889
func0
#include <stdio.h> #include <assert.h>
int *func0(int array_nums1[], int len1, int array_nums2[], int len2, int *result_len) { static int result[1000]; // Static to avoid the result variable from becoming local only to this function int k = 0; for (int i = 0; i < len2; i++) { for (int j = 0; j < len1; j++) { if (array_n...
int main() { int result_len; int *result; int array1[] = {1, 2, 3, 5, 7, 8, 9, 10}; int array2[] = {1, 2, 4, 8, 9}; int expected1[] = {1, 2, 8, 9}; result = func0(array1, 8, array2, 5, &result_len); assert(result_len == 4); for (int i = 0; i < result_len; i++) { as...
O1
c
func0: endbr64 push %rbx mov %r8,%rbx test %ecx,%ecx jle 11e5 <func0+0x5c> mov %rdx,%r9 lea -0x1(%rcx),%eax lea 0x4(%rdx,%rax,4),%r10 mov %rdi,%r11 lea -0x1(%rsi),%eax lea 0x4(%rdi,%rax,4),%rcx mov $0x0,%edi lea 0x2e89(%rip),%r8 jmp 11cc <func0+0x43> movslq %edi,%rax mov %edx,(%r...
func0: endbr64 test ecx, ecx jle short loc_11E5 push rbx mov r10, rdi mov r9d, esi mov rsi, rdx lea eax, [rcx-1] lea r11, [rdx+rax*4+4] lea eax, [r9-1] lea rcx, [rdi+rax*4+4] mov edi, 0 lea rbx, result_1 jmp short loc_11CC loc_11BA: movsxd rax, edi mov [rbx+rax*4],...
_DWORD * func0(_DWORD *a1, int a2, int *a3, int a4, _DWORD *a5) { int *v7; // rsi long long v8; // r11 long long v9; // rcx int v10; // edi int v11; // edx _DWORD *v12; // rax if ( a4 <= 0 ) { *a5 = 0; return result_1; } else { v7 = a3; v8 = (long long)&a3[a4 - 1 + 1]; v9 = (l...
func0: ENDBR64 TEST ECX,ECX JLE 0x001011e5 PUSH RBX MOV R10,RDI MOV R9D,ESI MOV RSI,RDX LEA EAX,[RCX + -0x1] LEA R11,[RDX + RAX*0x4 + 0x4] LEA EAX,[R9 + -0x1] LEA RCX,[RDI + RAX*0x4 + 0x4] MOV EDI,0x0 LEA RBX,[0x104040] JMP 0x001011cc LAB_001011ba: MOVSXD RAX,EDI MOV dword ptr [RBX + RAX*0x4],EDX LEA EDI,[RDI + 0x1] LA...
int4 * func0(int *param_1,int param_2,int *param_3,int param_4,int *param_5) { int *piVar1; int *piVar2; int iVar3; if (param_4 < 1) { *param_5 = 0; return &result_1; } piVar1 = param_3 + (ulong)(param_4 - 1) + 1; iVar3 = 0; do { if (0 < param_2) { piVar2 = param_1; do { ...
4,890
func0
#include <stdio.h> #include <assert.h>
int *func0(int array_nums1[], int len1, int array_nums2[], int len2, int *result_len) { static int result[1000]; // Static to avoid the result variable from becoming local only to this function int k = 0; for (int i = 0; i < len2; i++) { for (int j = 0; j < len1; j++) { if (array_n...
int main() { int result_len; int *result; int array1[] = {1, 2, 3, 5, 7, 8, 9, 10}; int array2[] = {1, 2, 4, 8, 9}; int expected1[] = {1, 2, 8, 9}; result = func0(array1, 8, array2, 5, &result_len); assert(result_len == 4); for (int i = 0; i < result_len; i++) { as...
O2
c
func0: endbr64 push %rbx mov %r8,%rbx test %ecx,%ecx jle 154d <func0+0x6d> lea -0x1(%rcx),%eax mov %rdx,%r9 lea 0x2b47(%rip),%r8 xor %r10d,%r10d lea 0x4(%rdx,%rax,4),%r11 lea -0x1(%rsi),%eax lea 0x4(%rdi,%rax,4),%rcx nopl 0x0(%rax) test %esi,%esi jle 1538 <func0+0x58> mov (%r9),...
func0: endbr64 push r12 test ecx, ecx jle short loc_1479 lea eax, [rcx-1] mov r10, rdi lea r12, result_1 mov r9d, esi lea r11, [rdx+rax*4+4] lea eax, [rsi-1] lea rsi, [rdi+rax*4+4] xor edi, edi nop dword ptr [rax+00000000h] loc_1440: test r9d, r9d jle short loc_1467 ...
_DWORD * func0(_DWORD *a1, int a2, int *a3, int a4, _DWORD *a5) { long long v7; // r11 long long v8; // rsi int v9; // edi int v10; // ecx _DWORD *v11; // rax long long v12; // rax _DWORD *result; // rax if ( a4 <= 0 ) { result = result_1; *a5 = 0; } else { v7 = (long long)&a3[a4 - ...
func0: ENDBR64 PUSH R12 TEST ECX,ECX JLE 0x00101479 LEA EAX,[RCX + -0x1] MOV R10,RDI LEA R12,[0x104040] MOV R9D,ESI LEA R11,[RDX + RAX*0x4 + 0x4] LEA EAX,[RSI + -0x1] LEA RSI,[RDI + RAX*0x4 + 0x4] XOR EDI,EDI NOP dword ptr [RAX] LAB_00101440: TEST R9D,R9D JLE 0x00101467 MOV ECX,dword ptr [RDX] MOV RAX,R10 JMP 0x0010145...
int4 * func0(int *param_1,int param_2,int *param_3,int param_4,int *param_5) { int *piVar1; int *piVar2; long lVar3; int iVar4; if (param_4 < 1) { *param_5 = 0; return &result_1; } piVar1 = param_3 + (ulong)(param_4 - 1) + 1; iVar4 = 0; do { if (0 < param_2) { piVar2 = param_1; ...
4,891
func0
#include <stdio.h> #include <assert.h>
int *func0(int array_nums1[], int len1, int array_nums2[], int len2, int *result_len) { static int result[1000]; // Static to avoid the result variable from becoming local only to this function int k = 0; for (int i = 0; i < len2; i++) { for (int j = 0; j < len1; j++) { if (array_n...
int main() { int result_len; int *result; int array1[] = {1, 2, 3, 5, 7, 8, 9, 10}; int array2[] = {1, 2, 4, 8, 9}; int expected1[] = {1, 2, 8, 9}; result = func0(array1, 8, array2, 5, &result_len); assert(result_len == 4); for (int i = 0; i < result_len; i++) { as...
O3
c
func0: endbr64 push %rbx mov %r8,%rbx test %ecx,%ecx jle 153d <func0+0x6d> lea -0x1(%rcx),%eax mov %rdx,%r9 lea 0x2b57(%rip),%r8 xor %r10d,%r10d lea 0x4(%rdx,%rax,4),%r11 lea -0x1(%rsi),%eax lea 0x4(%rdi,%rax,4),%rcx nopl 0x0(%rax) test %esi,%esi jle 1528 <func0+0x58> mov (%r9),...
func0: endbr64 mov r9, rdi test ecx, ecx jle short loc_119F movsxd rcx, ecx lea r10, [rdx+rcx*4] loc_1192: test esi, esi jg short loc_11AF add rdx, 4 cmp rdx, r10 jnz short loc_1192 loc_119F: xor eax, eax lea r11, result_1 loc_11A8: mov [r8], eax mov rax, r11 retn loc...
__int128 * func0(_DWORD *a1, int a2, int *a3, int a4, _DWORD *a5) { int *v6; // r10 int v7; // eax long long v9; // rdi _DWORD *v10; // rsi int v11; // ecx _DWORD *v12; // rax if ( a4 <= 0 ) { LABEL_5: v7 = 0; LABEL_6: *a5 = v7; return &result_1; } else { v6 = &a3[a4]; while (...
func0: ENDBR64 MOV R9,RDI TEST ECX,ECX JLE 0x0010119f MOVSXD RCX,ECX LEA R10,[RDX + RCX*0x4] LAB_00101192: TEST ESI,ESI JG 0x001011af ADD RDX,0x4 CMP RDX,R10 JNZ 0x00101192 LAB_0010119f: XOR EAX,EAX LEA R11,[0x104040] LAB_001011a8: MOV dword ptr [R8],EAX MOV RAX,R11 RET LAB_001011af: MOVSXD RSI,ESI XOR EDI,EDI LEA R11,...
int4 * func0(int *param_1,int param_2,int *param_3,int param_4,int *param_5) { int *piVar1; int iVar2; int *piVar3; long lVar4; if (0 < param_4) { piVar1 = param_3 + param_4; do { if (0 < param_2) { lVar4 = 0; LAB_001011c0: do { iVar2 = *param_3; piVar3 = ...
4,892
func0
#include <assert.h>
int func0(int arr[], int arr_size, int x) { int count = 0; for (int i = 0; i < arr_size; i++) { if (arr[i] == x) { count++; } } return count; }
int main() { int arr1[] = {10, 8, 5, 2, 10, 15, 10, 8, 5, 8, 8, 2}; int size1 = sizeof(arr1) / sizeof(arr1[0]); assert(func0(arr1, size1, 4) == 0); assert(func0(arr1, size1, 10) == 3); assert(func0(arr1, size1, 8) == 4); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %rdi,-0x18(%rbp) mov %esi,-0x1c(%rbp) mov %edx,-0x20(%rbp) movl $0x0,-0x8(%rbp) movl $0x0,-0x4(%rbp) jmp 11ae <func0+0x45> mov -0x4(%rbp),%eax cltq lea 0x0(,%rax,4),%rdx mov -0x18(%rbp),%rax add %rdx,%rax mov (%rax),%eax cmp %eax,-0x20(%r...
func0: 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], 0 mov [rbp+var_4], 0 jmp short loc_11AE loc_118B: mov eax, [rbp+var_4] cdqe lea rdx, ds:0[rax*4] mov rax, [rbp+var_18] add rax, rdx mov eax, [rax] cm...
long long func0(long long a1, int a2, int a3) { unsigned int v4; // [rsp+18h] [rbp-8h] int i; // [rsp+1Ch] [rbp-4h] v4 = 0; for ( i = 0; i < a2; ++i ) { if ( a3 == *(_DWORD *)(4LL * i + a1) ) ++v4; } return v4; }
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],0x0 MOV dword ptr [RBP + -0x4],0x0 JMP 0x001011ae LAB_0010118b: MOV EAX,dword ptr [RBP + -0x4] CDQE LEA RDX,[RAX*0x4] MOV RAX,qword ptr [RBP + -0x18] ADD RAX,RDX...
int func0(long param_1,int param_2,int param_3) { int4 local_10; int4 local_c; local_10 = 0; for (local_c = 0; local_c < param_2; local_c = local_c + 1) { if (param_3 == *(int *)(param_1 + (long)local_c * 4)) { local_10 = local_10 + 1; } } return local_10; }
4,893
func0
#include <assert.h>
int func0(int arr[], int arr_size, int x) { int count = 0; for (int i = 0; i < arr_size; i++) { if (arr[i] == x) { count++; } } return count; }
int main() { int arr1[] = {10, 8, 5, 2, 10, 15, 10, 8, 5, 8, 8, 2}; int size1 = sizeof(arr1) / sizeof(arr1[0]); assert(func0(arr1, size1, 4) == 0); assert(func0(arr1, size1, 10) == 3); assert(func0(arr1, size1, 8) == 4); return 0; }
O1
c
func0: endbr64 test %esi,%esi jle 1199 <func0+0x30> mov %rdi,%rax lea -0x1(%rsi),%ecx lea 0x4(%rdi,%rcx,4),%rdi mov $0x0,%ecx cmp %edx,(%rax) sete %sil movzbl %sil,%esi add %esi,%ecx add $0x4,%rax cmp %rdi,%rax jne 1181 <func0+0x18> mov %ecx,%eax retq mov $0x0,%ecx jmp 1196 <f...
func0: endbr64 test esi, esi jle short loc_1199 mov rax, rdi lea ecx, [rsi-1] lea rdi, [rdi+rcx*4+4] mov ecx, 0 loc_1181: cmp [rax], edx setz sil movzx esi, sil add ecx, esi add rax, 4 cmp rax, rdi jnz short loc_1181 loc_1196: mov eax, ecx retn loc_1199: mov ecx, ...
long long func0(_DWORD *a1, int a2, int a3) { _DWORD *v3; // rax long long v4; // rdi unsigned int v5; // ecx if ( a2 <= 0 ) { return 0; } else { v3 = a1; v4 = (long long)&a1[a2 - 1 + 1]; v5 = 0; do v5 += *v3++ == a3; while ( v3 != (_DWORD *)v4 ); } return v5; }
func0: ENDBR64 TEST ESI,ESI JLE 0x00101199 MOV RAX,RDI LEA ECX,[RSI + -0x1] LEA RDI,[RDI + RCX*0x4 + 0x4] MOV ECX,0x0 LAB_00101181: CMP dword ptr [RAX],EDX SETZ SIL MOVZX ESI,SIL ADD ECX,ESI ADD RAX,0x4 CMP RAX,RDI JNZ 0x00101181 LAB_00101196: MOV EAX,ECX RET LAB_00101199: MOV ECX,0x0 JMP 0x00101196
int func0(int *param_1,int param_2,int param_3) { int *piVar1; int iVar2; if (param_2 < 1) { iVar2 = 0; } else { piVar1 = param_1 + (ulong)(param_2 - 1) + 1; iVar2 = 0; do { iVar2 = iVar2 + (uint)(*param_1 == param_3); param_1 = param_1 + 1; } while (param_1 != piVar1); }...
4,894
func0
#include <assert.h>
int func0(int arr[], int arr_size, int x) { int count = 0; for (int i = 0; i < arr_size; i++) { if (arr[i] == x) { count++; } } return count; }
int main() { int arr1[] = {10, 8, 5, 2, 10, 15, 10, 8, 5, 8, 8, 2}; int size1 = sizeof(arr1) / sizeof(arr1[0]); assert(func0(arr1, size1, 4) == 0); assert(func0(arr1, size1, 10) == 3); assert(func0(arr1, size1, 8) == 4); return 0; }
O2
c
func0: endbr64 test %esi,%esi jle 1300 <func0+0x30> lea -0x1(%rsi),%eax lea 0x4(%rdi,%rax,4),%rsi xor %eax,%eax nopw 0x0(%rax,%rax,1) xor %ecx,%ecx cmp %edx,(%rdi) sete %cl add $0x4,%rdi add %ecx,%eax cmp %rsi,%rdi jne 12e8 <func0+0x18> retq nopl 0x0(%rax,%rax,1) xor %eax,%eax r...
func0: endbr64 test esi, esi jle short loc_1300 lea eax, [rsi-1] lea rsi, [rdi+rax*4+4] xor eax, eax nop word ptr [rax+rax+00h] loc_12E8: xor ecx, ecx cmp [rdi], edx setz cl add rdi, 4 add eax, ecx cmp rdi, rsi jnz short loc_12E8 retn loc_1300: xor eax, eax retn
long long func0(_DWORD *a1, int a2, int a3) { long long v3; // rsi long long result; // rax BOOL v5; // ecx if ( a2 <= 0 ) return 0LL; v3 = (long long)&a1[a2 - 1 + 1]; LODWORD(result) = 0; do { v5 = *a1++ == a3; result = (unsigned int)(v5 + result); } while ( a1 != (_DWORD *)v3 ); re...
func0: ENDBR64 TEST ESI,ESI JLE 0x00101300 LEA EAX,[RSI + -0x1] LEA RSI,[RDI + RAX*0x4 + 0x4] XOR EAX,EAX NOP word ptr [RAX + RAX*0x1] LAB_001012e8: XOR ECX,ECX CMP dword ptr [RDI],EDX SETZ CL ADD RDI,0x4 ADD EAX,ECX CMP RDI,RSI JNZ 0x001012e8 RET LAB_00101300: XOR EAX,EAX RET
int func0(int *param_1,int param_2,int param_3) { int *piVar1; int iVar2; int iVar3; if (0 < param_2) { piVar1 = param_1 + (ulong)(param_2 - 1) + 1; iVar3 = 0; do { iVar2 = *param_1; param_1 = param_1 + 1; iVar3 = iVar3 + (uint)(iVar2 == param_3); } while (param_1 != piVar1...
4,895
func0
#include <assert.h>
int func0(int arr[], int arr_size, int x) { int count = 0; for (int i = 0; i < arr_size; i++) { if (arr[i] == x) { count++; } } return count; }
int main() { int arr1[] = {10, 8, 5, 2, 10, 15, 10, 8, 5, 8, 8, 2}; int size1 = sizeof(arr1) / sizeof(arr1[0]); assert(func0(arr1, size1, 4) == 0); assert(func0(arr1, size1, 10) == 3); assert(func0(arr1, size1, 8) == 4); return 0; }
O3
c
func0: endbr64 test %esi,%esi jle 13c8 <func0+0xe8> lea -0x1(%rsi),%eax cmp $0x3,%eax jbe 13cb <func0+0xeb> mov %esi,%ecx movd %edx,%xmm3 pxor %xmm0,%xmm0 mov %rdi,%rax shr $0x2,%ecx pshufd $0x0,%xmm3,%xmm2 shl $0x4,%rcx add %rdi,%rcx nopl 0x0(%rax) movdqu (%rax),%xmm1 add $0x10,%r...
func0: endbr64 test esi, esi jle loc_1210 lea eax, [rsi-1] cmp eax, 2 jbe loc_1213 mov ecx, esi movd xmm3, edx pxor xmm0, xmm0 mov rax, rdi shr ecx, 2 pshufd xmm2, xmm3, 0 shl rcx, 4 add rcx, rdi nop dword ptr [rax+00h] loc_1178: movdqu xmm1, xmmword ptr [rax] add ...
long long func0(const __m128i *a1, int a2, unsigned int a3) { __m128i v3; // xmm0 const __m128i *v4; // rax __m128i v5; // xmm2 __m128i v6; // xmm1 int v7; // ecx __m128i v8; // xmm0 long long result; // rax long long v10; // r9 if ( a2 <= 0 ) return 0LL; if ( (unsigned int)(a2 - 1) <= 2 ) {...
func0: ENDBR64 TEST ESI,ESI JLE 0x00101210 LEA EAX,[RSI + -0x1] CMP EAX,0x2 JBE 0x00101213 MOV ECX,ESI MOVD XMM3,EDX PXOR XMM0,XMM0 MOV RAX,RDI SHR ECX,0x2 PSHUFD XMM2,XMM3,0x0 SHL RCX,0x4 ADD RCX,RDI NOP dword ptr [RAX] LAB_00101178: MOVDQU XMM1,xmmword ptr [RAX] ADD RAX,0x10 PCMPEQD XMM1,XMM2 PSUBD XMM0,XMM1 CMP RCX,...
int func0(int *param_1,uint param_2,int param_3) { int iVar1; int *piVar2; int *piVar3; int *piVar4; int *piVar5; uint uVar6; int iVar7; int iVar8; int iVar9; int iVar10; if ((int)param_2 < 1) { return 0; } if (param_2 - 1 < 3) { uVar6 = 0; iVar7 = 0; } else { iVar7 = 0...
4,896
func0
#include <assert.h> #include <stdio.h> #include <string.h> #include <stdlib.h>
char** func0(char** list, int list_size, char* element, int* new_size) { *new_size = 2 * list_size; char** new_list = malloc((*new_size) * sizeof(char*)); int k = 0; for (int i = 0; i < list_size; i++) { new_list[k++] = element; new_list[k++] = list[i]; } return new_list;...
int main() { char* colors[] = {"Red", "Green", "Black"}; int colors_size = 3; char* colors_element = "c"; int new_colors_size; char** new_colors = func0(colors, colors_size, colors_element, &new_colors_size); assert(new_colors_size == 6); assert(strcmp(new_colors[0], "c") == 0); ...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x30,%rsp mov %rdi,-0x18(%rbp) mov %esi,-0x1c(%rbp) mov %rdx,-0x28(%rbp) mov %rcx,-0x30(%rbp) mov -0x1c(%rbp),%eax lea (%rax,%rax,1),%edx mov -0x30(%rbp),%rax mov %edx,(%rax) mov -0x30(%rbp),%rax mov (%rax),%eax cltq shl $0x3,%rax mov ...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_18], rdi mov [rbp+var_1C], esi mov [rbp+var_28], rdx mov [rbp+var_30], rcx mov eax, [rbp+var_1C] lea edx, [rax+rax] mov rax, [rbp+var_30] mov [rax], edx mov rax, [rbp+var_30] mov eax, [rax] cdqe shl rax...
_QWORD * func0(long long a1, int a2, long long a3, int *a4) { int v4; // eax int v7; // [rsp+20h] [rbp-10h] int i; // [rsp+24h] [rbp-Ch] _QWORD *v9; // [rsp+28h] [rbp-8h] *a4 = 2 * a2; v9 = malloc(8LL * *a4); v7 = 0; for ( i = 0; i < a2; ++i ) { v9[v7] = a3; v4 = v7 + 1; v7 += 2; v9[v...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x18],RDI MOV dword ptr [RBP + -0x1c],ESI MOV qword ptr [RBP + -0x28],RDX MOV qword ptr [RBP + -0x30],RCX MOV EAX,dword ptr [RBP + -0x1c] LEA EDX,[RAX + RAX*0x1] MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX],EDX MOV RAX,qword ptr [RBP + -0x30]...
void * func0(long param_1,int param_2,int8 param_3,int *param_4) { int iVar1; void *pvVar2; int4 local_18; int4 local_14; *param_4 = param_2 * 2; pvVar2 = malloc((long)*param_4 << 3); local_18 = 0; for (local_14 = 0; local_14 < param_2; local_14 = local_14 + 1) { iVar1 = local_18 + 1; *(int8...
4,897
func0
#include <assert.h> #include <stdio.h> #include <string.h> #include <stdlib.h>
char** func0(char** list, int list_size, char* element, int* new_size) { *new_size = 2 * list_size; char** new_list = malloc((*new_size) * sizeof(char*)); int k = 0; for (int i = 0; i < list_size; i++) { new_list[k++] = element; new_list[k++] = list[i]; } return new_list;...
int main() { char* colors[] = {"Red", "Green", "Black"}; int colors_size = 3; char* colors_element = "c"; int new_colors_size; char** new_colors = func0(colors, colors_size, colors_element, &new_colors_size); assert(new_colors_size == 6); assert(strcmp(new_colors[0], "c") == 0); ...
O1
c
func0: endbr64 push %r12 push %rbp push %rbx mov %rdi,%rbx mov %esi,%r12d mov %rdx,%rbp lea (%rsi,%rsi,1),%edi mov %edi,(%rcx) movslq %edi,%rdi shl $0x3,%rdi callq 10b0 <malloc@plt> test %r12d,%r12d jle 11f5 <func0+0x4c> lea -0x1(%r12),%edx lea 0x2(%rdx,%rdx,1),%rsi mov $0x0,%edx ...
func0: endbr64 push r12 push rbp push rbx mov rbx, rdi mov r12d, esi mov rbp, rdx lea edi, [rsi+rsi] mov [rcx], edi movsxd rdi, edi shl rdi, 3 call _malloc test r12d, r12d jle short loc_1211 mov esi, r12d add rsi, rsi mov edx, 0 loc_11FB: mov [rax+rdx*8], rbp ...
long long func0(long long a1, int a2, long long a3, _DWORD *a4) { long long result; // rax long long v6; // rdx *a4 = 2 * a2; result = malloc(16LL * a2); if ( a2 > 0 ) { v6 = 0LL; do { *(_QWORD *)(result + 8 * v6) = a3; *(_QWORD *)(result + 8 * v6 + 8) = *(_QWORD *)(a1 + 4 * v6); ...
func0: ENDBR64 PUSH R12 PUSH RBP PUSH RBX MOV RBX,RDI MOV R12D,ESI MOV RBP,RDX LEA EDI,[RSI + RSI*0x1] MOV dword ptr [RCX],EDI MOVSXD RDI,EDI SHL RDI,0x3 CALL 0x001010d0 TEST R12D,R12D JLE 0x00101211 MOV ESI,R12D ADD RSI,RSI MOV EDX,0x0 LAB_001011fb: MOV qword ptr [RAX + RDX*0x8],RBP MOV RCX,qword ptr [RBX + RDX*0x4] M...
void func0(long param_1,uint param_2,int8 param_3,int *param_4) { void *pvVar1; long lVar2; *param_4 = param_2 * 2; pvVar1 = malloc((long)(int)(param_2 * 2) << 3); if (0 < (int)param_2) { lVar2 = 0; do { *(int8 *)((long)pvVar1 + lVar2 * 8) = param_3; *(int8 *)((long)pvVar1 + lVar2 * 8 ...
4,898
func0
#include <assert.h> #include <stdio.h> #include <string.h> #include <stdlib.h>
char** func0(char** list, int list_size, char* element, int* new_size) { *new_size = 2 * list_size; char** new_list = malloc((*new_size) * sizeof(char*)); int k = 0; for (int i = 0; i < list_size; i++) { new_list[k++] = element; new_list[k++] = list[i]; } return new_list;...
int main() { char* colors[] = {"Red", "Green", "Black"}; int colors_size = 3; char* colors_element = "c"; int new_colors_size; char** new_colors = func0(colors, colors_size, colors_element, &new_colors_size); assert(new_colors_size == 6); assert(strcmp(new_colors[0], "c") == 0); ...
O2
c
func0: endbr64 push %r12 mov %esi,%r12d push %rbp mov %rdx,%rbp push %rbx mov %rdi,%rbx lea (%rsi,%rsi,1),%edi mov %edi,(%rcx) movslq %edi,%rdi shl $0x3,%rdi callq 10b0 <malloc@plt> test %r12d,%r12d jle 16ae <func0+0x4e> lea -0x1(%r12),%edx xor %ecx,%ecx lea 0x2(%rdx,%rdx,1),%rdx ...
func0: endbr64 push r12 mov r12, rdx push rbp mov rbp, rdi lea edi, [rsi+rsi] push rbx mov ebx, esi mov [rcx], edi movsxd rdi, edi shl rdi, 3 call _malloc test ebx, ebx jle short loc_1667 movsxd rcx, ebx xor edx, edx add rcx, rcx nop dword ptr [rax] loc_1650: mov...
long long func0(long long a1, int a2, long long a3, _DWORD *a4) { long long result; // rax long long v7; // rdx long long v8; // rsi *a4 = 2 * a2; result = malloc(16LL * a2); if ( a2 > 0 ) { v7 = 0LL; do { v8 = *(_QWORD *)(a1 + 4 * v7); *(_QWORD *)(result + 8 * v7) = a3; *(...
func0: ENDBR64 PUSH R12 MOV R12,RDX PUSH RBP MOV RBP,RDI LEA EDI,[RSI + RSI*0x1] PUSH RBX MOV EBX,ESI MOV dword ptr [RCX],EDI MOVSXD RDI,EDI SHL RDI,0x3 CALL 0x001010d0 TEST EBX,EBX JLE 0x00101667 MOVSXD RCX,EBX XOR EDX,EDX ADD RCX,RCX NOP dword ptr [RAX] LAB_00101650: MOV RSI,qword ptr [RBP + RDX*0x4] MOV qword ptr [R...
void func0(long param_1,int param_2,int8 param_3,int *param_4) { int8 uVar1; void *pvVar2; long lVar3; *param_4 = param_2 * 2; pvVar2 = malloc((long)(param_2 * 2) << 3); if (0 < param_2) { lVar3 = 0; do { uVar1 = *(int8 *)(param_1 + lVar3 * 4); *(int8 *)((long)pvVar2 + lVar3 * 8) = p...
4,899
func0
#include <assert.h> #include <stdio.h> #include <string.h> #include <stdlib.h>
char** func0(char** list, int list_size, char* element, int* new_size) { *new_size = 2 * list_size; char** new_list = malloc((*new_size) * sizeof(char*)); int k = 0; for (int i = 0; i < list_size; i++) { new_list[k++] = element; new_list[k++] = list[i]; } return new_list;...
int main() { char* colors[] = {"Red", "Green", "Black"}; int colors_size = 3; char* colors_element = "c"; int new_colors_size; char** new_colors = func0(colors, colors_size, colors_element, &new_colors_size); assert(new_colors_size == 6); assert(strcmp(new_colors[0], "c") == 0); ...
O3
c
func0: endbr64 push %rbp mov %esi,%ebp push %rbx mov %rdi,%rbx lea (%rsi,%rsi,1),%edi sub $0x18,%rsp mov %edi,(%rcx) movslq %edi,%rdi shl $0x3,%rdi mov %rdx,0x8(%rsp) callq 10b0 <malloc@plt> test %ebp,%ebp jle 1707 <func0+0x97> cmp $0x1,%ebp movq 0x8(%rsp),%xmm2 je 170e <func0+0x...
func0: endbr64 push rbp mov ebp, esi push rbx mov rbx, rdi lea edi, [rsi+rsi] sub rsp, 18h mov [rcx], edi movsxd rdi, edi shl rdi, 3; size mov [rsp+28h+var_20], rdx call _malloc test ebp, ebp jle short loc_16E5 cmp ebp, 1 movq xmm0, [rsp+28h+var_20] jz short loc_...
char * func0(long long a1, int a2, long long a3, _DWORD *a4) { char *result; // rax __m128i v5; // xmm0 long long v6; // rcx __m128i v7; // xmm3 __m128 v8; // xmm4 __m128 v9; // xmm1 signed int v10; // edx int v11; // ecx __m128i v12[2]; // [rsp+8h] [rbp-20h] BYREF *a4 = 2 * a2; v12[0].m128i_i64[...
func0: ENDBR64 PUSH RBP MOV EBP,ESI PUSH RBX MOV RBX,RDI LEA EDI,[RSI + RSI*0x1] SUB RSP,0x18 MOV dword ptr [RCX],EDI MOVSXD RDI,EDI SHL RDI,0x3 MOV qword ptr [RSP + 0x8],RDX CALL 0x001010d0 TEST EBP,EBP JLE 0x001016e5 CMP EBP,0x1 MOVQ XMM0,qword ptr [RSP + 0x8] JZ 0x001016ec MOV EDX,EBP MOVDQA XMM3,XMM0 XOR ECX,ECX SH...
void func0(long param_1,uint param_2,int8 param_3,int *param_4) { int8 *puVar1; int8 uVar2; int8 uVar3; void *pvVar4; int iVar5; long lVar6; uint uVar7; *param_4 = param_2 * 2; pvVar4 = malloc((long)(int)(param_2 * 2) << 3); if (0 < (int)param_2) { if (param_2 == 1) { uVar7 = 0; ...
4,900
func0
#include <stdio.h> #include <math.h> #include <assert.h> typedef struct { double magnitude; double angle; } polar_number;
polar_number func0(double numbers) { polar_number num; num.magnitude = fabs(numbers); num.angle = 0.0; return num; }
int main() { polar_number num; num = func0(1); assert(num.magnitude == 1.0 && num.angle == 0.0); num = func0(4); assert(num.magnitude == 4.0 && num.angle == 0.0); num = func0(5); assert(num.magnitude == 5.0 && num.angle == 0.0); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp push %rbx movsd %xmm0,-0x20(%rbp) movsd -0x20(%rbp),%xmm0 movq 0xf7c(%rip),%xmm1 andpd %xmm1,%xmm0 movsd %xmm0,-0x18(%rbp) pxor %xmm0,%xmm0 movsd %xmm0,-0x10(%rbp) mov -0x18(%rbp),%rax mov -0x10(%rbp),%rdx mov %rax,%rcx mov %rdx,%rbx movq %rcx,%xmm0 m...
func0: endbr64 push rbp mov rbp, rsp movsd [rbp+var_18], xmm0 movsd xmm0, [rbp+var_18] movq xmm1, cs:qword_20C0 andpd xmm0, xmm1 movsd [rbp+var_10], xmm0 pxor xmm0, xmm0 movsd [rbp+var_8], xmm0 mov rax, [rbp+var_10] mov rdx, [rbp+var_8] mov qword ptr [rbp+var_30], rax mov qword pt...
__m128i func0(double a1) { __m128i v2; // [rsp+0h] [rbp-30h] BYREF double v3; // [rsp+18h] [rbp-18h] double v4; // [rsp+20h] [rbp-10h] long long v5; // [rsp+28h] [rbp-8h] v3 = a1; v4 = fabs(a1); v5 = 0LL; v2 = (__m128i)*(unsigned long long *)&v4; return _mm_load_si128(&v2); }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOVSD qword ptr [RBP + -0x18],XMM0 MOVSD XMM0,qword ptr [RBP + -0x18] MOVQ XMM1,qword ptr [0x001020c0] ANDPD XMM0,XMM1 MOVSD qword ptr [RBP + -0x10],XMM0 PXOR XMM0,XMM0 MOVSD qword ptr [RBP + -0x8],XMM0 MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x8] MOV qword ptr [RBP...
int [16] func0(ulong param_1) { int auVar1 [16]; auVar1._0_8_ = param_1 & DAT_001020c0; auVar1._8_8_ = 0; return auVar1; }
4,901
func0
#include <stdio.h> #include <math.h> #include <assert.h> typedef struct { double magnitude; double angle; } polar_number;
polar_number func0(double numbers) { polar_number num; num.magnitude = fabs(numbers); num.angle = 0.0; return num; }
int main() { polar_number num; num = func0(1); assert(num.magnitude == 1.0 && num.angle == 0.0); num = func0(4); assert(num.magnitude == 4.0 && num.angle == 0.0); num = func0(5); assert(num.magnitude == 5.0 && num.angle == 0.0); return 0; }
O1
c
func0: endbr64 andpd 0xedb(%rip),%xmm0 pxor %xmm1,%xmm1 retq
func0: endbr64 andpd xmm0, cs:xmmword_2010 pxor xmm1, xmm1 retn
__m128d func0(__m128d a1) { return _mm_and_pd(a1, (__m128d)xmmword_2010); }
func0: ENDBR64 ANDPD XMM0,xmmword ptr [0x00102010] PXOR XMM1,XMM1 RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ int1 [16] func0(ulong param_1) { int1 auVar1 [16]; auVar1._0_8_ = param_1 & _DAT_00102010; auVar1._8_8_ = 0; return auVar1; }
4,902
func0
#include <stdio.h> #include <math.h> #include <assert.h> typedef struct { double magnitude; double angle; } polar_number;
polar_number func0(double numbers) { polar_number num; num.magnitude = fabs(numbers); num.angle = 0.0; return num; }
int main() { polar_number num; num = func0(1); assert(num.magnitude == 1.0 && num.angle == 0.0); num = func0(4); assert(num.magnitude == 4.0 && num.angle == 0.0); num = func0(5); assert(num.magnitude == 5.0 && num.angle == 0.0); return 0; }
O2
c
func0: endbr64 pxor %xmm1,%xmm1 andpd 0xec0(%rip),%xmm0 retq nopw %cs:0x0(%rax,%rax,1) nopl 0x0(%rax,%rax,1)
func0: endbr64 pxor xmm1, xmm1 andpd xmm0, cs:xmmword_2010 retn
__m128d func0(__m128d a1) { return _mm_and_pd(a1, (__m128d)xmmword_2010); }
func0: ENDBR64 PXOR XMM1,XMM1 ANDPD XMM0,xmmword ptr [0x00102010] RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ int1 [16] func0(ulong param_1) { int1 auVar1 [16]; auVar1._0_8_ = param_1 & _DAT_00102010; auVar1._8_8_ = 0; return auVar1; }
4,903
func0
#include <stdio.h> #include <math.h> #include <assert.h> typedef struct { double magnitude; double angle; } polar_number;
polar_number func0(double numbers) { polar_number num; num.magnitude = fabs(numbers); num.angle = 0.0; return num; }
int main() { polar_number num; num = func0(1); assert(num.magnitude == 1.0 && num.angle == 0.0); num = func0(4); assert(num.magnitude == 4.0 && num.angle == 0.0); num = func0(5); assert(num.magnitude == 5.0 && num.angle == 0.0); return 0; }
O3
c
func0: endbr64 pxor %xmm1,%xmm1 andpd 0xec0(%rip),%xmm0 retq nopw %cs:0x0(%rax,%rax,1) nopl 0x0(%rax,%rax,1)
func0: endbr64 pxor xmm1, xmm1 andpd xmm0, cs:xmmword_2010 retn
__m128d func0(__m128d a1) { return _mm_and_pd(a1, (__m128d)xmmword_2010); }
func0: ENDBR64 PXOR XMM1,XMM1 ANDPD XMM0,xmmword ptr [0x00102010] RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ int [16] func0(ulong param_1) { int auVar1 [16]; auVar1._0_8_ = param_1 & _DAT_00102010; auVar1._8_8_ = 0; return auVar1; }
4,904
func0
#include <stdio.h> #include <assert.h>
int func0(int list1[], int length) { int ctr = 0; for (int i = 0; i < length; i++) { ctr++; } return ctr; }
int main() { int list1[] = {1, 2, 5}; int size1 = sizeof(list1) / sizeof(list1[0]); assert(func0(list1, size1) == 3); int list2[] = {1, 2, 3}; int size2 = sizeof(list2) / sizeof(list2[0]); assert(func0(list2, size2) == 3); int list3[] = {1, 4}; int size3 = sizeof(list3) / siz...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %rdi,-0x18(%rbp) mov %esi,-0x1c(%rbp) movl $0x0,-0x8(%rbp) movl $0x0,-0x4(%rbp) jmp 1190 <func0+0x27> addl $0x1,-0x8(%rbp) addl $0x1,-0x4(%rbp) mov -0x4(%rbp),%eax cmp -0x1c(%rbp),%eax jl 1188 <func0+0x1f> mov -0x8(%rbp),%eax pop %rbp retq...
func0: endbr64 push rbp mov rbp, rsp mov [rbp+var_18], rdi mov [rbp+var_1C], esi mov [rbp+var_8], 0 mov [rbp+var_4], 0 jmp short loc_1190 loc_1188: add [rbp+var_8], 1 add [rbp+var_4], 1 loc_1190: mov eax, [rbp+var_4] cmp eax, [rbp+var_1C] jl short loc_1188 mov eax, [r...
long long func0(long long a1, int a2) { unsigned int v3; // [rsp+14h] [rbp-8h] int i; // [rsp+18h] [rbp-4h] v3 = 0; for ( i = 0; i < a2; ++i ) ++v3; return v3; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x18],RDI MOV dword ptr [RBP + -0x1c],ESI MOV dword ptr [RBP + -0x8],0x0 MOV dword ptr [RBP + -0x4],0x0 JMP 0x00101190 LAB_00101188: ADD dword ptr [RBP + -0x8],0x1 ADD dword ptr [RBP + -0x4],0x1 LAB_00101190: MOV EAX,dword ptr [RBP + -0x4] CMP EAX,dword ptr [RBP...
int func0(int8 param_1,int param_2) { int4 local_10; int4 local_c; local_10 = 0; for (local_c = 0; local_c < param_2; local_c = local_c + 1) { local_10 = local_10 + 1; } return local_10; }
4,905
func0
#include <stdio.h> #include <assert.h>
int func0(int list1[], int length) { int ctr = 0; for (int i = 0; i < length; i++) { ctr++; } return ctr; }
int main() { int list1[] = {1, 2, 5}; int size1 = sizeof(list1) / sizeof(list1[0]); assert(func0(list1, size1) == 3); int list2[] = {1, 2, 3}; int size2 = sizeof(list2) / sizeof(list2[0]); assert(func0(list2, size2) == 3); int list3[] = {1, 4}; int size3 = sizeof(list3) / siz...
O1
c
func0: endbr64 mov %esi,%eax test %esi,%esi jle 1140 <func0+0x17> mov $0x0,%edx add $0x1,%edx cmp %edx,%eax jne 1138 <func0+0xf> retq mov $0x0,%eax retq
func0: endbr64 mov eax, esi test esi, esi jle short loc_1140 mov edx, 0 loc_1138: add edx, 1 cmp eax, edx jnz short loc_1138 retn loc_1140: mov eax, 0 retn
long long func0(long long a1, int a2) { long long result; // rax int i; // edx result = (unsigned int)a2; if ( a2 <= 0 ) return 0LL; for ( i = 0; i != a2; ++i ) ; return result; }
func0: ENDBR64 MOV EAX,ESI TEST ESI,ESI JLE 0x00101140 MOV EDX,0x0 LAB_00101138: ADD EDX,0x1 CMP EAX,EDX JNZ 0x00101138 RET LAB_00101140: MOV EAX,0x0 RET
int func0(int8 param_1,int param_2) { int iVar1; if (0 < param_2) { iVar1 = 0; do { iVar1 = iVar1 + 1; } while (param_2 != iVar1); return param_2; } return 0; }
4,906
func0
#include <stdio.h> #include <assert.h>
int func0(int list1[], int length) { int ctr = 0; for (int i = 0; i < length; i++) { ctr++; } return ctr; }
int main() { int list1[] = {1, 2, 5}; int size1 = sizeof(list1) / sizeof(list1[0]); assert(func0(list1, size1) == 3); int list2[] = {1, 2, 3}; int size2 = sizeof(list2) / sizeof(list2[0]); assert(func0(list2, size2) == 3); int list3[] = {1, 4}; int size3 = sizeof(list3) / siz...
O2
c
func0: endbr64 test %esi,%esi mov $0x0,%eax cmovg %esi,%eax retq
func0: endbr64 xor eax, eax test esi, esi cmovns eax, esi retn
long long func0(long long a1, int a2) { long long result; // rax result = 0LL; if ( a2 >= 0 ) return (unsigned int)a2; return result; }
func0: ENDBR64 XOR EAX,EAX TEST ESI,ESI CMOVNS EAX,ESI RET
int func0(int8 param_1,int param_2) { int iVar1; iVar1 = 0; if (-1 < param_2) { iVar1 = param_2; } return iVar1; }
4,907
func0
#include <stdio.h> #include <assert.h>
int func0(int list1[], int length) { int ctr = 0; for (int i = 0; i < length; i++) { ctr++; } return ctr; }
int main() { int list1[] = {1, 2, 5}; int size1 = sizeof(list1) / sizeof(list1[0]); assert(func0(list1, size1) == 3); int list2[] = {1, 2, 3}; int size2 = sizeof(list2) / sizeof(list2[0]); assert(func0(list2, size2) == 3); int list3[] = {1, 4}; int size3 = sizeof(list3) / siz...
O3
c
func0: endbr64 test %esi,%esi mov $0x0,%eax cmovg %esi,%eax retq
func0: endbr64 xor eax, eax test esi, esi cmovns eax, esi retn
long long func0(long long a1, int a2) { long long result; // rax result = 0LL; if ( a2 >= 0 ) return (unsigned int)a2; return result; }
func0: ENDBR64 XOR EAX,EAX TEST ESI,ESI CMOVNS EAX,ESI RET
int func0(int8 param_1,int param_2) { int iVar1; iVar1 = 0; if (-1 < param_2) { iVar1 = param_2; } return iVar1; }
4,908
func0
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <regex.h> #include <assert.h> typedef struct { char **matches; int count; } MatchList;
MatchList func0(const char *text) { regex_t regex; regmatch_t pmatch[1]; const char *pattern = "[ae]\\w+"; int ret; MatchList list; list.matches = NULL; list.count = 0; ret = regcomp(&regex, pattern, REG_EXTENDED); if (ret) { fprintf(stderr, "Could not compile reg...
int main() { // Test case 1 MatchList result1 = func0("python programe"); assert(result1.count == 1); assert(strcmp(result1.matches[0], "ame") == 0); for(int i = 0; i < result1.count; i++) { free(result1.matches[i]); } free(result1.matches); // Test case 2 MatchLi...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0xa0,%rsp mov %rdi,-0x98(%rbp) mov %fs:0x28,%rax mov %rax,-0x8(%rbp) xor %eax,%eax lea 0xd33(%rip),%rax mov %rax,-0x70(%rbp) movq $0x0,-0x60(%rbp) movl $0x0,-0x58(%rbp) mov -0x70(%rbp),%rcx lea -0x50(%rbp),%rax mov $0x1,%edx mov %rcx,...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 0A0h mov [rbp+var_98], rdi mov rax, fs:28h mov [rbp+var_8], rax xor eax, eax lea rax, aAeW; "[ae]\\w+" mov [rbp+pattern], rax mov [rbp+ptr], 0 mov dword ptr [rbp+var_58], 0 mov rcx, [rbp+pattern] lea rax, [rbp+preg] mov ...
void * func0(const char *a1) { int i; // eax regmatch_t v3; // [rsp+1Ch] [rbp-84h] int v4; // [rsp+24h] [rbp-7Ch] char *string; // [rsp+28h] [rbp-78h] char *dest; // [rsp+38h] [rbp-68h] void *ptr; // [rsp+40h] [rbp-60h] int v8; // [rsp+48h] [rbp-58h] regex_t preg; // [rsp+50h] [rbp-50h] BYREF regmatch...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0xa0 MOV qword ptr [RBP + -0x98],RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX XOR EAX,EAX LEA RAX,[0x102008] MOV qword ptr [RBP + -0x70],RAX MOV qword ptr [RBP + -0x60],0x0 MOV dword ptr [RBP + -0x58],0x0 MOV RCX,qword ptr [RBP + -0x70] LEA RAX,[RBP + -0x50]...
void * func0(char *param_1) { regoff_t rVar1; regoff_t rVar2; int iVar3; char *__dest; long in_FS_OFFSET; char *local_80; void *local_68; int local_60; regex_t local_58; regmatch_t local_18; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_68 = (void *)0x0; local_60 = 0; ...
4,909
func0
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <regex.h> #include <assert.h> typedef struct { char **matches; int count; } MatchList;
MatchList func0(const char *text) { regex_t regex; regmatch_t pmatch[1]; const char *pattern = "[ae]\\w+"; int ret; MatchList list; list.matches = NULL; list.count = 0; ret = regcomp(&regex, pattern, REG_EXTENDED); if (ret) { fprintf(stderr, "Could not compile reg...
int main() { // Test case 1 MatchList result1 = func0("python programe"); assert(result1.count == 1); assert(strcmp(result1.matches[0], "ame") == 0); for(int i = 0; i < result1.count; i++) { free(result1.matches[i]); } free(result1.matches); // Test case 2 MatchLi...
O1
c
func0: endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x68,%rsp mov %rdi,%r15 mov %fs:0x28,%rax mov %rax,0x58(%rsp) xor %eax,%eax lea 0x10(%rsp),%rdi mov $0x1,%edx lea 0xd45(%rip),%rsi callq 1140 <regcomp@plt> test %eax,%eax jne 1374 <func0+0xeb> mov ...
func0: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 68h mov r15, rdi mov rax, fs:28h mov [rsp+98h+var_40], rax xor eax, eax lea rdi, [rsp+98h+var_88] mov edx, 1 lea rsi, aAeW; "[ae]\\w+" call _regcomp test eax, eax jnz loc_1394 mov ...
long long func0(long long a1) { long long v2; // rbp int v3; // eax int v4; // ebx int v5; // r14d int v6; // r13d long long v7; // r12 long long v9; // [rsp+0h] [rbp-98h] _BYTE v10[64]; // [rsp+10h] [rbp-88h] BYREF int v11; // [rsp+50h] [rbp-48h] BYREF int v12; // [rsp+54h] [rbp-44h] unsigned lo...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x68 MOV R15,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x58],RAX XOR EAX,EAX LEA RDI,[RSP + 0x10] MOV EDX,0x1 LEA RSI,[0x102004] CALL 0x00101150 TEST EAX,EAX JNZ 0x00101394 MOV EBP,0x0 MOV qword ptr [RSP],0x0 LEA RAX,[RSP + 0x50] MO...
void * func0(char *param_1) { regoff_t rVar1; regoff_t rVar2; int iVar3; char *__dest; long lVar4; long in_FS_OFFSET; void *local_98; regex_t local_88; regmatch_t local_48; long local_40; local_40 = *(long *)(in_FS_OFFSET + 0x28); iVar3 = regcomp(&local_88,"[ae]\\w+",1); if (iVar3 != 0) { ...
4,910
func0
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <regex.h> #include <assert.h> typedef struct { char **matches; int count; } MatchList;
MatchList func0(const char *text) { regex_t regex; regmatch_t pmatch[1]; const char *pattern = "[ae]\\w+"; int ret; MatchList list; list.matches = NULL; list.count = 0; ret = regcomp(&regex, pattern, REG_EXTENDED); if (ret) { fprintf(stderr, "Could not compile reg...
int main() { // Test case 1 MatchList result1 = func0("python programe"); assert(result1.count == 1); assert(strcmp(result1.matches[0], "ame") == 0); for(int i = 0; i < result1.count; i++) { free(result1.matches[i]); } free(result1.matches); // Test case 2 MatchLi...
O2
c
func0: endbr64 push %r15 mov $0x1,%edx lea 0xb32(%rip),%rsi push %r14 push %r13 mov %rdi,%r13 push %r12 push %rbp push %rbx sub $0x78,%rsp mov %fs:0x28,%rax mov %rax,0x68(%rsp) xor %eax,%eax lea 0x20(%rsp),%rdi mov %rdi,0x10(%rsp) callq 1140 <regcomp@plt> test %eax,%eax jne ...
func0: endbr64 push r15 mov edx, 1 lea rsi, aAeW; "[ae]\\w+" push r14 push r13 mov r13, rdi push r12 push rbp push rbx sub rsp, 78h mov rax, fs:28h mov [rsp+0A8h+var_40], rax xor eax, eax lea rdi, [rsp+0A8h+var_88] mov [rsp+0A8h+var_98], rdi call _regcomp test ...
long long func0(long long a1) { long long v1; // r13 long long v2; // rbp long long v3; // r12 int i; // eax int v5; // r15d int v6; // ebx long long v7; // r14 long long v8; // rax int v10; // [rsp+8h] [rbp-A0h] _BYTE v11[64]; // [rsp+20h] [rbp-88h] BYREF int v12; // [rsp+60h] [rbp-48h] BYREF ...
func0: ENDBR64 PUSH R15 MOV EDX,0x1 LEA RSI,[0x102004] PUSH R14 PUSH R13 MOV R13,RDI PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x78 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x68],RAX XOR EAX,EAX LEA RDI,[RSP + 0x20] MOV qword ptr [RSP + 0x10],RDI CALL 0x00101150 TEST EAX,EAX JNZ 0x0010160d LEA RAX,[RSP + 0x60] XOR EBP...
void * func0(char *param_1) { regoff_t rVar1; regoff_t rVar2; int iVar3; char *__dest; void *__ptr; long lVar4; long in_FS_OFFSET; regex_t local_88; regmatch_t local_48; long local_40; local_40 = *(long *)(in_FS_OFFSET + 0x28); iVar3 = regcomp(&local_88,"[ae]\\w+",1); if (iVar3 != 0) { ...
4,911
func0
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <regex.h> #include <assert.h> typedef struct { char **matches; int count; } MatchList;
MatchList func0(const char *text) { regex_t regex; regmatch_t pmatch[1]; const char *pattern = "[ae]\\w+"; int ret; MatchList list; list.matches = NULL; list.count = 0; ret = regcomp(&regex, pattern, REG_EXTENDED); if (ret) { fprintf(stderr, "Could not compile reg...
int main() { // Test case 1 MatchList result1 = func0("python programe"); assert(result1.count == 1); assert(strcmp(result1.matches[0], "ame") == 0); for(int i = 0; i < result1.count; i++) { free(result1.matches[i]); } free(result1.matches); // Test case 2 MatchLi...
O3
c
func0: endbr64 push %r15 mov $0x1,%edx lea 0xb32(%rip),%rsi push %r14 push %r13 mov %rdi,%r13 push %r12 push %rbp push %rbx sub $0x78,%rsp mov %fs:0x28,%rax mov %rax,0x68(%rsp) xor %eax,%eax lea 0x20(%rsp),%rdi mov %rdi,0x10(%rsp) callq 1140 <regcomp@plt> test %eax,%eax jne ...
func0: endbr64 push r15 mov edx, 1; cflags lea rsi, pattern; "[ae]\\w+" push r14 push r13 push r12 mov r12, rdi push rbp push rbx sub rsp, 78h mov rax, fs:28h mov [rsp+0A8h+var_40], rax xor eax, eax lea rdi, [rsp+0A8h+preg]; preg mov [rsp+0A8h+var_98], rdi call _...
void * func0(char *string) { const char *v1; // r12 long long v2; // r13 void *v3; // rbp int i; // eax regoff_t rm_eo; // r15d long long v6; // r14 _BYTE *v7; // rbx _QWORD *v8; // rax size_t v10; // [rsp+0h] [rbp-A8h] regoff_t rm_so; // [rsp+Ch] [rbp-9Ch] regex_t preg; // [rsp+20h] [rbp-88h] BYR...
func0: ENDBR64 PUSH R15 MOV EDX,0x1 LEA RSI,[0x102004] PUSH R14 PUSH R13 PUSH R12 MOV R12,RDI PUSH RBP PUSH RBX SUB RSP,0x78 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x68],RAX XOR EAX,EAX LEA RDI,[RSP + 0x20] MOV qword ptr [RSP + 0x10],RDI CALL 0x00101140 TEST EAX,EAX JNZ 0x00101614 LEA RAX,[RSP + 0x60] XOR R13...
void * func0(char *param_1) { regoff_t rVar1; regoff_t rVar2; int iVar3; void *pvVar4; void *__ptr; long lVar5; long in_FS_OFFSET; regex_t local_88; regmatch_t local_48; long local_40; local_40 = *(long *)(in_FS_OFFSET + 0x28); iVar3 = regcomp(&local_88,"[ae]\\w+",1); if (iVar3 != 0) { ...
4,912
func0
#include <stdio.h> #include <string.h> #include <assert.h>
void func0(char *l[], int arr_size, int len, char *result[], int res_len){ if (len == 0){ for (int i = 0; i < res_len; i++) { printf("%s ", result[i]); } printf("\n"); return; } for (int i = 0; i < arr_size; i++){ if (res_len == 0 || strcmp(l[i]...
int main() { char *colors[] = {"Red", "Green", "Blue"}; int colors_size = 3; char *result1[1]; char *result2[2]; char *result3[3]; printf("Combination with 1 color:\n"); func0(colors, colors_size, 1, result1, 0); printf("Combination with 2 colors:\n"); func0(colors, colo...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x30,%rsp mov %rdi,-0x18(%rbp) mov %esi,-0x1c(%rbp) mov %edx,-0x20(%rbp) mov %rcx,-0x28(%rbp) mov %r8d,-0x2c(%rbp) cmpl $0x0,-0x20(%rbp) jne 123c <func0+0x73> movl $0x0,-0x8(%rbp) jmp 1225 <func0+0x5c> mov -0x8(%rbp),%eax cltq lea 0x0(,%...
func0: 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_28], rcx mov [rbp+var_2C], r8d cmp [rbp+var_20], 0 jnz short loc_123F mov [rbp+var_8], 0 jmp short loc_1228 loc_11F6: mov eax, [rbp+var_8] c...
int func0(long long a1, int a2, int a3, long long a4, int a5) { int result; // eax int j; // [rsp+28h] [rbp-8h] int i; // [rsp+2Ch] [rbp-4h] if ( a3 ) { for ( i = 0; ; ++i ) { result = i; if ( i >= a2 ) break; if ( !a5 || strcmp(*(const char **)(8LL * i + a1), *(const char ...
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 qword ptr [RBP + -0x28],RCX MOV dword ptr [RBP + -0x2c],R8D CMP dword ptr [RBP + -0x20],0x0 JNZ 0x0010123f MOV dword ptr [RBP + -0x8],0x0 JMP 0x00101228 LAB_001011f6: MOV ...
void func0(long param_1,int param_2,int param_3,long param_4,int param_5) { int iVar1; int local_10; int local_c; if (param_3 == 0) { for (local_10 = 0; local_10 < param_5; local_10 = local_10 + 1) { printf("%s ",*(int8 *)(param_4 + (long)local_10 * 8)); } putchar(10); } else { for...
4,913
func0
#include <stdio.h> #include <string.h> #include <assert.h>
void func0(char *l[], int arr_size, int len, char *result[], int res_len){ if (len == 0){ for (int i = 0; i < res_len; i++) { printf("%s ", result[i]); } printf("\n"); return; } for (int i = 0; i < arr_size; i++){ if (res_len == 0 || strcmp(l[i]...
int main() { char *colors[] = {"Red", "Green", "Blue"}; int colors_size = 3; char *result1[1]; char *result2[2]; char *result3[3]; printf("Combination with 1 color:\n"); func0(colors, colors_size, 1, result1, 0); printf("Combination with 2 colors:\n"); func0(colors, colo...
O1
c
func0: endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x28,%rsp mov %rdi,(%rsp) mov %rcx,%r12 mov %r8d,%ebp test %edx,%edx je 1226 <func0+0x5d> mov %esi,%r13d mov %edx,%r14d test %esi,%esi jle 1266 <func0+0x9d> movslq %r8d,%rax shl $0x3,%rax lea -...
func0: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 28h mov [rsp+58h+var_50], rdi mov [rsp+58h+var_58], rcx mov ebp, r8d test edx, edx jz short loc_1229 mov r12d, esi mov r13d, edx test esi, esi jle short loc_126D movsxd rax, r8d shl ...
void func0(_QWORD *a1, int a2, int a3, _QWORD *a4, int a5) { long long v7; // rax _QWORD *v8; // r15 _QWORD *v9; // rbx _QWORD *v10; // rbx long long v11; // r12 _QWORD *v13; // [rsp+10h] [rbp-48h] unsigned int v14; // [rsp+1Ch] [rbp-3Ch] if ( a3 ) { if ( a2 > 0 ) { v7 = a5; v8 =...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x28 MOV qword ptr [RSP + 0x8],RDI MOV qword ptr [RSP],RCX MOV EBP,R8D TEST EDX,EDX JZ 0x00101229 MOV R12D,ESI MOV R13D,EDX TEST ESI,ESI JLE 0x0010126d MOVSXD RAX,R8D SHL RAX,0x3 MOV RCX,qword ptr [RSP] LEA R15,[RCX + RAX*0x1 + -0x8] ADD RAX,R...
void func0(int8 *param_1,int param_2,int param_3,int8 *param_4,int param_5) { int iVar1; int8 *puVar2; if (param_3 == 0) { if (0 < param_5) { puVar2 = param_4 + (ulong)(param_5 - 1) + 1; do { __printf_chk(1,&DAT_00102004,*param_4); param_4 = param_4 + 1; } while (param_4 ...
4,914
func0
#include <stdio.h> #include <string.h> #include <assert.h>
void func0(char *l[], int arr_size, int len, char *result[], int res_len){ if (len == 0){ for (int i = 0; i < res_len; i++) { printf("%s ", result[i]); } printf("\n"); return; } for (int i = 0; i < arr_size; i++){ if (res_len == 0 || strcmp(l[i]...
int main() { char *colors[] = {"Red", "Green", "Blue"}; int colors_size = 3; char *result1[1]; char *result2[2]; char *result3[3]; printf("Combination with 1 color:\n"); func0(colors, colors_size, 1, result1, 0); printf("Combination with 2 colors:\n"); func0(colors, colo...
O2
c
func0: endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp mov %r8d,%ebp push %rbx mov %rcx,%rbx sub $0x38,%rsp test %edx,%edx je 1370 <func0+0xc0> mov %esi,%r12d test %esi,%esi jle 1361 <func0+0xb1> movslq %r8d,%rax mov %rdi,%r13 mov %edx,%r14d mov %rdi,%r15 shl $0x...
func0: endbr64 test edx, edx jz short loc_12B0 jmp short func0_part_0 loc_12B0: test r8d, r8d jle short loc_1300 lea eax, [r8-1] push r12 lea r12, [rcx+rax*8+8] push rbp lea rbp, unk_2004 push rbx mov rbx, rcx nop dword ptr [rax+00h] loc_12D0: mov rdx, [rbx] mov r...
long long func0(long long a1, long long a2, int a3, long long *a4, int a5) { long long v6; // r12 long long *v7; // rbx long long v8; // rdx if ( a3 ) return func0_part_0(); if ( a5 > 0 ) { v6 = (long long)&a4[(unsigned int)(a5 - 1) + 1]; v7 = a4; do { v8 = *v7++; __printf_...
func0: ENDBR64 TEST EDX,EDX JZ 0x001012b0 JMP 0x00101310 LAB_001012b0: TEST R8D,R8D JLE 0x00101300 LEA EAX,[R8 + -0x1] PUSH R12 LEA R12,[RCX + RAX*0x8 + 0x8] PUSH RBP LEA RBP,[0x102004] PUSH RBX MOV RBX,RCX NOP dword ptr [RAX] LAB_001012d0: MOV RDX,qword ptr [RBX] MOV RSI,RBP MOV EDI,0x1 XOR EAX,EAX ADD RBX,0x8 CALL 0x...
void func0(int8 param_1,int8 param_2,int param_3,int8 *param_4,int param_5) { int8 *puVar1; int8 uVar2; if (param_3 != 0) { func0_part_0(); return; } if (0 < param_5) { puVar1 = param_4 + (ulong)(param_5 - 1) + 1; do { uVar2 = *param_4; param_4 = param_4 + 1; __printf_chk...
4,915
func0
#include <stdio.h> #include <string.h> #include <assert.h>
void func0(char *l[], int arr_size, int len, char *result[], int res_len){ if (len == 0){ for (int i = 0; i < res_len; i++) { printf("%s ", result[i]); } printf("\n"); return; } for (int i = 0; i < arr_size; i++){ if (res_len == 0 || strcmp(l[i]...
int main() { char *colors[] = {"Red", "Green", "Blue"}; int colors_size = 3; char *result1[1]; char *result2[2]; char *result3[3]; printf("Combination with 1 color:\n"); func0(colors, colors_size, 1, result1, 0); printf("Combination with 2 colors:\n"); func0(colors, colo...
O3
c
func0: endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx mov %rcx,%rbx sub $0x28,%rsp test %edx,%edx je 1490 <func0+0xc0> mov %esi,%r12d test %esi,%esi jle 1479 <func0+0xa9> movslq %r8d,%r15 mov %rdi,%r13 mov %edx,%r14d mov %rdi,%rbp shl $0x3,%r15 lea -0x...
func0_constprop_0: push r15 push r14 push r13 push r12 push rbp push rbx mov rbx, rdx sub rsp, 28h test esi, esi jz loc_1388 movsxd rax, ecx mov rbp, rdi mov r12d, esi shl rax, 3 lea rdi, [rdx+rax] mov [rsp+58h+var_50], rdi test ecx, ecx jz short loc_1340 l...
int func0_constprop_0(const char **a1, int a2, long long *a3, int a4) { long long *v4; // rbx long long v5; // rax const char **v6; // r15 const char **v7; // r14 const char *v8; // r13 int result; // eax const char **v10; // r14 const char *v11; // rax long long *v12; // r12 long long v13; // rdx ...
func0.constprop.0: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX MOV RBX,RDX SUB RSP,0x28 TEST ESI,ESI JZ 0x00101388 MOVSXD RAX,ECX MOV RBP,RDI MOV R12D,ESI SHL RAX,0x3 LEA RDI,[RDX + RAX*0x1] MOV qword ptr [RSP + 0x8],RDI TEST ECX,ECX JZ 0x00101340 LEA R15,[RDX + RAX*0x1 + -0x8] LEA RAX,[RBP + 0x18] MOV R14,RB...
void func0_constprop_0(int8 *param_1,int param_2,int8 *param_3,int param_4) { char *__s1; int8 uVar1; int iVar2; int8 *puVar3; if (param_2 == 0) { if (0 < param_4) { puVar3 = param_3 + param_4; do { uVar1 = *param_3; param_3 = param_3 + 1; __printf_chk(2,&DAT_001020...
4,916
func0
#include <assert.h>
int func0(int n) { int ctr = 0; for (int num = 0; num < n; num++) { if (num <= 1) { continue; } int isPrime = 1; for (int i = 2; i < num; i++) { if (num % i == 0) { isPrime = 0; break; } } ...
int main() { assert(func0(5) == 2); assert(func0(10) == 4); assert(func0(100) == 25); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x14(%rbp) movl $0x0,-0x10(%rbp) movl $0x0,-0xc(%rbp) jmp 11ad <func0+0x64> cmpl $0x1,-0xc(%rbp) jle 11a8 <func0+0x5f> movl $0x1,-0x8(%rbp) movl $0x2,-0x4(%rbp) jmp 1194 <func0+0x4b> mov -0xc(%rbp),%eax cltd idivl -0x4(%rbp) mov %edx,%ea...
func0: endbr64 push rbp mov rbp, rsp mov [rbp+var_14], edi mov [rbp+var_10], 0 mov [rbp+var_C], 0 jmp short loc_11AD loc_1164: cmp [rbp+var_C], 1 jle short loc_11A8 mov [rbp+var_8], 1 mov [rbp+var_4], 2 jmp short loc_1194 loc_117A: mov eax, [rbp+var_C] cdq idiv [rbp+var...
long long func0(int a1) { unsigned int v2; // [rsp+4h] [rbp-10h] int i; // [rsp+8h] [rbp-Ch] int v4; // [rsp+Ch] [rbp-8h] int j; // [rsp+10h] [rbp-4h] v2 = 0; for ( i = 0; i < a1; ++i ) { if ( i > 1 ) { v4 = 1; for ( j = 2; j < i; ++j ) { if ( !(i % j) ) { ...
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x14],EDI MOV dword ptr [RBP + -0x10],0x0 MOV dword ptr [RBP + -0xc],0x0 JMP 0x001011ad LAB_00101164: CMP dword ptr [RBP + -0xc],0x1 JLE 0x001011a8 MOV dword ptr [RBP + -0x8],0x1 MOV dword ptr [RBP + -0x4],0x2 JMP 0x00101194 LAB_0010117a: MOV EAX,dword ptr [RBP ...
int func0(int param_1) { bool bVar1; int4 local_18; int4 local_14; int4 local_c; local_18 = 0; local_14 = 0; do { if (param_1 <= local_14) { return local_18; } if (1 < local_14) { bVar1 = true; for (local_c = 2; local_c < local_14; local_c = local_c + 1) { if (loc...
4,917
func0
#include <assert.h>
int func0(int n) { int ctr = 0; for (int num = 0; num < n; num++) { if (num <= 1) { continue; } int isPrime = 1; for (int i = 2; i < num; i++) { if (num % i == 0) { isPrime = 0; break; } } ...
int main() { assert(func0(5) == 2); assert(func0(10) == 4); assert(func0(100) == 25); return 0; }
O1
c
func0: endbr64 mov $0x0,%r8d mov $0x0,%r9d test %edi,%edi jg 1168 <func0+0x1f> mov %r9d,%eax retq add $0x1,%r9d mov %esi,%r8d lea 0x1(%r8),%esi cmp %esi,%edi je 115d <func0+0x14> cmp $0x1,%esi jle 1165 <func0+0x1c> cmp $0x2,%esi jle 1161 <func0+0x18> test $0x1,%sil je 11...
func0: endbr64 mov r8d, 0 mov r9d, 0 test edi, edi jg short loc_1168 loc_115D: mov eax, r9d retn loc_1161: add r9d, 1 loc_1165: mov r8d, esi loc_1168: lea esi, [r8+1] cmp edi, esi jz short loc_115D cmp esi, 1 jle short loc_1165 cmp esi, 2 jle short loc_1161 test ...
long long func0(int a1) { int v1; // r8d unsigned int v2; // r9d int v4; // esi int v5; // ecx int v6; // eax v1 = 0; v2 = 0; if ( a1 > 0 ) { while ( 1 ) { v4 = v1 + 1; if ( a1 == v1 + 1 ) return v2; if ( v4 > 1 ) { if ( v4 <= 2 ) goto LABEL_...
func0: ENDBR64 MOV R8D,0x0 MOV R9D,0x0 TEST EDI,EDI JG 0x00101168 LAB_0010115d: MOV EAX,R9D RET LAB_00101161: ADD R9D,0x1 LAB_00101165: MOV R8D,ESI LAB_00101168: LEA ESI,[R8 + 0x1] CMP EDI,ESI JZ 0x0010115d CMP ESI,0x1 JLE 0x00101165 CMP ESI,0x2 JLE 0x00101161 TEST SIL,0x1 JZ 0x00101165 MOV ECX,0x2 LAB_00101185: MOV EA...
int func0(uint param_1) { uint uVar1; uint uVar2; uint uVar3; uint uVar4; int iVar5; iVar5 = 0; uVar3 = 0; if (0 < (int)param_1) { while (uVar4 = uVar3, uVar3 = uVar4 + 1, param_1 != uVar3) { if (1 < (int)uVar3) { if ((int)uVar3 < 3) { LAB_00101161: iVar5 = iVar5 + 1; ...
4,918
func0
#include <assert.h>
int func0(int n) { int ctr = 0; for (int num = 0; num < n; num++) { if (num <= 1) { continue; } int isPrime = 1; for (int i = 2; i < num; i++) { if (num % i == 0) { isPrime = 0; break; } } ...
int main() { assert(func0(5) == 2); assert(func0(10) == 4); assert(func0(100) == 25); return 0; }
O2
c
func0: endbr64 xor %r8d,%r8d xor %r9d,%r9d test %edi,%edi jle 12a2 <func0+0x62> lea 0x1(%r8),%esi cmp %esi,%edi je 12a2 <func0+0x62> nopw %cs:0x0(%rax,%rax,1) cmp $0x1,%esi jle 1297 <func0+0x57> cmp $0x2,%esi je 1293 <func0+0x53> test $0x1,%sil je 1297 <func0+0x57> mov $0x2,...
func0: endbr64 xor r8d, r8d xor r9d, r9d test edi, edi jle short loc_1252 lea esi, [r8+1] cmp edi, esi jz short loc_1252 nop word ptr [rax+rax+00000000h] loc_1210: cmp esi, 1 jle short loc_1247 cmp esi, 2 jz short loc_1243 test sil, 1 jz short loc_1247 mov ec...
long long func0(int a1) { int v1; // r8d unsigned int v2; // r9d int v3; // esi int v4; // ecx int v5; // eax v1 = 0; v2 = 0; if ( a1 > 0 ) { v3 = 1; if ( a1 != 1 ) { while ( 1 ) { if ( v3 > 1 ) { if ( v3 == 2 ) goto LABEL_9; if...
func0: ENDBR64 XOR R8D,R8D XOR R9D,R9D TEST EDI,EDI JLE 0x00101252 LEA ESI,[R8 + 0x1] CMP EDI,ESI JZ 0x00101252 NOP word ptr CS:[RAX + RAX*0x1] LAB_00101210: CMP ESI,0x1 JLE 0x00101247 CMP ESI,0x2 JZ 0x00101243 TEST SIL,0x1 JZ 0x00101247 MOV ECX,0x2 JMP 0x00101239 LAB_00101230: MOV EAX,ESI CDQ IDIV ECX TEST EDX,EDX JZ ...
int func0(uint param_1) { uint uVar1; uint uVar2; uint uVar3; uint uVar4; int iVar5; int iVar6; uVar4 = 0; iVar5 = 0; iVar6 = iVar5; if ((0 < (int)param_1) && (uVar1 = 1, iVar6 = 0, param_1 != 1)) { do { uVar3 = uVar1; if (1 < (int)uVar3) { if (uVar3 == 2) { LAB_00101243:...
4,919
func0
#include <assert.h>
int func0(int n) { int ctr = 0; for (int num = 0; num < n; num++) { if (num <= 1) { continue; } int isPrime = 1; for (int i = 2; i < num; i++) { if (num % i == 0) { isPrime = 0; break; } } ...
int main() { assert(func0(5) == 2); assert(func0(10) == 4); assert(func0(100) == 25); return 0; }
O3
c
func0: endbr64 test %edi,%edi jle 12ee <func0+0x5e> mov $0x1,%esi xor %r8d,%r8d xor %r9d,%r9d cmp $0x1,%edi je 12ea <func0+0x5a> add $0x1,%esi add $0x1,%r8d cmp %esi,%edi je 12ea <func0+0x5a> cmp $0x2,%esi je 12db <func0+0x4b> test $0x1,%sil je 12a8 <func0+0x18> mov $0x...
func0: endbr64 test edi, edi jle short loc_1337 xor esi, esi cmp edi, 1 setnle sil xor r8d, r8d add esi, 1 cmp edi, esi jle short loc_1333 nop dword ptr [rax+rax+00h] loc_1300: cmp esi, 2 jle short loc_1328 test sil, 1 jz short loc_132C mov ecx, 2 jmp short lo...
long long func0(int a1) { unsigned int v1; // r8d int v2; // esi int v3; // ecx if ( a1 <= 0 ) return 0LL; v1 = 0; v2 = (a1 > 1) + 1; if ( a1 > v2 ) { while ( 1 ) { if ( v2 <= 2 ) goto LABEL_8; if ( (v2 & 1) != 0 ) break; LABEL_9: if ( a1 == ++v2 ) ...
func0: ENDBR64 TEST EDI,EDI JLE 0x00101337 XOR ESI,ESI CMP EDI,0x1 SETG SIL XOR R8D,R8D ADD ESI,0x1 CMP EDI,ESI JLE 0x00101333 NOP dword ptr [RAX + RAX*0x1] LAB_00101300: CMP ESI,0x2 JLE 0x00101328 TEST SIL,0x1 JZ 0x0010132c MOV ECX,0x2 JMP 0x00101321 LAB_00101318: MOV EAX,ESI CDQ IDIV ECX TEST EDX,EDX JZ 0x0010132c LA...
int func0(uint param_1) { uint uVar1; uint uVar2; int iVar3; if ((int)param_1 < 1) { return 0; } iVar3 = 0; uVar2 = (1 < (int)param_1) + 1; if ((int)uVar2 < (int)param_1) { do { if ((int)uVar2 < 3) { LAB_00101328: iVar3 = iVar3 + 1; } else if ((uVar2 & 1) != 0) { ...
4,920
func0
#include <assert.h>
void func0(int *a, int *b) { int temp = *a; *a = *b; *b = temp; }
int main() { int a = 10, b = 20; func0(&a, &b); assert(a == 20 && b == 10); a = 15, b = 17; func0(&a, &b); assert(a == 17 && b == 15); a = 100, b = 200; func0(&a, &b); assert(a == 200 && b == 100); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %rdi,-0x18(%rbp) mov %rsi,-0x20(%rbp) mov -0x18(%rbp),%rax mov (%rax),%eax mov %eax,-0x4(%rbp) mov -0x20(%rbp),%rax mov (%rax),%edx mov -0x18(%rbp),%rax mov %edx,(%rax) mov -0x20(%rbp),%rax mov -0x4(%rbp),%edx mov %edx,(%rax) pop %rb...
func0: endbr64 push rbp mov rbp, rsp mov [rbp+var_18], rdi mov [rbp+var_20], rsi mov rax, [rbp+var_18] mov eax, [rax] mov [rbp+var_4], eax mov rax, [rbp+var_20] mov edx, [rax] mov rax, [rbp+var_18] mov [rax], edx mov rax, [rbp+var_20] mov edx, [rbp+var_4] mov [rax]...
int * func0(int *a1, int *a2) { int *result; // rax int v3; // [rsp+1Ch] [rbp-4h] v3 = *a1; *a1 = *a2; result = a2; *a2 = v3; return result; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x18],RDI MOV qword ptr [RBP + -0x20],RSI MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x4],EAX MOV RAX,qword ptr [RBP + -0x20] MOV EDX,dword ptr [RAX] MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX],EDX MOV RAX,qword ptr [RB...
void func0(int4 *param_1,int4 *param_2) { int4 uVar1; uVar1 = *param_1; *param_1 = *param_2; *param_2 = uVar1; return; }
4,921
func0
#include <assert.h>
void func0(int *a, int *b) { int temp = *a; *a = *b; *b = temp; }
int main() { int a = 10, b = 20; func0(&a, &b); assert(a == 20 && b == 10); a = 15, b = 17; func0(&a, &b); assert(a == 17 && b == 15); a = 100, b = 200; func0(&a, &b); assert(a == 200 && b == 100); return 0; }
O1
c
func0: endbr64 mov (%rdi),%eax mov (%rsi),%edx mov %edx,(%rdi) mov %eax,(%rsi) retq
func0: endbr64 mov eax, [rdi] mov edx, [rsi] mov [rdi], edx mov [rsi], eax retn
long long func0(_DWORD *a1, _DWORD *a2) { long long result; // rax result = (unsigned int)*a1; *a1 = *a2; *a2 = result; return result; }
func0: ENDBR64 MOV EAX,dword ptr [RDI] MOV EDX,dword ptr [RSI] MOV dword ptr [RDI],EDX MOV dword ptr [RSI],EAX RET
void func0(int4 *param_1,int4 *param_2) { int4 uVar1; uVar1 = *param_1; *param_1 = *param_2; *param_2 = uVar1; return; }
4,922
func0
#include <assert.h>
void func0(int *a, int *b) { int temp = *a; *a = *b; *b = temp; }
int main() { int a = 10, b = 20; func0(&a, &b); assert(a == 20 && b == 10); a = 15, b = 17; func0(&a, &b); assert(a == 17 && b == 15); a = 100, b = 200; func0(&a, &b); assert(a == 200 && b == 100); return 0; }
O2
c
func0: endbr64 mov (%rdi),%eax mov (%rsi),%edx mov %edx,(%rdi) mov %eax,(%rsi) retq nopl (%rax)
func0: endbr64 mov eax, [rdi] mov edx, [rsi] mov [rdi], edx mov [rsi], eax retn
long long func0(_DWORD *a1, _DWORD *a2) { long long result; // rax result = (unsigned int)*a1; *a1 = *a2; *a2 = result; return result; }
func0: ENDBR64 MOV EAX,dword ptr [RDI] MOV EDX,dword ptr [RSI] MOV dword ptr [RDI],EDX MOV dword ptr [RSI],EAX RET
void func0(int4 *param_1,int4 *param_2) { int4 uVar1; uVar1 = *param_1; *param_1 = *param_2; *param_2 = uVar1; return; }
4,923
func0
#include <assert.h>
void func0(int *a, int *b) { int temp = *a; *a = *b; *b = temp; }
int main() { int a = 10, b = 20; func0(&a, &b); assert(a == 20 && b == 10); a = 15, b = 17; func0(&a, &b); assert(a == 17 && b == 15); a = 100, b = 200; func0(&a, &b); assert(a == 200 && b == 100); return 0; }
O3
c
func0: endbr64 mov (%rdi),%eax mov (%rsi),%edx mov %edx,(%rdi) mov %eax,(%rsi) retq nopl (%rax)
func0: endbr64 mov eax, [rdi] mov edx, [rsi] mov [rdi], edx mov [rsi], eax retn
long long func0(_DWORD *a1, _DWORD *a2) { long long result; // rax result = (unsigned int)*a1; *a1 = *a2; *a2 = result; return result; }
func0: ENDBR64 MOV EAX,dword ptr [RDI] MOV EDX,dword ptr [RSI] MOV dword ptr [RDI],EDX MOV dword ptr [RSI],EAX RET
void func0(int4 *param_1,int4 *param_2) { int4 uVar1; uVar1 = *param_1; *param_1 = *param_2; *param_2 = uVar1; return; }
4,924
func0
#include <assert.h>
int func0(int array_nums[], int n) { int count_odd = 0; for (int i = 0; i < n; i++) { if (array_nums[i] % 2 != 0) { count_odd++; } } return count_odd; }
int main() { int array1[] = {1, 2, 3, 5, 7, 8, 10}; int array2[] = {10, 15, 14, 13, -18, 12, -20}; int array3[] = {1, 2, 4, 8, 9}; assert(func0(array1, 7) == 4); assert(func0(array2, 7) == 2); assert(func0(array3, 5) == 2); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %rdi,-0x18(%rbp) mov %esi,-0x1c(%rbp) movl $0x0,-0x8(%rbp) movl $0x0,-0x4(%rbp) jmp 11ad <func0+0x44> mov -0x4(%rbp),%eax cltq lea 0x0(,%rax,4),%rdx mov -0x18(%rbp),%rax add %rdx,%rax mov (%rax),%eax and $0x1,%eax test %eax,%eax je 11a...
func0: endbr64 push rbp mov rbp, rsp mov [rbp+var_18], rdi mov [rbp+var_1C], esi mov [rbp+var_8], 0 mov [rbp+var_4], 0 jmp short loc_11AD loc_1188: mov eax, [rbp+var_4] cdqe lea rdx, ds:0[rax*4] mov rax, [rbp+var_18] add rax, rdx mov eax, [rax] and eax, 1 test eax, ...
long long func0(long long a1, int a2) { unsigned int v3; // [rsp+14h] [rbp-8h] int i; // [rsp+18h] [rbp-4h] v3 = 0; for ( i = 0; i < a2; ++i ) { if ( (*(_DWORD *)(4LL * i + a1) & 1) != 0 ) ++v3; } return v3; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x18],RDI MOV dword ptr [RBP + -0x1c],ESI MOV dword ptr [RBP + -0x8],0x0 MOV dword ptr [RBP + -0x4],0x0 JMP 0x001011ad LAB_00101188: MOV EAX,dword ptr [RBP + -0x4] CDQE LEA RDX,[RAX*0x4] MOV RAX,qword ptr [RBP + -0x18] ADD RAX,RDX MOV EAX,dword ptr [RAX] AND EAX...
int func0(long param_1,int param_2) { int4 local_10; int4 local_c; local_10 = 0; for (local_c = 0; local_c < param_2; local_c = local_c + 1) { if ((*(uint *)(param_1 + (long)local_c * 4) & 1) != 0) { local_10 = local_10 + 1; } } return local_10; }
4,925
func0
#include <assert.h>
int func0(int array_nums[], int n) { int count_odd = 0; for (int i = 0; i < n; i++) { if (array_nums[i] % 2 != 0) { count_odd++; } } return count_odd; }
int main() { int array1[] = {1, 2, 3, 5, 7, 8, 10}; int array2[] = {10, 15, 14, 13, -18, 12, -20}; int array3[] = {1, 2, 4, 8, 9}; assert(func0(array1, 7) == 4); assert(func0(array2, 7) == 2); assert(func0(array3, 5) == 2); return 0; }
O1
c
func0: endbr64 test %esi,%esi jle 1198 <func0+0x2f> mov %rdi,%rax lea -0x1(%rsi),%edx lea 0x4(%rdi,%rdx,4),%rsi mov $0x0,%ecx mov (%rax),%edx and $0x1,%edx cmp $0x1,%edx sbb $0xffffffff,%ecx add $0x4,%rax cmp %rsi,%rax jne 1181 <func0+0x18> mov %ecx,%eax retq mov $0x0,%ecx jm...
func0: endbr64 test esi, esi jle short loc_1198 mov rax, rdi lea edx, [rsi-1] lea rsi, [rdi+rdx*4+4] mov ecx, 0 loc_1181: mov edx, [rax] and edx, 1 cmp edx, 1 sbb ecx, 0FFFFFFFFh add rax, 4 cmp rax, rsi jnz short loc_1181 loc_1195: mov eax, ecx retn loc_1198: mov ...
long long func0(_DWORD *a1, int a2) { _DWORD *v2; // rax long long v3; // rsi unsigned int v4; // ecx if ( a2 <= 0 ) { return 0; } else { v2 = a1; v3 = (long long)&a1[a2 - 1 + 1]; v4 = 0; do v4 -= ((*v2++ & 1) == 0) - 1; while ( v2 != (_DWORD *)v3 ); } return v4; }
func0: ENDBR64 TEST ESI,ESI JLE 0x00101198 MOV RAX,RDI LEA EDX,[RSI + -0x1] LEA RSI,[RDI + RDX*0x4 + 0x4] MOV ECX,0x0 LAB_00101181: MOV EDX,dword ptr [RAX] AND EDX,0x1 CMP EDX,0x1 SBB ECX,-0x1 ADD RAX,0x4 CMP RAX,RSI JNZ 0x00101181 LAB_00101195: MOV EAX,ECX RET LAB_00101198: MOV ECX,0x0 JMP 0x00101195
int func0(uint *param_1,int param_2) { uint *puVar1; int iVar2; if (param_2 < 1) { iVar2 = 0; } else { puVar1 = param_1 + (ulong)(param_2 - 1) + 1; iVar2 = 0; do { iVar2 = (iVar2 + 1) - (uint)((*param_1 & 1) == 0); param_1 = param_1 + 1; } while (param_1 != puVar1); } r...
4,926
func0
#include <assert.h>
int func0(int array_nums[], int n) { int count_odd = 0; for (int i = 0; i < n; i++) { if (array_nums[i] % 2 != 0) { count_odd++; } } return count_odd; }
int main() { int array1[] = {1, 2, 3, 5, 7, 8, 10}; int array2[] = {10, 15, 14, 13, -18, 12, -20}; int array3[] = {1, 2, 4, 8, 9}; assert(func0(array1, 7) == 4); assert(func0(array2, 7) == 2); assert(func0(array3, 5) == 2); return 0; }
O2
c
func0: endbr64 test %esi,%esi jle 1358 <func0+0x38> lea -0x1(%rsi),%eax xor %r8d,%r8d lea 0x4(%rdi,%rax,4),%rdx nopl 0x0(%rax,%rax,1) mov (%rdi),%eax and $0x1,%eax cmp $0x1,%eax sbb $0xffffffff,%r8d add $0x4,%rdi cmp %rdx,%rdi jne 1338 <func0+0x18> mov %r8d,%eax retq nopl 0x0(%...
func0: endbr64 test esi, esi jle short loc_1358 lea eax, [rsi-1] xor r8d, r8d lea rdx, [rdi+rax*4+4] nop dword ptr [rax+rax+00h] loc_1338: mov eax, [rdi] and eax, 1 cmp eax, 1 sbb r8d, 0FFFFFFFFh add rdi, 4 cmp rdi, rdx jnz short loc_1338 mov eax, r8d retn loc_1358...
long long func0(_DWORD *a1, int a2) { unsigned int v2; // r8d long long v3; // rdx if ( a2 <= 0 ) return 0LL; v2 = 0; v3 = (long long)&a1[a2 - 1 + 1]; do v2 -= ((*a1++ & 1) == 0) - 1; while ( a1 != (_DWORD *)v3 ); return v2; }
func0: ENDBR64 TEST ESI,ESI JLE 0x00101358 LEA EAX,[RSI + -0x1] XOR R8D,R8D LEA RDX,[RDI + RAX*0x4 + 0x4] NOP dword ptr [RAX + RAX*0x1] LAB_00101338: MOV EAX,dword ptr [RDI] AND EAX,0x1 CMP EAX,0x1 SBB R8D,-0x1 ADD RDI,0x4 CMP RDI,RDX JNZ 0x00101338 MOV EAX,R8D RET LAB_00101358: XOR R8D,R8D MOV EAX,R8D RET
int func0(uint *param_1,int param_2) { uint *puVar1; int iVar2; if (0 < param_2) { iVar2 = 0; puVar1 = param_1 + (ulong)(param_2 - 1) + 1; do { iVar2 = (iVar2 + 1) - (uint)((*param_1 & 1) == 0); param_1 = param_1 + 1; } while (param_1 != puVar1); return iVar2; } return 0; }
4,927
func0
#include <assert.h>
int func0(int array_nums[], int n) { int count_odd = 0; for (int i = 0; i < n; i++) { if (array_nums[i] % 2 != 0) { count_odd++; } } return count_odd; }
int main() { int array1[] = {1, 2, 3, 5, 7, 8, 10}; int array2[] = {10, 15, 14, 13, -18, 12, -20}; int array3[] = {1, 2, 4, 8, 9}; assert(func0(array1, 7) == 4); assert(func0(array2, 7) == 2); assert(func0(array3, 5) == 2); return 0; }
O3
c
func0: endbr64 test %esi,%esi jle 1320 <func0+0xe0> lea -0x1(%rsi),%eax cmp $0x3,%eax jbe 1329 <func0+0xe9> mov %esi,%edx pxor %xmm1,%xmm1 pcmpeqd %xmm2,%xmm2 mov %rdi,%rax shr $0x2,%edx movdqa 0xdf0(%rip),%xmm4 movdqa %xmm1,%xmm3 shl $0x4,%rdx add %rdi,%rdx nopl 0x0(%rax,%rax,1) movdqu...
func0: endbr64 mov ecx, esi test esi, esi jle loc_1210 lea eax, [rsi-1] cmp eax, 2 jbe loc_1219 mov edx, esi pxor xmm1, xmm1 movdqa xmm3, cs:xmmword_2010 mov rax, rdi shr edx, 2 movdqa xmm2, xmm1 shl rdx, 4 add rdx, rdi nop dword ptr [rax+00000000h] loc_1180: movdqu ...
long long func0(const __m128i *a1, int a2) { __m128i v2; // xmm1 __m128i si128; // xmm3 const __m128i *v4; // rax __m128i v5; // xmm0 signed int v6; // edx __m128i v7; // xmm1 long long result; // rax long long v9; // r8 if ( a2 <= 0 ) return 0LL; if ( (unsigned int)(a2 - 1) <= 2 ) { v6 ...
func0: ENDBR64 MOV ECX,ESI TEST ESI,ESI JLE 0x00101210 LEA EAX,[RSI + -0x1] CMP EAX,0x2 JBE 0x00101219 MOV EDX,ESI PXOR XMM1,XMM1 MOVDQA XMM3,xmmword ptr [0x00102010] MOV RAX,RDI SHR EDX,0x2 MOVDQA XMM2,XMM1 SHL RDX,0x4 ADD RDX,RDI NOP dword ptr [RAX] LAB_00101180: MOVDQU XMM0,xmmword ptr [RAX] ADD RAX,0x10 PAND XMM0,X...
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ int func0(uint *param_1,uint param_2) { uint *puVar1; uint *puVar2; uint *puVar3; uint *puVar4; uint uVar5; int iVar6; int iVar7; int iVar8; int iVar9; if ((int)param_2 < 1) { iVar6 = 0; } else { if...
4,928
func0
#include <assert.h>
void func0(int test_tup1[][2], int test_tup2[][2], int rows, int res[][2]) { for (int i = 0; i < rows; i++) { for (int j = 0; j < 2; j++) { res[i][j] = (test_tup1[i][j] > test_tup2[i][j]) ? test_tup1[i][j] : test_tup2[i][j]; } } }
int main() { int test_tup1[4][2] = {{1, 3}, {4, 5}, {2, 9}, {1, 10}}; int test_tup2[4][2] = {{6, 7}, {3, 9}, {1, 1}, {7, 3}}; int result[4][2]; int expected[4][2] = {{6, 7}, {4, 9}, {2, 9}, {7, 10}}; func0(test_tup1, test_tup2, 4, result); for (int i = 0; i < 4; i++) { assert(resu...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %rdi,-0x18(%rbp) mov %rsi,-0x20(%rbp) mov %edx,-0x24(%rbp) mov %rcx,-0x30(%rbp) movl $0x0,-0x8(%rbp) jmp 11fa <func0+0x91> movl $0x0,-0x4(%rbp) jmp 11f0 <func0+0x87> mov -0x8(%rbp),%eax cltq lea 0x0(,%rax,8),%rdx mov -0x20(%rbp),%rax add ...
func0: endbr64 push rbp mov rbp, rsp mov [rbp+var_18], rdi mov [rbp+var_20], rsi mov [rbp+var_24], edx mov [rbp+var_30], rcx mov [rbp+var_8], 0 jmp short loc_11FA loc_1189: mov [rbp+var_4], 0 jmp short loc_11F0 loc_1192: mov eax, [rbp+var_8] cdqe lea rdx, ds:0[rax*8] mov ...
long long func0(long long a1, long long a2, int a3, long long a4) { int v4; // edx long long result; // rax unsigned int i; // [rsp+28h] [rbp-8h] int j; // [rsp+2Ch] [rbp-4h] for ( i = 0; ; ++i ) { result = i; if ( (int)i >= a3 ) break; for ( j = 0; j <= 1; ++j ) { v4 = *(_DWOR...
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x18],RDI MOV qword ptr [RBP + -0x20],RSI MOV dword ptr [RBP + -0x24],EDX MOV qword ptr [RBP + -0x30],RCX MOV dword ptr [RBP + -0x8],0x0 JMP 0x001011fa LAB_00101189: MOV dword ptr [RBP + -0x4],0x0 JMP 0x001011f0 LAB_00101192: MOV EAX,dword ptr [RBP + -0x8] CDQE ...
void func0(long param_1,long param_2,int param_3,long param_4) { int iVar1; int iVar2; int4 local_10; int4 local_c; for (local_10 = 0; local_10 < param_3; local_10 = local_10 + 1) { for (local_c = 0; local_c < 2; local_c = local_c + 1) { iVar1 = *(int *)((long)local_10 * 8 + param_2 + (long)loca...
4,929
func0
#include <assert.h>
void func0(int test_tup1[][2], int test_tup2[][2], int rows, int res[][2]) { for (int i = 0; i < rows; i++) { for (int j = 0; j < 2; j++) { res[i][j] = (test_tup1[i][j] > test_tup2[i][j]) ? test_tup1[i][j] : test_tup2[i][j]; } } }
int main() { int test_tup1[4][2] = {{1, 3}, {4, 5}, {2, 9}, {1, 10}}; int test_tup2[4][2] = {{6, 7}, {3, 9}, {1, 1}, {7, 3}}; int result[4][2]; int expected[4][2] = {{6, 7}, {4, 9}, {2, 9}, {7, 10}}; func0(test_tup1, test_tup2, 4, result); for (int i = 0; i < 4; i++) { assert(resu...
O1
c
func0: endbr64 test %edx,%edx jle 11a4 <func0+0x3b> lea -0x1(%rdx),%r8d mov $0x0,%eax mov (%rdi,%rax,8),%edx cmp %edx,(%rsi,%rax,8) cmovge (%rsi,%rax,8),%edx mov %edx,(%rcx,%rax,8) mov 0x4(%rdi,%rax,8),%edx cmp %edx,0x4(%rsi,%rax,8) cmovge 0x4(%rsi,%rax,8),%edx mov %edx,0x4(%rcx,%rax,8) mov...
func0: endbr64 mov r8, rsi test edx, edx jle short locret_11A6 mov r9d, edx mov eax, 0 loc_117C: mov edx, [r8+rax*8] mov esi, [rdi+rax*8] cmp edx, esi cmovl edx, esi mov [rcx+rax*8], edx mov edx, [r8+rax*8+4] mov esi, [rdi+rax*8+4] cmp edx, esi cmovl edx, esi mov [...
void func0(long long a1, long long a2, int a3, long long a4) { long long v4; // r9 long long i; // rax int v6; // edx int v7; // edx if ( a3 > 0 ) { v4 = (unsigned int)a3; for ( i = 0LL; i != v4; ++i ) { v6 = *(_DWORD *)(a2 + 8 * i); if ( v6 < *(_DWORD *)(a1 + 8 * i) ) v6 =...
func0: ENDBR64 MOV R8,RSI TEST EDX,EDX JLE 0x001011a6 MOV R9D,EDX MOV EAX,0x0 LAB_0010117c: MOV EDX,dword ptr [R8 + RAX*0x8] MOV ESI,dword ptr [RDI + RAX*0x8] CMP EDX,ESI CMOVL EDX,ESI MOV dword ptr [RCX + RAX*0x8],EDX MOV EDX,dword ptr [R8 + RAX*0x8 + 0x4] MOV ESI,dword ptr [RDI + RAX*0x8 + 0x4] CMP EDX,ESI CMOVL EDX,...
void func0(long param_1,long param_2,uint param_3,long param_4) { int iVar1; ulong uVar2; int iVar3; if (0 < (int)param_3) { uVar2 = 0; do { iVar3 = *(int *)(param_2 + uVar2 * 8); iVar1 = *(int *)(param_1 + uVar2 * 8); if (iVar3 < iVar1) { iVar3 = iVar1; } *(int...
4,930
func0
#include <assert.h>
void func0(int test_tup1[][2], int test_tup2[][2], int rows, int res[][2]) { for (int i = 0; i < rows; i++) { for (int j = 0; j < 2; j++) { res[i][j] = (test_tup1[i][j] > test_tup2[i][j]) ? test_tup1[i][j] : test_tup2[i][j]; } } }
int main() { int test_tup1[4][2] = {{1, 3}, {4, 5}, {2, 9}, {1, 10}}; int test_tup2[4][2] = {{6, 7}, {3, 9}, {1, 1}, {7, 3}}; int result[4][2]; int expected[4][2] = {{6, 7}, {4, 9}, {2, 9}, {7, 10}}; func0(test_tup1, test_tup2, 4, result); for (int i = 0; i < 4; i++) { assert(resu...
O2
c
func0: endbr64 test %edx,%edx jle 156a <func0+0x3a> lea -0x1(%rdx),%r8d xor %eax,%eax xchg %ax,%ax mov (%rdi,%rax,8),%edx cmp %edx,(%rsi,%rax,8) cmovge (%rsi,%rax,8),%edx mov %edx,(%rcx,%rax,8) mov 0x4(%rdi,%rax,8),%edx cmp %edx,0x4(%rsi,%rax,8) cmovge 0x4(%rsi,%rax,8),%edx mov %edx,0x4(%...
func0: endbr64 mov r8, rsi test edx, edx jle short locret_153A movsxd r9, edx xor eax, eax loc_1510: mov esi, [rdi+rax*8] mov edx, [r8+rax*8] cmp edx, esi cmovl edx, esi mov [rcx+rax*8], edx mov edx, [r8+rax*8+4] mov esi, [rdi+rax*8+4] cmp edx, esi cmovl edx, esi mov ...
void func0(long long a1, long long a2, int a3, long long a4) { long long v4; // r9 long long i; // rax int v6; // edx int v7; // edx if ( a3 > 0 ) { v4 = a3; for ( i = 0LL; i != v4; ++i ) { v6 = *(_DWORD *)(a2 + 8 * i); if ( v6 < *(_DWORD *)(a1 + 8 * i) ) v6 = *(_DWORD *)(a...
func0: ENDBR64 MOV R8,RSI TEST EDX,EDX JLE 0x0010153a MOVSXD R9,EDX XOR EAX,EAX LAB_00101510: MOV ESI,dword ptr [RDI + RAX*0x8] MOV EDX,dword ptr [R8 + RAX*0x8] CMP EDX,ESI CMOVL EDX,ESI MOV dword ptr [RCX + RAX*0x8],EDX MOV EDX,dword ptr [R8 + RAX*0x8 + 0x4] MOV ESI,dword ptr [RDI + RAX*0x8 + 0x4] CMP EDX,ESI CMOVL ED...
void func0(long param_1,long param_2,int param_3,long param_4) { long lVar1; int iVar2; int iVar3; if (0 < param_3) { lVar1 = 0; do { iVar3 = *(int *)(param_1 + lVar1 * 8); iVar2 = *(int *)(param_2 + lVar1 * 8); if (iVar2 < iVar3) { iVar2 = iVar3; } *(int *)(par...
4,931
func0
#include <assert.h>
void func0(int test_tup1[][2], int test_tup2[][2], int rows, int res[][2]) { for (int i = 0; i < rows; i++) { for (int j = 0; j < 2; j++) { res[i][j] = (test_tup1[i][j] > test_tup2[i][j]) ? test_tup1[i][j] : test_tup2[i][j]; } } }
int main() { int test_tup1[4][2] = {{1, 3}, {4, 5}, {2, 9}, {1, 10}}; int test_tup2[4][2] = {{6, 7}, {3, 9}, {1, 1}, {7, 3}}; int result[4][2]; int expected[4][2] = {{6, 7}, {4, 9}, {2, 9}, {7, 10}}; func0(test_tup1, test_tup2, 4, result); for (int i = 0; i < 4; i++) { assert(resu...
O3
c
func0: endbr64 test %edx,%edx jle 1542 <func0+0xd2> lea 0xf(%rdi),%rax sub %rcx,%rax cmp $0x1e,%rax seta %r8b cmp $0x1,%edx setne %al test %al,%r8b je 150c <func0+0x9c> lea 0xf(%rsi),%rax sub %rcx,%rax cmp $0x1e,%rax jbe 150c <func0+0x9c> mov %edx,%eax xor %r8d,%r8d shr %e...
func0: endbr64 test edx, edx jle locret_121E cmp edx, 1 jz loc_11E0 lea rax, [rsi+0Fh] sub rax, rcx cmp rax, 1Eh jbe short loc_11E0 lea rax, [rdi+0Fh] sub rax, rcx cmp rax, 1Eh jbe short loc_11E0 mov r8d, edx xor eax, eax shr r8d, 1 shl r8, 4 nop dword...
void func0(long long a1, long long a2, int a3, long long a4) { long long v4; // rax __m128i v5; // xmm1 __m128i v6; // xmm2 __m128i v7; // xmm0 long long v8; // rax int *v9; // rsi int *v10; // rdi _DWORD *v11; // rax int v12; // edx int v13; // edx long long v14; // rax long long v15; // r9 ...
func0: ENDBR64 TEST EDX,EDX JLE 0x0010121e CMP EDX,0x1 JZ 0x001011e0 LEA RAX,[RSI + 0xf] SUB RAX,RCX CMP RAX,0x1e JBE 0x001011e0 LEA RAX,[RDI + 0xf] SUB RAX,RCX CMP RAX,0x1e JBE 0x001011e0 MOV R8D,EDX XOR EAX,EAX SHR R8D,0x1 SHL R8,0x4 NOP dword ptr [RAX + RAX*0x1] LAB_00101180: MOVDQU XMM1,xmmword ptr [RSI + RAX*0x1] ...
void func0(long param_1,long param_2,uint param_3,long param_4) { uint *puVar1; uint *puVar2; uint *puVar3; int iVar4; uint uVar5; uint uVar6; uint uVar7; uint uVar8; uint uVar9; uint uVar10; long lVar11; int iVar12; uint uVar13; uint uVar14; uint uVar15; uint uVar16; if (0 < (int)...
4,932
func0
#include <assert.h>
int func0(int n) { if (n == 0 || n == 1) { return 1; } return 2 * func0(n - 1) + func0(n - 2); }
int main() { assert(func0(3) == 7); assert(func0(4) == 17); assert(func0(5) == 41); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x18,%rsp mov %edi,-0x14(%rbp) cmpl $0x0,-0x14(%rbp) je 1165 <func0+0x1c> cmpl $0x1,-0x14(%rbp) jne 116c <func0+0x23> mov $0x1,%eax jmp 118b <func0+0x42> mov -0x14(%rbp),%eax sub $0x1,%eax mov %eax,%edi callq 1149 <func0> lea ...
func0: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 18h mov [rbp+var_14], edi cmp [rbp+var_14], 0 jz short loc_1165 cmp [rbp+var_14], 1 jnz short loc_116C loc_1165: mov eax, 1 jmp short loc_118B loc_116C: mov eax, [rbp+var_14] sub eax, 1 mov edi, eax call fun...
long long func0(unsigned int a1) { int v2; // ebx if ( a1 <= 1 ) return 1LL; v2 = 2 * func0(a1 - 1); return v2 + (unsigned int)func0(a1 - 2); }
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x18 MOV dword ptr [RBP + -0x14],EDI CMP dword ptr [RBP + -0x14],0x0 JZ 0x00101165 CMP dword ptr [RBP + -0x14],0x1 JNZ 0x0010116c LAB_00101165: MOV EAX,0x1 JMP 0x0010118b LAB_0010116c: MOV EAX,dword ptr [RBP + -0x14] SUB EAX,0x1 MOV EDI,EAX CALL 0x00101149 LEA EBX,[R...
int func0(int param_1) { int iVar1; int iVar2; if ((param_1 == 0) || (param_1 == 1)) { iVar2 = 1; } else { iVar1 = func0(param_1 + -1); iVar2 = func0(param_1 + -2); iVar2 = iVar2 + iVar1 * 2; } return iVar2; }
4,933
func0
#include <assert.h>
int func0(int n) { if (n == 0 || n == 1) { return 1; } return 2 * func0(n - 1) + func0(n - 2); }
int main() { assert(func0(3) == 7); assert(func0(4) == 17); assert(func0(5) == 41); return 0; }
O1
c
func0: endbr64 mov $0x1,%eax cmp $0x1,%edi jbe 117b <func0+0x32> push %rbp push %rbx sub $0x8,%rsp mov %edi,%ebx lea -0x1(%rdi),%edi callq 1149 <func0> mov %eax,%ebp lea -0x2(%rbx),%edi callq 1149 <func0> lea (%rax,%rbp,2),%eax add $0x8,%rsp pop %rbx pop %rbp retq retq
func0: endbr64 mov eax, 1 cmp edi, 1 jbe short locret_117B push rbp push rbx sub rsp, 8 mov ebx, edi lea edi, [rdi-1] call func0 mov ebp, eax lea edi, [rbx-2] call func0 lea eax, [rax+rbp*2] add rsp, 8 pop rbx pop rbp retn locret_117B: retn
long long func0(unsigned int a1) { long long result; // rax int v2; // ebp result = 1LL; if ( a1 > 1 ) { v2 = func0(a1 - 1); return (unsigned int)func0(a1 - 2) + 2 * v2; } return result; }
func0: ENDBR64 MOV EAX,0x1 CMP EDI,0x1 JBE 0x0010117b PUSH RBP PUSH RBX SUB RSP,0x8 MOV EBX,EDI LEA EDI,[RDI + -0x1] CALL 0x00101149 MOV EBP,EAX LEA EDI,[RBX + -0x2] CALL 0x00101149 LEA EAX,[RAX + RBP*0x2] ADD RSP,0x8 POP RBX POP RBP RET LAB_0010117b: RET
int func0(uint param_1) { int iVar1; int iVar2; if (1 < param_1) { iVar1 = func0(param_1 - 1); iVar2 = func0(param_1 - 2); return iVar2 + iVar1 * 2; } return 1; }
4,934
func0
#include <assert.h>
int func0(int n) { if (n == 0 || n == 1) { return 1; } return 2 * func0(n - 1) + func0(n - 2); }
int main() { assert(func0(3) == 7); assert(func0(4) == 17); assert(func0(5) == 41); return 0; }
O2
c
func0: endbr64 cmp $0x1,%edi jbe 1248 <func0+0x38> push %rbp xor %ebp,%ebp push %rbx mov %edi,%ebx sub $0x8,%rsp lea -0x1(%rbx),%edi sub $0x2,%ebx callq 1210 <func0> lea 0x0(%rbp,%rax,2),%ebp cmp $0x1,%ebx ja 1223 <func0+0x13> add $0x8,%rsp lea 0x1(%rbp),%eax pop %rbx pop ...
func0: endbr64 push r15 mov eax, edi sub edi, 1 push r14 push r13 push r12 push rbp push rbx sub rsp, 58h mov [rsp+88h+var_80], edi mov [rsp+88h+var_74], 0 cmp eax, 1 jbe loc_14E3 cmp [rsp+88h+var_80], 1 jbe loc_14BB loc_1227: mov eax, [rsp+88h+var_80] mov [...
long long func0(unsigned int a1) { unsigned int v1; // r11d int v2; // edx unsigned int v3; // ebp unsigned int v4; // r14d int v5; // ecx unsigned int v6; // r12d unsigned int v7; // r13d int v8; // r8d unsigned int i; // esi unsigned int v10; // ebx int v11; // r15d unsigned int v12; // r9d ...
func0: ENDBR64 PUSH R15 MOV EAX,EDI SUB EDI,0x1 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x58 MOV dword ptr [RSP + 0x8],EDI MOV dword ptr [RSP + 0x14],0x0 CMP EAX,0x1 JBE 0x001014e3 CMP dword ptr [RSP + 0x8],0x1 JBE 0x001014bb LAB_00101227: MOV EAX,dword ptr [RSP + 0x8] MOV dword ptr [RSP + 0x18],0x0 SUB EA...
int func0(uint param_1) { int iVar1; uint uVar2; uint uVar3; int iVar4; int iVar5; int iVar6; uint uVar7; int iVar8; uint uVar9; uint uVar10; uint uVar11; uint uVar12; int iVar13; uint local_80; uint local_7c; uint local_78; int local_74; int local_70; int local_6c; int local_68...
4,935
func0
#include <assert.h>
int func0(int n) { if (n == 0 || n == 1) { return 1; } return 2 * func0(n - 1) + func0(n - 2); }
int main() { assert(func0(3) == 7); assert(func0(4) == 17); assert(func0(5) == 41); return 0; }
O3
c
func0: endbr64 cmp $0x1,%edi jbe 1248 <func0+0x38> push %rbp xor %ebp,%ebp push %rbx mov %edi,%ebx sub $0x8,%rsp lea -0x1(%rbx),%edi sub $0x2,%ebx callq 1210 <func0> lea 0x0(%rbp,%rax,2),%ebp cmp $0x1,%ebx ja 1223 <func0+0x13> add $0x8,%rsp lea 0x1(%rbp),%eax pop %rbx pop ...
func0: endbr64 push r15 push r14 mov r14d, 1 push r13 push r12 push rbp push rbx sub rsp, 58h cmp edi, 1 jbe loc_1576 lea r15d, [rdi-1] xor ebp, ebp loc_1217: cmp r15d, 1 jz loc_156F loc_1221: lea r12d, [r15-1] xor r14d, r14d mov [rsp+88h+var_6C], ebp mov ...
long long func0(unsigned int a1) { unsigned int v1; // r14d unsigned int v2; // r15d int v3; // ebp unsigned int v4; // r13d int v5; // ebp unsigned int v6; // ebx unsigned int v7; // ecx unsigned int v8; // r12d unsigned int v9; // ebx int v10; // ebp unsigned int v11; // edi unsigned int v12;...
func0: ENDBR64 PUSH R15 PUSH R14 MOV R14D,0x1 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x58 CMP EDI,0x1 JBE 0x00101576 LEA R15D,[RDI + -0x1] XOR EBP,EBP LAB_00101217: CMP R15D,0x1 JZ 0x0010156f LAB_00101221: LEA R12D,[R15 + -0x1] XOR R14D,R14D MOV dword ptr [RSP + 0x1c],EBP MOV R13D,R12D MOV EBP,R14D MOV EBX,R12D LA...
int func0(uint param_1) { int iVar1; uint uVar2; uint uVar3; int iVar4; uint uVar5; int iVar6; int iVar7; int iVar8; uint uVar9; uint uVar10; int iVar11; int iVar12; uint uVar13; int iVar14; int iVar15; uint uVar16; int iVar17; int iVar18; int iVar19; int iVar20; uint uVar21; ...
4,936
func0
#include <stdio.h> #include <assert.h>
int* func0(int test_tup1[], int test_tup2[], int* result, int size) { for(int i = 0; i < size; i++) { result[i] = test_tup1[i] / test_tup2[i]; } return result; }
int main() { int result1[4]; int result2[4]; int result3[4]; int tuple1_1[4] = {10, 4, 6, 9}; int tuple2_1[4] = {5, 2, 3, 3}; func0(tuple1_1, tuple2_1, result1, 4); assert(result1[0] == 2 && result1[1] == 2 && result1[2] == 2 && result1[3] == 3); int tuple1_2[4] = {12, 6, 8, ...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %rdi,-0x18(%rbp) mov %rsi,-0x20(%rbp) mov %rdx,-0x28(%rbp) mov %ecx,-0x2c(%rbp) movl $0x0,-0x4(%rbp) jmp 11d4 <func0+0x6b> mov -0x4(%rbp),%eax cltq lea 0x0(,%rax,4),%rdx mov -0x18(%rbp),%rax add %rdx,%rax mov (%rax),%eax mov -0x4(%rbp),%...
func0: endbr64 push rbp mov rbp, rsp mov [rbp+var_18], rdi mov [rbp+var_20], rsi mov [rbp+var_28], rdx mov [rbp+var_2C], ecx mov [rbp+var_4], 0 jmp short loc_11D4 loc_1189: mov eax, [rbp+var_4] cdqe lea rdx, ds:0[rax*4] mov rax, [rbp+var_18] add rax, rdx mov eax, [rax]...
long long func0(long long a1, long long a2, long long a3, int a4) { int i; // [rsp+28h] [rbp-4h] for ( i = 0; i < a4; ++i ) *(_DWORD *)(4LL * i + a3) = *(_DWORD *)(4LL * i + a1) / *(_DWORD *)(4LL * i + a2); return a3; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x18],RDI MOV qword ptr [RBP + -0x20],RSI MOV qword ptr [RBP + -0x28],RDX MOV dword ptr [RBP + -0x2c],ECX MOV dword ptr [RBP + -0x4],0x0 JMP 0x001011d4 LAB_00101189: MOV EAX,dword ptr [RBP + -0x4] CDQE LEA RDX,[RAX*0x4] MOV RAX,qword ptr [RBP + -0x18] ADD RAX,RD...
int [16] func0(long param_1,long param_2,ulong param_3,int param_4) { int iVar1; int iVar2; ulong uVar3; int auVar4 [16]; int4 local_c; uVar3 = param_3; for (local_c = 0; local_c < param_4; local_c = local_c + 1) { iVar1 = *(int *)(param_1 + (long)local_c * 4); iVar2 = *(int *)(param_2 + (lon...
4,937
func0
#include <stdio.h> #include <assert.h>
int* func0(int test_tup1[], int test_tup2[], int* result, int size) { for(int i = 0; i < size; i++) { result[i] = test_tup1[i] / test_tup2[i]; } return result; }
int main() { int result1[4]; int result2[4]; int result3[4]; int tuple1_1[4] = {10, 4, 6, 9}; int tuple2_1[4] = {5, 2, 3, 3}; func0(tuple1_1, tuple2_1, result1, 4); assert(result1[0] == 2 && result1[1] == 2 && result1[2] == 2 && result1[3] == 3); int tuple1_2[4] = {12, 6, 8, ...
O1
c
func0: endbr64 mov %rdx,%r8 test %ecx,%ecx jle 1194 <func0+0x2b> lea -0x1(%rcx),%r9d mov $0x0,%ecx mov (%rdi,%rcx,4),%eax cltd idivl (%rsi,%rcx,4) mov %eax,(%r8,%rcx,4) mov %rcx,%rax add $0x1,%rcx cmp %r9,%rax jne 117d <func0+0x14> mov %r8,%rax retq
func0: endbr64 mov r9, rdx test ecx, ecx jle short loc_1192 mov ecx, ecx mov r8d, 0 loc_117C: mov eax, [rdi+r8*4] cdq idiv dword ptr [rsi+r8*4] mov [r9+r8*4], eax add r8, 1 cmp r8, rcx jnz short loc_117C loc_1192: mov rax, r9 retn
long long func0(long long a1, long long a2, long long a3, int a4) { long long i; // r8 if ( a4 > 0 ) { for ( i = 0LL; i != a4; ++i ) *(_DWORD *)(a3 + 4 * i) = *(_DWORD *)(a1 + 4 * i) / *(_DWORD *)(a2 + 4 * i); } return a3; }
func0: ENDBR64 MOV R9,RDX TEST ECX,ECX JLE 0x00101192 MOV ECX,ECX MOV R8D,0x0 LAB_0010117c: MOV EAX,dword ptr [RDI + R8*0x4] CDQ IDIV dword ptr [RSI + R8*0x4] MOV dword ptr [R9 + R8*0x4],EAX ADD R8,0x1 CMP R8,RCX JNZ 0x0010117c LAB_00101192: MOV RAX,R9 RET
int1 [16] func0(long param_1,long param_2,ulong param_3,uint param_4) { int iVar1; int iVar2; ulong uVar3; ulong uVar4; int1 auVar5 [16]; uVar3 = param_3; if (0 < (int)param_4) { uVar4 = 0; do { iVar1 = *(int *)(param_1 + uVar4 * 4); iVar2 = *(int *)(param_2 + uVar4 * 4); uV...
4,938
func0
#include <stdio.h> #include <assert.h>
int* func0(int test_tup1[], int test_tup2[], int* result, int size) { for(int i = 0; i < size; i++) { result[i] = test_tup1[i] / test_tup2[i]; } return result; }
int main() { int result1[4]; int result2[4]; int result3[4]; int tuple1_1[4] = {10, 4, 6, 9}; int tuple2_1[4] = {5, 2, 3, 3}; func0(tuple1_1, tuple2_1, result1, 4); assert(result1[0] == 2 && result1[1] == 2 && result1[2] == 2 && result1[3] == 3); int tuple1_2[4] = {12, 6, 8, ...
O2
c
func0: endbr64 mov %rdx,%r8 test %ecx,%ecx jle 116f <func0+0x2f> lea -0x1(%rcx),%r9d xor %ecx,%ecx nopl 0x0(%rax) mov (%rdi,%rcx,4),%eax cltd idivl (%rsi,%rcx,4) mov %eax,(%r8,%rcx,4) mov %rcx,%rax add $0x1,%rcx cmp %r9,%rax jne 1158 <func0+0x18> mov %r8,%rax retq nopw %cs:0x0(%r...
func0: endbr64 mov r9, rdx test ecx, ecx jle short loc_13FE movsxd rcx, ecx xor r8d, r8d nop dword ptr [rax+00000000h] loc_13E8: mov eax, [rdi+r8*4] cdq idiv dword ptr [rsi+r8*4] mov [r9+r8*4], eax add r8, 1 cmp rcx, r8 jnz short loc_13E8 loc_13FE: mov rax, r9 retn
long long func0(long long a1, long long a2, long long a3, int a4) { long long i; // r8 if ( a4 > 0 ) { for ( i = 0LL; i != a4; ++i ) *(_DWORD *)(a3 + 4 * i) = *(_DWORD *)(a1 + 4 * i) / *(_DWORD *)(a2 + 4 * i); } return a3; }
func0: ENDBR64 MOV R9,RDX TEST ECX,ECX JLE 0x001013fe MOVSXD RCX,ECX XOR R8D,R8D NOP dword ptr [RAX] LAB_001013e8: MOV EAX,dword ptr [RDI + R8*0x4] CDQ IDIV dword ptr [RSI + R8*0x4] MOV dword ptr [R9 + R8*0x4],EAX ADD R8,0x1 CMP RCX,R8 JNZ 0x001013e8 LAB_001013fe: MOV RAX,R9 RET
int1 [16] func0(long param_1,long param_2,ulong param_3,int param_4) { int iVar1; int iVar2; ulong uVar3; long lVar4; int1 auVar5 [16]; uVar3 = param_3; if (0 < param_4) { lVar4 = 0; do { iVar1 = *(int *)(param_1 + lVar4 * 4); iVar2 = *(int *)(param_2 + lVar4 * 4); uVar3 = (...
4,939
func0
#include <stdio.h> #include <assert.h>
int* func0(int test_tup1[], int test_tup2[], int* result, int size) { for(int i = 0; i < size; i++) { result[i] = test_tup1[i] / test_tup2[i]; } return result; }
int main() { int result1[4]; int result2[4]; int result3[4]; int tuple1_1[4] = {10, 4, 6, 9}; int tuple2_1[4] = {5, 2, 3, 3}; func0(tuple1_1, tuple2_1, result1, 4); assert(result1[0] == 2 && result1[1] == 2 && result1[2] == 2 && result1[3] == 3); int tuple1_2[4] = {12, 6, 8, ...
O3
c
func0: endbr64 mov %rdx,%r8 test %ecx,%ecx jle 116f <func0+0x2f> lea -0x1(%rcx),%r9d xor %ecx,%ecx nopl 0x0(%rax) mov (%rdi,%rcx,4),%eax cltd idivl (%rsi,%rcx,4) mov %eax,(%r8,%rcx,4) mov %rcx,%rax add $0x1,%rcx cmp %rax,%r9 jne 1158 <func0+0x18> mov %r8,%rax retq nopw %cs:0x0(%r...
func0: endbr64 mov r9, rdi mov r8, rdx test ecx, ecx jle short loc_1175 movsxd rcx, ecx lea rdi, ds:0[rcx*4] xor ecx, ecx nop dword ptr [rax+rax+00h] loc_1160: mov eax, [r9+rcx] cdq idiv dword ptr [rsi+rcx] mov [r8+rcx], eax add rcx, 4 cmp rdi, rcx jnz short loc_1160 l...
long long func0(long long a1, long long a2, long long a3, int a4) { long long v5; // rdi long long v6; // rcx if ( a4 > 0 ) { v5 = 4LL * a4; v6 = 0LL; do { *(_DWORD *)(a3 + v6) = *(_DWORD *)(a1 + v6) / *(_DWORD *)(a2 + v6); v6 += 4LL; } while ( v5 != v6 ); } return a3; ...
func0: ENDBR64 MOV R9,RDI MOV R8,RDX TEST ECX,ECX JLE 0x00101175 MOVSXD RCX,ECX LEA RDI,[RCX*0x4] XOR ECX,ECX NOP dword ptr [RAX + RAX*0x1] LAB_00101160: MOV EAX,dword ptr [R9 + RCX*0x1] CDQ IDIV dword ptr [RSI + RCX*0x1] MOV dword ptr [R8 + RCX*0x1],EAX ADD RCX,0x4 CMP RDI,RCX JNZ 0x00101160 LAB_00101175: MOV RAX,R8 R...
int [16] func0(long param_1,long param_2,ulong param_3,int param_4) { long lVar1; ulong uVar2; int auVar3 [16]; uVar2 = param_3; if (0 < param_4) { lVar1 = 0; do { uVar2 = (long)*(int *)(param_1 + lVar1) % (long)*(int *)(param_2 + lVar1) & 0xffffffff; *(int *)(param_3 + lVar1) = *(int...
4,940
func0
#include <assert.h> #include <stdio.h> #include <stdlib.h> #include <string.h> typedef struct { int* first; int first_size; int* second; int second_size; } SplitInt; typedef struct { char* first; int first_size; char* second; int second_size; } SplitChar; SplitInt...
SplitChar func0(char list1[], int length, int L) { SplitChar result; result.first_size = L; result.second_size = length - L; result.first = malloc((result.first_size + 1) * sizeof(char)); result.second = malloc((result.second_size + 1) * sizeof(char)); memcpy(result.first, list1, result.fi...
int main() { // Test 1: Integers int list1_int[] = {1, 1, 2, 3, 4, 4, 5, 1}; SplitInt split1 = split_two_parts_int(list1_int, 8, 3); int expected1_first[] = {1, 1, 2}; int expected1_second[] = {3, 4, 4, 5, 1}; assert(split1.first_size == 3); assert(split1.second_size == 5); asser...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x40,%rsp mov %rdi,-0x28(%rbp) mov %rsi,-0x30(%rbp) mov %edx,-0x34(%rbp) mov %ecx,-0x38(%rbp) mov -0x38(%rbp),%eax mov %eax,-0x18(%rbp) mov -0x34(%rbp),%eax sub -0x38(%rbp),%eax mov %eax,-0x8(%rbp) mov -0x18(%rbp),%eax add $0x1,%eax cl...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_28], rdi mov [rbp+src], rsi mov [rbp+var_34], edx mov [rbp+var_38], ecx mov eax, [rbp+var_38] mov dword ptr [rbp+var_18], eax mov eax, [rbp+var_34] sub eax, [rbp+var_38] mov dword ptr [rbp+var_8], eax mov e...
_QWORD * func0(_QWORD *a1, char *a2, int a3, int a4) { void *dest; // [rsp+20h] [rbp-20h] long long v7; // [rsp+28h] [rbp-18h] void *v8; // [rsp+30h] [rbp-10h] long long v9; // [rsp+38h] [rbp-8h] LODWORD(v7) = a4; LODWORD(v9) = a3 - a4; dest = malloc(a4 + 1); v8 = malloc((int)v9 + 1); memcpy(dest, a2...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x28],RDI MOV qword ptr [RBP + -0x30],RSI MOV dword ptr [RBP + -0x34],EDX MOV dword ptr [RBP + -0x38],ECX MOV EAX,dword ptr [RBP + -0x38] MOV dword ptr [RBP + -0x18],EAX MOV EAX,dword ptr [RBP + -0x34] SUB EAX,dword ptr [RBP + -0x38] MOV dword ptr [...
int8 * func0(int8 *param_1,void *param_2,int param_3,int param_4) { void *__dest; void *__dest_00; int4 uStack_1c; int4 uStack_c; param_3 = param_3 - param_4; __dest = malloc((long)(param_4 + 1)); __dest_00 = malloc((long)(param_3 + 1)); memcpy(__dest,param_2,(long)param_4); *(int *)((long)param_4...
4,941
func0
#include <assert.h> #include <stdio.h> #include <stdlib.h> #include <string.h> typedef struct { int* first; int first_size; int* second; int second_size; } SplitInt; typedef struct { char* first; int first_size; char* second; int second_size; } SplitChar; SplitInt...
SplitChar func0(char list1[], int length, int L) { SplitChar result; result.first_size = L; result.second_size = length - L; result.first = malloc((result.first_size + 1) * sizeof(char)); result.second = malloc((result.second_size + 1) * sizeof(char)); memcpy(result.first, list1, result.fi...
int main() { // Test 1: Integers int list1_int[] = {1, 1, 2, 3, 4, 4, 5, 1}; SplitInt split1 = split_two_parts_int(list1_int, 8, 3); int expected1_first[] = {1, 1, 2}; int expected1_second[] = {3, 4, 4, 5, 1}; assert(split1.first_size == 3); assert(split1.second_size == 5); asser...
O1
c
func0: endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x18,%rsp mov %rdi,%rbx mov %rsi,0x8(%rsp) mov %ecx,%ebp sub %ecx,%edx mov %edx,%r12d lea 0x1(%rcx),%edi movslq %edi,%rdi callq 1130 <malloc@plt> mov %rax,%r14 lea 0x1(%r12),%edi movslq %edi,%rdi call...
func0: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 18h mov rbx, rdi mov [rsp+48h+var_40], rsi mov ebp, ecx sub edx, ecx mov r12d, edx lea edi, [rcx+1] movsxd rdi, edi call _malloc mov r14, rax lea edi, [r12+1] movsxd rdi, edi call ...
long long func0(long long a1, long long a2, int a3, int a4) { int v5; // r12d long long v6; // r14 long long v7; // r13 v5 = a3 - a4; v6 = malloc(a4 + 1); v7 = malloc(v5 + 1); memcpy(v6, a2, a4); *(_BYTE *)(v6 + a4) = 0; memcpy(v7, a4 + a2, v5); *(_BYTE *)(v7 + v5) = 0; *(_QWORD *)a1 = v6; *(_...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x18 MOV RBX,RDI MOV qword ptr [RSP + 0x8],RSI MOV EBP,ECX SUB EDX,ECX MOV R12D,EDX LEA EDI,[RCX + 0x1] MOVSXD RDI,EDI CALL 0x00101130 MOV R14,RAX LEA EDI,[R12 + 0x1] MOVSXD RDI,EDI CALL 0x00101130 MOV R13,RAX MOVSXD R15,EBP MOV RDX,R15 MOV RS...
int8 * func0(int8 *param_1,void *param_2,int param_3,int param_4) { void *__dest; void *__dest_00; size_t __n; param_3 = param_3 - param_4; __dest = malloc((long)(param_4 + 1)); __dest_00 = malloc((long)(param_3 + 1)); __n = (size_t)param_4; memcpy(__dest,param_2,__n); *(int1 *)((long)__dest + __n...
4,942
func0
#include <assert.h> #include <stdio.h> #include <stdlib.h> #include <string.h> typedef struct { int* first; int first_size; int* second; int second_size; } SplitInt; typedef struct { char* first; int first_size; char* second; int second_size; } SplitChar; SplitInt...
SplitChar func0(char list1[], int length, int L) { SplitChar result; result.first_size = L; result.second_size = length - L; result.first = malloc((result.first_size + 1) * sizeof(char)); result.second = malloc((result.second_size + 1) * sizeof(char)); memcpy(result.first, list1, result.fi...
int main() { // Test 1: Integers int list1_int[] = {1, 1, 2, 3, 4, 4, 5, 1}; SplitInt split1 = split_two_parts_int(list1_int, 8, 3); int expected1_first[] = {1, 1, 2}; int expected1_second[] = {3, 4, 4, 5, 1}; assert(split1.first_size == 3); assert(split1.second_size == 5); asser...
O2
c
func0: endbr64 push %r15 sub %ecx,%edx push %r14 push %r13 mov %edx,%r13d push %r12 mov %rdi,%r12 lea 0x1(%rcx),%edi push %rbp movslq %edi,%rdi mov %rsi,%rbp push %rbx mov %ecx,%ebx sub $0x18,%rsp callq 1110 <malloc@plt> lea 0x1(%r13),%edi mov %rax,%r15 movslq %edi,%rdi callq 11...
func0: endbr64 push r15 sub edx, ecx push r14 push r13 mov r13d, edx push r12 mov r12, rdi lea edi, [rcx+1] push rbp movsxd rdi, edi mov rbp, rsi push rbx mov ebx, ecx sub rsp, 18h call _malloc lea edi, [r13+1] mov r15, rax movsxd rdi, edi call _malloc movsx...
long long func0(long long a1, long long a2, int a3, int a4) { int v4; // r13d long long v6; // r15 long long v7; // r14 long long result; // rax v4 = a3 - a4; v6 = malloc(a4 + 1); v7 = malloc(v4 + 1); memcpy(v6, a2); *(_BYTE *)(v6 + a4) = 0; memcpy(v7, a2 + a4); *(_QWORD *)a1 = v6; result = a1...
func0: ENDBR64 PUSH R15 SUB EDX,ECX PUSH R14 PUSH R13 MOV R13D,EDX PUSH R12 MOV R12,RDI LEA EDI,[RCX + 0x1] PUSH RBP MOVSXD RDI,EDI MOV RBP,RSI PUSH RBX MOV EBX,ECX SUB RSP,0x18 CALL 0x00101110 LEA EDI,[R13 + 0x1] MOV R15,RAX MOVSXD RDI,EDI CALL 0x00101110 MOVSXD RDX,EBX MOV RSI,RBP MOV RDI,R15 MOV R14,RAX MOV qword pt...
int8 * func0(int8 *param_1,void *param_2,int param_3,int param_4) { void *__dest; void *__dest_00; size_t __n; param_3 = param_3 - param_4; __dest = malloc((long)(param_4 + 1)); __dest_00 = malloc((long)(param_3 + 1)); __n = (size_t)param_4; memcpy(__dest,param_2,__n); *(int1 *)((long)__dest + __n...
4,943
func0
#include <assert.h> #include <stdio.h> #include <stdlib.h> #include <string.h> typedef struct { int* first; int first_size; int* second; int second_size; } SplitInt; typedef struct { char* first; int first_size; char* second; int second_size; } SplitChar; SplitInt...
SplitChar func0(char list1[], int length, int L) { SplitChar result; result.first_size = L; result.second_size = length - L; result.first = malloc((result.first_size + 1) * sizeof(char)); result.second = malloc((result.second_size + 1) * sizeof(char)); memcpy(result.first, list1, result.fi...
int main() { // Test 1: Integers int list1_int[] = {1, 1, 2, 3, 4, 4, 5, 1}; SplitInt split1 = split_two_parts_int(list1_int, 8, 3); int expected1_first[] = {1, 1, 2}; int expected1_second[] = {3, 4, 4, 5, 1}; assert(split1.first_size == 3); assert(split1.second_size == 5); asser...
O3
c
func0: endbr64 push %r15 sub %ecx,%edx push %r14 push %r13 mov %edx,%r13d push %r12 mov %rdi,%r12 lea 0x1(%rcx),%edi push %rbp movslq %edi,%rdi mov %rsi,%rbp push %rbx mov %ecx,%ebx sub $0x18,%rsp callq 1110 <malloc@plt> lea 0x1(%r13),%edi mov %rax,%r15 movslq %edi,%rdi callq 11...
func0: endbr64 push r15 sub edx, ecx push r14 push r13 mov r13d, edx push r12 mov r12, rsi push rbp mov ebp, ecx lea ecx, [rcx+1] push rbx movsxd rcx, ecx mov rbx, rdi mov rdi, rcx; size sub rsp, 18h mov [rsp+48h+var_48], rcx call _malloc lea r8d, [r13+1] mo...
long long func0(long long a1, long long a2, int a3, int a4) { int v4; // r13d _BYTE *v6; // r15 _BYTE *v7; // r14 long long result; // rax size_t v9; // [rsp+0h] [rbp-48h] v4 = a3 - a4; v9 = a4 + 1; v6 = malloc(v9); v7 = malloc(v4 + 1); __memcpy_chk(v6, a2, a4, v9); v6[a4] = 0; __memcpy_chk(v7...
func0: ENDBR64 PUSH R15 SUB EDX,ECX PUSH R14 PUSH R13 MOV R13D,EDX PUSH R12 MOV R12,RSI PUSH RBP MOV EBP,ECX LEA ECX,[RCX + 0x1] PUSH RBX MOVSXD RCX,ECX MOV RBX,RDI MOV RDI,RCX SUB RSP,0x18 MOV qword ptr [RSP],RCX CALL 0x00101110 LEA R8D,[R13 + 0x1] MOVSXD R8,R8D MOV R15,RAX MOV RDI,R8 MOV qword ptr [RSP + 0x8],R8 CALL...
int8 * func0(int8 *param_1,long param_2,int param_3,int param_4) { void *pvVar1; void *pvVar2; long lVar3; param_3 = param_3 - param_4; pvVar1 = malloc((long)(param_4 + 1)); pvVar2 = malloc((long)(param_3 + 1)); lVar3 = (long)param_4; __memcpy_chk(pvVar1,param_2,lVar3,(long)(param_4 + 1)); *(int *...
4,944
func0
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> typedef struct { char *key; int value; } dict_entry; dict_entry* merge_dict(const dict_entry *d1, size_t size1, const dict_entry *d2, size_t size2, size_t *size_out) { dict_entry *merged = malloc((size1 + size2) * ...
int func0(const dict_entry *d1, size_t size1, const dict_entry *d2, size_t size2) { if (size1 != size2) return 0; for (size_t i = 0; i < size1; i++) { if (strcmp(d1[i].key, d2[i].key) != 0 || d1[i].value != d2[i].value) { return 0; } } return 1; }
int main() { // Test case 1 dict_entry d1_a[] = {{"a", 100}, {"b", 200}}; dict_entry d2_a[] = {{"x", 300}, {"y", 200}}; size_t size_a; dict_entry *merged_a = merge_dict(d1_a, 2, d2_a, 2, &size_a); dict_entry expected_a[] = {{"a", 100}, {"b", 200}, {"x", 300}, {"y", 200}}; assert(func0...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x30,%rsp mov %rdi,-0x18(%rbp) mov %rsi,-0x20(%rbp) mov %rdx,-0x28(%rbp) mov %rcx,-0x30(%rbp) mov -0x20(%rbp),%rax cmp -0x30(%rbp),%rax je 1334 <func0+0x30> mov $0x0,%eax jmpq 13c0 <func0+0xbc> movq $0x0,-0x8(%rbp) jmp 13b1 <func0+0xad>...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_18], rdi mov [rbp+var_20], rsi mov [rbp+var_28], rdx mov [rbp+var_30], rcx mov rax, [rbp+var_20] cmp rax, [rbp+var_30] jz short loc_1334 mov eax, 0 jmp locret_13C0 loc_1334: mov [rbp+var_8], 0 jmp shor...
long long func0(long long a1, unsigned long long a2, long long a3, long long a4) { unsigned long long i; // [rsp+28h] [rbp-8h] if ( a2 != a4 ) return 0LL; for ( i = 0LL; i < a2; ++i ) { if ( strcmp(*(const char **)(16 * i + a1), *(const char **)(16 * i + a3)) || *(_DWORD *)(16 * i + a1 + 8) != *...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x18],RDI MOV qword ptr [RBP + -0x20],RSI MOV qword ptr [RBP + -0x28],RDX MOV qword ptr [RBP + -0x30],RCX MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x30] JZ 0x00101334 MOV EAX,0x0 JMP 0x001013c0 LAB_00101334: MOV qword ptr [RBP + -0x...
int8 func0(long param_1,ulong param_2,long param_3,ulong param_4) { int iVar1; int8 uVar2; ulong local_10; if (param_2 == param_4) { for (local_10 = 0; local_10 < param_2; local_10 = local_10 + 1) { iVar1 = strcmp(*(char **)(param_1 + local_10 * 0x10),*(char **)(param_3 + local_10 * 0x10)); ...
4,945
func0
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> typedef struct { char *key; int value; } dict_entry; dict_entry* merge_dict(const dict_entry *d1, size_t size1, const dict_entry *d2, size_t size2, size_t *size_out) { dict_entry *merged = malloc((size1 + size2) * ...
int func0(const dict_entry *d1, size_t size1, const dict_entry *d2, size_t size2) { if (size1 != size2) return 0; for (size_t i = 0; i < size1; i++) { if (strcmp(d1[i].key, d2[i].key) != 0 || d1[i].value != d2[i].value) { return 0; } } return 1; }
int main() { // Test case 1 dict_entry d1_a[] = {{"a", 100}, {"b", 200}}; dict_entry d2_a[] = {{"x", 300}, {"y", 200}}; size_t size_a; dict_entry *merged_a = merge_dict(d1_a, 2, d2_a, 2, &size_a); dict_entry expected_a[] = {{"a", 100}, {"b", 200}, {"x", 300}, {"y", 200}}; assert(func0...
O1
c
func0: endbr64 mov $0x0,%eax cmp %rcx,%rsi jne 12db <func0+0x75> push %r13 push %r12 push %rbp push %rbx sub $0x8,%rsp mov %rsi,%r12 test %rsi,%rsi je 12c4 <func0+0x5e> lea 0x8(%rdx),%rbp lea 0x8(%rdi),%rbx mov $0x0,%r13d mov -0x8(%rbp),%rsi mov -0x8(%rbx),%rdi callq 10c0 <s...
func0: endbr64 mov eax, 0 cmp rsi, rcx jnz short locret_12E1 push r13 push r12 push rbp push rbx sub rsp, 8 mov r12, rsi test rsi, rsi jz short loc_12CA lea rbp, [rdx+8] lea rbx, [rdi+8] mov r13d, 0 loc_129A: mov rsi, [rbp-8] mov rdi, [rbx-8] call _strcmp t...
long long func0(long long a1, long long a2, long long a3, long long a4) { long long result; // rax _DWORD *v5; // rbp _DWORD *v6; // rbx long long v7; // r13 result = 0LL; if ( a2 == a4 ) { if ( a2 ) { v5 = (_DWORD *)(a3 + 8); v6 = (_DWORD *)(a1 + 8); v7 = 0LL; while ( 1 ...
func0: ENDBR64 MOV EAX,0x0 CMP RSI,RCX JNZ 0x001012e1 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x8 MOV R12,RSI TEST RSI,RSI JZ 0x001012ca LEA RBP,[RDX + 0x8] LEA RBX,[RDI + 0x8] MOV R13D,0x0 LAB_0010129a: MOV RSI,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RBX + -0x8] CALL 0x001010c0 TEST EAX,EAX JNZ 0x001012d1 MOV EC...
int4 func0(long param_1,long param_2,long param_3,long param_4) { int iVar1; int *piVar2; int *piVar3; long lVar4; if (param_2 != param_4) { return 0; } if (param_2 != 0) { piVar3 = (int *)(param_3 + 8); piVar2 = (int *)(param_1 + 8); lVar4 = 0; do { iVar1 = strcmp(*(char **)...
4,946
func0
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> typedef struct { char *key; int value; } dict_entry; dict_entry* merge_dict(const dict_entry *d1, size_t size1, const dict_entry *d2, size_t size2, size_t *size_out) { dict_entry *merged = malloc((size1 + size2) * ...
int func0(const dict_entry *d1, size_t size1, const dict_entry *d2, size_t size2) { if (size1 != size2) return 0; for (size_t i = 0; i < size1; i++) { if (strcmp(d1[i].key, d2[i].key) != 0 || d1[i].value != d2[i].value) { return 0; } } return 1; }
int main() { // Test case 1 dict_entry d1_a[] = {{"a", 100}, {"b", 200}}; dict_entry d2_a[] = {{"x", 300}, {"y", 200}}; size_t size_a; dict_entry *merged_a = merge_dict(d1_a, 2, d2_a, 2, &size_a); dict_entry expected_a[] = {{"a", 100}, {"b", 200}, {"x", 300}, {"y", 200}}; assert(func0...
O2
c
func0: endbr64 cmp %rcx,%rsi jne 16d0 <func0+0x10> jmpq 1590 <func0.part.0> xchg %ax,%ax xor %eax,%eax retq nopw %cs:0x0(%rax,%rax,1) nopl (%rax)
func0_part_0: test rsi, rsi jz short loc_1600 push r13 xor r13d, r13d push r12 mov r12, rsi push rbp lea rbp, [rdx+8] push rbx lea rbx, [rdi+8] sub rsp, 8 jmp short loc_15C8 loc_15B0: mov ecx, [rbp+0] cmp [rbx], ecx jnz short loc_15DB add r13, 1 add rbp, 1...
long long func0_part_0(long long a1, long long a2, long long a3) { long long v3; // r13 _DWORD *v4; // rbp _DWORD *v5; // rbx long long result; // rax if ( !a2 ) return 1LL; v3 = 0LL; v4 = (_DWORD *)(a3 + 8); v5 = (_DWORD *)(a1 + 8); do { result = strcmp(*((_QWORD *)v5 - 1), *((_QWORD *)v4...
func0.part.0: TEST RSI,RSI JZ 0x00101600 PUSH R13 XOR R13D,R13D PUSH R12 MOV R12,RSI PUSH RBP LEA RBP,[RDX + 0x8] PUSH RBX LEA RBX,[RDI + 0x8] SUB RSP,0x8 JMP 0x001015c8 LAB_001015b0: MOV ECX,dword ptr [RBP] CMP dword ptr [RBX],ECX JNZ 0x001015db ADD R13,0x1 ADD RBP,0x10 ADD RBX,0x10 CMP R13,R12 JZ 0x001015f0 LAB_00101...
int4 func0_part_0(long param_1,long param_2,long param_3) { int iVar1; int *piVar2; int *piVar3; long lVar4; if (param_2 == 0) { return 1; } lVar4 = 0; piVar3 = (int *)(param_3 + 8); piVar2 = (int *)(param_1 + 8); while ((iVar1 = strcmp(*(char **)(piVar2 + -2),*(char **)(piVar3 + -2)), iVar1...
4,947
func0
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> typedef struct { char *key; int value; } dict_entry; dict_entry* merge_dict(const dict_entry *d1, size_t size1, const dict_entry *d2, size_t size2, size_t *size_out) { dict_entry *merged = malloc((size1 + size2) * ...
int func0(const dict_entry *d1, size_t size1, const dict_entry *d2, size_t size2) { if (size1 != size2) return 0; for (size_t i = 0; i < size1; i++) { if (strcmp(d1[i].key, d2[i].key) != 0 || d1[i].value != d2[i].value) { return 0; } } return 1; }
int main() { // Test case 1 dict_entry d1_a[] = {{"a", 100}, {"b", 200}}; dict_entry d2_a[] = {{"x", 300}, {"y", 200}}; size_t size_a; dict_entry *merged_a = merge_dict(d1_a, 2, d2_a, 2, &size_a); dict_entry expected_a[] = {{"a", 100}, {"b", 200}, {"x", 300}, {"y", 200}}; assert(func0...
O3
c
func0: endbr64 xor %eax,%eax cmp %rcx,%rsi jne 1730 <func0+0x70> push %r13 push %r12 mov %rsi,%r12 push %rbp push %rbx sub $0x8,%rsp test %rsi,%rsi je 1738 <func0+0x78> lea 0x8(%rdx),%rbp lea 0x8(%rdi),%rbx xor %r13d,%r13d jmp 1708 <func0+0x48> nopw 0x0(%rax,%rax,1) mov 0x0...
func0_part_0: test rsi, rsi jz short loc_1600 push r13 xor r13d, r13d push r12 mov r12, rsi push rbp lea rbp, [rdx+8] push rbx lea rbx, [rdi+8] sub rsp, 8 jmp short loc_15C8 loc_15B0: mov ecx, [rbp+0] cmp [rbx], ecx jnz short loc_15DB add r13, 1 add rbp, 1...
int func0_part_0(long long a1, long long a2, long long a3) { long long v3; // r13 const char **v4; // rbp const char **v5; // rbx int result; // eax if ( !a2 ) return 1; v3 = 0LL; v4 = (const char **)(a3 + 8); v5 = (const char **)(a1 + 8); do { result = strcmp(*(v5 - 1), *(v4 - 1)); if...
func0.part.0: TEST RSI,RSI JZ 0x00101600 PUSH R13 XOR R13D,R13D PUSH R12 MOV R12,RSI PUSH RBP LEA RBP,[RDX + 0x8] PUSH RBX LEA RBX,[RDI + 0x8] SUB RSP,0x8 JMP 0x001015c8 LAB_001015b0: MOV ECX,dword ptr [RBP] CMP dword ptr [RBX],ECX JNZ 0x001015db ADD R13,0x1 ADD RBP,0x10 ADD RBX,0x10 CMP R13,R12 JZ 0x001015f0 LAB_00101...
int4 func0_part_0(long param_1,long param_2,long param_3) { int iVar1; int *piVar2; int *piVar3; long lVar4; if (param_2 == 0) { return 1; } lVar4 = 0; piVar3 = (int *)(param_3 + 8); piVar2 = (int *)(param_1 + 8); while ((iVar1 = strcmp(*(char **)(piVar2 + -2),*(char **)(piVar3 + -2)), iVar1...
4,948
func0
#include <stdlib.h> #include <assert.h>
double func0(int h_age) { double d_age; if (h_age < 0) { exit(EXIT_FAILURE); } else if (h_age <= 2) { d_age = h_age * 10.5; } else { d_age = 21 + (h_age - 2) * 4; } return d_age; }
int main() { assert(func0(12) == 61); assert(func0(15) == 73); assert(func0(24) == 109); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x20,%rsp mov %edi,-0x14(%rbp) cmpl $0x0,-0x14(%rbp) jns 1188 <func0+0x1f> mov $0x1,%edi callq 1070 <exit@plt> cmpl $0x2,-0x14(%rbp) jg 11a6 <func0+0x3d> cvtsi2sdl -0x14(%rbp),%xmm1 movsd 0xee5(%rip),%xmm0 mulsd %xmm1,%xmm0 movsd %xmm0,-0x8(%rbp) ...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_14], edi cmp [rbp+var_14], 0 jns short loc_1188 mov edi, 1; status call _exit loc_1188: cmp [rbp+var_14], 2 jg short loc_11AA pxor xmm1, xmm1 cvtsi2sd xmm1, [rbp+var_14] movsd xmm0, cs:qword_2060 mulsd xmm0, xmm...
double func0(int a1) { if ( a1 < 0 ) exit(1); if ( a1 > 2 ) return (double)(4 * (a1 - 2) + 21); else return 10.5 * (double)a1; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0x14],EDI CMP dword ptr [RBP + -0x14],0x0 JNS 0x00101188 MOV EDI,0x1 CALL 0x00101070 LAB_00101188: CMP dword ptr [RBP + -0x14],0x2 JG 0x001011aa PXOR XMM1,XMM1 CVTSI2SD XMM1,dword ptr [RBP + -0x14] MOVSD XMM0,qword ptr [0x00102060] MULSD XMM0,XMM1 M...
double func0(int param_1) { int8 local_10; if (param_1 < 0) { /* WARNING: Subroutine does not return */ exit(1); } if (param_1 < 3) { local_10 = DAT_00102060 * (double)param_1; } else { local_10 = (double)((param_1 + -2) * 4 + 0x15); } return local_10; }
4,949
func0
#include <stdlib.h> #include <assert.h>
double func0(int h_age) { double d_age; if (h_age < 0) { exit(EXIT_FAILURE); } else if (h_age <= 2) { d_age = h_age * 10.5; } else { d_age = 21 + (h_age - 2) * 4; } return d_age; }
int main() { assert(func0(12) == 61); assert(func0(15) == 73); assert(func0(24) == 109); return 0; }
O1
c
func0: endbr64 test %edi,%edi js 1167 <func0+0x1e> cmp $0x2,%edi jg 1175 <func0+0x2c> pxor %xmm0,%xmm0 cvtsi2sd %edi,%xmm0 mulsd 0xea2(%rip),%xmm0 retq sub $0x8,%rsp mov $0x1,%edi callq 1050 <exit@plt> lea 0xd(,%rdi,4),%eax pxor %xmm0,%xmm0 cvtsi2sd %eax,%xmm0 retq
func0: endbr64 test edi, edi js short loc_1167 cmp edi, 2 jg short loc_1175 pxor xmm0, xmm0 cvtsi2sd xmm0, edi mulsd xmm0, cs:qword_2008 retn loc_1167: sub rsp, 8 mov edi, 1 call _exit loc_1175: lea eax, ds:0Dh[rdi*4] pxor xmm0, xmm0 cvtsi2sd xmm0, eax retn
double func0(int a1, long long a2) { if ( a1 < 0 ) exit(1LL, a2); if ( a1 > 2 ) return (double)(4 * a1 + 13); else return (double)a1 * 10.5; }
func0: ENDBR64 TEST EDI,EDI JS 0x00101167 CMP EDI,0x2 JG 0x00101175 PXOR XMM0,XMM0 CVTSI2SD XMM0,EDI MULSD XMM0,qword ptr [0x00102008] RET LAB_00101167: SUB RSP,0x8 MOV EDI,0x1 CALL 0x00101050 LAB_00101175: LEA EAX,[0xd + RDI*0x4] PXOR XMM0,XMM0 CVTSI2SD XMM0,EAX RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ double func0(int param_1) { if (param_1 < 0) { /* WARNING: Subroutine does not return */ exit(1); } if (param_1 < 3) { return (double)param_1 * _DAT_00102008; } return (double)(param_1 * 4 + 0xd)...
4,950
func0
#include <stdlib.h> #include <assert.h>
double func0(int h_age) { double d_age; if (h_age < 0) { exit(EXIT_FAILURE); } else if (h_age <= 2) { d_age = h_age * 10.5; } else { d_age = 21 + (h_age - 2) * 4; } return d_age; }
int main() { assert(func0(12) == 61); assert(func0(15) == 73); assert(func0(24) == 109); return 0; }
O2
c
func0: endbr64 test %edi,%edi js 1190 <func0+0x30> cmp $0x2,%edi jg 1180 <func0+0x20> pxor %xmm0,%xmm0 cvtsi2sd %edi,%xmm0 mulsd 0xe8b(%rip),%xmm0 retq xchg %ax,%ax lea 0xd(,%rdi,4),%eax pxor %xmm0,%xmm0 cvtsi2sd %eax,%xmm0 retq push %rax mov $0x1,%edi callq 1050 <exit@plt> nopl 0x0(%rax,...
func0: endbr64 test edi, edi js short loc_1190 cmp edi, 2 jg short loc_1180 pxor xmm0, xmm0 cvtsi2sd xmm0, edi mulsd xmm0, cs:qword_2008 retn loc_1180: lea eax, ds:0Dh[rdi*4] pxor xmm0, xmm0 cvtsi2sd xmm0, eax retn loc_1190: push rax mov edi, 1 call _exit
double func0(int a1) { if ( a1 < 0 ) exit(1LL); if ( a1 > 2 ) return (double)(4 * a1 + 13); else return (double)a1 * 10.5; }
func0: ENDBR64 TEST EDI,EDI JS 0x00101190 CMP EDI,0x2 JG 0x00101180 PXOR XMM0,XMM0 CVTSI2SD XMM0,EDI MULSD XMM0,qword ptr [0x00102008] RET LAB_00101180: LEA EAX,[0xd + RDI*0x4] PXOR XMM0,XMM0 CVTSI2SD XMM0,EAX RET LAB_00101190: PUSH RAX MOV EDI,0x1 CALL 0x00101050
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ double func0(int param_1) { if (param_1 < 0) { /* WARNING: Subroutine does not return */ exit(1); } if (param_1 < 3) { return (double)param_1 * _DAT_00102008; } return (double)(param_1 * 4 + 0xd)...
4,951
func0
#include <stdlib.h> #include <assert.h>
double func0(int h_age) { double d_age; if (h_age < 0) { exit(EXIT_FAILURE); } else if (h_age <= 2) { d_age = h_age * 10.5; } else { d_age = 21 + (h_age - 2) * 4; } return d_age; }
int main() { assert(func0(12) == 61); assert(func0(15) == 73); assert(func0(24) == 109); return 0; }
O3
c
func0: endbr64 test %edi,%edi js 1190 <func0+0x30> cmp $0x2,%edi jg 1180 <func0+0x20> pxor %xmm0,%xmm0 cvtsi2sd %edi,%xmm0 mulsd 0xe8b(%rip),%xmm0 retq xchg %ax,%ax lea 0xd(,%rdi,4),%eax pxor %xmm0,%xmm0 cvtsi2sd %eax,%xmm0 retq push %rax mov $0x1,%edi callq 1050 <exit@plt> nopl 0x0(%rax,...
func0: endbr64 test edi, edi js short loc_1190 cmp edi, 2 jg short loc_1180 pxor xmm0, xmm0 cvtsi2sd xmm0, edi mulsd xmm0, cs:qword_2008 retn loc_1180: lea eax, ds:0Dh[rdi*4] pxor xmm0, xmm0 cvtsi2sd xmm0, eax retn loc_1190: push rax mov edi, 1; status call _exit
double func0(int a1) { if ( a1 < 0 ) exit(1); if ( a1 > 2 ) return (double)(4 * a1 + 13); else return (double)a1 * 10.5; }
func0: ENDBR64 TEST EDI,EDI JS 0x00101190 CMP EDI,0x2 JG 0x00101180 PXOR XMM0,XMM0 CVTSI2SD XMM0,EDI MULSD XMM0,qword ptr [0x00102008] RET LAB_00101180: LEA EAX,[0xd + RDI*0x4] PXOR XMM0,XMM0 CVTSI2SD XMM0,EAX RET LAB_00101190: PUSH RAX MOV EDI,0x1 CALL 0x00101050
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ double func0(int param_1) { if (param_1 < 0) { /* WARNING: Subroutine does not return */ exit(1); } if (param_1 < 3) { return (double)param_1 * _DAT_00102008; } return (double)(param_1 * 4 + 0xd)...
4,952
func0
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> // Function to split integer arrays int** list_split_int(int *S, int length, int step) { int **result = malloc(step * sizeof(int*)); for(int i = 0; i < step; i++) { int count = 0; for(int j = i; j < lengt...
int func0(char ***result, char ***expected, int step, int *sizes) { for(int i = 0; i < step; i++) { for(int j = 0; j < sizes[i]; j++) { if(strcmp(result[i][j], expected[i][j]) != 0) { return 0; } } } return 1; }
int main() { // First assert with strings char *S1[] = {"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n"}; int length1 = sizeof(S1) / sizeof(S1[0]); int step1 = 3; char ***split1 = list_split_str(S1, length1, step1); char *expected1[][5] = {{"a", "d", "g", "j", "m"}, {"...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x30,%rsp mov %rdi,-0x18(%rbp) mov %rsi,-0x20(%rbp) mov %edx,-0x24(%rbp) mov %rcx,-0x30(%rbp) movl $0x0,-0x8(%rbp) jmpq 155b <func0+0xbb> movl $0x0,-0x4(%rbp) jmp 1538 <func0+0x98> mov -0x8(%rbp),%eax cltq lea 0x0(,%rax,8),%rdx mov -0x20(...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_18], rdi mov [rbp+var_20], rsi mov [rbp+var_24], edx mov [rbp+var_30], rcx mov [rbp+var_8], 0 jmp loc_1559 loc_14C5: mov [rbp+var_4], 0 jmp short loc_1536 loc_14CE: mov eax, [rbp+var_8] cdqe lea rdx, ds:0[r...
long long func0(long long a1, long long a2, int a3, long long a4) { int i; // [rsp+28h] [rbp-8h] int j; // [rsp+2Ch] [rbp-4h] for ( i = 0; i < a3; ++i ) { for ( j = 0; j < *(_DWORD *)(4LL * i + a4); ++j ) { if ( strcmp( *(const char **)(8LL * j + *(_QWORD *)(8LL * i + a1)), ...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x18],RDI MOV qword ptr [RBP + -0x20],RSI MOV dword ptr [RBP + -0x24],EDX MOV qword ptr [RBP + -0x30],RCX MOV dword ptr [RBP + -0x8],0x0 JMP 0x00101559 LAB_001014c5: MOV dword ptr [RBP + -0x4],0x0 JMP 0x00101536 LAB_001014ce: MOV EAX,dword ptr [RBP ...
int8 func0(long param_1,long param_2,int param_3,long param_4) { int iVar1; int local_10; int local_c; local_10 = 0; do { if (param_3 <= local_10) { return 1; } for (local_c = 0; local_c < *(int *)(param_4 + (long)local_10 * 4); local_c = local_c + 1) { iVar1 = strcmp(*(char **)(*(...
4,953
func0
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> // Function to split integer arrays int** list_split_int(int *S, int length, int step) { int **result = malloc(step * sizeof(int*)); for(int i = 0; i < step; i++) { int count = 0; for(int j = i; j < lengt...
int func0(char ***result, char ***expected, int step, int *sizes) { for(int i = 0; i < step; i++) { for(int j = 0; j < sizes[i]; j++) { if(strcmp(result[i][j], expected[i][j]) != 0) { return 0; } } } return 1; }
int main() { // First assert with strings char *S1[] = {"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n"}; int length1 = sizeof(S1) / sizeof(S1[0]); int step1 = 3; char ***split1 = list_split_str(S1, length1, step1); char *expected1[][5] = {{"a", "d", "g", "j", "m"}, {"...
O1
c
func0: endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x28,%rsp mov %rdi,0x8(%rsp) mov %rsi,0x10(%rsp) test %edx,%edx jle 1456 <func0+0x84> mov %rcx,%r15 lea -0x1(%rdx),%eax mov %rax,0x18(%rsp) mov $0x0,%r14d mov (%r15,%r14,4),%eax test %eax,%eax jle ...
func0: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 28h mov [rsp+58h+var_50], rdi mov [rsp+58h+var_48], rsi test edx, edx jle short loc_142C mov r15, rcx mov eax, edx mov [rsp+58h+var_40], rax mov r14d, 0 loc_13DE: mov ebp, [r15+r14*4] t...
long long func0(long long a1, long long a2, int a3, long long a4) { long long v5; // r14 int v6; // ebp long long v7; // r13 long long v8; // r12 long long v9; // rbx long long v11; // [rsp+18h] [rbp-40h] if ( a3 <= 0 ) return 1LL; v11 = (unsigned int)a3; v5 = 0LL; while ( 1 ) { v6 = *(_...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x28 MOV qword ptr [RSP + 0x8],RDI MOV qword ptr [RSP + 0x10],RSI TEST EDX,EDX JLE 0x0010142c MOV R15,RCX MOV EAX,EDX MOV qword ptr [RSP + 0x18],RAX MOV R14D,0x0 LAB_001013de: MOV EBP,dword ptr [R15 + R14*0x4] TEST EBP,EBP JLE 0x0010141a MOV R...
int8 func0(long param_1,long param_2,uint param_3,long param_4) { uint uVar1; long lVar2; long lVar3; int iVar4; ulong uVar5; ulong uVar6; if (0 < (int)param_3) { uVar6 = 0; do { uVar1 = *(uint *)(param_4 + uVar6 * 4); if (0 < (int)uVar1) { lVar2 = *(long *)(param_2 + uVar6...
4,954
func0
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> // Function to split integer arrays int** list_split_int(int *S, int length, int step) { int **result = malloc(step * sizeof(int*)); for(int i = 0; i < step; i++) { int count = 0; for(int j = i; j < lengt...
int func0(char ***result, char ***expected, int step, int *sizes) { for(int i = 0; i < step; i++) { for(int j = 0; j < sizes[i]; j++) { if(strcmp(result[i][j], expected[i][j]) != 0) { return 0; } } } return 1; }
int main() { // First assert with strings char *S1[] = {"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n"}; int length1 = sizeof(S1) / sizeof(S1[0]); int step1 = 3; char ***split1 = list_split_str(S1, length1, step1); char *expected1[][5] = {{"a", "d", "g", "j", "m"}, {"...
O2
c
func0: endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x28,%rsp mov %rdi,0x8(%rsp) mov %rsi,0x10(%rsp) test %edx,%edx jle 1a00 <func0+0x90> lea -0x1(%rdx),%eax mov %rcx,%r12 xor %ebp,%ebp mov %rax,0x18(%rsp) mov (%r12,%rbp,4),%eax test %eax,%eax jle ...
func0: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 28h mov [rsp+58h+var_50], rdi mov [rsp+58h+var_48], rsi test edx, edx jle short loc_1A0B movsxd rax, edx mov r13, rcx xor ebp, ebp mov [rsp+58h+var_40], rax loc_19AD: movsxd rbx, dword ptr [r...
long long func0(long long a1, long long a2, int a3, long long a4) { long long v5; // rbp long long v6; // rbx long long v7; // r12 long long v8; // r15 long long v9; // r14 long long v11; // [rsp+18h] [rbp-40h] if ( a3 <= 0 ) return 1LL; v5 = 0LL; v11 = a3; while ( 1 ) { v6 = *(int *)(a4...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x28 MOV qword ptr [RSP + 0x8],RDI MOV qword ptr [RSP + 0x10],RSI TEST EDX,EDX JLE 0x00101a0b MOVSXD RAX,EDX MOV R13,RCX XOR EBP,EBP MOV qword ptr [RSP + 0x18],RAX LAB_001019ad: MOVSXD RBX,dword ptr [R13 + RBP*0x4] TEST EBX,EBX JLE 0x00101a00 ...
int8 func0(long param_1,long param_2,int param_3,long param_4) { int iVar1; long lVar2; long lVar3; int iVar4; long lVar5; long lVar6; if (0 < param_3) { lVar5 = 0; do { iVar1 = *(int *)(param_4 + lVar5 * 4); if (0 < iVar1) { lVar6 = 0; lVar2 = *(long *)(param_2 + l...
4,955
func0
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> // Function to split integer arrays int** list_split_int(int *S, int length, int step) { int **result = malloc(step * sizeof(int*)); for(int i = 0; i < step; i++) { int count = 0; for(int j = i; j < lengt...
int func0(char ***result, char ***expected, int step, int *sizes) { for(int i = 0; i < step; i++) { for(int j = 0; j < sizes[i]; j++) { if(strcmp(result[i][j], expected[i][j]) != 0) { return 0; } } } return 1; }
int main() { // First assert with strings char *S1[] = {"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n"}; int length1 = sizeof(S1) / sizeof(S1[0]); int step1 = 3; char ***split1 = list_split_str(S1, length1, step1); char *expected1[][5] = {{"a", "d", "g", "j", "m"}, {"...
O3
c
func0: endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x28,%rsp mov %rdi,0x8(%rsp) mov %rsi,0x10(%rsp) test %edx,%edx jle 1b30 <func0+0x90> lea -0x1(%rdx),%eax mov %rcx,%r12 xor %ebp,%ebp mov %rax,0x18(%rsp) mov (%r12,%rbp,4),%eax test %eax,%eax jle ...
func0: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 18h mov [rsp+48h+var_48], rdi test edx, edx jle short loc_1BBB movsxd rax, edx mov r15, rsi mov r13, rcx xor ebp, ebp mov [rsp+48h+var_40], rax loc_1B5A: movsxd rax, dword ptr [r13+rbp*4+0] t...
long long func0(long long a1, long long a2, int a3, long long a4) { long long v5; // rbp long long v6; // rax const char **v7; // r12 const char **v8; // rbx const char **v9; // r14 long long v11; // [rsp+8h] [rbp-40h] if ( a3 <= 0 ) return 1LL; v5 = 0LL; v11 = a3; while ( 1 ) { v6 = *(i...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x18 MOV qword ptr [RSP],RDI TEST EDX,EDX JLE 0x00101bbb MOVSXD RAX,EDX MOV R15,RSI MOV R13,RCX XOR EBP,EBP MOV qword ptr [RSP + 0x8],RAX LAB_00101b5a: MOVSXD RAX,dword ptr [R13 + RBP*0x4] TEST EAX,EAX JLE 0x00101bb0 MOV R12,qword ptr [R15 + R...
int8 func0(long param_1,long param_2,int param_3,long param_4) { int8 *puVar1; int iVar2; long lVar3; int8 *puVar4; int8 *puVar5; if (0 < param_3) { lVar3 = 0; do { iVar2 = *(int *)(param_4 + lVar3 * 4); if (0 < iVar2) { puVar4 = *(int8 **)(param_2 + lVar3 * 8); puVar...
4,956
func0
#include <assert.h>
int func0(int l) { int LSA = 4 * (l * l); return LSA; }
int main() { assert(func0(5) == 100); assert(func0(9) == 324); assert(func0(10) == 400); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x14(%rbp) mov -0x14(%rbp),%eax imul %eax,%eax shl $0x2,%eax mov %eax,-0x4(%rbp) mov -0x4(%rbp),%eax pop %rbp retq
func0: endbr64 push rbp mov rbp, rsp mov [rbp+var_14], edi mov eax, [rbp+var_14] imul eax, eax shl eax, 2 mov [rbp+var_4], eax mov eax, [rbp+var_4] pop rbp retn
long long func0(int a1) { return (unsigned int)(4 * a1 * a1); }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x14],EDI MOV EAX,dword ptr [RBP + -0x14] IMUL EAX,EAX SHL EAX,0x2 MOV dword ptr [RBP + -0x4],EAX MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int func0(int param_1) { return param_1 * param_1 * 4; }
4,957
func0
#include <assert.h>
int func0(int l) { int LSA = 4 * (l * l); return LSA; }
int main() { assert(func0(5) == 100); assert(func0(9) == 324); assert(func0(10) == 400); return 0; }
O1
c
func0: endbr64 imul %edi,%edi lea 0x0(,%rdi,4),%eax retq
func0: endbr64 imul edi, edi lea eax, ds:0[rdi*4] retn
long long func0(int a1) { return (unsigned int)(4 * a1 * a1); }
func0: ENDBR64 IMUL EDI,EDI LEA EAX,[RDI*0x4] RET
int func0(int param_1) { return param_1 * param_1 * 4; }
4,958
func0
#include <assert.h>
int func0(int l) { int LSA = 4 * (l * l); return LSA; }
int main() { assert(func0(5) == 100); assert(func0(9) == 324); assert(func0(10) == 400); return 0; }
O2
c
func0: endbr64 imul %edi,%edi lea 0x0(,%rdi,4),%eax retq
func0: endbr64 imul edi, edi lea eax, ds:0[rdi*4] retn
long long func0(int a1) { return (unsigned int)(4 * a1 * a1); }
func0: ENDBR64 IMUL EDI,EDI LEA EAX,[RDI*0x4] RET
int func0(int param_1) { return param_1 * param_1 * 4; }
4,959
func0
#include <assert.h>
int func0(int l) { int LSA = 4 * (l * l); return LSA; }
int main() { assert(func0(5) == 100); assert(func0(9) == 324); assert(func0(10) == 400); return 0; }
O3
c
func0: endbr64 imul %edi,%edi lea 0x0(,%rdi,4),%eax retq
func0: endbr64 imul edi, edi lea eax, ds:0[rdi*4] retn
long long func0(int a1) { return (unsigned int)(4 * a1 * a1); }
func0: ENDBR64 IMUL EDI,EDI LEA EAX,[RDI*0x4] RET
int func0(int param_1) { return param_1 * param_1 * 4; }
4,960
func0
#include <assert.h>
int func0(int n) { return (int)(n * (4 * n * n - 1) / 3); }
int main() { assert(func0(2) == 10); assert(func0(3) == 35); assert(func0(4) == 84); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x4(%rbp) mov -0x4(%rbp),%eax imul %eax,%eax shl $0x2,%eax sub $0x1,%eax imul -0x4(%rbp),%eax movslq %eax,%rdx imul $0x55555556,%rdx,%rdx shr $0x20,%rdx sar $0x1f,%eax mov %edx,%ecx sub %eax,%ecx mov %ecx,%eax pop %rbp retq
func0: endbr64 push rbp mov rbp, rsp mov [rbp+var_4], edi mov eax, [rbp+var_4] imul eax, eax shl eax, 2 sub eax, 1 imul eax, [rbp+var_4] movsxd rdx, eax imul rdx, 55555556h shr rdx, 20h sar eax, 1Fh sub edx, eax mov eax, edx pop rbp retn
long long func0(int a1) { return (unsigned int)(a1 * (4 * a1 * a1 - 1) / 3); }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x4],EDI MOV EAX,dword ptr [RBP + -0x4] IMUL EAX,EAX SHL EAX,0x2 SUB EAX,0x1 IMUL EAX,dword ptr [RBP + -0x4] MOVSXD RDX,EAX IMUL RDX,RDX,0x55555556 SHR RDX,0x20 SAR EAX,0x1f SUB EDX,EAX MOV EAX,EDX POP RBP RET
int func0(int param_1) { return ((param_1 * param_1 * 4 + -1) * param_1) / 3; }
4,961
func0
#include <assert.h>
int func0(int n) { return (int)(n * (4 * n * n - 1) / 3); }
int main() { assert(func0(2) == 10); assert(func0(3) == 35); assert(func0(4) == 84); return 0; }
O1
c
func0: endbr64 mov %edi,%eax mov %edi,%edx imul %edi,%edx lea -0x1(,%rdx,4),%edi imul %eax,%edi movslq %edi,%rax imul $0x55555556,%rax,%rax shr $0x20,%rax sar $0x1f,%edi sub %edi,%eax retq
func0: endbr64 mov eax, edi mov edx, edi imul edx, edi lea edi, ds:0FFFFFFFFFFFFFFFFh[rdx*4] imul edi, eax movsxd rax, edi imul rax, 55555556h shr rax, 20h sar edi, 1Fh sub eax, edi retn
long long func0(int a1) { return (unsigned int)(a1 * (4 * a1 * a1 - 1) / 3); }
func0: ENDBR64 MOV EAX,EDI MOV EDX,EDI IMUL EDX,EDI LEA EDI,[-0x1 + RDX*0x4] IMUL EDI,EAX MOVSXD RAX,EDI IMUL RAX,RAX,0x55555556 SHR RAX,0x20 SAR EDI,0x1f SUB EAX,EDI RET
int func0(int param_1) { return ((param_1 * param_1 * 4 + -1) * param_1) / 3; }
4,962
func0
#include <assert.h>
int func0(int n) { return (int)(n * (4 * n * n - 1) / 3); }
int main() { assert(func0(2) == 10); assert(func0(3) == 35); assert(func0(4) == 84); return 0; }
O2
c
func0: endbr64 mov %edi,%edx mov %edi,%eax imul %edi,%edx lea -0x1(,%rdx,4),%edi imul %eax,%edi movslq %edi,%rax sar $0x1f,%edi imul $0x55555556,%rax,%rax shr $0x20,%rax sub %edi,%eax retq nopl 0x0(%rax)
func0: endbr64 mov edx, edi mov eax, edi imul edx, edi lea edi, ds:0FFFFFFFFFFFFFFFFh[rdx*4] imul edi, eax movsxd rax, edi sar edi, 1Fh imul rax, 55555556h shr rax, 20h sub eax, edi retn
long long func0(int a1) { return (unsigned int)(a1 * (4 * a1 * a1 - 1) / 3); }
func0: ENDBR64 MOV EDX,EDI MOV EAX,EDI IMUL EDX,EDI LEA EDI,[-0x1 + RDX*0x4] IMUL EDI,EAX MOVSXD RAX,EDI SAR EDI,0x1f IMUL RAX,RAX,0x55555556 SHR RAX,0x20 SUB EAX,EDI RET
int func0(int param_1) { return ((param_1 * param_1 * 4 + -1) * param_1) / 3; }
4,963
func0
#include <assert.h>
int func0(int n) { return (int)(n * (4 * n * n - 1) / 3); }
int main() { assert(func0(2) == 10); assert(func0(3) == 35); assert(func0(4) == 84); return 0; }
O3
c
func0: endbr64 mov %edi,%edx mov %edi,%eax imul %edi,%edx lea -0x1(,%rdx,4),%edi imul %eax,%edi movslq %edi,%rax sar $0x1f,%edi imul $0x55555556,%rax,%rax shr $0x20,%rax sub %edi,%eax retq nopl 0x0(%rax)
func0: endbr64 mov edx, edi mov eax, edi imul edx, edi lea edi, ds:0FFFFFFFFFFFFFFFFh[rdx*4] imul edi, eax movsxd rax, edi sar edi, 1Fh imul rax, 55555556h shr rax, 20h sub eax, edi retn
long long func0(int a1) { return (unsigned int)(a1 * (4 * a1 * a1 - 1) / 3); }
func0: ENDBR64 MOV EDX,EDI MOV EAX,EDI IMUL EDX,EDI LEA EDI,[-0x1 + RDX*0x4] IMUL EDI,EAX MOVSXD RAX,EDI SAR EDI,0x1f IMUL RAX,RAX,0x55555556 SHR RAX,0x20 SUB EAX,EDI RET
int func0(int param_1) { return ((param_1 * param_1 * 4 + -1) * param_1) / 3; }
4,964
func0
#include <assert.h>
int func0(int n) { return (6 * n * (n - 1) + 1); }
int main() { assert(func0(3) == 37); assert(func0(4) == 73); assert(func0(5) == 121); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x4(%rbp) mov -0x4(%rbp),%eax sub $0x1,%eax imul -0x4(%rbp),%eax mov %eax,%edx mov %edx,%eax add %eax,%eax add %edx,%eax add %eax,%eax add $0x1,%eax pop %rbp retq
func0: endbr64 push rbp mov rbp, rsp mov [rbp+var_4], edi mov eax, [rbp+var_4] sub eax, 1 imul eax, [rbp+var_4] mov edx, eax mov eax, edx add eax, eax add eax, edx add eax, eax add eax, 1 pop rbp retn
long long func0(int a1) { return (unsigned int)(6 * a1 * (a1 - 1) + 1); }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x4],EDI MOV EAX,dword ptr [RBP + -0x4] SUB EAX,0x1 IMUL EAX,dword ptr [RBP + -0x4] MOV EDX,EAX MOV EAX,EDX ADD EAX,EAX ADD EAX,EDX ADD EAX,EAX ADD EAX,0x1 POP RBP RET
int func0(int param_1) { return (param_1 + -1) * param_1 * 6 + 1; }
4,965
func0
#include <assert.h>
int func0(int n) { return (6 * n * (n - 1) + 1); }
int main() { assert(func0(3) == 37); assert(func0(4) == 73); assert(func0(5) == 121); return 0; }
O1
c
func0: endbr64 mov %edi,%eax lea -0x1(%rdi),%edi imul %eax,%edi lea (%rdi,%rdi,2),%eax lea 0x1(%rax,%rax,1),%eax retq
func0: endbr64 lea eax, [rdi-1] imul eax, edi lea eax, [rax+rax*2] lea eax, [rax+rax+1] retn
long long func0(int a1) { return (unsigned int)(6 * a1 * (a1 - 1) + 1); }
func0: ENDBR64 LEA EAX,[RDI + -0x1] IMUL EAX,EDI LEA EAX,[RAX + RAX*0x2] LEA EAX,[RAX + RAX*0x1 + 0x1] RET
int func0(int param_1) { return (param_1 + -1) * param_1 * 6 + 1; }
4,966
func0
#include <assert.h>
int func0(int n) { return (6 * n * (n - 1) + 1); }
int main() { assert(func0(3) == 37); assert(func0(4) == 73); assert(func0(5) == 121); return 0; }
O2
c
func0: endbr64 mov %edi,%r8d lea -0x1(%rdi),%edi imul %r8d,%edi lea (%rdi,%rdi,2),%eax lea 0x1(%rax,%rax,1),%eax retq nopw %cs:0x0(%rax,%rax,1)
func0: endbr64 lea eax, [rdi-1] imul eax, edi lea eax, [rax+rax*2] lea eax, [rax+rax+1] retn
long long func0(int a1) { return (unsigned int)(6 * a1 * (a1 - 1) + 1); }
func0: ENDBR64 LEA EAX,[RDI + -0x1] IMUL EAX,EDI LEA EAX,[RAX + RAX*0x2] LEA EAX,[RAX + RAX*0x1 + 0x1] RET
int func0(int param_1) { return (param_1 + -1) * param_1 * 6 + 1; }
4,967
func0
#include <assert.h>
int func0(int n) { return (6 * n * (n - 1) + 1); }
int main() { assert(func0(3) == 37); assert(func0(4) == 73); assert(func0(5) == 121); return 0; }
O3
c
func0: endbr64 mov %edi,%r8d lea -0x1(%rdi),%edi imul %r8d,%edi lea (%rdi,%rdi,2),%eax lea 0x1(%rax,%rax,1),%eax retq nopw %cs:0x0(%rax,%rax,1)
func0: endbr64 lea eax, [rdi-1] imul eax, edi lea eax, [rax+rax*2] lea eax, [rax+rax+1] retn
long long func0(int a1) { return (unsigned int)(6 * a1 * (a1 - 1) + 1); }
func0: ENDBR64 LEA EAX,[RDI + -0x1] IMUL EAX,EDI LEA EAX,[RAX + RAX*0x2] LEA EAX,[RAX + RAX*0x1 + 0x1] RET
int func0(int param_1) { return (param_1 + -1) * param_1 * 6 + 1; }
4,968
func0
#include <assert.h>
int func0(char k) { return (int)k; }
int main() { assert(func0('A') == 65); assert(func0('R') == 82); assert(func0('S') == 83); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %edi,%eax mov %al,-0x4(%rbp) movsbl -0x4(%rbp),%eax pop %rbp retq
func0: endbr64 push rbp mov rbp, rsp mov eax, edi mov [rbp+var_4], al movsx eax, [rbp+var_4] pop rbp retn
long long func0(char a1) { return (unsigned int)a1; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV EAX,EDI MOV byte ptr [RBP + -0x4],AL MOVSX EAX,byte ptr [RBP + -0x4] POP RBP RET
int func0(char param_1) { return (int)param_1; }
4,969
func0
#include <assert.h>
int func0(char k) { return (int)k; }
int main() { assert(func0('A') == 65); assert(func0('R') == 82); assert(func0('S') == 83); return 0; }
O1
c
func0: endbr64 movsbl %dil,%eax retq
func0: endbr64 movsx eax, dil retn
long long func0(char a1) { return (unsigned int)a1; }
func0: ENDBR64 MOVSX EAX,DIL RET
int func0(char param_1) { return (int)param_1; }
4,970
func0
#include <assert.h>
int func0(char k) { return (int)k; }
int main() { assert(func0('A') == 65); assert(func0('R') == 82); assert(func0('S') == 83); return 0; }
O2
c
func0: endbr64 movsbl %dil,%eax retq nopl 0x0(%rax)
func0: endbr64 movsx eax, dil retn
long long func0(char a1) { return (unsigned int)a1; }
func0: ENDBR64 MOVSX EAX,DIL RET
int func0(char param_1) { return (int)param_1; }
4,971
func0
#include <assert.h>
int func0(char k) { return (int)k; }
int main() { assert(func0('A') == 65); assert(func0('R') == 82); assert(func0('S') == 83); return 0; }
O3
c
func0: endbr64 movsbl %dil,%eax retq nopl 0x0(%rax)
func0: endbr64 movsx eax, dil retn
long long func0(char a1) { return (unsigned int)a1; }
func0: ENDBR64 MOVSX EAX,DIL RET
int func0(char param_1) { return (int)param_1; }
4,972
func0
#include <assert.h>
int func0(int arr[], int n) { int sum = 0; for (int i = 0; i < n; i += 2) { if (arr[i] % 2 == 0) { sum += arr[i]; } } return sum; }
int main() { int arr1[] = {5, 6, 12, 1, 18, 8}; int arr2[] = {3, 20, 17, 9, 2, 10, 18, 13, 6, 18}; int arr3[] = {5, 6, 12, 1}; assert(func0(arr1, 6) == 30); assert(func0(arr2, 10) == 26); assert(func0(arr3, 4) == 12); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %rdi,-0x18(%rbp) mov %esi,-0x1c(%rbp) movl $0x0,-0x8(%rbp) movl $0x0,-0x4(%rbp) jmp 11c2 <func0+0x59> mov -0x4(%rbp),%eax cltq lea 0x0(,%rax,4),%rdx mov -0x18(%rbp),%rax add %rdx,%rax mov (%rax),%eax and $0x1,%eax test %eax,%eax jne 11b...
func0: endbr64 push rbp mov rbp, rsp mov [rbp+var_18], rdi mov [rbp+var_1C], esi mov [rbp+var_8], 0 mov [rbp+var_4], 0 jmp short loc_11C2 loc_1188: mov eax, [rbp+var_4] cdqe lea rdx, ds:0[rax*4] mov rax, [rbp+var_18] add rax, rdx mov eax, [rax] and eax, 1 test eax, ...
long long func0(long long a1, int a2) { unsigned int v3; // [rsp+14h] [rbp-8h] int i; // [rsp+18h] [rbp-4h] v3 = 0; for ( i = 0; i < a2; i += 2 ) { if ( (*(_DWORD *)(4LL * i + a1) & 1) == 0 ) v3 += *(_DWORD *)(4LL * i + a1); } return v3; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x18],RDI MOV dword ptr [RBP + -0x1c],ESI MOV dword ptr [RBP + -0x8],0x0 MOV dword ptr [RBP + -0x4],0x0 JMP 0x001011c2 LAB_00101188: MOV EAX,dword ptr [RBP + -0x4] CDQE LEA RDX,[RAX*0x4] MOV RAX,qword ptr [RBP + -0x18] ADD RAX,RDX MOV EAX,dword ptr [RAX] AND EAX...
int func0(long param_1,int param_2) { int4 local_10; int4 local_c; local_10 = 0; for (local_c = 0; local_c < param_2; local_c = local_c + 2) { if ((*(uint *)(param_1 + (long)local_c * 4) & 1) == 0) { local_10 = local_10 + *(int *)(param_1 + (long)local_c * 4); } } return local_10; }
4,973
func0
#include <assert.h>
int func0(int arr[], int n) { int sum = 0; for (int i = 0; i < n; i += 2) { if (arr[i] % 2 == 0) { sum += arr[i]; } } return sum; }
int main() { int arr1[] = {5, 6, 12, 1, 18, 8}; int arr2[] = {3, 20, 17, 9, 2, 10, 18, 13, 6, 18}; int arr3[] = {5, 6, 12, 1}; assert(func0(arr1, 6) == 30); assert(func0(arr2, 10) == 26); assert(func0(arr3, 4) == 12); return 0; }
O1
c
func0: endbr64 test %esi,%esi jle 119c <func0+0x33> mov %rdi,%rax sub $0x1,%esi shr %esi mov %esi,%esi lea 0x8(%rdi,%rsi,8),%rdi mov $0x0,%edx mov (%rax),%ecx lea (%rdx,%rcx,1),%esi test $0x1,%cl cmove %esi,%edx add $0x8,%rax cmp %rdi,%rax jne 1185 <func0+0x1c> mov %edx,%eax ...
func0: endbr64 test esi, esi jle short loc_119C mov rax, rdi sub esi, 1 shr esi, 1 mov esi, esi lea rdi, [rdi+rsi*8+8] mov edx, 0 loc_1185: mov ecx, [rax] lea esi, [rdx+rcx] test cl, 1 cmovz edx, esi add rax, 8 cmp rax, rdi jnz short loc_1185 loc_1199: mov eax...
long long func0(_DWORD *a1, int a2) { _DWORD *v2; // rax long long v3; // rdi unsigned int v4; // edx if ( a2 <= 0 ) { return 0; } else { v2 = a1; v3 = (long long)&a1[2 * ((unsigned int)(a2 - 1) >> 1) + 2]; v4 = 0; do { if ( (*v2 & 1) == 0 ) v4 += *v2; v2 +=...
func0: ENDBR64 TEST ESI,ESI JLE 0x0010119c MOV RAX,RDI SUB ESI,0x1 SHR ESI,0x1 MOV ESI,ESI LEA RDI,[RDI + RSI*0x8 + 0x8] MOV EDX,0x0 LAB_00101185: MOV ECX,dword ptr [RAX] LEA ESI,[RDX + RCX*0x1] TEST CL,0x1 CMOVZ EDX,ESI ADD RAX,0x8 CMP RAX,RDI JNZ 0x00101185 LAB_00101199: MOV EAX,EDX RET LAB_0010119c: MOV EDX,0x0 JMP ...
int func0(uint *param_1,int param_2) { uint *puVar1; int iVar2; if (param_2 < 1) { iVar2 = 0; } else { puVar1 = param_1 + (ulong)(param_2 - 1U >> 1) * 2 + 2; iVar2 = 0; do { if ((*param_1 & 1) == 0) { iVar2 = iVar2 + *param_1; } param_1 = param_1 + 2; } while ...
4,974
func0
#include <assert.h>
int func0(int arr[], int n) { int sum = 0; for (int i = 0; i < n; i += 2) { if (arr[i] % 2 == 0) { sum += arr[i]; } } return sum; }
int main() { int arr1[] = {5, 6, 12, 1, 18, 8}; int arr2[] = {3, 20, 17, 9, 2, 10, 18, 13, 6, 18}; int arr3[] = {5, 6, 12, 1}; assert(func0(arr1, 6) == 30); assert(func0(arr2, 10) == 26); assert(func0(arr3, 4) == 12); return 0; }
O2
c
func0: endbr64 test %esi,%esi jle 1270 <func0+0x30> sub $0x1,%esi xor %eax,%eax shr %esi lea 0x8(%rdi,%rsi,8),%rsi nopl 0x0(%rax) mov (%rdi),%edx lea (%rax,%rdx,1),%ecx and $0x1,%edx cmove %ecx,%eax add $0x8,%rdi cmp %rsi,%rdi jne 1258 <func0+0x18> retq nopl (%rax) xor %eax,%e...
func0: endbr64 test esi, esi jle short loc_1270 sub esi, 1 xor eax, eax shr esi, 1 lea rsi, [rdi+rsi*8+8] nop dword ptr [rax+00h] loc_1258: mov edx, [rdi] lea ecx, [rax+rdx] and edx, 1 cmovz eax, ecx add rdi, 8 cmp rdi, rsi jnz short loc_1258 retn loc_1270: xor e...
long long func0(_DWORD *a1, int a2) { long long result; // rax long long v3; // rsi if ( a2 <= 0 ) return 0LL; result = 0LL; v3 = (long long)&a1[2 * ((unsigned int)(a2 - 1) >> 1) + 2]; do { if ( (*a1 & 1) == 0 ) result = (unsigned int)(result + *a1); a1 += 2; } while ( a1 != (_DWOR...
func0: ENDBR64 TEST ESI,ESI JLE 0x00101270 SUB ESI,0x1 XOR EAX,EAX SHR ESI,0x1 LEA RSI,[RDI + RSI*0x8 + 0x8] NOP dword ptr [RAX] LAB_00101258: MOV EDX,dword ptr [RDI] LEA ECX,[RAX + RDX*0x1] AND EDX,0x1 CMOVZ EAX,ECX ADD RDI,0x8 CMP RDI,RSI JNZ 0x00101258 RET LAB_00101270: XOR EAX,EAX RET
int func0(uint *param_1,int param_2) { uint *puVar1; int iVar2; if (0 < param_2) { iVar2 = 0; puVar1 = param_1 + (ulong)(param_2 - 1U >> 1) * 2 + 2; do { if ((*param_1 & 1) == 0) { iVar2 = iVar2 + *param_1; } param_1 = param_1 + 2; } while (param_1 != puVar1); ret...
4,975
func0
#include <assert.h>
int func0(int arr[], int n) { int sum = 0; for (int i = 0; i < n; i += 2) { if (arr[i] % 2 == 0) { sum += arr[i]; } } return sum; }
int main() { int arr1[] = {5, 6, 12, 1, 18, 8}; int arr2[] = {3, 20, 17, 9, 2, 10, 18, 13, 6, 18}; int arr3[] = {5, 6, 12, 1}; assert(func0(arr1, 6) == 30); assert(func0(arr2, 10) == 26); assert(func0(arr3, 4) == 12); return 0; }
O3
c
func0: endbr64 test %esi,%esi jle 1328 <func0+0xe8> lea -0x1(%rsi),%edx cmp $0x7,%edx jbe 132b <func0+0xeb> shr $0x3,%edx pxor %xmm2,%xmm2 movdqa 0xdf9(%rip),%xmm4 mov %rdi,%rax mov %edx,%ecx movdqa %xmm2,%xmm3 shl $0x5,%rcx add %rdi,%rcx nopw 0x0(%rax,%rax,1) movdqu (%rax),%xmm1 movdqu...
func0: endbr64 test esi, esi jle loc_1230 lea edx, [rsi-1] cmp edx, 7 jbe loc_1233 shr edx, 3 pxor xmm2, xmm2 movdqa xmm4, cs:xmmword_2010 mov rax, rdi mov ecx, edx movdqa xmm3, xmm2 shl rcx, 5 add rcx, rdi nop word ptr [rax+rax+00000000h] loc_1180: movdqu xmm1, xmmword ...
long long func0(const __m128i *a1, int a2) { unsigned int v2; // edx __m128i v3; // xmm2 __m128i si128; // xmm4 const __m128i *v5; // rax __m128 v6; // xmm1 __m128 v7; // xmm5 __m128i v8; // xmm1 int v9; // edx __m128i v10; // xmm2 long long result; // rax long long v12; // rcx __int32 v13; // ...
func0: ENDBR64 TEST ESI,ESI JLE 0x00101230 LEA EDX,[RSI + -0x1] CMP EDX,0x7 JBE 0x00101233 SHR EDX,0x3 PXOR XMM2,XMM2 MOVDQA XMM4,xmmword ptr [0x00102010] MOV RAX,RDI MOV ECX,EDX MOVDQA XMM3,XMM2 SHL RCX,0x5 ADD RCX,RDI NOP word ptr [RAX + RAX*0x1] LAB_00101180: MOVDQU XMM1,xmmword ptr [RAX] MOVDQU XMM5,xmmword ptr [RA...
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ int func0(uint *param_1,int param_2) { uint *puVar1; uint uVar2; uint *puVar3; uint *puVar4; uint *puVar5; uint uVar6; int iVar7; int iVar8; int iVar9; int iVar10; int iVar11; if (param_2 < 1) { iVar8 =...
4,976
func0
#include <assert.h>
long func0(int n) { long sum = 0; for (int i = 1; i <= n; i++) { int j = 2 * i; sum += j * j * j * j * j; } return sum; }
int main() { assert(func0(2) == 1056); assert(func0(3) == 8832); assert(func0(1) == 32); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x14(%rbp) movq $0x0,-0x8(%rbp) movl $0x1,-0x10(%rbp) jmp 1189 <func0+0x40> mov -0x10(%rbp),%eax add %eax,%eax mov %eax,-0xc(%rbp) mov -0xc(%rbp),%eax imul %eax,%eax imul -0xc(%rbp),%eax imul -0xc(%rbp),%eax imul -0xc(%rbp),%eax cltq ad...
func0: endbr64 push rbp mov rbp, rsp mov [rbp+var_14], edi mov [rbp+var_8], 0 mov [rbp+var_10], 1 jmp short loc_1189 loc_1165: mov eax, [rbp+var_10] add eax, eax mov [rbp+var_C], eax mov eax, [rbp+var_C] imul eax, eax imul eax, [rbp+var_C] imul eax, [rbp+var_C] imul ea...
long long func0(int a1) { int i; // [rsp+4h] [rbp-10h] long long v3; // [rsp+Ch] [rbp-8h] v3 = 0LL; for ( i = 1; i <= a1; ++i ) v3 += 2 * i * 2 * i * 2 * i * 2 * i * 2 * i; return v3; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x14],EDI MOV qword ptr [RBP + -0x8],0x0 MOV dword ptr [RBP + -0x10],0x1 JMP 0x00101189 LAB_00101165: MOV EAX,dword ptr [RBP + -0x10] ADD EAX,EAX MOV dword ptr [RBP + -0xc],EAX MOV EAX,dword ptr [RBP + -0xc] IMUL EAX,EAX IMUL EAX,dword ptr [RBP + -0xc] IMUL EAX,...
long func0(int param_1) { int iVar1; int4 local_18; int8 local_10; local_10 = 0; for (local_18 = 1; local_18 <= param_1; local_18 = local_18 + 1) { iVar1 = local_18 * 2; local_10 = local_10 + iVar1 * iVar1 * iVar1 * iVar1 * iVar1; } return local_10; }
4,977
func0
#include <assert.h>
long func0(int n) { long sum = 0; for (int i = 1; i <= n; i++) { int j = 2 * i; sum += j * j * j * j * j; } return sum; }
int main() { assert(func0(2) == 1056); assert(func0(3) == 8832); assert(func0(1) == 32); return 0; }
O1
c
func0: endbr64 test %edi,%edi jle 117a <func0+0x31> lea 0x2(%rdi,%rdi,1),%esi mov $0x2,%edx mov $0x0,%ecx mov %edx,%eax imul %edx,%eax imul %eax,%eax imul %edx,%eax cltq add %rax,%rcx add $0x2,%edx cmp %esi,%edx jne 115f <func0+0x16> mov %rcx,%rax retq mov $0x0,%ecx jmp 1176 ...
func0: endbr64 test edi, edi jle short loc_117A lea esi, [rdi+rdi+2] mov edx, 2 mov ecx, 0 loc_115F: mov eax, edx imul eax, edx imul eax, eax imul eax, edx cdqe add rcx, rax add edx, 2 cmp edx, esi jnz short loc_115F loc_1176: mov rax, rcx retn loc_117A: mov ecx, ...
long long func0(int a1) { int v1; // edx long long v2; // rcx if ( a1 <= 0 ) return 0LL; v1 = 2; v2 = 0LL; do { v2 += v1 * v1 * v1 * v1 * v1; v1 += 2; } while ( v1 != 2 * a1 + 2 ); return v2; }
func0: ENDBR64 TEST EDI,EDI JLE 0x0010117a LEA ESI,[RDI + RDI*0x1 + 0x2] MOV EDX,0x2 MOV ECX,0x0 LAB_0010115f: MOV EAX,EDX IMUL EAX,EDX IMUL EAX,EAX IMUL EAX,EDX CDQE ADD RCX,RAX ADD EDX,0x2 CMP EDX,ESI JNZ 0x0010115f LAB_00101176: MOV RAX,RCX RET LAB_0010117a: MOV ECX,0x0 JMP 0x00101176
long func0(int param_1) { long lVar1; int iVar2; if (param_1 < 1) { lVar1 = 0; } else { iVar2 = 2; lVar1 = 0; do { lVar1 = lVar1 + iVar2 * iVar2 * iVar2 * iVar2 * iVar2; iVar2 = iVar2 + 2; } while (iVar2 != param_1 * 2 + 2); } return lVar1; }
4,978
func0
#include <assert.h>
long func0(int n) { long sum = 0; for (int i = 1; i <= n; i++) { int j = 2 * i; sum += j * j * j * j * j; } return sum; }
int main() { assert(func0(2) == 1056); assert(func0(3) == 8832); assert(func0(1) == 32); return 0; }
O2
c
func0: endbr64 test %edi,%edi jle 1178 <func0+0x38> lea 0x2(%rdi,%rdi,1),%ecx mov $0x2,%edx xor %r8d,%r8d nopl 0x0(%rax) mov %edx,%eax imul %edx,%eax imul %eax,%eax imul %edx,%eax add $0x2,%edx cltq add %rax,%r8 cmp %edx,%ecx jne 1158 <func0+0x18> mov %r8,%rax retq nopl 0x0(%ra...
func0: endbr64 test edi, edi jle short loc_1178 lea ecx, [rdi+rdi+2] mov edx, 2 xor r8d, r8d nop dword ptr [rax+00h] loc_1158: mov eax, edx imul eax, edx imul eax, eax imul eax, edx add edx, 2 cdqe add r8, rax cmp ecx, edx jnz short loc_1158 mov rax, r8 retn loc_1...
long long func0(int a1) { int v1; // edx long long v2; // r8 int v3; // eax if ( a1 <= 0 ) return 0LL; v1 = 2; v2 = 0LL; do { v3 = v1 * v1 * v1 * v1 * v1; v1 += 2; v2 += v3; } while ( 2 * a1 + 2 != v1 ); return v2; }
func0: ENDBR64 TEST EDI,EDI JLE 0x00101178 LEA ECX,[RDI + RDI*0x1 + 0x2] MOV EDX,0x2 XOR R8D,R8D NOP dword ptr [RAX] LAB_00101158: MOV EAX,EDX IMUL EAX,EDX IMUL EAX,EAX IMUL EAX,EDX ADD EDX,0x2 CDQE ADD R8,RAX CMP ECX,EDX JNZ 0x00101158 MOV RAX,R8 RET LAB_00101178: XOR R8D,R8D MOV RAX,R8 RET
long func0(int param_1) { int iVar1; int iVar2; long lVar3; if (0 < param_1) { iVar2 = 2; lVar3 = 0; do { iVar1 = iVar2 * iVar2 * iVar2 * iVar2 * iVar2; iVar2 = iVar2 + 2; lVar3 = lVar3 + iVar1; } while (param_1 * 2 + 2 != iVar2); return lVar3; } return 0; }
4,979
func0
#include <assert.h>
long func0(int n) { long sum = 0; for (int i = 1; i <= n; i++) { int j = 2 * i; sum += j * j * j * j * j; } return sum; }
int main() { assert(func0(2) == 1056); assert(func0(3) == 8832); assert(func0(1) == 32); return 0; }
O3
c
func0: endbr64 test %edi,%edi jle 1178 <func0+0x38> lea 0x2(%rdi,%rdi,1),%ecx mov $0x2,%edx xor %r8d,%r8d nopl 0x0(%rax) mov %edx,%eax imul %edx,%eax imul %eax,%eax imul %edx,%eax add $0x2,%edx cltq add %rax,%r8 cmp %edx,%ecx jne 1158 <func0+0x18> mov %r8,%rax retq nopl 0x0(%ra...
func0: endbr64 test edi, edi jle short loc_1178 lea esi, [rdi+rdi+2] mov edx, 2 xor ecx, ecx nop dword ptr [rax+rax+00h] loc_1158: mov eax, edx imul eax, edx imul eax, eax imul eax, edx add edx, 2 cdqe add rcx, rax cmp esi, edx jnz short loc_1158 mov rax, rcx retn...
long long func0(int a1) { int v1; // edx long long v2; // rcx int v3; // eax if ( a1 <= 0 ) return 0LL; v1 = 2; v2 = 0LL; do { v3 = v1 * v1 * v1 * v1 * v1; v1 += 2; v2 += v3; } while ( 2 * a1 + 2 != v1 ); return v2; }
func0: ENDBR64 TEST EDI,EDI JLE 0x00101178 LEA ESI,[RDI + RDI*0x1 + 0x2] MOV EDX,0x2 XOR ECX,ECX NOP dword ptr [RAX + RAX*0x1] LAB_00101158: MOV EAX,EDX IMUL EAX,EDX IMUL EAX,EAX IMUL EAX,EDX ADD EDX,0x2 CDQE ADD RCX,RAX CMP ESI,EDX JNZ 0x00101158 MOV RAX,RCX RET LAB_00101178: XOR ECX,ECX MOV RAX,RCX RET
long func0(int param_1) { int iVar1; long lVar2; int iVar3; if (0 < param_1) { iVar3 = 2; lVar2 = 0; do { iVar1 = iVar3 * iVar3 * iVar3 * iVar3 * iVar3; iVar3 = iVar3 + 2; lVar2 = lVar2 + iVar1; } while (param_1 * 2 + 2 != iVar3); return lVar2; } return 0; }
4,980
func0
#include <assert.h> #include <stdio.h>
int* func0(int test_list[][3], int length, int *output) { for (int i = 0; i < length; i++) { output[i] = test_list[i][2]; } return output; }
int main() { int list1[][3] = {{1, 'R', 21}, {2, 'V', 20}, {3, 'K', 19}}; int list2[][3] = {{1, 'S', 36}, {2, 'A', 25}, {3, 'S', 45}}; int list3[][3] = {{1, 'S', 14}, {2, 'V', 36}, {3, 'D', 56}}; int length1 = sizeof(list1) / sizeof(list1[0]); int length2 = sizeof(list2) / sizeof(list2[0]...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %rdi,-0x18(%rbp) mov %esi,-0x1c(%rbp) mov %rdx,-0x28(%rbp) movl $0x0,-0x4(%rbp) jmp 11e0 <func0+0x57> mov -0x4(%rbp),%eax movslq %eax,%rdx mov %rdx,%rax add %rax,%rax add %rdx,%rax shl $0x2,%rax mov %rax,%rdx mov -0x18(%rbp),%rax add ...
func0: endbr64 push rbp mov rbp, rsp mov [rbp+var_18], rdi mov [rbp+var_1C], esi mov [rbp+var_28], rdx mov [rbp+var_4], 0 jmp short loc_11E0 loc_11A5: mov eax, [rbp+var_4] movsxd rdx, eax mov rax, rdx add rax, rax add rax, rdx shl rax, 2 mov rdx, rax mov rax, [rbp...
long long func0(long long a1, int a2, long long a3) { int i; // [rsp+24h] [rbp-4h] for ( i = 0; i < a2; ++i ) *(_DWORD *)(4LL * i + a3) = *(_DWORD *)(12LL * i + a1 + 8); return a3; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x18],RDI MOV dword ptr [RBP + -0x1c],ESI MOV qword ptr [RBP + -0x28],RDX MOV dword ptr [RBP + -0x4],0x0 JMP 0x001011e0 LAB_001011a5: MOV EAX,dword ptr [RBP + -0x4] MOVSXD RDX,EAX MOV RAX,RDX ADD RAX,RAX ADD RAX,RDX SHL RAX,0x2 MOV RDX,RAX MOV RAX,qword ptr [RBP...
long func0(long param_1,int param_2,long param_3) { int4 local_c; for (local_c = 0; local_c < param_2; local_c = local_c + 1) { *(int4 *)(param_3 + (long)local_c * 4) = *(int4 *)(param_1 + (long)local_c * 0xc + 8); } return param_3; }
4,981
func0
#include <assert.h> #include <stdio.h>
int* func0(int test_list[][3], int length, int *output) { for (int i = 0; i < length; i++) { output[i] = test_list[i][2]; } return output; }
int main() { int list1[][3] = {{1, 'R', 21}, {2, 'V', 20}, {3, 'K', 19}}; int list2[][3] = {{1, 'S', 36}, {2, 'A', 25}, {3, 'S', 45}}; int list3[][3] = {{1, 'S', 14}, {2, 'V', 36}, {3, 'D', 56}}; int length1 = sizeof(list1) / sizeof(list1[0]); int length2 = sizeof(list2) / sizeof(list2[0]...
O1
c
func0: endbr64 mov %rdx,%rax test %esi,%esi jle 11b4 <func0+0x2b> add $0x8,%rdi mov %rdx,%rcx lea -0x1(%rsi),%edx lea 0x4(%rax,%rdx,4),%r8 mov (%rdi),%esi mov %esi,(%rcx) add $0xc,%rdi add $0x4,%rcx cmp %r8,%rcx jne 11a3 <func0+0x1a> retq
func0: endbr64 mov rax, rdx test esi, esi jle short locret_11B4 add rdi, 8 mov rcx, rdx lea edx, [rsi-1] lea r8, [rax+rdx*4+4] loc_11A3: mov esi, [rdi] mov [rcx], esi add rdi, 0Ch add rcx, 4 cmp rcx, r8 jnz short loc_11A3 locret_11B4: retn
_DWORD * func0(long long a1, int a2, _DWORD *a3) { _DWORD *result; // rax _DWORD *v4; // rdi _DWORD *v5; // rcx result = a3; if ( a2 > 0 ) { v4 = (_DWORD *)(a1 + 8); v5 = a3; do { *v5 = *v4; v4 += 3; ++v5; } while ( v5 != &a3[a2 - 1 + 1] ); } return result; }
func0: ENDBR64 MOV RAX,RDX TEST ESI,ESI JLE 0x001011b4 ADD RDI,0x8 MOV RCX,RDX LEA EDX,[RSI + -0x1] LEA R8,[RAX + RDX*0x4 + 0x4] LAB_001011a3: MOV ESI,dword ptr [RDI] MOV dword ptr [RCX],ESI ADD RDI,0xc ADD RCX,0x4 CMP RCX,R8 JNZ 0x001011a3 LAB_001011b4: RET
void func0(long param_1,int param_2,int4 *param_3) { int4 *puVar1; int4 *puVar2; if (0 < param_2) { puVar2 = (int4 *)(param_1 + 8); puVar1 = param_3 + (ulong)(param_2 - 1) + 1; do { *param_3 = *puVar2; puVar2 = puVar2 + 3; param_3 = param_3 + 1; } while (param_3 != puVar1); ...